2018-01-01 16:19:40 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2018-08-12 13:47:01 +08:00
|
|
|
REPO harfbuzz/harfbuzz
|
2023-03-13 12:31:11 +08:00
|
|
|
REF ${VERSION}
|
2023-12-15 15:01:05 +08:00
|
|
|
SHA512 3fe54adbdd457c7dd8186c897436982a43e195a62bc0e830fe2dd06ca2c52511b9a717c659a7e30d235ac964df071e8ba1d9f36ee20496a1a80945d7c63fce86
|
2018-01-01 16:19:40 +08:00
|
|
|
HEAD_REF master
|
2023-10-10 06:37:47 +08:00
|
|
|
PATCHES
|
|
|
|
fix-win32-build.patch
|
2017-05-29 17:26:27 +08:00
|
|
|
)
|
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
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
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS -Dcoretext=disabled)
|
|
|
|
endif()
|
2023-12-29 16:00:39 +08:00
|
|
|
if("directwrite" IN_LIST FEATURES)
|
|
|
|
list(APPEND FEATURE_OPTIONS -Ddirectwrite=enabled) # Enable DirectWrite support on Windows
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS -Ddirectwrite=disabled)
|
|
|
|
endif()
|
2021-04-27 01:28:21 +08:00
|
|
|
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()
|
2023-10-19 01:54:42 +08:00
|
|
|
if("cairo" IN_LIST FEATURES)
|
|
|
|
list(APPEND FEATURE_OPTIONS -Dcairo=enabled) # Enable Cairo graphics library support
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS -Dcairo=disabled)
|
|
|
|
endif()
|
2023-12-28 15:52:26 +08:00
|
|
|
if("freetype" IN_LIST FEATURES)
|
|
|
|
list(APPEND FEATURE_OPTIONS -Dfreetype=enabled) #Enable freetype interop helpers
|
|
|
|
else()
|
|
|
|
list(APPEND FEATURE_OPTIONS -Dfreetype=disabled)
|
|
|
|
endif()
|
2021-04-27 01:28:21 +08:00
|
|
|
#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()
|
2017-05-29 17:26:27 +08:00
|
|
|
|
2023-01-18 03:44:20 +08:00
|
|
|
if("introspection" IN_LIST FEATURES)
|
|
|
|
list(APPEND OPTIONS_DEBUG -Dgobject=enabled -Dintrospection=disabled)
|
|
|
|
list(APPEND OPTIONS_RELEASE -Dgobject=enabled -Dintrospection=enabled)
|
|
|
|
else()
|
|
|
|
list(APPEND OPTIONS -Dintrospection=disabled)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
|
|
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
|
|
|
|
else()
|
|
|
|
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
|
|
|
|
endif()
|
2021-01-25 17:47:30 +08:00
|
|
|
|
|
|
|
vcpkg_configure_meson(
|
2022-06-09 06:44:40 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2021-04-27 01:28:21 +08:00
|
|
|
-Ddocs=disabled # Generate documentation with gtk-doc
|
2021-01-25 17:47:30 +08:00
|
|
|
-Dtests=disabled
|
|
|
|
-Dbenchmark=disabled
|
2023-01-18 03:44:20 +08:00
|
|
|
${OPTIONS}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
${OPTIONS_DEBUG}
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
${OPTIONS_RELEASE}
|
2023-01-17 04:07:07 +08:00
|
|
|
ADDITIONAL_BINARIES
|
|
|
|
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
|
|
|
|
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
|
2023-01-18 03:44:20 +08:00
|
|
|
g-ir-compiler='${CURRENT_HOST_INSTALLED_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'
|
|
|
|
g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'
|
2016-10-08 03:09:58 +08:00
|
|
|
)
|
|
|
|
|
2023-01-18 03:44:20 +08:00
|
|
|
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
2017-04-15 20:39:04 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-01-25 17:47:30 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-01-26 18:25:24 +08:00
|
|
|
|
2022-08-03 14:10:06 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2022-04-29 06:32:04 +08:00
|
|
|
file(GLOB PC_FILES
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc")
|
|
|
|
|
|
|
|
foreach(PC_FILE IN LISTS PC_FILES)
|
|
|
|
file(READ "${PC_FILE}" PC_FILE_CONTENT)
|
|
|
|
string(REGEX REPLACE
|
|
|
|
"\\$\\{prefix\}\\/lib\\/([a-zA-Z0-9\-]*)\\.lib"
|
|
|
|
"-l\\1" PC_FILE_CONTENT
|
|
|
|
"${PC_FILE_CONTENT}")
|
|
|
|
file(WRITE "${PC_FILE}" ${PC_FILE_CONTENT})
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
2021-01-25 17:47:30 +08:00
|
|
|
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)
|
2019-06-12 04:39:40 +08:00
|
|
|
|
2022-06-09 06:44:40 +08:00
|
|
|
vcpkg_list(SET TOOL_NAMES)
|
2021-04-27 01:28:21 +08:00
|
|
|
if("glib" IN_LIST FEATURES)
|
2023-03-13 12:31:11 +08:00
|
|
|
vcpkg_list(APPEND TOOL_NAMES hb-subset hb-shape hb-ot-shape-closure hb-info)
|
2023-10-21 00:57:10 +08:00
|
|
|
if("cairo" IN_LIST FEATURES)
|
|
|
|
vcpkg_list(APPEND TOOL_NAMES hb-view)
|
|
|
|
endif()
|
2021-04-27 01:28:21 +08:00
|
|
|
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()
|
2022-06-09 06:44:40 +08:00
|
|
|
|
2023-03-13 12:31:11 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|