Sync from SUSE:SLFO:Main gettext-runtime revision 38d21bf8c4e5a3a5e5e0cc6a00d60593
This commit is contained in:
commit
8d6587d89d
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
399
0001-msgcat-Add-feature-to-use-the-newest-po-file.patch
Normal file
399
0001-msgcat-Add-feature-to-use-the-newest-po-file.patch
Normal 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
|
||||
}
|
304
0002-msgcat-Merge-headers-when-use-first.patch
Normal file
304
0002-msgcat-Merge-headers-when-use-first.patch
Normal 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
6
_multibuild
Normal 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
4
baselibs.conf
Normal file
@ -0,0 +1,4 @@
|
||||
gettext-runtime
|
||||
obsoletes "gettext-<targettype> <= <version>"
|
||||
provides "gettext-<targettype> = <version>"
|
||||
libtextstyle0
|
15
boo941629-unnessary-rpath-on-standard-path.patch
Normal file
15
boo941629-unnessary-rpath-on-standard-path.patch
Normal 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
|
25
gettext-0.12.1-gettextize.patch
Normal file
25
gettext-0.12.1-gettextize.patch
Normal 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
|
47
gettext-0.12.1-sigfpe.patch
Normal file
47
gettext-0.12.1-sigfpe.patch
Normal 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;
|
17
gettext-0.19.3-fix-bashisms.patch
Normal file
17
gettext-0.19.3-fix-bashisms.patch
Normal 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
144
gettext-0.21-jdk17.patch
Normal 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
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
16
gettext-0.21.1.tar.xz.sig
Normal 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
595
gettext-csharp.changes
Normal 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
143
gettext-csharp.spec
Normal 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
|