Discussion:
[vlc-commits] contrib/libass: fix CoreText detection on OS X < 10.8 (fixes #18583)
Felix Paul Kühne
2017-10-22 15:57:59 UTC
Permalink
vlc/vlc-2.2 | branch: master | Felix Paul Kühne <***@serioese.gmbh> | Sun Oct 22 17:51:55 2017 +0200| [974665ab641ded6f8df07f87d23e07f948459724] | committer: Felix Paul Kühne

contrib/libass: fix CoreText detection on OS X < 10.8 (fixes #18583)
http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=974665ab641ded6f8df07f87d23e07f948459724
---

contrib/src/ass/ass-macosx-coretext.patch | 38 +++++++++++++++++++++++++++++++
contrib/src/ass/rules.mak | 1 +
2 files changed, 39 insertions(+)

diff --git a/contrib/src/ass/ass-macosx-coretext.patch b/contrib/src/ass/ass-macosx-coretext.patch
new file mode 100644
index 0000000000..a5c5e483c7
--- /dev/null
+++ b/contrib/src/ass/ass-macosx-coretext.patch
@@ -0,0 +1,38 @@
+diff -ru libass/configure.ac libass-fixed/configure.ac
+--- libass/configure.ac 2017-10-22 17:21:01.000000000 +0200
++++ libass-fixed/configure.ac 2017-10-22 17:20:53.000000000 +0200
+@@ -165,11 +165,11 @@
+ # Linking to CoreText directly only works from Mountain Lion and iOS6. In
+ # earlier OS releases CoreText was part of the ApplicationServices umbrella
+ # framework.
+-LIBS="$LIBS -framework CoreText -framework CoreFoundation -framework CoreGraphics"
++LIBS="$LIBS -framework ApplicationServices -framework CoreFoundation"
+ AC_MSG_CHECKING([for CORETEXT])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM(
+- [[#include <CoreText/CoreText.h>]],
++ [[#include <ApplicationServices/ApplicationServices.h>]],
+ [[CTFontCreateWithFontDescriptor(NULL, 0.0, NULL);]],)
+ ], [
+ AC_DEFINE(CONFIG_CORETEXT, 1, [found CoreText in System library])
+@@ -183,8 +183,6 @@
+ fi
+ AM_CONDITIONAL([CORETEXT], [test x$coretext = xtrue])
+
+-
+-
+ if test x$enable_directwrite != xno; then
+ # Linking to DirectWrite directly only works from Windows
+ AC_MSG_CHECKING([for DIRECTWRITE])
+diff -ru libass/libass/ass_coretext.c libass-fixed/libass/ass_coretext.c
+--- libass/libass/ass_coretext.c 2016-02-11 22:36:38.000000000 +0100
++++ libass-fixed/libass/ass_coretext.c 2017-10-22 17:20:53.000000000 +0200
+@@ -20,7 +20,7 @@
+ #include "ass_compat.h"
+
+ #include <CoreFoundation/CoreFoundation.h>
+-#include <CoreText/CoreText.h>
++#include <ApplicationServices/ApplicationServices.h>
+
+ #include "ass_coretext.h"
+
diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
index fd21e50c73..0dc58364ef 100644
--- a/contrib/src/ass/rules.mak
+++ b/contrib/src/ass/rules.mak
@@ -33,6 +33,7 @@ $(TARBALLS)/libass-$(ASS_VERSION).tar.gz:
libass: libass-$(ASS_VERSION).tar.gz .sum-ass
$(UNPACK)
$(APPLY) $(SRC)/ass/ass-macosx.patch
+ $(APPLY) $(SRC)/ass/ass-macosx-coretext.patch
$(APPLY) $(SRC)/ass/ass-solaris.patch
$(UPDATE_AUTOCONFIG)
$(MOVE)

Loading...