Sync from SUSE:SLFO:Main gettext-runtime revision 38d21bf8c4e5a3a5e5e0cc6a00d60593

This commit is contained in:
Adrian Schröter 2024-05-03 12:48:44 +02:00
commit 8d6587d89d
30 changed files with 6784 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,399 @@
From a079538e51c6c6e9855d9e7bde1519eaa59bb94d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mark=C3=A9ta=20Cal=C3=A1bkov=C3=A1?=
<meggy.calabkova@gmail.com>
Date: Thu, 9 Jan 2020 14:40:25 +0100
Subject: [PATCH 1/2] msgcat: Add feature to use the newest po file.
When concatenating po files, it is often useful to prefer strings from
the newest file regardless their ordering on the command line.
---
gettext-tools/src/Makefile.am | 4 +-
gettext-tools/src/message.c | 6 +++
gettext-tools/src/message.h | 4 ++
gettext-tools/src/msgcat.c | 10 ++++
gettext-tools/src/msgl-age.c | 96 +++++++++++++++++++++++++++++++++
gettext-tools/src/msgl-age.h | 36 +++++++++++++
gettext-tools/src/msgl-cat.c | 15 ++++++
gettext-tools/src/msgl-cat.h | 1 +
gettext-tools/src/msgl-header.c | 47 ++++++++++++++++
gettext-tools/src/msgl-header.h | 6 +++
10 files changed, 223 insertions(+), 2 deletions(-)
create mode 100644 gettext-tools/src/msgl-age.c
create mode 100644 gettext-tools/src/msgl-age.h
Index: gettext-0.21/gettext-tools/src/Makefile.am
===================================================================
--- gettext-0.21.orig/gettext-tools/src/Makefile.am
+++ gettext-0.21/gettext-tools/src/Makefile.am
@@ -43,7 +43,7 @@ noinst_HEADERS = \
write-catalog.h write-po.h write-properties.h write-stringtable.h \
dir-list.h file-list.h po-gram-gen.h po-gram-gen2.h cldr-plural.h \
cldr-plural-exp.h locating-rule.h its.h search-path.h \
- msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-cat.h msgl-header.h \
+ msgl-age.h msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-cat.h msgl-header.h \
msgl-english.h msgl-check.h msgl-fsearch.h msgfmt.h msgunfmt.h \
plural-count.h plural-eval.h plural-distrib.h \
read-mo.h write-mo.h \
@@ -174,7 +174,7 @@ FORMAT_SOURCE += \
libgettextsrc_la_SOURCES = \
$(COMMON_SOURCE) read-catalog.c \
write-catalog.c write-properties.c write-stringtable.c write-po.c \
-msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \
+msgl-age.c msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \
msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c \
plural-table.c quote.h sentence.h sentence.c \
$(FORMAT_SOURCE) \
Index: gettext-0.21/gettext-tools/src/message.c
===================================================================
--- gettext-0.21.orig/gettext-tools/src/message.c
+++ gettext-0.21/gettext-tools/src/message.c
@@ -356,6 +356,12 @@ message_list_append (message_list_ty *ml
abort ();
}
+void
+message_list_append_list (message_list_ty *mlp, message_list_ty *mlp2)
+{
+ for (int i = 0; i < mlp2->nitems; i++)
+ message_list_append (mlp,mlp2->item[i]);
+}
void
message_list_prepend (message_list_ty *mlp, message_ty *mp)
Index: gettext-0.21/gettext-tools/src/message.h
===================================================================
--- gettext-0.21.orig/gettext-tools/src/message.h
+++ gettext-0.21/gettext-tools/src/message.h
@@ -24,6 +24,7 @@
#include "mem-hash-map.h"
#include <stdbool.h>
+#include <time.h>
#ifdef __cplusplus
@@ -269,6 +270,8 @@ extern void
extern void
message_list_append (message_list_ty *mlp, message_ty *mp);
extern void
+ message_list_append_list (message_list_ty *mlp, message_list_ty *mlp2);
+extern void
message_list_prepend (message_list_ty *mlp, message_ty *mp);
extern void
message_list_insert_at (message_list_ty *mlp, size_t n, message_ty *mp);
@@ -350,6 +353,7 @@ struct msgdomain_list_ty
size_t nitems_max;
bool use_hashtable;
const char *encoding; /* canonicalized encoding or NULL if unknown */
+ time_t msgage;
};
extern msgdomain_list_ty *
Index: gettext-0.21/gettext-tools/src/msgcat.c
===================================================================
--- gettext-0.21.orig/gettext-tools/src/msgcat.c
+++ gettext-0.21/gettext-tools/src/msgcat.c
@@ -88,6 +88,7 @@ static const struct option long_options[
{ "to-code", required_argument, NULL, 't' },
{ "unique", no_argument, NULL, 'u' },
{ "use-first", no_argument, NULL, CHAR_MAX + 1 },
+ { "use-newest", no_argument, NULL, CHAR_MAX + 9 },
{ "version", no_argument, NULL, 'V' },
{ "width", required_argument, NULL, 'w' },
{ "more-than", required_argument, NULL, '>' },
@@ -141,6 +142,7 @@ main (int argc, char **argv)
more_than = 0;
less_than = INT_MAX;
use_first = false;
+ use_newest = false;
while ((optchar = getopt_long (argc, argv, "<:>:D:eEf:Fhino:pPst:uVw:",
long_options, NULL)) != EOF)
@@ -277,6 +279,11 @@ main (int argc, char **argv)
message_print_style_filepos (filepos_comment_none);
break;
+ case CHAR_MAX + 9: /* --use-newest */
+ use_newest = true;
+ use_first = true;
+ break;
+
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
@@ -428,6 +435,9 @@ Output details:\n"));
--use-first use first available translation for each\n\
message, don't merge several translations\n"));
printf (_("\
+ --use-newest use the most up-to-date available translation\n\
+ for each message, don't merge several translations\n"));
+ printf (_("\
--lang=CATALOGNAME set 'Language' field in the header entry\n"));
printf (_("\
--color use colors and other text attributes always\n\
Index: gettext-0.21/gettext-tools/src/msgl-age.c
===================================================================
--- /dev/null
+++ gettext-0.21/gettext-tools/src/msgl-age.c
@@ -0,0 +1,96 @@
+/* Message list header time simple parser.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ Written by Markéta Calábková <mcalabkova@suse.cz>, 2019.
+
+ 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <string.h>
+#include <time.h>
+
+#include "xalloc.h"
+#include "error.h"
+#include "xerror.h"
+#include "xvasprintf.h"
+
+#include "msgl-header.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include "gettext.h"
+
+#include "msgl-age.h"
+
+#define _(str) gettext (str)
+
+void
+msgdomain_sort_by_ages (msgdomain_list_ty **mdlps, size_t nfiles)
+{
+ qsort (mdlps, nfiles, sizeof(msgdomain_list_ty*), msgdomain_compare_ages);
+}
+
+int
+msgdomain_compare_ages (const void * p1, const void * p2)
+{
+ if (difftime((*(msgdomain_list_ty **)p2)->msgage, (*(msgdomain_list_ty **)p1)->msgage) > 0)
+ return 1;
+ else
+ return 0;
+}
+
+void
+msgdomain_read_ages (msgdomain_list_ty *mdlp)
+{
+ time_t times[mdlp->nitems];
+ const char * field = "PO-Revision-Date:";
+ char * where;
+
+ for (int i = 0; i < mdlp->nitems; i++)
+ {
+ message_list_ty *mlp = mdlp->item[i]->messages;
+
+ message_list_read_header_field (mlp, field, &where);
+ }
+ struct tm tmptm;
+ char *trail;
+ memset (&tmptm, 0, sizeof(struct tm));
+ if ((trail = strptime (where, "%Y-%m-%d %H:%M:%S%z", &tmptm)) != NULL)
+ mdlp->msgage = mktime (&tmptm);
+ else if ((trail = strptime (where, "%Y-%m-%d %H:%M:%S", &tmptm)) != NULL)
+ mdlp->msgage = mktime (&tmptm);
+ else if ((trail = strptime (where, "%Y-%m-%d %H:%M%z", &tmptm)) != NULL)
+ mdlp->msgage = mktime (&tmptm);
+ else if ((trail = strptime (where, "%Y-%m-%d %H:%M", &tmptm)) != NULL)
+ mdlp->msgage = mktime (&tmptm);
+ else
+ {
+ /* There is probably no creation date. Assign 0 and throw warning. */
+ mdlp->msgage = 0;
+ multiline_warning (xasprintf (_("warning: ")),
+ xasprintf (_("\
+PO-Revision-Date has no or invalid value, assuming it is old.\n\
+")));
+ return;
+ }
+ if ((*trail != '\n') && (*trail != '\0'))
+ multiline_warning (xasprintf (_("warning: ")),
+ xasprintf (_("\
+Unknown trailing characters after PO-Revision-Date, ignoring.\n\
+")));
+}
+
+
+
Index: gettext-0.21/gettext-tools/src/msgl-age.h
===================================================================
--- /dev/null
+++ gettext-0.21/gettext-tools/src/msgl-age.h
@@ -0,0 +1,36 @@
+/* Message list header time simple parser.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ Written by Markéta Calábková <mcalabkova@suse.cz>, 2019.
+
+ 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _MSGL_AGE_H
+#define _MSGL_AGE_H
+
+#include "message.h"
+
+/* Helper function to compare the ages, needed by qsort. */
+int
+ msgdomain_compare_ages (const void *, const void *);
+
+/* Simple function to modify intern ordering of files
+ * such that the newer file comes first. In fact it just calls qsort. */
+void
+ msgdomain_sort_by_ages (msgdomain_list_ty **, size_t);
+
+/* Parse dates in PO-Revision-Date: and store them inside the structure. */
+void
+ msgdomain_read_ages (msgdomain_list_ty *);
+
+#endif
Index: gettext-0.21/gettext-tools/src/msgl-cat.c
===================================================================
--- gettext-0.21.orig/gettext-tools/src/msgl-cat.c
+++ gettext-0.21/gettext-tools/src/msgl-cat.c
@@ -37,6 +37,7 @@
#include "message.h"
#include "read-catalog.h"
#include "po-charset.h"
+#include "msgl-age.h"
#include "msgl-ascii.h"
#include "msgl-equal.h"
#include "msgl-iconv.h"
@@ -57,6 +58,11 @@ int less_than;
If false, merge all available translations into one and fuzzy it. */
bool use_first;
+/* If true, sort all the translation according to their age and let
+ use_first finish the job.
+ If false, keep the order of translations. */
+bool use_newest;
+
/* If true, merge like msgcomm.
If false, merge like msgcat and msguniq. */
bool msgcomm_mode = false;
@@ -123,6 +129,15 @@ catenate_msgdomain_list (string_list_ty
for (n = 0; n < nfiles; n++)
mdlps[n] = read_catalog_file (files[n], input_syntax);
+ /* --use-newest case -- sort messages by time and then let --use-first finish the job */
+ if (use_newest)
+ {
+ for (n = 0; n < nfiles; n++)
+ msgdomain_read_ages (mdlps[n]);
+
+ msgdomain_sort_by_ages (mdlps, nfiles);
+ }
+
/* Determine the canonical name of each input file's encoding. */
canon_charsets = XNMALLOC (nfiles, const char **);
for (n = 0; n < nfiles; n++)
Index: gettext-0.21/gettext-tools/src/msgl-cat.h
===================================================================
--- gettext-0.21.orig/gettext-tools/src/msgl-cat.h
+++ gettext-0.21/gettext-tools/src/msgl-cat.h
@@ -37,6 +37,7 @@ extern DLL_VARIABLE int less_than;
/* If true, use the first available translation.
If false, merge all available translations into one and fuzzy it. */
extern DLL_VARIABLE bool use_first;
+extern DLL_VARIABLE bool use_newest;
/* If true, merge like msgcomm.
If false, merge like msgcat and msguniq. */
Index: gettext-0.21/gettext-tools/src/msgl-header.c
===================================================================
--- gettext-0.21.orig/gettext-tools/src/msgl-header.c
+++ gettext-0.21/gettext-tools/src/msgl-header.c
@@ -222,3 +222,50 @@ message_list_delete_header_field (messag
}
}
}
+
+void
+message_list_read_header_field (message_list_ty *mlp,
+ const char *field, char **where_ptr)
+{
+ size_t field_len = strlen (field);
+ size_t j;
+
+ /* Search the header entry. */
+ for (j = 0; j < mlp->nitems; j++)
+ if (is_header (mlp->item[j]) && !mlp->item[j]->obsolete)
+ {
+ /* We found the correct message. */
+ message_ty *mp = mlp->item[j];
+
+ /* Tag the header entry. */
+ const char *header = mp->msgstr;
+
+ /* Test whether the field occurs in the header entry. */
+ const char *h;
+
+ for (h = header; *h != '\0'; )
+ {
+ if (strncmp (h, field, field_len) == 0)
+ break;
+ /* Jump by lines. */
+ h = strchr (h, '\n');
+ if (h == NULL)
+ break;
+ h++;
+ }
+ if (h != NULL && *h != '\0')
+ {
+ /* We found it and it is nonempty. Read the value of the field. */
+ h += field_len + 1;
+ char *enh = strchr (h, '\n');
+ if (enh != NULL && *enh != '\0')
+ {
+ *where_ptr = (char *)XNMALLOC (((enh - h) + 1), char);
+ memcpy (*where_ptr, h, enh - h);
+ /* Make the string null-terminated. */
+ (*where_ptr)[enh-h] = '\0';
+ }
+ }
+ }
+}
+
Index: gettext-0.21/gettext-tools/src/msgl-header.h
===================================================================
--- gettext-0.21.orig/gettext-tools/src/msgl-header.h
+++ gettext-0.21/gettext-tools/src/msgl-header.h
@@ -40,6 +40,12 @@ extern void
message_list_delete_header_field (message_list_ty *mlp,
const char *field);
+/* Read the given field from the header.
+ The FIELD name ends in a colon. */
+extern void
+ message_list_read_header_field (message_list_ty *mlp,
+ const char *field, char **where_ptr);
+
#ifdef __cplusplus
}

View File

@ -0,0 +1,304 @@
From df4aef6209615bdd44cd45208acfe7367451a8fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mark=C3=A9ta=20Cal=C3=A1bkov=C3=A1?=
<meggy.calabkova@gmail.com>
Date: Thu, 9 Jan 2020 14:45:49 +0100
Subject: [PATCH 2/2] msgcat: Merge headers when --use-first
Merging headers line by line is especially useful when
one header line is present only in the second file.
For example when Plural-Forms: is present only in the second file,
msgcat could create an invalid output file.
We also return error when Plural-Forms: values do not match.
---
gettext-tools/src/message.c | 2 -
gettext-tools/src/msgl-cat.c | 5 ++
gettext-tools/src/msgl-header.c | 155 +++++++++++++++++++++++++++++---
gettext-tools/src/msgl-header.h | 8 ++
4 files changed, 157 insertions(+), 13 deletions(-)
Index: gettext-0.20.1/gettext-tools/src/message.c
===================================================================
--- gettext-0.20.1.orig/gettext-tools/src/message.c
+++ gettext-0.20.1/gettext-tools/src/message.c
@@ -411,7 +411,6 @@ message_list_insert_at (message_list_ty
}
-#if 0 /* unused */
void
message_list_delete_nth (message_list_ty *mlp, size_t n)
{
@@ -431,7 +430,6 @@ message_list_delete_nth (message_list_ty
mlp->use_hashtable = false;
}
}
-#endif
void
Index: gettext-0.20.1/gettext-tools/src/msgl-cat.c
===================================================================
--- gettext-0.20.1.orig/gettext-tools/src/msgl-cat.c
+++ gettext-0.20.1/gettext-tools/src/msgl-cat.c
@@ -40,6 +40,7 @@
#include "msgl-age.h"
#include "msgl-ascii.h"
#include "msgl-equal.h"
+#include "msgl-header.h"
#include "msgl-iconv.h"
#include "xalloc.h"
#include "xmalloca.h"
@@ -286,6 +287,10 @@ catenate_msgdomain_list (string_list_ty
}
}
+ /* Merge headers, please. */
+ if (use_first)
+ msgdomain_lists_merge_headers (mdlps, nfiles);
+
/* Create list of resulting messages, but don't fill it. Only count
the number of translations for each message.
If for a message, there is at least one non-fuzzy, non-empty translation,
Index: gettext-0.20.1/gettext-tools/src/msgl-header.c
===================================================================
--- gettext-0.20.1.orig/gettext-tools/src/msgl-header.c
+++ gettext-0.20.1/gettext-tools/src/msgl-header.c
@@ -26,9 +26,12 @@
#include <string.h>
#include "xalloc.h"
+#include "xerror.h"
+#include "xvasprintf.h"
+#include "gettext.h"
#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
-
+#define _(str) gettext (str)
/* The known fields in their usual order. */
static const struct
@@ -50,6 +53,98 @@ known_fields[] =
{ "Content-Transfer-Encoding:", sizeof ("Content-Transfer-Encoding:") - 1 }
};
+void
+msgdomain_lists_merge_headers (msgdomain_list_ty **mdlps,
+ size_t nfiles)
+{
+ message_list_list_ty * headers = message_list_list_alloc ();
+ char * plur = "Plural-Forms:";
+ char * plurals[nfiles];
+ int plur_index = 0;
+ /* First, find all header entries and cut them to lines. */
+ for (int n = 0; n < nfiles; n++)
+ {
+ msgdomain_list_ty *mdlp = mdlps[n];
+ for (size_t k = 0; k < mdlp->nitems; k++)
+ {
+ message_list_ty * chopped = message_list_header_list (mdlp->item[k]->messages);
+ if (chopped) message_list_list_append (headers, chopped);
+ }
+
+ /* Set plural to NULL by default. */
+ plurals[n] = NULL;
+ }
+ /* While there are some messages remaining, take the first one. */
+ while (headers->nitems > 0)
+ {
+ message_ty * field = headers->item[0]->item[0];
+ /* Let us save plurals for later use. */
+ if (strcmp(field->msgid, plur) == 0)
+ {
+ plurals[0] = XNMALLOC (field->msgstr_len+1, char);
+ strcpy (plurals[0], field->msgstr);
+ for (int i = 1; i < headers->nitems; i++)
+ {
+ message_ty * mp = message_list_search (headers->item[i], NULL, plur);
+ if (mp!=NULL)
+ {
+ plurals[i] = XNMALLOC (mp->msgstr_len+1, char);
+ strcpy (plurals[i], mp->msgstr);
+ }
+ }
+ }
+ /* Set the header field and delete all the occurences of the field. */
+ msgdomain_list_set_header_field (mdlps[0], field->msgid, field->msgstr);
+ for (int i = 1; i < headers->nitems; i++)
+ {
+ message_ty * mp = message_list_search (headers->item[i], NULL, field->msgid);
+ if (mp != NULL)
+ {
+ /* If needed, fix line numbering in advance. */
+ if (mp != headers->item[i]->item[0])
+ for (int l = mp->pos.line_number - headers->item[i]->item[0]->pos.line_number + 1; l < headers->item[i]->nitems; l++)
+ headers->item[i]->item[l]->pos.line_number--;
+ message_list_delete_nth (headers->item[i], mp->pos.line_number - headers->item[i]->item[0]->pos.line_number);
+ }
+ }
+ message_list_delete_nth (headers->item[0], 0);
+ /* If the first header is empty, start to process next nonempty header. */
+ while (headers->nitems > 0 && headers->item[0]->nitems == 0)
+ {
+ message_list_free (headers->item[0], 0);
+ for (int i = 0; i < headers->nitems - 1; i++)
+ headers->item[i] = headers->item[i+1];
+ headers->nitems--;
+ }
+ }
+
+ /* Some plural manipulation. */
+ char *res = NULL;
+ char *prevres = NULL;
+ prevres = plurals[0];
+ /* The prevres is the value currently in the output header,
+ * res is the value just read. So if res == NULL we just
+ * continue, which is correct. */
+ for (int n = 1; n < nfiles; n++)
+ {
+ res = plurals[n];
+ if (res != NULL)
+ {
+ if (prevres == NULL)
+ {
+ msgdomain_list_set_header_field (mdlps[0], plur, res);
+ prevres = res;
+ }
+ else if (strcmp (res, prevres) != 0)
+ {
+ multiline_error (xstrdup (""),
+ xasprintf (_("\
+Input po files have different Plural-Forms. Invalid output file was created. \n\
+Please, fix the plurals.\n")));
+ }
+ }
+ }
+}
void
msgdomain_list_set_header_field (msgdomain_list_ty *mdlp,
@@ -81,8 +176,8 @@ msgdomain_list_set_header_field (msgdoma
{
message_ty *mp = mlp->item[j];
- /* Modify the header entry. */
- const char *header = mp->msgstr;
+ /* Modify the header entry (it does not have to be present). */
+ const char *header = (mp->msgstr != NULL) ? mp->msgstr : "\0";
char *new_header =
XNMALLOC (strlen (header) + 1
+ strlen (field) + 1 + strlen (value) + 1 + 1,
@@ -230,14 +325,14 @@ message_list_read_header_field (message_
size_t field_len = strlen (field);
size_t j;
+ *where_ptr = NULL;
+
/* Search the header entry. */
for (j = 0; j < mlp->nitems; j++)
if (is_header (mlp->item[j]) && !mlp->item[j]->obsolete)
{
- /* We found the correct message. */
+ /* We found the correct message. */
message_ty *mp = mlp->item[j];
-
- /* Tag the header entry. */
const char *header = mp->msgstr;
/* Test whether the field occurs in the header entry. */
@@ -247,7 +342,7 @@ message_list_read_header_field (message_
{
if (strncmp (h, field, field_len) == 0)
break;
- /* Jump by lines. */
+ /* Jump by lines. */
h = strchr (h, '\n');
if (h == NULL)
break;
@@ -257,15 +352,57 @@ message_list_read_header_field (message_
{
/* We found it and it is nonempty. Read the value of the field. */
h += field_len + 1;
- char *enh = strchr (h, '\n');
- if (enh != NULL && *enh != '\0')
+ char *enh = strchr (h, '\n');
+ if (enh != NULL && *enh != '\0')
{
*where_ptr = (char *)XNMALLOC (((enh - h) + 1), char);
memcpy (*where_ptr, h, enh - h);
- /* Make the string null-terminated. */
+ /* Make the string null-terminated. */
(*where_ptr)[enh-h] = '\0';
- }
+ }
}
}
}
+message_list_ty *
+message_list_header_list (message_list_ty *mlp)
+{
+ size_t j;
+
+ /* Search the header entry. */
+ for (j = 0; j < mlp->nitems; j++)
+ if (is_header (mlp->item[j]) && !mlp->item[j]->obsolete)
+ {
+ /* We found the correct message. */
+ message_ty *mp = mlp->item[j];
+ const char *h = mp->msgstr;
+ message_list_ty * header = message_list_alloc (false);
+ int ctr = 0;
+
+ while (*h != '\0')
+ {
+ char *enh = strchr (h, ':');
+ enh++;
+ char * msgid = (char *)XNMALLOC (((enh - h) + 1), char);
+ memcpy (msgid, h, enh - h);
+ /* Make the string null-terminated. */
+ (msgid)[enh-h] = '\0';
+ h = enh + 1;
+
+ enh = strchr (h, '\n');
+ if (enh != NULL)
+ {
+ char * msgstr = (char *)XNMALLOC (((enh - h) + 1), char);
+ memcpy (msgstr, h, enh - h);
+ /* Make the string null-terminated. */
+ msgstr[enh-h] = '\0';
+ lex_pos_ty pos = {NULL, ctr++};
+ message_list_append (header, message_alloc (NULL, msgid, NULL, msgstr, enh - h, &pos));
+ h = enh + 1;
+ }
+ else return NULL;
+ }
+ return header;
+ }
+ return NULL;
+}
Index: gettext-0.20.1/gettext-tools/src/msgl-header.h
===================================================================
--- gettext-0.20.1.orig/gettext-tools/src/msgl-header.h
+++ gettext-0.20.1/gettext-tools/src/msgl-header.h
@@ -33,6 +33,11 @@ extern "C" {
extern void
msgdomain_list_set_header_field (msgdomain_list_ty *mdlp,
const char *field, const char *value);
+/* Merge headers of po files.
+ */
+extern void
+ msgdomain_lists_merge_headers (msgdomain_list_ty **mdlps,
+ size_t nfiles);
/* Remove the given field from the header.
The FIELD name ends in a colon. */
@@ -46,6 +51,9 @@ extern void
message_list_read_header_field (message_list_ty *mlp,
const char *field, char **where_ptr);
+/* List all the headers from a po file. */
+extern message_list_ty *
+ message_list_header_list (message_list_ty *mlp);
#ifdef __cplusplus
}

6
_multibuild Normal file
View File

@ -0,0 +1,6 @@
<multibuild>
<package>gettext-csharp</package>
<package>gettext-java</package>
<package>gettext-runtime-mini</package>
</multibuild>

4
baselibs.conf Normal file
View File

@ -0,0 +1,4 @@
gettext-runtime
obsoletes "gettext-<targettype> <= <version>"
provides "gettext-<targettype> = <version>"
libtextstyle0

View File

@ -0,0 +1,15 @@
Index: gettext-0.19.5.1/build-aux/config.rpath
===================================================================
--- gettext-0.19.5.1.orig/build-aux/config.rpath
+++ gettext-0.19.5.1/build-aux/config.rpath
@@ -216,7 +216,9 @@ if test "$with_gnu_ld" = yes; then
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
+ if [[ $libdir = '/usr/lib' ]] || [[ $libdir = '/usr/lib64' ]] ; then
+ hardcode_libdir_flag_spec=""
+ fi
else
ld_shlibs=no
fi

View File

@ -0,0 +1,25 @@
Index: gettext-tools/misc/gettextize.in
===================================================================
--- gettext-tools/misc/gettextize.in.orig 2010-06-06 14:49:57.000000000 +0200
+++ gettext-tools/misc/gettextize.in 2010-12-20 18:47:11.932132562 +0100
@@ -1262,20 +1262,6 @@ if $doit; then
echo "It is a wrapper around <libintl.h> that implements the configure --disable-nls"
echo "option."
echo
- count=`echo "$please" | grep '^$' | wc -l`
- count=`echo "$count" | sed -e 's/[ ]//g'`
- case "$count" in
- 1) count="paragraph";;
- 2) count="two paragraphs";;
- 3) count="three paragraphs";;
- 4) count="four paragraphs";;
- 5) count="five paragraphs";;
- *) count="$count paragraphs";;
- esac
- echo "Press Return to acknowledge the previous $count."
- # Read from /dev/tty, not stdin, so that gettextize cannot be abused by
- # non-interactive tools.
- read dummy < /dev/tty
fi
exit 0

View File

@ -0,0 +1,47 @@
Index: gettext-runtime/intl/dcigettext.c
===================================================================
--- gettext-runtime/intl/dcigettext.c.orig 2010-06-06 14:49:57.000000000 +0200
+++ gettext-runtime/intl/dcigettext.c 2010-12-20 18:47:11.543133542 +0100
@@ -68,20 +68,7 @@ extern int errno;
#endif
#include <locale.h>
-
-#ifdef _LIBC
- /* Guess whether integer division by zero raises signal SIGFPE.
- Set to 1 only if you know for sure. In case of doubt, set to 0. */
-# if defined __alpha__ || defined __arm__ || defined __i386__ \
- || defined __m68k__ || defined __s390__
-# define INTDIV0_RAISES_SIGFPE 1
-# else
-# define INTDIV0_RAISES_SIGFPE 0
-# endif
-#endif
-#if !INTDIV0_RAISES_SIGFPE
-# include <signal.h>
-#endif
+#include <signal.h>
#if defined HAVE_SYS_PARAM_H || defined _LIBC
# include <sys/param.h>
Index: gettext-runtime/intl/eval-plural.h
===================================================================
--- gettext-runtime/intl/eval-plural.h.orig 2010-06-06 14:49:57.000000000 +0200
+++ gettext-runtime/intl/eval-plural.h 2010-12-20 18:48:36.928872823 +0100
@@ -62,16 +62,12 @@ plural_eval (const struct expression *pe
case mult:
return leftarg * rightarg;
case divide:
-#if !INTDIV0_RAISES_SIGFPE
if (rightarg == 0)
raise (SIGFPE);
-#endif
return leftarg / rightarg;
case module:
-#if !INTDIV0_RAISES_SIGFPE
if (rightarg == 0)
raise (SIGFPE);
-#endif
return leftarg % rightarg;
case plus:
return leftarg + rightarg;

View File

@ -0,0 +1,17 @@
diff -Ndurp gettext-0.19.3/gettext-tools/examples/hello-c++-kde/admin/cvs.sh gettext-0.19.3-fix-bashisms/gettext-tools/examples/hello-c++-kde/admin/cvs.sh
--- gettext-0.19.3/gettext-tools/examples/hello-c++-kde/admin/cvs.sh 2013-05-02 11:40:04.000000000 +0300
+++ gettext-0.19.3-fix-bashisms/gettext-tools/examples/hello-c++-kde/admin/cvs.sh 2014-12-28 16:59:45.300732878 +0200
@@ -423,7 +423,12 @@ for subdir in $dirs; do
fi
fi
if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then
- echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
+ cat > _translatorinfo.cpp <<-EOF
+ i18n("_: NAME OF TRANSLATORS\n"
+ "Your names")
+ i18n("_: EMAIL OF TRANSLATORS\n"
+ "Your emails")
+ EOF
else echo " " > _translatorinfo.cpp
fi
perl -e '$mes=0; while (<STDIN>) { next if (/^(if|else|endif)\s/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile

144
gettext-0.21-jdk17.patch Normal file
View File

@ -0,0 +1,144 @@
Index: gettext-0.21.1/gettext-runtime/configure.ac
===================================================================
--- gettext-0.21.1.orig/gettext-runtime/configure.ac
+++ gettext-0.21.1/gettext-runtime/configure.ac
@@ -34,7 +34,7 @@ AC_PROG_INSTALL
gt_JAVA_CHOICE
AS_IF([test "$JAVA_CHOICE" != no], [
- gt_JAVACOMP([1.5], [1.6])
+ gt_JAVACOMP([1.8], [1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
BUILDJAVA=yes
Index: gettext-0.21.1/gettext-tools/configure.ac
===================================================================
--- gettext-0.21.1.orig/gettext-tools/configure.ac
+++ gettext-0.21.1/gettext-tools/configure.ac
@@ -35,7 +35,7 @@ AC_PROG_INSTALL
gt_JAVA_CHOICE
AS_IF([test "$JAVA_CHOICE" != no], [
gt_JAVAEXEC
- gt_JAVACOMP([1.5])
+ gt_JAVACOMP([1.8], [1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
BUILDJAVA=yes
Index: gettext-0.21.1/gettext-tools/gnulib-lib/javacomp.c
===================================================================
--- gettext-0.21.1.orig/gettext-tools/gnulib-lib/javacomp.c
+++ gettext-0.21.1/gettext-tools/gnulib-lib/javacomp.c
@@ -116,9 +116,8 @@ default_target_version (void)
&& (java_version_cache[1] >= '2'
&& java_version_cache[1] <= '7')
&& java_version_cache[2] == '\0')
- /* Assume that these (not yet released) Java versions will behave
- like the preceding ones. */
- java_version_cache = "11";
+ /* It's one of the valid target version values. */
+ ;
else
java_version_cache = "1.1";
}
@@ -128,7 +127,7 @@ default_target_version (void)
/* ======================= Source version dependent ======================= */
/* Convert a source version to an index. */
-#define SOURCE_VERSION_BOUND 8 /* exclusive upper bound */
+#define SOURCE_VERSION_BOUND 14 /* exclusive upper bound */
static unsigned int
source_version_index (const char *source_version)
{
@@ -144,7 +143,7 @@ source_version_index (const char *source
else if (source_version[0] == '9' && source_version[1] == '\0')
return 5;
else if (source_version[0] == '1'
- && (source_version[1] >= '0' && source_version[1] <= '1')
+ && (source_version[1] >= '0' && source_version[1] <= '7')
&& source_version[2] == '\0')
return source_version[1] - '0' + 6;
error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class"));
@@ -171,6 +170,10 @@ get_goodcode_snippet (const char *source
return "class conftest { public void m() { var i = new Integer(0); } }\n";
if (strcmp (source_version, "11") == 0)
return "class conftest { Readable r = (var b) -> 0; }\n";
+ if (source_version[0] == '1'
+ && (source_version[1] >= '2' && source_version[1] <= '7')
+ && source_version[2] == '\0')
+ return "class conftest { Readable r = (var b) -> 0; }\n";
error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class"));
return NULL;
}
@@ -197,6 +200,10 @@ get_failcode_snippet (const char *source
return "class conftestfail { Readable r = (var b) -> 0; }\n";
if (strcmp (source_version, "11") == 0)
return NULL;
+ if (source_version[0] == '1'
+ && (source_version[1] >= '2' && source_version[1] <= '7')
+ && source_version[2] == '\0')
+ return NULL;
error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class"));
return NULL;
}
@@ -204,7 +211,7 @@ get_failcode_snippet (const char *source
/* ======================= Target version dependent ======================= */
/* Convert a target version to an index. */
-#define TARGET_VERSION_BOUND 11 /* exclusive upper bound */
+#define TARGET_VERSION_BOUND 17 /* exclusive upper bound */
static unsigned int
target_version_index (const char *target_version)
{
@@ -215,7 +222,7 @@ target_version_index (const char *target
else if (target_version[0] == '9' && target_version[1] == '\0')
return 8;
else if (target_version[0] == '1'
- && (target_version[1] >= '0' && target_version[1] <= '1')
+ && (target_version[1] >= '0' && target_version[1] <= '7')
&& target_version[2] == '\0')
return target_version[1] - '0' + 9;
error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class"));
@@ -245,10 +252,10 @@ corresponding_classfile_version (const c
return 52;
if (strcmp (target_version, "9") == 0)
return 53;
- if (strcmp (target_version, "10") == 0)
- return 54;
- if (strcmp (target_version, "11") == 0)
- return 55;
+ if (target_version[0] == '1'
+ && (target_version[1] >= '0' && target_version[1] <= '7')
+ && target_version[2] == '\0')
+ return target_version[1] + 54;
error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class"));
return 0;
}
@@ -2439,7 +2446,7 @@ compile_java_class (const char * const *
}
}
- error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC"));
+ /* error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); */
err = true;
done2:
Index: gettext-0.21.1/gettext-tools/src/write-java.c
===================================================================
--- gettext-0.21.1.orig/gettext-tools/src/write-java.c
+++ gettext-0.21.1/gettext-tools/src/write-java.c
@@ -1209,8 +1209,14 @@ msgdomain_write_java (message_list_ty *m
Java compilers create the class files in the source file's directory -
which is in a temporary directory in our case. */
java_sources[0] = java_file_name;
- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
+ if (1
+ && (compile_java_class (java_sources, 1, NULL, 0, "17", "17", directory,
+ true, false, true, verbose > 0)) /* assume JDK 17 */
+ && (compile_java_class (java_sources, 1, NULL, 0, "11", "11", directory,
+ true, false, true, verbose > 0)) /* assume JDK 11 */
+ && (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
true, false, true, verbose > 0))
+ )
{
if (!verbose)
error (0, 0,

BIN
gettext-0.21.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

16
gettext-0.21.1.tar.xz.sig Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEkAG4WvnhuD3xvalC9b6LJnxqQG0FAmNDU6UACgkQ9b6LJnxq
QG0TBg//SO/rw2U2fSAFX43+TMLUm5ZkvClz1lqE+nbRyb86ShLgyDJrDzZ+BeYo
FEWTelhLs82ruiZ0ed8xy1gvErW614CxOgMwHPb3ZTkI3Q6mJqFzujYcKnCRsRv+
hX+iAu/A4P+UMvreWvfDKoF0qe9ORARg8tE9dgCCN63+QLu+3HrTuxvOaIChghbx
BaNn27MmgkutvXYspnx6u5koZXQpnt17YNJe1wbNAVym1O6ByfWPoP7+OYds8wAF
jOoAALHj/zrJYL/Sg3SjKdfvVHNesyMFNg/HSA0w4mZbnuLjBcl0lO6qU9RBubgx
aqqS/+zwvI3om/EdqKZxGvRTfhz/MUQ5rij3gjopz27MLW6Z5lsbGDq6PQYIFxBA
0KXE0LHWCQRZu/8Z+zAiiiitEYhhYDX4A3ycbhCF+ZJ6TfJ5t8qYYNvzGGp4k2Gv
h8VVFGnZJqDLwa0pbkFi2aGAI3HzVaSAJOhUJjdQ9HAujgSppLmZxODbHcq3KXnq
iR88aqzmOg5dH5m+kENV+9KfysWptmdaIpcdmJTPXtRcdeL7QtfH+Bpq+ePgPThM
JT2Yz+uWiTQqDBTIpJHhSKYTdim34ynKJbDnYphTncdvXm/juuK762dpy5jhcoiJ
Ah8LfiikxiKDjJVivSs7zx1lQPnvJvC9UtlZZrMqx+GYD0y8w20=
=U/vR
-----END PGP SIGNATURE-----

595
gettext-csharp.changes Normal file
View File

@ -0,0 +1,595 @@
-------------------------------------------------------------------
Thu May 4 13:32:58 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
- Add _multibuild to define additional spec files as additional
flavors.
Eliminates the need for source package links in OBS.
-------------------------------------------------------------------
Fri Apr 8 15:05:10 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* gettext-0.21-jdk17.patch
+ Build with java source and target levels 1.8
+ Allows building with JDK17
+ Fixes build in Factory
-------------------------------------------------------------------
Mon Nov 29 20:32:32 UTC 2021 - Michael Gorse <mgorse@suse.com>
- Remove libcroco from BuildRequires: it is now bundled internally.
-------------------------------------------------------------------
Fri Jan 22 22:06:46 UTC 2021 - Dirk Müller <dmueller@suse.com>
- use https for urls
- spec-cleaner run
- apply all the patches from gettext-runtime
-------------------------------------------------------------------
Tue Jul 28 10:33:41 UTC 2020 - Christian Vögl <christian.voegl@suse.com>
-Updated to version 0.21
* Improvements for translators:
When msgfmt writes a MO file, it now does so in such a way that processes
that are currently using an older copy of the MO file will not crash.
-------------------------------------------------------------------
Mon Dec 9 11:17:04 UTC 2019 - Christian Vögl <cvoegl@suse.de>
- Added -lm flag to CFLAGS
-------------------------------------------------------------------
Tue Jun 11 13:08:04 UTC 2019 - Christian Vögl <christian.voegl@suse.com>
- Updated to version 0.20.1:
+ msgfmt now eliminates the POT-Creation-Date header field from .mo files.
+ msgmerge now has an option --for-msgfmt, that produces a PO file meant
for use by msgfmt only. This option saves processing time, in particular
by omitting fuzzy matching that is not useful in this situation.
+ The .pot file in a 'po' directory is now erased by "make maintainer-clean".
+ It is now possible to override xgettext options from the po/Makefile.in.in
through options in XGETTEXT_OPTIONS (declared in po/Makevars).
+ The --intl option of the gettextize program (deprecated since 2010) is
no longer available. Instead of including the intl sources in your package,
we suggest making the libintl library an optional prerequisite of your
package. This will simplify the build system of your package.
+ Accordingly, the Autoconf macro AM_GNU_GETTEXT_INTL_SUBDIR is gone as well.
- Rebased gettext-po-mode.diff
- Removed gettext-needlessly_init_vars.patch (now in upstream)
-------------------------------------------------------------------
Mon May 14 19:56:58 UTC 2018 - antoine.belvire@opensuse.org
- Remove prereq on info: No info page installed.
-------------------------------------------------------------------
Wed Oct 18 17:30:16 UTC 2017 - jayvdb@gmail.com
- Disable debug packages on RHEL and derived distributions
-------------------------------------------------------------------
Sun Jun 19 15:42:15 UTC 2016 - astieger@suse.com
- GNU gettext 0.19.8.1:
* Fix unintentional soname bump
-------------------------------------------------------------------
Sat Jun 11 18:58:17 UTC 2016 - astieger@suse.com
- GNU gettext 0.19.8:
* msgfmt now produces little-endian .mo files by default.
* xml: xgettext and msgfmt now look for .its files in directories
supplied through the GETTEXTDATADIRS or XDG_DATA_DIRS
environment variable.
* JavaScript: xgettext and msgfmt now recognize numbered
arguments in format strings.
-------------------------------------------------------------------
Mon Apr 4 19:15:53 UTC 2016 - astieger@suse.com
- GNU gettext 0.19.7:
* can now load custom string extraction rules in XML
Internationalization Tag Set (ITS) standard
* the existing XML-based language scanners (Glade, GSettings, and
AppData) rewritten using ITS
* Add msgfmt --xml option to merge translations back to the
original XML document.
-------------------------------------------------------------------
Fri Sep 11 18:56:49 UTC 2015 - astieger@suse.com
- GNU gettext 0.19.6:
* Support AppData file format
-------------------------------------------------------------------
Thu Jul 16 10:56:05 UTC 2015 - astieger@suse.com
- GNU gettext 0.19.5.1:
* fix build on old platforms where stpcpy and stpncpy is missing
-------------------------------------------------------------------
Fri Jul 10 14:34:22 UTC 2015 - astieger@suse.com
- GNU gettext 0.19.5:
* drop gettext-check-allocated-size-for-static-segment.patch,
is upstream
-------------------------------------------------------------------
Tue Mar 10 07:11:29 UTC 2015 - mlin@suse.com
- Add gettext-check-allocated-size-for-static-segment.patch from upstream
* Check if the embedded segment size is valid, before adding it to
the string length. Please see
http://lists.gnu.org/archive/html/bug-gettext/2015-03/msg00005.html
-------------------------------------------------------------------
Tue Jan 27 20:24:49 UTC 2015 - andreas.stieger@gmx.de
- GNU gettext 0.19.4:
* The --keyword option of xgettext now accepts same argument
number for both singular and plural forms.
* Programming languages support:
- C#: xgettext now properly handles Unicode characters encoded
with surrogate pairs.
- C/C++: xgettext now recognizes ISO/IEC 9899:2011 string
literals prefixed by R, u8, u8R, u, uR, U, UR, L, or LR.
- Shell: xgettext now properly recognizes Bash ANSI-C quoting
($'...').
* Bug fixes:
- Fix integer overflow when reading certain MO files with
msgunfmt.
- Avoid invalid memory access in various cases. In particular,
when the same argument number is specified for singular/
plural arguments, and when checking Lisp and Scheme format
strings.
-------------------------------------------------------------------
Fri Oct 17 21:56:18 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.19.3:
* Fix xgettext mishandling of octal character escapes in C.
* Fix autopoint infinite recursion with certain configure.ac.
* The po/Makevars file has a new field MSGINIT_OPTIONS, that can
be used to adjust msginit's operation. This is particularly
useful for controlling line wrapping behavior together with
MSGMERGE_OPTIONS and XGETTEXT_OPTIONS.
-------------------------------------------------------------------
Tue Jul 15 11:49:59 CEST 2014 - pth@suse.de
- Update to 0.19.2:
* Fix xgettext crash in parsing empty string literals in C and Vala.
* Autoconf macro trace in autopoint now works again with Autoconf 2.68
or earlier. It was a regression in 0.19.
-------------------------------------------------------------------
Tue Jun 10 22:00:50 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.19.1:
* Desktop Entry: msgfmt now always reads the po/LINGUAS file
* Vala: Bug fix in xgettext handling of "//" in string literals
* po/Makevars.template now contains the newly added variables
* msgfmt now treats errors in the PO file header as non-fatal
In future Gettext versions, msgfmt will treat header errors as
fatal and terminate the command execution.
- switch to xz tarball
-------------------------------------------------------------------
Tue Jun 3 19:20:25 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.19:
- Programming languages support:
* Desktop Entry:
xgettext and msgfmt now support .desktop files, used by
desktop applications, as input and output.
* GSettings:
xgettext now supports GSettings schema file format used by
GNOME applications.
* JavaScript:
xgettext now recognizes E4X (ECMA-357) constructs.
* PHP:
Single and double quotes around heredoc markers are now
recognized.
* Python:
The acceptable format specifiers in the braced-syntax format
strings is now limited to the Standard Format Specifiers, to
reasonably avoid false-positives.
* Scheme:
The gettext shorthand form _"abc", used by GIMP script-fu, is
now recognized by xgettext.
* C and Vala:
xgettext now recognizes C99-style Unicode character escapes.
- The --add-location option of msgattrib, msgcat, msgcomm,
msgconv, msgen, msgfilter, msggrep, msgmerge, msguniq, and
xgettext commands now takes an optional argument 'never',
'full', or 'file', to control the format of "#: ..." comments.
- msgfmt now has --source option to keep generated .java file
when running in Java mode.
- msgattrib now has --empty option that sets msgstr to empty when
clearing fuzzy flag.
* msgexec and msgfilter pass the plural information to subprocess
through the environment variable MSG{EXEC,FILTER}_MSGID_PLURAL
and MSG{EXEC,FILTER}_PLURAL_FORM.
* New built-in filters 'quot' and 'boldquot' have been added to
msgfilter. These filters convert Latin quotation marks ('...',
"...") into Unicode quotation marks (for example, U+2018) if
possible, similar to the sed commands used in po/Rules-quot and
po/Rules-boldquot.
* The po/Makevars file has a couple of new options
PO_DEPENDS_ON_POT and DIST_DEPENDS_ON_UPDATE_PO, that can be
used to adjust the behavior of updating PO files on demand.
* xgettext now strips prefixed string before the comment tag.
This is useful to support C-style comment like this:
/*
* TRANSLATORS: first line
* second line
*/
* In this example, the extracted comment does not contain "* " at
the beginning of each line.
* libgettextpo library:
- Memory leak fixes in the PO file parser.
* Documentation:
- A complete example showing the use of GNU gettext in a
GNOME 3 application has been added
-------------------------------------------------------------------
Sun Jan 12 21:56:01 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.18.3.2:
* Add missing extern-inline.m4 into archive.
- verify source signature
-------------------------------------------------------------------
Mon Aug 12 10:45:36 UTC 2013 - christoph.miebach@web.de
- Version 0.18.3 - July 2013
* Runtime behaviour:
On Mac OS X systems, the setlocale() function now properly
invalidates loaded message catalogs when a locale has been set.
* Programming languages support:
- C++:
The gnu::autosprintf class now provides an assignment
operator.
- Glade:
xgettext now supports GtkBuider file format used by Glade 3.
xgettext now also extracts contexts (msgctxt) from Glade 2
and GtkBuider files.
- JavaScript:
xgettext now partially supports JavaScript. Since the
current JavaScript specification (ECMA-262) does not define
the standard set of formatting methods nor translation
functions, the implementation supports only a limited
set of formatting methods and translation functions commonly
used in Gjs and other popular JavaScript implemenations and
libraries.
- Lua:
xgettext now supports Lua, using Ľubomír Remák's lua-gettext.
- Python:
xgettext and msgfmt's format string checking now recognize
Python format string in braced syntax (PEP 3101). xgettext
now also supports explicit string concatenation with '+' and
handles platform dependent line terminators (LF/CR/CRLF)
transparently.
- Tcl:
Bug fix in xgettext Unicode escape handling.
- Vala:
xgettext now supports Vala.
* msgattrib now has --previous option to keep previous msgid when
making messages fuzzy, similar to msgmerge --previous.
* msgfmt now checks PO file headers more strictly with less
false-positives.
* 'gettextize' now checks macro directories specified with
AC_CONFIG_MACRO_DIRS in configure.ac.
* Portability:
- msginit now does not require GNU sed.
- The Makefile rule for generating en@quot and en@boldquot now
uses @SED@ variable instead of hard-coded 'sed' command to
allow users to supply GNU sed.
* Future backward-incompatibilities:
- In future Gettext versions, the files installed by
'gettextize' will require Automake 1.10 or later. This will
improve the compatibility of user projects with newer
Automake versions.
- Remove upstreamed patches:
gettext-configure.patch
-------------------------------------------------------------------
Sat Jun 15 11:52:06 UTC 2013 - schwab@linux-m68k.org
- Add glib2-devel libcroco-devel libxml2-devel to build requires to avoid
using the included copies.
- gettext-configure.patch: Fix syntax in libxml check to avoid spurious
failure
-------------------------------------------------------------------
Sat Jun 8 08:39:07 UTC 2013 - christoph.miebach@web.de
- Update to version 0.18.2.1: Version 0.18.2 - December 2012
+ xgettext now understands the block comment syntax of Guile 2.0.
+ libgettextpo library:
* The initial msgstr of a new message is now "", not NULL.
* Bug fixes in the functions po_message_is_range,
po_file_check_all, po_message_check_all.
+ Installation options:
The configure options --with-xz and --with-bzip2 can be used to
specify alternate compression methods for the archive used by
the 'autopoint' program. These options, together with
--with-git, allow to trade dependencies against installed
package size. --with-xz has the highest compression rate,
followed by --with-git, followed by --with-bzip2.
+ Autoconf macros:
* The autoconf macros installed by 'gettextize' now work with
the forthcoming Automake 1.14 and require Autoconf version
2.60 or newer.
+ Portability:
* Building on MacOS X 10.7, Cygwin 1.7.10, and newer 64-bit
mingw is now supported.
- Remove obsolete patches:
+ getext-stdio.in.patch
+ gettext-codecleanup.patch
-------------------------------------------------------------------
Wed Mar 27 07:50:30 UTC 2013 - mmeister@suse.com
- Added url as source.
Please see http://en.opensuse.org/SourceUrls
-------------------------------------------------------------------
Mon Sep 24 17:21:00 CEST 2012 - pth@suse.de
- remove silent_rules from AM_INIT_AUTOMAKE to make autoreconf
succeed on older distributions.
- Rename po-mode.diff to gettext-po-mode.diff
-------------------------------------------------------------------
Sun Jul 22 18:41:30 UTC 2012 - aj@suse.de
- Fix build with missing gets declaration (glibc 2.16)
-------------------------------------------------------------------
Tue Dec 21 13:43:49 CET 2010 - pth@suse.de
- Update to 0.18.1. Changes since 0.17:
Version 0.18.1 - June 2010
* msggrep: A '$' anchor in a regular expression now also matches
the end of the string, even if it does not end in a newline.
* Dependencies:
The libraries and programs are now linked with libunistring if
this library is already installed.
* Installation options:
The configure option --with-cvs is deprecated. The 'autopoint'
program will now use the 'git' program by default to compress its
archive. If the configure option --without-git is specified,
'autopoint' will not rely on 'git', but will instead rely on a
locally installed 3 MB large archive.
Version 0.18 - May 2010
* PO file format:
There is a new field 'Language' in the header entry. It denotes
the language code (plus optional country code) for the PO file.
This field can be used by automated tools, such as spell
checkers. It is expected to be more reliable than looking at the
file name or at the 'Language-Team' field in the header entry.
msgmerge, msgcat, msgen have a new option --lang that allows to
specify this field. Additionally, msgmerge fills in this new
field by looking at the 'Language-Team' field (if the --lang
option is not given).
* xgettext and PO file format:
For messages with plural forms, programmers can inform the
translators about the range of possible values of the numeric
argument, like this:
/* xgettext: range: 0..15 */
This information 'range: 0..15' is stored in the PO file as a
flag attached to the message. Translators can produce better
translations when they know that the numeric argument is small.
* Colorized PO files:
msgattrib, msgcomm, msgconv, msgen, msgfilter, msggrep, msginit,
msgmerge, msgunfmt, msguniq, xgettext now have options --color
and --style, like msgcat has since version 0.17.
* msgmerge is up to 10 times faster when the PO and POT files are
large. This speedup was contributed by Ralf Wildenhues.
* msgcmp has a new option -N/--no-fuzzy-matching, like msgmerge has
since version 0.12.
* msgfilter now sets environment variables during the invocation of
the filter, indicating the msgid and location of the messge being
processed.
* xgettext now can extract plural forms from Qt 4 programs. The
recommended xgettext command-line options for this case are:
--qt --keyword=tr:1,1t --keyword=tr:1,2c,2t --keyword=tr:1,1,2c,3t
* xgettext --language=GCC-source now recognizes also the format
strings used in the Fortran front-end of the GCC compiler, and
marks them as 'gfc-internal-format'.
* autopoint can now be used to update several PO directories all
together.
* PO mode changes:
- PO files with plural entries are now correctly handled.
- Editing a message with previous msgid (in comments) removes these
comments. Contributed by Noritada Kobayashi.
* The po/Makevars file has a new field MSGMERGE_OPTIONS, that can
be used to adjust msgmerge's operation.
* The use of the macro AM_GNU_GETTEXT without 'external' argument
and the --intl option of the gettextize program are deprecated
and will be removed in the next release. Instead of including
the intl sources in your package, we suggest making the libintl
library an (optional) prerequisite of your package.
* Updated the meaning of 'gcc-internal-format' to match GCC 4.3.
* Installation options:
The configure options --without-cvs and --with-git can be used to
specify whether 'autopoint' will use the 'cvs' program, or the
'git' program, or none at all. These options allow to trade
dependencies against installed package size: If --without-cvs is
specified and --with-git is not specified, 'autopoint' will not
rely on 'cvs' or 'git', but will instead rely on a locally
installed a 3 MB large archive.
* Portability: The msgfilter program now also works on native Woe32
- platforms. Compiled C# message catalogs now also work with
- 'mono' versions from 2009
or newer.
-------------------------------------------------------------------
Fri Mar 5 09:34:18 UTC 2010 - puzel@novell.com
- remove gettext-tools/gnulib-m4/openmp.m4: fix build with new
autoconf
-------------------------------------------------------------------
Mon Jul 27 12:52:23 CEST 2009 - rguenther@suse.de
- Remove rather than %exclude not packaged files
-------------------------------------------------------------------
Tue Oct 14 13:11:43 CEST 2008 - kukuk@suse.de
- Never install files in %check section
- Disable autoconf/libtool tests
-------------------------------------------------------------------
Mon Oct 13 16:03:05 CEST 2008 - kukuk@suse.de
- Fix autoreconf call
-------------------------------------------------------------------
Sun May 18 10:35:50 CEST 2008 - pth@suse.de
- Fix segmentation fault in msgmerge (bnc#391372).
-------------------------------------------------------------------
Tue Dec 4 14:43:27 CET 2007 - pth@suse.de
- Add patch from upstreams to add the missing mode for the open call.
-------------------------------------------------------------------
Fri Nov 23 14:47:34 CET 2007 - pth@suse.de
- Remove the patch for disabling a test.
-------------------------------------------------------------------
Fri Nov 16 13:59:43 CET 2007 - pth@suse.de
- Don't run the testsuite.
-------------------------------------------------------------------
Thu Nov 15 12:51:17 CET 2007 - pth@suse.de
- Rename packages: gettext -> gettext-runtime and
gettext-devel -> gettext->tools
Packaging closely follows uptream recommendation with a few
exceptions.
- Initialize variable to shut up gcc.
- Disable msgmerge-compendium-5 for now.
- Update to 0.17:
* License:
The gettext related programs and tools are now licensed under the GPL
version 3, instead of the GPL version 2.
* PO file format:
The Project-Id-Version field in the header entry may now already be filled
in the POT file. In this case, the translators don't need to fill it in.
xgettext has new options --package-name and --package-version that allow
to specify the package name and version from a Makefile.
* Colorized PO files:
The msgcat program has new options --color and --style that produce a
colorized PO file output, where keywords, strings, comments, or format
directives can be highlighted. See the documentation section
"Highlighting parts of PO files" for more info.
* gettextize now has a --po-dir option that allows several PO directories to
be updated all together.
* Programming languages support:
- Contexts (msgctxt) are now also supported for Java and C#.
- C# with Qt: The support for Qt format strings has been updated for Qt 4.
- C++ with KDE:
xgettext has a new option --kde that triggers the recognition and marking
of KDE 4 format strings.
* Autoconf macros:
- A new macro AM_XGETTEXT_OPTION can be used as an alternative to modifying
po/Makevars.
* libgettextpo library:
- New functions are available for querying the list of supported format
types.
- The functions po_message_comments and po_message_extracted_comments
return a multiline string where each line no longer starts with a
redundant space. The leading space in every comment line is now stripped
while reading the PO file.
- Conversely, when you pass a multiline string to the function
po_message_set_comments or po_message_set_extracted_comments, you normally
don't pass a space at the beginning of each line, because such spaces are
no longer trimmed during output.
* Documentation:
- The "Users" chapter has been completely rewritten.
- New section "Highlighting parts of PO files".
- A complete example showing the use of GNU gettext in Java with the Qt/Jambi
GUI toolkit has been added.
- Add tcl and perl-libintl-perl to BuildRequires (testsuite needs
them).
- Remove call to gl_AC_TYPE_LONG_LONG from libasprintf's
configure.ac
-------------------------------------------------------------------
Wed Oct 31 16:58:36 CET 2007 - mrueckert@suse.de
- renamed rpmlintrc to gettext-rpmlintrc and added it to the spec
as source 1
-------------------------------------------------------------------
Fri Aug 10 19:40:37 CEST 2007 - bk@suse.de
- Update to gettext 0.16.1, required by GnuPG 2.0.5
-------------------------------------------------------------------
Thu Aug 9 18:04:26 CEST 2007 - bk@suse.de
- re-enable make check
-------------------------------------------------------------------
Tue Jul 10 17:25:43 CEST 2007 - pth@suse.de
- Split .NET/Mono support into a package with its own spec
to avoid making the base gettext package dependent on mono(-devel).

143
gettext-csharp.spec Normal file
View File

@ -0,0 +1,143 @@
#
# spec file for package gettext-csharp
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?fedora_version} || 0%{?centos_version} <= 600 || 0%{?scilin_version} <= 600 || 0%{?rhel_version} <= 600
%global debug_package %{nil}
%endif
Name: gettext-csharp
Version: 0.21.1
Release: 0
Summary: Native Language Support (NLS) for C#
License: LGPL-2.1-or-later
Group: Development/Tools/Other
URL: https://www.gnu.org/software/gettext/
Source0: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz
Source1: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz.sig
Source2: suse-start-po-mode.el
Source3: gettext-linkdupes.sh
Source4: gettext-rpmlintrc
Source5: gettext-runtime.keyring
Patch0: gettext-0.12.1-sigfpe.patch
Patch1: gettext-0.19.3-fix-bashisms.patch
Patch2: gettext-0.12.1-gettextize.patch
Patch3: use-acinit-for-libtextstyle.patch
Patch4: gettext-po-mode.diff
Patch5: gettext-initialize_vars.patch
# PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de
Patch6: gettext-dont-test-gnulib.patch
Patch7: gettext-0.21-jdk17.patch
# PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com
Patch11: boo941629-unnessary-rpath-on-standard-path.patch
# PATCH-FIX-SUSE Bug boo#1106843
Patch13: reproducible.patch
# PATCH-FEATURE bsc#1165138
Patch14: 0001-msgcat-Add-feature-to-use-the-newest-po-file.patch
Patch15: 0002-msgcat-Merge-headers-when-use-first.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: glib2-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: mono-devel
BuildRequires: perl-libintl-perl
BuildRequires: tcl
Requires: mono
%description
Mono with its 'resgen' program uses a design that Microsoft created and
that gives the power to the software vendor and not to the user: it
doesn't allow the end-user to create his own localisations for existing
programs. As documented in the gettext manual:
The advantages of the .dll' format over the .resources' format are:
1. 1. Freedom to localize: Users can add their own translations to an
application after it has been built and distributed. Whereas
when the programmer uses a ResourceManager' constructor provided
by the system, the set of .resources' files for an application
must be specified when the application is built and cannot be
extended afterwards.
2., 3., 4. ...
The included GNU.Gettext.dll gives the user this freedom back and the
also included msgfmt.net.exe and msgunfmt.net.exe handle PO files more
reliably than 'resgen'.
%prep
%setup -q -n gettext-%{version}
%patch0
%patch1 -p1
%patch2
%patch3 -p1
%patch4
%patch5
%patch6 -p1
%patch7 -p1
%patch11 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%build
export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint -lm"
export CXXFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
# expect a couple "You should update your `aclocal.m4' by running aclocal."
autoreconf -fiv
%configure --enable-shared --enable-csharp
%make_build GMSGFMT=../src/msgfmt
%install
export LC_CTYPE=ISO-8859-15
%make_install
mkdir examples
mv %{buildroot}/%{_datadir}/doc/gettext/examples/*csharp* examples
mv %{buildroot}/%{_datadir}/doc/gettext/csharpdoc csharpdoc
cd examples
fdupes -r *|while read dupe; do
if [ -z "$dupe" ]; then
startlink=
elif [ -z "$startlink" ]; then
startlink="$dupe"
else
ln -f "$startlink" "$dupe"
fi
done
cd ..
rm -rf %{buildroot}/%{_datadir}/*
mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}
mv examples %{buildroot}/%{_defaultdocdir}/%{name}
mv csharpdoc %{buildroot}/%{_defaultdocdir}/%{name}
# exclude files packaged via other spec files
rm -Rf %{buildroot}/%{_bindir}
rm -f %{buildroot}/%{_libdir}/lib*
rm -f %{buildroot}/%{_libdir}/gettext/hostname
rm -f %{buildroot}/%{_libdir}/gettext/project-id
rm -f %{buildroot}/%{_libdir}/gettext/urlget
rm -f %{buildroot}/%{_libdir}/gettext/user-email
rm -f %{buildroot}/%{_libdir}/gettext/cldr-plurals
rm -Rf %{buildroot}/%{_includedir}
rm -f %{buildroot}/%{_libdir}/preloadable_libintl.so
%files
%doc %{_defaultdocdir}/%{name}
%{_libdir}/GNU.Gettext.dll
%{_libdir}/gettext/msgfmt.net.exe
%{_libdir}/gettext/msgunfmt.net.exe
%changelog

View File

@ -0,0 +1,26 @@
Subject: This is not gnulib, so don't test it
From: Stephan Kulow <coolo@suse.de>
--- gettext-0.20.1.orig/gettext-tools/Makefile.am 2019-06-04 13:12:49.514030196 +0200
+++ gettext-0.20.1/gettext-tools/Makefile.am 2019-06-04 13:13:09.778072816 +0200
@@ -19,7 +19,7 @@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
+SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests examples doc
EXTRA_DIST = misc/DISCLAIM
MOSTLYCLEANFILES = core *.stackdump
--- gettext-0.20.1.orig/gettext-tools/Makefile.in 2019-06-04 13:12:49.514030196 +0200
+++ gettext-0.20.1/gettext-tools/Makefile.in 2019-06-04 13:14:33.546249004 +0200
@@ -2016,7 +2016,7 @@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
+SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests examples doc
# Allow users to use "gnulib-tool --update".

View File

@ -0,0 +1,17 @@
Index: gettext-tools/gnulib-lib/gl_anylinked_list2.h
===================================================================
--- gettext-tools/gnulib-lib/gl_anylinked_list2.h.orig 2010-05-24 11:42:37.000000000 +0200
+++ gettext-tools/gnulib-lib/gl_anylinked_list2.h 2010-12-20 18:47:11.981132438 +0100
@@ -34,6 +34,12 @@
# define ASYNCSAFE(type)
#endif
+#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 3) || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)
+# ifndef lint
+# define lint
+# endif
+#endif
+
/* -------------------------- gl_list_t Data Type -------------------------- */
static gl_list_t

654
gettext-java.changes Normal file
View File

@ -0,0 +1,654 @@
-------------------------------------------------------------------
Thu May 4 13:32:58 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
- Add _multibuild to define additional spec files as additional
flavors.
Eliminates the need for source package links in OBS.
--------------------------------------------------------------------------
Fri Apr 8 15:05:10 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* gettext-0.21-jdk17.patch
+ Build with java source and target levels 1.8
+ Allows building with JDK17
+ Fixes build in Factory
-------------------------------------------------------------------
Mon Nov 29 20:32:32 UTC 2021 - Michael Gorse <mgorse@suse.com>
- Remove libcroco from BuildRequires: it is now bundled internally.
-------------------------------------------------------------------
Fri Jan 22 22:06:58 UTC 2021 - Dirk Müller <dmueller@suse.com>
- use https for urls
- apply all the patches from gettext-runtime
-------------------------------------------------------------------
Tue Jul 28 10:20:58 UTC 2020 - Christian Vögl <christian.voegl@suse.com>
- Updated to version 0.21
- Java:
o xgettext now recognizes format strings in the Formatter syntax. They
are marked as 'java-printf-format' in POT and PO files.
o xgettext now recognizes text blocks as string literals.
- Improvements for translators:
o When msgfmt writes a MO file, it now does so in such a way that processes
that are currently using an older copy of the MO file will not crash.
-------------------------------------------------------------------
Tue Jun 11 13:12:37 UTC 2019 - Christian Vögl <christian.voegl@suse.com>
- Updated to version 0.20.1
+ msgfmt now eliminates the POT-Creation-Date header field from .mo files.
+ update-po target in Makefile.in.in now uses msgmerge --previous.
+ msgmerge now has an option --for-msgfmt, that produces a PO file meant
for use by msgfmt only. This option saves processing time, in particular
by omitting fuzzy matching that is not useful in this situation.
+ The .pot file in a 'po' directory is now erased by "make maintainer-clean".
+ It is now possible to override xgettext options from the po/Makefile.in.in
through options in XGETTEXT_OPTIONS (declared in po/Makevars).
+ The --intl option of the gettextize program (deprecated since 2010) is
no longer available. Instead of including the intl sources in your package,
we suggest making the libintl library an optional prerequisite of your
package. This will simplify the build system of your package.
+ Accordingly, the Autoconf macro AM_GNU_GETTEXT_INTL_SUBDIR is gone as well.
+ Java:
* xgettext now supports UTF-8 encoded .properties files (a new feature
of Java 9).
* The build system and tools now support Java 9, 10, and 11. On the
other hand, support for old versions of Java (Java 5 and older,
GCJ 4.2.x and older) has been dropped.
- Rebased gettext-po-mode.diff
- Removed gettext-needlessly_init_vars.patch (now in upstream)
- Removed gettext-0.19.8.1-jdk9.patch (now in upstream)
-------------------------------------------------------------------
Mon May 14 19:45:56 UTC 2018 - antoine.belvire@opensuse.org
- Remove prereq on info: No info page installed.
-------------------------------------------------------------------
Wed Oct 18 17:30:16 UTC 2017 - jayvdb@gmail.com
- Replace deprecated PreReq: with Requires(post): and Requires(preun):
- Disable debug packages on RHEL and derived distributions
-------------------------------------------------------------------
Tue Oct 3 10:12:03 UTC 2017 - fstrba@suse.com
- Added patch:
* gettext-0.19.8.1-jdk9.patch
+ specify java soure and target level 6 to be able to build
with jdk9
- Do not depend on gcc-java and do not build native binaries of the
gnu.gettext.GetURL and gnu.gettext.DumpResource tools, since
gcc-java is bound to disappear
- Build the gettext.jar using any java-devel provider and make the
gnu.gettext.GetURL and gnu.gettext.DumpResource tools scripts
running classes from this gettext.jar
- Clean the spec file a bit
-------------------------------------------------------------------
Sun Jun 19 15:42:15 UTC 2016 - astieger@suse.com
- GNU gettext 0.19.8.1:
* Fix unintentional soname bump
-------------------------------------------------------------------
Sat Jun 11 18:58:17 UTC 2016 - astieger@suse.com
- GNU gettext 0.19.8:
* msgfmt now produces little-endian .mo files by default.
* xml: xgettext and msgfmt now look for .its files in directories
supplied through the GETTEXTDATADIRS or XDG_DATA_DIRS
environment variable.
* JavaScript: xgettext and msgfmt now recognize numbered
arguments in format strings.
-------------------------------------------------------------------
Mon Apr 4 19:15:53 UTC 2016 - astieger@suse.com
- GNU gettext 0.19.7:
* can now load custom string extraction rules in XML
Internationalization Tag Set (ITS) standard
* the existing XML-based language scanners (Glade, GSettings, and
AppData) rewritten using ITS
* Add msgfmt --xml option to merge translations back to the
original XML document.
-------------------------------------------------------------------
Fri Sep 11 18:56:49 UTC 2015 - astieger@suse.com
- GNU gettext 0.19.6:
* Support AppData file format
-------------------------------------------------------------------
Thu Jul 16 10:56:05 UTC 2015 - astieger@suse.com
- GNU gettext 0.19.5.1:
* fix build on old platforms where stpcpy and stpncpy is missing
-------------------------------------------------------------------
Fri Jul 10 14:34:22 UTC 2015 - astieger@suse.com
- GNU gettext 0.19.5:
* drop gettext-check-allocated-size-for-static-segment.patch,
is upstream
-------------------------------------------------------------------
Tue Mar 10 07:10:56 UTC 2015 - mlin@suse.com
- Add gettext-check-allocated-size-for-static-segment.patch from upstream
* Check if the embedded segment size is valid, before adding it to
the string length. Please see
http://lists.gnu.org/archive/html/bug-gettext/2015-03/msg00005.html
-------------------------------------------------------------------
Tue Jan 27 20:24:49 UTC 2015 - andreas.stieger@gmx.de
- GNU gettext 0.19.4:
* The --keyword option of xgettext now accepts same argument
number for both singular and plural forms.
* Programming languages support:
- C#: xgettext now properly handles Unicode characters encoded
with surrogate pairs.
- C/C++: xgettext now recognizes ISO/IEC 9899:2011 string
literals prefixed by R, u8, u8R, u, uR, U, UR, L, or LR.
- Shell: xgettext now properly recognizes Bash ANSI-C quoting
($'...').
* Bug fixes:
- Fix integer overflow when reading certain MO files with
msgunfmt.
- Avoid invalid memory access in various cases. In particular,
when the same argument number is specified for singular/
plural arguments, and when checking Lisp and Scheme format
strings.
-------------------------------------------------------------------
Fri Oct 17 21:56:18 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.19.3:
* Fix xgettext mishandling of octal character escapes in C.
* Fix autopoint infinite recursion with certain configure.ac.
* The po/Makevars file has a new field MSGINIT_OPTIONS, that can
be used to adjust msginit's operation. This is particularly
useful for controlling line wrapping behavior together with
MSGMERGE_OPTIONS and XGETTEXT_OPTIONS.
-------------------------------------------------------------------
Tue Jul 15 11:49:59 CEST 2014 - pth@suse.de
- Update to 0.19.2:
* Fix xgettext crash in parsing empty string literals in C and Vala.
* Autoconf macro trace in autopoint now works again with Autoconf 2.68
or earlier. It was a regression in 0.19.
-------------------------------------------------------------------
Tue Jun 10 22:00:50 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.19.1:
* Desktop Entry: msgfmt now always reads the po/LINGUAS file
* Vala: Bug fix in xgettext handling of "//" in string literals
* po/Makevars.template now contains the newly added variables
* msgfmt now treats errors in the PO file header as non-fatal
In future Gettext versions, msgfmt will treat header errors as
fatal and terminate the command execution.
- switch to xz tarball
-------------------------------------------------------------------
Tue Jun 3 19:20:25 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.19:
- Programming languages support:
* Desktop Entry:
xgettext and msgfmt now support .desktop files, used by
desktop applications, as input and output.
* GSettings:
xgettext now supports GSettings schema file format used by
GNOME applications.
* JavaScript:
xgettext now recognizes E4X (ECMA-357) constructs.
* PHP:
Single and double quotes around heredoc markers are now
recognized.
* Python:
The acceptable format specifiers in the braced-syntax format
strings is now limited to the Standard Format Specifiers, to
reasonably avoid false-positives.
* Scheme:
The gettext shorthand form _"abc", used by GIMP script-fu, is
now recognized by xgettext.
* C and Vala:
xgettext now recognizes C99-style Unicode character escapes.
- The --add-location option of msgattrib, msgcat, msgcomm,
msgconv, msgen, msgfilter, msggrep, msgmerge, msguniq, and
xgettext commands now takes an optional argument 'never',
'full', or 'file', to control the format of "#: ..." comments.
- msgfmt now has --source option to keep generated .java file
when running in Java mode.
- msgattrib now has --empty option that sets msgstr to empty when
clearing fuzzy flag.
* msgexec and msgfilter pass the plural information to subprocess
through the environment variable MSG{EXEC,FILTER}_MSGID_PLURAL
and MSG{EXEC,FILTER}_PLURAL_FORM.
* New built-in filters 'quot' and 'boldquot' have been added to
msgfilter. These filters convert Latin quotation marks ('...',
"...") into Unicode quotation marks (for example, U+2018) if
possible, similar to the sed commands used in po/Rules-quot and
po/Rules-boldquot.
* The po/Makevars file has a couple of new options
PO_DEPENDS_ON_POT and DIST_DEPENDS_ON_UPDATE_PO, that can be
used to adjust the behavior of updating PO files on demand.
* xgettext now strips prefixed string before the comment tag.
This is useful to support C-style comment like this:
/*
* TRANSLATORS: first line
* second line
*/
* In this example, the extracted comment does not contain "* " at
the beginning of each line.
* libgettextpo library:
- Memory leak fixes in the PO file parser.
* Documentation:
- A complete example showing the use of GNU gettext in a
GNOME 3 application has been added
-------------------------------------------------------------------
Sun Jan 12 21:56:01 UTC 2014 - andreas.stieger@gmx.de
- GNU gettext 0.18.3.2:
* Add missing extern-inline.m4 into archive.
- verify source signature
-------------------------------------------------------------------
Mon Aug 12 10:45:36 UTC 2013 - christoph.miebach@web.de
- Version 0.18.3 - July 2013
* Runtime behaviour:
On Mac OS X systems, the setlocale() function now properly
invalidates loaded message catalogs when a locale has been set.
* Programming languages support:
- C++:
The gnu::autosprintf class now provides an assignment
operator.
- Glade:
xgettext now supports GtkBuider file format used by Glade 3.
xgettext now also extracts contexts (msgctxt) from Glade 2
and GtkBuider files.
- JavaScript:
xgettext now partially supports JavaScript. Since the
current JavaScript specification (ECMA-262) does not define
the standard set of formatting methods nor translation
functions, the implementation supports only a limited
set of formatting methods and translation functions commonly
used in Gjs and other popular JavaScript implemenations and
libraries.
- Lua:
xgettext now supports Lua, using Ľubomír Remák's lua-gettext.
- Python:
xgettext and msgfmt's format string checking now recognize
Python format string in braced syntax (PEP 3101). xgettext
now also supports explicit string concatenation with '+' and
handles platform dependent line terminators (LF/CR/CRLF)
transparently.
- Tcl:
Bug fix in xgettext Unicode escape handling.
- Vala:
xgettext now supports Vala.
* msgattrib now has --previous option to keep previous msgid when
making messages fuzzy, similar to msgmerge --previous.
* msgfmt now checks PO file headers more strictly with less
false-positives.
* 'gettextize' now checks macro directories specified with
AC_CONFIG_MACRO_DIRS in configure.ac.
* Portability:
- msginit now does not require GNU sed.
- The Makefile rule for generating en@quot and en@boldquot now
uses @SED@ variable instead of hard-coded 'sed' command to
allow users to supply GNU sed.
* Future backward-incompatibilities:
- In future Gettext versions, the files installed by
'gettextize' will require Automake 1.10 or later. This will
improve the compatibility of user projects with newer
Automake versions.
- Remove upstreamed patches:
gettext-configure.patch
-------------------------------------------------------------------
Sat Jun 15 11:52:06 UTC 2013 - schwab@linux-m68k.org
- Add glib2-devel libcroco-devel libxml2-devel to build requires to avoid
using the included copies.
- gettext-configure.patch: Fix syntax in libxml check to avoid spurious
failure
-------------------------------------------------------------------
Sat Jun 8 08:39:07 UTC 2013 - christoph.miebach@web.de
- Update to version 0.18.2.1: Version 0.18.2 - December 2012
+ xgettext now understands the block comment syntax of Guile 2.0.
+ libgettextpo library:
* The initial msgstr of a new message is now "", not NULL.
* Bug fixes in the functions po_message_is_range,
po_file_check_all, po_message_check_all.
+ Installation options:
The configure options --with-xz and --with-bzip2 can be used to
specify alternate compression methods for the archive used by
the 'autopoint' program. These options, together with
--with-git, allow to trade dependencies against installed
package size. --with-xz has the highest compression rate,
followed by --with-git, followed by --with-bzip2.
+ Autoconf macros:
* The autoconf macros installed by 'gettextize' now work with
the forthcoming Automake 1.14 and require Autoconf version
2.60 or newer.
+ Portability:
* Building on MacOS X 10.7, Cygwin 1.7.10, and newer 64-bit
mingw is now supported.
- Remove obsolete patches:
+ getext-stdio.in.patch
+ gettext-codecleanup.patch
-------------------------------------------------------------------
Wed Mar 27 07:51:16 UTC 2013 - mmeister@suse.com
- Added url as source.
Please see http://en.opensuse.org/SourceUrls
-------------------------------------------------------------------
Mon Sep 24 17:21:00 CEST 2012 - pth@suse.de
- remove silent_rules from AM_INIT_AUTOMAKE to make autoreconf
succeed on older distributions.
- Rename po-mode.diff to gettext-po-mode.diff
-------------------------------------------------------------------
Sun Jul 22 18:41:35 UTC 2012 - aj@suse.de
- Fix build with missing gets declaration (glibc 2.16)
-------------------------------------------------------------------
Tue Dec 21 13:43:49 CET 2010 - pth@suse.de
- Update to 0.18.1. Changes since 0.17:
Version 0.18.1 - June 2010
* msggrep: A '$' anchor in a regular expression now also matches
the end of the string, even if it does not end in a newline.
* Dependencies:
The libraries and programs are now linked with libunistring if
this library is already installed.
* Installation options:
The configure option --with-cvs is deprecated. The 'autopoint'
program will now use the 'git' program by default to compress its
archive. If the configure option --without-git is specified,
'autopoint' will not rely on 'git', but will instead rely on a
locally installed 3 MB large archive.
Version 0.18 - May 2010
* PO file format:
There is a new field 'Language' in the header entry. It denotes
the language code (plus optional country code) for the PO file.
This field can be used by automated tools, such as spell
checkers. It is expected to be more reliable than looking at the
file name or at the 'Language-Team' field in the header entry.
msgmerge, msgcat, msgen have a new option --lang that allows to
specify this field. Additionally, msgmerge fills in this new
field by looking at the 'Language-Team' field (if the --lang
option is not given).
* xgettext and PO file format:
For messages with plural forms, programmers can inform the
translators about the range of possible values of the numeric
argument, like this:
/* xgettext: range: 0..15 */
This information 'range: 0..15' is stored in the PO file as a
flag attached to the message. Translators can produce better
translations when they know that the numeric argument is small.
* Colorized PO files:
msgattrib, msgcomm, msgconv, msgen, msgfilter, msggrep, msginit,
msgmerge, msgunfmt, msguniq, xgettext now have options --color
and --style, like msgcat has since version 0.17.
* msgmerge is up to 10 times faster when the PO and POT files are
large. This speedup was contributed by Ralf Wildenhues.
* msgcmp has a new option -N/--no-fuzzy-matching, like msgmerge has
since version 0.12.
* msgfilter now sets environment variables during the invocation of
the filter, indicating the msgid and location of the messge being
processed.
* xgettext now can extract plural forms from Qt 4 programs. The
recommended xgettext command-line options for this case are:
--qt --keyword=tr:1,1t --keyword=tr:1,2c,2t --keyword=tr:1,1,2c,3t
* xgettext --language=GCC-source now recognizes also the format
strings used in the Fortran front-end of the GCC compiler, and
marks them as 'gfc-internal-format'.
* autopoint can now be used to update several PO directories all
together.
* PO mode changes:
- PO files with plural entries are now correctly handled.
- Editing a message with previous msgid (in comments) removes these
comments. Contributed by Noritada Kobayashi.
* The po/Makevars file has a new field MSGMERGE_OPTIONS, that can
be used to adjust msgmerge's operation.
* The use of the macro AM_GNU_GETTEXT without 'external' argument
and the --intl option of the gettextize program are deprecated
and will be removed in the next release. Instead of including
the intl sources in your package, we suggest making the libintl
library an (optional) prerequisite of your package.
* Updated the meaning of 'gcc-internal-format' to match GCC 4.3.
* Installation options:
The configure options --without-cvs and --with-git can be used to
specify whether 'autopoint' will use the 'cvs' program, or the
'git' program, or none at all. These options allow to trade
dependencies against installed package size: If --without-cvs is
specified and --with-git is not specified, 'autopoint' will not
rely on 'cvs' or 'git', but will instead rely on a locally
installed a 3 MB large archive.
* Portability: The msgfilter program now also works on native Woe32
- platforms. Compiled C# message catalogs now also work with
- 'mono' versions from 2009
or newer.
-------------------------------------------------------------------
Fri Mar 5 09:34:18 UTC 2010 - puzel@novell.com
- remove gettext-tools/gnulib-m4/openmp.m4: fix build with new
autoconf
-------------------------------------------------------------------
Mon Jul 27 12:52:06 CEST 2009 - rguenther@suse.de
- Remove rather than %exclude not packaged files.
-------------------------------------------------------------------
Tue Oct 14 13:14:11 CEST 2008 - kukuk@suse.de
- Never install files in %check section
- Disable autoconf/libtool tests
-------------------------------------------------------------------
Mon Oct 13 16:03:16 CEST 2008 - kukuk@suse.de
- Fix autoreconf call
-------------------------------------------------------------------
Sun May 18 10:35:50 CEST 2008 - pth@suse.de
- Fix segmentation fault in msgmerge (bnc#391372).
-------------------------------------------------------------------
Tue Dec 4 14:43:46 CET 2007 - pth@suse.de
- Add patch from upstreams to add the missing mode for the open call.
-------------------------------------------------------------------
Fri Nov 23 14:48:47 CET 2007 - pth@suse.de
- Remove the patch for disabling a test.
-------------------------------------------------------------------
Fri Nov 16 14:00:51 CET 2007 - pth@suse.de
- Don't run the testsuite.
-------------------------------------------------------------------
Thu Nov 15 12:53:24 CET 2007 - pth@suse.de
- Rename packages: gettext -> gettext-runtime and
gettext-devel -> gettext->tools
Packaging closely follows uptream recommendation with a few
exceptions.
- Initialize variable to shut up gcc.
- Disable msgmerge-compendium-5 for now.
- Reorder installation flow because libgettextlib is needed for the
gettext-tools stuf.
- Update to 0.17:
* License:
The gettext related programs and tools are now licensed under the GPL
version 3, instead of the GPL version 2.
* PO file format:
The Project-Id-Version field in the header entry may now already be filled
in the POT file. In this case, the translators don't need to fill it in.
xgettext has new options --package-name and --package-version that allow
to specify the package name and version from a Makefile.
* Colorized PO files:
The msgcat program has new options --color and --style that produce a
colorized PO file output, where keywords, strings, comments, or format
directives can be highlighted. See the documentation section
"Highlighting parts of PO files" for more info.
* gettextize now has a --po-dir option that allows several PO directories to
be updated all together.
* Programming languages support:
- Contexts (msgctxt) are now also supported for Java and C#.
- C# with Qt: The support for Qt format strings has been updated for Qt 4.
- C++ with KDE:
xgettext has a new option --kde that triggers the recognition and marking
of KDE 4 format strings.
* Autoconf macros:
- A new macro AM_XGETTEXT_OPTION can be used as an alternative to modifying
po/Makevars.
* libgettextpo library:
- New functions are available for querying the list of supported format
types.
- The functions po_message_comments and po_message_extracted_comments
return a multiline string where each line no longer starts with a
redundant space. The leading space in every comment line is now stripped
while reading the PO file.
- Conversely, when you pass a multiline string to the function
po_message_set_comments or po_message_set_extracted_comments, you normally
don't pass a space at the beginning of each line, because such spaces are
no longer trimmed during output.
* Documentation:
- The "Users" chapter has been completely rewritten.
- New section "Highlighting parts of PO files".
- A complete example showing the use of GNU gettext in Java with the Qt/Jambi
GUI toolkit has been added.
- Add tcl and perl-libintl-perl to BuildRequires (testsuite needs
them).
- Remove call to gl_AC_TYPE_LONG_LONG from libasprintf's
configure.ac
-------------------------------------------------------------------
Wed Oct 31 16:58:36 CET 2007 - mrueckert@suse.de
- renamed rpmlintrc to gettext-rpmlintrc and added it to the spec
as source 1
-------------------------------------------------------------------
Mon Sep 3 13:51:10 CEST 2007 - pth@suse.de
- Incorporate upstream patch that correctly fixes the expat
dynloading code (http://savannah.gnu.org/bugs/?19585).
-------------------------------------------------------------------
Fri Aug 10 19:40:37 CEST 2007 - bk@suse.de
- Update to gettext 0.16.1, required by GnuPG 2.0.5
-------------------------------------------------------------------
Thu Aug 9 18:04:26 CEST 2007 - bk@suse.de
- re-enable make check to identify possible toolchain bugs
- move java documentation from gettext to this package
- hardlink duplicate example files in documentation
-------------------------------------------------------------------
Fri Apr 20 14:43:28 CEST 2007 - pth@suse.de
- Make inclusion of expat.h independent of dynamic loading so
that XML_MAJOR_VERSION is actually defined (#264110).
-------------------------------------------------------------------
Fri Mar 30 15:18:31 CEST 2007 - pth@suse.de
- Fix use of uninitialized variables.
- Set CXXFLAGS to get C++ code compiled with RPM_BUILD_OPTS
- Sync .spec files
-------------------------------------------------------------------
Tue Mar 20 17:54:57 CET 2007 - rguenther@suse.de
- Remove unused expat BuildRequires.
-------------------------------------------------------------------
Wed Jan 31 13:05:29 CET 2007 - pth@suse.de
- Reference 0.16 .spec file
- fix spec file
-------------------------------------------------------------------
Tue Jan 16 17:09:50 CET 2007 - pth@suse.de
- Update to gettext 0.16
-------------------------------------------------------------------
Mon Sep 18 13:45:31 CEST 2006 - rguenther@suse.de
- New package to host gettext java tools GetURL and DumpResource.

159
gettext-java.spec Normal file
View File

@ -0,0 +1,159 @@
#
# spec file for package gettext-java
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gettext-java
Version: 0.21.1
Release: 0
Summary: Java Support for Native Language Support (NLS)
License: LGPL-2.1-or-later
Group: Development/Tools/Other
URL: https://www.gnu.org/software/gettext/
Source0: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz
Source1: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz.sig
Source2: suse-start-po-mode.el
Source3: gettext-linkdupes.sh
Source4: gettext-rpmlintrc
Source5: gettext-runtime.keyring
Patch0: gettext-0.12.1-sigfpe.patch
Patch1: gettext-0.19.3-fix-bashisms.patch
Patch2: gettext-0.12.1-gettextize.patch
Patch3: use-acinit-for-libtextstyle.patch
Patch4: gettext-po-mode.diff
Patch5: gettext-initialize_vars.patch
# PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de
Patch6: gettext-dont-test-gnulib.patch
Patch7: gettext-0.21-jdk17.patch
# PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com
Patch11: boo941629-unnessary-rpath-on-standard-path.patch
# PATCH-FIX-SUSE Bug boo#1106843
Patch13: reproducible.patch
# PATCH-FEATURE bsc#1165138
Patch14: 0001-msgcat-Add-feature-to-use-the-newest-po-file.patch
Patch15: 0002-msgcat-Merge-headers-when-use-first.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: glib2-devel
BuildRequires: java-devel >= 1.8
BuildRequires: libtextstyle-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: perl-libintl-perl
BuildRequires: tcl
%if 0%{?fedora_version} || 0%{?centos_version} <= 600 || 0%{?scilin_version} <= 600 || 0%{?rhel_version} <= 600
%global debug_package %{nil}
%endif
%description
This package includes the tools needed to support message catalogs in
Java applications. It also includes example code for java, java+awt and
java+swing.
%prep
%setup -q -n gettext-%{version}
%patch0
%patch1 -p1
%patch2
%patch3 -p1
%patch4
%patch5
%patch6 -p1
%patch7 -p1
%patch11 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%build
# expect a couple "You should update your `aclocal.m4' by running aclocal."
autoreconf -fiv
export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint -lm"
export CXXFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
%configure --enable-shared --enable-java
make GMSGFMT=../src/msgfmt %{?_smp_mflags} V=1
%install
export LC_CTYPE=ISO-8859-15
make -C gettext-tools/gnulib-lib install DESTDIR=%{buildroot}
make -C gettext-tools/src install DESTDIR=%{buildroot}
make -C gettext-runtime/intl-java install DESTDIR=$PWD docdir=/docs
make -C gettext-tools/examples install DESTDIR=$PWD docdir=/allexamples
mkdir -p docs/examples
mv allexamples/examples/*java* docs/examples
cd docs/examples
fdupes -r *|while read dupe; do
if [ -z "$dupe" ]; then
startlink=
elif [ -z "$startlink" ]; then
startlink="$dupe"
else
ln -f "$startlink" "$dupe"
fi
done
cd ..
find -type f -size 0 -delete
mkdir -p %{buildroot}%{_libdir}/gettext
mv %{buildroot}/%{_datadir}/gettext/gettext.jar %{buildroot}%{_libdir}/gettext/
# Create scripts that will launch the tools
for i in gnu.gettext.DumpResource gnu.gettext.GetURL; do
cat <<EOF > %{buildroot}%{_libdir}/gettext/$i
#!/bin/sh
exec java -cp %{_libdir}/gettext/gettext.jar $i \${1+\$@}
EOF
chmod +x %{buildroot}%{_libdir}/gettext/$i
done
rm -rf %{buildroot}/%{_datadir}/*
mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}
cp -av * %{buildroot}/%{_defaultdocdir}/%{name}
cd ../allexamples/examples
rm -rf *csharp*
fdupes -r * | while read dupe; do
if [ -z "$dupe" ]; then
startlink=
elif [ -z "$startlink" ]; then
startlink="$dupe"
else
echo "ln -f '$startlink' '$dupe'" >>../../gettext-linkdupes.sh
fi
done
diff %{SOURCE3} . || {
cat <<END
######################################################
######################################################
## Updated gettext-linkdupes.sh in $PWD ##
######################################################
######################################################
END
}
ls -l %{buildroot}/%{_datadir}
# exclude files packaged via other spec files
rm -rf %{buildroot}/%{_bindir}
rm -f %{buildroot}/%{_libdir}/lib*
rm -f %{buildroot}/%{_libdir}/gettext/hostname
rm -f %{buildroot}/%{_libdir}/gettext/project-id
rm -f %{buildroot}/%{_libdir}/gettext/urlget
rm -f %{buildroot}/%{_libdir}/gettext/user-email
rm -f %{buildroot}/%{_libdir}/gettext/cldr-plurals
%files
%{_defaultdocdir}/%{name}
%{_libdir}/gettext/gettext.jar
%{_libdir}/gettext/gnu.gettext.DumpResource
%{_libdir}/gettext/gnu.gettext.GetURL
%changelog

85
gettext-linkdupes.sh Normal file
View File

@ -0,0 +1,85 @@
ln -f 'hello-ycp/po/LINGUAS' 'hello-c/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-c++/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-c++-gnome/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-c++-kde/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-c++-qt/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-c++-wxwidgets/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-c-gnome/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-clisp/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-gawk/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-guile/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-librep/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-objc/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-objc-gnome/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-objc-gnustep/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-pascal/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-perl/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-php/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-python/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-sh/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-smalltalk/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-tcl/po/LINGUAS'
ln -f 'hello-ycp/po/LINGUAS' 'hello-tcl-tk/po/LINGUAS'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-clisp/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-gawk/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-guile/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-librep/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-pascal/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-perl/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-php/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-python/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-sh/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-smalltalk/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-tcl/m4/Makefile.am'
ln -f 'hello-ycp/m4/Makefile.am' 'hello-tcl-tk/m4/Makefile.am'
ln -f 'hello-ycp/autogen.sh' 'hello-clisp/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-gawk/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-guile/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-librep/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-pascal/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-perl/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-php/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-python/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-sh/autogen.sh'
ln -f 'hello-ycp/autogen.sh' 'hello-smalltalk/autogen.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-clisp/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-gawk/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-guile/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-librep/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-pascal/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-perl/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-php/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-python/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-sh/autoclean.sh'
ln -f 'hello-ycp/autoclean.sh' 'hello-smalltalk/autoclean.sh'
ln -f 'hello-tcl-tk/po/Makefile.am' 'hello-tcl/po/Makefile.am'
ln -f 'hello-tcl-tk/Makefile.am' 'hello-gawk/Makefile.am'
ln -f 'hello-tcl-tk/Makefile.am' 'hello-guile/Makefile.am'
ln -f 'hello-tcl-tk/Makefile.am' 'hello-php/Makefile.am'
ln -f 'hello-tcl-tk/Makefile.am' 'hello-sh/Makefile.am'
ln -f 'hello-tcl-tk/Makefile.am' 'hello-tcl/Makefile.am'
ln -f 'hello-tcl-tk/autogen.sh' 'hello-tcl/autogen.sh'
ln -f 'hello-tcl-tk/autoclean.sh' 'hello-tcl/autoclean.sh'
ln -f 'hello-objc-gnome/po/POTFILES.in' 'hello-objc/po/POTFILES.in'
ln -f 'hello-objc-gnome/po/Makevars' 'hello-c++-gnome/po/Makevars'
ln -f 'hello-objc-gnome/po/Makevars' 'hello-c-gnome/po/Makevars'
ln -f 'hello-objc-gnome/m4/gnome-orbit-check.m4' 'hello-c++-gnome/m4/gnome-orbit-check.m4'
ln -f 'hello-objc-gnome/m4/gnome-orbit-check.m4' 'hello-c-gnome/m4/gnome-orbit-check.m4'
ln -f 'hello-objc-gnome/m4/gnome-gnorba-check.m4' 'hello-c++-gnome/m4/gnome-gnorba-check.m4'
ln -f 'hello-objc-gnome/m4/gnome-gnorba-check.m4' 'hello-c-gnome/m4/gnome-gnorba-check.m4'
ln -f 'hello-objc-gnome/m4/gnome.m4' 'hello-c++-gnome/m4/gnome.m4'
ln -f 'hello-objc-gnome/m4/gnome.m4' 'hello-c-gnome/m4/gnome.m4'
ln -f 'hello-objc-gnome/m4/Makefile.am' 'hello-c-gnome/m4/Makefile.am'
ln -f 'hello-objc-gnome/autogen.sh' 'hello-c++-gnome/autogen.sh'
ln -f 'hello-objc-gnome/autogen.sh' 'hello-c-gnome/autogen.sh'
ln -f 'hello-objc-gnome/autoclean.sh' 'hello-c++-gnome/autoclean.sh'
ln -f 'hello-objc-gnome/autoclean.sh' 'hello-c-gnome/autoclean.sh'
ln -f 'hello-objc/po/Makevars' 'hello-c/po/Makevars'
ln -f 'hello-objc/m4/Makefile.am' 'hello-c/m4/Makefile.am'
ln -f 'hello-objc/m4/Makefile.am' 'hello-c++/m4/Makefile.am'
ln -f 'hello-objc/m4/Makefile.am' 'hello-c++-kde/m4/Makefile.am'
ln -f 'hello-objc/autogen.sh' 'hello-c/autogen.sh'
ln -f 'hello-objc/autoclean.sh' 'hello-c/autoclean.sh'
ln -f 'hello-objc/autoclean.sh' 'hello-c++/autoclean.sh'
ln -f 'hello-c-gnome/po/POTFILES.in' 'hello-c/po/POTFILES.in'
ln -f 'hello-c++-gnome/po/POTFILES.in' 'hello-c++/po/POTFILES.in'

12
gettext-po-mode.diff Normal file
View File

@ -0,0 +1,12 @@
Index: gettext-tools/emacs/po-mode.el
===================================================================
--- gettext-tools/emacs/po-mode.el.orig 2010-06-06 14:49:57.000000000 +0200
+++ gettext-tools/emacs/po-mode.el 2010-12-20 18:47:11.963132483 +0100
@@ -1242,6 +1242,7 @@ all reachable through 'M-x customize', i
;; mode-line-format usually contains global-mode-string, but some
;; people customize this variable. As a last resort, append at the end.
(let ((prev-entry (or (member 'global-mode-string mode-line-format)
+ (member 'mode-line-position mode-line-format)
(member " " mode-line-format)
(last mode-line-format))))
(setcdr prev-entry (cons po-mode-line-entry (cdr prev-entry)))))

12
gettext-rpmlintrc Normal file
View File

@ -0,0 +1,12 @@
# This line is mandatory to access the configuration functions
from Config import *
addFilter("gettext-tools.* postun-without-ldconfig")
addFilter("gettext-tools.* postin-without-ldconfig")
addFilter("gettext.* shlib-policy-missing-suffix")
addFilter("gettext-tools.* devel-file-in-non-devel-package")
addFilter("gettext-csharp.* package-with-huge-docs")
addFilter("gettext.* non-devel-buildrequires")
addFilter("gettext-csharp.* no-binary")
addFilter("gettext.* percent-in-provides")
addFilter("gettext.* percent-in-obsoletes")

1592
gettext-runtime-mini.changes Normal file

File diff suppressed because it is too large Load Diff

367
gettext-runtime-mini.spec Normal file
View File

@ -0,0 +1,367 @@
#
# spec file for package gettext-runtime-mini
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pacname gettext
%bcond_without mini
Name: gettext-runtime-mini
Version: 0.21.1
Release: 0
BuildRequires: gcc-c++
BuildRequires: libtool
# To get an updated linkdupes.sh (in case there are new dupes), temproarily enable:
#BuildRequires: fdupes
%if %{without mini}
BuildRequires: automake
BuildRequires: glib2-devel
BuildRequires: libxml2-devel
BuildRequires: perl-libintl-perl
BuildRequires: tcl
# bug437293
%ifarch ppc64
Obsoletes: gettext-64bit
%endif
#
#Rename done for openSUSE 11.0
Provides: gettext = %{version}
Obsoletes: gettext < %{version}
Conflicts: gettext-runtime-mini
Conflicts: gettext-tools-mini
%else
# to allow a prjconf preference which to take per build
Provides: gettext-runtime = %{version}
# rpm-build requires gettext-tools, but we will only just be building it
#!BuildIgnore: gettext-tools
%endif
Summary: Tools for Native Language Support (NLS)
License: GPL-3.0-or-later AND LGPL-2.0-or-later
Group: Development/Tools/Other
URL: https://www.gnu.org/software/gettext/
Source0: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz
Source1: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz.sig
Source2: suse-start-po-mode.el
Source3: gettext-linkdupes.sh
Source4: baselibs.conf
Source5: gettext-rpmlintrc
Source6: gettext-runtime.keyring
Patch0: gettext-0.12.1-sigfpe.patch
Patch1: gettext-0.19.3-fix-bashisms.patch
Patch2: gettext-0.12.1-gettextize.patch
Patch3: use-acinit-for-libtextstyle.patch
Patch4: gettext-po-mode.diff
Patch5: gettext-initialize_vars.patch
# PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de
Patch6: gettext-dont-test-gnulib.patch
Patch7: gettext-0.21-jdk17.patch
# PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com
Patch11: boo941629-unnessary-rpath-on-standard-path.patch
# PATCH-FIX-SUSE Bug boo#1106843
Patch13: reproducible.patch
# PATCH-FEATURE bsc#1165138
Patch14: 0001-msgcat-Add-feature-to-use-the-newest-po-file.patch
Patch15: 0002-msgcat-Merge-headers-when-use-first.patch
%description
This package contains the intl library as well as tools that ease the
creation and maintenance of message catalogs. It allows you to extract
strings from source code. The supplied Emacs mode (po-mode.el) helps
editing these catalogs (called PO files, for portable object) and
adding translations. A special compiler turns these PO files into
binary catalogs.
%package -n gettext-tools%{?with_mini:-mini}
Summary: Tools for Native Language Support (NLS)
License: LGPL-2.1-or-later
Group: Development/Tools/Other
Requires: %{name} = %{version}
Requires: xz
%if %{without mini}
Requires(post): info
Requires(preun):info
%endif
Provides: gettext-devel = %{version}
%if %{without mini}
# bug437293
%ifarch ppc64
Obsoletes: gettext-devel-64bit
%endif
#
Obsoletes: gettext-devel < %{version}
Conflicts: gettext-runtime-mini
Conflicts: gettext-tools-mini
%else
# to allow a prjconf preference which to take per build
Provides: gettext-tools = %{version}
%endif
# Several tools use bison-runtime text domain:
%if 0%{?suse_version}
Recommends: bison-lang
%endif
%description -n gettext-tools%{?with_mini:-mini}
This package contains the `intl' library as well as tools that ease the
creation and maintenance of message catalogs. With it you can extract
strings from source code. The supplied Emacs mode (po-mode.el) will aid
in editing these catalogs (called PO files, for portable object) and
add translations. A special compiler will turn these PO files into
binary catalogs.
%package tools-doc
Summary: HTML documentation and examples for gettext-runtime
License: GPL-3.0-or-later AND LGPL-2.0-or-later
Group: Documentation/HTML
BuildArch: noarch
%description tools-doc
This subpackage contains the HTML version of the gettext documentation
as well as project examples.
%if %{without mini}
%package -n libtextstyle0
Summary: Provides textstyling for console output
License: LGPL-2.1-or-later
Group: Development/Tools/Other
%description -n libtextstyle0
GNU libtextstyle provides an easy way to add styling to programs that produce output to a console or terminal emulator window.
It does this in a way that allows the end user to customize the styling using the industry standard, namely Cascading Style Sheets (CSS).
%package -n libtextstyle-devel
Summary: Devel package for libtextstyle
License: LGPL-2.1-or-later
Group: Development/Tools/Other
Requires: libtextstyle0 = %{version}
%description -n libtextstyle-devel
This package provides headers and static libraries for libtextstyle
%endif
%prep
%setup -q -n %{pacname}-%{version}
%patch0
%patch1 -p1
%patch2
%patch3 -p1
%patch4
%patch5
%patch6 -p1
%patch7 -p1
%patch11 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%build
%define _lto_cflags %{nil}
# expect a couple "You should update your `aclocal.m4' by running aclocal."
autoreconf -fiv
export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
export CXXFLAGS="$CFLAGS -Dgcc_is_lint"
export LDFLAGS="-lm"
%configure --disable-static $OPTS
%if %{with mini}
# Link statically to libtextstyle from libgettextlib.so
export CFLAGS="${CFLAGS} -fPIC"
export CXXFLAGS="${CXXFLAGS} -fPIC"
(cd libtextstyle; %configure --enable-static --disable-shared ${OPTS})
%endif
make %{?_smp_mflags} GMSGFMT=../src/msgfmt V=1
# use texinfo.tex supplied by the system (texinfo)
# make -C gettext-tools/doc gettext.pdf
%install
%define my_docdir %{_defaultdocdir}/%{name}
export LC_CTYPE=ISO-8859-15
%make_install docdir=%{my_docdir}
cp -pr AUTHORS NEWS README* %{buildroot}/%{my_docdir}
mkdir -p %{buildroot}/usr/share/emacs/site-lisp
install -m 644 %SOURCE2 %{buildroot}/usr/share/emacs/site-lisp
install -m 644 gettext-tools/emacs/po-compat.el %{buildroot}/usr/share/emacs/site-lisp
install -m 644 gettext-tools/emacs/po-mode.el %{buildroot}/usr/share/emacs/site-lisp
install -m 644 gettext-tools/emacs/start-po.el %{buildroot}/usr/share/emacs/site-lisp
#make -C gettext-tools/doc docdir=%%{buildroot}/%%{my_docdir} install-pdf
if [ -e %{buildroot}/%{_libdir}/preloadable_libintl.so ];then
chmod 755 %{buildroot}/%{_libdir}/preloadable_libintl.so
fi
# fix rpmlint invalid-lc-messages-dir:
rm -rf %{buildroot}/%_datadir/locale/en@{bold,}quot
%{find_lang} gettext-tools
%{find_lang} gettext-runtime
#remove unwanted stuff
rm -f %{buildroot}/usr/share/doc/packages/gettext/README.{mingw,vms,woe32}
rm -f %_datadir/%name/gettext.jar
rm -f %{buildroot}/%_libdir/libtextstyle.la
%if %{with mini}
rm -f %{buildroot}/usr/include/textstyle.h
rm -rf %{buildroot}/usr/include/textstyle
rm -rf %{buildroot}/usr/share/doc/packages/gettext-runtime-mini/libtextstyle_*.html
rm -f %{buildroot}/%_libdir/libtextstyle.a
rm -f %{buildroot}/%{_infodir}/libtextstyle.info
%endif
#find %%{buildroot} -maxdepth 2 -name '*html' -delete
# hardlink the dupes in the documentation:
cd %{buildroot}/%{my_docdir}/examples
sh %{SOURCE3}
# moved to gettext-java and gettext-csharp:
rm -rf *csharp* *java* ../javadoc* ../csharpdoc*
rm -f %{buildroot}%{_defaultdocdir}/%name/README.woe32
rm -f %{buildroot}%{_infodir}/dir
cd %{buildroot}/%{_mandir}/man3
echo ".so man3/dngettext.3" > dcngettext.3
echo ".so man3/dgettext.3" > dcgettext.3
%if %{without mini}
%check
# s390s fails this test,
# Starting test_recursive_lock ...test-lock: pthread_mutex_lock.c:66: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
# These fails randomly, remove them from Makefile
sed -i -e 's/test-areadlink\$(EXEEXT) //g' \
-e 's/test-readlink\$(EXEEXT) //g' \
gettext-tools/gnulib-tests/Makefile
make check || {
%ifarch s390x
echo "got this during mbuild testing on s390x (on both times which make check ran):"
echo "Starting test_recursive_lock ...test-lock: pthread_mutex_lock.c:66: __pthread_mutex_lock: Assertion mutex->__data.__owner == 0 failed."
echo "s390x needs kernel/glibc/gcc fix, but let it continue bootstrap for now!"
%else
echo "make check failed, check it!"
exit 5
%endif
}
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n gettext-tools%{?with_mini:-mini}
%install_info --info-dir=%{_infodir} %{_infodir}/gettext.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/autosprintf.info.gz
%preun -n gettext-tools%{?with_mini:-mini}
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gettext.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/autosprintf.info.gz
%if %{without mini}
%post -n libtextstyle0 -p /sbin/ldconfig
%postun -n libtextstyle0 -p /sbin/ldconfig
%endif
%files -f gettext-runtime.lang
%defattr(-,root,root)
%license COPYING
%dir %_datadir/gettext
%doc %dir %_docdir/%name/
%doc %_docdir/%name/gettext.1.html
%doc %_docdir/%name/ngettext.1.html
%doc %_docdir/%name/envsubst.1.html
%doc %_docdir/%name/*.3.html
%doc %_docdir/%name/AUTHORS
%doc %_docdir/%name/NEWS
%doc %_docdir/%name/README
%doc %_docdir/%name/FAQ.html
%_bindir/gettext
%_bindir/ngettext
%_bindir/envsubst
%_bindir/gettext.sh
%_bindir/msgfmt
%_libdir/libgettextlib-*.so
%_libdir/libgettextsrc-*.so
%_libdir/libasprintf.so.*
%doc %_mandir/man1/gettext.1.gz
%doc %_mandir/man1/ngettext.1.gz
%doc %_mandir/man1/envsubst.1.gz
%doc %_mandir/man1/msgfmt.1.gz
%doc %_mandir/man3/*
%_datadir/gettext/ABOUT-NLS
%dir %_datadir/emacs
%dir %_datadir/emacs/site-lisp
%_datadir/emacs/site-lisp/po-compat.*
%_datadir/emacs/site-lisp/po-mode.*
%_datadir/emacs/site-lisp/start-po.*
%_datadir/emacs/site-lisp/suse-start-po-mode.el
%files -n gettext-tools%{?with_mini:-mini} -f gettext-tools.lang
%defattr(-,root,root)
%_bindir/msg[a-eg-u]*
%_bindir/msgfilter
%_bindir/xgettext
%_bindir/gettextize
%_bindir/autopoint
%_bindir/recode-sr-latin
%doc %_mandir/man1/msg[a-eg-u]*.1.gz
%doc %_mandir/man1/msgfilter.1.gz
%doc %_mandir/man1/xgettext.1.gz
%doc %_mandir/man1/gettextize.1.gz
%doc %_mandir/man1/autopoint.1.gz
%doc %_mandir/man1/recode-sr-latin.1.gz
%doc %_infodir/gettext.info*
%doc %_infodir/autosprintf.info*
%_includedir/gettext-po.h
%_includedir/autosprintf.h
%_libdir/libasprintf.*a
%_libdir/libasprintf.so
%_libdir/libgettextlib.*
%_libdir/libgettextsrc.*
%_libdir/libgettextpo*
%_libdir/preloadable_libintl.so
%_libdir/gettext
%_datadir/%pacname/config.rpath
%_datadir/%pacname/po
%_datadir/%pacname/projects
%_datadir/%pacname/gettext.h
%_datadir/%pacname/msgunfmt.tcl
%_datadir/%pacname/javaversion.class
%_datadir/%pacname/styles
%_datadir/%pacname/archive.dir.tar.xz
%_datadir/aclocal
%dir %{_datadir}/%{pacname}-%{version}
%{_datadir}/%{pacname}-%{version}/its
%files tools-doc
%defattr(-,root,root)
%doc %dir %_docdir/%name/
%doc %_docdir/%name/examples/
%doc %_docdir/%name/auto*.html
%doc %_docdir/%name/gettext_*.html
%doc %_docdir/%name/gettextize*.html
%doc %_docdir/%name/msg*.html
%doc %_docdir/%name/tutorial*.html
%doc %_docdir/%name/xgettext*.html
%doc %_docdir/%name/recode-sr-latin.1.html
%if %{without mini}
%files -n libtextstyle0
%defattr(-,root,root)
%_libdir/libtextstyle.so.*
%files -n libtextstyle-devel
%defattr(-,root,root)
%dir %_includedir/textstyle
%_includedir/textstyle.h
%_includedir/textstyle/stdbool.h
%_includedir/textstyle/version.h
%_includedir/textstyle/woe32dll.h
%_libdir/libtextstyle.so
%doc %_docdir/gettext-runtime%{?with_mini:-mini}/libtextstyle*.html
%doc %_infodir/libtextstyle.info.gz
%endif
%changelog

1592
gettext-runtime.changes Normal file

File diff suppressed because it is too large Load Diff

63
gettext-runtime.keyring Normal file
View File

@ -0,0 +1,63 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFxjJagBEACtJ6cBUyULIsZ163tvkSwAtqGIF4EvymDMB/q4tjf2S9RmW5Zo
UuEdFkImFWZaY8LV6shHF44RXHPL/irnA0byr9pVit+sj5RtWMXLJUnY6hp60OAN
n1CptCztcDwhDiSt0bcjPHRSvInqU5uHPiCfXau06TzveZ7UCj6Tkqc3n87W74y9
HMfgVF7OrdyZCq3Bif+TCUnywnGmO4Boet2xGDCpCRyiIZXG4kl3REu/xqvhIyNk
w/o9TmnbEMbt4hGNp8O7nGZra9ajeDNYccxZYN2P6HKxCYfueKqjy+356+jnKgvR
D4QYP7z+3X3y7F1Ii2WIBWzCeZyVuPwATvGOL4lzOfMNJP9xdS3lbqHBYlAhWHcI
cRKhd7D7YAOjqVCfiKkZcZqUkcg1RZpaQ6nGQEpxmIj9QDfv+2f2QnbRiPjt2smn
Mi79ONEGUIu3h+PyMaS8Xn09Krasszd9gs0uKbCsRKOuVkzv0nQ8XnjlIBVbkCrB
IU3aKL94BmC0ZcGVqBXsWgZY2BzjKfI3HoJS0BaUAth1VJeLa4VPY2X7BV0ewyzo
Hf0OFdLwZ6RIxMlWX+dz9r8V/zNCxP/jU0z+Brhxm3iCdiRykkfHteSwoz1xyBQ3
F+F+5dkZH3EFSab7CK57BF4/xcYwuwOheoqd76jhtfYP3uPgCe3VOSPVqwARAQAB
tDhCcnVubyBIYWlibGUgKE9wZW4gU291cmNlIERldmVsb3BtZW50KSA8YnJ1bm9A
Y2xpc3Aub3JnPokCPQQTAQgAJwUCXGMlqAIbAwUJC0c1AAULCQgHAgYVCAkKCwIE
FgIDAQIeAQIXgAAKCRD1vosmfGpAbSb+EACRlaeS0r9hCLn0YhN6hNEVvtkTU4pj
8rrAD3gMBZF+DBl1QkvMcEULwI2NBuETgJfW1uO2CUyxw8EWronQXmPruAdCrvA2
V1dJP43Qy8IKqlgcAwKki+Yaq7+8qQLmCVzOcKyLg+4wYIpT17jE9O2U6eW2tO1R
fJuRnUSvft5DibHrhKaIYe283yTmvR2dioqg+91FJ5fvsGw7rH0nxzlmb+fx4w0F
uvLutxQNQDgJBDeVzMOM7VZdvnIUGzg+d4rKUftG5tzvIraIjjWfFJ5bEh5ljzSy
wZ/MbGUePmBIFTFeLt4/vlFa3oY77V9pAQkd1zhz10QEnAsOHbgah5enRfFKDhz0
n6+3W4cHjcwByM319wM708Lk2nzCL1tfOhdUtJzUCdJ5Lx5osK1Abt8IqwDaCXy/
ICEnldDEUqoBVTNluqxPV4k/o2YYVIhNcz+DysazLTVeLk+HPwjnVaXS0WF/e2G0
S9NfljQBG1W+NdWjs0ZWZ2reLSoxdkndqgTqu2KZWhE8QIGa8LvveWAZc/bgHj1V
aXFCcgDf17PR6ADOtF58hytaTIwnb382qVesYL1torQO3IWabHHfNwgIm3aEtb/i
u1iO6WA3KWrAK9R0BneygswC+q+FKo8YL+rb6q+EEyZqU6WPPriD9ssS2bdjvlbu
ClfB3hOtan7PM4kCHAQQAQgABgUCXGMrDAAKCRBPSUqULkYWwoRMEACrY5AMc8JM
U8PZq7qhJ9yJgqnjGmN8/TGmta7NK0YJWTuluEK1Q5G6bWysLTHbkoNs8VgFvSiG
JQNqkJzCu0mhZn9fnxQYFcsZFzK4Z7pJj7Mw7AK5DaGqwQz1YeA+TFIirQY95PPw
Iq6C8qy8LMF58YRRZffpd1ABFasHk4OgsXnvXPa25/T1FQm0hllR0JbCep2LDE53
PAKUgivHecV9RYYkpNJInwT7BIRljY7hQGPSn6GsgB5uZZDJKU4jgfaimJWfrXHw
ge5zjBBTkHU8BsnvrnEiaDQ0mxnJ/jVm9ylLel/7hq5rXTx92q0VrbL9/ZRQDVVO
4CqABeNjLmdZiJqQfa390Gzhkch6aOk6OznxG7s1EmJi64YmBZMd81HpXLyfKbLq
pcYvb4k+Y5/an1Sc1Bcoa9S3bCUhq89bRMgMIRGxVQdnYTC+1wvOSDsBgv0YYCTS
piP73e5IVw/ywgNAT9V9kkPC79iMyxTk9E4NafQ2Q/OgdxNsa+oY0oFT5m3Gj7jH
RhVe+di0Vtm5ueRFxE7p1yIz0hTgKsd9j7sslFNCjboeJZD7IpxPu3p5yZ2nlt9H
N2ajl10AOb6FLuDMUkQ5uRAAVPiEW7ZE9y6ctdNAYB6jCCrShheJ5ryXcvzrJbmp
Wi9dD8XX8ATEGv0ikiN7erpfVlL5t4p867kCDQRcYyWoARAAmK9cFiEkxVwSCC4N
MkhWaX5pqsA8YIhuBuwJuKrA1FqsysNt4bURWEmLgYOsEsNGQIBPBZP7ywYezf+s
mNiIweASvX1X1CfKqUpghiSCOVu1qkhjVjBMMqwRoj/4gRRHyYfHVwhbtRvtwKOH
rW+gGcwOhWGyGQia+c0m7TYJuajaMa8+HcLzORg0hiNPutgzeAlsV9ft7VOKKQtS
R9gKD9fYrDxOD4v5K5dvQXyuOzUuyQqfG8UocKoRhB6Ml3eu3fWRkK3KIeiIa0Ls
ZZ2sNV9ffBoGvfOMQjhbuNPegV3LFCpUP18e3VSae7dX1MnSti08k255YDD1QvdP
6egabE+lNLUuOtGYeT9U0M8jOs2Kq1pUeIt0TDJ9t1CuEsnvgl2DabjZHKZXxerP
Q8/bG6wQLskTZt6Rh0vObqbE/VOFt885qLvZkxFIQCQbfBzlas3/jM0j5q2poOuD
MiuzsfEZ8P4y94l3ESJRzkuSIMQeAgLlR0ASVM19I4tNfjAr0yWMX5JSdh95yd0s
khRoKsoFmUcx1MOOS7YtECURai+IGxpf7EKR6cT55Tl+oSGjPjOKaiWWrpWkyy61
b1rXjMqmgzxXO9rBMWY/hc2Yp/EFZBoe+SyNoBHJm6hmyINQyICDSS3oqIhDBmeE
msUoPsRXtszfksalrjt+dOBOAvMAEQEAAYkCJQQYAQgADwUCXGMlqAIbDAUJC0c1
AAAKCRD1vosmfGpAbfO3D/9D5VBr0G1X21tGoesAoEGhQcxAnCNTBYH+4WhSNLSW
w08sCH8Q+NinCqV5/QCgIwsMcxidnszm+7//l667gmUu8hM66U2T+ZCZMUL1G/iX
htpeTWv6dNDFyvSXwXoSIHhGVuSO2q95OeCSkJpf5V13fczNLDzTSsidGCY18+0r
LxwA+c0skLHY4k/7TWPj2QBViKXrXCv7XhpCMwPJCoAa6p4JpzQ3FqbAwes839t7
3EeGpZsV+YyTKXgzt2odNiiraHv5/XyP7xxDUIhHn51r81bEaUSv6NtdAYU8dIsj
cMVt+xTNyKnPUaWwB3QCucZaPGBqwM5j/jKy/jAMN8ybnz01V5RWsJzf1nG0d+uH
aYsQZgppDSdVxvEgXGxnWZHcYjisLYntXNd8+frFOCs82kJeiqcpcciYiPOCSIjM
P62wGiwc4loeIhjukt9XhjEwQy+q1ty050a7fEGvFdJE05PQp3W4uee5YAjIG4gm
CC+Km7uqTrE8fItjWlDGeoShqif+tWDLoMoGFZWO3cYuhz8rfR3rb2QURW5mWevx
u4WYymbGlEc7z37qgJ4i8a6Qp1pjejMc0OLwyJyYP49dBh1Z4pJLjP4joqRDfO5z
gD8jnRhKlh/3ilmwZj5pzyLlaDV+P1PY0BnlHzp5Mj9xuZixx0/lc4kpHo9sWgPJ
Dw==
=MDRR
-----END PGP PUBLIC KEY BLOCK-----

367
gettext-runtime.spec Normal file
View File

@ -0,0 +1,367 @@
#
# spec file for package gettext-runtime
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pacname gettext
%bcond_with mini
Name: gettext-runtime
Version: 0.21.1
Release: 0
BuildRequires: gcc-c++
BuildRequires: libtool
# To get an updated linkdupes.sh (in case there are new dupes), temproarily enable:
#BuildRequires: fdupes
%if %{without mini}
BuildRequires: automake
BuildRequires: glib2-devel
BuildRequires: libxml2-devel
BuildRequires: perl-libintl-perl
BuildRequires: tcl
# bug437293
%ifarch ppc64
Obsoletes: gettext-64bit
%endif
#
#Rename done for openSUSE 11.0
Provides: gettext = %{version}
Obsoletes: gettext < %{version}
Conflicts: gettext-runtime-mini
Conflicts: gettext-tools-mini
%else
# to allow a prjconf preference which to take per build
Provides: gettext-runtime = %{version}
# rpm-build requires gettext-tools, but we will only just be building it
#!BuildIgnore: gettext-tools
%endif
Summary: Tools for Native Language Support (NLS)
License: GPL-3.0-or-later AND LGPL-2.0-or-later
Group: Development/Tools/Other
URL: https://www.gnu.org/software/gettext/
Source0: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz
Source1: https://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz.sig
Source2: suse-start-po-mode.el
Source3: gettext-linkdupes.sh
Source4: baselibs.conf
Source5: gettext-rpmlintrc
Source6: gettext-runtime.keyring
Patch0: gettext-0.12.1-sigfpe.patch
Patch1: gettext-0.19.3-fix-bashisms.patch
Patch2: gettext-0.12.1-gettextize.patch
Patch3: use-acinit-for-libtextstyle.patch
Patch4: gettext-po-mode.diff
Patch5: gettext-initialize_vars.patch
# PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de
Patch6: gettext-dont-test-gnulib.patch
Patch7: gettext-0.21-jdk17.patch
# PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com
Patch11: boo941629-unnessary-rpath-on-standard-path.patch
# PATCH-FIX-SUSE Bug boo#1106843
Patch13: reproducible.patch
# PATCH-FEATURE bsc#1165138
Patch14: 0001-msgcat-Add-feature-to-use-the-newest-po-file.patch
Patch15: 0002-msgcat-Merge-headers-when-use-first.patch
%description
This package contains the intl library as well as tools that ease the
creation and maintenance of message catalogs. It allows you to extract
strings from source code. The supplied Emacs mode (po-mode.el) helps
editing these catalogs (called PO files, for portable object) and
adding translations. A special compiler turns these PO files into
binary catalogs.
%package -n gettext-tools%{?with_mini:-mini}
Summary: Tools for Native Language Support (NLS)
License: LGPL-2.1-or-later
Group: Development/Tools/Other
Requires: %{name} = %{version}
Requires: xz
%if %{without mini}
Requires(post): info
Requires(preun):info
%endif
Provides: gettext-devel = %{version}
%if %{without mini}
# bug437293
%ifarch ppc64
Obsoletes: gettext-devel-64bit
%endif
#
Obsoletes: gettext-devel < %{version}
Conflicts: gettext-runtime-mini
Conflicts: gettext-tools-mini
%else
# to allow a prjconf preference which to take per build
Provides: gettext-tools = %{version}
%endif
# Several tools use bison-runtime text domain:
%if 0%{?suse_version}
Recommends: bison-lang
%endif
%description -n gettext-tools%{?with_mini:-mini}
This package contains the `intl' library as well as tools that ease the
creation and maintenance of message catalogs. With it you can extract
strings from source code. The supplied Emacs mode (po-mode.el) will aid
in editing these catalogs (called PO files, for portable object) and
add translations. A special compiler will turn these PO files into
binary catalogs.
%package tools-doc
Summary: HTML documentation and examples for gettext-runtime
License: GPL-3.0-or-later AND LGPL-2.0-or-later
Group: Documentation/HTML
BuildArch: noarch
%description tools-doc
This subpackage contains the HTML version of the gettext documentation
as well as project examples.
%if %{without mini}
%package -n libtextstyle0
Summary: Provides textstyling for console output
License: LGPL-2.1-or-later
Group: Development/Tools/Other
%description -n libtextstyle0
GNU libtextstyle provides an easy way to add styling to programs that produce output to a console or terminal emulator window.
It does this in a way that allows the end user to customize the styling using the industry standard, namely Cascading Style Sheets (CSS).
%package -n libtextstyle-devel
Summary: Devel package for libtextstyle
License: LGPL-2.1-or-later
Group: Development/Tools/Other
Requires: libtextstyle0 = %{version}
%description -n libtextstyle-devel
This package provides headers and static libraries for libtextstyle
%endif
%prep
%setup -q -n %{pacname}-%{version}
%patch0
%patch1 -p1
%patch2
%patch3 -p1
%patch4
%patch5
%patch6 -p1
%patch7 -p1
%patch11 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%build
%define _lto_cflags %{nil}
# expect a couple "You should update your `aclocal.m4' by running aclocal."
autoreconf -fiv
export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
export CXXFLAGS="$CFLAGS -Dgcc_is_lint"
export LDFLAGS="-lm"
%configure --disable-static $OPTS
%if %{with mini}
# Link statically to libtextstyle from libgettextlib.so
export CFLAGS="${CFLAGS} -fPIC"
export CXXFLAGS="${CXXFLAGS} -fPIC"
(cd libtextstyle; %configure --enable-static --disable-shared ${OPTS})
%endif
make %{?_smp_mflags} GMSGFMT=../src/msgfmt V=1
# use texinfo.tex supplied by the system (texinfo)
# make -C gettext-tools/doc gettext.pdf
%install
%define my_docdir %{_defaultdocdir}/%{name}
export LC_CTYPE=ISO-8859-15
%make_install docdir=%{my_docdir}
cp -pr AUTHORS NEWS README* %{buildroot}/%{my_docdir}
mkdir -p %{buildroot}/usr/share/emacs/site-lisp
install -m 644 %SOURCE2 %{buildroot}/usr/share/emacs/site-lisp
install -m 644 gettext-tools/emacs/po-compat.el %{buildroot}/usr/share/emacs/site-lisp
install -m 644 gettext-tools/emacs/po-mode.el %{buildroot}/usr/share/emacs/site-lisp
install -m 644 gettext-tools/emacs/start-po.el %{buildroot}/usr/share/emacs/site-lisp
#make -C gettext-tools/doc docdir=%%{buildroot}/%%{my_docdir} install-pdf
if [ -e %{buildroot}/%{_libdir}/preloadable_libintl.so ];then
chmod 755 %{buildroot}/%{_libdir}/preloadable_libintl.so
fi
# fix rpmlint invalid-lc-messages-dir:
rm -rf %{buildroot}/%_datadir/locale/en@{bold,}quot
%{find_lang} gettext-tools
%{find_lang} gettext-runtime
#remove unwanted stuff
rm -f %{buildroot}/usr/share/doc/packages/gettext/README.{mingw,vms,woe32}
rm -f %_datadir/%name/gettext.jar
rm -f %{buildroot}/%_libdir/libtextstyle.la
%if %{with mini}
rm -f %{buildroot}/usr/include/textstyle.h
rm -rf %{buildroot}/usr/include/textstyle
rm -rf %{buildroot}/usr/share/doc/packages/gettext-runtime-mini/libtextstyle_*.html
rm -f %{buildroot}/%_libdir/libtextstyle.a
rm -f %{buildroot}/%{_infodir}/libtextstyle.info
%endif
#find %%{buildroot} -maxdepth 2 -name '*html' -delete
# hardlink the dupes in the documentation:
cd %{buildroot}/%{my_docdir}/examples
sh %{SOURCE3}
# moved to gettext-java and gettext-csharp:
rm -rf *csharp* *java* ../javadoc* ../csharpdoc*
rm -f %{buildroot}%{_defaultdocdir}/%name/README.woe32
rm -f %{buildroot}%{_infodir}/dir
cd %{buildroot}/%{_mandir}/man3
echo ".so man3/dngettext.3" > dcngettext.3
echo ".so man3/dgettext.3" > dcgettext.3
%if %{without mini}
%check
# s390s fails this test,
# Starting test_recursive_lock ...test-lock: pthread_mutex_lock.c:66: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
# These fails randomly, remove them from Makefile
sed -i -e 's/test-areadlink\$(EXEEXT) //g' \
-e 's/test-readlink\$(EXEEXT) //g' \
gettext-tools/gnulib-tests/Makefile
make check || {
%ifarch s390x
echo "got this during mbuild testing on s390x (on both times which make check ran):"
echo "Starting test_recursive_lock ...test-lock: pthread_mutex_lock.c:66: __pthread_mutex_lock: Assertion mutex->__data.__owner == 0 failed."
echo "s390x needs kernel/glibc/gcc fix, but let it continue bootstrap for now!"
%else
echo "make check failed, check it!"
exit 5
%endif
}
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n gettext-tools%{?with_mini:-mini}
%install_info --info-dir=%{_infodir} %{_infodir}/gettext.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/autosprintf.info.gz
%preun -n gettext-tools%{?with_mini:-mini}
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gettext.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/autosprintf.info.gz
%if %{without mini}
%post -n libtextstyle0 -p /sbin/ldconfig
%postun -n libtextstyle0 -p /sbin/ldconfig
%endif
%files -f gettext-runtime.lang
%defattr(-,root,root)
%license COPYING
%dir %_datadir/gettext
%doc %dir %_docdir/%name/
%doc %_docdir/%name/gettext.1.html
%doc %_docdir/%name/ngettext.1.html
%doc %_docdir/%name/envsubst.1.html
%doc %_docdir/%name/*.3.html
%doc %_docdir/%name/AUTHORS
%doc %_docdir/%name/NEWS
%doc %_docdir/%name/README
%doc %_docdir/%name/FAQ.html
%_bindir/gettext
%_bindir/ngettext
%_bindir/envsubst
%_bindir/gettext.sh
%_bindir/msgfmt
%_libdir/libgettextlib-*.so
%_libdir/libgettextsrc-*.so
%_libdir/libasprintf.so.*
%doc %_mandir/man1/gettext.1.gz
%doc %_mandir/man1/ngettext.1.gz
%doc %_mandir/man1/envsubst.1.gz
%doc %_mandir/man1/msgfmt.1.gz
%doc %_mandir/man3/*
%_datadir/gettext/ABOUT-NLS
%dir %_datadir/emacs
%dir %_datadir/emacs/site-lisp
%_datadir/emacs/site-lisp/po-compat.*
%_datadir/emacs/site-lisp/po-mode.*
%_datadir/emacs/site-lisp/start-po.*
%_datadir/emacs/site-lisp/suse-start-po-mode.el
%files -n gettext-tools%{?with_mini:-mini} -f gettext-tools.lang
%defattr(-,root,root)
%_bindir/msg[a-eg-u]*
%_bindir/msgfilter
%_bindir/xgettext
%_bindir/gettextize
%_bindir/autopoint
%_bindir/recode-sr-latin
%doc %_mandir/man1/msg[a-eg-u]*.1.gz
%doc %_mandir/man1/msgfilter.1.gz
%doc %_mandir/man1/xgettext.1.gz
%doc %_mandir/man1/gettextize.1.gz
%doc %_mandir/man1/autopoint.1.gz
%doc %_mandir/man1/recode-sr-latin.1.gz
%doc %_infodir/gettext.info*
%doc %_infodir/autosprintf.info*
%_includedir/gettext-po.h
%_includedir/autosprintf.h
%_libdir/libasprintf.*a
%_libdir/libasprintf.so
%_libdir/libgettextlib.*
%_libdir/libgettextsrc.*
%_libdir/libgettextpo*
%_libdir/preloadable_libintl.so
%_libdir/gettext
%_datadir/%pacname/config.rpath
%_datadir/%pacname/po
%_datadir/%pacname/projects
%_datadir/%pacname/gettext.h
%_datadir/%pacname/msgunfmt.tcl
%_datadir/%pacname/javaversion.class
%_datadir/%pacname/styles
%_datadir/%pacname/archive.dir.tar.xz
%_datadir/aclocal
%dir %{_datadir}/%{pacname}-%{version}
%{_datadir}/%{pacname}-%{version}/its
%files tools-doc
%defattr(-,root,root)
%doc %dir %_docdir/%name/
%doc %_docdir/%name/examples/
%doc %_docdir/%name/auto*.html
%doc %_docdir/%name/gettext_*.html
%doc %_docdir/%name/gettextize*.html
%doc %_docdir/%name/msg*.html
%doc %_docdir/%name/tutorial*.html
%doc %_docdir/%name/xgettext*.html
%doc %_docdir/%name/recode-sr-latin.1.html
%if %{without mini}
%files -n libtextstyle0
%defattr(-,root,root)
%_libdir/libtextstyle.so.*
%files -n libtextstyle-devel
%defattr(-,root,root)
%dir %_includedir/textstyle
%_includedir/textstyle.h
%_includedir/textstyle/stdbool.h
%_includedir/textstyle/version.h
%_includedir/textstyle/woe32dll.h
%_libdir/libtextstyle.so
%doc %_docdir/gettext-runtime%{?with_mini:-mini}/libtextstyle*.html
%doc %_infodir/libtextstyle.info.gz
%endif
%changelog

6
pre_checkin.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# This script should be called before checkin.
sed -e 's/%bcond_with mini/%bcond_without mini/' \
-e '/^Name:/s/$/-mini/' \
gettext-runtime.spec > gettext-runtime-mini.spec
cp gettext-runtime.changes gettext-runtime-mini.changes

50
reproducible.patch Normal file
View File

@ -0,0 +1,50 @@
merged upstream <https://savannah.gnu.org/bugs/?54367>
Index: gettext-0.19.8.1/gettext-tools/src/xgettext.c
===================================================================
--- gettext-0.19.8.1.orig/gettext-tools/src/xgettext.c
+++ gettext-0.19.8.1/gettext-tools/src/xgettext.c
@@ -3714,6 +3714,9 @@ construct_header ()
char *msgstr;
char *comment;
static lex_pos_ty pos = { __FILE__, __LINE__ };
+ char *source_date_epoch;
+ unsigned long long epoch;
+ char *endptr;
if (package_name != NULL)
{
@@ -3734,7 +3738,31 @@ the MSGID_BUGS_ADDRESS variable there; o
specify an --msgid-bugs-address command line option.\n\
")));
- time (&now);
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ if (source_date_epoch) {
+ errno = 0;
+ epoch = strtoull(source_date_epoch, &endptr, 10);
+ if ((errno == ERANGE && (epoch == ULLONG_MAX || epoch == 0))
+ || (errno != 0 && epoch == 0)) {
+ fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n", strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ if (endptr == source_date_epoch) {
+ fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: No digits were found: %s\n", endptr);
+ exit(EXIT_FAILURE);
+ }
+ if (*endptr != '\0') {
+ fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: Trailing garbage: %s\n", endptr);
+ exit(EXIT_FAILURE);
+ }
+ if (epoch > ULONG_MAX) {
+ fprintf(stderr, "Environment variable $SOURCE_DATE_EPOCH: value must be smaller than or equal to %lu but was found to be: %llu \n", ULONG_MAX, epoch);
+ exit(EXIT_FAILURE);
+ }
+ now = epoch;
+ } else {
+ now = time(NULL);
+ }
timestring = po_strftime (&now);
msgstr = xasprintf ("\

23
suse-start-po-mode.el Normal file
View File

@ -0,0 +1,23 @@
;; /usr/share/emacs/site-lisp/suse-start-po-mode.el
(autoload 'po-mode "po-mode"
"Major mode for translators when they edit PO files.
Special commands:
\\{po-mode-map}
Turning on PO mode calls the value of the variable 'po-mode-hook',
if that value is non-nil. Behaviour may be adjusted through some variables,
all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'." t)
(setq auto-mode-alist (cons '("\\.po[tx]?\\'" . po-mode)
auto-mode-alist))
;; To automatically use proper fonts under Emacs 20, also add:
(unless (fboundp 'po-find-file-coding-system)
(autoload 'po-find-file-coding-system "po-compat" "\
Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
Called through file-coding-system-alist, before the file is visited for real."))
(modify-coding-system-alist 'file "\\.po[tx]?\\'"
'po-find-file-coding-system)
;; /usr/share/emacs/site-lisp/suse-start-po-mode.el ends here

View File

@ -0,0 +1,18 @@
Index: gettext-0.21.1/libtextstyle/configure.ac
===================================================================
--- gettext-0.21.1.orig/libtextstyle/configure.ac
+++ gettext-0.21.1/libtextstyle/configure.ac
@@ -17,11 +17,10 @@ dnl along with this program. If not, se
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
-AC_INIT
+AC_INIT([libtextstyle],
+ m4_esyscmd([source ./version.sh; echo $VERSION_NUMBER | tr -d '\n']))
AC_CONFIG_SRCDIR([version.sh])
AC_CONFIG_AUX_DIR([build-aux])
-. $srcdir/version.sh
-gl_INIT_PACKAGE([libtextstyle], [$VERSION_NUMBER])
AM_INIT_AUTOMAKE([1.13 silent-rules])
AC_CONFIG_HEADERS([config.h])