[icu] Fix #30532: trying to set rpath on missing libicutu (#30544)

microsoft/vcpkg#29196 introduced new feature flag `[tools]` which
prevents generation of `libicutu`. The PR in question did not take into
account dynamic linkage target where rpath is set to hardcoded and no
longer valid list of libraries.

This PR dynamically detects presence of `[tools]` feature and adds
`libicutu` for rpath fix as necessary.

Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
Michał Janiszewski 2023-04-12 20:29:01 +02:00 committed by GitHub
parent f9df715209
commit 4f9d25a7f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View File

@ -85,8 +85,11 @@ if(VCPKG_TARGET_IS_OSX AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(STATUS "setting rpath prefix for macOS dynamic libraries")
if("tools" IN_LIST FEATURES)
set(LIBICUTU_RPATH "libicutu")
endif()
# add ID_PREFIX to libicudata libicui18n libicuio libicutu libicuuc
foreach(LIB_NAME IN ITEMS libicudata libicui18n libicuio libicutu libicuuc)
foreach(LIB_NAME IN ITEMS libicudata libicui18n libicuio ${LIBICUTU_RPATH} libicuuc)
vcpkg_execute_build_process(
COMMAND "${INSTALL_NAME_TOOL}" -id "${ID_PREFIX}/${LIB_NAME}.${ICU_VERSION_MAJOR}.dylib"
"${LIB_NAME}.${VERSION}.dylib"

View File

@ -1,7 +1,7 @@
{
"name": "icu",
"version": "72.1",
"port-version": 3,
"port-version": 4,
"description": "Mature and widely used Unicode and localization library.",
"homepage": "https://icu.unicode.org/home",
"license": "ICU",

View File

@ -3142,7 +3142,7 @@
},
"icu": {
"baseline": "72.1",
"port-version": 3
"port-version": 4
},
"ideviceinstaller": {
"baseline": "1.1.2.23",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1a0b575f86d37844108f940fd5f6a312a68d234c",
"version": "72.1",
"port-version": 4
},
{
"git-tree": "36a3246630c4794b3781e881e5a57db36092deea",
"version": "72.1",