diff --git a/gettext-0.21.1-disable-gnulib-test-execute-sh.patch b/gettext-0.21.1-disable-gnulib-test-execute-sh.patch deleted file mode 100644 index 751dcca2ece8b1e41ddb69852597a42745fbabfb..0000000000000000000000000000000000000000 --- a/gettext-0.21.1-disable-gnulib-test-execute-sh.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- gettext-0.21.1/gettext-tools/gnulib-tests/Makefile.gnulib.orig 2022-12-09 12:43:32.376802574 +0800 -+++ gettext-0.21.1/gettext-tools/gnulib-tests/Makefile.gnulib 2022-12-09 12:43:44.042802574 +0800 -@@ -459,8 +459,8 @@ - - ## begin gnulib module execute-tests - --TESTS += test-execute.sh --check_PROGRAMS += test-execute-main test-execute-child -+#TESTS += test-execute.sh -+#check_PROGRAMS += test-execute-main test-execute-child - test_execute_main_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) - # The test-execute-child program must be a real executable, not a libtool - # wrapper script, and should link against as few libraries as possible. diff --git a/gettext-0.22.3-disable-gnulib-tests.patch b/gettext-0.22.3-disable-gnulib-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..817c7acc5c99daa27fdab169320e97e3d0dd7d6d --- /dev/null +++ b/gettext-0.22.3-disable-gnulib-tests.patch @@ -0,0 +1,11 @@ +--- gettext-0.22.3/gettext-tools/Makefile.am.orig 2023-10-05 20:39:42.496910400 +0800 ++++ gettext-0.22.3/gettext-tools/Makefile.am 2023-10-05 20:39:52.202194700 +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 = gnulib-lib libgrep libgettextpo src 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 examples doc + + EXTRA_DIST = misc/DISCLAIM + MOSTLYCLEANFILES = core *.stackdump diff --git a/gettext-0.21.1-disable-libtextstyle.patch b/gettext-0.22.3-disable-libtextstyle.patch similarity index 71% rename from gettext-0.21.1-disable-libtextstyle.patch rename to gettext-0.22.3-disable-libtextstyle.patch index cb70687bdfd1837170629fd2a0c98b19f5b1c9ab..05eda8577d93a85d85f52c75686d124ede9ef0b8 100644 --- a/gettext-0.21.1-disable-libtextstyle.patch +++ b/gettext-0.22.3-disable-libtextstyle.patch @@ -1,29 +1,6 @@ -diff --git a/Makefile.am b/Makefile.am -index 5a7184c..28267a5 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -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 \ -@@ -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 - 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. +--- gettext-0.22.3/configure.ac.orig 2022-10-09 10:35:42.000000000 +0800 ++++ gettext-0.22.3/configure.ac 2023-10-05 20:15:29.172659000 +0800 +@@ -37,7 +37,7 @@ dnl Checks for library functions. @@ -32,7 +9,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 +18,9 @@ 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 -@@ -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 - - 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; +--- gettext-0.22.3/gettext-tools/libgettextpo/textstyle.in.h.orig 2023-09-19 04:36:31.000000000 +0800 ++++ gettext-0.22.3/gettext-tools/libgettextpo/textstyle.in.h 2023-10-05 20:15:29.208046500 +0800 +@@ -255,7 +255,8 @@ static inline file_ostream_t file_ostream_create (FILE *fp) { @@ -67,9 +29,24 @@ index 05ce0cf..936331c 100644 + return fdopen (dup (fileno (fp)), "w"); } - /* --------------------------- From fd-ostream.h --------------------------- */ -@@ -439,6 +440,30 @@ html_styled_ostream_create (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t destination, - return NULL; + static inline bool +@@ -673,14 +674,6 @@ + return true; + } + +-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; +-} + + static inline bool + is_instance_of_noop_styled_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream) +@@ -688,6 +681,30 @@ + return false; } +/* ----------------------- From noop-styled-ostream.h ----------------------- */ @@ -99,11 +76,20 @@ 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 +--- gettext-0.22.3/gettext-tools/Makefile.am.orig 2023-09-19 04:08:31.000000000 +0800 ++++ gettext-0.22.3/gettext-tools/Makefile.am 2023-10-05 20:15:29.179858700 +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 = 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 +--- gettext-0.22.3/gettext-tools/src/Makefile.am.orig 2023-09-19 04:10:32.000000000 +0800 ++++ gettext-0.22.3/gettext-tools/src/Makefile.am 2023-10-05 20:15:29.189982500 +0800 +@@ -305,19 +305,9 @@ cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_LDADD = libgettextsrc.la $(LDADD) @@ -126,4 +112,22 @@ index 510ab2a..72791ba 100644 # How to build libgettextsrc.la. # Need ../gnulib-lib/libgettextlib.la. - +--- gettext-0.22.3/Makefile.am.orig 2023-09-19 04:10:32.000000000 +0800 ++++ gettext-0.22.3/Makefile.am 2023-10-05 20:15:29.164534300 +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,6 @@ + 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)/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.21.1.tar.xz b/gettext-0.22.4.tar.xz similarity index 55% rename from gettext-0.21.1.tar.xz rename to gettext-0.22.4.tar.xz index 4f8848064c17a98a47891743d67640b7d4b6e32f..a5582e6c5f49bd89707042fa05afc010cf9b5257 100644 Binary files a/gettext-0.21.1.tar.xz and b/gettext-0.22.4.tar.xz differ diff --git a/gettext-java17-2062407.patch b/gettext-java17-2062407.patch deleted file mode 100644 index e29fe77aeedbb800f11c826eada3c01d54a85c03..0000000000000000000000000000000000000000 --- 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 ec84a3b83fbbe95a287b49d7f2a0a704e446b56e..b467ff65e81a50d54a39152526bb9ff81aede0f5 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,10 +1,7 @@ -%define anolis_release 4 - -%bcond_with jar -%bcond_with java +%define anolis_release 1 Name: gettext -Version: 0.21.1 +Version: 0.22.4 Release: %{anolis_release}%{?dist} Summary: Gettext tools and documentation for developers and translators License: GPLv3+ and LGPLv2+ and GFDL @@ -14,13 +11,6 @@ Source2: msghack.py Source3: msghack.1 BuildRequires: automake libtool gcc-c++ -%if %{with java} -BuildRequires: gcc-java, libgcj -BuildRequires: java-1.6.0-openjdk-devel -%if %{with jar} -BuildRequires: %{_bindir}/fastjar zip, unzip -%endif -%endif BuildRequires: emacs git xz BuildRequires: teckit texlive-dvips texlive-dvipdfmx texinfo-tex texlive-xetex BuildRequires: ncurses-devel libxml2-devel glib2-devel libacl-devel libunistring-devel @@ -29,12 +19,9 @@ BuildRequires: glibc-langpack-ja glibc-langpack-tr glibc-langpack-zh Provides: bundled(gnulib) bundled(libcroco) = 0.6.12 Requires: %{name}-runtime = %{version}-%{release} %{name}-libs = %{version}-%{release} -Patch1: %{name}-%{version}-disable-libtextstyle.patch -Patch2: %{name}-%{version}-covscan.patch -Patch3: %{name}-java17-2062407.patch - -# Disable gnulib test-execute.sh test, as it always fail on koji/an23 -Patch101: %{name}-0.21.1-disable-gnulib-test-execute-sh.patch +Patch1: gettext-0.22.3-disable-libtextstyle.patch +Patch2: gettext-0.21.1-covscan.patch +Patch3: gettext-0.22.3-disable-gnulib-tests.patch %description The GNU %{name} package provides a set of tools and documentation for @@ -135,30 +122,12 @@ autoreconf -fi sed -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \ -i libtextstyle/configure -%if %{with java} -export JAVAC=gcj -%if %{with jar} -export JAR=fastjar -%endif -%endif - -export CPPFLAGS="-I%{_includedir}/libxml2" -export LIBS="-lxml2" %configure --enable-nls --disable-static \ --enable-shared --disable-csharp --disable-rpath \ -%if %{with java} - --enable-java \ -%else --disable-java --disable-native-java \ -%endif --with-xz -sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ - -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ - -e 's|CC=.g..|& -Wl,--as-needed|' \ - -i $(find . -name libtool) - -%make_build %{?with_java:GCJFLAGS="-findirect-dispatch"} +%make_build %install %make_install \ @@ -183,10 +152,6 @@ mv %{buildroot}%{_datadir}/doc/%{name}/* %{buildroot}/%{_datadir}/doc/libasprint rm -r %{buildroot}%{_datadir}/doc/libasprintf rm -r %{buildroot}%{_datadir}/doc/%{name} -%if %{with jar} -rm -f %{buildroot}%{_datadir}/%{name}/libintl.jar -%endif - rm -f %{buildroot}%{_datadir}/%{name}/%{name}.jar # own this directory for third-party *.its files @@ -204,8 +169,7 @@ rm %{buildroot}%{_emacs_sitelispdir}/%{name}/start-po.elc %generate_compatibility_deps %check -export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$PWD/%{name}-tools/intl/.libs - +export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-runtime/intl/.libs make check LIBUNISTRING=-lunistring %files -f %{name}-tools.lang @@ -266,9 +230,6 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/recode-sr-latin.1* %{_mandir}/man1/xgettext.1* %{_libdir}/%{name} -%if %{with java} -%exclude %{_libdir}/%{name}/gnu.%{name}.* -%endif %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/its %{_datadir}/%{name}/ABOUT-NLS @@ -287,9 +248,6 @@ make check LIBUNISTRING=-lunistring %{_libdir}/libgettextpo.so.0* %{_libdir}/libgettextlib-0.*.so %{_libdir}/libgettextsrc-0.*.so -%if %{with jar} -%{_datadir}/%{name}/libintl.jar -%endif %files devel %doc %{name}-runtime/intl-java/javadoc* @@ -316,9 +274,6 @@ make check LIBUNISTRING=-lunistring %{_mandir}/man1/autopoint.1* %{_mandir}/man1/gettextize.1* %{_mandir}/man3/* -%if %{with java} -%{_libdir}/%{name}/gnu.%{name}.* -%endif %files common-devel %{_datadir}/%{name}/archive.*.tar.xz @@ -360,6 +315,9 @@ make check LIBUNISTRING=-lunistring %doc AUTHORS %{name}-runtime/BUGS README NEWS THANKS %changelog +* Mon Nov 20 2023 Funda Wang - 0.22.4-1 +- New version 0.22.4 + * Sat Apr 15 2023 Jing Zhang - 0.21.1-4 - Refact spec