diff options
| author | Kai Pastor <dg0yt@darc.de> | 2021-10-01 08:58:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-30 23:58:36 -0700 |
| commit | 2ed5383f7b88b23975f9cfd325f6451fd8716fb2 (patch) | |
| tree | e35a8fd32812c05c3e35c513fcfa8610d7447707 | |
| parent | 41874992952fffd37c60583391802e29b6f14d86 (diff) | |
| download | vcpkg-2ed5383f7b88b23975f9cfd325f6451fd8716fb2.tar.gz vcpkg-2ed5383f7b88b23975f9cfd325f6451fd8716fb2.zip | |
[vcpkg_configure_make] Standardize `OPTIONS` list item handling (#19540)
* Remove unused EXTRA_QUOTES
* Uniformly invoke 'configure'
* [libtasn1] Fix mingw build
* Unify prefix handling
* Revise install dir processing
* x-add-version
* Force libdir to lib (adopted from #19666)
* [skip actions] CI rebuild
* CR request: Put backslash before shell var
* CR request: Use vcpkg_list
* Update versions
* Fix python3 options
* Update versions
* Bump python port-version.
* CR request: Add comment about backslashes before prefix
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
| -rw-r--r-- | ports/libtasn1/portfile.cmake | 9 | ||||
| -rw-r--r-- | ports/libtasn1/vcpkg.json | 6 | ||||
| -rw-r--r-- | ports/python3/portfile.cmake | 2 | ||||
| -rw-r--r-- | ports/python3/vcpkg.json | 2 | ||||
| -rw-r--r-- | ports/starlink-ast/portfile.cmake | 16 | ||||
| -rw-r--r-- | ports/starlink-ast/vcpkg.json | 2 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_configure_make.cmake | 88 | ||||
| -rw-r--r-- | versions/baseline.json | 6 | ||||
| -rw-r--r-- | versions/l-/libtasn1.json | 5 | ||||
| -rw-r--r-- | versions/p-/python3.json | 5 | ||||
| -rw-r--r-- | versions/s-/starlink-ast.json | 5 |
11 files changed, 80 insertions, 66 deletions
diff --git a/ports/libtasn1/portfile.cmake b/ports/libtasn1/portfile.cmake index 700bb977e..902dff196 100644 --- a/ports/libtasn1/portfile.cmake +++ b/ports/libtasn1/portfile.cmake @@ -18,21 +18,20 @@ vcpkg_extract_source_archive_ex( ${PATCHES}
)
-if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
+set(EXTRA_OPTS "")
+if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
# $LIBS is an environment variable that vcpkg already pre-populated with some libraries.
# We need to re-purpose it when passing LIBS option to make to avoid overriding the vcpkg's own list.
- set(EXTRA_OPTS "LIBS=\"$LIBS -lgettimeofday -lgetopt\"")
+ list(APPEND EXTRA_OPTS "LIBS=-lgettimeofday -lgetopt \$LIBS")
else()
# restore the default ac_cv_prog_cc_g flags, otherwise it fails to compile
- set(EXTRA_OPTS)
set(VCPKG_C_FLAGS "-g -O2")
set(VCPKG_CXX_FLAGS "-g -O2")
endif()
# The upstream doesn't add this macro to the configure
if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
-
- set(EXTRA_OPTS "${EXTRA_OPTS} CFLAGS=\"$CFLAGS -DASN1_STATIC\"")
+ list(APPEND EXTRA_OPTS "CFLAGS=\$CFLAGS -DASN1_STATIC")
endif()
set(ENV{GTKDOCIZE} true)
diff --git a/ports/libtasn1/vcpkg.json b/ports/libtasn1/vcpkg.json index e61d35e03..fd021c21c 100644 --- a/ports/libtasn1/vcpkg.json +++ b/ports/libtasn1/vcpkg.json @@ -1,18 +1,18 @@ { "name": "libtasn1", "version": "4.17.0", - "port-version": 1, + "port-version": 3, "description": "A secure communications library implementing the SSL, TLS and DTLS protocols", "homepage": "https://www.gnutls.org/", "supports": "!uwp", "dependencies": [ { "name": "getopt", - "platform": "windows" + "platform": "windows & !mingw" }, { "name": "gettimeofday", - "platform": "windows" + "platform": "windows & !mingw" } ] } diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 2ea878377..8967d5a3d 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -162,7 +162,7 @@ else() set(OPTIONS "--with-openssl=${CURRENT_INSTALLED_DIR}" "--with-ensurepip" - [[--with-suffix=""]] + "--with-suffix=" "--with-system-expat" ) if(VCPKG_TARGET_IS_OSX) diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index 63740b289..c3bec2e6b 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,7 +1,7 @@ { "name": "python3", "version-semver": "3.9.7", - "port-version": 1, + "port-version": 2, "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "supports": "!(arm | uwp)", diff --git a/ports/starlink-ast/portfile.cmake b/ports/starlink-ast/portfile.cmake index 054da2900..92475ad55 100644 --- a/ports/starlink-ast/portfile.cmake +++ b/ports/starlink-ast/portfile.cmake @@ -11,18 +11,22 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE}
)
-set(CONFIGURE_OPTIONS "--without-fortran star_cv_cnf_trail_type=long star_cv_cnf_f2c_compatible=no")
+set(CONFIGURE_OPTIONS
+ --without-fortran
+ star_cv_cnf_trail_type=long
+ star_cv_cnf_f2c_compatible=no
+)
if ("yaml" IN_LIST FEATURES)
- set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-yaml")
+ list(APPEND CONFIGURE_OPTIONS --with-yaml)
else()
- set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-yaml")
+ list(APPEND CONFIGURE_OPTIONS --without-yaml)
endif()
if ("pthreads" IN_LIST FEATURES)
- set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-pthreads")
+ list(APPEND CONFIGURE_OPTIONS --with-pthreads)
else()
- set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-pthreads")
+ list(APPEND CONFIGURE_OPTIONS --without-pthreads)
endif()
vcpkg_configure_make(
@@ -31,8 +35,6 @@ vcpkg_configure_make( DETERMINE_BUILD_TRIPLET
ADDITIONAL_MSYS_PACKAGES perl
OPTIONS ${CONFIGURE_OPTIONS}
- OPTIONS_RELEASE ${CONFIGURE_OPTIONS_RELEASE}
- OPTIONS_DEBUG ${CONFIGURE_OPTIONS_DEBUG}
)
vcpkg_install_make()
diff --git a/ports/starlink-ast/vcpkg.json b/ports/starlink-ast/vcpkg.json index 3248e2659..5c3753df6 100644 --- a/ports/starlink-ast/vcpkg.json +++ b/ports/starlink-ast/vcpkg.json @@ -1,7 +1,7 @@ { "name": "starlink-ast", "version-semver": "9.2.4", - "port-version": 1, + "port-version": 2, "description": "The AST library provides a comprehensive range of facilities for attaching world coordinate systems to astronomical data, for retrieving and interpreting that information and for generating graphical output based on it", "homepage": "https://starlink.eao.hawaii.edu/starlink/AST", "supports": "windows", diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake index a80641512..0b8e88be1 100644 --- a/scripts/cmake/vcpkg_configure_make.cmake +++ b/scripts/cmake/vcpkg_configure_make.cmake @@ -302,6 +302,7 @@ function(vcpkg_configure_make) set(_vcm_paths_with_spaces TRUE)
endif()
+ set(CONFIGURE_ENV "V=1")
# Pre-processing windows configure requirements
if (VCPKG_TARGET_IS_WINDOWS)
if(CMAKE_HOST_WIN32)
@@ -351,7 +352,6 @@ function(vcpkg_configure_make) endif()
endmacro()
- set(CONFIGURE_ENV "V=1")
# Remove full filepaths due to spaces and prepend filepaths to PATH (cross-compiling tools are unlikely on path by default)
set(progs VCPKG_DETECTED_CMAKE_C_COMPILER VCPKG_DETECTED_CMAKE_CXX_COMPILER VCPKG_DETECTED_CMAKE_AR
VCPKG_DETECTED_CMAKE_LINKER VCPKG_DETECTED_CMAKE_RANLIB VCPKG_DETECTED_CMAKE_OBJDUMP
@@ -448,17 +448,16 @@ function(vcpkg_configure_make) endif()
endif()
+ # Some PATH handling for dealing with spaces....some tools will still fail with that!
+ # In particular, the libtool install command is unable to install correctly to paths with spaces.
+ # CURRENT_INSTALLED_DIR: Pristine native path (unprotected spaces, Windows drive letters)
+ # _VCPKG_INSTALLED: Native path with escaped space characters
+ # _VCPKG_PREFIX: Path with unprotected spaces, but drive letters transformed for mingw/msys
+ string(REPLACE " " "\\ " _VCPKG_INSTALLED "${CURRENT_INSTALLED_DIR}")
if(CMAKE_HOST_WIN32)
- #Some PATH handling for dealing with spaces....some tools will still fail with that!
- string(REPLACE " " "\\\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR})
- string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PREFIX "${_VCPKG_PREFIX}")
- set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR})
- set(prefix_var "'\${prefix}'") # Windows needs extra quotes or else the variable gets expanded in the makefile!
+ string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PREFIX "${CURRENT_INSTALLED_DIR}")
else()
- string(REPLACE " " "\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR})
- string(REPLACE " " "\ " _VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR})
- set(EXTRA_QUOTES)
- set(prefix_var "\${prefix}")
+ set(_VCPKG_PREFIX "${CURRENT_INSTALLED_DIR}")
endif()
# macOS - cross-compiling support
@@ -484,25 +483,26 @@ function(vcpkg_configure_make) "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
# Set configure paths
- set(_csc_OPTIONS_RELEASE ${_csc_OPTIONS_RELEASE} "--prefix=${EXTRA_QUOTES}${_VCPKG_PREFIX}${EXTRA_QUOTES}")
- set(_csc_OPTIONS_DEBUG ${_csc_OPTIONS_DEBUG} "--prefix=${EXTRA_QUOTES}${_VCPKG_PREFIX}/debug${EXTRA_QUOTES}")
+ set(_csc_OPTIONS_RELEASE ${_csc_OPTIONS_RELEASE} "--prefix=${_VCPKG_PREFIX}")
+ set(_csc_OPTIONS_DEBUG ${_csc_OPTIONS_DEBUG} "--prefix=${_VCPKG_PREFIX}/debug")
if(NOT _csc_NO_ADDITIONAL_PATHS)
+ # ${prefix} has an extra backslash to prevent early expansion when calling `bash -c configure "..."`.
set(_csc_OPTIONS_RELEASE ${_csc_OPTIONS_RELEASE}
# Important: These should all be relative to prefix!
- "--bindir=${prefix_var}/tools/${PORT}/bin"
- "--sbindir=${prefix_var}/tools/${PORT}/sbin"
- "--libdir=${prefix_var}/lib" # On some Linux distributions lib64 is the default
+ "--bindir=\\\${prefix}/tools/${PORT}/bin"
+ "--sbindir=\\\${prefix}/tools/${PORT}/sbin"
+ "--libdir=\\\${prefix}/lib" # On some Linux distributions lib64 is the default
#"--includedir='\${prefix}'/include" # already the default!
- "--mandir=${prefix_var}/share/${PORT}"
- "--docdir=${prefix_var}/share/${PORT}"
- "--datarootdir=${prefix_var}/share/${PORT}")
+ "--mandir=\\\${prefix}/share/${PORT}"
+ "--docdir=\\\${prefix}/share/${PORT}"
+ "--datarootdir=\\\${prefix}/share/${PORT}")
set(_csc_OPTIONS_DEBUG ${_csc_OPTIONS_DEBUG}
# Important: These should all be relative to prefix!
- "--bindir=${prefix_var}/../tools/${PORT}/debug/bin"
- "--sbindir=${prefix_var}/../tools/${PORT}/debug/sbin"
- "--libdir=${prefix_var}/lib" # On some Linux distributions lib64 is the default
- "--includedir=${prefix_var}/../include"
- "--datarootdir=${prefix_var}/share/${PORT}")
+ "--bindir=\\\${prefix}/../tools/${PORT}/debug/bin"
+ "--sbindir=\\\${prefix}/../tools/${PORT}/debug/sbin"
+ "--libdir=\\\${prefix}/lib" # On some Linux distributions lib64 is the default
+ "--includedir=\\\${prefix}/../include"
+ "--datarootdir=\\\${prefix}/share/${PORT}")
endif()
# Setup common options
if(NOT DISABLE_VERBOSE_FLAGS)
@@ -534,18 +534,13 @@ function(vcpkg_configure_make) else()
find_program(base_cmd bash REQUIRED)
endif()
- if(VCPKG_TARGET_IS_WINDOWS)
- list(JOIN _csc_OPTIONS " " _csc_OPTIONS)
- list(JOIN _csc_OPTIONS_RELEASE " " _csc_OPTIONS_RELEASE)
- list(JOIN _csc_OPTIONS_DEBUG " " _csc_OPTIONS_DEBUG)
- endif()
# Setup include environment (since these are buildtype independent restoring them is unnecessary)
macro(prepend_include_path var)
if("${${var}_BACKUP}" STREQUAL "")
- set(ENV{${var}} "${_VCPKG_INSTALLED}/include")
+ set(ENV{${var}} "${CURRENT_INSTALLED_DIR}/include")
else()
- set(ENV{${var}} "${_VCPKG_INSTALLED}/include${VCPKG_HOST_PATH_SEPARATOR}${${var}_BACKUP}")
+ set(ENV{${var}} "${CURRENT_INSTALLED_DIR}/include${VCPKG_HOST_PATH_SEPARATOR}${${var}_BACKUP}")
endif()
endmacro()
# Used by CL
@@ -693,10 +688,10 @@ function(vcpkg_configure_make) endif()
else()
set(_link_dirs)
- if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib")
+ if(EXISTS "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib")
set(_link_dirs "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib")
endif()
- if(EXISTS "{_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link")
+ if(EXISTS "{CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link")
set(_link_dirs "${_link_dirs} -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link")
endif()
string(STRIP "${_link_dirs}" _link_dirs)
@@ -726,10 +721,10 @@ function(vcpkg_configure_make) endif()
else()
set(_link_dirs)
- if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib")
+ if(EXISTS "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib")
set(_link_dirs "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib")
endif()
- if(EXISTS "{_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link")
+ if(EXISTS "{CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link")
set(_link_dirs "${_link_dirs} -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link")
endif()
string(STRIP "${_link_dirs}" _link_dirs)
@@ -738,6 +733,15 @@ function(vcpkg_configure_make) unset(_VAR_SUFFIX)
endif()
+ foreach(var IN ITEMS _csc_OPTIONS _csc_OPTIONS_RELEASE _csc_OPTIONS_DEBUG)
+ vcpkg_list(SET tmp)
+ foreach(element IN LISTS "${var}")
+ string(REPLACE [["]] [[\"]] element "${element}")
+ vcpkg_list(APPEND tmp "\"${element}\"")
+ endforeach()
+ vcpkg_list(JOIN tmp " " "${var}")
+ endforeach()
+
foreach(_buildtype IN LISTS _buildtypes)
foreach(ENV_VAR ${_csc_CONFIG_DEPENDENT_ENVIRONMENT})
if(DEFINED ENV{${ENV_VAR}})
@@ -788,27 +792,21 @@ function(vcpkg_configure_make) set(_lib_env_vars LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH)
foreach(_lib_env_var IN LISTS _lib_env_vars)
set(_link_path)
- if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib")
- set(_link_path "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib")
+ if(EXISTS "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib")
+ set(_link_path "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib")
endif()
- if(EXISTS "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link")
+ if(EXISTS "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib/manual-link")
if(_link_path)
set(_link_path "${_link_path}${VCPKG_HOST_PATH_SEPARATOR}")
endif()
- set(_link_path "${_link_path}${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link")
+ set(_link_path "${_link_path}${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/lib/manual-link")
endif()
set(ENV{${_lib_env_var}} "${_link_path}${${_lib_env_var}_PATHLIKE_CONCAT}")
endforeach()
unset(_link_path)
unset(_lib_env_vars)
- if(CMAKE_HOST_WIN32)
- set(command "${base_cmd}" -c "${CONFIGURE_ENV} ./${RELATIVE_BUILD_PATH}/configure ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}}")
- elseif(VCPKG_TARGET_IS_WINDOWS)
- set(command "${base_cmd}" -c "${CONFIGURE_ENV} $@" -- "./${RELATIVE_BUILD_PATH}/configure" ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}})
- else()
- set(command "${base_cmd}" "./${RELATIVE_BUILD_PATH}/configure" ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}})
- endif()
+ set(command "${base_cmd}" -c "${CONFIGURE_ENV} ./${RELATIVE_BUILD_PATH}/configure ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}}")
if(_csc_ADD_BIN_TO_PATH)
set(PATH_BACKUP $ENV{PATH})
diff --git a/versions/baseline.json b/versions/baseline.json index 58df68a86..238f0ce3d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3834,7 +3834,7 @@ }, "libtasn1": { "baseline": "4.17.0", - "port-version": 1 + "port-version": 3 }, "libtcod": { "baseline": "1.18.0", @@ -5334,7 +5334,7 @@ }, "python3": { "baseline": "3.9.7", - "port-version": 1 + "port-version": 2 }, "qca": { "baseline": "2.3.1", @@ -6390,7 +6390,7 @@ }, "starlink-ast": { "baseline": "9.2.4", - "port-version": 1 + "port-version": 2 }, "status-code": { "baseline": "1.0.0-ab3cd821", diff --git a/versions/l-/libtasn1.json b/versions/l-/libtasn1.json index 5960a6674..ad952fc1a 100644 --- a/versions/l-/libtasn1.json +++ b/versions/l-/libtasn1.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "c387ff2824b319ecd287ea3e5a507a8263dce95e", + "version": "4.17.0", + "port-version": 3 + }, + { "git-tree": "3554f6c03cdac32ddf68540d62c04f6f4644ec94", "version": "4.17.0", "port-version": 1 diff --git a/versions/p-/python3.json b/versions/p-/python3.json index b4fc82009..64e2590cd 100644 --- a/versions/p-/python3.json +++ b/versions/p-/python3.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "3975ee0659914edc75d63f914ac91bb3b7453f0c", + "version-semver": "3.9.7", + "port-version": 2 + }, + { "git-tree": "6a1011c32aa2eb7de0b9a6184b2805e34c41f0b5", "version-semver": "3.9.7", "port-version": 1 diff --git a/versions/s-/starlink-ast.json b/versions/s-/starlink-ast.json index a72495000..0ba8d7525 100644 --- a/versions/s-/starlink-ast.json +++ b/versions/s-/starlink-ast.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "487c5e318ce957c09647d0d74a2b5b4a4e99ffef", + "version-semver": "9.2.4", + "port-version": 2 + }, + { "git-tree": "2fecd468269d73b6e8f29a297c4f7db771ea37c4", "version-semver": "9.2.4", "port-version": 1 |
