aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2021-09-24 02:45:11 +0200
committerGitHub <noreply@github.com>2021-09-23 17:45:11 -0700
commitd60da45f548d5e55537d7e546ffd0d7274a89795 (patch)
tree682f256322df63ade8d4af96a50fec5d40982751
parentc00ce5ca23660d96fd860c6f58516c1cacc5b98c (diff)
downloadvcpkg-d60da45f548d5e55537d7e546ffd0d7274a89795.tar.gz
vcpkg-d60da45f548d5e55537d7e546ffd0d7274a89795.zip
[icu] Fix mingw builds (#20253)
* Fix mingw dll installation * Patch static lib naming * Update icu homepage * Fix mingw builds on windows triplet host * Update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
-rw-r--r--ports/icu/disable-static-prefix.patch20
-rw-r--r--ports/icu/mingw-dll-install.patch13
-rw-r--r--ports/icu/portfile.cmake54
-rw-r--r--ports/icu/vcpkg.json4
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/i-/icu.json5
6 files changed, 54 insertions, 44 deletions
diff --git a/ports/icu/disable-static-prefix.patch b/ports/icu/disable-static-prefix.patch
new file mode 100644
index 000000000..4e63e3375
--- /dev/null
+++ b/ports/icu/disable-static-prefix.patch
@@ -0,0 +1,20 @@
+diff --git a/source/icudefs.mk.in b/source/icudefs.mk.in
+index 24bd97a..33169de 100644
+--- a/source/icudefs.mk.in
++++ b/source/icudefs.mk.in
+@@ -213,13 +213,13 @@ LIBICU = $(LIBPREFIX)$(ICUPREFIX)
+
+ ## If we can't use the shared libraries, use the static libraries
+ ifneq ($(ENABLE_SHARED),YES)
+-STATIC_PREFIX_WHEN_USED = s
++STATIC_PREFIX_WHEN_USED =
+ else
+ STATIC_PREFIX_WHEN_USED =
+ endif
+
+ # Static library prefix and file extension
+-STATIC_PREFIX = s
++STATIC_PREFIX =
+ LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
+ A = a
+ SOBJ = $(SO)
diff --git a/ports/icu/mingw-dll-install.patch b/ports/icu/mingw-dll-install.patch
new file mode 100644
index 000000000..26c778365
--- /dev/null
+++ b/ports/icu/mingw-dll-install.patch
@@ -0,0 +1,13 @@
+diff --git a/source/config/mh-mingw64 b/source/config/mh-mingw64
+index fb64c56..a43cc4d 100644
+--- a/source/config/mh-mingw64
++++ b/source/config/mh-mingw64
+@@ -10,7 +10,7 @@
+ # On Windows we generally have the DLLs in the bin directory rather than the lib directory.
+ # This setting moves the ICU DLLs into the bin folder for MinGW/MSYS2 when "make install" is run.
+ # If you prefer to have the DLLs in the lib folder, then set this to NO instead.
+-MINGW_MOVEDLLSTOBINDIR = YES
++MINGW_MOVEDLLSTOBINDIR = NO
+
+ # This file is similar to mh-mingw
+ # Any changes made here may also need to be made in mh-mingw
diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake
index 9731bf5b4..66905dd70 100644
--- a/ports/icu/portfile.cmake
+++ b/ports/icu/portfile.cmake
@@ -16,10 +16,12 @@ vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch
- ${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix_parallel_build_on_windows.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-extra.patch
+ disable-escapestr-tool.patch
+ remove-MD-from-configure.patch
+ fix_parallel_build_on_windows.patch
+ fix-extra.patch
+ mingw-dll-install.patch
+ disable-static-prefix.patch # https://gitlab.kitware.com/cmake/cmake/-/issues/16617; also mingw.
)
vcpkg_find_acquire_program(PYTHON3)
@@ -33,8 +35,10 @@ list(APPEND CONFIGURE_OPTIONS_DEBUG --enable-debug --disable-release)
set(RELEASE_TRIPLET ${TARGET_TRIPLET}-rel)
set(DEBUG_TRIPLET ${TARGET_TRIPLET}-dbg)
-if(NOT "${TARGET_TRIPLET}" STREQUAL "${HOST_TRIPLET}")
- # cross compiling
+if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_IS_MINGW AND NOT HOST_TRIPLET MATCHES "mingw")
+ # Assuming no cross compiling because the host (windows) pkgdata tool doesn't
+ # use the '/' path separator when creating compiler commands for mingw bash.
+elseif(VCPKG_CROSSCOMPILING)
set(TOOL_PATH "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}")
# convert to unix path
string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" _VCPKG_TOOL_PATH "${TOOL_PATH}")
@@ -123,15 +127,6 @@ endif()
vcpkg_install_make()
-if(VCPKG_TARGET_IS_MINGW)
- file(GLOB ICU_TOOLS
- ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_HOST_EXECUTABLE_SUFFIX}
- ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_HOST_EXECUTABLE_SUFFIX}
- ${CURRENT_PACKAGES_DIR}/bin/icu-config
- ${CURRENT_PACKAGES_DIR}/debug/bin/icu-config)
- file(REMOVE ${ICU_TOOLS})
-endif()
-
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/share
${CURRENT_PACKAGES_DIR}/debug/share
@@ -147,29 +142,6 @@ if(TEST_LIBS)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- if(VCPKG_TARGET_IS_WINDOWS)
- # rename static libraries to match import libs
- # see https://gitlab.kitware.com/cmake/cmake/issues/16617
- foreach(MODULE dt in io tu uc)
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
- file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sicu${MODULE}${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/icu${MODULE}${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
- endif()
-
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sicu${MODULE}d${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/icu${MODULE}d${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
- endif()
- endforeach()
-
- file(GLOB_RECURSE pkg_files LIST_DIRECTORIES false ${CURRENT_PACKAGES_DIR}/*.pc)
- message(STATUS "${pkg_files}")
- foreach(pkg_file IN LISTS pkg_files)
- message(STATUS "${pkg_file}")
- file(READ ${pkg_file} PKG_FILE)
- string(REGEX REPLACE "-ls([^ \\t\\n]+)" "-l\\1" PKG_FILE "${PKG_FILE}" )
- file(WRITE ${pkg_file} "${PKG_FILE}")
- endforeach()
- endif()
-
# force U_STATIC_IMPLEMENTATION macro
foreach(HEADER utypes.h utf_old.h platform.h)
file(READ ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} HEADER_CONTENTS)
@@ -196,17 +168,17 @@ file(GLOB CROSS_COMPILE_DEFS ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/config
file(INSTALL ${CROSS_COMPILE_DEFS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/config)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
- file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll)
+ file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/*icu*${ICU_VERSION_MAJOR}.dll)
file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin)
endif()
# copy dlls
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
- file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll)
+ file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/*icu*${ICU_VERSION_MAJOR}.dll)
file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*${ICU_VERSION_MAJOR}.dll)
+ file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*icu*${ICU_VERSION_MAJOR}.dll)
file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
diff --git a/ports/icu/vcpkg.json b/ports/icu/vcpkg.json
index c1e80e530..37d08e43d 100644
--- a/ports/icu/vcpkg.json
+++ b/ports/icu/vcpkg.json
@@ -1,9 +1,9 @@
{
"name": "icu",
"version": "69.1",
- "port-version": 14,
+ "port-version": 15,
"description": "Mature and widely used Unicode and localization library.",
- "homepage": "http://icu-project.org/apiref/icu4c/",
+ "homepage": "https://icu.unicode.org/home",
"supports": "!uwp",
"dependencies": [
{
diff --git a/versions/baseline.json b/versions/baseline.json
index 37cb6d6ff..20a439be8 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -2654,7 +2654,7 @@
},
"icu": {
"baseline": "69.1",
- "port-version": 14
+ "port-version": 15
},
"ideviceinstaller": {
"baseline": "1.1.2.23",
diff --git a/versions/i-/icu.json b/versions/i-/icu.json
index bac44faa4..17f2df336 100644
--- a/versions/i-/icu.json
+++ b/versions/i-/icu.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "2d08c0ceb1777074f3b31fe51e386c9ece0ca8cd",
+ "version": "69.1",
+ "port-version": 15
+ },
+ {
"git-tree": "2632dd55c20f6830027ae1e167524817b1a9d7ec",
"version": "69.1",
"port-version": 14