Skip to content

Conversation

Neumann-A
Copy link
Contributor

No description provided.

@JackBoosY JackBoosY added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jul 30, 2020
@JackBoosY
Copy link
Contributor

Provide us some usage?

@qis
Copy link
Contributor

qis commented Jul 30, 2020

@JackBoosY Here is some usage. It seems to work as intended.

set VCPKG_OVERLAY_PORTS=C:\Workspace\a;C:\Workspace\b
vcpkg install test
rem Installs: C:\Workspace\a\test

set VCPKG_OVERLAY_PORTS=C:\Workspace\b;C:\Workspace\a
vcpkg install test
rem Installs: C:\Workspace\b\test
export VCPKG_OVERLAY_PORTS=/mnt/c/Workspace/a:/mnt/c/Workspace/b
vcpkg install test
# Installs: /mnt/c/Workspace/a

export VCPKG_OVERLAY_PORTS=/mnt/c/Workspace/b:/mnt/c/Workspace/a
vcpkg install test
# Installs: /mnt/c/Workspace/b

Edit: Overriding directories in vcpkg/ports is also possible.

@qis
Copy link
Contributor

qis commented Jul 30, 2020

Adding this might be a good idea:

diff --git i/docs/users/config-environment.md w/docs/users/config-environment.md
index ffa988cbc..db9d26ac3 100644
--- i/docs/users/config-environment.md
+++ w/docs/users/config-environment.md
@@ -38,11 +38,19 @@ Example: `D:\2017`
 
 This environment variable can be set to a triplet name which will be used for unqualified triplet references in command lines.
 
+#### VCPKG_OVERLAY_PORTS
+
+This environment variable allow users to override ports with alternate versions according to the
+[ports overlay](../specifications/ports-overlay.md) specification. Use `;` as a delimitor on Windows
+and `:` on all other systems.
+
+Example: `C:\custom-ports\boost;C:\custom-ports\sqlite3`
+
 #### VCPKG_FORCE_SYSTEM_BINARIES
 
 This environment variable, if set, suppresses the downloading of CMake and Ninja and forces the use of the system binaries.
 
-### VCPKG_KEEP_ENV_VARS
+#### VCPKG_KEEP_ENV_VARS
 
 This environment variable can be set to a list of environment variables, separated by `;`, which will be propagated to
 the build environment.

@Neumann-A Neumann-A marked this pull request as ready for review August 1, 2020 20:31
@JackBoosY JackBoosY requested a review from strega-nil August 3, 2020 02:43
Copy link
Contributor

@strega-nil strega-nil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this feature.

@strega-nil
Copy link
Contributor

cc @ras0219-msft

@strega-nil strega-nil requested a review from ras0219-msft August 3, 2020 17:58
@Neumann-A
Copy link
Contributor Author

@strega-nil: probably should follow up with another one for VCPKG_OVERLAY_TRIPLETS. But that one is not so important as this one.

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
@JackBoosY
Copy link
Contributor

pbc regression will be fixed in #12732

@JackBoosY JackBoosY added info:reviewed Pull Request changes follow basic guidelines and removed requires:discussion labels Aug 5, 2020
@strega-nil strega-nil merged commit 4fb846b into microsoft:master Aug 5, 2020
sandercox added a commit to sandercox/vcpkg that referenced this pull request Aug 18, 2020
hellozee pushed a commit to hellozee/vcpkg that referenced this pull request Sep 11, 2020
* [vcpkg] add environment variable VCPKG_OVERLAY_PORTS

* add documentation for VCPKG_OVERLAY_PORTS

* append env overlay instead of prepending to give explicitly listed overlays priority

* fix formating (manually)

* manually fixing formating

* improve help text

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
@Neumann-A Neumann-A deleted the add_vcpkg_port_overlays_env branch November 18, 2020 20:29
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* [vcpkg] add environment variable VCPKG_OVERLAY_PORTS

* add documentation for VCPKG_OVERLAY_PORTS

* append env overlay instead of prepending to give explicitly listed overlays priority

* fix formating (manually)

* manually fixing formating

* improve help text

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants