[freetype] static build fix (#13250)

This commit is contained in:
Peter Steneteg 2020-09-03 20:12:53 +02:00 committed by GitHub
parent dbb91b64d4
commit 7fd8104024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 26 deletions

View File

@ -1,6 +1,6 @@
Source: freetype
Version: 2.10.2
Port-Version: 3
Port-Version: 4
Build-Depends: zlib, brotli
Homepage: https://www.freetype.org/
Description: A library to render fonts.

View File

@ -2,7 +2,7 @@ diff --git a/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake
index 7c484c7df..0bd49b825 100644
--- a/builds/cmake/FindBrotliDec.cmake
+++ b/builds/cmake/FindBrotliDec.cmake
@@ -34,14 +34,14 @@ find_path(BROTLIDEC_INCLUDE_DIRS
@@ -34,14 +34,22 @@ find_path(BROTLIDEC_INCLUDE_DIRS
PATH_SUFFIXES brotli)
find_library(BROTLIDEC_LIBRARIES
@ -11,6 +11,14 @@ index 7c484c7df..0bd49b825 100644
HINTS ${PC_BROTLIDEC_LIBDIR}
${PC_BROTLIDEC_LIBRARY_DIRS})
+find_library(BROTLICOMMON_LIBRARIES
+ NAMES brotlicommon-static
+ HINTS ${PC_BROTLIDEC_LIBDIR}
+ ${PC_BROTLIDEC_LIBRARY_DIRS})
+
+if(BROTLICOMMON_LIBRARIES)
+ set(BROTLIDEC_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES})
+endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(

View File

@ -47,6 +47,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Fix the include dir [freetype2 -> freetype]
file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake CONFIG_MODULE)
string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include" CONFIG_MODULE "${CONFIG_MODULE}")
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlicommon-static.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlicommon-static.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlicommon-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec-static.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec-static.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}")
@ -72,12 +73,12 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(COPY
${SOURCE_PATH}/docs/LICENSE.TXT
${SOURCE_PATH}/docs/FTL.TXT
${SOURCE_PATH}/docs/GPLv2.TXT
DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetype/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/freetype/copyright)
file(INSTALL ${SOURCE_PATH}/docs/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
@ -89,5 +90,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(USE_PNG ON)
endif()
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/freetype/vcpkg-cmake-wrapper.cmake @ONLY)
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY)
endif()