Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
cf5ce9db by Jean-Baptiste Kempf at 2025-08-15T14:28:40+03:00
Contribs: update gettext to 0.21

(cherry picked from commit 5494afa0e9df55cd92982e81e516c2e26e965be8)

- - - - -
3ad5c847 by Martin Storsjö at 2025-08-15T14:28:40+03:00
contrib: gettext: Backport a gnulib patch to fix building on Clang 16

Clang 16 made implicit function pointer conversions in C an error
(which previously was only a warning).

This backports the following change from upstream gnulib
to the version of the files bundled in gettext:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/obstack.c?id=0cc39712803ade7b2d4b89c36b143dad72404063

This fixes errors like these:

    obstack.c:351:31: error: incompatible function pointer types initializing 
'void (*)(void) __attribute__((noreturn))' with an expression of type 
'void (void)' [-Wincompatible-function-pointer-types]
    __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
                                  ^

(cherry picked from commit 2afe251d735b03c030dcd227a9a51fc7d426b7c0)

- - - - -
e1773414 by Steve Lhomme at 2025-08-15T14:28:40+03:00
contrib: gettext: remove extra CFLAGS with no extra

It's already part of HOSTVARS.

(cherry picked from commit 6fa63706dfedd77f28a8b3396d76bf951cfe8641)

- - - - -
cd508c06 by Steve Lhomme at 2025-08-15T14:28:40+03:00
contrib: update gettext to 0.22

(cherry picked from commit dd4338525b711433d057e7f9c512835ca926f632)

- - - - -
159c7142 by Steve Lhomme at 2025-08-15T14:28:40+03:00
contrib: gettext: don't build libasprintf on Linux/mingw-w64

They have native support for it.

(cherry picked from commit 07bca76d365a53239a8fb563505235aa46742e99)

- - - - -
3aba712d by Steve Lhomme at 2025-08-15T14:28:40+03:00
contrib: gettext: add local unistd to reuse textstyle.h

On Windows fsync is not declared, we need a header that declares it,
from gnulib.

(cherry picked from commit 3dac9ffa929a1a517e9b29df22c96f55259156a8)

- - - - -
c738b90e by Steve Lhomme at 2025-08-15T14:29:21+03:00
contrib: gettext: update to 0.22.5

(cherry picked from commit c548ff625dd81940d633fe97f8d7592869ae32d7)

- - - - -
8040ca6f by Martin Storsjö at 2025-08-15T14:29:43+03:00
contrib: gettext: Fix building for older macOS versions

Work around the fact that gettext/gnulib tests for functions
without using headers, by manually marking a bunch of functions
as unavailable.

The function openat is extra tricky, because the gnulib functions
themselves unconditionally use openat (expecting to either get it
from the system, or from a gnulib polyfill). When using that,
it would see both declarations of openat, both from the system headers
and from gnulib. In that case the system headers still indicated that
the function is unavailable on 10.7.

Rename the function while including the system header, so that we
only see the gnulib replacement declaration.

- - - - -
49307128 by Steve Lhomme at 2025-08-18T14:10:39+03:00
contrib: gettext: don't build command-line tools when cross-compiling

We may need a separate target for the native tools.

(cherry picked from commit 5b154d9b0e6a16ba96160d11ce0490b1dec9ad78)

- - - - -


5 changed files:

- − 
contrib/src/gettext/0001-libasprintf-On-mingw-really-use-our-vasprintf-functi.patch
- − 
contrib/src/gettext/0002-libasprintf-Avoid-compilation-error-on-mingw-with-D_.patch
- contrib/src/gettext/SHA512SUMS
- + contrib/src/gettext/gettext-0.22.5-gnulib-rename-real-openat.patch
- contrib/src/gettext/rules.mak


Changes:

=====================================
contrib/src/gettext/0001-libasprintf-On-mingw-really-use-our-vasprintf-functi.patch
 deleted
=====================================
@@ -1,105 +0,0 @@
-From 69105728ea5e1ce289498865b81e5ffeacebd840 Mon Sep 17 00:00:00 2001
-From: Bruno Haible <br...@clisp.org>
-Date: Sun, 25 Nov 2018 02:10:44 +0100
-Subject: [PATCH 1/2] libasprintf: On mingw, really use our vasprintf function,
- not mingw_vasprintf.
-
-mingw now has a definition of 'vasprintf' in <stdio.h> that redirects to
-mingw_vasprintf, which does not support argument reordering (i.e.
-HAVE_POSIX_PRINTF is not defined). Make sure to avoid this function and use
-the one defined in our lib-asprintf.c instead.
-
-* gettext-runtime/libasprintf/lib-asprintf.h (asprintf): Define as macro
-redirecting to libasprintf_asprintf.
-(vasprintf): Define as macro redirecting to libasprintf_vasprintf.
-* gettext-runtime/libasprintf/lib-asprintf.c: Define also libasprintf_asprintf
-and libasprintf_vasprintf.
-* gettext-runtime/libasprintf/autosprintf.cc: Include lib-asprintf.h last.
-
-(cherry picked from commit 63295aac24c693d2d902eadd272259b7bdd7eae3)
----
- gettext-runtime/libasprintf/autosprintf.cc |  5 ++++-
- gettext-runtime/libasprintf/lib-asprintf.c | 13 ++++++++++++-
- gettext-runtime/libasprintf/lib-asprintf.h |  7 ++++++-
- 3 files changed, 22 insertions(+), 3 deletions(-)
-
-diff --git a/gettext-runtime/libasprintf/autosprintf.cc 
b/gettext-runtime/libasprintf/autosprintf.cc
-index 0c8bff1f1..57295aebd 100644
---- a/gettext-runtime/libasprintf/autosprintf.cc
-+++ b/gettext-runtime/libasprintf/autosprintf.cc
-@@ -28,7 +28,6 @@
- #include <stdarg.h>
- #include <stdlib.h>
- #include <string.h>
--#include "lib-asprintf.h"
- 
- /* std::swap() is in <utility> since C++11.  */
- #if __cplusplus >= 201103L
-@@ -37,6 +36,10 @@
- # include <algorithm>
- #endif
- 
-+/* This include must come last, since it contains overrides of functions that
-+   the system may provide (namely, vasprintf).  */
-+#include "lib-asprintf.h"
-+
- namespace gnu
- {
- 
-diff --git a/gettext-runtime/libasprintf/lib-asprintf.c 
b/gettext-runtime/libasprintf/lib-asprintf.c
-index afa04dda8..927fe7779 100644
---- a/gettext-runtime/libasprintf/lib-asprintf.c
-+++ b/gettext-runtime/libasprintf/lib-asprintf.c
-@@ -1,5 +1,5 @@
- /* Library functions for class autosprintf.
--   Copyright (C) 2002-2003, 2006, 2015-2016 Free Software Foundation, Inc.
-+   Copyright (C) 2002-2003, 2006, 2018 Free Software Foundation, Inc.
-    Written by Bruno Haible <br...@clisp.org>, 2002.
- 
-    This program is free software: you can redistribute it and/or modify
-@@ -31,8 +31,19 @@
- #include "vasnprintf.c"
- #include "asnprintf.c"
- 
-+/* Define to the same symbols as in lib-asprintf.h.  */
-+#define asprintf libasprintf_asprintf
-+#define vasprintf libasprintf_vasprintf
-+
- /* Define functions declared in "vasprintf.h".  */
- #include "vasprintf.c"
- #include "asprintf.c"
- 
-+/* Define the same functions also without the 'libasprintf_' prefix,
-+   for binary backward-compatibility.  */
-+#undef asprintf
-+#undef vasprintf
-+#include "vasprintf.c"
-+#include "asprintf.c"
-+
- #endif
-diff --git a/gettext-runtime/libasprintf/lib-asprintf.h 
b/gettext-runtime/libasprintf/lib-asprintf.h
-index 22874f289..c55c988c8 100644
---- a/gettext-runtime/libasprintf/lib-asprintf.h
-+++ b/gettext-runtime/libasprintf/lib-asprintf.h
-@@ -1,5 +1,5 @@
- /* Library functions for class autosprintf.
--   Copyright (C) 2002-2003, 2015-2016 Free Software Foundation, Inc.
-+   Copyright (C) 2002-2003, 2018 Free Software Foundation, Inc.
-    Written by Bruno Haible <br...@clisp.org>, 2002.
- 
-    This program is free software: you can redistribute it and/or modify
-@@ -26,6 +26,11 @@
- 
- #else
- 
-+/* Define to symbols that are guaranteed to not be defined by the system
-+   header files.  */
-+#define asprintf libasprintf_asprintf
-+#define vasprintf libasprintf_vasprintf
-+
- /* Get asprintf(), vasprintf() declarations.  */
- #include "vasprintf.h"
- 
--- 
-2.17.1
-


=====================================
contrib/src/gettext/0002-libasprintf-Avoid-compilation-error-on-mingw-with-D_.patch
 deleted
=====================================
@@ -1,43 +0,0 @@
-From 27b39c7a632b85966bbe0776e6a6e2d34fcee018 Mon Sep 17 00:00:00 2001
-From: Bruno Haible <br...@clisp.org>
-Date: Sat, 18 May 2019 17:25:10 +0200
-Subject: [PATCH 2/2] libasprintf: Avoid compilation error on mingw with
- -D__USE_MINGW_ANSI_STDIO=1.
-
-* gettext-runtime/libasprintf/lib-asprintf.c (asprintf, vasprintf): Don't 
define
-on mingw when __USE_MINGW_ANSI_STDIO is non-zero.
-
-(cherry picked from commit ca6f6cfbb4c78c063f2a50bb758edfc95c9d64a2)
----
- gettext-runtime/libasprintf/lib-asprintf.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/gettext-runtime/libasprintf/lib-asprintf.c 
b/gettext-runtime/libasprintf/lib-asprintf.c
-index 927fe7779..93d75bcf7 100644
---- a/gettext-runtime/libasprintf/lib-asprintf.c
-+++ b/gettext-runtime/libasprintf/lib-asprintf.c
-@@ -1,5 +1,5 @@
- /* Library functions for class autosprintf.
--   Copyright (C) 2002-2003, 2006, 2018 Free Software Foundation, Inc.
-+   Copyright (C) 2002-2003, 2006, 2018-2019 Free Software Foundation, Inc.
-    Written by Bruno Haible <br...@clisp.org>, 2002.
- 
-    This program is free software: you can redistribute it and/or modify
-@@ -40,10 +40,13 @@
- #include "asprintf.c"
- 
- /* Define the same functions also without the 'libasprintf_' prefix,
--   for binary backward-compatibility.  */
-+   for binary backward-compatibility.
-+   But don't redefine functions already defined by mingw.  */
-+#if !(defined __MINGW32__ && __USE_MINGW_ANSI_STDIO)
- #undef asprintf
- #undef vasprintf
- #include "vasprintf.c"
- #include "asprintf.c"
-+#endif
- 
- #endif
--- 
-2.17.1
-


=====================================
contrib/src/gettext/SHA512SUMS
=====================================
@@ -1 +1 @@
-073042fa2dc48804c58e76f036130a669e19612c25427b0ab14d0b366b549a63751bf3af03bfd0745d7c4f72497a4b2aab26a3cc6de83189ce111679073878e1
  gettext-0.19.8.1.tar.gz
+d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be
  gettext-0.22.5.tar.gz


=====================================
contrib/src/gettext/gettext-0.22.5-gnulib-rename-real-openat.patch
=====================================
@@ -0,0 +1,13 @@
+diff -urN gettext-0.22.5-orig/gettext-tools/gnulib-lib/unistd.in.h 
gettext-0.22.5/gettext-tools/gnulib-lib/unistd.in.h
+--- gettext-0.22.5-orig/gettext-tools/gnulib-lib/unistd.in.h   2024-02-21 
12:44:25
++++ gettext-0.22.5/gettext-tools/gnulib-lib/unistd.in.h        2025-08-15 
14:19:45
+@@ -52,7 +52,9 @@
+ # endif
+ # if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \
+       || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000)
++#define openat real_openat
+ #  include <sys/fcntl.h> /* It also defines the two macros.  */
++#undef openat
+ #  undef SEEK_DATA
+ #  undef SEEK_HOLE
+ # endif


=====================================
contrib/src/gettext/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # gettext
-GETTEXT_VERSION := 0.19.8.1
+GETTEXT_VERSION := 0.22.5
 GETTEXT_URL := $(GNU)/gettext/gettext-$(GETTEXT_VERSION).tar.gz
 
 PKGS += gettext
@@ -13,39 +13,85 @@ $(TARBALLS)/gettext-$(GETTEXT_VERSION).tar.gz:
 
 .sum-gettext: gettext-$(GETTEXT_VERSION).tar.gz
 
+GETTEXT_TOOLS_DIRS := gettext-runtime/src gettext-tools/src
+
 gettext: gettext-$(GETTEXT_VERSION).tar.gz .sum-gettext
        $(UNPACK)
+       $(APPLY) $(SRC)/gettext/gettext-0.22.5-gnulib-rename-real-openat.patch
        $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub 
build-aux
-       $(APPLY) 
$(SRC)/gettext/0001-libasprintf-On-mingw-really-use-our-vasprintf-functi.patch
-       $(APPLY) 
$(SRC)/gettext/0002-libasprintf-Avoid-compilation-error-on-mingw-with-D_.patch
+       # disable libtextstyle
+       sed -i.orig -e 's,gettext-runtime libtextstyle 
gettext-tools,gettext-runtime gettext-tools,g' $(UNPACK_DIR)/configure
+       sed -i.orig -e 's,gettext-runtime libtextstyle 
gettext-tools,gettext-runtime gettext-tools,g' $(UNPACK_DIR)/Makefile.in
+       sed -i.orig -e 's,ENABLE_COLOR 1,ENABLE_COLOR 0,g' 
$(UNPACK_DIR)/gettext-tools/src/write-catalog.c
+       # disable gettext-tools examples configure
+       sed -i.orig -e "s,ac_subdirs_all='examples',ac_subdirs_all=," 
$(UNPACK_DIR)/gettext-tools/configure
+       sed -i.orig -e 's, examples",",' $(UNPACK_DIR)/gettext-tools/configure
+       # disable gettext-tools tests/samples
+       sed -i.orig -e 's,tests system-tests gnulib-tests examples doc,,' 
$(UNPACK_DIR)/gettext-tools/Makefile.in
+       # disable useless gettext-runtime targets
+       sed -i.orig -e 's,doc ,,' $(UNPACK_DIR)/gettext-runtime/Makefile.in
+       sed -i.orig -e 's,po man m4 tests,,' 
$(UNPACK_DIR)/gettext-runtime/Makefile.in
+       sed -i.orig -e 's,doc ,,' $(UNPACK_DIR)/gettext-runtime/Makefile.in
+ifdef HAVE_CROSS_COMPILE
+       # disable cross-compiled command line tools that can't be run
+       sed -i.orig -e 's,install-binPROGRAMS install-exec-local,,' 
$(UNPACK_DIR)/gettext-tools/src/Makefile.in
+       for subdir in $(GETTEXT_TOOLS_DIRS); do \
+           sed -i.orig -e 's,^bin_PROGRAMS = ,bin_PROGRAMS_disabled = ,g' 
$(UNPACK_DIR)/$$subdir/Makefile.in && \
+           sed -i.orig -e 's,^noinst_PROGRAMS = ,noinst_PROGRAMS_disabled = 
,g' $(UNPACK_DIR)/$$subdir/Makefile.in; done
+endif
        $(MOVE)
 
 DEPS_gettext = iconv $(DEPS_iconv) libxml2 $(DEPS_libxml2)
 
-GETTEXT_CFLAGS := $(CFLAGS)
 GETTEXT_CONF = \
        --disable-relocatable \
        --disable-java \
        --disable-native-java \
+       --disable-csharp \
        --without-emacs \
-       --without-included-libxml
+       --without-included-libxml \
+       --with-installed-libtextstyle \
+       --without-libtextstyle-prefix \
+       --without-git
+
 ifdef HAVE_WIN32
 GETTEXT_CONF += --disable-threads
-GETTEXT_CFLAGS += -DLIBXML_STATIC
+endif
+ifdef HAVE_LINUX
+GETTEXT_CONF += --disable-libasprintf
+endif
+ifdef HAVE_MINGW_W64
+GETTEXT_CONF += --disable-libasprintf
+endif
+ifdef HAVE_MACOSX
+# Mark functions as missing. Gettext/gnulib checks for functions without
+# using headers (which would make them unavailable with
+# -Werror=partial-availability), so we need to manually mark them unavailable.
+# These are unavailable in macOS 10.7.
+GETTEXT_CONF += \
+    ac_cv_func_clock_gettime=no \
+    ac_cv_func_faccessat=no \
+    ac_cv_func_fdopendir=no \
+    ac_cv_func_futimens=no \
+    ac_cv_func_memset_s=no \
+    ac_cv_func_openat=no \
+    ac_cv_func_utimensat=no
 endif
 
 .gettext: gettext
-       cd $< && $(HOSTVARS) ./configure $(HOSTCONF) CFLAGS="$(GETTEXT_CFLAGS)" 
$(GETTEXT_CONF)
+       cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(GETTEXT_CONF)
+       $(MAKE) -C $< -C gettext-runtime
 ifndef HAVE_ANDROID
-       $(MAKE) -C $< install
+       # build libgettextpo first so we can use its textstyle.h and unistd.h 
(fsync)
+       $(MAKE) -C $< -C gettext-tools -C libgettextpo
+       cd $< && cp gettext-tools/libgettextpo/textstyle.h 
gettext-tools/src/textstyle.h
+       cd $< && cp gettext-tools/libgettextpo/unistd.h    
gettext-tools/src/unistd.h
+       $(MAKE) -C $< -C gettext-tools
+       $(MAKE) -C $< -C gettext-tools install
 else
-       $(MAKE) -C $< -C gettext-runtime install
-       $(MAKE) -C $< -C gettext-tools/intl
+       # Android 32bits does not have localeconv
        $(MAKE) -C $< -C gettext-tools/misc install
        $(MAKE) -C $< -C gettext-tools/m4 install
 endif
-ifdef HAVE_MACOSX
-       # detect libintl correctly in configure for static library
-       sed -i.orig  's/$$LIBS $$LIBINTL/$$LIBS $$LIBINTL $$INTL_MACOSX_LIBS/' 
"$(PREFIX)"/share/aclocal/gettext.m4
-endif
+       cd $< && $(MAKE) -C gettext-runtime install
        touch $@



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0c74bb94ad352da2794ccc5b65fcd6120a917e54...49307128534c4bb3a554734ac40e32bd2d04a80d

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0c74bb94ad352da2794ccc5b65fcd6120a917e54...49307128534c4bb3a554734ac40e32bd2d04a80d
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to