Skip to content
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 baseline][vcpkg_configure_make] Pass make tool to vcpkg_build_make #19361

Merged
merged 4 commits into from
Aug 7, 2021
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
2 changes: 1 addition & 1 deletion ports/starlink-ast/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ else()
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-pthreads")
endif()

vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16 perl)
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
USE_WRAPPERS
DETERMINE_BUILD_TRIPLET
ADDITIONAL_MSYS_PACKAGES perl
OPTIONS ${CONFIGURE_OPTIONS}
OPTIONS_RELEASE ${CONFIGURE_OPTIONS_RELEASE}
OPTIONS_DEBUG ${CONFIGURE_OPTIONS_DEBUG}
Expand Down
1 change: 1 addition & 0 deletions ports/starlink-ast/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "starlink-ast",
"version-semver": "9.2.4",
"port-version": 1,
"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",
Expand Down
17 changes: 8 additions & 9 deletions scripts/cmake/vcpkg_build_make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ function(vcpkg_build_make)
string(REPLACE " " "\ " _VCPKG_INSTALLED "${CURRENT_INSTALLED_DIR}")
endif()

set(MAKE )
set(MAKE_OPTS )
set(INSTALL_OPTS )
if (CMAKE_HOST_WIN32)
set(PATH_GLOBAL "$ENV{PATH}")
vcpkg_add_to_path(PREPEND "${SCRIPTS}/buildsystems/make_wrapper")
vcpkg_acquire_msys(MSYS_ROOT)
find_program(MAKE make PATHS "${MSYS_ROOT}/usr/bin" NO_DEFAULT_PATH REQUIRED)
set(MAKE_COMMAND "${MAKE}")
if(NOT DEFINED Z_VCPKG_MAKE)
vcpkg_acquire_msys(MSYS_ROOT)
find_program(Z_VCPKG_MAKE make PATHS "${MSYS_ROOT}/usr/bin" NO_DEFAULT_PATH REQUIRED)
endif()
set(MAKE_COMMAND "${Z_VCPKG_MAKE}")
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})

Expand All @@ -98,14 +99,12 @@ function(vcpkg_build_make)
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_INSTALL_TARGET} DESTDIR=${_VCPKG_PACKAGE_PREFIX})
#TODO: optimize for install-data (release) and install-exec (release/debug)
else()
# Compiler requriements
if(VCPKG_HOST_IS_OPENBSD)
find_program(MAKE gmake REQUIRED)
find_program(Z_VCPKG_MAKE gmake REQUIRED)
else()
find_program(MAKE make REQUIRED)
find_program(Z_VCPKG_MAKE make REQUIRED)
endif()
set(MAKE_COMMAND "${MAKE}")
# Set make command and install command
set(MAKE_COMMAND "${Z_VCPKG_MAKE}")
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} ${_bc_INSTALL_TARGET} DESTDIR=${CURRENT_PACKAGES_DIR})
Expand Down
9 changes: 9 additions & 0 deletions scripts/cmake/vcpkg_configure_make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,15 @@ function(vcpkg_configure_make)
endforeach()
endforeach()

# Export matching make program for vcpkg_build_make (cache variable)
if(CMAKE_HOST_WIN32 AND MSYS_ROOT)
find_program(Z_VCPKG_MAKE make PATHS "${MSYS_ROOT}/usr/bin" NO_DEFAULT_PATH REQUIRED)
elseif(VCPKG_HOST_IS_OPENBSD)
find_program(Z_VCPKG_MAKE gmake REQUIRED)
else()
find_program(Z_VCPKG_MAKE make REQUIRED)
endif()

# Restore environment
_vcpkg_restore_env_variables(${_cm_FLAGS} LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH)

Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6086,7 +6086,7 @@
},
"starlink-ast": {
"baseline": "9.2.4",
"port-version": 0
"port-version": 1
},
"status-code": {
"baseline": "1.0.0-ab3cd821",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/starlink-ast.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2fecd468269d73b6e8f29a297c4f7db771ea37c4",
"version-semver": "9.2.4",
"port-version": 1
},
{
"git-tree": "50f0b71ca66bd9e4ce6cb5a153e25878dd7a0600",
"version-semver": "9.2.4",
Expand Down