-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vcpkg] Track hashes of cmake script helpers in consuming portfiles #12254
Merged
ras0219-msft
merged 5 commits into
microsoft:master
from
ras0219:dev/roschuma/track-script-changes
Jul 13, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
19b42be
[vcpkg] Track hashes of cmake script helpers in consuming portfiles
ras0219-msft 0898e30
Merge remote-tracking branch 'origin/master' into dev/roschuma/track-…
ras0219-msft 04a8f4f
[vcpkg] Format
ras0219-msft 14d2c58
Merge remote-tracking branch 'origin/master' into dev/roschuma/track-…
ras0219-msft 0a81c3c
[vcpkg_find_acquire_program] Use cpkg_from_sourceforge for FLEX and …
ras0219-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# vcpkg_fixup_pkgconfig | ||
|
||
Fix common paths in *.pc files and make everything relativ to $(prefix) | ||
|
||
## Usage | ||
```cmake | ||
vcpkg_fixup_pkgconfig( | ||
[RELEASE_FILES <PATHS>...] | ||
[DEBUG_FILES <PATHS>...] | ||
[SYSTEM_LIBRARIES <NAMES>...] | ||
) | ||
``` | ||
|
||
## Parameters | ||
### RELEASE_FILES | ||
Specifies a list of files to apply the fixes for release paths. | ||
Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR} without ${CURRENT_PACKAGES_DIR}/debug/ | ||
|
||
### DEBUG_FILES | ||
Specifies a list of files to apply the fixes for debug paths. | ||
Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR}/debug/ | ||
|
||
### SYSTEM_PACKAGES | ||
If the *.pc file contains system packages outside vcpkg these need to be listed here. | ||
Since vcpkg checks the existence of all required packages within vcpkg. | ||
|
||
### SYSTEM_LIBRARIES | ||
If the *.pc file contains system libraries outside vcpkg these need to be listed here. | ||
VCPKG checks every -l flag for the existence of the required library within vcpkg. | ||
|
||
### IGNORE_FLAGS | ||
If the *.pc file contains flags in the lib field which are not libraries. These can be listed here | ||
|
||
## Notes | ||
Still work in progress. If there are more cases which can be handled here feel free to add them | ||
|
||
## Examples | ||
|
||
Just call vcpkg_fixup_pkgconfig() after any install step which installs *.pc files. | ||
|
||
## Source | ||
[scripts/cmake/vcpkg_fixup_pkgconfig.cmake](https:/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_pkgconfig.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,68 @@ | ||
# vcpkg_from_sourceforge | ||
Download and extract a project from sourceforge. | ||
## Usage: | ||
```cmake | ||
# vcpkg_from_sourceforge | ||
|
||
Download and extract a project from sourceforge. | ||
|
||
## Usage: | ||
```cmake | ||
vcpkg_from_sourceforge( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO <cunit/CUnit> | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO <cunit/CUnit> | ||
[REF <2.1-3>] | ||
SHA512 <547b417109332...> | ||
FILENAME <CUnit-2.1-3.tar.bz2> | ||
[DISABLE_SSL] | ||
[NO_REMOVE_ONE_LEVEL] | ||
[PATCHES <patch1.patch> <patch2.patch>...] | ||
) | ||
``` | ||
|
||
## Parameters: | ||
### OUT_SOURCE_PATH | ||
Specifies the out-variable that will contain the extracted location. | ||
|
||
This should be set to `SOURCE_PATH` by convention. | ||
|
||
### REPO | ||
The organization or user and repository (optional) on sourceforge. | ||
|
||
### REF | ||
A stable version number that will not change contents. | ||
|
||
### FILENAME | ||
The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. | ||
|
||
For example, we can get the download link: | ||
https://sourceforge.net/settings/mirror_choices?projectname=mad&filename=libmad/0.15.1b/libmad-0.15.1b.tar.gz&selected=nchc | ||
So the REPO is `mad/libmad`, the REF is `0.15.1b`, and the FILENAME is `libmad-0.15.1b.tar.gz` | ||
|
||
For some special links: | ||
https://sourceforge.net/settings/mirror_choices?projectname=soxr&filename=soxr-0.1.3-Source.tar.xz&selected=nchc | ||
The REPO is `soxr`, REF is not exist, and the FILENAME is `soxr-0.1.3-Source.tar.xz` | ||
|
||
### SHA512 | ||
The SHA512 hash that should match the archive. | ||
|
||
### PATCHES | ||
A list of patches to be applied to the extracted sources. | ||
|
||
Relative paths are based on the port directory. | ||
|
||
### DISABLE_SSL | ||
Disable ssl when downloading source. | ||
|
||
### NO_REMOVE_ONE_LEVEL | ||
Specifies that the default removal of the top level folder should not occur. | ||
|
||
## Examples: | ||
|
||
* [cunit](https:/Microsoft/vcpkg/blob/master/ports/cunit/portfile.cmake) | ||
* [polyclipping](https:/Microsoft/vcpkg/blob/master/ports/polyclipping/portfile.cmake) | ||
* [tinyfiledialogs](https:/Microsoft/vcpkg/blob/master/ports/tinyfiledialogs/portfile.cmake) | ||
|
||
## Source | ||
SHA512 <547b417109332...> | ||
FILENAME <CUnit-2.1-3.tar.bz2> | ||
[DISABLE_SSL] | ||
[NO_REMOVE_ONE_LEVEL] | ||
[PATCHES <patch1.patch> <patch2.patch>...] | ||
) | ||
``` | ||
|
||
## Parameters: | ||
### OUT_SOURCE_PATH | ||
Specifies the out-variable that will contain the extracted location. | ||
|
||
This should be set to `SOURCE_PATH` by convention. | ||
|
||
### REPO | ||
The organization or user and repository (optional) on sourceforge. | ||
|
||
### REF | ||
A stable version number that will not change contents. | ||
|
||
### FILENAME | ||
The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. | ||
|
||
For example, we can get the download link: | ||
https://sourceforge.net/settings/mirror_choices?projectname=mad&filename=libmad/0.15.1b/libmad-0.15.1b.tar.gz&selected=nchc | ||
So the REPO is `mad/libmad`, the REF is `0.15.1b`, and the FILENAME is `libmad-0.15.1b.tar.gz` | ||
|
||
For some special links: | ||
https://sourceforge.net/settings/mirror_choices?projectname=soxr&filename=soxr-0.1.3-Source.tar.xz&selected=nchc | ||
The REPO is `soxr`, REF is not exist, and the FILENAME is `soxr-0.1.3-Source.tar.xz` | ||
|
||
### SHA512 | ||
The SHA512 hash that should match the archive. | ||
|
||
### WORKING_DIRECTORY | ||
If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. | ||
|
||
Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). | ||
|
||
### PATCHES | ||
A list of patches to be applied to the extracted sources. | ||
|
||
Relative paths are based on the port directory. | ||
|
||
### DISABLE_SSL | ||
Disable ssl when downloading source. | ||
|
||
### NO_REMOVE_ONE_LEVEL | ||
Specifies that the default removal of the top level folder should not occur. | ||
|
||
## Examples: | ||
|
||
* [cunit](https:/Microsoft/vcpkg/blob/master/ports/cunit/portfile.cmake) | ||
* [polyclipping](https:/Microsoft/vcpkg/blob/master/ports/polyclipping/portfile.cmake) | ||
* [tinyfiledialogs](https:/Microsoft/vcpkg/blob/master/ports/tinyfiledialogs/portfile.cmake) | ||
|
||
## Source | ||
[scripts/cmake/vcpkg_from_sourceforge.cmake](https:/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_sourceforge.cmake) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.