mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 05:38:00 +08:00
Update to freetype-2.9.1 (#5292)
This commit is contained in:
parent
5f7256c318
commit
60deab0a29
32
ports/freetype/0001-Fix-install-command.patch
Normal file
32
ports/freetype/0001-Fix-install-command.patch
Normal file
@ -0,0 +1,32 @@
|
||||
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,25 +0,0 @@
|
||||
From 7286c233834117404f400e3cfd5500610ca56d9a Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Sat, 7 May 2016 02:10:45 -0700
|
||||
Subject: [PATCH] Support Windows DLLs via CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f02ee51..774737d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -115,7 +115,7 @@ project(freetype)
|
||||
|
||||
|
||||
if (WIN32 AND NOT MINGW AND BUILD_SHARED_LIBS)
|
||||
- message(FATAL_ERROR "Building shared libraries on Windows needs MinGW")
|
||||
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif ()
|
||||
|
||||
# Disallow in-source builds
|
||||
--
|
||||
2.8.1.windows.1
|
||||
|
@ -1,17 +1,23 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6bb2558..a894ada 100644
|
||||
index 32324d6..89a73a4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -419,8 +419,11 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
ARCHIVE DESTINATION lib
|
||||
FRAMEWORK DESTINATION Library/Frameworks
|
||||
)
|
||||
@@ -151,6 +151,9 @@ option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF)
|
||||
option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF)
|
||||
option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." OFF)
|
||||
|
||||
+# vcpkg config install path
|
||||
+option(CONFIG_INSTALL_PATH "location to install cmake config files" lib/cmake/freetype)
|
||||
+
|
||||
+ set(CONFIG_INSTALL_PATH "lib/cmake/freetype" CACHE STRING "location to install cmake config files")
|
||||
+
|
||||
install(EXPORT freetype-targets
|
||||
- DESTINATION lib/cmake/freetype
|
||||
+ DESTINATION ${CONFIG_INSTALL_PATH}
|
||||
FILE freetype-config.cmake
|
||||
)
|
||||
|
||||
# Disallow in-source builds
|
||||
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
|
||||
@@ -475,7 +478,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
COMPONENT libraries)
|
||||
install(
|
||||
EXPORT freetype-targets
|
||||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype
|
||||
+ DESTINATION ${CONFIG_INSTALL_PATH}
|
||||
FILE freetype-config.cmake
|
||||
COMPONENT headers)
|
||||
endif ()
|
||||
|
@ -1,63 +1,67 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 744b2d5..d114b9b 100644
|
||||
index 89a73a4..fe9bc65 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -312,6 +312,9 @@ else ()
|
||||
set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c)
|
||||
@@ -321,6 +321,10 @@ else ()
|
||||
list(APPEND BASE_SRCS src/base/ftdebug.c)
|
||||
endif ()
|
||||
|
||||
+if(MSVC)
|
||||
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
|
||||
+endif()
|
||||
|
||||
+
|
||||
if (BUILD_FRAMEWORK)
|
||||
set(BASE_SRCS
|
||||
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
|
||||
endif ()
|
||||
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
|
||||
index 4666d48..382a915 100644
|
||||
index 9664404..f56335a 100644
|
||||
--- a/include/freetype/freetype.h
|
||||
+++ b/include/freetype/freetype.h
|
||||
@@ -845,6 +845,9 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -1066,6 +1066,11 @@ FT_BEGIN_HEADER
|
||||
/* Especially for TrueType fonts see also the documentation for */
|
||||
/* @FT_Size_Metrics. */
|
||||
/* */
|
||||
+
|
||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
||||
+#define generic GenericFromFreeTypeLibrary
|
||||
+#endif
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@@ -1777,6 +1780,10 @@ FT_BEGIN_HEADER
|
||||
+
|
||||
typedef struct FT_FaceRec_
|
||||
{
|
||||
FT_Long num_faces;
|
||||
@@ -1942,6 +1947,9 @@ FT_BEGIN_HEADER
|
||||
|
||||
} FT_GlyphSlotRec;
|
||||
|
||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
||||
+#undef generic
|
||||
+#endif
|
||||
+
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
|
||||
index fa05347..ae2754b 100644
|
||||
index 8d07e35..ce6fffd 100644
|
||||
--- a/src/base/ftobjs.c
|
||||
+++ b/src/base/ftobjs.c
|
||||
@@ -457,6 +457,9 @@
|
||||
@@ -491,6 +491,10 @@
|
||||
return error;
|
||||
}
|
||||
|
||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
||||
+#define generic GenericFromFreeTypeLibrary
|
||||
+#endif
|
||||
+
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
@@ -971,6 +974,9 @@
|
||||
static void
|
||||
ft_glyphslot_clear( FT_GlyphSlot slot )
|
||||
@@ -1151,6 +1155,10 @@
|
||||
FT_FREE( face );
|
||||
}
|
||||
|
||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
||||
+#undef generic
|
||||
+#endif
|
||||
+
|
||||
|
||||
static void
|
||||
Destroy_Driver( FT_Driver driver )
|
||||
|
@ -1,23 +0,0 @@
|
||||
--- a/CMakeLists.txt 2018-11-16 10:49:22.000000000 +0100
|
||||
+++ b/CMakeLists.txt 2018-11-16 10:50:26.000000000 +0100
|
||||
@@ -200,17 +200,17 @@
|
||||
FTCONFIG_H)
|
||||
if (HAVE_UNISTD_H)
|
||||
string(REGEX REPLACE
|
||||
- "#undef +(HAVE_UNISTD_H)" "#define \\1"
|
||||
+ "#undef +(HAVE_UNISTD_H)" "#define \\1 1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
if (HAVE_FCNTL_H)
|
||||
string(REGEX REPLACE
|
||||
- "#undef +(HAVE_FCNTL_H)" "#define \\1"
|
||||
+ "#undef +(HAVE_FCNTL_H)" "#define \\1 1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
if (HAVE_STDINT_H)
|
||||
string(REGEX REPLACE
|
||||
- "#undef +(HAVE_STDINT_H)" "#define \\1"
|
||||
+ "#undef +(HAVE_STDINT_H)" "#define \\1 1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
string(REPLACE "/undef " "#undef "
|
@ -1,4 +1,4 @@
|
||||
Source: freetype
|
||||
Version: 2.8.1-4
|
||||
Version: 2.9.1
|
||||
Build-Depends: zlib, bzip2, libpng
|
||||
Description: A library to render fonts.
|
||||
|
@ -1,20 +1,19 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(FT_VERSION 2.8.1)
|
||||
set(FT_VERSION 2.9.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" "https://downloads.sourceforge.net/project/freetype/freetype2/${FT_VERSION}/freetype-${FT_VERSION}.tar.bz2"
|
||||
FILENAME "freetype-${FT_VERSION}.tar.bz2"
|
||||
SHA512 ca59e47f0fceeeb9b8032be2671072604d0c79094675df24187829c05e99757d0a48a0f8062d4d688e056f783aa8f6090d732ad116562e94784fccf1339eb823
|
||||
SHA512 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708
|
||||
)
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${FT_VERSION}
|
||||
PATCHES
|
||||
0001-Support-Windows-DLLs-via-CMAKE_WINDOWS_EXPORT_ALL_SY.patch
|
||||
0001-Fix-install-command.patch
|
||||
0002-Add-CONFIG_INSTALL_PATH-option.patch
|
||||
0003-Fix-UWP.patch
|
||||
0004-Fix-macOS-defines.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -22,10 +21,10 @@ vcpkg_configure_cmake(
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCONFIG_INSTALL_PATH=share/freetype
|
||||
-DWITH_ZLIB=ON
|
||||
-DWITH_BZip2=ON
|
||||
-DWITH_PNG=ON
|
||||
-DWITH_HarfBuzz=OFF
|
||||
-DFT_WITH_ZLIB=ON
|
||||
-DFT_WITH_BZIP2=ON
|
||||
-DFT_WITH_PNG=ON
|
||||
-DFT_WITH_HARFBUZZ=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
Loading…
x
Reference in New Issue
Block a user