更新vcpkg发现,vcpkg没有更新openssl 1.1.1系列的port,只更新3.x系列的了。
那如何利用vcpkg出openssl 1.1.1t的包呢?
https://stackoverflow.com/questions/53805917/install-older-version-of-protobuf-via-vcpkg
To have a specific version of a package in vcpkg
, you need to checkout at the appropriate point in time in the vcpk
repo.
vcpk
folder.protobuf
you’re looking for.The following line color-codes the commit history to make it more readable and pipe it with grep
to identify protobuf
related commits.
git log --color=always --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad)' --date=short | grep --color=never protobuf
You’ll find a line like b1fea4588 - [protobuf] update to 3.5.1 (2018-01-31)
. (The commit hash/message may have changed if the history has been rewritten.)
git checkout b1fea4588
vcpkg install protobuf
The issue of package version management is very active on vcpkg
repo. Check Issue #3592
Use a new feature (June 2019): ports overlay https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md
Here is an example. The version of packet is hardcoded in file:
/ports//CONTROL
Thus it’s bound to the commit of vckpg. But you can override packet version with the following command
vcpkg --overlay-ports="/some/path/to/the_versions" install protobuf:x64-windows
The directory should contain packet specs:
/some/path/to/the_versions/protobuf/CONTROL
/some/path/to/the_versions//CONTROL
/some/path/to/the_versions//CONTROL
Usually, I just copy packet specs from the commit I was initially developing my project for. Hope this helps!
Note:新的版本好像也不支持这个ports overlay了。
git log --color=always --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad)' --date=short | grep --color=never openssl
执行上述git 命令发现,vcpkg支持的1.1.1系列最新的是1.1.1n.
a69b65229 - [openssl] update to 1.1.1n (#23589) (2022-03-17)
git reset a69b65229
将vcpkg 回到 a69b65229
节点。
modified: ports/openssl/portfile.cmake
modified: ports/openssl/vcpkg.json
modified: versions/baseline.json
modified: versions/o-/openssl.json
修改 1.1.1n to 1.1.1t
./vcpkg install openssl:x64-windows
./vcpkg export openssl:x64-windows --zip
vcpkg getstarted:https://vcpkg.io/en/getting-started.html
vcpkg支持的库:https://vcpkg.io/en/packages.html
vcpkg中文快速入门: https://www.cnblogs.com/flyinggod/p/10786243.html