Browse Source

Contribs: update harfbuzz to 2.6.4

This is an update of 30 releases...
It might break some setups, hopefully not.
pull/104/head
Jean-Baptiste Kempf 6 years ago
parent
commit
d2a01fe376
  1. 2
      contrib/src/harfbuzz/SHA512SUMS
  2. 14
      contrib/src/harfbuzz/harfbuzz-aarch64.patch
  3. 17
      contrib/src/harfbuzz/harfbuzz-clang.patch
  4. 73
      contrib/src/harfbuzz/harfbuzz-create-pkgconfig-file.patch
  5. 40
      contrib/src/harfbuzz/harfbuzz-fix-coretext-detection.patch
  6. 21
      contrib/src/harfbuzz/harfbuzz-fix-freetype-detect.patch
  7. 18
      contrib/src/harfbuzz/harfbuzz-no-tests.patch
  8. 21
      contrib/src/harfbuzz/rules.mak

2
contrib/src/harfbuzz/SHA512SUMS

@ -1 +1 @@
259656574b1ec2916ada951b759a591f45c11c5c639fa29831e06320312bf951f4f5ef6306f9ffc373abf0d40dbf944db918d4c54aca3bd7eab2c3a886db7a68 harfbuzz-1.7.6.tar.bz2
d8664bb64fda11ff7646693070637e3827f8b3d1de50e11ecf108ce4d19c878b26b2ba4cff278da6e6cc0cb431e1630d9eaa7c32a9bebb9655a7aa8dabf7114f harfbuzz-2.6.4.tar.xz

14
contrib/src/harfbuzz/harfbuzz-aarch64.patch

@ -1,6 +1,6 @@
--- harfbuzz-1.0.6/src/hb-atomic-private.hh.orig 2015-09-29 15:48:46.947083938 +0200
+++ harfbuzz-1.0.6/src/hb-atomic-private.hh 2015-10-26 00:06:08.564306388 +0100
@@ -73,10 +73,8 @@
--- harfbuzz-2.0.0/src/hb-atomic.hh.orig 2018-10-01 19:49:23.000000000 +0200
+++ harfbuzz-2.0.0/src/hb-atomic.hh 2020-03-29 16:44:27.520441550 +0200
@@ -163,10 +163,8 @@
#elif !defined(HB_NO_MT) && defined(__APPLE__)
#include <libkern/OSAtomic.h>
@ -11,15 +11,15 @@
-#include <Availability.h>
#endif
#define _hb_memory_barrier() OSMemoryBarrier ()
@@ -174,7 +172,11 @@
#define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), (AI)) - (V))
@@ -86,7 +84,11 @@
#define hb_atomic_ptr_impl_get(P) (OSMemoryBarrier (), (void *) *(P))
#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100)
+#if __aarch64__
+#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P))
+#else
#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((O), (N), (P))
+#endif
#else
#if __ppc64__ || __x86_64__ || __aarch64__

17
contrib/src/harfbuzz/harfbuzz-clang.patch

@ -1,17 +0,0 @@
--- harfbuzz-1.0.6/configure.ac.orig 2015-10-26 00:06:30.060254321 +0100
+++ harfbuzz-1.0.6/configure.ac 2015-10-26 00:07:17.364140612 +0100
@@ -93,14 +93,6 @@
;;
esac
- case "$host" in
- arm-*-*)
- if test "x$ac_cv_alignof_struct_char__" != x1; then
- # Request byte alignment
- CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"
- fi
- ;;
- esac
fi
AM_CONDITIONAL(HAVE_GCC, test "x$GCC" = "xyes")

73
contrib/src/harfbuzz/harfbuzz-create-pkgconfig-file.patch

@ -1,28 +1,28 @@
--- harfbuzz/CMakeLists.txt.old 2018-05-27 12:03:25.000000000 +0200
+++ harfbuzz/CMakeLists.txt 2018-05-27 12:02:45.000000000 +0200
@@ -385,18 +385,21 @@ if (APPLE AND HB_HAVE_CORETEXT)
find_library(CORETEXT_FRAMEWORK CoreText)
if (CORETEXT_FRAMEWORK)
list(APPEND THIRD_PARTY_LIBS ${CORETEXT_FRAMEWORK})
+ set(FRAMEWORK_FLAGS "${FRAMEWORK_FLAGS} -framework CoreText")
endif (CORETEXT_FRAMEWORK)
mark_as_advanced(CORETEXT_FRAMEWORK)
find_library(COREFOUNDATION_FRAMEWORK CoreFoundation)
if (COREFOUNDATION_FRAMEWORK)
list(APPEND THIRD_PARTY_LIBS ${COREFOUNDATION_FRAMEWORK})
+ set(FRAMEWORK_FLAGS "${FRAMEWORK_FLAGS} -framework CoreFoundation")
endif (COREFOUNDATION_FRAMEWORK)
mark_as_advanced(COREFOUNDATION_FRAMEWORK)
find_library(COREGRAPHICS_FRAMEWORK CoreGraphics)
if (COREGRAPHICS_FRAMEWORK)
list(APPEND THIRD_PARTY_LIBS ${COREGRAPHICS_FRAMEWORK})
+ set(FRAMEWORK_FLAGS "${FRAMEWORK_FLAGS} -framework CoreGraphics")
endif (COREGRAPHICS_FRAMEWORK)
mark_as_advanced(COREGRAPHICS_FRAMEWORK)
endif ()
@@ -561,6 +564,18 @@ endif ()
--- harfbuzz-2.0.0/CMakeLists.txt.orig 2020-03-29 16:57:36.480432086 +0200
+++ harfbuzz-2.0.0/CMakeLists.txt 2020-03-29 16:59:29.568430730 +0200
@@ -396,18 +396,21 @@
find_library(COREFOUNDATION CoreFoundation)
if (COREFOUNDATION)
list(APPEND THIRD_PARTY_LIBS ${COREFOUNDATION})
+ set(FRAMEWORK_FLAGS "${FRAMEWORK_FLAGS} -framework CoreText")
endif ()
mark_as_advanced(COREFOUNDATION)
find_library(CORETEXT CoreText)
if (CORETEXT)
list(APPEND THIRD_PARTY_LIBS ${CORETEXT})
+ set(FRAMEWORK_FLAGS "${FRAMEWORK_FLAGS} -framework CoreFoundation")
endif ()
mark_as_advanced(CORETEXT)
find_library(COREGRAPHICS CoreGraphics)
if (COREGRAPHICS)
list(APPEND THIRD_PARTY_LIBS ${COREGRAPHICS})
+ set(FRAMEWORK_FLAGS "${FRAMEWORK_FLAGS} -framework CoreGraphics")
endif ()
mark_as_advanced(COREGRAPHICS)
else ()
@@ -579,6 +582,18 @@
add_library(harfbuzz ${project_sources} ${project_extra_sources} ${project_headers})
target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS})
@ -34,25 +34,10 @@
+endforeach()
+
+set(PRIVATE_LIBS "${PRIVATE_LIBS} ${FRAMEWORK_FLAGS}")
+configure_file("harfbuzz-cmake.pc.in" "harfbuzz.pc" @ONLY)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/harfbuzz.pc"
+configure_file("src/harfbuzz.pc.in" "src/harfbuzz.pc" @ONLY)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/src/harfbuzz.pc"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
+
## Define harfbuzz-subset library
add_library(harfbuzz-subset ${subset_project_sources} ${subset_project_headers})
add_dependencies(harfbuzz-subset harfbuzz)
--- /dev/null 2018-05-27 12:22:37.000000000 +0200
+++ harfbuzz/harfbuzz-cmake.pc.in 2018-05-27 12:24:00.000000000 +0200
@@ -0,0 +1,12 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: harfbuzz
+Description: HarfBuzz text shaping library
+Version: @HB_VERSION@
+
+Libs: -L${libdir} -lharfbuzz -lm @PRIVATE_LIBS@
+Requires.private:
+Cflags: -I${includedir}/harfbuzz
if (NOT HB_DISABLE_SUBSET)
add_library(harfbuzz-subset ${subset_project_sources} ${subset_project_headers})

40
contrib/src/harfbuzz/harfbuzz-fix-coretext-detection.patch

@ -1,11 +1,9 @@
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)
--- harfbuzz-2.6.0/CMakeLists.txt.orig 2020-03-29 18:34:37.596362257 +0200
+++ harfbuzz-2.6.0/CMakeLists.txt 2020-03-29 18:34:53.984362061 +0200
@@ -287,6 +287,20 @@
# 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.
@ -19,33 +17,7 @@ diff -ru harfbuzz/CMakeLists.txt harfbuzz/CMakeLists.txt
+ 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)
if (HB_IOS)

21
contrib/src/harfbuzz/harfbuzz-fix-freetype-detect.patch

@ -1,12 +1,12 @@
--- harfbuzz/CMakeLists.txt.pkg-freetype 2018-05-22 15:42:04.861877600 +0200
+++ harfbuzz/CMakeLists.txt 2018-05-22 15:53:50.808676800 +0200
@@ -267,6 +267,14 @@ set (subset_project_headers
--- harfbuzz-2.6.0/CMakeLists.txt.orig 2019-07-26 23:23:47.000000000 +0200
+++ harfbuzz-2.6.0/CMakeLists.txt 2020-03-29 18:32:04.608364093 +0200
@@ -201,6 +201,14 @@
## Find and include needed header folders and libraries
if (HB_HAVE_FREETYPE)
+ find_package(PkgConfig)
+ pkg_check_modules(PC_FREETYPE2 QUIET freetype2)
+
+
+ if (PC_FREETYPE2_FOUND)
+ include_directories(AFTER ${PC_FREETYPE2_STATIC_INCLUDE_DIRS})
+ list(APPEND THIRD_PARTY_LIBS ${PC_FREETYPE2_STATIC_LIBRARIES})
@ -15,25 +15,22 @@
include (FindFreetype)
if (NOT FREETYPE_FOUND)
message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix")
@@ -274,15 +282,17 @@ if (HB_HAVE_FREETYPE)
@@ -208,13 +216,15 @@
list(APPEND THIRD_PARTY_LIBS ${FREETYPE_LIBRARIES} -lz)
list(APPEND THIRD_PARTY_LIBS ${FREETYPE_LIBRARIES})
include_directories(AFTER ${FREETYPE_INCLUDE_DIRS})
- add_definitions(-DHAVE_FREETYPE=1)
-
- list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ft.cc)
- list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
# So check_funcs can find its headers
set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${FREETYPE_INCLUDE_DIRS})
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${FREETYPE_LIBRARIES})
+ endif ()
+ list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-ft.cc)
+ list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
+
+ add_definitions(-DHAVE_FREETYPE=1)
+
+
+ list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-ft.h)
check_funcs(FT_Get_Var_Blend_Coordinates FT_Set_Var_Blend_Coordinates FT_Done_MM_Var)
endif ()

18
contrib/src/harfbuzz/harfbuzz-no-tests.patch

@ -1,18 +0,0 @@
--- harfbuzz/CMakeLists.txt.notests 2018-05-24 15:14:05.682443200 +0200
+++ harfbuzz/CMakeLists.txt 2018-05-24 15:14:17.437916300 +0200
@@ -808,6 +808,7 @@ endif ()
## src/ executables
+if(NOT WIN32 OR NOT ${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")
foreach (prog main test test-would-substitute test-size-params test-buffer-serialize hb-ot-tag test-unicode-ranges)
set (prog_name ${prog})
if (${prog_name} STREQUAL "test")
@@ -818,6 +819,7 @@ foreach (prog main test test-would-subst
target_link_libraries(${prog_name} harfbuzz ${THIRD_PARTY_LIBS})
endforeach ()
set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
+endif()
## Tests
if (UNIX OR MINGW)

21
contrib/src/harfbuzz/rules.mak

@ -1,24 +1,25 @@
# HARFBUZZ
HARFBUZZ_VERSION := 1.7.6
HARFBUZZ_URL := http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-$(HARFBUZZ_VERSION).tar.bz2
HARFBUZZ_VERSION := 2.6.4
HARFBUZZ_URL := http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-$(HARFBUZZ_VERSION).tar.xz
PKGS += harfbuzz
ifeq ($(call need_pkg,"harfbuzz"),)
PKGS_FOUND += harfbuzz
endif
$(TARBALLS)/harfbuzz-$(HARFBUZZ_VERSION).tar.bz2:
$(TARBALLS)/harfbuzz-$(HARFBUZZ_VERSION).tar.xz:
$(call download_pkg,$(HARFBUZZ_URL),harfbuzz)
.sum-harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2
.sum-harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.xz
harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 .sum-harfbuzz
harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.xz .sum-harfbuzz
$(UNPACK)
$(APPLY) $(SRC)/harfbuzz/harfbuzz-aarch64.patch
$(APPLY) $(SRC)/harfbuzz/harfbuzz-clang.patch
#It uses Cmake builtin to detect freetype instead of Pkg-Config
$(APPLY) $(SRC)/harfbuzz/harfbuzz-fix-freetype-detect.patch
$(APPLY) $(SRC)/harfbuzz/harfbuzz-no-tests.patch
#It does not search for CoreText Framework everywhere
$(APPLY) $(SRC)/harfbuzz/harfbuzz-fix-coretext-detection.patch
#Missing Frameworks in the pkgconfig file
$(APPLY) $(SRC)/harfbuzz/harfbuzz-create-pkgconfig-file.patch
$(MOVE)
@ -26,7 +27,11 @@ DEPS_harfbuzz = freetype2 $(DEPS_freetype2)
.harfbuzz: harfbuzz toolchain.cmake
cd $< && mkdir -p build && cd build && $(HOSTVARS_PIC) $(CMAKE) \
-DBUILD_SHARED_LIBS:BOOL=OFF -DHB_HAVE_FREETYPE:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DHB_HAVE_FREETYPE:BOOL=ON \
-DHB_BUILD_TESTS=OFF \
-DHB_BUILD_UTILS=OFF \
-DHB_HAVE_GLIB=OFF \
.. && $(MAKE)
cd $< && cd build && $(MAKE) install
touch $@

Loading…
Cancel
Save