aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Steneteg <peter@steneteg.se>2020-09-03 20:12:53 +0200
committerGitHub <noreply@github.com>2020-09-03 11:12:53 -0700
commit7fd8104024d1fd8d9d191692382898f7ac63a183 (patch)
tree1c2ee7ed470e600fe4fdd29a18a32597a1380bba
parentdbb91b64d4bb0ed4ddae89ceabaa15ba133f2d3a (diff)
downloadvcpkg-7fd8104024d1fd8d9d191692382898f7ac63a183.tar.gz
vcpkg-7fd8104024d1fd8d9d191692382898f7ac63a183.zip
[freetype] static build fix (#13250)
-rw-r--r--ports/freetype/CONTROL2
-rw-r--r--ports/freetype/brotli-static.patch50
-rw-r--r--ports/freetype/portfile.cmake10
3 files changed, 36 insertions, 26 deletions
diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL
index 072382ebc..eb2b10272 100644
--- a/ports/freetype/CONTROL
+++ b/ports/freetype/CONTROL
@@ -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.
diff --git a/ports/freetype/brotli-static.patch b/ports/freetype/brotli-static.patch
index 0e1564892..1635311ad 100644
--- a/ports/freetype/brotli-static.patch
+++ b/ports/freetype/brotli-static.patch
@@ -1,21 +1,29 @@
-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
- PATH_SUFFIXES brotli)
-
- find_library(BROTLIDEC_LIBRARIES
-- NAMES brotlidec
-+ NAMES brotlidec brotlidec-static
- HINTS ${PC_BROTLIDEC_LIBDIR}
- ${PC_BROTLIDEC_LIBRARY_DIRS})
-
-
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(
-- brotlidec
-+ BrotliDec
- REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
- FOUND_VAR BROTLIDEC_FOUND
- VERSION_VAR BROTLIDEC_VERSION)
+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,22 @@ find_path(BROTLIDEC_INCLUDE_DIRS
+ PATH_SUFFIXES brotli)
+
+ find_library(BROTLIDEC_LIBRARIES
+- NAMES brotlidec
++ NAMES brotlidec brotlidec-static
+ 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(
+- brotlidec
++ BrotliDec
+ REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
+ FOUND_VAR BROTLIDEC_FOUND
+ VERSION_VAR BROTLIDEC_VERSION)
diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake
index b0152b31c..ed8cbcbf3 100644
--- a/ports/freetype/portfile.cmake
+++ b/ports/freetype/portfile.cmake
@@ -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()