From adb95f50203522263692adec1757a39ed0414e0b Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Wed, 7 Sep 2022 15:31:23 +0530 Subject: [PATCH 01/32] Add conflicts to enable new (sub)packages installable independently of the original package. Signed-off-by: Sundeep Anand --- gettext.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 42c6b8b..12226f0 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 -Release: 18.0.%{snapshot}%{?dist} +Release: 19.0.%{snapshot}%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -100,6 +100,7 @@ License: GPLv3+ and LGPLv2+ # Depend on the exact version of the library sub package Requires: %{name}-libs%{_isa} = %{version}-%{release} Requires: %{name}-envsubst = %{version}-%{release} +Conflicts: %{name} <= 0.21-15%{?dist}.0.20220203 %description runtime @@ -174,6 +175,7 @@ think about. %package envsubst Summary: Substitutes the values of environment variables +Conflicts: %{name} <= 0.21-15%{?dist}.0.20220203 %description envsubst Substitutes the values of environment variables. @@ -413,6 +415,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Sep 12 2022 Sundeep Anand - 0.21-19.0.20220203 +- Add conflicts to enable new (sub)packages installable independently of the original package. + * Wed Aug 10 2022 Honza Horak - 0.21-18.0.20220203 - Introduce envsubst sub-package for allow install envsubst with minimal footprint From e09fc9f99332dfb6f97095cb2aabcae9df8a64bd Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Thu, 13 Oct 2022 15:28:24 +0530 Subject: [PATCH 02/32] Include doc and man pages for envsubst subpackage. Move _libdir and _datadir from gettext-runtime to gettext package. --- gettext.spec | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/gettext.spec b/gettext.spec index 12226f0..43c53ef 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21 -Release: 19.0.%{snapshot}%{?dist} +Release: 20.0.%{snapshot}%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -329,26 +329,12 @@ make check LIBUNISTRING=-lunistring %{_bindir}/xgettext %{_infodir}/gettext* %exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/envsubst.1* %exclude %{_mandir}/man1/gettextize.1* %exclude %{_mandir}/man1/msghack.1* %{_mandir}/man1/msg* %{_mandir}/man1/recode*.1* %{_mandir}/man1/xgettext.1* - -%files runtime -f %{name}-runtime.lang -%license COPYING -%doc gettext-runtime/BUGS -%doc gettext-runtime/man/*.1.html -%doc gettext-runtime/intl/COPYING* -%{_bindir}/gettext -%{_bindir}/gettext.sh -%{_bindir}/ngettext -%exclude %{_mandir}/man1/autopoint.1* -%exclude %{_mandir}/man1/gettextize.1* -%exclude %{_mandir}/man1/msg* -%exclude %{_mandir}/man1/recode-sr-latin.1* -%exclude %{_mandir}/man1/xgettext.1* -%{_mandir}/man1/* %{_libdir}/%{name} %if %{with java} %exclude %{_libdir}/%{name}/gnu.gettext.* @@ -361,9 +347,28 @@ make check LIBUNISTRING=-lunistring %dir %{_datadir}/%{name}-%{version} %{_datadir}/%{name}-%{version}/its +%files runtime -f %{name}-runtime.lang +%license COPYING +%doc gettext-runtime/BUGS +%doc gettext-runtime/man/gettext.1.html +%doc gettext-runtime/man/ngettext.1.html +%doc gettext-runtime/intl/COPYING* +%{_bindir}/gettext +%{_bindir}/gettext.sh +%{_bindir}/ngettext +%exclude %{_mandir}/man1/autopoint.1* +%exclude %{_mandir}/man1/envsubst.1* +%exclude %{_mandir}/man1/gettextize.1* +%exclude %{_mandir}/man1/msg* +%exclude %{_mandir}/man1/recode-sr-latin.1* +%exclude %{_mandir}/man1/xgettext.1* +%{_mandir}/man1/* + %files envsubst %license COPYING +%doc gettext-runtime/man/envsubst.1.html %{_bindir}/envsubst +%{_mandir}/man1/envsubst.1* %files common-devel %{_datadir}/%{name}/archive.*.tar.xz @@ -415,6 +420,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Oct 13 2022 Sundeep Anand - 0.21-20.0.20220203 +- Include doc and man pages for envsubst subpackage. + Move _libdir and _datadir from gettext-runtime to gettext package. + * Mon Sep 12 2022 Sundeep Anand - 0.21-19.0.20220203 - Add conflicts to enable new (sub)packages installable independently of the original package. From 7aca11f7d43d10c47fbeb4efd16af2884b34f9c7 Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Fri, 14 Oct 2022 13:38:25 +0530 Subject: [PATCH 03/32] update to 0.21.1 release --- ...scan.patch => gettext-0.21.1-covscan.patch | 0 ... gettext-0.21.1-disable-libtextstyle.patch | 20 +++++++++---------- gettext.spec | 17 ++++++++-------- sources | 2 +- 4 files changed, 19 insertions(+), 20 deletions(-) rename gettext-0.21-covscan.patch => gettext-0.21.1-covscan.patch (100%) rename gettext-0.21-disable-libtextstyle.patch => gettext-0.21.1-disable-libtextstyle.patch (88%) diff --git a/gettext-0.21-covscan.patch b/gettext-0.21.1-covscan.patch similarity index 100% rename from gettext-0.21-covscan.patch rename to gettext-0.21.1-covscan.patch diff --git a/gettext-0.21-disable-libtextstyle.patch b/gettext-0.21.1-disable-libtextstyle.patch similarity index 88% rename from gettext-0.21-disable-libtextstyle.patch rename to gettext-0.21.1-disable-libtextstyle.patch index ae6a11a..cb70687 100644 --- a/gettext-0.21-disable-libtextstyle.patch +++ b/gettext-0.21.1-disable-libtextstyle.patch @@ -1,5 +1,5 @@ diff --git a/Makefile.am b/Makefile.am -index 764336c..daed715 100644 +index 5a7184c..28267a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ @@ -11,14 +11,14 @@ index 764336c..daed715 100644 changelog_etc = \ gettext-runtime/ChangeLog.0 \ -@@ -85,7 +85,6 @@ distcheck-hook: - cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4 +@@ -124,7 +124,6 @@ distcheck-hook: + test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`" 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)/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. + test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`" diff --git a/configure.ac b/configure.ac index f4e54ea..ff850ae 100644 --- a/configure.ac @@ -42,20 +42,20 @@ index f4e54ea..ff850ae 100644 AC_CONFIG_FILES([Makefile]) diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am -index 90f5548..cdf2834 100644 +index 449a797..bce4ad8 100644 --- a/gettext-tools/Makefile.am +++ b/gettext-tools/Makefile.am @@ -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 +-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc ++SUBDIRS = intl 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 --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h -index 60015bd..ae5f5fb 100644 +index 05ce0cf..936331c 100644 --- a/gettext-tools/libgettextpo/textstyle.in.h +++ b/gettext-tools/libgettextpo/textstyle.in.h @@ -239,7 +239,8 @@ typedef ostream_t file_ostream_t; @@ -100,10 +100,10 @@ index 60015bd..ae5f5fb 100644 #define color_test_mode false diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am -index f5e52ea..a9c9fac 100644 +index 510ab2a..72791ba 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am -@@ -300,19 +300,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c +@@ -291,19 +291,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) diff --git a/gettext.spec b/gettext.spec index 43c53ef..cc3b892 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,11 +1,10 @@ %bcond_with jar %bcond_with java -%global snapshot 20220203 Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.21 -Release: 20.0.%{snapshot}%{?dist} +Version: 0.21.1 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -22,15 +21,13 @@ Release: 20.0.%{snapshot}%{?dist} # Everything else is GPLv3+ License: GPLv3+ and LGPLv2+ and GFDL URL: https://www.gnu.org/software/gettext/ -# Snapshot tarball has been generated by following upstream release steps. -# https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=Admin/release-steps -Source: %{name}-%{version}-%{snapshot}.tar.gz +Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py Source3: msghack.1 Patch1: %{name}-%{version}-disable-libtextstyle.patch Patch2: %{name}-%{version}-covscan.patch -Patch3: gettext-java17-2062407.patch +Patch3: %{name}-java17-2062407.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -210,7 +207,7 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" export CPPFLAGS="-I%{_includedir}/libxml2" # Side effect of unbundling libxml2 from libtextstyle. export LIBS="-lxml2" -%configure --without-included-gettext --enable-nls --disable-static \ +%configure --enable-nls --disable-static \ --enable-shared --disable-csharp --disable-rpath \ %if %{with java} --enable-java \ @@ -238,7 +235,6 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_bindir}/msghack install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_mandir}/man1/msghack.1 - # make preloadable_libintl.so executable chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so @@ -420,6 +416,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Oct 14 2022 Sundeep Anand - 0.21.1-1 +- update to 0.21.1 release + * Thu Oct 13 2022 Sundeep Anand - 0.21-20.0.20220203 - Include doc and man pages for envsubst subpackage. Move _libdir and _datadir from gettext-runtime to gettext package. diff --git a/sources b/sources index 7f8673c..04e6282 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.21-20220203.tar.gz) = ffa90ef2fe7894504a35ee1cee8e45e4e500dd22a10e70e888a95e4aa80002fad063e9ecc5610b4617908ddef05b50e780115b1c26864bce16fea9d02a44665b +SHA512 (gettext-0.21.1.tar.gz) = ccd43a43fab3c90ed99b3e27628c9aeb7186398153b137a4997f8c7ddfd9729b0ba9d15348567e5206af50ac027673d2b8a3415bb3fc65f87ad778f85dc03a05 From aa5465907019db3696ef4c9397ae6656d5c5ab95 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 04:40:41 +0000 Subject: [PATCH 04/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index cc3b892..dd7a590 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21.1 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -416,6 +416,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 0.21.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Oct 14 2022 Sundeep Anand - 0.21.1-1 - update to 0.21.1 release From 15c3691527bd5d4d20e8f753c7f72e28a6ce533f Mon Sep 17 00:00:00 2001 From: Sundeep Anand Date: Wed, 29 Mar 2023 17:57:09 +0530 Subject: [PATCH 05/32] update license tag to as per SPDX identifiers --- gettext.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gettext.spec b/gettext.spec index dd7a590..43e451a 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.21.1 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -19,7 +19,7 @@ Release: 2%{?dist} # - libasprintf info files # - libtextstyle info files # Everything else is GPLv3+ -License: GPLv3+ and LGPLv2+ and GFDL +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 @@ -93,7 +93,7 @@ programs. %package runtime Summary: GNU runtime libraries and programs for producing multi-lingual messages -License: GPLv3+ and LGPLv2+ +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} @@ -109,7 +109,7 @@ and is a powerful and simple method for internationalizing programs. %package common-devel Summary: Common development files for %{name} # autopoint archive -License: GPLv3+ +License: GPL-3.0-or-later BuildArch: noarch %description common-devel @@ -121,7 +121,7 @@ Summary: Development files for %{name} # autopoint is GPLv3+ # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPLv2+ and GPLv3+ and GFDL +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} @@ -142,7 +142,7 @@ want to add gettext support for your project. Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ -License: LGPLv2+ and GPLv3+ +License: LGPL-2.0-or-later and GPL-3.0-or-later Obsoletes: libtextstyle < %{version}-%{release} %description libs @@ -416,6 +416,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Mar 29 2023 Sundeep Anand - 0.21.1-3 +- update license tag to as per SPDX identifiers + * Thu Jan 19 2023 Fedora Release Engineering - 0.21.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 6a2dc0e302225010471d92fc1abd9938b256855a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 23 Jun 2023 18:28:59 +0800 Subject: [PATCH 06/32] update to 0.22 release --- ...=> gettext-0.22-disable-libtextstyle.patch | 57 ++++----- gettext-java17-2062407.patch | 116 ------------------ gettext.spec | 21 ++-- sources | 2 +- 4 files changed, 37 insertions(+), 159 deletions(-) rename gettext-0.21.1-disable-libtextstyle.patch => gettext-0.22-disable-libtextstyle.patch (71%) delete mode 100644 gettext-java17-2062407.patch diff --git a/gettext-0.21.1-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch similarity index 71% rename from gettext-0.21.1-disable-libtextstyle.patch rename to gettext-0.22-disable-libtextstyle.patch index cb70687..993163e 100644 --- a/gettext-0.21.1-disable-libtextstyle.patch +++ b/gettext-0.22-disable-libtextstyle.patch @@ -1,7 +1,6 @@ -diff --git a/Makefile.am b/Makefile.am -index 5a7184c..28267a5 100644 ---- a/Makefile.am -+++ b/Makefile.am +diff -ur gettext-0.22.orig/Makefile.am gettext-0.22/Makefile.am +--- gettext-0.22.orig/Makefile.am 2023-06-23 17:44:45.388281215 +0800 ++++ gettext-0.22/Makefile.am 2023-06-23 17:43:14.098701787 +0800 @@ -19,7 +19,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies ACLOCAL_AMFLAGS = -I m4 @@ -11,19 +10,19 @@ index 5a7184c..28267a5 100644 changelog_etc = \ gettext-runtime/ChangeLog.0 \ -@@ -124,7 +124,6 @@ distcheck-hook: - test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`" +@@ -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 - test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`" -diff --git a/configure.ac b/configure.ac -index f4e54ea..ff850ae 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics. + # Verify that all files have appropriate copyright headers. +diff -ur gettext-0.22.orig/configure.ac gettext-0.22/configure.ac +--- gettext-0.22.orig/configure.ac 2020-09-06 18:01:37.000000000 +0800 ++++ gettext-0.22/configure.ac 2023-06-23 17:43:14.099701793 +0800 +@@ -37,7 +37,7 @@ dnl Checks for library functions. @@ -32,7 +31,7 @@ index f4e54ea..ff850ae 100644 AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po]) -@@ -49,7 +49,7 @@ AC_CANONICAL_HOST +@@ -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 @@ -41,24 +40,22 @@ index f4e54ea..ff850ae 100644 AC_CONFIG_FILES([Makefile]) -diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am -index 449a797..bce4ad8 100644 ---- a/gettext-tools/Makefile.am -+++ b/gettext-tools/Makefile.am +diff -ur gettext-0.22.orig/gettext-tools/Makefile.am gettext-0.22/gettext-tools/Makefile.am +--- gettext-0.22.orig/gettext-tools/Makefile.am 2021-06-15 04:22:46.000000000 +0800 ++++ gettext-0.22/gettext-tools/Makefile.am 2023-06-23 18:24:08.822906444 +0800 @@ -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 = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc -+SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc +-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 --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h -index 05ce0cf..936331c 100644 ---- a/gettext-tools/libgettextpo/textstyle.in.h -+++ b/gettext-tools/libgettextpo/textstyle.in.h -@@ -239,7 +239,8 @@ typedef ostream_t file_ostream_t; +diff -ur gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h +--- gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-05-19 12:20:56.000000000 +0800 ++++ gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h 2023-06-23 17:43:14.099701793 +0800 +@@ -243,7 +243,8 @@ static inline file_ostream_t file_ostream_create (FILE *fp) { @@ -68,7 +65,7 @@ index 05ce0cf..936331c 100644 } /* --------------------------- From fd-ostream.h --------------------------- */ -@@ -439,6 +440,30 @@ html_styled_ostream_create (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t destination, +@@ -443,6 +444,30 @@ return NULL; } @@ -99,11 +96,10 @@ index 05ce0cf..936331c 100644 /* ------------------------------ From color.h ------------------------------ */ #define color_test_mode false -diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am -index 510ab2a..72791ba 100644 ---- a/gettext-tools/src/Makefile.am -+++ b/gettext-tools/src/Makefile.am -@@ -291,19 +291,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c +diff -ur gettext-0.22.orig/gettext-tools/src/Makefile.am gettext-0.22/gettext-tools/src/Makefile.am +--- gettext-0.22.orig/gettext-tools/src/Makefile.am 2023-06-09 05:03:36.000000000 +0800 ++++ gettext-0.22/gettext-tools/src/Makefile.am 2023-06-23 17:43:14.099701793 +0800 +@@ -305,19 +305,9 @@ cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) @@ -126,4 +122,3 @@ index 510ab2a..72791ba 100644 # How to build libgettextsrc.la. # Need ../gnulib-lib/libgettextlib.la. - diff --git a/gettext-java17-2062407.patch b/gettext-java17-2062407.patch deleted file mode 100644 index e29fe77..0000000 --- a/gettext-java17-2062407.patch +++ /dev/null @@ -1,116 +0,0 @@ -diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c gettext-0.21/gettext-tools/gnulib-lib/javacomp.c ---- gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c 2022-03-09 12:22:05.000000000 +0900 -+++ gettext-0.21/gettext-tools/gnulib-lib/javacomp.c 2022-03-20 18:23:53.636052943 +0900 -@@ -116,9 +116,8 @@ default_target_version (void) - && (java_version_cache[1] >= '2' - && java_version_cache[1] <= '7') - && java_version_cache[2] == '\0') -- /* Assume that these (not yet released) Java versions will behave -- like the preceding ones. */ -- java_version_cache = "11"; -+ /* It's one of the valid target version values. */ -+ ; - else - java_version_cache = "1.1"; - } -@@ -128,7 +127,7 @@ default_target_version (void) - /* ======================= Source version dependent ======================= */ - - /* Convert a source version to an index. */ --#define SOURCE_VERSION_BOUND 8 /* exclusive upper bound */ -+#define SOURCE_VERSION_BOUND 14 /* exclusive upper bound */ - static unsigned int - source_version_index (const char *source_version) - { -@@ -144,7 +143,7 @@ source_version_index (const char *source - else if (source_version[0] == '9' && source_version[1] == '\0') - return 5; - else if (source_version[0] == '1' -- && (source_version[1] >= '0' && source_version[1] <= '1') -+ && (source_version[1] >= '0' && source_version[1] <= '7') - && source_version[2] == '\0') - return source_version[1] - '0' + 6; - error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); -@@ -171,6 +170,10 @@ get_goodcode_snippet (const char *source - return "class conftest { public void m() { var i = new Integer(0); } }\n"; - if (strcmp (source_version, "11") == 0) - return "class conftest { Readable r = (var b) -> 0; }\n"; -+ if (source_version[0] == '1' -+ && (source_version[1] >= '2' && source_version[1] <= '7') -+ && source_version[2] == '\0') -+ return "class conftest { Readable r = (var b) -> 0; }\n"; - error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); - return NULL; - } -@@ -197,6 +200,10 @@ get_failcode_snippet (const char *source - return "class conftestfail { Readable r = (var b) -> 0; }\n"; - if (strcmp (source_version, "11") == 0) - return NULL; -+ if (source_version[0] == '1' -+ && (source_version[1] >= '2' && source_version[1] <= '7') -+ && source_version[2] == '\0') -+ return NULL; - error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class")); - return NULL; - } -@@ -204,7 +211,7 @@ get_failcode_snippet (const char *source - /* ======================= Target version dependent ======================= */ - - /* Convert a target version to an index. */ --#define TARGET_VERSION_BOUND 11 /* exclusive upper bound */ -+#define TARGET_VERSION_BOUND 17 /* exclusive upper bound */ - static unsigned int - target_version_index (const char *target_version) - { -@@ -215,7 +222,7 @@ target_version_index (const char *target - else if (target_version[0] == '9' && target_version[1] == '\0') - return 8; - else if (target_version[0] == '1' -- && (target_version[1] >= '0' && target_version[1] <= '1') -+ && (target_version[1] >= '0' && target_version[1] <= '7') - && target_version[2] == '\0') - return target_version[1] - '0' + 9; - error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); -@@ -245,10 +252,10 @@ corresponding_classfile_version (const c - return 52; - if (strcmp (target_version, "9") == 0) - return 53; -- if (strcmp (target_version, "10") == 0) -- return 54; -- if (strcmp (target_version, "11") == 0) -- return 55; -+ if (target_version[0] == '1' -+ && (target_version[1] >= '0' && target_version[1] <= '7') -+ && target_version[2] == '\0') -+ return target_version[1] + 54; - error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class")); - return 0; - } -@@ -2439,7 +2446,7 @@ compile_java_class (const char * const * - } - } - -- error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); -+ /* error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); */ - err = true; - - done2: -diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/src/write-java.c gettext-0.21/gettext-tools/src/write-java.c ---- gettext-0.21.orig/gettext-tools/src/write-java.c 2022-03-09 12:17:21.000000000 +0900 -+++ gettext-0.21/gettext-tools/src/write-java.c 2022-03-20 18:26:06.941734979 +0900 -@@ -1209,8 +1209,14 @@ msgdomain_write_java (message_list_ty *m - Java compilers create the class files in the source file's directory - - which is in a temporary directory in our case. */ - java_sources[0] = java_file_name; -- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, -+ if (1 -+ && (compile_java_class (java_sources, 1, NULL, 0, "17", "17", directory, -+ true, false, true, verbose > 0)) /* assume JDK 17 */ -+ && (compile_java_class (java_sources, 1, NULL, 0, "11", "11", directory, -+ true, false, true, verbose > 0)) /* assume JDK 11 */ -+ && (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory, - true, false, true, verbose > 0)) -+ ) - { - if (!verbose) - error (0, 0, diff --git a/gettext.spec b/gettext.spec index 43e451a..0811325 100644 --- a/gettext.spec +++ b/gettext.spec @@ -3,8 +3,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.21.1 -Release: 3%{?dist} +Version: 0.22 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -26,8 +26,7 @@ Source2: msghack.py Source3: msghack.1 Patch1: %{name}-%{version}-disable-libtextstyle.patch -Patch2: %{name}-%{version}-covscan.patch -Patch3: %{name}-java17-2062407.patch +Patch2: %{name}-0.21.1-covscan.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -49,8 +48,6 @@ BuildRequires: zip, unzip %endif # for po-mode.el BuildRequires: emacs -# for autosetup -BuildRequires: git # ensure 'ARCHIVE_FORMAT=dirxz' BuildRequires: xz # for documentation @@ -75,7 +72,6 @@ BuildRequires: glibc-langpack-tr BuildRequires: glibc-langpack-zh BuildRequires: make Provides: bundled(gnulib) -Provides: bundled(libcroco) = 0.6.12 Requires: %{name}-runtime = %{version}-%{release} %description @@ -179,10 +175,9 @@ Substitutes the values of environment variables. %prep -%autosetup -S git -# Refresh autotools files to latest versions -# Should be removed after 0.21: -autoreconf --force --install +%autosetup -p1 +# patch 1 +automake # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -416,6 +411,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Jun 23 2023 Jens Petersen - 0.22-1 +- update to 0.22 release +- https://savannah.gnu.org/news/?id=10378 + * Wed Mar 29 2023 Sundeep Anand - 0.21.1-3 - update license tag to as per SPDX identifiers diff --git a/sources b/sources index 04e6282..aaf6ad9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.21.1.tar.gz) = ccd43a43fab3c90ed99b3e27628c9aeb7186398153b137a4997f8c7ddfd9729b0ba9d15348567e5206af50ac027673d2b8a3415bb3fc65f87ad778f85dc03a05 +SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04 From 4f470a9f5000738cd54dda63d0531038c7e337c7 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 12 Jul 2023 12:19:32 -0400 Subject: [PATCH 07/32] Fix LD_LIBRARY_PATH in %check gettext-0.22 dropped the second copy of libintl in gettext-tools, and now relies on the copy in gettext-runtime. These are used for the tests, without which a number will fail. --- gettext.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 0811325..83f92ae 100644 --- a/gettext.spec +++ b/gettext.spec @@ -287,7 +287,7 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc # this takes quite a lot of time to run # adapt to rpath removal -export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs +export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-runtime/intl/.libs # override LIBUNISTRING to prevent reordering of lib objects make check LIBUNISTRING=-lunistring From 89be005c970f09211b0b757861a64dc68c256efb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 21:06:30 +0000 Subject: [PATCH 08/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 83f92ae..8cd9790 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -411,6 +411,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 0.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jun 23 2023 Jens Petersen - 0.22-1 - update to 0.22 release - https://savannah.gnu.org/news/?id=10378 From f09e35ca28e9c491cc7c4db72b18e3392a7d1f80 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 20:34:15 +0000 Subject: [PATCH 09/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 8cd9790..295a7a3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -411,6 +411,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 0.22-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 19 2023 Fedora Release Engineering - 0.22-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 0c9f02314220a12728f8b72f6780a8b941caeaed Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 12:49:35 +0000 Subject: [PATCH 10/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 295a7a3..6a9f881 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22 -Release: 3%{?dist} +Release: 4%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -411,6 +411,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 0.22-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 0.22-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From eb1d1dcd33b81df1007cb4e15697dc07151eabc9 Mon Sep 17 00:00:00 2001 From: matiwari Date: Fri, 9 Feb 2024 15:03:46 +0530 Subject: [PATCH 11/32] Update to 0.22.4 release --- gettext-0.22-disable-libtextstyle.patch | 149 ++++++++++++------------ gettext.spec | 16 ++- sources | 2 +- 3 files changed, 86 insertions(+), 81 deletions(-) diff --git a/gettext-0.22-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch index 993163e..7514704 100644 --- a/gettext-0.22-disable-libtextstyle.patch +++ b/gettext-0.22-disable-libtextstyle.patch @@ -1,27 +1,6 @@ -diff -ur gettext-0.22.orig/Makefile.am gettext-0.22/Makefile.am ---- gettext-0.22.orig/Makefile.am 2023-06-23 17:44:45.388281215 +0800 -+++ gettext-0.22/Makefile.am 2023-06-23 17:43:14.098701787 +0800 -@@ -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. -diff -ur gettext-0.22.orig/configure.ac gettext-0.22/configure.ac ---- gettext-0.22.orig/configure.ac 2020-09-06 18:01:37.000000000 +0800 -+++ gettext-0.22/configure.ac 2023-06-23 17:43:14.099701793 +0800 +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-09 12:31:57.502525589 +0530 @@ -37,7 +37,7 @@ dnl Checks for library functions. @@ -40,9 +19,52 @@ diff -ur gettext-0.22.orig/configure.ac gettext-0.22/configure.ac AC_CONFIG_FILES([Makefile]) -diff -ur gettext-0.22.orig/gettext-tools/Makefile.am gettext-0.22/gettext-tools/Makefile.am ---- gettext-0.22.orig/gettext-tools/Makefile.am 2021-06-15 04:22:46.000000000 +0800 -+++ gettext-0.22/gettext-tools/Makefile.am 2023-06-23 18:24:08.822906444 +0800 +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-09 13:14:44.995080091 +0530 +@@ -255,7 +255,8 @@ + 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 +@@ -649,8 +650,8 @@ + + /* ----------------------- From noop-styled-ostream.h ----------------------- */ + +-typedef styled_ostream_t noop_styled_ostream_t; +- ++typedef ostream_t noop_styled_ostream_t; ++ + #define noop_styled_ostream_write_mem ostream_write_mem + #define noop_styled_ostream_flush ostream_flush + #define noop_styled_ostream_free ostream_free +@@ -673,13 +674,13 @@ + return true; + } + +-static inline noop_styled_ostream_t ++static inline 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-09 12:32:57.710481641 +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 @@ -52,54 +74,10 @@ diff -ur gettext-0.22.orig/gettext-tools/Makefile.am gettext-0.22/gettext-tools/ EXTRA_DIST = misc/DISCLAIM MOSTLYCLEANFILES = core *.stackdump -diff -ur gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h ---- gettext-0.22.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-05-19 12:20:56.000000000 +0800 -+++ gettext-0.22/gettext-tools/libgettextpo/textstyle.in.h 2023-06-23 17:43:14.099701793 +0800 -@@ -243,7 +243,8 @@ - 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"); - } - - /* --------------------------- From fd-ostream.h --------------------------- */ -@@ -443,6 +444,30 @@ - return NULL; - } - -+/* ----------------------- From noop-styled-ostream.h ----------------------- */ -+ -+/* noop_styled_ostream_t is a subtype of ostream_t. */ -+typedef ostream_t noop_styled_ostream_t; -+ -+#define noop_styled_ostream_write_mem ostream_write_mem -+#define noop_styled_ostream_flush ostream_flush -+#define noop_styled_ostream_free ostream_free -+#define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class -+#define noop_styled_ostream_end_use_class styled_ostream_end_use_class -+#define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref -+#define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id -+#define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink -+#define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style -+ -+static inline ostream_t -+noop_styled_ostream_create (ostream_t destination, bool pass_ownership) -+{ -+ if (pass_ownership) -+ return destination; -+ else -+ return fdopen (dup (fileno (destination)), "w"); -+} -+ - /* ------------------------------ From color.h ------------------------------ */ - - #define color_test_mode false -diff -ur gettext-0.22.orig/gettext-tools/src/Makefile.am gettext-0.22/gettext-tools/src/Makefile.am ---- gettext-0.22.orig/gettext-tools/src/Makefile.am 2023-06-09 05:03:36.000000000 +0800 -+++ gettext-0.22/gettext-tools/src/Makefile.am 2023-06-23 17:43:14.099701793 +0800 -@@ -305,19 +305,9 @@ +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-09 12:35:40.445065728 +0530 +@@ -311,19 +311,9 @@ cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) @@ -122,3 +100,24 @@ diff -ur gettext-0.22.orig/gettext-tools/src/Makefile.am gettext-0.22/gettext-to # 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-09 12:29:57.994627891 +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. diff --git a/gettext.spec b/gettext.spec index 6a9f881..c287c26 100644 --- a/gettext.spec +++ b/gettext.spec @@ -3,8 +3,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.22 -Release: 4%{?dist} +Version: 0.22.4 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -25,8 +25,8 @@ Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py Source3: msghack.1 -Patch1: %{name}-%{version}-disable-libtextstyle.patch -Patch2: %{name}-0.21.1-covscan.patch +Patch1: gettext-0.22-disable-libtextstyle.patch +Patch2: gettext-0.21.1-covscan.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -175,7 +175,9 @@ Substitutes the values of environment variables. %prep -%autosetup -p1 +%setup -q +%patch 1 -p1 -b .orig~ +%patch 2 -p1 -b .orig~ # patch 1 automake @@ -411,6 +413,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Feb 9 2024 Manish Tiwari - 0.22.4-1 +- update to 0.22.4 release +- https://savannah.gnu.org/news/?id=10544 + * Wed Jan 24 2024 Fedora Release Engineering - 0.22-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index aaf6ad9..ff8d342 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.22.tar.gz) = e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04 +SHA512 (gettext-0.22.4.tar.gz) = ad2fa2f69be996a637e9b51e8941a39e10050060245dcec1fe75c15b68d0ff973043c87b77e4e2830e407e3bdd040b578f8e24fd05bba43adb94eaee34001aa5 From 875215f268271ed075d8144e404b87e02392837b Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 13 Feb 2024 13:44:40 +0530 Subject: [PATCH 12/32] Minor Patch Update --- gettext-0.22-disable-libtextstyle.patch | 35 ++++++++----------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/gettext-0.22-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch index 7514704..771c49c 100644 --- a/gettext-0.22-disable-libtextstyle.patch +++ b/gettext-0.22-disable-libtextstyle.patch @@ -1,6 +1,6 @@ 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-09 12:31:57.502525589 +0530 ++++ gettext-0.22.4/configure.ac 2024-02-13 12:47:32.099238869 +0530 @@ -37,7 +37,7 @@ dnl Checks for library functions. @@ -21,34 +21,21 @@ diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac 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-09 13:14:44.995080091 +0530 -@@ -255,7 +255,8 @@ ++++ 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 -@@ -649,8 +650,8 @@ - - /* ----------------------- From noop-styled-ostream.h ----------------------- */ - --typedef styled_ostream_t noop_styled_ostream_t; -- -+typedef ostream_t noop_styled_ostream_t; -+ - #define noop_styled_ostream_write_mem ostream_write_mem - #define noop_styled_ostream_flush ostream_flush - #define noop_styled_ostream_free ostream_free -@@ -673,13 +674,13 @@ - return true; - } - --static inline noop_styled_ostream_t -+static inline ostream_t +@@ -676,10 +677,10 @@ + static inline noop_styled_ostream_t noop_styled_ostream_create (ostream_t destination, bool pass_ownership) { - if (!pass_ownership) @@ -64,7 +51,7 @@ diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0 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-09 12:32:57.710481641 +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 @@ -76,7 +63,7 @@ diff -ur gettext-0.22.4.orig/gettext-tools/Makefile.am gettext-0.22.4/gettext-to 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-09 12:35:40.445065728 +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) @@ -102,7 +89,7 @@ diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettex # 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-09 12:29:57.994627891 +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 From 807312ab8f5aa60594c635c81c779234d0c1a713 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 21 Feb 2024 15:25:54 +0530 Subject: [PATCH 13/32] Add back libtextstyle library file for rawhide --- gettext.spec | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index c287c26..c7cbf65 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,10 +1,11 @@ %bcond_with jar %bcond_with java +%bcond libtextstyle %[0%{?fedora} > 40] Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.4 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -25,8 +26,8 @@ Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source2: msghack.py Source3: msghack.1 -Patch1: gettext-0.22-disable-libtextstyle.patch -Patch2: gettext-0.21.1-covscan.patch +Patch1: gettext-0.21.1-covscan.patch +Patch2: gettext-0.22-disable-libtextstyle.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 @@ -144,6 +145,25 @@ Obsoletes: libtextstyle < %{version}-%{release} %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 + +%description -n libtextstyle +Library for producing styled text to be displayed in a terminal +emulator. + +%package -n libtextstyle-devel +Summary: Development files for libtextstyle +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 @@ -177,9 +197,10 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ +%if %{without libtextstyle} %patch 2 -p1 -b .orig~ -# patch 1 -automake +%endif +autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -204,6 +225,7 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__" export CPPFLAGS="-I%{_includedir}/libxml2" # Side effect of unbundling libxml2 from libtextstyle. export LIBS="-lxml2" +export CFLAGS="$CFLAGS -Wformat" %configure --enable-nls --disable-static \ --enable-shared --disable-csharp --disable-rpath \ %if %{with java} @@ -401,6 +423,18 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/libintl.jar %endif +%if %{with libtextstyle} +%files -n libtextstyle +%{_libdir}/libtextstyle.so.0* + +%files -n libtextstyle-devel +%{_docdir}/libtextstyle/ +%{_includedir}/textstyle/ +%{_includedir}/textstyle.h +%{_infodir}/libtextstyle* +%{_libdir}/libtextstyle.so +%endif + %files -n emacs-%{name} %dir %{_emacs_sitelispdir}/%{name} %{_emacs_sitelispdir}/%{name}/*.elc @@ -413,6 +447,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Feb 21 2024 Manish Tiwari - 0.22.4-2 +- Add back libtextstyle library for rawhide (#2264128) + * Fri Feb 9 2024 Manish Tiwari - 0.22.4-1 - update to 0.22.4 release - https://savannah.gnu.org/news/?id=10544 From d0e44692345d902a8c9df882ba1fc8ba4f9a9fe2 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 28 Feb 2024 12:27:36 +0530 Subject: [PATCH 14/32] Use Uppercase AND operator for multiple licenses in SPDX --- gettext.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index c7cbf65..6c948e2 100644 --- a/gettext.spec +++ b/gettext.spec @@ -20,7 +20,7 @@ Release: 2%{?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 @@ -90,7 +90,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} @@ -118,7 +118,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} @@ -139,7 +139,7 @@ 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 +License: LGPL-2.0-or-later AND GPL-3.0-or-later Obsoletes: libtextstyle < %{version}-%{release} %description libs @@ -156,7 +156,7 @@ 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 From 2880ae9755c22730160179d2101e03b9ba2dc227 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 1 Mar 2024 20:32:59 +0800 Subject: [PATCH 15/32] remove trailing whitespace for libtextstyle subpackages --- gettext.spec | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gettext.spec b/gettext.spec index 6c948e2..91634c3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -146,22 +146,22 @@ Obsoletes: libtextstyle < %{version}-%{release} This package contains libraries used internationalization support. %if %{with libtextstyle} -%package -n libtextstyle -Summary: Text styling library -License: GPL-3.0-or-later - -%description -n libtextstyle -Library for producing styled text to be displayed in a terminal -emulator. - -%package -n libtextstyle-devel -Summary: Development files for libtextstyle -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 +%package -n libtextstyle +Summary: Text styling library +License: GPL-3.0-or-later + +%description -n libtextstyle +Library for producing styled text to be displayed in a terminal +emulator. + +%package -n libtextstyle-devel +Summary: Development files for libtextstyle +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 @@ -424,14 +424,14 @@ make check LIBUNISTRING=-lunistring %endif %if %{with libtextstyle} -%files -n libtextstyle -%{_libdir}/libtextstyle.so.0* - -%files -n libtextstyle-devel -%{_docdir}/libtextstyle/ -%{_includedir}/textstyle/ -%{_includedir}/textstyle.h -%{_infodir}/libtextstyle* +%files -n libtextstyle +%{_libdir}/libtextstyle.so.0* + +%files -n libtextstyle-devel +%{_docdir}/libtextstyle/ +%{_includedir}/textstyle/ +%{_includedir}/textstyle.h +%{_infodir}/libtextstyle* %{_libdir}/libtextstyle.so %endif From 9c4e3965b5ebad4d42711007dd29564a857e2687 Mon Sep 17 00:00:00 2001 From: matiwari Date: Mon, 4 Mar 2024 01:00:10 +0530 Subject: [PATCH 16/32] Update to 0.22.5 release --- gettext.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 91634c3..66a15fc 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,8 +4,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.22.4 -Release: 2%{?dist} +Version: 0.22.5 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -447,6 +447,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon Mar 4 2024 Manish Tiwari - 0.22.5-1 +- update to 0.22.5 release +- https://savannah.gnu.org/news/?id=10597 + * Wed Feb 21 2024 Manish Tiwari - 0.22.4-2 - Add back libtextstyle library for rawhide (#2264128) diff --git a/sources b/sources index ff8d342..a34bba2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.22.4.tar.gz) = ad2fa2f69be996a637e9b51e8941a39e10050060245dcec1fe75c15b68d0ff973043c87b77e4e2830e407e3bdd040b578f8e24fd05bba43adb94eaee34001aa5 +SHA512 (gettext-0.22.5.tar.gz) = d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be From 935d833dd9e9892c5f11f7b23384eb7f831627d0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 8 Mar 2024 14:49:40 +0800 Subject: [PATCH 17/32] condition libtextstyle obsoletes --- gettext.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 66a15fc..1358f4c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -126,7 +126,9 @@ 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 @@ -140,7 +142,9 @@ Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ License: LGPL-2.0-or-later AND GPL-3.0-or-later +%if %{without libtextstyle} Obsoletes: libtextstyle < %{version}-%{release} +%endif %description libs This package contains libraries used internationalization support. @@ -447,6 +451,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Fri Mar 8 2024 Jens Petersen - 0.22.5-2 +- condition libtextstyle obsoletes + * Mon Mar 4 2024 Manish Tiwari - 0.22.5-1 - update to 0.22.5 release - https://savannah.gnu.org/news/?id=10597 From 44a6e9d2bed23e6b6404319e27f093c3a2936a77 Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 2 Jul 2024 23:01:16 +0530 Subject: [PATCH 18/32] Enable libtextstyle for f40 --- gettext.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gettext.spec b/gettext.spec index 1358f4c..6e82178 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,11 +1,11 @@ %bcond_with jar %bcond_with java -%bcond libtextstyle %[0%{?fedora} > 40] +%bcond libtextstyle %[0%{?fedora} >= 40] Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -451,6 +451,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Jul 2 2024 Manish Tiwari - 0.22.5-3 +- Add back libtextstyle for f40 (#2278984) + * Fri Mar 8 2024 Jens Petersen - 0.22.5-2 - condition libtextstyle obsoletes From 205b6879b5d3c1d5b2608b4e02fc8b898950bc5a Mon Sep 17 00:00:00 2001 From: matiwari Date: Thu, 4 Jul 2024 19:32:24 +0530 Subject: [PATCH 19/32] Add explicit package version requirement for libtextstyle --- gettext.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 6e82178..36dcf60 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 3%{?dist} +Release: 4%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -74,6 +74,9 @@ 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 @@ -142,6 +145,9 @@ 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} +Requires: libtextstyle%{?_isa} = %{version}-%{release} +%endif %if %{without libtextstyle} Obsoletes: libtextstyle < %{version}-%{release} %endif @@ -451,6 +457,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 4 2024 Manish Tiwari - 0.22.5-4 +- Add explicit package version requirement for libtextstyle + * Tue Jul 2 2024 Manish Tiwari - 0.22.5-3 - Add back libtextstyle for f40 (#2278984) From 1a3bc0afb588f9f1365ae5b78875389a286845e0 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 10 Jul 2024 23:47:52 +0530 Subject: [PATCH 20/32] CI tests migration to tmt --- .fmf/version | 1 + gettext.spec | 5 +- plans/basic.fmf | 5 + tests/main.fmf | 5 + tests/test.sh | 25 +++++ tests/test_gettext.py | 227 ++++++++++++++++++++++++++++++++++++++++++ tests/test_i18n.py | 14 +++ tests/tests.yml | 16 --- 8 files changed, 281 insertions(+), 17 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/basic.fmf create mode 100644 tests/main.fmf create mode 100755 tests/test.sh create mode 100644 tests/test_gettext.py create mode 100644 tests/test_i18n.py delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gettext.spec b/gettext.spec index 36dcf60..94fc142 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 4%{?dist} +Release: 5%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -457,6 +457,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 11 2024 Manish Tiwari - 0.22.5-5 +- CI gating tests migration to tmt + * Thu Jul 4 2024 Manish Tiwari - 0.22.5-4 - Add explicit package version requirement for libtextstyle diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..2ff84b6 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,5 @@ +summary: Run gettext test +test: ./test.sh +framework: beakerlib +require: + - gettext diff --git a/tests/test.sh b/tests/test.sh new file mode 100755 index 0000000..507b6c5 --- /dev/null +++ b/tests/test.sh @@ -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 diff --git a/tests/test_gettext.py b/tests/test_gettext.py new file mode 100644 index 0000000..3bda128 --- /dev/null +++ b/tests/test_gettext.py @@ -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() diff --git a/tests/test_i18n.py b/tests/test_i18n.py new file mode 100644 index 0000000..84a3318 --- /dev/null +++ b/tests/test_i18n.py @@ -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]) diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 54627ef..0000000 --- a/tests/tests.yml +++ /dev/null @@ -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 From 057981b3714b1206c78ba7db483519ee0066114f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 00:29:00 +0000 Subject: [PATCH 21/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 94fc142..d329b5a 100644 --- a/gettext.spec +++ b/gettext.spec @@ -5,7 +5,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.22.5 -Release: 5%{?dist} +Release: 6%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -457,6 +457,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 0.22.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jul 11 2024 Manish Tiwari - 0.22.5-5 - CI gating tests migration to tmt From 368c0cc2837cc79b27eadae62739e4f519b10f42 Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 11 Dec 2024 14:25:19 +0530 Subject: [PATCH 22/32] Update to 0.23 release --- gettext-0.22-disable-libtextstyle.patch | 110 ------------------------ gettext-0.23-libxml2.patch | 25 ++++++ gettext.spec | 42 +++++---- sources | 2 +- 4 files changed, 46 insertions(+), 133 deletions(-) delete mode 100644 gettext-0.22-disable-libtextstyle.patch create mode 100644 gettext-0.23-libxml2.patch diff --git a/gettext-0.22-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch deleted file mode 100644 index 771c49c..0000000 --- a/gettext-0.22-disable-libtextstyle.patch +++ /dev/null @@ -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. diff --git a/gettext-0.23-libxml2.patch b/gettext-0.23-libxml2.patch new file mode 100644 index 0000000..21e6589 --- /dev/null +++ b/gettext-0.23-libxml2.patch @@ -0,0 +1,25 @@ +diff -ur gettext-0.23.orig/gettext-tools/src/its.c gettext-0.23/gettext-tools/src/its.c +--- gettext-0.23.orig/gettext-tools/src/its.c 2024-10-13 16:14:36.000000000 +0530 ++++ gettext-0.23/gettext-tools/src/its.c 2024-12-05 23:24:03.100545103 +0530 +@@ -28,6 +28,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -82,7 +83,13 @@ + /* ----------------------------- Error handling ----------------------------- */ + + static void ++/* Adapt to API change in libxml 2.12.0. +++ See . */ ++#if LIBXML_VERSION >= 21200 ++structured_error (void *data, const xmlError *err) ++#else + structured_error (void *data, xmlError *err) ++#endif + { + error (0, err->level == XML_ERR_FATAL ? EXIT_FAILURE : 0, + _("%s error: %s"), "libxml2", err->message); diff --git a/gettext.spec b/gettext.spec index d329b5a..6c3906f 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,11 +1,10 @@ %bcond_with jar %bcond_with java -%bcond libtextstyle %[0%{?fedora} >= 40] Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.22.5 -Release: 6%{?dist} +Version: 0.23 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -27,8 +26,7 @@ Source2: msghack.py Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch -Patch2: gettext-0.22-disable-libtextstyle.patch - +Patch2: gettext-0.23-libxml2.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -74,9 +72,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 @@ -129,9 +125,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 @@ -145,17 +138,11 @@ 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} 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 @@ -173,7 +160,6 @@ Requires: libtextstyle%{?_isa} = %{version}-%{release} 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 +193,7 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ -%if %{without libtextstyle} %patch 2 -p1 -b .orig~ -%endif autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -330,7 +314,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 +353,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 @@ -433,7 +427,6 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/libintl.jar %endif -%if %{with libtextstyle} %files -n libtextstyle %{_libdir}/libtextstyle.so.0* @@ -443,7 +436,6 @@ make check LIBUNISTRING=-lunistring %{_includedir}/textstyle.h %{_infodir}/libtextstyle* %{_libdir}/libtextstyle.so -%endif %files -n emacs-%{name} %dir %{_emacs_sitelispdir}/%{name} @@ -457,6 +449,12 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Dec 11 2024 Manish Tiwari - 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 - 0.22.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index a34bba2..7e00b88 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.22.5.tar.gz) = d8b22d7fba10052a2045f477f0a5b684d932513bdb3b295c22fbd9dfc2a9d8fccd9aefd90692136c62897149aa2f7d1145ce6618aa1f0be787cb88eba5bc09be +SHA512 (gettext-0.23.tar.gz) = bdccfdf9441e704862745098014aa02a27c6a4cbcefbbf430496169d30be6b72d91081754666ceb4f1a79daceb26de1da149627f205121ee1a83efe33e354525 From ec95bbdbda72697d32aaab2071db029770ec6bd7 Mon Sep 17 00:00:00 2001 From: matiwari Date: Sat, 21 Dec 2024 13:12:36 +0530 Subject: [PATCH 23/32] Use lowercase boolean in SPDX expression to avoid mixed case --- gettext.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gettext.spec b/gettext.spec index 6c3906f..1107cfe 100644 --- a/gettext.spec +++ b/gettext.spec @@ -19,7 +19,7 @@ Release: 1%{?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 @@ -89,7 +89,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} @@ -117,7 +117,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} @@ -137,7 +137,7 @@ 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 +License: LGPL-2.0-or-later and GPL-3.0-or-later Requires: libtextstyle%{?_isa} = %{version}-%{release} %description libs @@ -153,7 +153,7 @@ 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 From f92414c279f61e8d5ad6c5e556d2e055ca65d19c Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 1 Jan 2025 16:19:26 +0530 Subject: [PATCH 24/32] Update to 0.23.1 release --- gettext-0.23-libxml2.patch | 25 ------------------------- gettext.spec | 8 +++++--- sources | 2 +- 3 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 gettext-0.23-libxml2.patch diff --git a/gettext-0.23-libxml2.patch b/gettext-0.23-libxml2.patch deleted file mode 100644 index 21e6589..0000000 --- a/gettext-0.23-libxml2.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ur gettext-0.23.orig/gettext-tools/src/its.c gettext-0.23/gettext-tools/src/its.c ---- gettext-0.23.orig/gettext-tools/src/its.c 2024-10-13 16:14:36.000000000 +0530 -+++ gettext-0.23/gettext-tools/src/its.c 2024-12-05 23:24:03.100545103 +0530 -@@ -28,6 +28,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -82,7 +83,13 @@ - /* ----------------------------- Error handling ----------------------------- */ - - static void -+/* Adapt to API change in libxml 2.12.0. -++ See . */ -+#if LIBXML_VERSION >= 21200 -+structured_error (void *data, const xmlError *err) -+#else - structured_error (void *data, xmlError *err) -+#endif - { - error (0, err->level == XML_ERR_FATAL ? EXIT_FAILURE : 0, - _("%s error: %s"), "libxml2", err->message); diff --git a/gettext.spec b/gettext.spec index 1107cfe..6cfde83 100644 --- a/gettext.spec +++ b/gettext.spec @@ -3,7 +3,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.23 +Version: 0.23.1 Release: 1%{?dist} # The following are licensed under LGPLv2+: @@ -26,7 +26,6 @@ Source2: msghack.py Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch -Patch2: gettext-0.23-libxml2.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -193,7 +192,6 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ -%patch 2 -p1 -b .orig~ autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -449,6 +447,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jan 1 2025 Manish Tiwari - 0.23.1-1 +- update to 0.23.1 release +- Remove gettext-0.23-libxml2 patch + * Wed Dec 11 2024 Manish Tiwari - 0.23-1 - update to 0.23 release - https://savannah.gnu.org/news/?id=10699 diff --git a/sources b/sources index 7e00b88..f886dc3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.23.tar.gz) = bdccfdf9441e704862745098014aa02a27c6a4cbcefbbf430496169d30be6b72d91081754666ceb4f1a79daceb26de1da149627f205121ee1a83efe33e354525 +SHA512 (gettext-0.23.1.tar.gz) = 39ccf78961e4baae761a6117dcec02957bbbdbd398197b8b11ea18e53c04bf2500a7c143d3f9ea3ded48c55f71a323eb05ee0e461c1d9b397297e971b8ad6eef From 9f7d17485699c5a4ed31e6ae74d36ad84f5a30c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 19:50:07 +0000 Subject: [PATCH 25/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 6cfde83..46c58b3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.23.1 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -447,6 +447,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 0.23.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jan 1 2025 Manish Tiwari - 0.23.1-1 - update to 0.23.1 release - Remove gettext-0.23-libxml2 patch From 74ac9f07a14d26e5dad0dabb73eaa0089c2f128d Mon Sep 17 00:00:00 2001 From: matiwari Date: Sat, 1 Mar 2025 00:17:23 +0530 Subject: [PATCH 26/32] Update to 0.24 release --- gettext.spec | 12 ++++++++++-- sources | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 46c58b3..7bd2ce7 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,10 +1,14 @@ %bcond_with jar %bcond_with java +# 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.23.1 -Release: 2%{?dist} +Version: 0.24 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -447,6 +451,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Feb 27 2025 Manish Tiwari - 0.24-1 +- update to 0.24 release +- https://savannah.gnu.org/news/?id=10730 + * Thu Jan 16 2025 Fedora Release Engineering - 0.23.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index f886dc3..0314194 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.23.1.tar.gz) = 39ccf78961e4baae761a6117dcec02957bbbdbd398197b8b11ea18e53c04bf2500a7c143d3f9ea3ded48c55f71a323eb05ee0e461c1d9b397297e971b8ad6eef +SHA512 (gettext-0.24.tar.gz) = 9e9913fec1d3eeff65e023ee00c5da456baceabd49ce0c0d21f19b9911a60b67546f4ee5716f6f5b7a160b4c13c47604da8762854eba6f17f9bf3fd1c6056828 From 9b44db8d2186b3d52ece9adddc945de27dac580a Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 13 May 2025 19:06:43 +0530 Subject: [PATCH 27/32] Update to 0.25 release --- gettext.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index 7bd2ce7..e0a92b6 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.24 +Version: 0.25 Release: 1%{?dist} # The following are licensed under LGPLv2+: @@ -404,7 +404,7 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/config.rpath %{_datadir}/%{name}/*.h %{_datadir}/%{name}/msgunfmt.tcl -%{_datadir}/aclocal/* +%{_datadir}/%{name}/m4/* %{_includedir}/autosprintf.h %{_includedir}/gettext-po.h %{_infodir}/autosprintf* @@ -451,6 +451,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Mon May 12 2025 Manish Tiwari - 0.25-1 +- update to 0.25 release +- https://savannah.gnu.org/news/?id=10769 + * Thu Feb 27 2025 Manish Tiwari - 0.24-1 - update to 0.24 release - https://savannah.gnu.org/news/?id=10730 diff --git a/sources b/sources index 0314194..267fa7c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.24.tar.gz) = 9e9913fec1d3eeff65e023ee00c5da456baceabd49ce0c0d21f19b9911a60b67546f4ee5716f6f5b7a160b4c13c47604da8762854eba6f17f9bf3fd1c6056828 +SHA512 (gettext-0.25.tar.gz) = a086191926f9d9d87ec45136e0796626140f0209d71b498756cda8212b71343b76643cd28aaeb74370b661d99d8ceea25ba3afd24d9dca4814a552436066d393 From 7e8960bf7649f4511d26145faf0777c7844dee6c Mon Sep 17 00:00:00 2001 From: matiwari Date: Wed, 23 Jul 2025 13:19:10 +0530 Subject: [PATCH 28/32] Update to release 0.25.1 --- gettext.spec | 9 ++++++++- sources | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gettext.spec b/gettext.spec index e0a92b6..64031f3 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,7 +7,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.25 +Version: 0.25.1 Release: 1%{?dist} # The following are licensed under LGPLv2+: @@ -405,6 +405,7 @@ make check LIBUNISTRING=-lunistring %{_datadir}/%{name}/*.h %{_datadir}/%{name}/msgunfmt.tcl %{_datadir}/%{name}/m4/* +%{_datadir}/aclocal/nls.m4 %{_includedir}/autosprintf.h %{_includedir}/gettext-po.h %{_infodir}/autosprintf* @@ -451,6 +452,12 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 23 2025 Manish Tiwari - 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 - 0.25-1 - update to 0.25 release - https://savannah.gnu.org/news/?id=10769 diff --git a/sources b/sources index 267fa7c..8f30fb0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.25.tar.gz) = a086191926f9d9d87ec45136e0796626140f0209d71b498756cda8212b71343b76643cd28aaeb74370b661d99d8ceea25ba3afd24d9dca4814a552436066d393 +SHA512 (gettext-0.25.1.tar.gz) = f7cac3969628edde007f0378e8c4536dda98228ec7b806ecf35bec2367ddd1c169d258310e0ed4310e71614421028cbaf7aeedda87924020db38c43460ab10df From c94ec5b16a723e1c182c06535889c564d7f1d3f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 21:17:40 +0000 Subject: [PATCH 29/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gettext.spec b/gettext.spec index 64031f3..eb76ccf 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.25.1 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -452,6 +452,9 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 0.25.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jul 23 2025 Manish Tiwari - 0.25.1-1 - update to 0.25.1 release - Bug fixes: From a40f3de97fefd556582543a4268acb342da52859 Mon Sep 17 00:00:00 2001 From: matiwari Date: Tue, 19 Aug 2025 23:15:33 +0530 Subject: [PATCH 30/32] Update to release 0.26 --- gettext.spec | 10 ++++++++-- sources | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gettext.spec b/gettext.spec index eb76ccf..40e26d9 100644 --- a/gettext.spec +++ b/gettext.spec @@ -7,8 +7,8 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext -Version: 0.25.1 -Release: 2%{?dist} +Version: 0.26 +Release: 1%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -377,6 +377,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* @@ -452,6 +454,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Tue Aug 19 2025 Manish Tiwari - 0.26-1 +- update to 0.26 release +- https://savannah.gnu.org/news/?id=10789 + * Wed Jul 23 2025 Fedora Release Engineering - 0.25.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 8f30fb0..2017c93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gettext-0.25.1.tar.gz) = f7cac3969628edde007f0378e8c4536dda98228ec7b806ecf35bec2367ddd1c169d258310e0ed4310e71614421028cbaf7aeedda87924020db38c43460ab10df +SHA512 (gettext-0.26.tar.gz) = 6c2afb0737843028e1cd27f1cd7dd5b81372ccff8cd8e01e17cfdc517afdd9a849c232f1ff5adca5eb4b03f2cc64f4a3f689ae8b84e523ceeae85384f3844083 From bb34f17628e02dd95e395157b1d3bd98b3b28ad8 Mon Sep 17 00:00:00 2001 From: matiwari Date: Thu, 18 Dec 2025 11:42:38 +0530 Subject: [PATCH 31/32] Fix build failure with glibc 2.42 C23 const-preserving macros --- gettext-0.26-c23.diff | 486 ++++++++++++++++++++++++++++++++++++++++++ gettext.spec | 8 +- 2 files changed, 493 insertions(+), 1 deletion(-) create mode 100644 gettext-0.26-c23.diff diff --git a/gettext-0.26-c23.diff b/gettext-0.26-c23.diff new file mode 100644 index 0000000..a4f7584 --- /dev/null +++ b/gettext-0.26-c23.diff @@ -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 diff --git a/gettext.spec b/gettext.spec index 40e26d9..b6a2c6b 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.26 -Release: 1%{?dist} +Release: 2%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -30,6 +30,7 @@ Source2: msghack.py Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch +Patch2: gettext-0.26-c23.diff # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -196,6 +197,7 @@ Substitutes the values of environment variables. %prep %setup -q %patch 1 -p1 -b .orig~ +%patch 2 -p1 -b .orig~ autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -454,6 +456,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Thu Dec 18 2025 Manish Tiwari - 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 - 0.26-1 - update to 0.26 release - https://savannah.gnu.org/news/?id=10789 From 98705c64dddad7c67ccf5a43cbf9858fd1264a39 Mon Sep 17 00:00:00 2001 From: matiwari Date: Mon, 12 Jan 2026 11:02:16 +0530 Subject: [PATCH 32/32] stdcountof-h tests: Fix compilation error with gcc-16 --- gettext-0.26-stdcountof-h.patch | 25 +++++++++++++++++++++++++ gettext.spec | 8 +++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gettext-0.26-stdcountof-h.patch diff --git a/gettext-0.26-stdcountof-h.patch b/gettext-0.26-stdcountof-h.patch new file mode 100644 index 0000000..9070710 --- /dev/null +++ b/gettext-0.26-stdcountof-h.patch @@ -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); diff --git a/gettext.spec b/gettext.spec index b6a2c6b..b71e10c 100644 --- a/gettext.spec +++ b/gettext.spec @@ -8,7 +8,7 @@ Summary: GNU tools and libraries for localized translated messages Name: gettext Version: 0.26 -Release: 2%{?dist} +Release: 3%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -31,6 +31,7 @@ Source3: msghack.1 Patch1: gettext-0.21.1-covscan.patch Patch2: gettext-0.26-c23.diff +Patch3: gettext-0.26-stdcountof-h.patch # for bootstrapping # BuildRequires: autoconf >= 2.62 BuildRequires: automake @@ -198,6 +199,7 @@ Substitutes the values of environment variables. %setup -q %patch 1 -p1 -b .orig~ %patch 2 -p1 -b .orig~ +%patch 3 -p1 -b .orig~ autoreconf # Defeat libtextstyle attempt to bundle libxml2. The comments @@ -456,6 +458,10 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/msghack.1* %changelog +* Sun Jan 11 2026 Manish Tiwari - 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 - 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