aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpast-due <30942300+past-due@users.noreply.github.com>2018-07-04 10:08:45 -0400
committerRobert Schumacher <roschuma@microsoft.com>2018-07-04 07:08:45 -0700
commit1fb2cc3483ddbb7cbd62712296a6a62b57ac9444 (patch)
tree6fac5b6539512c6a6b82c538610c439e9d66a043
parenta6b2019b74be79062b7535b1eaab8b9309fdba74 (diff)
downloadvcpkg-1fb2cc3483ddbb7cbd62712296a6a62b57ac9444.tar.gz
vcpkg-1fb2cc3483ddbb7cbd62712296a6a62b57ac9444.zip
[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]
-rw-r--r--ports/harfbuzz/CONTROL12
-rw-r--r--ports/harfbuzz/portfile.cmake25
-rw-r--r--ports/pango/CONTROL2
3 files changed, 29 insertions, 10 deletions
diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL
index 0fcb9a96b..d503ca111 100644
--- a/ports/harfbuzz/CONTROL
+++ b/ports/harfbuzz/CONTROL
@@ -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
diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake
index 8bed6e332..728b26fdb 100644
--- a/ports/harfbuzz/portfile.cmake
+++ b/ports/harfbuzz/portfile.cmake
@@ -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
)
diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL
index aa6c73e68..daeeb53db 100644
--- a/ports/pango/CONTROL
+++ b/ports/pango/CONTROL
@@ -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)