Compare commits
77 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98705c64dd | ||
|
|
bb34f17628 | ||
|
|
a40f3de97f | ||
|
|
c94ec5b16a | ||
|
|
7e8960bf76 | ||
|
|
9b44db8d21 | ||
|
|
74ac9f07a1 | ||
|
|
9f7d174856 | ||
|
|
f92414c279 | ||
|
|
ec95bbdbda | ||
|
|
368c0cc283 | ||
|
|
057981b371 | ||
|
|
1a3bc0afb5 | ||
|
|
205b6879b5 | ||
|
|
44a6e9d2be | ||
|
|
935d833dd9 | ||
|
|
9c4e3965b5 | ||
|
|
2880ae9755 | ||
|
|
d0e4469234 | ||
|
|
807312ab8f | ||
|
|
875215f268 | ||
|
|
eb1d1dcd33 | ||
|
|
0c9f023142 | ||
|
|
f09e35ca28 | ||
|
|
89be005c97 | ||
|
|
4f470a9f50 | ||
|
|
6a2dc0e302 | ||
|
|
15c3691527 | ||
|
|
aa54659070 | ||
|
|
7aca11f7d4 | ||
|
|
e09fc9f993 | ||
|
|
adb95f5020 | ||
|
|
b032e270f1 | ||
|
|
4dc394f969 | ||
|
|
8faf137723 | ||
|
|
43488c9689 | ||
|
|
2dabab53d8 | ||
|
|
59393a0772 | ||
|
|
7036fc870c | ||
|
|
205b2f420a | ||
|
|
419fa91470 | ||
|
|
be4c5c778b | ||
|
|
b217c073ed | ||
|
|
7d0cd2d7e2 | ||
|
|
b2e6e951dc | ||
|
|
fe68ad1d54 | ||
|
|
fd237eb4df | ||
|
|
757ca1de4b | ||
|
|
8b2ebf94ec | ||
|
|
5412b38944 | ||
|
|
1b17af56ab | ||
|
|
685e15bd65 | ||
|
|
3d2b5ea009 | ||
|
|
8c125f4d85 | ||
|
|
26b1c1422c | ||
|
|
e3ec4313fc | ||
|
|
306be9bb5f | ||
|
|
7581bbfd34 | ||
|
|
9a741fcbe0 | ||
|
|
78951b9743 | ||
|
|
802fdef835 | ||
|
|
9aa0b07ad5 | ||
|
|
093dcc4088 | ||
|
|
5077e71eb3 | ||
|
|
58556efb97 | ||
|
|
2c0418a6cc | ||
|
|
15ad2cff3c | ||
|
|
0c963d926a | ||
|
|
eca5567f1c | ||
|
|
f06c2682ab | ||
|
|
76b502edb8 | ||
|
|
35c094b5df |
||
|
|
2b1ba2ed02 | ||
|
|
7f499dbd3e | ||
|
|
f20882a98a | ||
|
|
1658f67fda | ||
|
|
e3e0ce8d2e |
17 changed files with 1274 additions and 658 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1 @@
|
||||||
/gettext-0.*.tar.xz
|
/gettext-0.*.tar.*
|
||||||
|
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
commit bd2c6ca2b7ae0be02d4bb85db79def454f3153fb
|
|
||||||
Author: rpm-build <rpm-build>
|
|
||||||
AuthorDate: Wed Dec 21 12:50:54 2016 +0100
|
|
||||||
Commit: rpm-build <rpm-build>
|
|
||||||
CommitDate: Wed Dec 21 12:52:36 2016 +0100
|
|
||||||
|
|
||||||
disable-gettext-runtime-test-lock.patch
|
|
||||||
|
|
||||||
diff --git a/gettext-runtime/tests/Makefile.am b/gettext-runtime/tests/Makefile.am
|
|
||||||
index 88a0684..3a27b79 100644
|
|
||||||
--- a/gettext-runtime/tests/Makefile.am
|
|
||||||
+++ b/gettext-runtime/tests/Makefile.am
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
AUTOMAKE_OPTIONS = 1.11 gnits no-dependencies color-tests subdir-objects
|
|
||||||
EXTRA_DIST =
|
|
||||||
|
|
||||||
-TESTS = test-lock
|
|
||||||
+TESTS =
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
|
||||||
-I.. \
|
|
||||||
diff --git a/gettext-runtime/tests/Makefile.in b/gettext-runtime/tests/Makefile.in
|
|
||||||
index 4327733..5879146 100644
|
|
||||||
--- a/gettext-runtime/tests/Makefile.in
|
|
||||||
+++ b/gettext-runtime/tests/Makefile.in
|
|
||||||
@@ -86,7 +86,7 @@ PRE_UNINSTALL = :
|
|
||||||
POST_UNINSTALL = :
|
|
||||||
build_triplet = @build@
|
|
||||||
host_triplet = @host@
|
|
||||||
-TESTS = test-lock$(EXEEXT)
|
|
||||||
+TESTS =
|
|
||||||
check_PROGRAMS = test-lock$(EXEEXT)
|
|
||||||
subdir = tests
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
diff --git a/gettext-tools/gnulib-tests/Makefile.in b/gettext-tools/gnulib-tests/Makefile.in
|
|
||||||
index 26becd9..4b9d0e4 100644
|
|
||||||
--- a/gettext-tools/gnulib-tests/Makefile.in
|
|
||||||
+++ b/gettext-tools/gnulib-tests/Makefile.in
|
|
||||||
@@ -143,7 +143,7 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \
|
|
||||||
test-isnanl-nolibm$(EXEEXT) test-isnanl$(EXEEXT) \
|
|
||||||
test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \
|
|
||||||
test-linkedhash_list$(EXEEXT) test-locale$(EXEEXT) \
|
|
||||||
- test-localename$(EXEEXT) test-lock$(EXEEXT) \
|
|
||||||
+ test-localename$(EXEEXT) \
|
|
||||||
test-log10$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \
|
|
||||||
test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \
|
|
||||||
test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bruno Haible <bruno@clisp.org>
|
|
||||||
Date: Fri, 9 Dec 2016 21:04:31 +0100
|
|
||||||
Subject: [PATCH] Fix crash of xgettext with --its option.
|
|
||||||
|
|
||||||
* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it
|
|
||||||
was initialized. Fixes bug introduced on 2016-05-16.
|
|
||||||
---
|
|
||||||
gettext-tools/src/xgettext.c | 11 +++++++----
|
|
||||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c
|
|
||||||
index f848d76d1..a80ee51ac 100644
|
|
||||||
--- a/gettext-tools/src/xgettext.c
|
|
||||||
+++ b/gettext-tools/src/xgettext.c
|
|
||||||
@@ -330,7 +330,7 @@ main (int argc, char *argv[])
|
|
||||||
bool sort_by_msgid = false;
|
|
||||||
bool sort_by_filepos = false;
|
|
||||||
char **dirs;
|
|
||||||
- char **its_dirs;
|
|
||||||
+ char **its_dirs = NULL;
|
|
||||||
char *explicit_its_filename = NULL;
|
|
||||||
const char *file_name;
|
|
||||||
const char *files_from = NULL;
|
|
||||||
@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension)
|
|
||||||
if (its_locating_rules)
|
|
||||||
locating_rule_list_free (its_locating_rules);
|
|
||||||
|
|
||||||
- for (i = 0; its_dirs[i] != NULL; i++)
|
|
||||||
- free (its_dirs[i]);
|
|
||||||
- free (its_dirs);
|
|
||||||
+ if (its_dirs != NULL)
|
|
||||||
+ {
|
|
||||||
+ for (i = 0; its_dirs[i] != NULL; i++)
|
|
||||||
+ free (its_dirs[i]);
|
|
||||||
+ free (its_dirs);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
exit (EXIT_SUCCESS);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
||||||
|
|
@ -1,445 +0,0 @@
|
||||||
From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daiki Ueno <ueno@gnu.org>
|
|
||||||
Date: Thu, 15 Sep 2016 13:57:24 +0200
|
|
||||||
Subject: [PATCH] xgettext: Fix crash with *.po file input
|
|
||||||
|
|
||||||
When xgettext was given two *.po files with the same msgid_plural, it
|
|
||||||
crashed with double-free. Problem reported by Davlet Panech in:
|
|
||||||
http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html
|
|
||||||
|
|
||||||
praiskup:
|
|
||||||
- I dropped the testsuite part, otherwise we'd have to 'autoreconf -vif' the
|
|
||||||
sources
|
|
||||||
- I'm patching manually the po-gram-gen.c file to avoid 'bison' BR
|
|
||||||
|
|
||||||
diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y
|
|
||||||
index becf5e607..4428e7725 100644
|
|
||||||
--- a/gettext-tools/src/po-gram-gen.y
|
|
||||||
+++ b/gettext-tools/src/po-gram-gen.y
|
|
||||||
@@ -221,14 +221,11 @@ message
|
|
||||||
check_obsolete ($1, $3);
|
|
||||||
check_obsolete ($1, $4);
|
|
||||||
if (!$1.obsolete || pass_obsolete_entries)
|
|
||||||
- {
|
|
||||||
- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
|
|
||||||
- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
|
|
||||||
- $1.prev_ctxt,
|
|
||||||
- $1.prev_id, $1.prev_id_plural,
|
|
||||||
- $1.obsolete);
|
|
||||||
- free ($3.string);
|
|
||||||
- }
|
|
||||||
+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
|
|
||||||
+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
|
|
||||||
+ $1.prev_ctxt,
|
|
||||||
+ $1.prev_id, $1.prev_id_plural,
|
|
||||||
+ $1.obsolete);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
free_message_intro ($1);
|
|
||||||
diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c
|
|
||||||
index 571d18e1b..6af6d2025 100644
|
|
||||||
--- a/gettext-tools/src/read-catalog.c
|
|
||||||
+++ b/gettext-tools/src/read-catalog.c
|
|
||||||
@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this,
|
|
||||||
appropriate. */
|
|
||||||
mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len,
|
|
||||||
msgstr_pos);
|
|
||||||
+ if (msgid_plural != NULL)
|
|
||||||
+ free (msgid_plural);
|
|
||||||
mp->prev_msgctxt = prev_msgctxt;
|
|
||||||
mp->prev_msgid = prev_msgid;
|
|
||||||
mp->prev_msgid_plural = prev_msgid_plural;
|
|
||||||
diff --git a/gettext-tools/src/po-gram-gen.c b/gettext-tools/src/po-gram-gen.c
|
|
||||||
--- a/gettext-tools/src/po-gram-gen.c
|
|
||||||
+++ b/gettext-tools/src/po-gram-gen.c
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
-/* A Bison parser, made by GNU Bison 3.0.4. */
|
|
||||||
+/* A Bison parser, made by GNU Bison 3.0.5. */
|
|
||||||
|
|
||||||
/* Bison implementation for Yacc-like parsers in C
|
|
||||||
|
|
||||||
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
@@ -44,7 +44,7 @@
|
|
||||||
#define YYBISON 1
|
|
||||||
|
|
||||||
/* Bison version. */
|
|
||||||
-#define YYBISON_VERSION "3.0.4"
|
|
||||||
+#define YYBISON_VERSION "3.0.5"
|
|
||||||
|
|
||||||
/* Skeleton name. */
|
|
||||||
#define YYSKELETON_NAME "yacc.c"
|
|
||||||
@@ -568,9 +568,9 @@
|
|
||||||
static const yytype_uint16 yyrline[] =
|
|
||||||
{
|
|
||||||
0, 169, 169, 171, 172, 173, 174, 179, 187, 195,
|
|
||||||
- 216, 240, 249, 258, 269, 278, 292, 301, 315, 321,
|
|
||||||
- 332, 338, 350, 361, 372, 376, 391, 414, 422, 434,
|
|
||||||
- 442
|
|
||||||
+ 216, 237, 246, 255, 266, 275, 289, 298, 312, 318,
|
|
||||||
+ 329, 335, 347, 358, 369, 373, 388, 411, 419, 431,
|
|
||||||
+ 439
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1054,6 +1054,7 @@
|
|
||||||
case N: \
|
|
||||||
yyformat = S; \
|
|
||||||
break
|
|
||||||
+ default: /* Avoid compiler warnings. */
|
|
||||||
YYCASE_(0, YY_("syntax error"));
|
|
||||||
YYCASE_(1, YY_("syntax error, unexpected %s"));
|
|
||||||
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
|
|
||||||
@@ -1370,23 +1371,23 @@
|
|
||||||
switch (yyn)
|
|
||||||
{
|
|
||||||
case 7:
|
|
||||||
-#line 180 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 180 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
po_callback_comment_dispatcher ((yyvsp[0].string).string);
|
|
||||||
}
|
|
||||||
-#line 1378 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1379 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 8:
|
|
||||||
-#line 188 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 188 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
po_callback_domain ((yyvsp[0].string).string);
|
|
||||||
}
|
|
||||||
-#line 1386 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1387 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 9:
|
|
||||||
-#line 196 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 196 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist);
|
|
||||||
char *string4 = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist);
|
|
||||||
@@ -1407,11 +1408,11 @@
|
|
||||||
free (string4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-#line 1411 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1412 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 10:
|
|
||||||
-#line 217 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 217 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist);
|
|
||||||
|
|
||||||
@@ -1419,14 +1420,11 @@
|
|
||||||
check_obsolete ((yyvsp[-3].message_intro), (yyvsp[-1].string));
|
|
||||||
check_obsolete ((yyvsp[-3].message_intro), (yyvsp[0].rhs));
|
|
||||||
if (!(yyvsp[-3].message_intro).obsolete || pass_obsolete_entries)
|
|
||||||
- {
|
|
||||||
- do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string,
|
|
||||||
- (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos,
|
|
||||||
- (yyvsp[-3].message_intro).prev_ctxt,
|
|
||||||
- (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural,
|
|
||||||
- (yyvsp[-3].message_intro).obsolete);
|
|
||||||
- free ((yyvsp[-1].string).string);
|
|
||||||
- }
|
|
||||||
+ do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string,
|
|
||||||
+ (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos,
|
|
||||||
+ (yyvsp[-3].message_intro).prev_ctxt,
|
|
||||||
+ (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural,
|
|
||||||
+ (yyvsp[-3].message_intro).obsolete);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
free_message_intro ((yyvsp[-3].message_intro));
|
|
||||||
@@ -1435,11 +1433,11 @@
|
|
||||||
free ((yyvsp[0].rhs).rhs.msgstr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-#line 1439 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1437 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 11:
|
|
||||||
-#line 241 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 238 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist));
|
|
||||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].string));
|
|
||||||
@@ -1448,11 +1446,11 @@
|
|
||||||
string_list_destroy (&(yyvsp[-1].stringlist).stringlist);
|
|
||||||
free ((yyvsp[0].string).string);
|
|
||||||
}
|
|
||||||
-#line 1452 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1450 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 12:
|
|
||||||
-#line 250 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 247 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist));
|
|
||||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].rhs));
|
|
||||||
@@ -1461,22 +1459,22 @@
|
|
||||||
string_list_destroy (&(yyvsp[-1].stringlist).stringlist);
|
|
||||||
free ((yyvsp[0].rhs).rhs.msgstr);
|
|
||||||
}
|
|
||||||
-#line 1465 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1463 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 13:
|
|
||||||
-#line 259 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 256 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].message_intro), (yyvsp[0].stringlist));
|
|
||||||
po_gram_error_at_line (&(yyvsp[-1].message_intro).pos, _("missing 'msgstr' section"));
|
|
||||||
free_message_intro ((yyvsp[-1].message_intro));
|
|
||||||
string_list_destroy (&(yyvsp[0].stringlist).stringlist);
|
|
||||||
}
|
|
||||||
-#line 1476 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1474 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 14:
|
|
||||||
-#line 270 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 267 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
(yyval.message_intro).prev_ctxt = NULL;
|
|
||||||
(yyval.message_intro).prev_id = NULL;
|
|
||||||
@@ -1485,11 +1483,11 @@
|
|
||||||
(yyval.message_intro).pos = (yyvsp[0].string).pos;
|
|
||||||
(yyval.message_intro).obsolete = (yyvsp[0].string).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1489 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1487 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 15:
|
|
||||||
-#line 279 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 276 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].prev), (yyvsp[0].string));
|
|
||||||
(yyval.message_intro).prev_ctxt = (yyvsp[-1].prev).ctxt;
|
|
||||||
@@ -1499,11 +1497,11 @@
|
|
||||||
(yyval.message_intro).pos = (yyvsp[0].string).pos;
|
|
||||||
(yyval.message_intro).obsolete = (yyvsp[0].string).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1503 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1501 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 16:
|
|
||||||
-#line 293 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 290 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].string), (yyvsp[0].stringlist));
|
|
||||||
(yyval.prev).ctxt = (yyvsp[-1].string).string;
|
|
||||||
@@ -1512,11 +1510,11 @@
|
|
||||||
(yyval.prev).pos = (yyvsp[-1].string).pos;
|
|
||||||
(yyval.prev).obsolete = (yyvsp[-1].string).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1516 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1514 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 17:
|
|
||||||
-#line 302 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 299 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-2].string), (yyvsp[-1].stringlist));
|
|
||||||
check_obsolete ((yyvsp[-2].string), (yyvsp[0].string));
|
|
||||||
@@ -1526,21 +1524,21 @@
|
|
||||||
(yyval.prev).pos = (yyvsp[-2].string).pos;
|
|
||||||
(yyval.prev).obsolete = (yyvsp[-2].string).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1530 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1528 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 18:
|
|
||||||
-#line 316 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 313 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
(yyval.string).string = NULL;
|
|
||||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
|
||||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1540 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1538 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 19:
|
|
||||||
-#line 322 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 319 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist));
|
|
||||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos));
|
|
||||||
@@ -1548,21 +1546,21 @@
|
|
||||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
|
||||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1552 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1550 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 20:
|
|
||||||
-#line 333 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 330 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
(yyval.string).string = NULL;
|
|
||||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
|
||||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1562 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1560 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 21:
|
|
||||||
-#line 339 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 336 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist));
|
|
||||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos));
|
|
||||||
@@ -1570,11 +1568,11 @@
|
|
||||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
|
||||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1574 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1572 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 22:
|
|
||||||
-#line 351 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 348 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist));
|
|
||||||
plural_counter = 0;
|
|
||||||
@@ -1582,30 +1580,30 @@
|
|
||||||
(yyval.string).pos = (yyvsp[-1].pos).pos;
|
|
||||||
(yyval.string).obsolete = (yyvsp[-1].pos).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1586 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1584 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 23:
|
|
||||||
-#line 362 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 359 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist));
|
|
||||||
(yyval.string).string = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist);
|
|
||||||
(yyval.string).pos = (yyvsp[-1].pos).pos;
|
|
||||||
(yyval.string).obsolete = (yyvsp[-1].pos).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1597 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1595 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 24:
|
|
||||||
-#line 373 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 370 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
(yyval.rhs) = (yyvsp[0].rhs);
|
|
||||||
}
|
|
||||||
-#line 1605 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1603 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 25:
|
|
||||||
-#line 377 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 374 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].rhs), (yyvsp[0].rhs));
|
|
||||||
(yyval.rhs).rhs.msgstr = XNMALLOC ((yyvsp[-1].rhs).rhs.msgstr_len + (yyvsp[0].rhs).rhs.msgstr_len, char);
|
|
||||||
@@ -1617,11 +1615,11 @@
|
|
||||||
(yyval.rhs).pos = (yyvsp[-1].rhs).pos;
|
|
||||||
(yyval.rhs).obsolete = (yyvsp[-1].rhs).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1621 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1619 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 26:
|
|
||||||
-#line 392 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 389 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-4].pos), (yyvsp[-3].pos));
|
|
||||||
check_obsolete ((yyvsp[-4].pos), (yyvsp[-2].number));
|
|
||||||
@@ -1640,11 +1638,11 @@
|
|
||||||
(yyval.rhs).pos = (yyvsp[-4].pos).pos;
|
|
||||||
(yyval.rhs).obsolete = (yyvsp[-4].pos).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1644 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1642 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 27:
|
|
||||||
-#line 415 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 412 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
string_list_init (&(yyval.stringlist).stringlist);
|
|
||||||
string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string);
|
|
||||||
@@ -1652,11 +1650,11 @@
|
|
||||||
(yyval.stringlist).pos = (yyvsp[0].string).pos;
|
|
||||||
(yyval.stringlist).obsolete = (yyvsp[0].string).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1656 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1654 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 28:
|
|
||||||
-#line 423 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 420 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string));
|
|
||||||
(yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist;
|
|
||||||
@@ -1665,11 +1663,11 @@
|
|
||||||
(yyval.stringlist).pos = (yyvsp[-1].stringlist).pos;
|
|
||||||
(yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1669 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1667 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 29:
|
|
||||||
-#line 435 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 432 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
string_list_init (&(yyval.stringlist).stringlist);
|
|
||||||
string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string);
|
|
||||||
@@ -1677,11 +1675,11 @@
|
|
||||||
(yyval.stringlist).pos = (yyvsp[0].string).pos;
|
|
||||||
(yyval.stringlist).obsolete = (yyvsp[0].string).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1681 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1679 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 30:
|
|
||||||
-#line 443 "po-gram-gen.y" /* yacc.c:1646 */
|
|
||||||
+#line 440 "po-gram-gen.y" /* yacc.c:1648 */
|
|
||||||
{
|
|
||||||
check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string));
|
|
||||||
(yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist;
|
|
||||||
@@ -1690,11 +1688,11 @@
|
|
||||||
(yyval.stringlist).pos = (yyvsp[-1].stringlist).pos;
|
|
||||||
(yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete;
|
|
||||||
}
|
|
||||||
-#line 1694 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1692 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
-#line 1698 "po-gram-gen.c" /* yacc.c:1646 */
|
|
||||||
+#line 1696 "po-gram-gen.c" /* yacc.c:1648 */
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
/* User semantic actions sometimes alter yychar, and that requires
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
70
gettext-0.21.1-covscan.patch
Normal file
70
gettext-0.21.1-covscan.patch
Normal file
|
|
@ -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;
|
||||||
|
|
||||||
486
gettext-0.26-c23.diff
Normal file
486
gettext-0.26-c23.diff
Normal file
|
|
@ -0,0 +1,486 @@
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h 2025-07-08 10:54:38.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h
|
||||||
|
--- gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h 2025-07-08 10:54:38.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.891299356 +0100
|
||||||
|
@@ -237,9 +237,9 @@
|
||||||
|
|
||||||
|
/* Declarations for ISO C N3322. */
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||||
|
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||||
|
- const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
- int (*__compare) (const void *, const void *))
|
||||||
|
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||||
|
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
+ int (*__compare) (const void *, const void *))
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||||
|
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||||
|
int (*__compare) (const void *, const void *))
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h
|
||||||
|
--- gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h 2025-07-08 10:54:38.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.399876581 +0100
|
||||||
|
@@ -316,7 +316,7 @@
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||||
|
# ifndef __cplusplus
|
||||||
|
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||||
|
# endif
|
||||||
|
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h
|
||||||
|
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.892299363 +0100
|
||||||
|
@@ -237,9 +237,9 @@
|
||||||
|
|
||||||
|
/* Declarations for ISO C N3322. */
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||||
|
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||||
|
- const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
- int (*__compare) (const void *, const void *))
|
||||||
|
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||||
|
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
+ int (*__compare) (const void *, const void *))
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||||
|
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||||
|
int (*__compare) (const void *, const void *))
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h
|
||||||
|
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.401876594 +0100
|
||||||
|
@@ -316,7 +316,7 @@
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||||
|
# ifndef __cplusplus
|
||||||
|
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||||
|
# endif
|
||||||
|
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h
|
||||||
|
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.889299343 +0100
|
||||||
|
@@ -237,9 +237,9 @@
|
||||||
|
|
||||||
|
/* Declarations for ISO C N3322. */
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||||
|
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||||
|
- const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
- int (*__compare) (const void *, const void *))
|
||||||
|
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||||
|
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
+ int (*__compare) (const void *, const void *))
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||||
|
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||||
|
int (*__compare) (const void *, const void *))
|
||||||
|
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h
|
||||||
|
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.397876567 +0100
|
||||||
|
@@ -316,7 +316,7 @@
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||||
|
# ifndef __cplusplus
|
||||||
|
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||||
|
# endif
|
||||||
|
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-tools/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h
|
||||||
|
--- gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.896299390 +0100
|
||||||
|
@@ -237,9 +237,9 @@
|
||||||
|
|
||||||
|
/* Declarations for ISO C N3322. */
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||||
|
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||||
|
- const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
- int (*__compare) (const void *, const void *))
|
||||||
|
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||||
|
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
+ int (*__compare) (const void *, const void *))
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||||
|
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||||
|
int (*__compare) (const void *, const void *))
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h
|
||||||
|
--- gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h 2025-07-08 10:54:40.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.404876615 +0100
|
||||||
|
@@ -316,7 +316,7 @@
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||||
|
# ifndef __cplusplus
|
||||||
|
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||||
|
# endif
|
||||||
|
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/gnulib-tests/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-tools/gnulib-tests/c++defs.h 2025-07-08 10:54:40.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/libgettextpo/c++defs.h gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-tools/libgettextpo/c++defs.h 2025-07-08 10:54:49.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h
|
||||||
|
--- gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h 2025-12-18 13:05:15.899299410 +0100
|
||||||
|
@@ -237,9 +237,9 @@
|
||||||
|
|
||||||
|
/* Declarations for ISO C N3322. */
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||||
|
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||||
|
- const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
- int (*__compare) (const void *, const void *))
|
||||||
|
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||||
|
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
+ int (*__compare) (const void *, const void *))
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||||
|
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||||
|
int (*__compare) (const void *, const void *))
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/libgettextpo/wchar.in.h gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h
|
||||||
|
--- gettext-0.26/gettext-tools/libgettextpo/wchar.in.h 2025-07-08 10:54:49.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h 2025-12-18 13:04:13.407876635 +0100
|
||||||
|
@@ -316,7 +316,7 @@
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||||
|
# ifndef __cplusplus
|
||||||
|
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||||
|
# endif
|
||||||
|
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-07-08 10:54:49.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h
|
||||||
|
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.897299397 +0100
|
||||||
|
@@ -237,9 +237,9 @@
|
||||||
|
|
||||||
|
/* Declarations for ISO C N3322. */
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||||
|
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||||
|
- const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
- int (*__compare) (const void *, const void *))
|
||||||
|
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||||
|
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
+ int (*__compare) (const void *, const void *))
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||||
|
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||||
|
int (*__compare) (const void *, const void *))
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h
|
||||||
|
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-07-08 10:54:49.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.406876628 +0100
|
||||||
|
@@ -316,7 +316,7 @@
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||||
|
# ifndef __cplusplus
|
||||||
|
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||||
|
# endif
|
||||||
|
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
diff -r -u gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h
|
||||||
|
--- gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h 2025-07-08 10:55:10.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/libtextstyle/lib/c++defs.h gettext-0.26-patched/libtextstyle/lib/c++defs.h
|
||||||
|
--- gettext-0.26/libtextstyle/lib/c++defs.h 2025-07-08 10:55:22.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/libtextstyle/lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
|
diff -r -u gettext-0.26/libtextstyle/lib/stdlib.in.h gettext-0.26-patched/libtextstyle/lib/stdlib.in.h
|
||||||
|
--- gettext-0.26/libtextstyle/lib/stdlib.in.h 2025-07-08 10:55:22.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/libtextstyle/lib/stdlib.in.h 2025-12-18 13:05:15.894299376 +0100
|
||||||
|
@@ -237,9 +237,9 @@
|
||||||
|
|
||||||
|
/* Declarations for ISO C N3322. */
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||||
|
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||||
|
- const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
- int (*__compare) (const void *, const void *))
|
||||||
|
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||||
|
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||||
|
+ int (*__compare) (const void *, const void *))
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||||
|
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||||
|
int (*__compare) (const void *, const void *))
|
||||||
|
diff -r -u gettext-0.26/libtextstyle/lib/wchar.in.h gettext-0.26-patched/libtextstyle/lib/wchar.in.h
|
||||||
|
--- gettext-0.26/libtextstyle/lib/wchar.in.h 2025-07-08 10:55:22.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/libtextstyle/lib/wchar.in.h 2025-12-18 13:04:13.402876601 +0100
|
||||||
|
@@ -316,7 +316,7 @@
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||||
|
# ifndef __cplusplus
|
||||||
|
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||||
|
# endif
|
||||||
|
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||||
|
diff -r -u gettext-0.26/libtextstyle/tests/c++defs.h gettext-0.26-patched/libtextstyle/tests/c++defs.h
|
||||||
|
--- gettext-0.26/libtextstyle/tests/c++defs.h 2025-07-08 10:55:22.000000000 +0200
|
||||||
|
+++ gettext-0.26-patched/libtextstyle/tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100
|
||||||
|
@@ -127,6 +127,16 @@
|
||||||
|
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||||
|
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||||
|
|
||||||
|
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||||
|
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||||
|
+ the function is like strchr and so is a qualifier-generic macro
|
||||||
|
+ that expands to something more complicated. */
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||||
|
+#else
|
||||||
|
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||||
|
declares the system function, named func, with the given prototype,
|
||||||
|
consisting of return type, parameters, and attributes.
|
||||||
|
@@ -139,7 +149,7 @@
|
||||||
|
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||||
|
*/
|
||||||
|
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||||
|
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||||
|
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||||
|
|
||||||
|
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||||
|
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||||
25
gettext-0.26-stdcountof-h.patch
Normal file
25
gettext-0.26-stdcountof-h.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff -ur gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c
|
||||||
|
--- gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c 2025-07-08 14:24:40.000000000 +0530
|
||||||
|
+++ gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c 2026-01-13 13:07:35.226196031 +0530
|
||||||
|
@@ -42,17 +42,21 @@
|
||||||
|
|
||||||
|
(void) local_bounded;
|
||||||
|
|
||||||
|
+#ifdef _gl_verify_is_array
|
||||||
|
(void) _gl_verify_is_array (unbounded);
|
||||||
|
(void) _gl_verify_is_array (bounded);
|
||||||
|
(void) _gl_verify_is_array (multidimensional);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
ASSERT (countof (bounded) == 10);
|
||||||
|
ASSERT (countof (multidimensional) == 10);
|
||||||
|
ASSERT (countof (local_bounded) == 20);
|
||||||
|
|
||||||
|
#if 0 /* These produce compilation errors. */
|
||||||
|
+#ifdef _gl_verify_is_array
|
||||||
|
(void) _gl_verify_is_array (integer);
|
||||||
|
(void) _gl_verify_is_array (parameter);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
ASSERT (countof (integer) >= 0);
|
||||||
|
ASSERT (countof (unbounded) >= 0);
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
Index: gettext-0.19.8.1/gettext-tools/misc/po-mode.el
|
|
||||||
===================================================================
|
|
||||||
--- gettext-0.19.8.1.orig/gettext-tools/misc/po-mode.el
|
|
||||||
+++ gettext-0.19.8.1/gettext-tools/misc/po-mode.el
|
|
||||||
@@ -3518,10 +3518,12 @@ Write to your team? ('n' if writing to
|
|
||||||
(re-search-forward
|
|
||||||
(concat "^" (regexp-quote mail-header-separator) "\n"))
|
|
||||||
(save-excursion
|
|
||||||
- (insert-buffer-substring buffer)
|
|
||||||
- (shell-command-on-region
|
|
||||||
- (region-beginning) (region-end)
|
|
||||||
- (concat po-gzip-uuencode-command " " name ".gz") t t))))))
|
|
||||||
+ (save-restriction
|
|
||||||
+ (narrow-to-region (point) (point))
|
|
||||||
+ (insert-buffer-substring buffer)
|
|
||||||
+ (shell-command-on-region
|
|
||||||
+ (point-min) (point-max)
|
|
||||||
+ (concat po-gzip-uuencode-command " " name ".gz") t t)))))))
|
|
||||||
(message ""))
|
|
||||||
|
|
||||||
(defun po-confirm-and-quit ()
|
|
||||||
498
gettext.spec
498
gettext.spec
|
|
@ -1,36 +1,41 @@
|
||||||
%bcond_with jar
|
%bcond_with jar
|
||||||
%bcond_with java
|
%bcond_with java
|
||||||
%bcond_without check
|
# Disabled lto flags on i686 to avoid lto memory allocation error
|
||||||
|
%ifarch i686
|
||||||
|
%global _lto_cflags %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
%global tarversion 0.19.8.1
|
Summary: GNU tools and libraries for localized translated messages
|
||||||
%global archiveversion 0.19.8
|
|
||||||
|
|
||||||
Summary: GNU libraries and utilities for producing multi-lingual messages
|
|
||||||
Name: gettext
|
Name: gettext
|
||||||
Version: 0.19.8.1
|
Version: 0.26
|
||||||
Release: 18%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv3+ and LGPLv2+
|
|
||||||
Group: Development/Tools
|
|
||||||
URL: http://www.gnu.org/software/gettext/
|
|
||||||
Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{tarversion}.tar.xz
|
|
||||||
# Disable the test_lock test as it often hangs on a number of arches
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1155291
|
|
||||||
# http://savannah.gnu.org/bugs/?43487
|
|
||||||
Patch0: disable-gettext-runtime-test-lock.patch
|
|
||||||
# Upstreamed patch:
|
|
||||||
# http://lists.gnu.org/archive/html/bug-gettext/2016-08/msg00006.html
|
|
||||||
Patch1: gettext-po-send-mail.patch
|
|
||||||
# Rhbz#1531476, upstream a0cab23332a254e3500cac2a3a984472d02180e5
|
|
||||||
Patch2: gettext-0.19.8-its-segfault.patch
|
|
||||||
# rhbz#1647044
|
|
||||||
Patch3: gettext-0.19.8.1-CVE-2018-18751.patch
|
|
||||||
|
|
||||||
|
# The following are licensed under LGPLv2+:
|
||||||
|
# - libintl and its headers
|
||||||
|
# - libasprintf and its headers
|
||||||
|
# - libintl.jar
|
||||||
|
# - GNU.Gettext.dll
|
||||||
|
# - gettext.sh
|
||||||
|
# The following are licensed under GFDL:
|
||||||
|
# - gettext-tools/doc/FAQ.html
|
||||||
|
# - gettext-tools/doc/tutorial.html
|
||||||
|
# - gettext info files
|
||||||
|
# - 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
|
||||||
|
URL: https://www.gnu.org/software/gettext/
|
||||||
|
Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source2: msghack.py
|
Source2: msghack.py
|
||||||
Source3: msghack.1
|
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
|
# 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++
|
||||||
|
|
@ -47,24 +52,32 @@ 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
|
||||||
BuildRequires: chrpath
|
# for documentation
|
||||||
|
BuildRequires: teckit
|
||||||
|
BuildRequires: texlive-dvips
|
||||||
|
BuildRequires: texlive-dvipdfmx
|
||||||
|
BuildRequires: texinfo-tex
|
||||||
|
BuildRequires: texlive-xetex
|
||||||
# following suggested by DEPENDENCIES:
|
# following suggested by DEPENDENCIES:
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
BuildRequires: libcroco-devel
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: libunistring-devel
|
BuildRequires: libunistring-devel
|
||||||
# Depend on the exact version of the library sub package
|
# for the tests
|
||||||
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
BuildRequires: glibc-langpack-de
|
||||||
# for F17 UsrMove
|
BuildRequires: glibc-langpack-en
|
||||||
Conflicts: filesystem < 3
|
BuildRequires: glibc-langpack-fa
|
||||||
Provides: /bin/gettext
|
BuildRequires: glibc-langpack-fr
|
||||||
# exception for bundled gnulib copylib
|
BuildRequires: glibc-langpack-ja
|
||||||
|
BuildRequires: glibc-langpack-tr
|
||||||
|
BuildRequires: glibc-langpack-zh
|
||||||
|
BuildRequires: make
|
||||||
Provides: bundled(gnulib)
|
Provides: bundled(gnulib)
|
||||||
|
Requires: %{name}-runtime = %{version}-%{release}
|
||||||
|
Requires: libtextstyle%{?_isa} = %{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
|
||||||
|
|
@ -79,11 +92,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}
|
||||||
Group: Development/Tools
|
|
||||||
# autopoint archive
|
# autopoint archive
|
||||||
License: GPLv3+
|
License: GPL-3.0-or-later
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description common-devel
|
%description common-devel
|
||||||
|
|
@ -92,17 +119,15 @@ This package contains common architecture independent gettext development files.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Group: Development/Tools
|
|
||||||
# autopoint is GPLv3+
|
# autopoint is GPLv3+
|
||||||
# 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 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}
|
||||||
Requires(post): info
|
|
||||||
Requires(preun): info
|
|
||||||
Requires: xz
|
Requires: xz
|
||||||
|
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}
|
||||||
|
|
||||||
|
|
@ -115,18 +140,34 @@ want to add gettext support for your project.
|
||||||
|
|
||||||
%package libs
|
%package libs
|
||||||
Summary: Libraries for %{name}
|
Summary: Libraries for %{name}
|
||||||
Group: System Environment/Libraries
|
|
||||||
# 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
|
||||||
|
Requires: libtextstyle%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description libs
|
%description libs
|
||||||
This package contains libraries used internationalization support.
|
This package contains libraries used internationalization support.
|
||||||
|
|
||||||
|
%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.
|
||||||
|
|
||||||
%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
|
||||||
Group: Applications/Editors
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# help users find po-mode.el
|
# help users find po-mode.el
|
||||||
Provides: emacs-po-mode
|
Provides: emacs-po-mode
|
||||||
|
|
@ -146,8 +187,27 @@ 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 -n %{name}-%{tarversion} -S git
|
%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
|
||||||
|
# indicate this is done because the libtextstyle authors do not want
|
||||||
|
# applications using their code to suffer startup delays due to the
|
||||||
|
# relocations. This is not a sufficient reason for Fedora.
|
||||||
|
sed -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \
|
||||||
|
-i libtextstyle/configure
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
@ -161,9 +221,13 @@ export JAR=fastjar
|
||||||
# prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016)
|
# prevent test-isinf from failing with gcc-5.3.1 on ppc64le (#1294016)
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"
|
export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"
|
||||||
%endif
|
%endif
|
||||||
# --disable-rpath doesn't work properly on lib64
|
# Fedora's libxml2-devel package has an extra "libxml2" path component.
|
||||||
%configure --without-included-gettext --enable-nls --disable-static \
|
export CPPFLAGS="-I%{_includedir}/libxml2"
|
||||||
--enable-shared --with-pic --disable-csharp --disable-rpath \
|
# 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}
|
%if %{with java}
|
||||||
--enable-java \
|
--enable-java \
|
||||||
%else
|
%else
|
||||||
|
|
@ -171,18 +235,24 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"
|
||||||
%endif
|
%endif
|
||||||
--with-xz
|
--with-xz
|
||||||
|
|
||||||
make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"}
|
# Eliminate hardcoded rpaths; workaround libtool reordering -Wl,--as-needed
|
||||||
|
# after all the libraries.
|
||||||
|
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"}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="%{__install} -p" \
|
%make_install \
|
||||||
lispdir=%{_datadir}/emacs/site-lisp/gettext \
|
lispdir=%{_datadir}/emacs/site-lisp/gettext \
|
||||||
aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
|
aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|
@ -199,7 +269,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples
|
||||||
|
|
||||||
rm -rf htmldoc
|
rm -rf htmldoc
|
||||||
mkdir htmldoc
|
mkdir htmldoc
|
||||||
mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc
|
mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf/* htmldoc
|
||||||
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
|
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
|
||||||
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
|
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
|
||||||
|
|
||||||
|
|
@ -235,41 +305,51 @@ 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
|
|
||||||
|
|
||||||
# cleanup rpaths
|
|
||||||
for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do
|
|
||||||
if file $i | grep "ELF 64-bit" >/dev/null; then
|
|
||||||
chrpath -l $i && chrpath --delete $i
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with check}
|
|
||||||
%check
|
%check
|
||||||
# this takes quite a lot of time to run
|
# this takes quite a lot of time to run
|
||||||
|
|
||||||
|
# adapt to rpath removal
|
||||||
|
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
|
||||||
%endif
|
|
||||||
|
|
||||||
%ldconfig_scriptlets libs
|
%ldconfig_scriptlets libs
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}-tools.lang
|
||||||
%doc AUTHORS gettext-runtime/BUGS
|
%doc AUTHORS NEWS README THANKS
|
||||||
%doc COPYING gettext-tools/misc/DISCLAIM README
|
%doc gettext-tools/misc/disclaim-translations.txt
|
||||||
%doc NEWS THANKS
|
%doc gettext-tools/man/msg*.1.html
|
||||||
%doc gettext-runtime/man/*.1.html
|
%doc gettext-tools/man/recode*.1.html
|
||||||
%doc gettext-runtime/intl/COPYING*
|
%doc gettext-tools/man/xgettext.1.html
|
||||||
%{_bindir}/*
|
%doc gettext-tools/doc/FAQ.html
|
||||||
%exclude %{_bindir}/autopoint
|
%doc gettext-tools/doc/tutorial.html
|
||||||
%exclude %{_bindir}/gettextize
|
%{_bindir}/msgattrib
|
||||||
%exclude %{_bindir}/msghack
|
%{_bindir}/msgcat
|
||||||
|
%{_bindir}/msgcmp
|
||||||
|
%{_bindir}/msgcomm
|
||||||
|
%{_bindir}/msgconv
|
||||||
|
%{_bindir}/msgen
|
||||||
|
%{_bindir}/msgexec
|
||||||
|
%{_bindir}/msgfilter
|
||||||
|
%{_bindir}/msgfmt
|
||||||
|
%{_bindir}/msggrep
|
||||||
|
%{_bindir}/msginit
|
||||||
|
%{_bindir}/msgmerge
|
||||||
|
%{_bindir}/msgunfmt
|
||||||
|
%{_bindir}/msguniq
|
||||||
|
%{_bindir}/recode-sr-latin
|
||||||
|
%{_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.*
|
||||||
|
|
@ -279,22 +359,61 @@ make check LIBUNISTRING=-lunistring
|
||||||
%{_datadir}/%{name}/ABOUT-NLS
|
%{_datadir}/%{name}/ABOUT-NLS
|
||||||
%{_datadir}/%{name}/po
|
%{_datadir}/%{name}/po
|
||||||
%{_datadir}/%{name}/styles
|
%{_datadir}/%{name}/styles
|
||||||
%dir %{_datadir}/%{name}-%{archiveversion}
|
%{_datadir}/%{name}/disclaim-translations.txt
|
||||||
%{_datadir}/%{name}-%{archiveversion}/its
|
%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
|
||||||
|
%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
|
||||||
|
%{_bindir}/printf_gettext
|
||||||
|
%{_bindir}/printf_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/
|
||||||
%{_datadir}/%{name}/config.rpath
|
%{_datadir}/%{name}/config.rpath
|
||||||
%{_datadir}/%{name}/*.h
|
%{_datadir}/%{name}/*.h
|
||||||
%{_datadir}/%{name}/msgunfmt.tcl
|
%{_datadir}/%{name}/msgunfmt.tcl
|
||||||
%{_datadir}/aclocal/*
|
%{_datadir}/%{name}/m4/*
|
||||||
%{_includedir}/*
|
%{_datadir}/aclocal/nls.m4
|
||||||
|
%{_includedir}/autosprintf.h
|
||||||
|
%{_includedir}/gettext-po.h
|
||||||
%{_infodir}/autosprintf*
|
%{_infodir}/autosprintf*
|
||||||
%{_libdir}/libasprintf.so
|
%{_libdir}/libasprintf.so
|
||||||
%{_libdir}/libgettextpo.so
|
%{_libdir}/libgettextpo.so
|
||||||
|
|
@ -302,7 +421,6 @@ make check LIBUNISTRING=-lunistring
|
||||||
%{_mandir}/man1/autopoint.1*
|
%{_mandir}/man1/autopoint.1*
|
||||||
%{_mandir}/man1/gettextize.1*
|
%{_mandir}/man1/gettextize.1*
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
%{_datadir}/%{name}/intl
|
|
||||||
%{_datadir}/%{name}/javaversion.class
|
%{_datadir}/%{name}/javaversion.class
|
||||||
%doc gettext-runtime/intl-java/javadoc*
|
%doc gettext-runtime/intl-java/javadoc*
|
||||||
%if %{with java}
|
%if %{with java}
|
||||||
|
|
@ -318,6 +436,16 @@ make check LIBUNISTRING=-lunistring
|
||||||
%{_datadir}/%{name}/libintl.jar
|
%{_datadir}/%{name}/libintl.jar
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%files -n libtextstyle
|
||||||
|
%{_libdir}/libtextstyle.so.0*
|
||||||
|
|
||||||
|
%files -n libtextstyle-devel
|
||||||
|
%{_docdir}/libtextstyle/
|
||||||
|
%{_includedir}/textstyle/
|
||||||
|
%{_includedir}/textstyle.h
|
||||||
|
%{_infodir}/libtextstyle*
|
||||||
|
%{_libdir}/libtextstyle.so
|
||||||
|
|
||||||
%files -n emacs-%{name}
|
%files -n emacs-%{name}
|
||||||
%dir %{_emacs_sitelispdir}/%{name}
|
%dir %{_emacs_sitelispdir}/%{name}
|
||||||
%{_emacs_sitelispdir}/%{name}/*.elc
|
%{_emacs_sitelispdir}/%{name}/*.elc
|
||||||
|
|
@ -330,6 +458,208 @@ make check LIBUNISTRING=-lunistring
|
||||||
%{_mandir}/man1/msghack.1*
|
%{_mandir}/man1/msghack.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jan 11 2026 Manish Tiwari <matiwari@redhat.com> - 0.26-3
|
||||||
|
- https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00095.html
|
||||||
|
- Upstream patch to fix implicit declaration error with GCC-16
|
||||||
|
|
||||||
|
* Thu Dec 18 2025 Manish Tiwari <matiwari@redhat.com> - 0.26-2
|
||||||
|
- Add upstream provided patch to fix build failure with glibc 2.42 C23 const-preserving macros
|
||||||
|
- https://lists.gnu.org/archive/html/bug-gnulib/2025-11/msg00220.html
|
||||||
|
|
||||||
|
* Tue Aug 19 2025 Manish Tiwari <matiwari@redhat.com> - 0.26-1
|
||||||
|
- update to 0.26 release
|
||||||
|
- https://savannah.gnu.org/news/?id=10789
|
||||||
|
|
||||||
|
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 23 2025 Manish Tiwari <matiwari@redhat.com> - 0.25.1-1
|
||||||
|
- update to 0.25.1 release
|
||||||
|
- Bug fixes:
|
||||||
|
- autopoint no longer fails if configure.ac contains no AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION invocation.
|
||||||
|
- nls.m4 is installed again under $PREFIX/share/aclocal/.
|
||||||
|
|
||||||
|
* Mon May 12 2025 Manish Tiwari <matiwari@redhat.com> - 0.25-1
|
||||||
|
- update to 0.25 release
|
||||||
|
- https://savannah.gnu.org/news/?id=10769
|
||||||
|
|
||||||
|
* Thu Feb 27 2025 Manish Tiwari <matiwari@redhat.com> - 0.24-1
|
||||||
|
- update to 0.24 release
|
||||||
|
- https://savannah.gnu.org/news/?id=10730
|
||||||
|
|
||||||
|
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 1 2025 Manish Tiwari <matiwari@redhat.com> - 0.23.1-1
|
||||||
|
- update to 0.23.1 release
|
||||||
|
- Remove gettext-0.23-libxml2 patch
|
||||||
|
|
||||||
|
* Wed Dec 11 2024 Manish Tiwari <matiwari@redhat.com> - 0.23-1
|
||||||
|
- update to 0.23 release
|
||||||
|
- https://savannah.gnu.org/news/?id=10699
|
||||||
|
- Add patch to fix compilation error with libxml2 >= 2.12.0 and gcc >= 14.
|
||||||
|
- Remove gettext-0.22-disable-libtextstyle patch
|
||||||
|
|
||||||
|
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.5-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 11 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-5
|
||||||
|
- CI gating tests migration to tmt
|
||||||
|
|
||||||
|
* Thu Jul 4 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-4
|
||||||
|
- Add explicit package version requirement for libtextstyle
|
||||||
|
|
||||||
|
* Tue Jul 2 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-3
|
||||||
|
- Add back libtextstyle for f40 (#2278984)
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
|
* 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
|
||||||
|
which is now unmaintained and has known security bugs.
|
||||||
|
Obsolete libtextstyle and libtextstyle-devel packages.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Sep 7 2020 Sundeep Anand <suanand@redhat.com> - 0.21-3
|
||||||
|
- include patch to fix gnulib perror tests (rhbz#1867021)
|
||||||
|
|
||||||
|
* Thu Aug 6 2020 Jens Petersen <petersen@redhat.com> - 0.21-2
|
||||||
|
- reenable testsuite except for armv7hl which is failing
|
||||||
|
|
||||||
|
* Mon Aug 03 2020 Sundeep Anand <suanand@redhat.com> - 0.21-1
|
||||||
|
- gettext-0.21 is available (rhbz#1860728)
|
||||||
|
|
||||||
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.2-4
|
||||||
|
- Second attempt - Rebuilt for
|
||||||
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 0.20.2-3
|
||||||
|
- Bundle libcroco so we can remove the system package
|
||||||
|
|
||||||
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Apr 14 2020 Sundeep Anand <suanand@redhat.com> - 0.20.2-1
|
||||||
|
- gettext-0.20.2 is available (rhbz#1823721)
|
||||||
|
|
||||||
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 06 2020 Sundeep Anand <suanand@redhat.com> - 0.20.1-3
|
||||||
|
- Add diffutils dependency on gettext-devel (rhbz#1774899)
|
||||||
|
|
||||||
|
* Tue Aug 20 2019 Daiki Ueno <dueno@redhat.com> - 0.20.1-2
|
||||||
|
- Fix misbehavior of msgmerge --for-msgfmt
|
||||||
|
|
||||||
|
* Fri Aug 9 2019 Jerry James <loganjerry@gmail.com> - 0.20.1-1
|
||||||
|
- update to 0.20.1 release, all patches upstreamed
|
||||||
|
- add GFDL to License fields due to info files
|
||||||
|
- add libtextstyle{,-devel} subpackages
|
||||||
|
- reenable testsuite
|
||||||
|
- build with libacl support
|
||||||
|
- BR various glibc langpacks wanted by the tests
|
||||||
|
- drop ancient Conflicts due to UsrMove
|
||||||
|
- prevent rpaths rather than removing them
|
||||||
|
- explicitly list binaries in the main package to avoid extra build-ids
|
||||||
|
|
||||||
|
* Fri Aug 9 2019 Jens Petersen <petersen@redhat.com> - 0.19.8.1-22
|
||||||
|
- temporarily disable testsuite (#1735245)
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.8.1-21
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Mar 7 2019 Tim Landscheidt <tim@tim-landscheidt.de> - 0.19.8.1-20
|
||||||
|
- Remove obsolete requirements for %%post/%%preun scriptlets
|
||||||
|
|
||||||
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.8.1-19
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
* Thu Nov 08 2018 Pavel Raiskup <praiskup@redhat.com> - 0.19.8.1-18
|
* Thu Nov 08 2018 Pavel Raiskup <praiskup@redhat.com> - 0.19.8.1-18
|
||||||
- fix CVE-2018-18751 (rhbz#1647044)
|
- fix CVE-2018-18751 (rhbz#1647044)
|
||||||
- put gettextize man page into gettext-devel (man page scan, rhbz#1611303)
|
- put gettextize man page into gettext-devel (man page scan, rhbz#1611303)
|
||||||
|
|
@ -619,13 +949,13 @@ make check LIBUNISTRING=-lunistring
|
||||||
- Fix the build failure with koji.
|
- Fix the build failure with koji.
|
||||||
|
|
||||||
* Fri Aug 29 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.17-7
|
* Fri Aug 29 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.17-7
|
||||||
- Remove the gettext-libs docs, as they are talking about autoconf, libtool,
|
- Remove the gettext-libs docs, as they are talking about autoconf, libtool,
|
||||||
which are not directly related to the gettext-libs.
|
which are not directly related to the gettext-libs.
|
||||||
- Remove unused definition and trailing space.
|
- Remove unused definition and trailing space.
|
||||||
- Fix the build failure with mock .
|
- Fix the build failure with mock .
|
||||||
|
|
||||||
* Tue Aug 19 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.17-6
|
* Tue Aug 19 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.17-6
|
||||||
- Fixed Bug 456666 msghack doesn't check for mandatory cmd line params
|
- Fixed Bug 456666 msghack doesn't check for mandatory cmd line params
|
||||||
by adding checking statements and display usage (msghack.py modified)
|
by adding checking statements and display usage (msghack.py modified)
|
||||||
- rpath patch for binary-or-shlib-defines-rpath in x86_64.
|
- rpath patch for binary-or-shlib-defines-rpath in x86_64.
|
||||||
|
|
||||||
|
|
@ -743,7 +1073,7 @@ make check LIBUNISTRING=-lunistring
|
||||||
- rebuild
|
- rebuild
|
||||||
|
|
||||||
* Wed Feb 22 2006 Karsten Hopp <karsten@redhat.de> 0.14.5-3
|
* Wed Feb 22 2006 Karsten Hopp <karsten@redhat.de> 0.14.5-3
|
||||||
- --disable-csharp, otherwise it'll build a dll when mono is
|
- --disable-csharp, otherwise it'll build a dll when mono is
|
||||||
installed in the buildroot.
|
installed in the buildroot.
|
||||||
|
|
||||||
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.14.5-2.2.2
|
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.14.5-2.2.2
|
||||||
|
|
@ -908,7 +1238,7 @@ make check LIBUNISTRING=-lunistring
|
||||||
without
|
without
|
||||||
|
|
||||||
* Thu Aug 9 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
* Thu Aug 9 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
||||||
- Added "--append" and "-o" to msghack, which should address
|
- Added "--append" and "-o" to msghack, which should address
|
||||||
initial concerns in #50065
|
initial concerns in #50065
|
||||||
|
|
||||||
* Thu Jul 19 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
* Thu Jul 19 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
||||||
|
|
@ -998,7 +1328,7 @@ make check LIBUNISTRING=-lunistring
|
||||||
* Thu May 06 1999 Cristian Gafton <gafton@redhat.com>
|
* Thu May 06 1999 Cristian Gafton <gafton@redhat.com>
|
||||||
- msghack updates
|
- msghack updates
|
||||||
|
|
||||||
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
|
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
|
||||||
- auto rebuild in the new build environment (release 8)
|
- auto rebuild in the new build environment (release 8)
|
||||||
|
|
||||||
* Mon Mar 08 1999 Cristian Gafton <gafton@redhat.com>
|
* Mon Mar 08 1999 Cristian Gafton <gafton@redhat.com>
|
||||||
|
|
|
||||||
5
plans/basic.fmf
Normal file
5
plans/basic.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
summary: Basic smoke test
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
df3f5690eaa30fd228537b00cb7b7590 gettext-0.19.8.1.tar.xz
|
SHA512 (gettext-0.26.tar.gz) = 6c2afb0737843028e1cd27f1cd7dd5b81372ccff8cd8e01e17cfdc517afdd9a849c232f1ff5adca5eb4b03f2cc64f4a3f689ae8b84e523ceeae85384f3844083
|
||||||
|
|
|
||||||
5
tests/main.fmf
Normal file
5
tests/main.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
summary: Run gettext test
|
||||||
|
test: ./test.sh
|
||||||
|
framework: beakerlib
|
||||||
|
require:
|
||||||
|
- gettext
|
||||||
25
tests/test.sh
Executable file
25
tests/test.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
PACKAGE="gettext"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm $PACKAGE
|
||||||
|
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
|
||||||
|
rlRun "cp test_i18n.py test_gettext.py $TmpDir"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlLog "Run test_gettext.py"
|
||||||
|
rlRun "python3 test_gettext.py"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
||||||
227
tests/test_gettext.py
Normal file
227
tests/test_gettext.py
Normal file
|
|
@ -0,0 +1,227 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
# Saving logs
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
|
DECORATE_STR = "************************************"
|
||||||
|
logging.info("TEST RESULTS FOR GETTEXT\n{0}".format(DECORATE_STR))
|
||||||
|
|
||||||
|
# CONSTANTS
|
||||||
|
PACKAGE_TO_TEST = "gettext"
|
||||||
|
DOMAIN_TO_BIND = "testdomain"
|
||||||
|
PYTHON_INTERPRETER = "python3"
|
||||||
|
TEST_I18N_FILE = "test_i18n.py"
|
||||||
|
|
||||||
|
LOG_INFO_PASS = "[ PASS ]"
|
||||||
|
LOG_INFO_FAIL = "[ FAIL ]"
|
||||||
|
LOG_INFO_OS_ERROR = "[ OS Error ]"
|
||||||
|
|
||||||
|
# Test Data
|
||||||
|
TEST_DATA = {"fr_FR": '''msgstr "Bonjour le monde!"''',
|
||||||
|
"de_DE": '''msgstr "Hallo Welt!"''',
|
||||||
|
"es_ES": '''msgstr "Hola Mundo!"''',
|
||||||
|
"it_IT": '''msgstr "Ciao mondo!"''',
|
||||||
|
"pt_BR": '''msgstr "Olá Mundo!"''',
|
||||||
|
"ja_JP": '''msgstr "「こんにちは世界」"''',
|
||||||
|
"ko_KR": '''msgstr "안녕하세요!"''',
|
||||||
|
"ru_RU": '''msgstr "Привет мир!"''',
|
||||||
|
"zh_CN": '''msgstr "你好,世界!"''',
|
||||||
|
"zh_TW": '''msgstr "你好,世界!"'''}
|
||||||
|
|
||||||
|
|
||||||
|
def test_locale():
|
||||||
|
"""
|
||||||
|
Check common files for locale support
|
||||||
|
"""
|
||||||
|
|
||||||
|
subject = "Locale Support Test"
|
||||||
|
|
||||||
|
try:
|
||||||
|
all_locales = subprocess.Popen(["locale", "-a"], stdout=subprocess.PIPE)
|
||||||
|
all_locales_data = all_locales.communicate()
|
||||||
|
|
||||||
|
if all_locales_data:
|
||||||
|
actual = all_locales_data[0].decode().split('\n')
|
||||||
|
else:
|
||||||
|
logging.error("{0}: ERROR\n".format(subject))
|
||||||
|
return
|
||||||
|
|
||||||
|
expected_locales = ['en_US', 'en_US.iso88591',
|
||||||
|
'en_US.iso885915', 'en_US.utf8']
|
||||||
|
if set(expected_locales).issubset(set(actual)):
|
||||||
|
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
|
||||||
|
else:
|
||||||
|
logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL))
|
||||||
|
|
||||||
|
except OSError as e:
|
||||||
|
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
|
||||||
|
|
||||||
|
|
||||||
|
def test_gettext():
|
||||||
|
"""
|
||||||
|
Check if gettext is present
|
||||||
|
"""
|
||||||
|
|
||||||
|
subject = "GNU Internationalization Utilities Test"
|
||||||
|
|
||||||
|
try:
|
||||||
|
cmd_check_gettext = ['rpm', '-q', PACKAGE_TO_TEST]
|
||||||
|
p1 = subprocess.Popen(cmd_check_gettext, stdout=subprocess.PIPE)
|
||||||
|
std_data, stderr = p1.communicate()
|
||||||
|
std_data = std_data.decode()
|
||||||
|
logging.info("Found {0} NVR: {1}".format(PACKAGE_TO_TEST, std_data))
|
||||||
|
if PACKAGE_TO_TEST in std_data:
|
||||||
|
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
|
||||||
|
else:
|
||||||
|
logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL))
|
||||||
|
except OSError as e:
|
||||||
|
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
|
||||||
|
|
||||||
|
|
||||||
|
def test_pot_creation():
|
||||||
|
"""
|
||||||
|
Creates hello.pot file using test_i18n.py file
|
||||||
|
"""
|
||||||
|
|
||||||
|
subject = "POT file Creation Test"
|
||||||
|
|
||||||
|
try:
|
||||||
|
pot_file = subprocess.Popen(
|
||||||
|
"xgettext -d '{0}' -o {1}.pot {2}".format(DOMAIN_TO_BIND,
|
||||||
|
DOMAIN_TO_BIND,
|
||||||
|
TEST_I18N_FILE),
|
||||||
|
shell=True
|
||||||
|
)
|
||||||
|
pot_file.communicate()
|
||||||
|
except OSError as e:
|
||||||
|
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
|
||||||
|
else:
|
||||||
|
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
|
||||||
|
|
||||||
|
|
||||||
|
def make_dir(locale_dir):
|
||||||
|
path = "./locale/{0}/LC_MESSAGES".format(locale_dir)
|
||||||
|
os.makedirs(path)
|
||||||
|
|
||||||
|
|
||||||
|
def create_po_files(active_locale):
|
||||||
|
"""
|
||||||
|
creates .po file using POT file
|
||||||
|
"""
|
||||||
|
|
||||||
|
subject = "PO file Creation"
|
||||||
|
|
||||||
|
try:
|
||||||
|
cmd_po_files = subprocess.Popen(
|
||||||
|
"msginit --no-translator -l {0} -i {1}.pot -o ./locale/{2}/LC_MESSAGES/{3}.po".format(
|
||||||
|
active_locale, DOMAIN_TO_BIND, active_locale, active_locale), shell=True
|
||||||
|
)
|
||||||
|
cmd_po_files.communicate()
|
||||||
|
except OSError as e:
|
||||||
|
logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR))
|
||||||
|
else:
|
||||||
|
logging.info("{0} Succeed.".format(subject))
|
||||||
|
|
||||||
|
|
||||||
|
def translate(active_locale):
|
||||||
|
"""
|
||||||
|
Updates .po file with the translations for respective language
|
||||||
|
"""
|
||||||
|
|
||||||
|
data = TEST_DATA.get(active_locale)
|
||||||
|
if not data:
|
||||||
|
return
|
||||||
|
with open('./locale/{0}/LC_MESSAGES/{1}.po'.format(active_locale,
|
||||||
|
active_locale),
|
||||||
|
'r', encoding='latin-1') as f1:
|
||||||
|
data1 = f1.readlines()
|
||||||
|
data1.pop()
|
||||||
|
data1.append(data)
|
||||||
|
for index, data in enumerate(data1):
|
||||||
|
if "Content-Type" in data:
|
||||||
|
data1[index] = '"Content-Type: text/plain; charset=UTF-8\\n"\n'
|
||||||
|
|
||||||
|
with open('./locale/{0}/LC_MESSAGES/{1}'.format(active_locale,
|
||||||
|
active_locale) + ".po", 'w') as f2:
|
||||||
|
for line in data1:
|
||||||
|
f2.write(line)
|
||||||
|
|
||||||
|
|
||||||
|
def create_mo_files(active_locale):
|
||||||
|
"""
|
||||||
|
Creates .mo file for different locale form .po file
|
||||||
|
"""
|
||||||
|
|
||||||
|
subject = "MO file Creation"
|
||||||
|
|
||||||
|
try:
|
||||||
|
mo_files = subprocess.Popen(
|
||||||
|
"msgfmt ./locale/{0}/LC_MESSAGES/{1}.po --output-file ./locale/{2}/LC_MESSAGES/{3}.mo".format(
|
||||||
|
active_locale, active_locale, active_locale, active_locale
|
||||||
|
), shell=True
|
||||||
|
)
|
||||||
|
mo_files.communicate()
|
||||||
|
except OSError as e:
|
||||||
|
logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR))
|
||||||
|
else:
|
||||||
|
logging.info("{0} Succeed.".format(subject))
|
||||||
|
|
||||||
|
|
||||||
|
def test_translations(active_locale):
|
||||||
|
"""
|
||||||
|
Verify if the output is correct for different language
|
||||||
|
"""
|
||||||
|
|
||||||
|
subject = "Translation Test"
|
||||||
|
|
||||||
|
try:
|
||||||
|
cmd_translation_test = subprocess.check_output(
|
||||||
|
'LANGUAGE={0} {1} {2} {3}'.format(active_locale,
|
||||||
|
PYTHON_INTERPRETER,
|
||||||
|
TEST_I18N_FILE,
|
||||||
|
active_locale),
|
||||||
|
encoding='UTF-8', shell=True
|
||||||
|
)
|
||||||
|
if cmd_translation_test.strip() == TEST_DATA[active_locale].strip('msgstr "'):
|
||||||
|
logging.info("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_PASS))
|
||||||
|
else:
|
||||||
|
logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_FAIL))
|
||||||
|
except OSError as e:
|
||||||
|
logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_OS_ERROR))
|
||||||
|
|
||||||
|
|
||||||
|
def tear_off():
|
||||||
|
try:
|
||||||
|
subprocess.call(['rm', '-rf', './locale', '{0}.pot'.format(DOMAIN_TO_BIND)])
|
||||||
|
except OSError as e:
|
||||||
|
logging.error("OSError\n")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
"""
|
||||||
|
Gettext Tests
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Prepare tests
|
||||||
|
env_tests = [test_locale,
|
||||||
|
test_gettext,
|
||||||
|
test_pot_creation]
|
||||||
|
|
||||||
|
translation_tests = [make_dir,
|
||||||
|
create_po_files,
|
||||||
|
translate,
|
||||||
|
create_mo_files,
|
||||||
|
test_translations]
|
||||||
|
|
||||||
|
# Execute tests
|
||||||
|
[env_test() for env_test in env_tests]
|
||||||
|
|
||||||
|
for locale in TEST_DATA.keys():
|
||||||
|
[test(locale) for test in translation_tests]
|
||||||
|
|
||||||
|
tear_off()
|
||||||
14
tests/test_i18n.py
Normal file
14
tests/test_i18n.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
import gettext
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def print_message(locale):
|
||||||
|
# Set up message catalog access
|
||||||
|
t = gettext.translation('%s' % locale, 'locale', fallback=True)
|
||||||
|
_ = t.gettext
|
||||||
|
|
||||||
|
s = _('Hello World!')
|
||||||
|
print(s)
|
||||||
|
|
||||||
|
|
||||||
|
print_message(sys.argv[1])
|
||||||
|
|
@ -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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue