How to specify exact version for port dependency #24655
-
Hello, I am maintaining a small out-of-tree port (https://github.com/OpenVPN/openvpn/blob/release/2.5/contrib/vcpkg-ports/pkcs11-helper/portfile.cmake) which has build-time dependency on openssl. Our software, which uses this port, supports both openssl 1.1.1 and 3.0.x and I need a way to specify openssl version I want to use with my port. When using manifest mode to list dependencies, it could be done like this:
In this case the correct openssl version got installed. However, the same approach doesn't work when I use it in port definition (currently port uses CONTROL file, but I am experimenting with vcpkg.json):
Here is output, where openssl 3.0.2 is installed instead of 1.1.1n:
So the question is - how to define exact (or maximum) version for port dependency? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Overrides are the right choice, but you can only use them at the root level and not in a port. Within a port you can only use If you could overrides in a port, you could create two port with a dependency on |
Beta Was this translation helpful? Give feedback.
Overrides are the right choice, but you can only use them at the root level and not in a port. Within a port you can only use
"version>=": "..."
. So vcpkg uses a minimum version approach.If you could overrides in a port, you could create two port with a dependency on
A
where port one required version 1 and port two requires version 2. This would result in unsolvable version constraints. With the minimum versioning approach you can build any port together without getting versioning conflicts.