diff options
| author | Martin Vejdarski <extrulm@gmail.com> | 2021-01-25 10:47:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-25 01:47:30 -0800 |
| commit | cc093a822431437b4a78945032f2996efe668a7d (patch) | |
| tree | e51a99885034a7d02a4e83917148154b60000cd0 /ports/harfbuzz | |
| parent | a6fbf2032211255168f2437d94ce1bc50c5a03f5 (diff) | |
| download | vcpkg-cc093a822431437b4a78945032f2996efe668a7d.tar.gz vcpkg-cc093a822431437b4a78945032f2996efe668a7d.zip | |
[harfbuzz] Use meson and update to 2.7.0 (#12860)
* [harfbuzz] Use meson
* [harfbuzz] Add config file for CMake
* [harfbuzz,pango] Remove glib option for harfbuzz
* [libass,libmupdf,qt5-base,skia] Fix for harfbuzz
* Back out meson edit already applied in https://github.com/microsoft/vcpkg/pull/15258
* [harfbuzz] Fixup pkgconfig
* [libass] Bump port version
* Revert "[libass,libmupdf,qt5-base,skia] Fix for harfbuzz"
This reverts commit 3ba27c6c1c10a2889a8c5e028d010916f91418e3.
* [harfbuzz] Update to 2.7.4
* update baseline record
* Restore glib feature for harfbuzz and remove vagrant change
* Update port version
* Change over to manifests
* Update port version
Co-authored-by: Ebrahim Byagowi <ebrahim@gnu.org>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Diffstat (limited to 'ports/harfbuzz')
| -rw-r--r-- | ports/harfbuzz/0001-fix-cmake-export.patch | 13 | ||||
| -rw-r--r-- | ports/harfbuzz/0003-remove-broken-test.patch | 26 | ||||
| -rw-r--r-- | ports/harfbuzz/CONTROL | 18 | ||||
| -rw-r--r-- | ports/harfbuzz/find-package-freetype-2.patch | 13 | ||||
| -rw-r--r-- | ports/harfbuzz/fix_include.patch | 12 | ||||
| -rw-r--r-- | ports/harfbuzz/glib-cmake.patch | 30 | ||||
| -rw-r--r-- | ports/harfbuzz/harfbuzzConfig.cmake.in | 58 | ||||
| -rw-r--r-- | ports/harfbuzz/icu.patch | 27 | ||||
| -rw-r--r-- | ports/harfbuzz/portfile.cmake | 65 | ||||
| -rw-r--r-- | ports/harfbuzz/vcpkg.json | 36 |
10 files changed, 117 insertions, 181 deletions
diff --git a/ports/harfbuzz/0001-fix-cmake-export.patch b/ports/harfbuzz/0001-fix-cmake-export.patch deleted file mode 100644 index 31f4896f4..000000000 --- a/ports/harfbuzz/0001-fix-cmake-export.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 71830b6f5..a25cb09dd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -712,7 +712,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - ) - install(EXPORT harfbuzzConfig - NAMESPACE harfbuzz:: -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/harfbuzz -+ DESTINATION share/harfbuzz - ) - if (HB_HAVE_ICU) - install(TARGETS harfbuzz-icu diff --git a/ports/harfbuzz/0003-remove-broken-test.patch b/ports/harfbuzz/0003-remove-broken-test.patch deleted file mode 100644 index 2a3b234ee..000000000 --- a/ports/harfbuzz/0003-remove-broken-test.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc -index 85993d1..3e8e642 100644 ---- a/src/hb-coretext.cc -+++ b/src/hb-coretext.cc -@@ -1059,21 +1059,6 @@ resize_and_retry: - buffer->len += num_glyphs; - } - -- /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel, -- * or if it does, it doesn't respect it. So we get runs with wrong -- * directions. As such, disable the assert... It wouldn't crash, but -- * cursoring will be off... -- * -- * https://crbug.com/419769 -- */ -- if (false) -- { -- /* Make sure all runs had the expected direction. */ -- HB_UNUSED bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); -- assert (bool (status_and & kCTRunStatusRightToLeft) == backward); -- assert (bool (status_or & kCTRunStatusRightToLeft) == backward); -- } -- - buffer->clear_positions (); - - unsigned int count = buffer->len; diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL deleted file mode 100644 index 753eb70b9..000000000 --- a/ports/harfbuzz/CONTROL +++ /dev/null @@ -1,18 +0,0 @@ -Source: harfbuzz -Version: 2.7.2 -Port-Version: 1 -Description: HarfBuzz OpenType text shaping engine -Homepage: https://github.com/behdad/harfbuzz -Build-Depends: freetype[core], ragel, gettext (osx) - -Feature: graphite2 -Build-Depends: graphite2 -Description: Graphite2 shaper support - -Feature: icu -Build-Depends: icu -Description: icu support for harfbuzz - -Feature: glib -Build-Depends: glib -Description: Glib Unicode callbacks support diff --git a/ports/harfbuzz/find-package-freetype-2.patch b/ports/harfbuzz/find-package-freetype-2.patch deleted file mode 100644 index 608e9c890..000000000 --- a/ports/harfbuzz/find-package-freetype-2.patch +++ /dev/null @@ -1,13 +0,0 @@ -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/fix_include.patch b/ports/harfbuzz/fix_include.patch deleted file mode 100644 index 894f7b37c..000000000 --- a/ports/harfbuzz/fix_include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c4dc524..bfd15ec 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -431,6 +431,7 @@ endif ()
-
- ## Define harfbuzz library
- add_library(harfbuzz ${project_sources} ${project_extra_sources} ${project_headers})
-+target_include_directories(harfbuzz PUBLIC $<INSTALL_INTERFACE:include/harfbuzz>)
- target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS})
-
-
diff --git a/ports/harfbuzz/glib-cmake.patch b/ports/harfbuzz/glib-cmake.patch deleted file mode 100644 index f98217120..000000000 --- a/ports/harfbuzz/glib-cmake.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9b21bef2c..ae741ef63 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -213,21 +213,13 @@ 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(Iconv REQUIRED) -+ find_package(unofficial-glib CONFIG REQUIRED) - - 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 Iconv::Iconv) - endif () - - if (HB_HAVE_ICU) diff --git a/ports/harfbuzz/harfbuzzConfig.cmake.in b/ports/harfbuzz/harfbuzzConfig.cmake.in new file mode 100644 index 000000000..b1cd6b6f5 --- /dev/null +++ b/ports/harfbuzz/harfbuzzConfig.cmake.in @@ -0,0 +1,58 @@ +if(TARGET harfbuzz) + return() +endif() + +add_library(harfbuzz INTERFACE IMPORTED GLOBAL) +add_library(harfbuzz::harfbuzz ALIAS harfbuzz) + +find_library(HARFBUZZ_LIBRARY_DEBUG NAMES harfbuzz PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) +if(HARFBUZZ_LIBRARY_DEBUG) + target_link_libraries(harfbuzz INTERFACE $<$<CONFIG:DEBUG>:${HARFBUZZ_LIBRARY_DEBUG}>) +endif() + +find_library(HARFBUZZ_LIBRARY_RELEASE NAMES harfbuzz PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) +if(HARFBUZZ_LIBRARY_RELEASE) + target_link_libraries(harfbuzz INTERFACE $<$<NOT:$<CONFIG:DEBUG>>:${HARFBUZZ_LIBRARY_RELEASE}>) +endif() + +set(HARFBUZZ_FEATURES @FEATURES@) + +if(APPLE) + find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices) + target_link_libraries(harfbuzz INTERFACE ${APPLICATIONSERVICES_LIBRARY}) +endif() + +find_package(freetype CONFIG REQUIRED) +target_link_libraries(harfbuzz INTERFACE freetype) + +if ("graphite2" IN_LIST HARFBUZZ_FEATURES) + find_library(GRAPHITE2_LIBRARY_DEBUG NAMES graphite2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GRAPHITE2_LIBRARY_DEBUG) + target_link_libraries(harfbuzz INTERFACE $<$<CONFIG:DEBUG>:${GRAPHITE2_LIBRARY_DEBUG}>) + endif() + + find_library(GRAPHITE2_LIBRARY_RELEASE NAMES graphite2 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GRAPHITE2_LIBRARY_RELEASE) + target_link_libraries(harfbuzz INTERFACE $<$<NOT:$<CONFIG:DEBUG>>:${GRAPHITE2_LIBRARY_RELEASE}>) + endif() +endif() + +if ("glib" IN_LIST HARFBUZZ_FEATURES) + find_library(GLIB_LIBRARY_DEBUG NAMES glib glib-2.0 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GLIB_LIBRARY_DEBUG) + target_link_libraries(harfbuzz INTERFACE $<$<CONFIG:DEBUG>:${GLIB_LIBRARY_DEBUG}>) + endif() + + find_library(GLIB_LIBRARY_RELEASE NAMES glib glib-2.0 PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) + if(GLIB_LIBRARY_RELEASE) + target_link_libraries(harfbuzz INTERFACE $<$<NOT:$<CONFIG:DEBUG>>:${GLIB_LIBRARY_RELEASE}>) + endif() +endif() + +if ("icu" IN_LIST HARFBUZZ_FEATURES) + find_package(ICU 61 COMPONENTS uc REQUIRED) + target_link_libraries(harfbuzz INTERFACE ICU::uc) +endif() + +get_filename_component(_INSTALL_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) +target_include_directories(harfbuzz INTERFACE ${_INSTALL_DIR}/include/harfbuzz) diff --git a/ports/harfbuzz/icu.patch b/ports/harfbuzz/icu.patch deleted file mode 100644 index 1747c4a7d..000000000 --- a/ports/harfbuzz/icu.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index eb6cc9007..209128695 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -226,19 +226,13 @@ if (HB_HAVE_ICU) - add_definitions(-DHAVE_ICU)
-
- # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindICU.cmake
-- find_package(PkgConfig)
-- pkg_check_modules(PC_ICU QUIET icu-uc)
--
-- find_path(ICU_INCLUDE_DIR NAMES unicode/utypes.h HINTS ${PC_ICU_INCLUDE_DIRS} ${PC_ICU_INCLUDEDIR})
-- find_library(ICU_LIBRARY NAMES libicuuc cygicuuc cygicuuc32 icuuc HINTS ${PC_ICU_LIBRARY_DIRS} ${PC_ICU_LIBDIR})
-+ find_package(ICU COMPONENTS uc REQUIRED)
-
-- include_directories(${ICU_INCLUDE_DIR})
-+ include_directories(${ICU_INCLUDE_DIRS})
-
- list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-icu.h)
-
-- list(APPEND THIRD_PARTY_LIBS ${ICU_LIBRARY})
--
-- mark_as_advanced(ICU_INCLUDE_DIR ICU_LIBRARY)
-+ list(APPEND THIRD_PARTY_LIBS ${ICU_LIBRARIES})
- endif ()
-
- if (APPLE AND HB_HAVE_CORETEXT)
diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 055adaa15..5752550b6 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -1,62 +1,43 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO harfbuzz/harfbuzz - REF 9c98b2b9a9e43669c5e2b37eaa41b1e07de1ede3 # 2.7.2 - SHA512 00b61034abce61370a7ff40bf5aa80bc1b3557d1f978ef91725fc30b34c4c00c682a3b9c99233e7e52d579b60694a1ba08714d5c9b01ad13e9fd76828facc720 + REF 7236c7e29cef1c2d76c7a284c5081ff4d3aa1127 # 2.7.4 + SHA512 d231a788ea4e52231d4c363c1eca76424cb82ed0952b5c24d0b082e88b3dddbda967e7fffe67fffdcb22c7ebfbf0ec923365eb4532be772f2e61fa7d29b51998 HEAD_REF master PATCHES - 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 - fix_include.patch - icu.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() - vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - icu HB_HAVE_ICU - graphite2 HB_HAVE_GRAPHITE2 - glib HB_HAVE_GLIB + icu icu + graphite2 graphite + glib glib ) -vcpkg_configure_cmake( +string(REPLACE "=ON" "=enabled" FEATURE_OPTIONS "${FEATURE_OPTIONS}") +string(REPLACE "=OFF" "=disabled" FEATURE_OPTIONS "${FEATURE_OPTIONS}") + +vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS ${FEATURE_OPTIONS} - -DHB_HAVE_FREETYPE=ON - -DHB_BUILD_TESTS=OFF - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON + -Dfreetype=enabled + -Dgobject=disabled + -Dcairo=disabled + -Dfontconfig=disabled + -Dintrospection=disabled + -Ddocs=disabled + -Dtests=disabled + -Dbenchmark=disabled ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() - +vcpkg_install_meson() vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() -if ("glib" IN_LIST FEATURES) - # Propagate dependency on glib downstream - file(READ "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" _contents) - file(WRITE "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" " -include(CMakeFindDependencyMacro) -find_dependency(unofficial-glib CONFIG) - -${_contents} -") -endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake") +configure_file("${CMAKE_CURRENT_LIST_DIR}/harfbuzzConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/harfbuzzConfig.cmake" @ONLY) # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/harfbuzz/vcpkg.json b/ports/harfbuzz/vcpkg.json new file mode 100644 index 000000000..bdb4c3420 --- /dev/null +++ b/ports/harfbuzz/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "harfbuzz", + "version-string": "2.7.4", + "description": "HarfBuzz OpenType text shaping engine", + "homepage": "https://github.com/harfbuzz/harfbuzz", + "dependencies": [ + { + "name": "freetype", + "default-features": false + }, + { + "name": "gettext", + "platform": "osx" + } + ], + "features": { + "glib": { + "description": "Glib Unicode callbacks support", + "dependencies": [ + "glib" + ] + }, + "graphite2": { + "description": "Graphite2 shaper support", + "dependencies": [ + "graphite2" + ] + }, + "icu": { + "description": "icu support for harfbuzz", + "dependencies": [ + "icu" + ] + } + } +} |
