Add gettext 0.19.8.1

Patches:
120 - updated to apply cleanly
140,150 - removed, now upstream

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2017-01-22 15:53:40 -08:00
parent bec4647426
commit d0569d322b
4 changed files with 309 additions and 1 deletions

View File

@ -6,9 +6,14 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW
config GETTEXT_V_0_19_8_1
bool
prompt "0.19.8.1"
config GETTEXT_V_0_19_7
bool
prompt "0.19.7"
prompt "0.19.7 (OBSOLETE)"
depends on OBSOLETE
endchoice
@ -16,4 +21,5 @@ config GETTEXT_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
default "0.19.8.1" if GETTEXT_V_0_19_8_1
default "0.19.7" if GETTEXT_V_0_19_7

View File

@ -0,0 +1,31 @@
From a76649dae62768d0af7017b3fc0ca5f891588c78 Mon Sep 17 00:00:00 2001
From: Andoni Morales Alastruey <ylatuya@gmail.com>
Date: Wed, 29 Feb 2012 10:44:43 +0100
Subject: [PATCH] Fix linker error: redefinition of vasprintf
This might not be the best patch, but it works for us
The link error was:
.libs/autosprintf.o:autosprintf.cc:(.text$vasprintf[_vasprintf]+0x0): multiple definition of `_vasprintf'
.libs/lib-asprintf.o:lib-asprintf.c:(.text+0x4621): first defined here
---
gettext-runtime/libasprintf/autosprintf.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gettext-runtime/libasprintf/autosprintf.cc b/gettext-runtime/libasprintf/autosprintf.cc
index ca318f7..2526210 100644
--- a/gettext-runtime/libasprintf/autosprintf.cc
+++ b/gettext-runtime/libasprintf/autosprintf.cc
@@ -19,8 +19,10 @@
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
+#ifndef _WIN32
# define _GNU_SOURCE 1
#endif
+#endif
/* Specification. */
#include "autosprintf.h"
--
1.8.4

View File

@ -0,0 +1,199 @@
From d4ecf6f15ad7a428786df2efdc88b03be0a4fdbb Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
Date: Thu, 17 Jan 2013 18:33:40 +0900
Subject: [PATCH] Fix Woe32 link errors when compiling with -O0.
---
gettext-tools/src/Makefile.am | 24 ++++++++++++++++++++++--
gettext-tools/src/color.c | 1 +
gettext-tools/woe32dll/c++color.cc | 1 +
gettext-tools/woe32dll/c++file-ostream.cc | 2 ++
gettext-tools/woe32dll/c++html-ostream.cc | 1 +
gettext-tools/woe32dll/c++styled-ostream.cc | 1 +
gettext-tools/woe32dll/c++term-ostream.cc | 1 +
gettext-tools/woe32dll/c++write-catalog.cc | 1 +
gettext-tools/woe32dll/c++write-po.cc | 1 +
gettext-tools/woe32dll/c++write-properties.cc | 1 +
gettext-tools/woe32dll/c++write-stringtable.cc | 1 +
gnulib-local/modules/file-ostream | 4 ++++
gnulib-local/modules/html-ostream | 4 ++++
gnulib-local/modules/ostream | 4 ++++
gnulib-local/modules/styled-ostream | 4 ++++
gnulib-local/modules/term-ostream | 4 ++++
16 files changed, 53 insertions(+), 2 deletions(-)
create mode 100644 gettext-tools/woe32dll/c++color.cc
create mode 100644 gettext-tools/woe32dll/c++file-ostream.cc
create mode 100644 gettext-tools/woe32dll/c++html-ostream.cc
create mode 100644 gettext-tools/woe32dll/c++styled-ostream.cc
create mode 100644 gettext-tools/woe32dll/c++term-ostream.cc
create mode 100644 gettext-tools/woe32dll/c++write-catalog.cc
create mode 100644 gettext-tools/woe32dll/c++write-po.cc
create mode 100644 gettext-tools/woe32dll/c++write-properties.cc
create mode 100644 gettext-tools/woe32dll/c++write-stringtable.cc
Additional fix (COLOR_SOURCE) by Ray Donnelly <mingw.android@gmail.com>
Regenerated for 0.19.8.1 by Alexey Neyman <stilor@att.net>
diff -urpN gettext-0.19.8.1.orig/gettext-tools/src/color.c gettext-0.19.8.1/gettext-tools/src/color.c
--- gettext-0.19.8.1.orig/gettext-tools/src/color.c 2017-01-23 15:13:25.448209511 -0800
+++ gettext-0.19.8.1/gettext-tools/src/color.c 2017-01-23 15:13:53.168490941 -0800
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include "ostream.h"
#include "term-ostream.h"
#include "xalloc.h"
#include "relocatable.h"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/src/Makefile.am gettext-0.19.8.1/gettext-tools/src/Makefile.am
--- gettext-0.19.8.1.orig/gettext-tools/src/Makefile.am 2017-01-23 15:13:25.452209551 -0800
+++ gettext-0.19.8.1/gettext-tools/src/Makefile.am 2017-01-23 15:13:53.168490941 -0800
@@ -145,10 +145,26 @@ FORMAT_SOURCE += \
format-lua.c \
format-javascript.c
+if !WOE32DLL
+COLOR_SOURCE = color.c
+OUTPUT_SOURCE = \
+ write-catalog.c \
+ write-properties.c \
+ write-stringtable.c \
+ write-po.c
+else
+COLOR_SOURCE = ../woe32dll/c++color.cc
+OUTPUT_SOURCE = \
+ ../woe32dll/c++write-catalog.cc \
+ ../woe32dll/c++write-properties.cc \
+ ../woe32dll/c++write-stringtable.cc \
+ ../woe32dll/c++write-po.cc
+endif
+
# libgettextsrc contains all code that is needed by at least two programs.
libgettextsrc_la_SOURCES = \
$(COMMON_SOURCE) read-catalog.c \
-color.c write-catalog.c write-properties.c write-stringtable.c write-po.c \
+$(COLOR_SOURCE) $(OUTPUT_SOURCE) \
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 \
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++color.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++color.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++color.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++color.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../src/color.c"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++file-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++file-ostream.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++file-ostream.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++file-ostream.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1,2 @@
+#include "../gnulib-lib/file-ostream.c"
+
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++html-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++html-ostream.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++html-ostream.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++html-ostream.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../gnulib-lib/html-ostream.c"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++styled-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++styled-ostream.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++styled-ostream.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++styled-ostream.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../gnulib-lib/styled-ostream.c"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++term-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++term-ostream.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++term-ostream.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++term-ostream.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../gnulib-lib/term-ostream.c"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-catalog.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-catalog.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-catalog.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-catalog.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../src/write-catalog.c"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-po.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-po.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-po.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-po.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../src/write-po.c"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-properties.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-properties.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-properties.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-properties.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../src/write-properties.c"
diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-stringtable.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-stringtable.cc
--- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-stringtable.cc 1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-stringtable.cc 2017-01-23 15:13:53.168490941 -0800
@@ -0,0 +1 @@
+#include "../src/write-stringtable.c"
diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/file-ostream gettext-0.19.8.1/gnulib-local/modules/file-ostream
--- gettext-0.19.8.1.orig/gnulib-local/modules/file-ostream 2017-01-23 15:13:25.060205571 -0800
+++ gettext-0.19.8.1/gnulib-local/modules/file-ostream 2017-01-23 15:13:53.168490941 -0800
@@ -12,7 +12,11 @@ xalloc
configure.ac:
Makefile.am:
+if !WOE32DLL
lib_SOURCES += file-ostream.c
+else
+lib_SOURCES += ../woe32dll/c++file-ostream.cc
+endif
# This is a Makefile rule that generates multiple files at once; see the
# automake documentation, node "Multiple Outputs", for details.
file-ostream.h : $(top_srcdir)/build-aux/moopp file-ostream.oo.h file-ostream.oo.c ostream.oo.h
diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/html-ostream gettext-0.19.8.1/gnulib-local/modules/html-ostream
--- gettext-0.19.8.1.orig/gnulib-local/modules/html-ostream 2017-01-23 15:13:25.060205571 -0800
+++ gettext-0.19.8.1/gnulib-local/modules/html-ostream 2017-01-23 15:13:53.168490941 -0800
@@ -15,7 +15,11 @@ xalloc
configure.ac:
Makefile.am:
+if !WOE32DLL
lib_SOURCES += html-ostream.c
+else
+lib_SOURCES += ../woe32dll/c++html-ostream.cc
+endif
# This is a Makefile rule that generates multiple files at once; see the
# automake documentation, node "Multiple Outputs", for details.
html-ostream.h : $(top_srcdir)/build-aux/moopp html-ostream.oo.h html-ostream.oo.c ostream.oo.h
diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/ostream gettext-0.19.8.1/gnulib-local/modules/ostream
--- gettext-0.19.8.1.orig/gnulib-local/modules/ostream 2017-01-23 15:13:25.060205571 -0800
+++ gettext-0.19.8.1/gnulib-local/modules/ostream 2017-01-23 15:13:53.168490941 -0800
@@ -11,7 +11,11 @@ moo
configure.ac:
Makefile.am:
+if !WOE32DLL
lib_SOURCES += ostream.c
+else
+lib_SOURCES += ../woe32dll/c++ostream.cc
+endif
# This is a Makefile rule that generates multiple files at once; see the
# automake documentation, node "Multiple Outputs", for details.
ostream.h : $(top_srcdir)/build-aux/moopp ostream.oo.h ostream.oo.c
diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/styled-ostream gettext-0.19.8.1/gnulib-local/modules/styled-ostream
--- gettext-0.19.8.1.orig/gnulib-local/modules/styled-ostream 2017-01-23 15:13:25.060205571 -0800
+++ gettext-0.19.8.1/gnulib-local/modules/styled-ostream 2017-01-23 15:13:53.168490941 -0800
@@ -11,7 +11,11 @@ ostream
configure.ac:
Makefile.am:
+if !WOE32DLL
lib_SOURCES += styled-ostream.c
+else
+lib_SOURCES += ../woe32dll/c++styled-ostream.cc
+endif
# This is a Makefile rule that generates multiple files at once; see the
# automake documentation, node "Multiple Outputs", for details.
styled-ostream.h : $(top_srcdir)/build-aux/moopp styled-ostream.oo.h styled-ostream.oo.c ostream.oo.h
diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/term-ostream gettext-0.19.8.1/gnulib-local/modules/term-ostream
--- gettext-0.19.8.1.orig/gnulib-local/modules/term-ostream 2017-01-23 15:13:25.060205571 -0800
+++ gettext-0.19.8.1/gnulib-local/modules/term-ostream 2017-01-23 15:13:53.172490983 -0800
@@ -22,7 +22,11 @@ configure.ac:
gl_TERM_OSTREAM
Makefile.am:
+if !WOE32DLL
lib_SOURCES += term-ostream.c
+else
+lib_SOURCES += ../woe32dll/c++term-ostream.cc
+endif
# This is a Makefile rule that generates multiple files at once; see the
# automake documentation, node "Multiple Outputs", for details.
term-ostream.h : $(top_srcdir)/build-aux/moopp term-ostream.oo.h term-ostream.oo.c ostream.oo.h

View File

@ -0,0 +1,72 @@
diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-lib/execute.c gettext-0.19.6/gettext-tools/gnulib-lib/execute.c
--- gettext-0.19.6.orig/gettext-tools/gnulib-lib/execute.c 2015-10-24 16:54:39.310372500 +0100
+++ gettext-0.19.6/gettext-tools/gnulib-lib/execute.c 2015-10-24 16:55:35.261954100 +0100
@@ -52,7 +52,7 @@
__cygwin_environ variable on cygwin64:
<https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */
#if defined __CYGWIN__ && defined __x86_64__
-extern DLL_VARIABLE char **environ;
+extern __attribute__((dllimport)) char **environ;
#endif
diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-lib/spawn-pipe.c gettext-0.19.6/gettext-tools/gnulib-lib/spawn-pipe.c
--- gettext-0.19.6.orig/gettext-tools/gnulib-lib/spawn-pipe.c 2015-09-11 04:03:56.000000000 +0100
+++ gettext-0.19.6/gettext-tools/gnulib-lib/spawn-pipe.c 2015-10-24 16:56:00.885918100 +0100
@@ -52,7 +52,7 @@
__cygwin_environ variable on cygwin64:
<https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */
#if defined __CYGWIN__ && defined __x86_64__
-extern DLL_VARIABLE char **environ;
+extern __attribute__((dllimport)) char **environ;
#endif
diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-tests/test-environ.c gettext-0.19.6/gettext-tools/gnulib-tests/test-environ.c
--- gettext-0.19.6.orig/gettext-tools/gnulib-tests/test-environ.c 2015-09-11 04:03:58.000000000 +0100
+++ gettext-0.19.6/gettext-tools/gnulib-tests/test-environ.c 2015-10-24 16:56:51.519198900 +0100
@@ -26,7 +26,7 @@
__cygwin_environ variable on cygwin64:
<https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */
#if defined __CYGWIN__ && defined __x86_64__
-extern DLL_VARIABLE char **environ;
+extern __attribute__((dllimport)) char **environ;
#endif
int
diff -urN gettext-0.19.6.orig/gnulib-local/lib/execute.c.diff gettext-0.19.6/gnulib-local/lib/execute.c.diff
--- gettext-0.19.6.orig/gnulib-local/lib/execute.c.diff 2015-08-21 08:18:28.000000000 +0100
+++ gettext-0.19.6/gnulib-local/lib/execute.c.diff 2015-10-24 16:58:17.182285000 +0100
@@ -10,7 +10,7 @@
+ __cygwin_environ variable on cygwin64:
+ <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */
+#if defined __CYGWIN__ && defined __x86_64__
-+extern DLL_VARIABLE char **environ;
++extern __attribute__((dllimport)) char **environ;
+#endif
+
diff -urN gettext-0.19.6.orig/gnulib-local/lib/spawn-pipe.c.diff gettext-0.19.6/gnulib-local/lib/spawn-pipe.c.diff
--- gettext-0.19.6.orig/gnulib-local/lib/spawn-pipe.c.diff 2015-08-21 08:18:28.000000000 +0100
+++ gettext-0.19.6/gnulib-local/lib/spawn-pipe.c.diff 2015-10-24 16:58:11.741447300 +0100
@@ -10,7 +10,7 @@
+ __cygwin_environ variable on cygwin64:
+ <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */
+#if defined __CYGWIN__ && defined __x86_64__
-+extern DLL_VARIABLE char **environ;
++extern __attribute__((dllimport)) char **environ;
+#endif
+
diff -urN gettext-0.19.6.orig/gnulib-local/tests/test-environ.c.diff gettext-0.19.6/gnulib-local/tests/test-environ.c.diff
--- gettext-0.19.6.orig/gnulib-local/tests/test-environ.c.diff 2015-08-21 08:18:28.000000000 +0100
+++ gettext-0.19.6/gnulib-local/tests/test-environ.c.diff 2015-10-24 16:58:35.915765100 +0100
@@ -10,7 +10,7 @@
+ __cygwin_environ variable on cygwin64:
+ <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */
+#if defined __CYGWIN__ && defined __x86_64__
-+extern DLL_VARIABLE char **environ;
++extern __attribute__((dllimport)) char **environ;
+#endif
+
int