Skip to content

Commit

Permalink
[vcpkg-make] Misc fixes (#42954)
Browse files Browse the repository at this point in the history
Co-authored-by: Javier Matos <[email protected]>
  • Loading branch information
dg0yt and Javier Matos authored Dec 31, 2024
1 parent 4b3b620 commit 8f2ab06
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 19 deletions.
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 .... ]])
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
3 changes: 3 additions & 0 deletions ports/vcpkg-make/vcpkg_make_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ function(vcpkg_make_configure)
list(APPEND prepare_flags_opts "LANGUAGES" ${arg_LANGUAGES})
endif()

# Create cached cmake vars for this invocation's languages
z_vcpkg_make_get_cmake_vars(LANGUAGES ${arg_LANGUAGES})

set(escaping "")
if(arg_DISABLE_MSVC_TRANSFORMATIONS)
set(escaping NO_FLAG_ESCAPING)
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 @@ -9401,7 +9401,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": "ac1381c26cff8ab8365670f4fb00395e86c58dfa",
"version-date": "2024-12-27",
"port-version": 0
},
{
"git-tree": "50a2b6aaf3c272b1eff8ce757e14091c374d9855",
"version-date": "2023-05-15",
Expand Down

0 comments on commit 8f2ab06

Please sign in to comment.