From 979a5197b3389cfdf91d0ac5d98b6066ce73fd7a Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Wed, 10 Nov 2021 19:49:18 +0100 Subject: [PATCH] [icu] no absolute paths (#21288) --- ports/icu/portfile.cmake | 50 ++++++++++++++++++++-------------------- ports/icu/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/i-/icu.json | 5 ++++ 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index 66905dd70e..32c03bc501 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -46,7 +46,7 @@ elseif(VCPKG_CROSSCOMPILING) endif() vcpkg_configure_make( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" PROJECT_SUBPATH source OPTIONS ${CONFIGURE_OPTIONS} OPTIONS_RELEASE ${CONFIGURE_OPTIONS_RELEASE} @@ -128,15 +128,15 @@ endif() vcpkg_install_make() file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/share - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/lib/icu - ${CURRENT_PACKAGES_DIR}/debug/lib/icu - ${CURRENT_PACKAGES_DIR}/debug/lib/icud) + "${CURRENT_PACKAGES_DIR}/share" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/lib/icu" + "${CURRENT_PACKAGES_DIR}/debug/lib/icu" + "${CURRENT_PACKAGES_DIR}/debug/lib/icud") file(GLOB TEST_LIBS - ${CURRENT_PACKAGES_DIR}/lib/*test* - ${CURRENT_PACKAGES_DIR}/debug/lib/*test*) + "${CURRENT_PACKAGES_DIR}/lib/*test*" + "${CURRENT_PACKAGES_DIR}/debug/lib/*test*") if(TEST_LIBS) file(REMOVE ${TEST_LIBS}) endif() @@ -144,9 +144,7 @@ endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") # force U_STATIC_IMPLEMENTATION macro foreach(HEADER utypes.h utf_old.h platform.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} HEADER_CONTENTS) - string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} "${HEADER_CONTENTS}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER}" "defined(U_STATIC_IMPLEMENTATION)" "1") endforeach() endif() @@ -154,36 +152,36 @@ endif() if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) vcpkg_copy_tools( TOOL_NAMES icupkg gennorm2 gencmn genccode gensprep - SEARCH_DIR ${CURRENT_PACKAGES_DIR}/tools/icu/sbin - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin + SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/icu/sbin" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin" ) endif() file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/tools/icu/sbin - ${CURRENT_PACKAGES_DIR}/tools/icu/debug) + "${CURRENT_PACKAGES_DIR}/tools/icu/sbin" + "${CURRENT_PACKAGES_DIR}/tools/icu/debug") # To cross compile, we need some files at specific positions. So lets copy them -file(GLOB CROSS_COMPILE_DEFS ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/config/icucross.*) -file(INSTALL ${CROSS_COMPILE_DEFS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/config) +file(GLOB CROSS_COMPILE_DEFS "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/config/icucross.*") +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(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + 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(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + 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(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + 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() # remove any remaining dlls in /lib -file(GLOB DUMMY_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +file(GLOB DUMMY_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll" "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") if(DUMMY_DLLS) file(REMOVE ${DUMMY_DLLS}) endif() @@ -191,6 +189,8 @@ endif() vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread m) +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/icu/bin/icu-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../") + # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) diff --git a/ports/icu/vcpkg.json b/ports/icu/vcpkg.json index 37d08e43dc..990030910d 100644 --- a/ports/icu/vcpkg.json +++ b/ports/icu/vcpkg.json @@ -1,7 +1,7 @@ { "name": "icu", "version": "69.1", - "port-version": 15, + "port-version": 16, "description": "Mature and widely used Unicode and localization library.", "homepage": "https://icu.unicode.org/home", "supports": "!uwp", diff --git a/versions/baseline.json b/versions/baseline.json index cb3505b471..b5d5b9f8a2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2722,7 +2722,7 @@ }, "icu": { "baseline": "69.1", - "port-version": 15 + "port-version": 16 }, "ideviceinstaller": { "baseline": "1.1.2.23", diff --git a/versions/i-/icu.json b/versions/i-/icu.json index 17f2df336b..a3dce8c551 100644 --- a/versions/i-/icu.json +++ b/versions/i-/icu.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "042eb68cba932ed45a95883c733406331cbaad6c", + "version": "69.1", + "port-version": 16 + }, { "git-tree": "2d08c0ceb1777074f3b31fe51e386c9ece0ca8cd", "version": "69.1",