[vlc-commits] contrib/harfbuzz: fix CoreText detection and linking

Felix Paul Kühne git at videolan.org
Sat May 26 18:35:49 CEST 2018


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Sat May 26 17:55:32 2018 +0200| [aff7066a87f84458ac611f15b2cc40f0e8e82808] | committer: Felix Paul Kühne

contrib/harfbuzz: fix CoreText detection and linking

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aff7066a87f84458ac611f15b2cc40f0e8e82808
---

 .../harfbuzz/harfbuzz-fix-coretext-detection.patch | 51 ++++++++++++++++++++++
 contrib/src/harfbuzz/rules.mak                     |  1 +
 2 files changed, 52 insertions(+)

diff --git a/contrib/src/harfbuzz/harfbuzz-fix-coretext-detection.patch b/contrib/src/harfbuzz/harfbuzz-fix-coretext-detection.patch
new file mode 100644
index 0000000000..977600c5ed
--- /dev/null
+++ b/contrib/src/harfbuzz/harfbuzz-fix-coretext-detection.patch
@@ -0,0 +1,51 @@
+diff -ru harfbuzz/CMakeLists.txt harfbuzz/CMakeLists.txt
+--- harfbuzz/CMakeLists.txt	2018-05-26 17:51:35.000000000 +0200
++++ harfbuzz/CMakeLists.txt	2018-05-26 17:47:57.000000000 +0200
+@@ -364,16 +364,41 @@
+ if (APPLE AND HB_HAVE_CORETEXT)
+   # Apple Advanced Typography
+   add_definitions(-DHAVE_CORETEXT)
++  
++  set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT}
++    ${CMAKE_PREFIX_PATH} CACHE string  "appleOS find search path root" FORCE)
++  # Default to searching for frameworks first.
++  set(CMAKE_FIND_FRAMEWORK FIRST)
++  # Set up the default search directories for frameworks.
++  set(CMAKE_SYSTEM_FRAMEWORK_PATH
++    ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks
++    ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
++    ${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks)
++  # Only search the specified iOS SDK, not the remainder of the host filesystem.
++  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
++  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
++  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+ 
+   list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-coretext.cc)
+   list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-coretext.h)
+ 
+-  find_library(APPLICATION_SERVICES_FRAMEWORK ApplicationServices)
+-  if (APPLICATION_SERVICES_FRAMEWORK)
+-    list(APPEND THIRD_PARTY_LIBS ${APPLICATION_SERVICES_FRAMEWORK})
+-  endif (APPLICATION_SERVICES_FRAMEWORK)
+-
+-  mark_as_advanced(APPLICATION_SERVICES_FRAMEWORK)
++  find_library(CORETEXT_FRAMEWORK CoreText)
++  if (CORETEXT_FRAMEWORK)
++    list(APPEND THIRD_PARTY_LIBS ${CORETEXT_FRAMEWORK})
++  endif (CORETEXT_FRAMEWORK)
++  mark_as_advanced(CORETEXT_FRAMEWORK)
++  
++  find_library(COREFOUNDATION_FRAMEWORK CoreFoundation)
++  if (COREFOUNDATION_FRAMEWORK)
++    list(APPEND THIRD_PARTY_LIBS ${COREFOUNDATION_FRAMEWORK})
++  endif (COREFOUNDATION_FRAMEWORK)
++  mark_as_advanced(COREFOUNDATION_FRAMEWORK)
++  
++  find_library(COREGRAPHICS_FRAMEWORK CoreGraphics)
++  if (COREGRAPHICS_FRAMEWORK)
++    list(APPEND THIRD_PARTY_LIBS ${COREGRAPHICS_FRAMEWORK})
++  endif (COREGRAPHICS_FRAMEWORK)
++  mark_as_advanced(COREGRAPHICS_FRAMEWORK)
+ endif ()
+ 
+ if (WIN32 AND HB_HAVE_UNISCRIBE)
diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak
index c9c3d4ae2e..178f47f047 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
 	$(APPLY) $(SRC)/harfbuzz/0001-Skip-using-the-_BitScan-intrinsics-on-mingw.patch
 	$(APPLY) $(SRC)/harfbuzz/harfbuzz-fix-freetype-detect.patch
 	$(APPLY) $(SRC)/harfbuzz/harfbuzz-no-tests.patch
+	$(APPLY) $(SRC)/harfbuzz/harfbuzz-fix-coretext-detection.patch
 	$(MOVE)
 
 DEPS_harfbuzz = freetype2 $(DEPS_freetype2)



More information about the vlc-commits mailing list