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-make] Misc fixes #42954

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 14 additions & 3 deletions ports/vcpkg-make/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled)

set(automake_version 1.17)
vcpkg_download_distfile(ARCHIVE
URLS https://ftp.gnu.org/gnu/automake/automake-1.17.tar.gz
FILENAME automake.tar.gz
URLS https://ftp.gnu.org/gnu/automake/automake-${automake_version}.tar.gz
https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/automake/automake-${automake_version}.tar.gz
FILENAME automake-${automake_version}.tar.gz
SHA512 11357dfab8cbf4b5d94d9d06e475732ca01df82bef1284888a34bd558afc37b1a239bed1b5eb18a9dbcc326344fb7b1b301f77bb8385131eb8e1e118b677883a
)

Expand All @@ -29,4 +31,13 @@ file(INSTALL
"${CURRENT_PACKAGES_DIR}/share/${PORT}/wrappers"
)

vcpkg_install_copyright(FILE_LIST "${VCPKG_ROOT_DIR}/LICENSE.txt")
vcpkg_install_copyright(
COMMENT [[
The cmake scripts are under vcpkg's MIT license terms, see LICENSE.txt below.
The port also installs shell scripts from GNU Automake.
These scripts are under GPL-2.0-or-later, see COPYING below.
]]
FILE_LIST
"${VCPKG_ROOT_DIR}/LICENSE.txt"
"${automake_source}/COPYING"
)
14 changes: 6 additions & 8 deletions ports/vcpkg-make/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"name": "vcpkg-make",
"version-date": "2023-05-15",
"documentation": "https://vcpkg.io/en/docs/maintainers/ports/vcpkg-make.html",
"license": "MIT",
"version-date": "2024-12-27",
"documentation": "https://learn.microsoft.com/vcpkg/maintainers/functions/vcpkg_make_configure",
"license": null,
"supports": "native",
"dependencies": [
{
"name": "pkgconf",
"host": true,
"platform": "windows"
},
"vcpkg-cmake-get-vars"
"name": "vcpkg-cmake-get-vars",
"host": true
}
]
}
5 changes: 3 additions & 2 deletions ports/vcpkg-make/vcpkg_make_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function(z_vcpkg_make_determine_arch out_var value)
elseif(${value} MATCHES "^(ARM|arm)$")
set(${out_var} arm PARENT_SCOPE)
elseif(${value} MATCHES "^(x86_64|i686|aarch64)$" OR NOT VCPKG_TARGET_IS_WINDOWS)
# Do nothing an assume valid architectures
# Do nothing and assume valid architecture
set("${out_var}" "${value}" PARENT_SCOPE)
else()
message(FATAL_ERROR "Unsupported architecture '${value}' in '${CMAKE_CURRENT_FUNCTION}'!" )
Expand All @@ -65,6 +65,7 @@ function(z_vcpkg_make_determine_host_arch out_var)
elseif(DEFINED ENV{PROCESSOR_ARCHITECTURE})
set(arch $ENV{PROCESSOR_ARCHITECTURE})
else()
z_vcpkg_make_get_cmake_vars(#[[ LANGUAGES .... ]])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would be better to call it only once early in vcpkg_make_configure, after unified setup of arguments, instead of calling it immediately before use. ATM CMake is run only once, regardless of changing arguments. So the first call must have all arguments right.

set(arch "${VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()
z_vcpkg_make_determine_arch("${out_var}" "${arch}")
Expand Down Expand Up @@ -280,7 +281,7 @@ function(z_vcpkg_make_prepare_programs out_env)
endif()
endforeach()

if (NOT arg_DISABLE_MSVC_WRAPPERS)
if (NOT arg_DISABLE_MSVC_WRAPPERS AND NOT VCPKG_TARGET_IS_MINGW)
z_vcpkg_append_to_configure_environment(configure_env CPP "compile ${VCPKG_DETECTED_CMAKE_C_COMPILER} -E")
z_vcpkg_append_to_configure_environment(configure_env CC "compile ${VCPKG_DETECTED_CMAKE_C_COMPILER}")
z_vcpkg_append_to_configure_environment(configure_env CXX "compile ${VCPKG_DETECTED_CMAKE_CXX_COMPILER}")
Expand Down
10 changes: 5 additions & 5 deletions ports/vcpkg-make/vcpkg_scripts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ function(vcpkg_prepare_pkgconfig config)
endforeach()

vcpkg_find_acquire_program(PKGCONFIG)
get_filename_component(pkgconfig_path "${PKGCONFIG}" DIRECTORY)
set(ENV{PKG_CONFIG} "${PKGCONFIG}")

vcpkg_host_path_list(PREPEND ENV{PKG_CONFIG_PATH}
"${CURRENT_INSTALLED_DIR}/share/pkgconfig/"
"${CURRENT_INSTALLED_DIR}${subdir}/lib/pkgconfig/"
"${CURRENT_PACKAGES_DIR}/share/pkgconfig/"
"${CURRENT_PACKAGES_DIR}${subdir}/lib/pkgconfig/"
# After installation, (merged) 'lib' is always searched before 'share'.
"${CURRENT_PACKAGES_DIR}${subdir}/lib/pkgconfig"
"${CURRENT_INSTALLED_DIR}${subdir}/lib/pkgconfig"
"${CURRENT_PACKAGES_DIR}/share/pkgconfig"
"${CURRENT_INSTALLED_DIR}/share/pkgconfig"
)
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -9389,7 +9389,7 @@
"port-version": 0
},
"vcpkg-make": {
"baseline": "2023-05-15",
"baseline": "2024-12-27",
"port-version": 0
},
"vcpkg-msbuild": {
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-make.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b9226c29f2dd322952dd1bae717690c0fd8ad22e",
"version-date": "2024-12-27",
"port-version": 0
},
{
"git-tree": "50a2b6aaf3c272b1eff8ce757e14091c374d9855",
"version-date": "2023-05-15",
Expand Down
Loading