[harfbuzz] Restore patches removed by #5359 (#5696)

This commit is contained in:
Robert Schumacher 2019-03-15 22:08:07 -07:00 committed by Phil Christensen
parent 9b8e6a8be0
commit 9637942a59
4 changed files with 57 additions and 1 deletions

View File

@ -1,5 +1,5 @@
Source: harfbuzz
Version: 2.3.1-2
Version: 2.3.1-3
Description: HarfBuzz OpenType text shaping engine
Build-Depends: freetype, ragel, gettext (osx)
Default-Features: ucdn

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index defd5d6..03f9d4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -267,7 +267,7 @@ set (subset_project_headers
## Find and include needed header folders and libraries
if (HB_HAVE_FREETYPE)
- include (FindFreetype)
+ find_package(Freetype REQUIRED)
if (NOT FREETYPE_FOUND)
message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix")
endif ()

View File

@ -0,0 +1,31 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d6e77e8..36e4b4e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -306,22 +306,14 @@ endif ()
if (HB_HAVE_GLIB)
add_definitions(-DHAVE_GLIB)
- # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindGLIB.cmake
- find_package(PkgConfig)
- pkg_check_modules(PC_GLIB QUIET glib-2.0)
-
- find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS})
- find_path(GLIBCONFIG_INCLUDE_DIR NAMES glibconfig.h HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include)
- find_path(GLIB_INCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0)
-
- include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR})
+ find_package(Threads REQUIRED)
+ find_package(unofficial-iconv REQUIRED)
+ find_package(unofficial-glib CONFIG REQUIRED)
list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc)
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h)
- list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES})
-
- mark_as_advanced(GLIB_LIBRARIES GLIBCONFIG_INCLUDE_DIR GLIB_INCLUDE_DIR)
+ list(APPEND THIRD_PARTY_LIBS unofficial::glib::glib)
endif ()
if (HB_HAVE_ICU)

View File

@ -10,8 +10,20 @@ vcpkg_from_github(
0001-fix-cmake-export.patch
0002-fix-uwp-build.patch
0003-remove-broken-test.patch
# This patch is required for propagating the full list of static dependencies from freetype
find-package-freetype-2.patch
# This patch is required for propagating the full list of dependencies from glib
glib-cmake.patch
)
file(READ ${SOURCE_PATH}/CMakeLists.txt _contents)
if("${_contents}" MATCHES "include \\(FindFreetype\\)")
message(FATAL_ERROR "Harfbuzz's cmake must not directly include() FindFreetype.")
endif()
if("${_contents}" MATCHES "find_library\\(GLIB_LIBRARIES")
message(FATAL_ERROR "Harfbuzz's cmake must not directly find_library() glib.")
endif()
SET(HB_HAVE_ICU "OFF")
if("icu" IN_LIST FEATURES)
SET(HB_HAVE_ICU "ON")