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
7 changes: 3 additions & 4 deletions ports/gettext-libintl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ endif()

file(REMOVE "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-rel.log")
file(REMOVE "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-dbg.log")
vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}/gettext-runtime/intl"
DETERMINE_BUILD_TRIPLET
USE_WRAPPERS
vcpkg_make_configure(
SOURCE_PATH "${SOURCE_PATH}/gettext-runtime/intl"
OPTIONS
${OPTIONS}
OPTIONS_RELEASE
Expand All @@ -116,7 +115,7 @@ foreach(file IN LISTS makefiles)
file(WRITE "${file}" "${rules}")
endforeach()

vcpkg_install_make()
vcpkg_make_install()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
Expand Down
7 changes: 3 additions & 4 deletions ports/gettext-libintl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gettext-libintl",
"version": "0.22.5",
"port-version": 2,
"port-version": 3,
"description": "The libintl C library from GNU gettext-runtime.",
"homepage": "https://www.gnu.org/software/gettext/",
"license": "LGPL-2.1-or-later",
Expand All @@ -12,9 +12,8 @@
"platform": "!linux"
},
{
"name": "vcpkg-cmake",
"host": true,
"platform": "linux"
"name": "vcpkg-make",
"host": true
}
]
}
17 changes: 17 additions & 0 deletions ports/icu/cleanup_msvc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/source/config/mh-msys-msvc b/source/config/mh-msys-msvc
index 6f50798ebf..2f1a2d6e69 100644
--- a/source/config/mh-msys-msvc
+++ b/source/config/mh-msys-msvc
@@ -90,10 +90,10 @@ LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
A = lib

# Cygwin's ar can't handle Win64 right now. So we use Microsoft's tool instead.
-AR = LIB.EXE#M#
-ARFLAGS := -nologo $(ARFLAGS:r=)#M#
+AR := $(AR)#M#
+ARFLAGS := $(ARFLAGS)#M#
RANLIB = ls -s#M#
AR_OUTOPT = -OUT:#M#

## An import library is needed for z-OS, MSVC and Cygwin
IMPORT_LIB_EXT = .lib
32 changes: 8 additions & 24 deletions ports/icu/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
if(NOT VCPKG_TARGET_IS_WINDOWS)
message(WARNING "${PORT} currently requires the following programs from the system package manager:
autoconf automake autoconf-archive
On Debian and Ubuntu derivatives:
sudo apt-get install autoconf automake autoconf-archive
On recent Red Hat and Fedora derivatives:
sudo dnf install autoconf automake autoconf-archive
On Arch Linux and derivatives:
sudo pacman -S autoconf automake autoconf-archive
On Alpine:
apk add autoconf automake autoconf-archive
On macOS:
brew install autoconf automake autoconf-archive\n")
endif()

string(REGEX MATCH "^[0-9]*" ICU_VERSION_MAJOR "${VERSION}")
string(REPLACE "." "_" VERSION2 "${VERSION}")
string(REPLACE "." "-" VERSION3 "${VERSION}")
Expand All @@ -37,6 +22,7 @@ vcpkg_extract_source_archive(SOURCE_PATH
vcpkg-cross-data.patch
darwin-rpath.patch
mingw-strict-ansi.diff # backport of https://github.com/unicode-org/icu/pull/3003
cleanup_msvc.patch
)

vcpkg_find_acquire_program(PYTHON3)
Expand All @@ -47,12 +33,12 @@ vcpkg_list(SET BUILD_OPTIONS)

if(VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-extras)
vcpkg_list(APPEND BUILD_OPTIONS "PKGDATA_OPTS=--without-assembly -O ../data/icupkg.inc")
vcpkg_list(APPEND BUILD_OPTIONS "\"PKGDATA_OPTS=--without-assembly -O ../data/icupkg.inc\"")
elseif(VCPKG_TARGET_IS_UWP)
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-extras ac_cv_func_tzset=no ac_cv_func__tzset=no)
string(APPEND VCPKG_C_FLAGS " -DU_PLATFORM_HAS_WINUWP_API=1")
string(APPEND VCPKG_CXX_FLAGS " -DU_PLATFORM_HAS_WINUWP_API=1")
vcpkg_list(APPEND BUILD_OPTIONS "PKGDATA_OPTS=--windows-uwp-build -O ../data/icupkg.inc")
vcpkg_list(APPEND BUILD_OPTIONS "\"PKGDATA_OPTS=--windows-uwp-build -O ../data/icupkg.inc\"")
elseif(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_list(APPEND CONFIGURE_OPTIONS --enable-rpath)
if(DEFINED CMAKE_INSTALL_NAME_DIR)
Expand All @@ -79,12 +65,9 @@ elseif(VCPKG_CROSSCOMPILING)
list(APPEND CONFIGURE_OPTIONS "--with-cross-build=${_VCPKG_TOOL_PATH}")
endif()

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH source
AUTOCONFIG
DETERMINE_BUILD_TRIPLET
ADDITIONAL_MSYS_PACKAGES autoconf-archive
vcpkg_make_configure(
SOURCE_PATH "${SOURCE_PATH}/source"
AUTORECONF
OPTIONS
${CONFIGURE_OPTIONS}
--disable-samples
Expand All @@ -97,7 +80,7 @@ vcpkg_configure_make(
--enable-debug
--disable-release
)
vcpkg_install_make(OPTIONS ${BUILD_OPTIONS})
vcpkg_make_install(OPTIONS ${BUILD_OPTIONS})

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/share"
Expand Down Expand Up @@ -158,6 +141,7 @@ vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/icu/bin/icu-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../" IGNORE_UNCHANGED)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/icu/bin/icu-config" "${CURRENT_HOST_INSTALLED_DIR}" "`dirname $0`/../../../../${_HOST_TRIPLET}/" IGNORE_UNCHANGED)

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
6 changes: 5 additions & 1 deletion ports/icu/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "icu",
"version": "74.2",
"port-version": 4,
"port-version": 5,
"description": "Mature and widely used Unicode and localization library.",
"homepage": "https://icu.unicode.org/home",
"license": "ICU",
Expand All @@ -12,6 +12,10 @@
"features": [
"tools"
]
},
{
"name": "vcpkg-make",
"host": true
}
],
"features": {
Expand Down
1 change: 1 addition & 0 deletions ports/vcpkg-make/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ file(INSTALL
file(INSTALL
"${automake_source}/lib/ar-lib"
"${automake_source}/lib/compile"
"${CMAKE_CURRENT_LIST_DIR}/wrappers/"
DESTINATION
"${CURRENT_PACKAGES_DIR}/share/${PORT}/wrappers"
)
Expand Down
3 changes: 1 addition & 2 deletions ports/vcpkg-make/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "vcpkg-make",
"version-date": "2025-01-13",
"port-version": 1,
"version-date": "2025-02-08",
"documentation": "https://learn.microsoft.com/vcpkg/maintainers/functions/vcpkg_make_configure",
"license": null,
"supports": "native",
Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-make/vcpkg_make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function(vcpkg_run_autoreconf shell_cmd work_dir)
endfunction()

function(vcpkg_make_setup_win_msys msys_out)
list(APPEND msys_require_packages autoconf-wrapper automake-wrapper binutils libtool make which)
list(APPEND msys_require_packages autoconf-wrapper automake-wrapper autoconf-archive binutils libtool make which)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

setting msys_require_packages the the portfile allows injection of more packages. I doubt, however, this is done intentional this way here or at least I would expect it then to be a VCPKG_ variable.

I added autoconf-archive to the default since the message for linux also contains it and it is used often enough that including it as the default is reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

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

I needed additonal msys packages also for other ports.
But I would prefer to not see parallel work on gettext-libintl.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean because of #42708 ?

That PR adds a dependency on vcpkg-make but does not switch the build to use vcpkg_make_(configure|install) and looked like a lot of WIP. Feel free to incorporate my changes here.

Copy link
Contributor

Choose a reason for hiding this comment

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

At the time I started #42708, vcpkg-make was too broken.

Copy link
Member

Choose a reason for hiding this comment

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

I believe the intent was that if one needed something other than the defaults for the caller to call vcpkg_acquire_msys themselves and pass the resulting root in. However, given that the error message starting on line 81 names autoconf-archive, it seems like this one should be here. @JavierMatosD can you confirm?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it makes sense to include this package since we are recommending it.

vcpkg_insert_msys_into_path(msys PACKAGES ${msys_require_packages})
find_program(PKGCONFIG NAMES pkgconf NAMES_PER_DIR PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf" NO_DEFAULT_PATH)
set("${msys_out}" "${msys}" PARENT_SCOPE)
Expand Down
10 changes: 6 additions & 4 deletions ports/vcpkg-make/vcpkg_make_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,8 @@ function(z_vcpkg_make_prepare_programs out_env)
list(TRANSFORM progs PREPEND "VCPKG_DETECTED_CMAKE_")
foreach(prog IN LISTS progs)
set(filepath "${${prog}}")
if(filepath MATCHES " ")
# CHECK: Uncertain if the compile wrappers work with absolute paths containing C:\\
cmake_path(GET filepath FILENAME ${prog})
if("${filepath}" MATCHES " " AND EXISTS "${${prog}}")
cmake_path(GET filepath FILENAME "${prog}")
vcpkg_insert_program_into_path("${filepath}")
endif()
endforeach()
Expand All @@ -298,8 +297,11 @@ function(z_vcpkg_make_prepare_programs out_env)

z_vcpkg_append_to_configure_environment(configure_env RC "windres-rc ${VCPKG_DETECTED_CMAKE_RC_COMPILER}")
z_vcpkg_append_to_configure_environment(configure_env WINDRES "windres-rc ${VCPKG_DETECTED_CMAKE_RC_COMPILER}")
if(VCPKG_DETECTED_CMAKE_AR)
if(VCPKG_DETECTED_CMAKE_AR AND NOT "${VCPKG_DETECTED_CMAKE_AR}" MATCHES "llvm-ar")
z_vcpkg_append_to_configure_environment(configure_env AR "ar-lib ${VCPKG_DETECTED_CMAKE_AR}")
elseif("${VCPKG_DETECTED_CMAKE_AR}" MATCHES "llvm-ar")
# llvm-lib does not understand /EXTRACT so llvm-ar needs to be used. However, llvm-ar cannot use the ar-lib wrapper.
z_vcpkg_append_to_configure_environment(configure_env AR "${VCPKG_DETECTED_CMAKE_AR}")
else()
z_vcpkg_append_to_configure_environment(configure_env AR "ar-lib lib.exe -verbose")
endif()
Expand Down
6 changes: 3 additions & 3 deletions ports/vcpkg-make/vcpkg_make_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function(vcpkg_make_install)

# Can be set in the triplet to append options for configure
if(DEFINED VCPKG_MAKE_OPTIONS)
list(APPEND arg_OPTIONS ${VCPKG_MAKE_OPTIONS})
vcpkg_list(APPEND arg_OPTIONS ${VCPKG_MAKE_OPTIONS})
endif()
if(DEFINED VCPKG_MAKE_OPTIONS_RELEASE)
list(APPEND arg_OPTIONS_RELEASE ${VCPKG_MAKE_OPTIONS_RELEASE})
vcpkg_list(APPEND arg_OPTIONS_RELEASE ${VCPKG_MAKE_OPTIONS_RELEASE})
endif()
if(DEFINED VCPKG_MAKE_OPTIONS_DEBUG)
list(APPEND arg_OPTIONS_DEBUG ${VCPKG_MAKE_OPTIONS_DEBUG})
vcpkg_list(APPEND arg_OPTIONS_DEBUG ${VCPKG_MAKE_OPTIONS_DEBUG})
endif()

if(CMAKE_HOST_WIN32)
Expand Down
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3090,7 +3090,7 @@
},
"gettext-libintl": {
"baseline": "0.22.5",
"port-version": 2
"port-version": 3
},
"gettimeofday": {
"baseline": "2017-10-14",
Expand Down Expand Up @@ -3578,7 +3578,7 @@
},
"icu": {
"baseline": "74.2",
"port-version": 4
"port-version": 5
},
"ideviceinstaller": {
"baseline": "2023-07-21",
Expand Down Expand Up @@ -9529,8 +9529,8 @@
"port-version": 0
},
"vcpkg-make": {
"baseline": "2025-01-13",
"port-version": 1
"baseline": "2025-02-08",
"port-version": 0
},
"vcpkg-msbuild": {
"baseline": "2023-08-08",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gettext-libintl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "89734e29d2753df206cdd0e45f2f6c9b3f3fbc4f",
"version": "0.22.5",
"port-version": 3
},
{
"git-tree": "f41e983c85004eb6ee8d290ecb2465832fce8c00",
"version": "0.22.5",
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/icu.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "91b03be43850140e64dba01dcadc8b3f73b1083b",
"version": "74.2",
"port-version": 5
},
{
"git-tree": "291bbc492b8f73dea0dbd12051e9b12b21aef900",
"version": "74.2",
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": "84480c9e9de4cc4cf60f44d5de24c79d61dfe966",
"version-date": "2025-02-08",
"port-version": 0
},
{
"git-tree": "276b846fcad524729ffbf6fe1c8b7598cfeac91a",
"version-date": "2025-01-13",
Expand Down