Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/maintainers/vcpkg_from_github.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_github(
[PATCHES <patch1.patch> <patch2.patch>...]
[GITHUB_HOST <https://github.com>]
[AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>]
[FILE_DISAMBIGUATOR <N>]
)
```

Expand Down
4 changes: 4 additions & 0 deletions docs/maintainers/vcpkg_from_gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vcpkg_from_gitlab(
[SHA512 <45d0d7f8cc350...>]
[HEAD_REF <master>]
[PATCHES <patch1.patch> <patch2.patch>...]
[FILE_DISAMBIGUATOR <N>]
)
```

Expand Down Expand Up @@ -51,6 +52,9 @@ A list of patches to be applied to the extracted sources.

Relative paths are based on the port directory.

### FILE_DISAMBIGUATOR
A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name.

## Notes:
At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.

Expand Down
3 changes: 2 additions & 1 deletion ports/moos-core/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: moos-core
Version: 10.4.0-4
Version: 10.4.0
Port-Version: 5
Description: A very light weight, easy to use middleware.
Homepage: https://sites.google.com/site/moossoftware/
1 change: 1 addition & 0 deletions ports/moos-core/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_github(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DCMAKE_ENABLE_EXPORT=OFF
)
Expand Down
1 change: 1 addition & 0 deletions ports/vtk-m/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: vtk-m
Version: 1.5.0
Port-Version: 1
Homepage: https://gitlab.kitware.com/vtk/vtk-m/
Description: VTK-m is a toolkit of scientific visualization algorithms for emerging processor architectures.
Supports: x64 & !uwp
Expand Down
3 changes: 2 additions & 1 deletion ports/vtk-m/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ vcpkg_from_gitlab(GITLAB_URL "https://gitlab.kitware.com"
OUT_SOURCE_PATH SOURCE_PATH
REPO vtk/vtk-m
REF f2aa6ad5be1a97e3fb41ef4680ee2c76c3434ac0 # v1.5.0 Version is strongly locked to VTK 9.0. Upgrading will most likly brake the VTK build
SHA512 2f2a273f74d9a583df9e25a4792440d8d89652fa14b3153f2ea5afbd329b50970e7b9bd68e0ccd036baf5c1f3ad7a8302d95c01dbb30d9a46c045987eebf5370)
SHA512 35e8a2c0ad6cd3c1f02a71a50d781c89f93909ad27030b406fd69f4fea5c1862c48a6e541fd07562947322c3a69bdfdb54206ae51bb86ef7a710f9e9898e9638
FILE_DISAMBIGUATOR 1)
# For people only wanting vtk-m and not VTK
#REF 74ffad9bd0679d061bc87e544a728f1c3c926269 # v1.5.1
#SHA512 c9e1c18432b6c11ae086445255acf9477fe4c888122a2b2a9713dc63a40d2e4c2375742157526b5f0869f14c62a4ad66d81ee58d6cc75a1d53a1d615525a03c9)
Expand Down
1 change: 1 addition & 0 deletions scripts/cmake/vcpkg_from_github.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ vcpkg_from_github(
[PATCHES <patch1.patch> <patch2.patch>...]
[GITHUB_HOST <https://github.com>]
[AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>]
[FILE_DISAMBIGUATOR <N>]
)
```

Expand Down
14 changes: 12 additions & 2 deletions scripts/cmake/vcpkg_from_gitlab.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_gitlab(
[SHA512 <45d0d7f8cc350...>]
[HEAD_REF <master>]
[PATCHES <patch1.patch> <patch2.patch>...]
[FILE_DISAMBIGUATOR <N>]
)
```

Expand Down Expand Up @@ -52,6 +53,9 @@ A list of patches to be applied to the extracted sources.

Relative paths are based on the port directory.

### FILE_DISAMBIGUATOR
A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name.

## Notes:
At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.

Expand All @@ -66,7 +70,7 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds.
include(vcpkg_execute_in_download_mode)

function(vcpkg_from_gitlab)
set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF)
set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF FILE_DISAMBIGUATOR)
set(multipleValuesArgs PATCHES)
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
cmake_parse_arguments(PARSE_ARGV 0 _vdud "" "${oneValueArgs}" "${multipleValuesArgs}")
Expand Down Expand Up @@ -119,11 +123,17 @@ function(vcpkg_from_gitlab)
endif()

string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}")
set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}")
if (_vdud_FILE_DISAMBIGUATOR)
set(downloaded_file_name "${downloaded_file_name}-${_vdud_FILE_DISAMBIGUATOR}")
endif()

set(downloaded_file_name "${downloaded_file_name}.tar.gz")

vcpkg_download_distfile(ARCHIVE
URLS "${GITLAB_LINK}/-/archive/${_vdud_REF}/${REPO_NAME}-${_vdud_REF}.tar.gz"
SHA512 "${_vdud_SHA512}"
FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz"
FILENAME "${downloaded_file_name}"
)

vcpkg_extract_source_archive_ex(
Expand Down