diff --git a/gettext-0.21.1-covscan.patch b/gettext-0.21.1-covscan.patch new file mode 100644 index 0000000000000000000000000000000000000000..af87a6d0298bcebac828356a29296da483740eda --- /dev/null +++ b/gettext-0.21.1-covscan.patch @@ -0,0 +1,70 @@ +diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c +index 965cc8c..38c7ca1 100644 +--- a/gettext-tools/src/msgl-cat.c ++++ b/gettext-tools/src/msgl-cat.c +@@ -307,6 +307,7 @@ catenate_msgdomain_list (string_list_ty *file_list, + mp->msgid); + multiline_error (xstrdup (""), + xasprintf ("%s\n", errormsg)); ++ free (errormsg); + } + } + else +diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c +index 13d4a53..669db2f 100644 +--- a/gettext-tools/src/x-csharp.c ++++ b/gettext-tools/src/x-csharp.c +@@ -561,6 +561,7 @@ comment_line_end (size_t chars_to_remove) + buffer[buflen] = '\0'; + savable_comment_add (buffer); + lexical_context = lc_outside; ++ free (buffer); + } + + +diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c +index e89ab95..6c1b4a7 100644 +--- a/gettext-tools/src/x-java.c ++++ b/gettext-tools/src/x-java.c +@@ -461,6 +461,7 @@ comment_line_end (size_t chars_to_remove) + --buflen; + buffer[buflen] = '\0'; + savable_comment_add (buffer); ++ free (buffer); + } + + +diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c +index cde1ee6..82f645f 100644 +--- a/gettext-tools/src/x-rst.c ++++ b/gettext-tools/src/x-rst.c +@@ -651,6 +651,8 @@ extract_rsj (FILE *f, + else + goto invalid_rsj; + ++ free (s1); ++ + /* Parse a comma. */ + c = phase2_getc (); + if (c == '}') +@@ -667,6 +669,7 @@ extract_rsj (FILE *f, + + fp = NULL; + real_file_name = NULL; ++ free (logical_file_name); + logical_file_name = NULL; + line_number = 0; + +diff --git a/gettext-tools/src/xg-arglist-callshape.c b/gettext-tools/src/xg-arglist-callshape.c +index 06b7076..2189aac 100644 +--- a/gettext-tools/src/xg-arglist-callshape.c ++++ b/gettext-tools/src/xg-arglist-callshape.c +@@ -118,6 +118,7 @@ split_keywordspec (const char *spec, + memcpy (xcomment, xcomment_start, xcomment_len); + xcomment[xcomment_len] = '\0'; + string_list_append (&xcomments, xcomment); ++ free (xcomment); + } + else + break; + diff --git a/gettext-0.21.1-disable-gnulib-test-execute-sh.patch b/gettext-0.21.1-disable-gnulib-test-execute-sh.patch new file mode 100644 index 0000000000000000000000000000000000000000..751dcca2ece8b1e41ddb69852597a42745fbabfb --- /dev/null +++ b/gettext-0.21.1-disable-gnulib-test-execute-sh.patch @@ -0,0 +1,13 @@ +--- 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.21.1-disable-libtextstyle.patch b/gettext-0.21.1-disable-libtextstyle.patch new file mode 100644 index 0000000000000000000000000000000000000000..cb70687bdfd1837170629fd2a0c98b19f5b1c9ab --- /dev/null +++ b/gettext-0.21.1-disable-libtextstyle.patch @@ -0,0 +1,129 @@ +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. + + 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 @@ AC_CANONICAL_HOST + 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 --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; + 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 --------------------------- */ +@@ -439,6 +440,30 @@ html_styled_ostream_create (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t destination, + 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 --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 + 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 --git a/gettext-0.21.tar.xz b/gettext-0.21.1.tar.xz similarity index 54% rename from gettext-0.21.tar.xz rename to gettext-0.21.1.tar.xz index b1b4a65144718b239fce820744f2c18faef8768a..4f8848064c17a98a47891743d67640b7d4b6e32f 100644 Binary files a/gettext-0.21.tar.xz and b/gettext-0.21.1.tar.xz differ diff --git a/gettext-java17-2062407.patch b/gettext-java17-2062407.patch new file mode 100644 index 0000000000000000000000000000000000000000..e29fe77aeedbb800f11c826eada3c01d54a85c03 --- /dev/null +++ b/gettext-java17-2062407.patch @@ -0,0 +1,116 @@ +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 0bdc447d86522bcedccd0b7b2c395f457506172d..502f3a0c5e003b28ff20a145f80e205f71b8b191 100644 --- a/gettext.spec +++ b/gettext.spec @@ -1,14 +1,11 @@ -%define anolis_release 4 +%define anolis_release 3 %bcond_with jar %bcond_with java -%global tarversion 0.21 -%global archiveversion 0.21 - -Summary: GNU libraries and utilities for producing multi-lingual messages +Summary: Gettext tools and documentation for developers and translators Name: gettext -Version: %{tarversion} +Version: 0.21.1 Release: %{anolis_release}%{?dist} # The following are licensed under LGPLv2+: # - libintl and its headers @@ -29,6 +26,17 @@ Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz Source2: msghack.py Source3: msghack.1 +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: gettext-0.21.1-disable-gnulib-test-execute-sh.patch + +# for bootstrapping +# BuildRequires: autoconf >= 2.62 +BuildRequires: automake +BuildRequires: libtool BuildRequires: gcc-c++ %if %{with java} @@ -72,6 +80,7 @@ BuildRequires: glibc-langpack-zh Requires: %{name}-libs = %{version}-%{release} Provides: bundled(gnulib) Provides: bundled(libcroco) = 0.6.12 +Requires: %{name}-runtime = %{version}-%{release} %description The GNU gettext package provides a set of tools and documentation for @@ -85,6 +94,19 @@ library and tools for creating, using, and modifying natural language catalogs and is a powerful and simple method for internationalizing programs. +%package runtime +Summary: GNU runtime libraries and programs for producing multi-lingual messages +License: GPLv3+ and LGPLv2+ +# Depend on the exact version of the library sub package +Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-envsubst = %{version}-%{release} +Conflicts: %{name} < 0.21.1 + +%description runtime +The GNU gettext-runtime package provides an easy to use runtime libraries and +programs for creating, using, and modifying natural language catalogs +and is a powerful and simple method for internationalizing programs. + %package doc Summary: Documentation files for %{name} Requires: %{name} = %{version}-%{release} @@ -116,6 +138,7 @@ Requires: xz Requires: diffutils Obsoletes: gettext-autopoint < 0.18.1.1-3 Provides: gettext-autopoint = %{version}-%{release} +Obsoletes: libtextstyle-devel < %{version}-%{release} %description devel This package contains all development related files necessary for @@ -129,31 +152,11 @@ Summary: Libraries for %{name} # libasprintf is LGPLv2+ # libgettextpo is GPLv3+ License: LGPLv2+ and GPLv3+ +Obsoletes: libtextstyle < %{version}-%{release} %description libs This package contains libraries used internationalization support. - -%package -n libtextstyle -Summary: Text styling library -License: GPLv3+ - -%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: GPLv3+ and GFDL -Requires: libtextstyle = %{version}-%{release} - -%description -n libtextstyle-devel -This package contains all development related files necessary for -developing or compiling applications/libraries that needs text -styling. - - %package -n emacs-%{name} Summary: Support for editing po files within GNU Emacs BuildArch: noarch @@ -174,9 +177,20 @@ BuildArch: noarch This program can be used to alter .po files in ways no sane mind would think about. +%package envsubst +Summary: Substitutes the values of environment variables +Conflicts: %{name} < 0.21.1 + +%description envsubst +Substitutes the values of environment variables. + %prep -%autosetup -n %{name}-%{tarversion} -S git +%autosetup -p1 + +%build +# Refresh autotools files to latest versions +autoreconf -fi # Defeat libtextstyle attempt to bundle libxml2. The comments # indicate this is done because the libtextstyle authors do not want @@ -184,18 +198,18 @@ think about. sed -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \ -i libtextstyle/configure - -%build %if %{with java} export JAVAC=gcj %if %{with jar} export JAR=fastjar %endif %endif + +# Fedora's libxml2-devel package has an extra "libxml2" path component. 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 \ @@ -227,8 +241,6 @@ 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 -rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir - # doc relocations for i in gettext-runtime/man/*.html; do rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i` @@ -261,9 +273,6 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar # own this directory for third-party *.its files mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/its -# remove .la files -rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la - # remove internal .so lib files rm ${RPM_BUILD_ROOT}%{_libdir}/libgettext{src,lib}.so @@ -275,29 +284,24 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc %find_lang %{name}-runtime %find_lang %{name}-tools -cat %{name}-*.lang > %{name}.lang %generate_compatibility_deps %check -# 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 - + # override LIBUNISTRING to prevent reordering of lib objects -# FIXME: https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html -# make check LIBUNISTRING=-lunistring - -%ldconfig_scriptlets libs +make check LIBUNISTRING=-lunistring -%files -f %{name}.lang -%doc COPYING gettext-tools/misc/DISCLAIM -%doc gettext-runtime/man/*.1.html -%doc gettext-runtime/intl/COPYING* -%{_bindir}/envsubst -%{_bindir}/gettext -%{_bindir}/gettext.sh +%files -f %{name}-tools.lang +%license COPYING +%doc gettext-tools/misc/DISCLAIM +%doc gettext-tools/man/msg*.1.html +%doc gettext-tools/man/recode*.1.html +%doc gettext-tools/man/xgettext.1.html +%doc gettext-tools/doc/FAQ.html +%doc gettext-tools/doc/tutorial.html %{_bindir}/msgattrib %{_bindir}/msgcat %{_bindir}/msgcmp @@ -312,17 +316,41 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %{_bindir}/msgmerge %{_bindir}/msgunfmt %{_bindir}/msguniq -%{_bindir}/ngettext %{_bindir}/recode-sr-latin %{_bindir}/xgettext -%{abidir}/*-option.list -%exclude %{abidir}/autopoint-option.list -%exclude %{abidir}/gettextize-option.list +%{abidir}/msgattrib-option.list +%{abidir}/msgcat-option.list +%{abidir}/msgcmp-option.list +%{abidir}/msgcomm-option.list +%{abidir}/msgconv-option.list +%{abidir}/msgen-option.list +%{abidir}/msgexec-option.list +%{abidir}/msgfilter-option.list +%{abidir}/msgfmt-option.list +%{abidir}/msggrep-option.list +%{abidir}/msginit-option.list +%{abidir}/msgmerge-option.list +%{abidir}/msgunfmt-option.list +%{abidir}/msguniq-option.list +%{abidir}/recode-sr-latin-option.list +%{abidir}/xgettext-option.list %{_infodir}/gettext* -%exclude %{_mandir}/man1/autopoint.1* -%exclude %{_mandir}/man1/gettextize.1* -%exclude %{_mandir}/man1/msghack.1* -%{_mandir}/man1/* +%{_mandir}/man1/msgattrib.1* +%{_mandir}/man1/msgcat.1* +%{_mandir}/man1/msgcmp.1* +%{_mandir}/man1/msgcomm.1* +%{_mandir}/man1/msgconv.1* +%{_mandir}/man1/msgen.1* +%{_mandir}/man1/msgexec.1* +%{_mandir}/man1/msgfilter.1* +%{_mandir}/man1/msgfmt.1* +%{_mandir}/man1/msggrep.1* +%{_mandir}/man1/msginit.1* +%{_mandir}/man1/msgmerge.1* +%{_mandir}/man1/msgunfmt.1* +%{_mandir}/man1/msguniq.1* +%{_mandir}/man1/recode-sr-latin.1* +%{_mandir}/man1/xgettext.1* %{_libdir}/%{name} %if %{with java} %exclude %{_libdir}/%{name}/gnu.gettext.* @@ -332,8 +360,30 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %{_datadir}/%{name}/ABOUT-NLS %{_datadir}/%{name}/po %{_datadir}/%{name}/styles -%dir %{_datadir}/%{name}-%{tarversion} -%{_datadir}/%{name}-%{tarversion}/its +%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 +%{abidir}/gettext-option.list +%{abidir}/gettext.sh-option.list +%{abidir}/ngettext-option.list +%{_mandir}/man1/gettext.1* +%{_mandir}/man1/ngettext.1* + +%files envsubst +%license COPYING +%doc gettext-runtime/man/envsubst.1.html +%{_bindir}/envsubst +%{abidir}/envsubst-option.list +%{_mandir}/man1/envsubst.1* %files doc %doc AUTHORS gettext-runtime/BUGS README NEWS THANKS @@ -343,6 +393,8 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %files devel %doc gettext-runtime/man/*.3.html ChangeLog +%doc gettext-tools/man/autopoint.1.html +%doc gettext-tools/man/gettextize.1.html %{_bindir}/autopoint %{_bindir}/gettextize %{abidir}/autopoint-option.list @@ -382,17 +434,6 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %{_datadir}/%{name}/libintl.jar %endif -%files -n libtextstyle -%{_libdir}/libtextstyle.so.0* -%{abidir}/libtextstyle.dump - -%files -n libtextstyle-devel -%{_docdir}/libtextstyle/ -%{_includedir}/textstyle/ -%{_includedir}/textstyle.h -%{_infodir}/libtextstyle* -%{_libdir}/libtextstyle.so - %files -n emacs-%{name} %dir %{_emacs_sitelispdir}/%{name} %{_emacs_sitelispdir}/%{name}/*.elc @@ -405,6 +446,16 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs %{_mandir}/man1/msghack.1* %changelog +* Thu Mar 23 2023 Chunmei Xu - 0.21.1-3 +- Bump version to rebuild + +* Mon Dec 19 2022 Funda Wang - 0.21.1-2 +- Fix versioned conflicts + +* Thu Nov 24 2022 Funda Wang - 0.21.1-1 +- New version 0.21.1 +- Remove gnulib test-execute.sh test as it failed always for an23 + * Thu Nov 24 2022 Chunmei Xu - 0.21-4 - rebuild with libunistring update