Compare commits

...

No commits in common. 'c9' and 'i10c-beta' have entirely different histories.

@ -1 +1 @@
9d75b47baed1a612c0120991c4b6d9cf95e0d430 SOURCES/gettext-0.21.tar.xz 1c3911796312efd8119da7a292edef305bdb71bb SOURCES/gettext-0.22.5.tar.gz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/gettext-0.21.tar.xz SOURCES/gettext-0.22.5.tar.gz

@ -1,44 +0,0 @@
From 175e0bc72808d564074c4adcc72aeadb74adfcc6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 27 Aug 2020 17:52:58 -0700
Subject: [PATCH] perror, strerror_r: remove unportable tests
Problem reported by Florian Weimer in:
https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
* tests/test-perror2.c (main):
* tests/test-strerror_r.c (main): Omit unportable tests.
---
ChangeLog | 8 ++++++++
tests/test-perror2.c | 3 ---
tests/test-strerror_r.c | 3 ---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/gettext-tools/gnulib-tests/test-perror2.c b/gettext-tools/gnulib-tests/test-perror2.c
index 1d14eda7b..c6214dd25 100644
--- a/gettext-tools/gnulib-tests/test-perror2.c
+++ b/gettext-tools/gnulib-tests/test-perror2.c
@@ -79,9 +79,6 @@ main (void)
errno = -5;
perror ("");
ASSERT (!ferror (stderr));
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
ASSERT (STREQ (msg4, str4));
free (str1);
diff --git a/gettext-tools/gnulib-tests/test-strerror_r.c b/gettext-tools/gnulib-tests/test-strerror_r.c
index b11d6fd9f..c1dbcf837 100644
--- a/gettext-tools/gnulib-tests/test-strerror_r.c
+++ b/gettext-tools/gnulib-tests/test-strerror_r.c
@@ -165,9 +165,6 @@ main (void)
strerror_r (EACCES, buf, sizeof buf);
strerror_r (-5, buf, sizeof buf);
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
ASSERT (STREQ (msg4, str4));
free (str1);

@ -1,8 +1,8 @@
diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c
index 990d39e..9814502 100644 index 965cc8c..38c7ca1 100644
--- a/gettext-tools/src/msgl-cat.c --- a/gettext-tools/src/msgl-cat.c
+++ b/gettext-tools/src/msgl-cat.c +++ b/gettext-tools/src/msgl-cat.c
@@ -306,6 +306,7 @@ catenate_msgdomain_list (string_list_ty *file_list, @@ -307,6 +307,7 @@ catenate_msgdomain_list (string_list_ty *file_list,
mp->msgid); mp->msgid);
multiline_error (xstrdup (""), multiline_error (xstrdup (""),
xasprintf ("%s\n", errormsg)); xasprintf ("%s\n", errormsg));
@ -11,10 +11,10 @@ index 990d39e..9814502 100644
} }
else else
diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c
index 5cf72ad..7a0e5d3 100644 index 13d4a53..669db2f 100644
--- a/gettext-tools/src/x-csharp.c --- a/gettext-tools/src/x-csharp.c
+++ b/gettext-tools/src/x-csharp.c +++ b/gettext-tools/src/x-csharp.c
@@ -560,6 +560,7 @@ comment_line_end (size_t chars_to_remove) @@ -561,6 +561,7 @@ comment_line_end (size_t chars_to_remove)
buffer[buflen] = '\0'; buffer[buflen] = '\0';
savable_comment_add (buffer); savable_comment_add (buffer);
lexical_context = lc_outside; lexical_context = lc_outside;
@ -23,10 +23,10 @@ index 5cf72ad..7a0e5d3 100644
diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c
index eff1e6f..7e1bb78 100644 index e89ab95..6c1b4a7 100644
--- a/gettext-tools/src/x-java.c --- a/gettext-tools/src/x-java.c
+++ b/gettext-tools/src/x-java.c +++ b/gettext-tools/src/x-java.c
@@ -460,6 +460,7 @@ comment_line_end (size_t chars_to_remove) @@ -461,6 +461,7 @@ comment_line_end (size_t chars_to_remove)
--buflen; --buflen;
buffer[buflen] = '\0'; buffer[buflen] = '\0';
savable_comment_add (buffer); savable_comment_add (buffer);
@ -35,18 +35,19 @@ index eff1e6f..7e1bb78 100644
diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c
index cde1ee6..fca441e 100644 index cde1ee6..82f645f 100644
--- a/gettext-tools/src/x-rst.c --- a/gettext-tools/src/x-rst.c
+++ b/gettext-tools/src/x-rst.c +++ b/gettext-tools/src/x-rst.c
@@ -651,6 +651,7 @@ extract_rsj (FILE *f, @@ -651,6 +651,8 @@ extract_rsj (FILE *f,
else else
goto invalid_rsj; goto invalid_rsj;
+ free (s1); + free (s1);
+
/* Parse a comma. */ /* Parse a comma. */
c = phase2_getc (); c = phase2_getc ();
if (c == '}') if (c == '}')
@@ -667,6 +668,7 @@ extract_rsj (FILE *f, @@ -667,6 +669,7 @@ extract_rsj (FILE *f,
fp = NULL; fp = NULL;
real_file_name = NULL; real_file_name = NULL;
@ -66,3 +67,4 @@ index 06b7076..2189aac 100644
} }
else else
break; break;

@ -1,29 +1,7 @@
diff --git a/Makefile.am b/Makefile.am diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac
index 815e3c7..e897de7 100644 --- gettext-0.22.4.orig/configure.ac 2022-10-09 08:05:42.000000000 +0530
--- a/Makefile.am +++ gettext-0.22.4/configure.ac 2024-02-13 12:47:32.099238869 +0530
+++ b/Makefile.am @@ -37,7 +37,7 @@
@@ -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 \
@@ -123,7 +123,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 49689fb..2d23b44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions. dnl Checks for library functions.
@ -32,7 +10,7 @@ index 49689fb..2d23b44 100644
AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po]) 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 Features: AC_ARG_ENABLE calls
dnl Optional Packages: AC_ARG_WITH calls dnl Optional Packages: AC_ARG_WITH calls
dnl Some influential environment variables: AC_ARG_VAR calls dnl Some influential environment variables: AC_ARG_VAR calls
@ -41,69 +19,52 @@ index 49689fb..2d23b44 100644
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h
index 449a797..c5719c2 100644 --- gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-09-19 02:06:31.000000000 +0530
--- a/gettext-tools/Makefile.am +++ gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h 2024-02-13 13:04:15.238643775 +0530
+++ b/gettext-tools/Makefile.am @@ -254,8 +254,9 @@
@@ -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 536b51b..585ce66 100644
--- a/gettext-tools/libgettextpo/textstyle.in.h
+++ b/gettext-tools/libgettextpo/textstyle.in.h
@@ -213,7 +213,8 @@ typedef ostream_t file_ostream_t;
static inline file_ostream_t static inline file_ostream_t
file_ostream_create (FILE *fp) file_ostream_create (FILE *fp)
{ -{
- return fp; - return fp;
+{
+ /* Closing the stream we return should not close 'fp'. */ + /* Closing the stream we return should not close 'fp'. */
+ return fdopen (dup (fileno (fp)), "w"); + return fdopen (dup (fileno (fp)), "w");
} }
/* --------------------------- From fd-ostream.h --------------------------- */ static inline bool
@@ -413,6 +414,30 @@ html_styled_ostream_create (ostream_t destination _GL_UNUSED, @@ -676,10 +677,10 @@
return NULL; static inline noop_styled_ostream_t
} noop_styled_ostream_create (ostream_t destination, bool pass_ownership)
{
+/* ----------------------- From noop-styled-ostream.h ----------------------- */ - if (!pass_ownership)
+ - /* Not supported without the real libtextstyle. */
+/* noop_styled_ostream_t is a subtype of ostream_t. */ - abort ();
+typedef ostream_t noop_styled_ostream_t; - return destination;
+
+#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) + if (pass_ownership)
+ return destination; + return destination;
+ else + else
+ return fdopen (dup (fileno (destination)), "w"); + return fdopen (dup (fileno (destination)), "w");
+} }
+
/* ------------------------------ From color.h ------------------------------ */ 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
#define color_test_mode false EXTRA_DIST = misc/DISCLAIM
diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am MOSTLYCLEANFILES = core *.stackdump
index 764ffad..eccfbbd 100644 diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettext-tools/src/Makefile.am
--- a/gettext-tools/src/Makefile.am --- gettext-0.22.4.orig/gettext-tools/src/Makefile.am 2023-11-17 17:14:38.000000000 +0530
+++ b/gettext-tools/src/Makefile.am +++ gettext-0.22.4/gettext-tools/src/Makefile.am 2024-02-13 13:06:34.194367930 +0530
@@ -292,19 +292,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c @@ -311,19 +311,9 @@
cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML) cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML)
cldr_plurals_LDADD = libgettextsrc.la $(LDADD) cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
@ -126,3 +87,24 @@ index 764ffad..eccfbbd 100644
# How to build libgettextsrc.la. # How to build libgettextsrc.la.
# Need ../gnulib-lib/libgettextlib.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.

@ -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,

@ -1,10 +1,12 @@
%bcond_with jar %bcond_with jar
%bcond_with java %bcond_with java
%bcond libtextstyle %[0%{?fedora} > 40]
Summary: GNU libraries and utilities for producing multi-lingual messages Summary: GNU tools and libraries for localized translated messages
Name: gettext Name: gettext
Version: 0.21 Version: 0.22.5
Release: 8%{?dist} Release: 3%{?dist}
# The following are licensed under LGPLv2+: # The following are licensed under LGPLv2+:
# - libintl and its headers # - libintl and its headers
# - libasprintf and its headers # - libasprintf and its headers
@ -18,25 +20,19 @@ Release: 8%{?dist}
# - libasprintf info files # - libasprintf info files
# - libtextstyle info files # - libtextstyle info files
# Everything else is GPLv3+ # 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/ URL: https://www.gnu.org/software/gettext/
Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz
Source2: msghack.py Source2: msghack.py
Source3: msghack.1 Source3: msghack.1
# this patch has merged upstream Patch1: gettext-0.21.1-covscan.patch
# Patch1: gettext-msgmerge-for-msgfmt.patch Patch2: gettext-0.22-disable-libtextstyle.patch
# https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html
Patch1: gettext-0.21-gnulib-perror-tests.patch
Patch2: gettext-0.21-disable-libtextstyle.patch
Patch3: gettext-0.21-covscan.patch
Patch4: gettext-java17-2062407.patch
# for bootstrapping # for bootstrapping
# BuildRequires: autoconf >= 2.62 # BuildRequires: autoconf >= 2.62
BuildRequires: automake BuildRequires: automake
# BuildRequires: libtool BuildRequires: libtool
# BuildRequires: bison # BuildRequires: bison
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -53,8 +49,6 @@ BuildRequires: zip, unzip
%endif %endif
# for po-mode.el # for po-mode.el
BuildRequires: emacs BuildRequires: emacs
# for autosetup
BuildRequires: git
# ensure 'ARCHIVE_FORMAT=dirxz' # ensure 'ARCHIVE_FORMAT=dirxz'
BuildRequires: xz BuildRequires: xz
# for documentation # for documentation
@ -78,10 +72,8 @@ BuildRequires: glibc-langpack-ja
BuildRequires: glibc-langpack-tr BuildRequires: glibc-langpack-tr
BuildRequires: glibc-langpack-zh BuildRequires: glibc-langpack-zh
BuildRequires: make BuildRequires: make
# Depend on the exact version of the library sub package
Requires: %{name}-libs%{_isa} = %{version}-%{release}
Provides: bundled(gnulib) Provides: bundled(gnulib)
Provides: bundled(libcroco) = 0.6.12 Requires: %{name}-runtime = %{version}-%{release}
%description %description
The GNU gettext package provides a set of tools and documentation for The GNU gettext package provides a set of tools and documentation for
@ -96,10 +88,25 @@ catalogs and is a powerful and simple method for internationalizing
programs. 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
# 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
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 common-devel %package common-devel
Summary: Common development files for %{name} Summary: Common development files for %{name}
# autopoint archive # autopoint archive
License: GPLv3+ License: GPL-3.0-or-later
BuildArch: noarch BuildArch: noarch
%description common-devel %description common-devel
@ -111,7 +118,7 @@ Summary: Development files for %{name}
# autopoint is GPLv3+ # autopoint is GPLv3+
# libasprintf is LGPLv2+ # libasprintf is LGPLv2+
# libgettextpo is GPLv3+ # 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} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-common-devel = %{version}-%{release} Requires: %{name}-common-devel = %{version}-%{release}
@ -119,7 +126,9 @@ Requires: xz
Requires: diffutils Requires: diffutils
Obsoletes: gettext-autopoint < 0.18.1.1-3 Obsoletes: gettext-autopoint < 0.18.1.1-3
Provides: gettext-autopoint = %{version}-%{release} Provides: gettext-autopoint = %{version}-%{release}
%if %{without libtextstyle}
Obsoletes: libtextstyle-devel < %{version}-%{release} Obsoletes: libtextstyle-devel < %{version}-%{release}
%endif
%description devel %description devel
This package contains all development related files necessary for This package contains all development related files necessary for
@ -132,12 +141,33 @@ want to add gettext support for your project.
Summary: Libraries for %{name} Summary: Libraries for %{name}
# libasprintf is LGPLv2+ # libasprintf is LGPLv2+
# libgettextpo is GPLv3+ # libgettextpo is GPLv3+
License: LGPLv2+ and GPLv3+ License: LGPL-2.0-or-later AND GPL-3.0-or-later
%if %{without libtextstyle}
Obsoletes: libtextstyle < %{version}-%{release} Obsoletes: libtextstyle < %{version}-%{release}
%endif
%description libs %description libs
This package contains libraries used internationalization support. 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} %package -n emacs-%{name}
Summary: Support for editing po files within GNU Emacs Summary: Support for editing po files within GNU Emacs
@ -160,8 +190,21 @@ This program can be used to alter .po files in ways no sane mind would
think about. 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.
%prep %prep
%autosetup -S git %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 # Defeat libtextstyle attempt to bundle libxml2. The comments
# indicate this is done because the libtextstyle authors do not want # indicate this is done because the libtextstyle authors do not want
@ -186,7 +229,8 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"
export CPPFLAGS="-I%{_includedir}/libxml2" export CPPFLAGS="-I%{_includedir}/libxml2"
# Side effect of unbundling libxml2 from libtextstyle. # Side effect of unbundling libxml2 from libtextstyle.
export LIBS="-lxml2" export LIBS="-lxml2"
%configure --without-included-gettext --enable-nls --disable-static \ export CFLAGS="$CFLAGS -Wformat"
%configure --enable-nls --disable-static \
--enable-shared --disable-csharp --disable-rpath \ --enable-shared --disable-csharp --disable-rpath \
%if %{with java} %if %{with java}
--enable-java \ --enable-java \
@ -214,7 +258,6 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_bindir}/msghack install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_bindir}/msghack
install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_mandir}/man1/msghack.1 install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_mandir}/man1/msghack.1
# make preloadable_libintl.so executable # make preloadable_libintl.so executable
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
@ -266,30 +309,27 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
%find_lang %{name}-runtime %find_lang %{name}-runtime
%find_lang %{name}-tools %find_lang %{name}-tools
cat %{name}-*.lang > %{name}.lang
%check %check
# this takes quite a lot of time to run # this takes quite a lot of time to run
# adapt to rpath removal # 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 # override LIBUNISTRING to prevent reordering of lib objects
make check LIBUNISTRING=-lunistring make check LIBUNISTRING=-lunistring
%ldconfig_scriptlets libs %ldconfig_scriptlets libs
%files -f %{name}.lang %files -f %{name}-tools.lang
%license COPYING %doc AUTHORS NEWS README THANKS
%doc AUTHORS gettext-runtime/BUGS %doc gettext-tools/misc/DISCLAIM
%doc gettext-tools/misc/DISCLAIM README %doc gettext-tools/man/msg*.1.html
%doc NEWS THANKS %doc gettext-tools/man/recode*.1.html
%doc gettext-runtime/man/*.1.html %doc gettext-tools/man/xgettext.1.html
%doc gettext-runtime/intl/COPYING* %doc gettext-tools/doc/FAQ.html
%{_bindir}/envsubst %doc gettext-tools/doc/tutorial.html
%{_bindir}/gettext
%{_bindir}/gettext.sh
%{_bindir}/msgattrib %{_bindir}/msgattrib
%{_bindir}/msgcat %{_bindir}/msgcat
%{_bindir}/msgcmp %{_bindir}/msgcmp
@ -304,14 +344,16 @@ make check LIBUNISTRING=-lunistring
%{_bindir}/msgmerge %{_bindir}/msgmerge
%{_bindir}/msgunfmt %{_bindir}/msgunfmt
%{_bindir}/msguniq %{_bindir}/msguniq
%{_bindir}/ngettext
%{_bindir}/recode-sr-latin %{_bindir}/recode-sr-latin
%{_bindir}/xgettext %{_bindir}/xgettext
%{_infodir}/gettext* %{_infodir}/gettext*
%exclude %{_mandir}/man1/autopoint.1* %exclude %{_mandir}/man1/autopoint.1*
%exclude %{_mandir}/man1/envsubst.1*
%exclude %{_mandir}/man1/gettextize.1* %exclude %{_mandir}/man1/gettextize.1*
%exclude %{_mandir}/man1/msghack.1* %exclude %{_mandir}/man1/msghack.1*
%{_mandir}/man1/* %{_mandir}/man1/msg*
%{_mandir}/man1/recode*.1*
%{_mandir}/man1/xgettext.1*
%{_libdir}/%{name} %{_libdir}/%{name}
%if %{with java} %if %{with java}
%exclude %{_libdir}/%{name}/gnu.gettext.* %exclude %{_libdir}/%{name}/gnu.gettext.*
@ -324,11 +366,36 @@ make check LIBUNISTRING=-lunistring
%dir %{_datadir}/%{name}-%{version} %dir %{_datadir}/%{name}-%{version}
%{_datadir}/%{name}-%{version}/its %{_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 %files common-devel
%{_datadir}/%{name}/archive.*.tar.xz %{_datadir}/%{name}/archive.*.tar.xz
%files devel %files devel
%doc gettext-runtime/man/*.3.html ChangeLog %doc gettext-runtime/man/*.3.html ChangeLog
%doc gettext-tools/man/autopoint.1.html
%doc gettext-tools/man/gettextize.1.html
%{_bindir}/autopoint %{_bindir}/autopoint
%{_bindir}/gettextize %{_bindir}/gettextize
%{_datadir}/%{name}/projects/ %{_datadir}/%{name}/projects/
@ -360,6 +427,18 @@ make check LIBUNISTRING=-lunistring
%{_datadir}/%{name}/libintl.jar %{_datadir}/%{name}/libintl.jar
%endif %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} %files -n emacs-%{name}
%dir %{_emacs_sitelispdir}/%{name} %dir %{_emacs_sitelispdir}/%{name}
%{_emacs_sitelispdir}/%{name}/*.elc %{_emacs_sitelispdir}/%{name}/*.elc
@ -372,23 +451,103 @@ make check LIBUNISTRING=-lunistring
%{_mandir}/man1/msghack.1* %{_mandir}/man1/msghack.1*
%changelog %changelog
* Thu Mar 30 2023 Jens Petersen <petersen@redhat.com> - 0.21-8 * Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.22.5-3
- add Java 17 support patch from Mamoru Tasaka (rhbz#2182696) - Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.22.5-3
- Bump release for June 2024 mass rebuild
* Fri Mar 8 2024 Jens Petersen <petersen@redhat.com> - 0.22.5-2
- condition libtextstyle obsoletes
* Mon Mar 4 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-1
- update to 0.22.5 release
- https://savannah.gnu.org/news/?id=10597
* Wed Feb 21 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.4-2
- Add back libtextstyle library for rawhide (#2264128)
* Fri Feb 9 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.4-1
- update to 0.22.4 release
- https://savannah.gnu.org/news/?id=10544
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 23 2023 Jens Petersen <petersen@redhat.com> - 0.22-1
- update to 0.22 release
- https://savannah.gnu.org/news/?id=10378
* Wed Mar 29 2023 Sundeep Anand <suanand@redhat.com> - 0.21.1-3
- update license tag to as per SPDX identifiers
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.21-7 * Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.1-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Related: rhbz#1991688
* Mon May 17 2021 Sundeep Anand <suanand@redhat.com> - 0.21-6 * Fri Oct 14 2022 Sundeep Anand <suanand@redhat.com> - 0.21.1-1
- update to 0.21.1 release
* Thu Oct 13 2022 Sundeep Anand <suanand@redhat.com> - 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 <suanand@redhat.com> - 0.21-19.0.20220203
- Add conflicts to enable new (sub)packages installable independently of the original package.
* Wed Aug 10 2022 Honza Horak <hhorak@redhat.com> - 0.21-18.0.20220203
- Introduce envsubst sub-package for allow install envsubst with minimal
footprint
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-17.0.20220203
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jun 8 2022 Sundeep Anand <suanand@redhat.com> - 0.21-16.0.20220203
- separate out gettext-runtime from the main package into a subpackage
* Tue Jun 7 2022 Sundeep Anand <suanand@redhat.com> - 0.21-15.0.20220203
- add Provides: gettext-runtime to gettext package for forward compatibility.
- and removed Provides: gettext-tools
* Mon Jun 6 2022 Sundeep Anand <suanand@redhat.com> - 0.21-14.0.20220203
- add Provides: gettext-tools to gettext package for forward compatibility.
* Thu Mar 31 2022 Jens Petersen <petersen@redhat.com> - 0.21-13.0.20220203
- add Java 17 support patch from Mamoru Tasaka (#2062407)
* Wed Mar 9 2022 Sundeep Anand <suanand@redhat.com> - 0.21-12.0.20220203
- fix gettext snapshot versioning issue to make it canonical (#2061646)
* Thu Mar 3 2022 Sundeep Anand <suanand@redhat.com> - 0.21-11.0.20220203
- Rebuild with gettext-snapshot-20220228 to fix ppc64le and tests (#2045414)
Removed gettext-0.21-gnulib-perror-tests.patch as it is upstreamed.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Nov 23 2021 Jens Petersen <petersen@redhat.com> - 0.21-9
- update autotools files with autoreconf to fix FTBFS (#2000426)
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue May 25 2021 Florian Weimer <fweimer@redhat.com> - 0.21-7
- Rebuild with new binutils to fix ppc64le corruption (#1960730)
* Tue May 11 2021 Sundeep Anand <suanand@redhat.com> - 0.21-6
- Add gettext-0.21-covscan.patch to fix issues detected by static analyzers - Add gettext-0.21-covscan.patch to fix issues detected by static analyzers
Add gettext-0.21-disable-libtextstyle.patch
* Fri Apr 30 2021 Sundeep Anand <suanand@redhat.com> - 0.21-5
- Add gettext-0.21-disable-libtextstyle.patch
Do not build libtextstyle, as it depends on libcroco Do not build libtextstyle, as it depends on libcroco
which is now unmaintained and has known security bugs. which is now unmaintained and has known security bugs.
Obsolete libtextstyle and libtextstyle-devel packages. Obsolete libtextstyle and libtextstyle-devel packages.
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 0.21-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-4 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save