[icu] no absolute paths (#21288)

This commit is contained in:
autoantwort 2021-11-10 19:49:18 +01:00 committed by GitHub
parent 3ec9948bc5
commit 979a5197b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 27 deletions

View File

@ -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)

View File

@ -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",

View File

@ -2722,7 +2722,7 @@
},
"icu": {
"baseline": "69.1",
"port-version": 15
"port-version": 16
},
"ideviceinstaller": {
"baseline": "1.1.2.23",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "042eb68cba932ed45a95883c733406331cbaad6c",
"version": "69.1",
"port-version": 16
},
{
"git-tree": "2d08c0ceb1777074f3b31fe51e386c9ece0ca8cd",
"version": "69.1",