Skip to content

Commit

Permalink
[freetype] Upgrade to version 2.10.0 (#7057)
Browse files Browse the repository at this point in the history
* [freetype] Upgrade to version 2.10.0

* [freetype] Fix old patches
  • Loading branch information
LilyWangL authored and ras0219-msft committed Jun 30, 2019
1 parent 88fa3bd commit 700a3e1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 38 deletions.
11 changes: 5 additions & 6 deletions ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32324d6..89a73a4 100644
index a418c44..db48e9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,6 +151,9 @@ option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF)
@@ -156,6 +156,8 @@ 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)
+

# 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)
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
@@ -488,7 +490,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}
+ DESTINATION ${CONFIG_INSTALL_PATH}
FILE freetype-config.cmake
COMPONENT headers)
endif ()
26 changes: 12 additions & 14 deletions ports/freetype/0003-Fix-UWP.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89a73a4..fe9bc65 100644
index db48e9f..5c35276 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -321,6 +321,10 @@ else ()
@@ -328,6 +328,10 @@ else ()
list(APPEND BASE_SRCS src/base/ftdebug.c)
endif ()

Expand All @@ -14,22 +14,22 @@ index 89a73a4..fe9bc65 100644
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
endif ()
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 9664404..f56335a 100644
index 4f2eaca..1e01fe4 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1066,6 +1066,11 @@ FT_BEGIN_HEADER
/* Especially for TrueType fonts see also the documentation for */
/* @FT_Size_Metrics. */
/* */
+
@@ -1038,6 +1038,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
+
typedef struct FT_FaceRec_
{
FT_Long num_faces;
@@ -1942,6 +1947,9 @@ FT_BEGIN_HEADER
@@ -1910,6 +1915,9 @@ FT_BEGIN_HEADER

} FT_GlyphSlotRec;

Expand All @@ -40,28 +40,26 @@ index 9664404..f56335a 100644
/*************************************************************************/
/*************************************************************************/
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 8d07e35..ce6fffd 100644
index 3f8619d..edf03b6 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -491,6 +491,10 @@
@@ -528,6 +528,9 @@
return error;
}

+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+#define generic GenericFromFreeTypeLibrary
+#endif
+

static void
ft_glyphslot_clear( FT_GlyphSlot slot )
@@ -1151,6 +1155,10 @@
@@ -1195,6 +1198,9 @@
FT_FREE( face );
}

+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+#undef generic
+#endif
+

static void
Destroy_Driver( FT_Driver driver )
13 changes: 0 additions & 13 deletions ports/freetype/0004-Fix-DLL-install.patch

This file was deleted.

2 changes: 1 addition & 1 deletion ports/freetype/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: freetype
Version: 2.9.1-2
Version: 2.10.0
Build-Depends: zlib, bzip2, libpng
Homepage: https://www.freetype.org/
Description: A library to render fonts.
6 changes: 2 additions & 4 deletions ports/freetype/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include(vcpkg_common_functions)

set(FT_VERSION 2.9.1)
set(FT_VERSION 2.10.0)
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 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708
SHA512 dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e
)

if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
Expand All @@ -16,7 +16,6 @@ if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
0001-Fix-install-command.patch
0002-Add-CONFIG_INSTALL_PATH-option.patch
0003-Fix-UWP.patch
0004-Fix-DLL-install.patch
)
else()
vcpkg_extract_source_archive_ex(
Expand All @@ -27,7 +26,6 @@ else()
0001-Fix-install-command.patch
0002-Add-CONFIG_INSTALL_PATH-option.patch
0003-Fix-UWP.patch
0004-Fix-DLL-install.patch
0005-Fix-DLL-EXPORTS.patch
)
endif()
Expand Down

0 comments on commit 700a3e1

Please sign in to comment.