diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-03-15 22:08:07 -0700 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-03-15 22:08:07 -0700 |
| commit | 9637942a5977abce8ac95f16ff4f52785491642b (patch) | |
| tree | 13884e37ce0b62c1e95285c7fd34bb5a2739eb1e | |
| parent | 9b8e6a8be0f233f6809251b353918cf6de84695b (diff) | |
| download | vcpkg-9637942a5977abce8ac95f16ff4f52785491642b.tar.gz vcpkg-9637942a5977abce8ac95f16ff4f52785491642b.zip | |
[harfbuzz] Restore patches removed by #5359 (#5696)
| -rw-r--r-- | ports/harfbuzz/CONTROL | 2 | ||||
| -rw-r--r-- | ports/harfbuzz/find-package-freetype-2.patch | 13 | ||||
| -rw-r--r-- | ports/harfbuzz/glib-cmake.patch | 31 | ||||
| -rw-r--r-- | ports/harfbuzz/portfile.cmake | 12 |
4 files changed, 57 insertions, 1 deletions
diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 82751a0c3..399f13111 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -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 diff --git a/ports/harfbuzz/find-package-freetype-2.patch b/ports/harfbuzz/find-package-freetype-2.patch new file mode 100644 index 000000000..85dbbdeec --- /dev/null +++ b/ports/harfbuzz/find-package-freetype-2.patch @@ -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 ()
diff --git a/ports/harfbuzz/glib-cmake.patch b/ports/harfbuzz/glib-cmake.patch new file mode 100644 index 000000000..ddbc96712 --- /dev/null +++ b/ports/harfbuzz/glib-cmake.patch @@ -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) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index d538c27cd..e1a8199c0 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -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") |
