diff options
Diffstat (limited to 'ports/harfbuzz')
| -rw-r--r-- | ports/harfbuzz/portfile.cmake | 74 | ||||
| -rw-r--r-- | ports/harfbuzz/vcpkg.json | 13 |
2 files changed, 65 insertions, 22 deletions
diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 54cc71fba..ad30ce710 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -5,34 +5,59 @@ vcpkg_from_github( SHA512 d231a788ea4e52231d4c363c1eca76424cb82ed0952b5c24d0b082e88b3dddbda967e7fffe67fffdcb22c7ebfbf0ec923365eb4532be772f2e61fa7d29b51998 HEAD_REF master PATCHES - # This patch is a workaround that is needed until the following issues are resolved upstream: - # - https://github.com/mesonbuild/meson/issues/8375 - # - https://github.com/harfbuzz/harfbuzz/issues/2870 - # Details: https://github.com/microsoft/vcpkg/issues/16262 - 0001-circumvent-samefile-error.patch + # This patch is a workaround that is needed until the following issues are resolved upstream: + # - https://github.com/mesonbuild/meson/issues/8375 + # - https://github.com/harfbuzz/harfbuzz/issues/2870 + # Details: https://github.com/microsoft/vcpkg/issues/16262 + 0001-circumvent-samefile-error.patch 0002-fix-uwp-build.patch ) -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - icu icu - graphite2 graphite - glib glib -) +if("icu" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -Dicu=enabled) # Enable ICU library unicode functions +else() + list(APPEND FEATURE_OPTIONS -Dicu=disabled) +endif() +if("graphite2" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -Dgraphite=enabled) #Enable Graphite2 complementary shaper +else() + list(APPEND FEATURE_OPTIONS -Dgraphite=disabled) +endif() +if("coretext" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -Dcoretext=enabled) # Enable CoreText shaper backend on macOS + if(NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "Feature 'coretext' os only available on OSX") + endif() +else() + list(APPEND FEATURE_OPTIONS -Dcoretext=disabled) +endif() +if("glib" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -Dglib=enabled) # Enable GLib unicode functions + list(APPEND FEATURE_OPTIONS -Dgobject=enabled) #Enable GObject bindings +else() + list(APPEND FEATURE_OPTIONS -Dglib=disabled) + list(APPEND FEATURE_OPTIONS -Dgobject=disabled) +endif() +list(APPEND FEATURE_OPTIONS -Dfreetype=enabled) #Enable freetype interop helpers +#if(VCPKG_TARGET_IS_WINDOWS) + #link errors in qt5-base. probably requires changes to the pc files generated by meson + #list(APPEND FEATURE_OPTIONS -Dgdi=enabled) # enable gdi helpers and uniscribe shaper backend (windows only) +#endif() -string(REPLACE "=ON" "=enabled" FEATURE_OPTIONS "${FEATURE_OPTIONS}") -string(REPLACE "=OFF" "=disabled" FEATURE_OPTIONS "${FEATURE_OPTIONS}") vcpkg_configure_meson( SOURCE_PATH ${SOURCE_PATH} OPTIONS ${FEATURE_OPTIONS} - -Dfreetype=enabled - -Dgobject=disabled - -Dcairo=disabled - -Dfontconfig=disabled - -Dintrospection=disabled - -Ddocs=disabled + -Dcairo=disabled # Use Cairo graphics library + -Dfontconfig=disabled # Use fontconfig + -Dintrospection=disabled # Generate gobject-introspection bindings (.gir/.typelib files) + -Ddocs=disabled # Generate documentation with gtk-doc -Dtests=disabled -Dbenchmark=disabled + ADDITIONAL_NATIVE_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' + ADDITIONAL_CROSS_BINARIES glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal' + glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums' ) vcpkg_install_meson() @@ -45,4 +70,15 @@ 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) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +if("glib" IN_LIST FEATURES) + list(APPEND TOOL_NAMES hb-subset hb-shape hb-ot-shape-closure) +endif() +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() diff --git a/ports/harfbuzz/vcpkg.json b/ports/harfbuzz/vcpkg.json index c2e9ab742..1fc28ff5a 100644 --- a/ports/harfbuzz/vcpkg.json +++ b/ports/harfbuzz/vcpkg.json @@ -1,7 +1,7 @@ { "name": "harfbuzz", - "version-string": "2.7.4", - "port-version": 1, + "version": "2.7.4", + "port-version": 2, "description": "HarfBuzz OpenType text shaping engine", "homepage": "https://github.com/harfbuzz/harfbuzz", "dependencies": [ @@ -15,10 +15,17 @@ } ], "features": { + "coretext": { + "description": "Enable CoreText shaper backend on macOS" + }, "glib": { "description": "Glib Unicode callbacks support", "dependencies": [ - "glib" + "glib", + { + "name": "glib", + "host": true + } ] }, "graphite2": { |
