mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:09:00 +08:00
[freetype] update to 2.11.0 (#19284)
* [freetype] update to 2.11.0 * add version files
This commit is contained in:
parent
c0bc5e1b0f
commit
dd6fd59ff2
@ -1,32 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ad8ded0..32324d6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -407,6 +407,7 @@ endif ()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
|
||||
+ if(UNIX)
|
||||
install(
|
||||
# Note the trailing slash in the argument to `DIRECTORY'!
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
|
||||
@@ -420,6 +421,19 @@ if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
|
||||
${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
|
||||
COMPONENT headers)
|
||||
+ else()
|
||||
+ install(
|
||||
+ # Note the trailing slash in the argument to `DIRECTORY'!
|
||||
+ DIRECTORY ${PROJECT_SOURCE_DIR}/include/
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2
|
||||
+ COMPONENT headers
|
||||
+ PATTERN "internal" EXCLUDE
|
||||
+ PATTERN "ftoption.h" EXCLUDE)
|
||||
+ install(
|
||||
+ FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config
|
||||
+ COMPONENT headers)
|
||||
+ endif()
|
||||
endif ()
|
||||
|
||||
if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
@ -1,21 +0,0 @@
|
||||
Source: freetype
|
||||
Version: 2.10.4
|
||||
Homepage: https://www.freetype.org/
|
||||
Description: A library to render fonts.
|
||||
Default-Features: zlib, bzip2, png, brotli
|
||||
|
||||
Feature: zlib
|
||||
Build-Depends: zlib
|
||||
Description: Use zlib instead of internal library for DEFLATE
|
||||
|
||||
Feature: bzip2
|
||||
Build-Depends: bzip2
|
||||
Description: Support bzip2 compressed fonts.
|
||||
|
||||
Feature: png
|
||||
Build-Depends: libpng
|
||||
Description: Support PNG compressed OpenType embedded bitmaps.
|
||||
|
||||
Feature: brotli
|
||||
Build-Depends: brotli
|
||||
Description: Support decompression of WOFF2 streams
|
@ -1,29 +1,24 @@
|
||||
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/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake
|
||||
index 46356b1fd..ed4cc2409 100644
|
||||
--- a/builds/cmake/FindBrotliDec.cmake
|
||||
+++ b/builds/cmake/FindBrotliDec.cmake
|
||||
@@ -35,10 +35,18 @@ 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(
|
||||
|
13
ports/freetype/fix-bzip2-pc.patch
Normal file
13
ports/freetype/fix-bzip2-pc.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cb1b9a0f2..53d0bfc68 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -503,7 +503,7 @@ endif ()
|
||||
if (BZIP2_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES})
|
||||
target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
|
||||
- list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2")
|
||||
+ list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2")
|
||||
endif ()
|
||||
if (PNG_FOUND)
|
||||
target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES})
|
@ -1,9 +1,9 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2314c79..994c602 100644
|
||||
index cb1b9a0f2..edca5d579 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -446,7 +446,7 @@ endif ()
|
||||
set(PKG_CONFIG_REQUIRED_PRIVATE "")
|
||||
@@ -496,7 +496,7 @@ set(PKG_CONFIG_REQUIRED_PRIVATE "")
|
||||
set(PKG_CONFIG_LIBS_PRIVATE "")
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
- target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES})
|
||||
@ -11,7 +11,7 @@ index 2314c79..994c602 100644
|
||||
target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib")
|
||||
endif ()
|
||||
@@ -560,12 +560,26 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
@@ -596,12 +596,25 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
install(
|
||||
EXPORT freetype-targets
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
||||
@ -22,7 +22,6 @@ index 2314c79..994c602 100644
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
||||
COMPONENT headers)
|
||||
+
|
||||
+
|
||||
+ if(ZLIB_FOUND)
|
||||
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freetype-config.cmake"
|
||||
+[[include(CMakeFindDependencyMacro)
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 61b174e..2314c79 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -509,7 +509,6 @@ endif ()
|
||||
|
||||
if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
# Generate the pkg-config file
|
||||
- if (UNIX)
|
||||
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
|
||||
|
||||
string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}")
|
||||
@@ -543,7 +542,6 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
FILES ${PROJECT_BINARY_DIR}/freetype2.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
COMPONENT pkgconfig)
|
||||
- endif ()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
@ -1,15 +1,14 @@
|
||||
set(FT_VERSION 2.10.4)
|
||||
set(FT_VERSION 2.11.0)
|
||||
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO freetype/freetype2
|
||||
REF ${FT_VERSION}
|
||||
FILENAME freetype-${FT_VERSION}.tar.xz
|
||||
SHA512 827cda734aa6b537a8bcb247549b72bc1e082a5b32ab8d3cccb7cc26d5f6ee087c19ce34544fa388a1eb4ecaf97600dbabc3e10e950f2ba692617fee7081518f
|
||||
SHA512 bf1991f3c382832586be1d21ae73c20840ee8546807ba60d0eb0215134545656c0c8de488f27357d4a4f6497d7cb540998cda98ec59061a3e640036fb209147d
|
||||
PATCHES
|
||||
0001-Fix-install-command.patch
|
||||
0003-Fix-UWP.patch
|
||||
pkgconfig.patch
|
||||
fix-bzip2-pc.patch # we have a bzip2 file that we can use - https://gitlab.freedesktop.org/freetype/freetype/-/commit/b2aeca5fda870751f3c9d645e0dca4c80fa1ae5a
|
||||
brotli-static.patch
|
||||
fix-exports.patch
|
||||
)
|
||||
@ -27,17 +26,16 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
brotli CMAKE_DISABLE_FIND_PACKAGE_BrotliDec
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=ON
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freetype)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/freetype)
|
||||
|
||||
# Rename for easy usage (VS integration; CMake and autotools will not care)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/freetype ${CURRENT_PACKAGES_DIR}/include/freetype)
|
||||
@ -100,4 +98,4 @@ file(COPY
|
||||
${SOURCE_PATH}/docs/GPLv2.TXT
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
||||
)
|
||||
file(INSTALL ${SOURCE_PATH}/docs/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
48
ports/freetype/vcpkg.json
Normal file
48
ports/freetype/vcpkg.json
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "freetype",
|
||||
"version-semver": "2.11.0",
|
||||
"description": "A library to render fonts.",
|
||||
"homepage": "https://www.freetype.org/",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"brotli",
|
||||
"bzip2",
|
||||
"png",
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
"brotli": {
|
||||
"description": "Support decompression of WOFF2 streams",
|
||||
"dependencies": [
|
||||
"brotli"
|
||||
]
|
||||
},
|
||||
"bzip2": {
|
||||
"description": "Support bzip2 compressed fonts.",
|
||||
"dependencies": [
|
||||
"bzip2"
|
||||
]
|
||||
},
|
||||
"png": {
|
||||
"description": "Support PNG compressed OpenType embedded bitmaps.",
|
||||
"dependencies": [
|
||||
"libpng"
|
||||
]
|
||||
},
|
||||
"zlib": {
|
||||
"description": "Use zlib instead of internal library for DEFLATE",
|
||||
"dependencies": [
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -2149,7 +2149,7 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"freetype": {
|
||||
"baseline": "2.10.4",
|
||||
"baseline": "2.11.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"freetype-gl": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "6814e10440bcdc58c4bd29a0373d2f902783ba54",
|
||||
"version-semver": "2.11.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "dabcba1d5153c796480c50c459ef045b5db8d2a4",
|
||||
"version-string": "2.10.4",
|
||||
|
Loading…
Reference in New Issue
Block a user