Compare commits

...
Sign in to create a new pull request.

13 commits

Author SHA1 Message Date
matiwari
98705c64dd stdcountof-h tests: Fix compilation error with gcc-16 2026-01-13 14:01:08 +05:30
matiwari
bb34f17628 Fix build failure with glibc 2.42 C23 const-preserving macros 2025-12-18 21:31:07 +05:30
matiwari
a40f3de97f Update to release 0.26 2025-08-19 23:15:33 +05:30
Fedora Release Engineering
c94ec5b16a Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 21:17:40 +00:00
matiwari
7e8960bf76 Update to release 0.25.1 2025-07-23 13:39:04 +05:30
matiwari
9b44db8d21 Update to 0.25 release 2025-05-14 08:58:54 +05:30
matiwari
74ac9f07a1 Update to 0.24 release 2025-03-07 18:07:11 +05:30
Fedora Release Engineering
9f7d174856 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 19:50:07 +00:00
matiwari
f92414c279 Update to 0.23.1 release 2025-01-01 16:26:09 +05:30
matiwari
ec95bbdbda Use lowercase boolean in SPDX expression to avoid mixed case 2024-12-21 13:12:36 +05:30
matiwari
368c0cc283 Update to 0.23 release 2024-12-16 13:03:43 +05:30
Fedora Release Engineering
057981b371 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 00:29:00 +00:00
matiwari
1a3bc0afb5 CI tests migration to tmt 2024-07-16 06:55:57 +05:30
12 changed files with 866 additions and 155 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

View file

@ -1,110 +0,0 @@
diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac
--- gettext-0.22.4.orig/configure.ac 2022-10-09 08:05:42.000000000 +0530
+++ gettext-0.22.4/configure.ac 2024-02-13 12:47:32.099238869 +0530
@@ -37,7 +37,7 @@
dnl Checks for library functions.
-AC_CONFIG_SUBDIRS([gettext-runtime libtextstyle gettext-tools])
+AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools])
AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po])
@@ -49,7 +49,7 @@
dnl Optional Features: AC_ARG_ENABLE calls
dnl Optional Packages: AC_ARG_WITH calls
dnl Some influential environment variables: AC_ARG_VAR calls
-esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
+esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
AC_CONFIG_FILES([Makefile])
diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h
--- gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-09-19 02:06:31.000000000 +0530
+++ gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h 2024-02-13 13:04:15.238643775 +0530
@@ -254,8 +254,9 @@
static inline file_ostream_t
file_ostream_create (FILE *fp)
-{
- return fp;
+{
+ /* Closing the stream we return should not close 'fp'. */
+ return fdopen (dup (fileno (fp)), "w");
}
static inline bool
@@ -676,10 +677,10 @@
static inline noop_styled_ostream_t
noop_styled_ostream_create (ostream_t destination, bool pass_ownership)
{
- if (!pass_ownership)
- /* Not supported without the real libtextstyle. */
- abort ();
- return destination;
+ if (pass_ownership)
+ return destination;
+ else
+ return fdopen (dup (fileno (destination)), "w");
}
static inline bool
diff -ur gettext-0.22.4.orig/gettext-tools/Makefile.am gettext-0.22.4/gettext-tools/Makefile.am
--- gettext-0.22.4.orig/gettext-tools/Makefile.am 2023-09-19 01:38:31.000000000 +0530
+++ gettext-0.22.4/gettext-tools/Makefile.am 2024-02-13 12:49:27.145661060 +0530
@@ -19,7 +19,7 @@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
-SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
+SUBDIRS = gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
EXTRA_DIST = misc/DISCLAIM
MOSTLYCLEANFILES = core *.stackdump
diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettext-tools/src/Makefile.am
--- gettext-0.22.4.orig/gettext-tools/src/Makefile.am 2023-11-17 17:14:38.000000000 +0530
+++ gettext-0.22.4/gettext-tools/src/Makefile.am 2024-02-13 13:06:34.194367930 +0530
@@ -311,19 +311,9 @@
cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML)
cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
-if USE_INSTALLED_LIBTEXTSTYLE
-LT_LIBTEXTSTYLE = @LTLIBTEXTSTYLE@
-else
-# How to get the include files of libtextstyle.
-textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
- here=`pwd`; \
- cd ../../libtextstyle/lib && \
- $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
-BUILT_SOURCES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
-MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
-# Where to find the built libtextstyle library.
-LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la
-endif
+# Use the dummy libtextstyle from gnulib, as libgettextpo does.
+LT_LIBTEXTSTYLE =
+AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo
# How to build libgettextsrc.la.
# Need ../gnulib-lib/libgettextlib.la.
diff -ur gettext-0.22.4.orig/Makefile.am gettext-0.22.4/Makefile.am
--- gettext-0.22.4.orig/Makefile.am 2023-11-17 17:39:11.000000000 +0530
+++ gettext-0.22.4/Makefile.am 2024-02-13 12:44:18.309841774 +0530
@@ -19,7 +19,7 @@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools
+SUBDIRS = gnulib-local gettext-runtime gettext-tools
changelog_etc = \
gettext-runtime/ChangeLog.0 \
@@ -87,7 +87,7 @@
cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4
cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man
cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in
- cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4
+# cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4
cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java
cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class
# Verify that all files have appropriate copyright headers.

486
gettext-0.26-c23.diff Normal file
View file

@ -0,0 +1,486 @@
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h 2025-07-08 10:54:38.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h 2025-07-08 10:54:38.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.891299356 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h 2025-07-08 10:54:38.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.399876581 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.892299363 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.401876594 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.889299343 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.397876567 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-tools/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.896299390 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h 2025-07-08 10:54:40.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.404876615 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/gnulib-tests/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h
--- gettext-0.26/gettext-tools/gnulib-tests/c++defs.h 2025-07-08 10:54:40.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/libgettextpo/c++defs.h gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h
--- gettext-0.26/gettext-tools/libgettextpo/c++defs.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h
--- gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h 2025-12-18 13:05:15.899299410 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-tools/libgettextpo/wchar.in.h gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h
--- gettext-0.26/gettext-tools/libgettextpo/wchar.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h 2025-12-18 13:04:13.407876635 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.897299397 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.406876628 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h 2025-07-08 10:55:10.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/libtextstyle/lib/c++defs.h gettext-0.26-patched/libtextstyle/lib/c++defs.h
--- gettext-0.26/libtextstyle/lib/c++defs.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/libtextstyle/lib/stdlib.in.h gettext-0.26-patched/libtextstyle/lib/stdlib.in.h
--- gettext-0.26/libtextstyle/lib/stdlib.in.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/lib/stdlib.in.h 2025-12-18 13:05:15.894299376 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/libtextstyle/lib/wchar.in.h gettext-0.26-patched/libtextstyle/lib/wchar.in.h
--- gettext-0.26/libtextstyle/lib/wchar.in.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/lib/wchar.in.h 2025-12-18 13:04:13.402876601 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/libtextstyle/tests/c++defs.h gettext-0.26-patched/libtextstyle/tests/c++defs.h
--- gettext-0.26/libtextstyle/tests/c++defs.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func

View file

@ -0,0 +1,25 @@
diff -ur gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c
--- gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c 2025-07-08 14:24:40.000000000 +0530
+++ gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c 2026-01-13 13:07:35.226196031 +0530
@@ -42,17 +42,21 @@
(void) local_bounded;
+#ifdef _gl_verify_is_array
(void) _gl_verify_is_array (unbounded);
(void) _gl_verify_is_array (bounded);
(void) _gl_verify_is_array (multidimensional);
+#endif
ASSERT (countof (bounded) == 10);
ASSERT (countof (multidimensional) == 10);
ASSERT (countof (local_bounded) == 20);
#if 0 /* These produce compilation errors. */
+#ifdef _gl_verify_is_array
(void) _gl_verify_is_array (integer);
(void) _gl_verify_is_array (parameter);
+#endif
ASSERT (countof (integer) >= 0);
ASSERT (countof (unbounded) >= 0);

View file

@ -1,11 +1,14 @@
%bcond_with jar
%bcond_with java
%bcond libtextstyle %[0%{?fedora} >= 40]
# Disabled lto flags on i686 to avoid lto memory allocation error
%ifarch i686
%global _lto_cflags %{nil}
%endif
Summary: GNU tools and libraries for localized translated messages
Name: gettext
Version: 0.22.5
Release: 4%{?dist}
Version: 0.26
Release: 3%{?dist}
# The following are licensed under LGPLv2+:
# - libintl and its headers
@ -20,15 +23,15 @@ Release: 4%{?dist}
# - libasprintf info files
# - libtextstyle info files
# Everything else is GPLv3+
License: GPL-3.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-or-later
License: GPL-3.0-or-later and LGPL-2.0-or-later and GFDL-1.2-or-later
URL: https://www.gnu.org/software/gettext/
Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz
Source2: msghack.py
Source3: msghack.1
Patch1: gettext-0.21.1-covscan.patch
Patch2: gettext-0.22-disable-libtextstyle.patch
Patch2: gettext-0.26-c23.diff
Patch3: gettext-0.26-stdcountof-h.patch
# for bootstrapping
# BuildRequires: autoconf >= 2.62
BuildRequires: automake
@ -74,9 +77,7 @@ BuildRequires: glibc-langpack-zh
BuildRequires: make
Provides: bundled(gnulib)
Requires: %{name}-runtime = %{version}-%{release}
%if %{with libtextstyle}
Requires: libtextstyle%{?_isa} = %{version}-%{release}
%endif
%description
The GNU gettext package provides a set of tools and documentation for
@ -93,7 +94,7 @@ programs.
%package runtime
Summary: GNU runtime libraries and programs for producing multi-lingual messages
License: GPL-3.0-or-later AND LGPL-2.0-or-later
License: GPL-3.0-or-later and LGPL-2.0-or-later
# Depend on the exact version of the library sub package
Requires: %{name}-libs%{_isa} = %{version}-%{release}
Requires: %{name}-envsubst = %{version}-%{release}
@ -121,7 +122,7 @@ Summary: Development files for %{name}
# autopoint is GPLv3+
# libasprintf is LGPLv2+
# libgettextpo is GPLv3+
License: LGPL-2.0-or-later AND GPL-3.0-or-later AND GFDL-1.2-or-later
License: LGPL-2.0-or-later and GPL-3.0-or-later and GFDL-1.2-or-later
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-common-devel = %{version}-%{release}
@ -129,9 +130,6 @@ Requires: xz
Requires: diffutils
Obsoletes: gettext-autopoint < 0.18.1.1-3
Provides: gettext-autopoint = %{version}-%{release}
%if %{without libtextstyle}
Obsoletes: libtextstyle-devel < %{version}-%{release}
%endif
%description devel
This package contains all development related files necessary for
@ -144,18 +142,12 @@ want to add gettext support for your project.
Summary: Libraries for %{name}
# libasprintf is LGPLv2+
# libgettextpo is GPLv3+
License: LGPL-2.0-or-later AND GPL-3.0-or-later
%if %{with libtextstyle}
License: LGPL-2.0-or-later and GPL-3.0-or-later
Requires: libtextstyle%{?_isa} = %{version}-%{release}
%endif
%if %{without libtextstyle}
Obsoletes: libtextstyle < %{version}-%{release}
%endif
%description libs
This package contains libraries used internationalization support.
%if %{with libtextstyle}
%package -n libtextstyle
Summary: Text styling library
License: GPL-3.0-or-later
@ -166,14 +158,13 @@ emulator.
%package -n libtextstyle-devel
Summary: Development files for libtextstyle
License: GPL-3.0-or-later AND GFDL-1.2-or-later
License: GPL-3.0-or-later and GFDL-1.2-or-later
Requires: libtextstyle%{?_isa} = %{version}-%{release}
%description -n libtextstyle-devel
This package contains all development related files necessary for
developing or compiling applications/libraries that needs text
styling.
%endif
%package -n emacs-%{name}
Summary: Support for editing po files within GNU Emacs
@ -207,9 +198,8 @@ Substitutes the values of environment variables.
%prep
%setup -q
%patch 1 -p1 -b .orig~
%if %{without libtextstyle}
%patch 2 -p1 -b .orig~
%endif
%patch 3 -p1 -b .orig~
autoreconf
# Defeat libtextstyle attempt to bundle libxml2. The comments
@ -330,7 +320,7 @@ make check LIBUNISTRING=-lunistring
%files -f %{name}-tools.lang
%doc AUTHORS NEWS README THANKS
%doc gettext-tools/misc/DISCLAIM
%doc gettext-tools/misc/disclaim-translations.txt
%doc gettext-tools/man/msg*.1.html
%doc gettext-tools/man/recode*.1.html
%doc gettext-tools/man/xgettext.1.html
@ -369,8 +359,18 @@ make check LIBUNISTRING=-lunistring
%{_datadir}/%{name}/ABOUT-NLS
%{_datadir}/%{name}/po
%{_datadir}/%{name}/styles
%{_datadir}/%{name}/disclaim-translations.txt
%dir %{_datadir}/%{name}-%{version}
%{_datadir}/%{name}-%{version}/its
%dir %{_datadir}/%{name}/schema
%{_datadir}/%{name}/schema/its*.xsd*
%{_datadir}/%{name}/schema/locating-rules.xsd*
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/cldr-plurals
%{_libexecdir}/%{name}/hostname
%{_libexecdir}/%{name}/project-id
%{_libexecdir}/%{name}/urlget
%{_libexecdir}/%{name}/user-email
%files runtime -f %{name}-runtime.lang
%license COPYING
@ -381,6 +381,8 @@ make check LIBUNISTRING=-lunistring
%{_bindir}/gettext
%{_bindir}/gettext.sh
%{_bindir}/ngettext
%{_bindir}/printf_gettext
%{_bindir}/printf_ngettext
%exclude %{_mandir}/man1/autopoint.1*
%exclude %{_mandir}/man1/envsubst.1*
%exclude %{_mandir}/man1/gettextize.1*
@ -408,7 +410,8 @@ make check LIBUNISTRING=-lunistring
%{_datadir}/%{name}/config.rpath
%{_datadir}/%{name}/*.h
%{_datadir}/%{name}/msgunfmt.tcl
%{_datadir}/aclocal/*
%{_datadir}/%{name}/m4/*
%{_datadir}/aclocal/nls.m4
%{_includedir}/autosprintf.h
%{_includedir}/gettext-po.h
%{_infodir}/autosprintf*
@ -433,7 +436,6 @@ make check LIBUNISTRING=-lunistring
%{_datadir}/%{name}/libintl.jar
%endif
%if %{with libtextstyle}
%files -n libtextstyle
%{_libdir}/libtextstyle.so.0*
@ -443,7 +445,6 @@ make check LIBUNISTRING=-lunistring
%{_includedir}/textstyle.h
%{_infodir}/libtextstyle*
%{_libdir}/libtextstyle.so
%endif
%files -n emacs-%{name}
%dir %{_emacs_sitelispdir}/%{name}
@ -457,6 +458,54 @@ make check LIBUNISTRING=-lunistring
%{_mandir}/man1/msghack.1*
%changelog
* Sun Jan 11 2026 Manish Tiwari <matiwari@redhat.com> - 0.26-3
- https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00095.html
- Upstream patch to fix implicit declaration error with GCC-16
* Thu Dec 18 2025 Manish Tiwari <matiwari@redhat.com> - 0.26-2
- Add upstream provided patch to fix build failure with glibc 2.42 C23 const-preserving macros
- https://lists.gnu.org/archive/html/bug-gnulib/2025-11/msg00220.html
* Tue Aug 19 2025 Manish Tiwari <matiwari@redhat.com> - 0.26-1
- update to 0.26 release
- https://savannah.gnu.org/news/?id=10789
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Jul 23 2025 Manish Tiwari <matiwari@redhat.com> - 0.25.1-1
- update to 0.25.1 release
- Bug fixes:
- autopoint no longer fails if configure.ac contains no AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION invocation.
- nls.m4 is installed again under $PREFIX/share/aclocal/.
* Mon May 12 2025 Manish Tiwari <matiwari@redhat.com> - 0.25-1
- update to 0.25 release
- https://savannah.gnu.org/news/?id=10769
* Thu Feb 27 2025 Manish Tiwari <matiwari@redhat.com> - 0.24-1
- update to 0.24 release
- https://savannah.gnu.org/news/?id=10730
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jan 1 2025 Manish Tiwari <matiwari@redhat.com> - 0.23.1-1
- update to 0.23.1 release
- Remove gettext-0.23-libxml2 patch
* Wed Dec 11 2024 Manish Tiwari <matiwari@redhat.com> - 0.23-1
- update to 0.23 release
- https://savannah.gnu.org/news/?id=10699
- Add patch to fix compilation error with libxml2 >= 2.12.0 and gcc >= 14.
- Remove gettext-0.22-disable-libtextstyle patch
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jul 11 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-5
- CI gating tests migration to tmt
* Thu Jul 4 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-4
- Add explicit package version requirement for libtextstyle

5
plans/basic.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

View file

@ -1 +1 @@
SHA512 (gettext-0.22.5.tar.gz) = d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be
SHA512 (gettext-0.26.tar.gz) = 6c2afb0737843028e1cd27f1cd7dd5b81372ccff8cd8e01e17cfdc517afdd9a849c232f1ff5adca5eb4b03f2cc64f4a3f689ae8b84e523ceeae85384f3844083

5
tests/main.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Run gettext test
test: ./test.sh
framework: beakerlib
require:
- gettext

25
tests/test.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="gettext"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
rlRun "cp test_i18n.py test_gettext.py $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlLog "Run test_gettext.py"
rlRun "python3 test_gettext.py"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

227
tests/test_gettext.py Normal file
View file

@ -0,0 +1,227 @@
# -*- coding: utf-8 -*-
import logging
import os
import subprocess
# Saving logs
logging.basicConfig(level=logging.INFO)
DECORATE_STR = "************************************"
logging.info("TEST RESULTS FOR GETTEXT\n{0}".format(DECORATE_STR))
# CONSTANTS
PACKAGE_TO_TEST = "gettext"
DOMAIN_TO_BIND = "testdomain"
PYTHON_INTERPRETER = "python3"
TEST_I18N_FILE = "test_i18n.py"
LOG_INFO_PASS = "[ PASS ]"
LOG_INFO_FAIL = "[ FAIL ]"
LOG_INFO_OS_ERROR = "[ OS Error ]"
# Test Data
TEST_DATA = {"fr_FR": '''msgstr "Bonjour le monde!"''',
"de_DE": '''msgstr "Hallo Welt!"''',
"es_ES": '''msgstr "Hola Mundo!"''',
"it_IT": '''msgstr "Ciao mondo!"''',
"pt_BR": '''msgstr "Olá Mundo!"''',
"ja_JP": '''msgstr "「こんにちは世界」"''',
"ko_KR": '''msgstr "안녕하세요!"''',
"ru_RU": '''msgstr "Привет мир!"''',
"zh_CN": '''msgstr "你好,世界!"''',
"zh_TW": '''msgstr "你好,世界!"'''}
def test_locale():
"""
Check common files for locale support
"""
subject = "Locale Support Test"
try:
all_locales = subprocess.Popen(["locale", "-a"], stdout=subprocess.PIPE)
all_locales_data = all_locales.communicate()
if all_locales_data:
actual = all_locales_data[0].decode().split('\n')
else:
logging.error("{0}: ERROR\n".format(subject))
return
expected_locales = ['en_US', 'en_US.iso88591',
'en_US.iso885915', 'en_US.utf8']
if set(expected_locales).issubset(set(actual)):
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
else:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL))
except OSError as e:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
def test_gettext():
"""
Check if gettext is present
"""
subject = "GNU Internationalization Utilities Test"
try:
cmd_check_gettext = ['rpm', '-q', PACKAGE_TO_TEST]
p1 = subprocess.Popen(cmd_check_gettext, stdout=subprocess.PIPE)
std_data, stderr = p1.communicate()
std_data = std_data.decode()
logging.info("Found {0} NVR: {1}".format(PACKAGE_TO_TEST, std_data))
if PACKAGE_TO_TEST in std_data:
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
else:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL))
except OSError as e:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
def test_pot_creation():
"""
Creates hello.pot file using test_i18n.py file
"""
subject = "POT file Creation Test"
try:
pot_file = subprocess.Popen(
"xgettext -d '{0}' -o {1}.pot {2}".format(DOMAIN_TO_BIND,
DOMAIN_TO_BIND,
TEST_I18N_FILE),
shell=True
)
pot_file.communicate()
except OSError as e:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
else:
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
def make_dir(locale_dir):
path = "./locale/{0}/LC_MESSAGES".format(locale_dir)
os.makedirs(path)
def create_po_files(active_locale):
"""
creates .po file using POT file
"""
subject = "PO file Creation"
try:
cmd_po_files = subprocess.Popen(
"msginit --no-translator -l {0} -i {1}.pot -o ./locale/{2}/LC_MESSAGES/{3}.po".format(
active_locale, DOMAIN_TO_BIND, active_locale, active_locale), shell=True
)
cmd_po_files.communicate()
except OSError as e:
logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR))
else:
logging.info("{0} Succeed.".format(subject))
def translate(active_locale):
"""
Updates .po file with the translations for respective language
"""
data = TEST_DATA.get(active_locale)
if not data:
return
with open('./locale/{0}/LC_MESSAGES/{1}.po'.format(active_locale,
active_locale),
'r', encoding='latin-1') as f1:
data1 = f1.readlines()
data1.pop()
data1.append(data)
for index, data in enumerate(data1):
if "Content-Type" in data:
data1[index] = '"Content-Type: text/plain; charset=UTF-8\\n"\n'
with open('./locale/{0}/LC_MESSAGES/{1}'.format(active_locale,
active_locale) + ".po", 'w') as f2:
for line in data1:
f2.write(line)
def create_mo_files(active_locale):
"""
Creates .mo file for different locale form .po file
"""
subject = "MO file Creation"
try:
mo_files = subprocess.Popen(
"msgfmt ./locale/{0}/LC_MESSAGES/{1}.po --output-file ./locale/{2}/LC_MESSAGES/{3}.mo".format(
active_locale, active_locale, active_locale, active_locale
), shell=True
)
mo_files.communicate()
except OSError as e:
logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR))
else:
logging.info("{0} Succeed.".format(subject))
def test_translations(active_locale):
"""
Verify if the output is correct for different language
"""
subject = "Translation Test"
try:
cmd_translation_test = subprocess.check_output(
'LANGUAGE={0} {1} {2} {3}'.format(active_locale,
PYTHON_INTERPRETER,
TEST_I18N_FILE,
active_locale),
encoding='UTF-8', shell=True
)
if cmd_translation_test.strip() == TEST_DATA[active_locale].strip('msgstr "'):
logging.info("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_PASS))
else:
logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_FAIL))
except OSError as e:
logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_OS_ERROR))
def tear_off():
try:
subprocess.call(['rm', '-rf', './locale', '{0}.pot'.format(DOMAIN_TO_BIND)])
except OSError as e:
logging.error("OSError\n")
if __name__ == "__main__":
"""
Gettext Tests
"""
# Prepare tests
env_tests = [test_locale,
test_gettext,
test_pot_creation]
translation_tests = [make_dir,
create_po_files,
translate,
create_mo_files,
test_translations]
# Execute tests
[env_test() for env_test in env_tests]
for locale in TEST_DATA.keys():
[test(locale) for test in translation_tests]
tear_off()

14
tests/test_i18n.py Normal file
View file

@ -0,0 +1,14 @@
import gettext
import sys
def print_message(locale):
# Set up message catalog access
t = gettext.translation('%s' % locale, 'locale', fallback=True)
_ = t.gettext
s = _('Hello World!')
print(s)
print_message(sys.argv[1])

View file

@ -1,16 +0,0 @@
---
# Tests run on Atomic, Classic and Container
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- atomic
- classic
- container
repositories:
- repo: "https://src.fedoraproject.org/tests/gettext.git"
dest: "gettext"
tests:
- gettext/gettext-tests
required_packages:
- gettext