From afb0a5378ab0097b54062789f63771a283bf0c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= Date: Mon, 23 Nov 2015 16:46:27 +0100 Subject: [PATCH 09/15] contrib/harfbuzz: fix iOS compilation when CoreText is enabled --- contrib/src/harfbuzz/harfbuzz-coretext.patch | 32 ++++++++++++++++++++++++++++ contrib/src/harfbuzz/rules.mak | 1 + 2 files changed, 33 insertions(+) create mode 100644 contrib/src/harfbuzz/harfbuzz-coretext.patch diff --git a/contrib/src/harfbuzz/harfbuzz-coretext.patch b/contrib/src/harfbuzz/harfbuzz-coretext.patch new file mode 100644 index 0000000..555e851 --- /dev/null +++ b/contrib/src/harfbuzz/harfbuzz-coretext.patch @@ -0,0 +1,32 @@ +diff -ru harfbuzz/configure.ac harfbuzz/configure.ac +--- harfbuzz/configure.ac 2015-11-23 15:00:52.000000000 +0100 ++++ harfbuzz-fixed/configure.ac 2015-11-23 14:59:43.000000000 +0100 +@@ -354,22 +354,21 @@ + [with_coretext=no]) + have_coretext=false + if test "x$with_coretext" = "xyes" -o "x$with_coretext" = "xauto"; then +- AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include ]) ++ if test "x$have_coretext" != "xtrue"; then ++ AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include ]) ++ fi + + if $have_coretext; then + CORETEXT_CFLAGS= +- CORETEXT_LIBS="-framework ApplicationServices" ++ CORETEXT_LIBS="-framework CoreText -framework CoreGraphics -framework CoreFoundation" + AC_SUBST(CORETEXT_CFLAGS) + AC_SUBST(CORETEXT_LIBS) + else +- # On iOS CoreText and CoreGraphics are stand-alone frameworks +- if test "x$have_coretext" != "xtrue"; then +- AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include ]) +- fi ++ AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include ]) + + if $have_coretext; then + CORETEXT_CFLAGS= +- CORETEXT_LIBS="-framework CoreText -framework CoreGraphics" ++ CORETEXT_LIBS="-framework ApplicationServices" + AC_SUBST(CORETEXT_CFLAGS) + AC_SUBST(CORETEXT_LIBS) + fi diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak index 36bcb31..4c9bcf2 100644 --- a/contrib/src/harfbuzz/rules.mak +++ b/contrib/src/harfbuzz/rules.mak @@ -23,6 +23,7 @@ harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 .sum-harfbuzz $(UPDATE_AUTOCONFIG) $(APPLY) $(SRC)/harfbuzz/harfbuzz-aarch64.patch $(APPLY) $(SRC)/harfbuzz/harfbuzz-clang.patch + $(APPLY) $(SRC)/harfbuzz/harfbuzz-coretext.patch $(MOVE) DEPS_harfbuzz = freetype2 $(DEPS_freetype2) -- 2.8.4