[harfbuzz] Use vcpkg Features for UCDN & Glib (#3560)

* [harfbuzz] Use Features for UCDN & Glib

Permit configuration of UCDN and Glib Unicode callback support via features.

* [harfbuzz][pango] Merge conflicts. Pango depends on harfbuzz[glib]
This commit is contained in:
past-due 2018-07-04 10:08:45 -04:00 committed by Robert Schumacher
parent a6b2019b74
commit 1fb2cc3483
3 changed files with 29 additions and 10 deletions

View File

@ -1,8 +1,16 @@
Source: harfbuzz
Version: 1.8.2
Version: 1.8.2-2
Description: HarfBuzz OpenType text shaping engine
Build-Depends: freetype, ragel, glib (windows)
Build-Depends: freetype, ragel
Default-Features: ucdn
Feature: icu
Build-Depends: icu
Description: icu support for harfbuzz
Feature: ucdn
Description: Builtin (UCDN) Unicode callbacks support
Feature: glib
Build-Depends: glib
Description: Glib Unicode callbacks support

View File

@ -20,12 +20,23 @@ if("icu" IN_LIST FEATURES)
SET(HB_HAVE_ICU "ON")
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME)
SET(HAVE_GLIB "OFF")
SET(BUILTIN_UCDN "ON")
else()
SET(HAVE_GLIB "ON")
SET(BUILTIN_UCDN "OFF")
## Unicode callbacks
# Builtin (UCDN)
set(BUILTIN_UCDN OFF)
if("ucdn" IN_LIST FEATURES)
set(BUILTIN_UCDN ON)
endif()
# Glib
set(HAVE_GLIB OFF)
if("glib" IN_LIST FEATURES)
set(HAVE_GLIB ON)
endif()
# At least one Unicode callback must be specified, or harfbuzz compilation fails
if(NOT (BUILTIN_UCDN OR HAVE_GLIB))
message(FATAL_ERROR "Error: At least one Unicode callback must be specified (ucdn, glib).")
endif()
vcpkg_configure_cmake(
@ -33,9 +44,9 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DHB_HAVE_FREETYPE=ON
-DHB_HAVE_GLIB=${HAVE_GLIB}
-DHB_BUILTIN_UCDN=${BUILTIN_UCDN}
-DHB_HAVE_ICU=${HB_HAVE_ICU}
-DHB_HAVE_GLIB=${HAVE_GLIB}
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)

View File

@ -1,4 +1,4 @@
Source: pango
Version: 1.40.11-1
Description: Text and font handling library.
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz[glib] (!windows-static)