Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits: fa081b46 by Hugo Beauzée-Luyssen at 2022-01-21T07:08:42+00:00 contrib: Bump harfbuzz to 3.2.0 - - - - - 6d633030 by Hugo Beauzée-Luyssen at 2022-01-21T07:08:42+00:00 contribs: harfbuzz: Switch to meson - - - - - 02eb6943 by Hugo Beauzée-Luyssen at 2022-01-21T07:08:42+00:00 contribs: harfbuzz: Disable some unneeded components - - - - - 6 changed files: - − contrib/src/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch - + contrib/src/harfbuzz/0001-meson-Enable-big-objects-support-when-building-for-w.patch - − contrib/src/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch - − contrib/src/harfbuzz/0003-Removed-unused-variable-supp_size-from-plan_subset_e.patch - contrib/src/harfbuzz/SHA512SUMS - contrib/src/harfbuzz/rules.mak Changes: ===================================== contrib/src/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch deleted ===================================== @@ -1,40 +0,0 @@ -From f110dc32b2a0f3fccfc80007916efcc9f62c56fa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <[email protected]> -Date: Fri, 15 May 2020 09:14:15 +0200 -Subject: [PATCH 1/3] fix OSAtomic calls for AArch64 - ---- - src/hb-atomic.hh | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/hb-atomic.hh b/src/hb-atomic.hh -index b3fb296b..20dae7e3 100644 ---- a/src/hb-atomic.hh -+++ b/src/hb-atomic.hh -@@ -164,10 +164,8 @@ static inline bool _hb_compare_and_swap_ptr (void **P, void *O, void *N) - #elif !defined(HB_NO_MT) && defined(__APPLE__) - - #include <libkern/OSAtomic.h> --#ifdef __MAC_OS_X_MIN_REQUIRED -+#ifdef __APPLE__ - #include <AvailabilityMacros.h> --#elif defined(__IPHONE_OS_MIN_REQUIRED) --#include <Availability.h> - #endif - - #define _hb_memory_barrier() OSMemoryBarrier () -@@ -175,7 +173,11 @@ static inline bool _hb_compare_and_swap_ptr (void **P, void *O, void *N) - #define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), (AI)) - (V)) - - #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 ((O), (N), (P)) -+#endif - #else - #if __ppc64__ || __x86_64__ || __aarch64__ - #define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P)) --- -2.26.0.windows.1 - ===================================== contrib/src/harfbuzz/0001-meson-Enable-big-objects-support-when-building-for-w.patch ===================================== @@ -0,0 +1,30 @@ +From 38c155bd1edc9773fea287fcc80659f25d1b21eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <[email protected]> +Date: Wed, 19 Jan 2022 11:53:02 +0100 +Subject: [PATCH] meson: Enable big objects support when building for windows + +Fix cross compilation when targetting win64 +--- + meson.build | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/meson.build b/meson.build +index 41344b3a3..8fb68f296 100644 +--- a/meson.build ++++ b/meson.build +@@ -57,6 +57,12 @@ if host_machine.cpu_family() == 'arm' and cpp.alignment('struct { char c; }') != + endif + endif + ++if host_machine.system() == 'windows' ++ add_project_arguments(cpp.get_supported_arguments([ ++ '-Wa,-mbig-obj' ++ ]), language : 'cpp') ++endif ++ + check_headers = [ + ['unistd.h'], + ['sys/mman.h'], +-- +2.34.1 + ===================================== contrib/src/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch deleted ===================================== @@ -1,309 +0,0 @@ -From dc5815a2cc756a29c01a85081e16e43131f18411 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <[email protected]> -Date: Fri, 15 May 2020 09:16:42 +0200 -Subject: [PATCH 2/3] Update the bundled ax_pthread.m4 - -This fixes building for Windows with clang, where the bundled -version of ax_pthread.m4 assumes that Clang doesn't need the -pthread option in LDFLAGS (assuming that a system that Clang -supports doesn't need an external library for pthreads). ---- - m4/ax_pthread.m4 | 224 ++++++++++++++++++++++++++--------------------- - 1 file changed, 123 insertions(+), 101 deletions(-) - -diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 -index 5fbf9fe0..1598d077 100644 ---- a/m4/ax_pthread.m4 -+++ b/m4/ax_pthread.m4 -@@ -55,6 +55,7 @@ - # - # Copyright (c) 2008 Steven G. Johnson <[email protected]> - # Copyright (c) 2011 Daniel Richard G. <[email protected]> -+# Copyright (c) 2019 Marc Stevens <[email protected]> - # - # This program is free software: you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by the -@@ -82,7 +83,7 @@ - # modified version of the Autoconf Macro, you may extend this special - # exception to the GPL to apply to your modified version as well. - --#serial 24 -+#serial 27 - - AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) - AC_DEFUN([AX_PTHREAD], [ -@@ -123,10 +124,12 @@ fi - # (e.g. DEC) have both -lpthread and -lpthreads, where one of the - # libraries is broken (non-POSIX). - --# Create a list of thread flags to try. Items starting with a "-" are --# C compiler flags, and other items are library names, except for "none" --# which indicates that we try without any flags at all, and "pthread-config" --# which is a program returning the flags for the Pth emulation library. -+# Create a list of thread flags to try. Items with a "," contain both -+# C compiler flags (before ",") and linker flags (after ","). Other items -+# starting with a "-" are C compiler flags, and remaining items are -+# library names, except for "none" which indicates that we try without -+# any flags at all, and "pthread-config" which is a program returning -+# the flags for the Pth emulation library. - - ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -@@ -194,14 +197,47 @@ case $host_os in - # that too in a future libc.) So we'll check first for the - # standard Solaris way of linking pthreads (-mt -lpthread). - -- ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" -+ ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" - ;; - esac - -+# Are we compiling with Clang? -+ -+AC_CACHE_CHECK([whether $CC is Clang], -+ [ax_cv_PTHREAD_CLANG], -+ [ax_cv_PTHREAD_CLANG=no -+ # Note that Autoconf sets GCC=yes for Clang as well as GCC -+ if test "x$GCC" = "xyes"; then -+ AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], -+ [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -+# if defined(__clang__) && defined(__llvm__) -+ AX_PTHREAD_CC_IS_CLANG -+# endif -+ ], -+ [ax_cv_PTHREAD_CLANG=yes]) -+ fi -+ ]) -+ax_pthread_clang="$ax_cv_PTHREAD_CLANG" -+ -+ - # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) - -+# Note that for GCC and Clang -pthread generally implies -lpthread, -+# except when -nostdlib is passed. -+# This is problematic using libtool to build C++ shared libraries with pthread: -+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 -+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 -+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 -+# To solve this, first try -pthread together with -lpthread for GCC -+ - AS_IF([test "x$GCC" = "xyes"], -- [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) -+ [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) -+ -+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first -+ -+AS_IF([test "x$ax_pthread_clang" = "xyes"], -+ [ax_pthread_flags="-pthread,-lpthread -pthread"]) -+ - - # The presence of a feature test macro requesting re-entrant function - # definitions is, on some systems, a strong hint that pthreads support is -@@ -224,25 +260,86 @@ AS_IF([test "x$ax_pthread_check_macro" = "x--"], - [ax_pthread_check_cond=0], - [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) - --# Are we compiling with Clang? - --AC_CACHE_CHECK([whether $CC is Clang], -- [ax_cv_PTHREAD_CLANG], -- [ax_cv_PTHREAD_CLANG=no -- # Note that Autoconf sets GCC=yes for Clang as well as GCC -- if test "x$GCC" = "xyes"; then -- AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], -- [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ --# if defined(__clang__) && defined(__llvm__) -- AX_PTHREAD_CC_IS_CLANG --# endif -- ], -- [ax_cv_PTHREAD_CLANG=yes]) -- fi -- ]) --ax_pthread_clang="$ax_cv_PTHREAD_CLANG" -+if test "x$ax_pthread_ok" = "xno"; then -+for ax_pthread_try_flag in $ax_pthread_flags; do -+ -+ case $ax_pthread_try_flag in -+ none) -+ AC_MSG_CHECKING([whether pthreads work without any flags]) -+ ;; -+ -+ *,*) -+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` -+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` -+ AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) -+ ;; -+ -+ -*) -+ AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) -+ PTHREAD_CFLAGS="$ax_pthread_try_flag" -+ ;; -+ -+ pthread-config) -+ AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) -+ AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) -+ PTHREAD_CFLAGS="`pthread-config --cflags`" -+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" -+ ;; -+ -+ *) -+ AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) -+ PTHREAD_LIBS="-l$ax_pthread_try_flag" -+ ;; -+ esac -+ -+ ax_pthread_save_CFLAGS="$CFLAGS" -+ ax_pthread_save_LIBS="$LIBS" -+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -+ LIBS="$PTHREAD_LIBS $LIBS" -+ -+ # Check for various functions. We must include pthread.h, -+ # since some functions may be macros. (On the Sequent, we -+ # need a special flag -Kthread to make this header compile.) -+ # We check for pthread_join because it is in -lpthread on IRIX -+ # while pthread_create is in libc. We check for pthread_attr_init -+ # due to DEC craziness with -lpthreads. We check for -+ # pthread_cleanup_push because it is one of the few pthread -+ # functions on Solaris that doesn't have a non-functional libc stub. -+ # We try pthread_create on general principles. -+ -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> -+# if $ax_pthread_check_cond -+# error "$ax_pthread_check_macro must be defined" -+# endif -+ static void *some_global = NULL; -+ static void routine(void *a) -+ { -+ /* To avoid any unused-parameter or -+ unused-but-set-parameter warning. */ -+ some_global = a; -+ } -+ static void *start_routine(void *a) { return a; }], -+ [pthread_t th; pthread_attr_t attr; -+ pthread_create(&th, 0, start_routine, 0); -+ pthread_join(th, 0); -+ pthread_attr_init(&attr); -+ pthread_cleanup_push(routine, 0); -+ pthread_cleanup_pop(0) /* ; */])], -+ [ax_pthread_ok=yes], -+ []) -+ -+ CFLAGS="$ax_pthread_save_CFLAGS" -+ LIBS="$ax_pthread_save_LIBS" -+ -+ AC_MSG_RESULT([$ax_pthread_ok]) -+ AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) -+ -+ PTHREAD_LIBS="" -+ PTHREAD_CFLAGS="" -+done -+fi - --ax_pthread_clang_warning=no - - # Clang needs special handling, because older versions handle the -pthread - # option in a rather... idiosyncratic way -@@ -261,11 +358,6 @@ if test "x$ax_pthread_clang" = "xyes"; then - # -pthread does define _REENTRANT, and while the Darwin headers - # ignore this macro, third-party headers might not.) - -- PTHREAD_CFLAGS="-pthread" -- PTHREAD_LIBS= -- -- ax_pthread_ok=yes -- - # However, older versions of Clang make a point of warning the user - # that, in an invocation where only linking and no compilation is - # taking place, the -pthread option has no effect ("argument unused -@@ -320,78 +412,7 @@ if test "x$ax_pthread_clang" = "xyes"; then - - fi # $ax_pthread_clang = yes - --if test "x$ax_pthread_ok" = "xno"; then --for ax_pthread_try_flag in $ax_pthread_flags; do -- -- case $ax_pthread_try_flag in -- none) -- AC_MSG_CHECKING([whether pthreads work without any flags]) -- ;; -- -- -mt,pthread) -- AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) -- PTHREAD_CFLAGS="-mt" -- PTHREAD_LIBS="-lpthread" -- ;; -- -- -*) -- AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) -- PTHREAD_CFLAGS="$ax_pthread_try_flag" -- ;; -- -- pthread-config) -- AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) -- AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) -- PTHREAD_CFLAGS="`pthread-config --cflags`" -- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" -- ;; - -- *) -- AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) -- PTHREAD_LIBS="-l$ax_pthread_try_flag" -- ;; -- esac -- -- ax_pthread_save_CFLAGS="$CFLAGS" -- ax_pthread_save_LIBS="$LIBS" -- CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -- LIBS="$PTHREAD_LIBS $LIBS" -- -- # Check for various functions. We must include pthread.h, -- # since some functions may be macros. (On the Sequent, we -- # need a special flag -Kthread to make this header compile.) -- # We check for pthread_join because it is in -lpthread on IRIX -- # while pthread_create is in libc. We check for pthread_attr_init -- # due to DEC craziness with -lpthreads. We check for -- # pthread_cleanup_push because it is one of the few pthread -- # functions on Solaris that doesn't have a non-functional libc stub. -- # We try pthread_create on general principles. -- -- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> --# if $ax_pthread_check_cond --# error "$ax_pthread_check_macro must be defined" --# endif -- static void routine(void *a) { a = 0; } -- static void *start_routine(void *a) { return a; }], -- [pthread_t th; pthread_attr_t attr; -- pthread_create(&th, 0, start_routine, 0); -- pthread_join(th, 0); -- pthread_attr_init(&attr); -- pthread_cleanup_push(routine, 0); -- pthread_cleanup_pop(0) /* ; */])], -- [ax_pthread_ok=yes], -- []) -- -- CFLAGS="$ax_pthread_save_CFLAGS" -- LIBS="$ax_pthread_save_LIBS" -- -- AC_MSG_RESULT([$ax_pthread_ok]) -- AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) -- -- PTHREAD_LIBS="" -- PTHREAD_CFLAGS="" --done --fi - - # Various other checks: - if test "x$ax_pthread_ok" = "xyes"; then -@@ -438,7 +459,8 @@ if test "x$ax_pthread_ok" = "xyes"; then - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], -- [[int i = PTHREAD_PRIO_INHERIT;]])], -+ [[int i = PTHREAD_PRIO_INHERIT; -+ return i;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) - ]) --- -2.26.0.windows.1 - ===================================== contrib/src/harfbuzz/0003-Removed-unused-variable-supp_size-from-plan_subset_e.patch deleted ===================================== @@ -1,43 +0,0 @@ -From 17941ecf29c23f996dcbffd06525f3e0e5ac0412 Mon Sep 17 00:00:00 2001 -From: Andi-Bogdan Postelnicu <[email protected]> -Date: Wed, 2 Jun 2021 14:08:11 +0300 -Subject: [PATCH 3/3] Removed unused variable `supp_size` from - plan_subset_encoding(...). - -(cherry picked from commit 243d056ff1c2af583ceb67e5dfbfaac51dc96e63) ---- - src/hb-subset-cff1.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc -index df322f845..35dae7b1f 100644 ---- a/src/hb-subset-cff1.cc -+++ b/src/hb-subset-cff1.cc -@@ -402,7 +402,7 @@ struct cff_subset_plan { - void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) - { - const Encoding *encoding = acc.encoding; -- unsigned int size0, size1, supp_size; -+ unsigned int size0, size1; - hb_codepoint_t code, last_code = CFF_UNDEF_CODE; - hb_vector_t<hb_codepoint_t> supp_codes; - -@@ -412,7 +412,6 @@ struct cff_subset_plan { - return; - } - -- supp_size = 0; - supp_codes.init (); - - subset_enc_num_codes = plan->num_output_glyphs () - 1; -@@ -448,7 +447,6 @@ struct cff_subset_plan { - code_pair_t pair = { supp_codes[i], sid }; - subset_enc_supp_codes.push (pair); - } -- supp_size += SuppEncoding::static_size * supp_codes.length; - } - } - supp_codes.fini (); --- -2.25.1 - ===================================== contrib/src/harfbuzz/SHA512SUMS ===================================== @@ -1 +1 @@ -d2af6a768c397c664f654cf36140e7b5696b3b983f637454604570c348247f7ffea135048d9b02cf6593cbde728567e31bf82a39df5ff38d680c78dff24d4cf0 harfbuzz-2.7.4.tar.xz +c9d88068d8017046842f444f02f31dbae109026ede943aaf265db5508de8b4b2be84203950f274a237f515bf7cbd361629d2032c6e8ee8f50354b430bba3a8ca harfbuzz-3.2.0.tar.xz ===================================== contrib/src/harfbuzz/rules.mak ===================================== @@ -1,6 +1,6 @@ # HARFBUZZ -HARFBUZZ_VERSION := 2.7.4 +HARFBUZZ_VERSION := 3.2.0 HARFBUZZ_URL := https://github.com/harfbuzz/harfbuzz/releases/download/$(HARFBUZZ_VERSION)/harfbuzz-$(HARFBUZZ_VERSION).tar.xz PKGS += harfbuzz ifeq ($(call need_pkg,"harfbuzz"),) @@ -14,22 +14,23 @@ $(TARBALLS)/harfbuzz-$(HARFBUZZ_VERSION).tar.xz: harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.xz .sum-harfbuzz $(UNPACK) - $(APPLY) $(SRC)/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch - $(APPLY) $(SRC)/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch - $(APPLY) $(SRC)/harfbuzz/0003-Removed-unused-variable-supp_size-from-plan_subset_e.patch + $(APPLY) $(SRC)/harfbuzz/0001-meson-Enable-big-objects-support-when-building-for-w.patch $(MOVE) DEPS_harfbuzz = freetype2 $(DEPS_freetype2) -HARFBUZZ_CONF := --with-freetype \ - --without-glib +HARFBUZZ_CONF := -Dfreetype=enabled \ + -Dglib=disabled \ + -Dgobject=disabled \ + -Ddocs=disabled \ + -Dtests=disabled ifdef HAVE_DARWIN_OS -HARFBUZZ_CONF += --with-coretext +HARFBUZZ_CONF += -Dcoretext=enabled endif -.harfbuzz: harfbuzz - $(RECONF) - cd $< && $(HOSTVARS_PIC) ./configure $(HOSTCONF) $(HARFBUZZ_CONF) ICU_CONFIG=false - cd $< && $(MAKE) install +.harfbuzz: harfbuzz crossfile.meson + cd $< && rm -rf ./build + cd $< && $(HOSTVARS_MESON) $(MESON) $(HARFBUZZ_CONF) build + cd $< && cd build && ninja install touch $@ View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1649e121586f4bfd0f9f430d6f07e423a7eedc7d...02eb6943cb8c8b548fcb93be050be07925b5b960 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1649e121586f4bfd0f9f430d6f07e423a7eedc7d...02eb6943cb8c8b548fcb93be050be07925b5b960 You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
