Skip to content

Commit

Permalink
Removed paths from library definitions in *.pc files in case of windo…
Browse files Browse the repository at this point in the history
…ws static build\nRemoved patches
  • Loading branch information
bold84 committed Apr 24, 2022
1 parent 2dfa1e6 commit ecdf9ef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
23 changes: 15 additions & 8 deletions ports/harfbuzz/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ vcpkg_from_github(
REF 4.2.0
SHA512 2aff1e6a41d6186b71f2915296c46c0b2ffc67371e1f05c13a62c237ff7a84d7d78d414d7a395e1616a2861c83c4792ef5936a492713780564b994d18e2d3e38
HEAD_REF master
PATCHES
# This patch is a workaround that is needed until the following issues are resolved upstream:
# - https://github.com/mesonbuild/meson/issues/8375
# - https://github.com/harfbuzz/harfbuzz/issues/2870
# Details: https://github.com/microsoft/vcpkg/issues/16262
0001-circumvent-samefile-error.patch
0002-fix-uwp-build.patch
fix-macos-build.diff # fixes https://github.com/harfbuzz/harfbuzz/issues/3484
)

if("icu" IN_LIST FEATURES)
Expand Down Expand Up @@ -64,6 +56,21 @@ vcpkg_install_meson()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(GLOB PC_FILES
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc"
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc")

foreach(PC_FILE IN LISTS PC_FILES)
file(READ "${PC_FILE}" PC_FILE_CONTENT)
string(REGEX REPLACE
"\\$\\{prefix\}\\/lib\\/([a-zA-Z0-9\-]*)\\.lib"
"-l\\1" PC_FILE_CONTENT
"${PC_FILE_CONTENT}")
file(WRITE "${PC_FILE}" ${PC_FILE_CONTENT})
endforeach()
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake")
configure_file("${CMAKE_CURRENT_LIST_DIR}/harfbuzzConfig.cmake.in"
Expand Down
4 changes: 2 additions & 2 deletions versions/h-/harfbuzz.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "75697d7c43494eeb0699d372f41853cc937f7a78",
{
"git-tree": "5375b21451708e371a6b445adb052c62bda4a7e7",
"version-semver": "4.2.0",
"port-version": 0
},
Expand Down

0 comments on commit ecdf9ef

Please sign in to comment.