0011-contrib-harfbuzz-fix-iOS-compilation-when-CoreText-i.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. From 33d9c4eacd94796a0787ad2eee23d1e1bb19e122 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Mon, 23 Nov 2015 16:46:27 +0100
  4. Subject: [PATCH 11/14] contrib/harfbuzz: fix iOS compilation when CoreText is
  5. enabled
  6. ---
  7. contrib/src/harfbuzz/harfbuzz-coretext.patch | 32 ++++++++++++++++++++++++++++
  8. contrib/src/harfbuzz/rules.mak | 1 +
  9. 2 files changed, 33 insertions(+)
  10. create mode 100644 contrib/src/harfbuzz/harfbuzz-coretext.patch
  11. diff --git a/contrib/src/harfbuzz/harfbuzz-coretext.patch b/contrib/src/harfbuzz/harfbuzz-coretext.patch
  12. new file mode 100644
  13. index 0000000..555e851
  14. --- /dev/null
  15. +++ b/contrib/src/harfbuzz/harfbuzz-coretext.patch
  16. @@ -0,0 +1,32 @@
  17. +diff -ru harfbuzz/configure.ac harfbuzz/configure.ac
  18. +--- harfbuzz/configure.ac 2015-11-23 15:00:52.000000000 +0100
  19. ++++ harfbuzz-fixed/configure.ac 2015-11-23 14:59:43.000000000 +0100
  20. +@@ -354,22 +354,21 @@
  21. + [with_coretext=no])
  22. + have_coretext=false
  23. + if test "x$with_coretext" = "xyes" -o "x$with_coretext" = "xauto"; then
  24. +- AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include <ApplicationServices/ApplicationServices.h>])
  25. ++ if test "x$have_coretext" != "xtrue"; then
  26. ++ AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include <CoreText/CoreText.h>])
  27. ++ fi
  28. +
  29. + if $have_coretext; then
  30. + CORETEXT_CFLAGS=
  31. +- CORETEXT_LIBS="-framework ApplicationServices"
  32. ++ CORETEXT_LIBS="-framework CoreText -framework CoreGraphics -framework CoreFoundation"
  33. + AC_SUBST(CORETEXT_CFLAGS)
  34. + AC_SUBST(CORETEXT_LIBS)
  35. + else
  36. +- # On iOS CoreText and CoreGraphics are stand-alone frameworks
  37. +- if test "x$have_coretext" != "xtrue"; then
  38. +- AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include <CoreText/CoreText.h>])
  39. +- fi
  40. ++ AC_CHECK_TYPE(CTFontRef, have_coretext=true,, [#include <ApplicationServices/ApplicationServices.h>])
  41. +
  42. + if $have_coretext; then
  43. + CORETEXT_CFLAGS=
  44. +- CORETEXT_LIBS="-framework CoreText -framework CoreGraphics"
  45. ++ CORETEXT_LIBS="-framework ApplicationServices"
  46. + AC_SUBST(CORETEXT_CFLAGS)
  47. + AC_SUBST(CORETEXT_LIBS)
  48. + fi
  49. diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak
  50. index f21917c..2058b4a 100644
  51. --- a/contrib/src/harfbuzz/rules.mak
  52. +++ b/contrib/src/harfbuzz/rules.mak
  53. @@ -23,6 +23,7 @@ harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 .sum-harfbuzz
  54. $(UPDATE_AUTOCONFIG)
  55. $(APPLY) $(SRC)/harfbuzz/harfbuzz-aarch64.patch
  56. $(APPLY) $(SRC)/harfbuzz/harfbuzz-clang.patch
  57. + $(APPLY) $(SRC)/harfbuzz/harfbuzz-coretext.patch
  58. $(MOVE)
  59. DEPS_harfbuzz = freetype2 $(DEPS_freetype2)
  60. --
  61. 2.8.1