commit: 05d0c1e3ce2ead29e47e72d20f48d96a17dafc7d
Author: Michael Haubenwallner <michael.haubenwallner <AT> ssi-schaefer
<DOT> com>
AuthorDate: Mon May 9 13:40:39 2016 +0000
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Mon May 9 13:40:39 2016 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=05d0c1e3
gettext-0.19.7: import Cygwin patches
sys-devel/gettext/files/0.18.1.1-no-woe32dll.patch | 102 +++++++++++++
sys-devel/gettext/files/0.19.3-localename.patch | 168 +++++++++++++++++++++
sys-devel/gettext/files/0.19.3-tests-cygwin.patch | 89 +++++++++++
.../gettext/files/0.19.7-gnulib-cygwin25.patch | 22 +++
sys-devel/gettext/gettext-0.19.7.ebuild | 6 +
5 files changed, 387 insertions(+)
diff --git a/sys-devel/gettext/files/0.18.1.1-no-woe32dll.patch
b/sys-devel/gettext/files/0.18.1.1-no-woe32dll.patch
new file mode 100644
index 0000000..f28a7a9
--- /dev/null
+++ b/sys-devel/gettext/files/0.18.1.1-no-woe32dll.patch
@@ -0,0 +1,102 @@
+Derived from Cygwin: gettext-0.19.7-1.src/0.18.1.1-no-woe32dll
+
+--- origsrc/gettext-0.18.1.1/gettext-tools/configure.ac 2010-06-06
15:04:04.000000000 -0500
++++ src/gettext-0.18.1.1/gettext-tools/configure.ac 2013-03-07
22:13:24.525723500 -0600
+#@@ -108,7 +108,7 @@ AC_SUBST([LTNOUNDEF])
+ dnl On mingw and Cygwin, we can activate special Makefile rules which add
+ dnl version information to the shared libraries and executables.
+ case "$host_os" in
+- mingw* | cygwin*) is_woe32=yes ;;
++ mingw*) is_woe32=yes ;;
+ *) is_woe32=no ;;
+ esac
+ AM_CONDITIONAL([WOE32], [test $is_woe32 = yes])
+#@@ -211,7 +211,7 @@ dnl must arrange to define the auxili
+ dnl exported variables _also_ in the static library.
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+- mingw* | cygwin*) is_woe32dll=yes ;;
++ mingw*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+--- origsrc/gettext-0.18.1.1/m4/woe32-dll.m4 2010-06-06 07:49:58.000000000
-0500
++++ src/gettext-0.18.1.1/m4/woe32-dll.m4 2013-03-07 23:33:34.183820200
-0600
+#@@ -29,7 +29,7 @@ AC_DEFUN([gl_WOE32_DLL],
+ [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+- mingw* | cygwin*)
++ mingw*)
+ AC_MSG_CHECKING([for auto-import of symbols])
+ AC_CACHE_VAL([gl_cv_ld_autoimport], [
+ gl_save_LDFLAGS="$LDFLAGS"
+--- gentoo/gettext-0.19.7/gettext-tools/configure
++++ gentoo/gettext-0.19.7/gettext-tools/configure
+@@ -9622,7 +9622,7 @@
+
+
+ case "$host_os" in
+- mingw* | cygwin*)
++ mingw*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for auto-import of
symbols" >&5
+ $as_echo_n "checking for auto-import of symbols... " >&6; }
+ if ${gl_cv_ld_autoimport+:} false; then :
+@@ -21863,7 +21863,7 @@
+
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+- mingw* | cygwin*) is_woe32dll=yes ;;
++ mingw*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+@@ -71977,7 +71977,7 @@
+
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+- mingw* | cygwin*) is_woe32dll=yes ;;
++ mingw*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+--- gentoo/gettext-0.19.7/gettext-runtime/configure
++++ gentoo/gettext-0.19.7/gettext-runtime/configure
+@@ -7286,7 +7286,7 @@
+
+
+ case "$host_os" in
+- mingw* | cygwin*)
++ mingw*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for auto-import of
symbols" >&5
+ $as_echo_n "checking for auto-import of symbols... " >&6; }
+ if ${gl_cv_ld_autoimport+:} false; then :
+@@ -19523,7 +19523,7 @@
+
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+- mingw* | cygwin*) is_woe32dll=yes ;;
++ mingw*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+@@ -31871,7 +31871,7 @@
+
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+- mingw* | cygwin*) is_woe32dll=yes ;;
++ mingw*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+--- gentoo/gettext-0.19.7/gettext-runtime/libasprintf/configure
++++ gentoo/gettext-0.19.7/gettext-runtime/libasprintf/configure
+@@ -5479,7 +5479,7 @@
+
+
+ case "$host_os" in
+- mingw* | cygwin*)
++ mingw*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for auto-import of
symbols" >&5
+ $as_echo_n "checking for auto-import of symbols... " >&6; }
+ if ${gl_cv_ld_autoimport+:} false; then :
diff --git a/sys-devel/gettext/files/0.19.3-localename.patch
b/sys-devel/gettext/files/0.19.3-localename.patch
new file mode 100644
index 0000000..0630292
--- /dev/null
+++ b/sys-devel/gettext/files/0.19.3-localename.patch
@@ -0,0 +1,168 @@
+--- origsrc/gettext-0.19.3/gettext-runtime/gnulib-lib/localename.c
2014-10-16 01:00:08.000000000 -0500
++++ src/gettext-0.19.3/gettext-runtime/gnulib-lib/localename.c 2014-11-17
23:22:47.747353600 -0600
+@@ -60,7 +60,7 @@
+ # endif
+ #endif
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++#if defined WINDOWS_NATIVE /* Native Windows */
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include <winnls.h>
+@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
+ #endif
+
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++#if defined WINDOWS_NATIVE /* Native Windows */
+
+ /* Canonicalize a Windows native locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+ #endif
+-#if defined __CYGWIN__
+- /* Cygwin.
+- Ignore dummy LANG value set by ~/.profile. */
+- if (strcmp (retval, "C.UTF-8") != 0)
+-#endif
+ return retval;
+ }
+
+@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
+ "C.UTF-8" locale, which operates in the same way as the "C" locale.
+ */
+
+-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined
WINDOWS_NATIVE || defined __CYGWIN__)
++#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined
WINDOWS_NATIVE)
+
+ /* The system does not have a way of setting the locale, other than the
+ POSIX specified environment variables. We use C as default locale. */
+@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
+
+ # endif
+
+-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++# if defined WINDOWS_NATIVE /* Native Windows */
+ {
+ LCID lcid;
+
+--- origsrc/gettext-0.19.3/gettext-runtime/intl/localename.c 2014-09-30
21:35:20.000000000 -0500
++++ src/gettext-0.19.3/gettext-runtime/intl/localename.c 2014-11-17
23:22:47.755854700 -0600
+@@ -60,7 +60,7 @@
+ # endif
+ #endif
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++#if defined WINDOWS_NATIVE_ /* Native Windows */
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include <winnls.h>
+@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
+ #endif
+
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++#if defined WINDOWS_NATIVE /* Native Windows */
+
+ /* Canonicalize a Windows native locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
+ However it does not specify the exact format. Neither do SUSV2 and
+ ISO C 99. So we can use this feature only on selected systems (e.g.
+ those using GNU C Library). */
+-#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined
__UCLIBC__)
++#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined
__UCLIBC__) || defined(__CYGWIN__)
+ # define HAVE_LOCALE_NULL
+ #endif
+
+@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+ #endif
+-#if defined __CYGWIN__
+- /* Cygwin.
+- Ignore dummy LANG value set by ~/.profile. */
+- if (strcmp (retval, "C.UTF-8") != 0)
+-#endif
+ return retval;
+ }
+
+@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
+ "C.UTF-8" locale, which operates in the same way as the "C" locale.
+ */
+
+-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined
WINDOWS_NATIVE || defined __CYGWIN__)
++#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined
WINDOWS_NATIVE)
+
+ /* The system does not have a way of setting the locale, other than the
+ POSIX specified environment variables. We use C as default locale. */
+@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
+
+ # endif
+
+-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++# if defined WINDOWS_NATIVE /* Native Windows */
+ {
+ LCID lcid;
+
+--- origsrc/gettext-0.19.3/gettext-tools/gnulib-lib/localename.c
2014-10-16 01:00:35.000000000 -0500
++++ src/gettext-0.19.3/gettext-tools/gnulib-lib/localename.c 2014-11-17
23:22:47.763355600 -0600
+@@ -60,7 +60,7 @@
+ # endif
+ #endif
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++#if defined WINDOWS_NATIVE_ /* Native Windows */
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include <winnls.h>
+@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
+ #endif
+
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++#if defined WINDOWS_NATIVE /* Native Windows */
+
+ /* Canonicalize a Windows native locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
+ However it does not specify the exact format. Neither do SUSV2 and
+ ISO C 99. So we can use this feature only on selected systems (e.g.
+ those using GNU C Library). */
+-#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined
__UCLIBC__)
++#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined
__UCLIBC__) || defined(__CYGWIN__)
+ # define HAVE_LOCALE_NULL
+ #endif
+
+@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+ #endif
+-#if defined __CYGWIN__
+- /* Cygwin.
+- Ignore dummy LANG value set by ~/.profile. */
+- if (strcmp (retval, "C.UTF-8") != 0)
+-#endif
+ return retval;
+ }
+
+@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
+ "C.UTF-8" locale, which operates in the same way as the "C" locale.
+ */
+
+-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined
WINDOWS_NATIVE || defined __CYGWIN__)
++#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined
WINDOWS_NATIVE)
+
+ /* The system does not have a way of setting the locale, other than the
+ POSIX specified environment variables. We use C as default locale. */
+@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
+
+ # endif
+
+-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin
*/
++# if defined WINDOWS_NATIVE /* Native Windows */
+ {
+ LCID lcid;
+
diff --git a/sys-devel/gettext/files/0.19.3-tests-cygwin.patch
b/sys-devel/gettext/files/0.19.3-tests-cygwin.patch
new file mode 100644
index 0000000..7d3eed2
--- /dev/null
+++ b/sys-devel/gettext/files/0.19.3-tests-cygwin.patch
@@ -0,0 +1,89 @@
+--- origsrc/gettext-0.19.3/gettext-tools/tests/format-c-3-prg.c
2013-05-31 00:01:54.000000000 -0500
++++ src/gettext-0.19.3/gettext-tools/tests/format-c-3-prg.c 2014-11-17
23:26:21.975557100 -0600
+@@ -34,7 +34,7 @@
+ /* Disable the override of setlocale that libgnuintl.h activates on MacOS X
+ and Windows. This test relies on the fake setlocale function in
+ setlocale.c. */
+-#undef setlocale
++/* #undef setlocale */
+
+ #define _(string) gettext (string)
+
+--- origsrc/gettext-0.19.3/gettext-tools/tests/format-c-4-prg.c
2013-05-31 00:01:54.000000000 -0500
++++ src/gettext-0.19.3/gettext-tools/tests/format-c-4-prg.c 2014-11-17
23:26:21.979557600 -0600
+@@ -34,7 +34,7 @@
+ /* Disable the override of setlocale that libgnuintl.h activates on MacOS X
+ and Windows. This test relies on the fake setlocale function in
+ setlocale.c. */
+-#undef setlocale
++/* #undef setlocale */
+
+ #define _(string) gettext (string)
+
+--- origsrc/gettext-0.19.3/gettext-tools/tests/plural-1 2014-04-14
20:52:11.000000000 -0500
++++ src/gettext-0.19.3/gettext-tools/tests/plural-1 2014-11-17
23:26:21.983058100 -0600
+@@ -50,15 +50,15 @@ ${DIFF} plural-1-fr.po.strip plural-1-fr
+
+ : ${DIFF=diff}
+ echo 'un morceau de gateau' > plural-1-cake.ok
+-LANGUAGE= ../cake fr 1 > plural-1-cake.tmp || exit 1
++LANGUAGE= ../cake fr_FR 1 > plural-1-cake.tmp || exit 1
+ LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1
+ ${DIFF} plural-1-cake.ok cake.out || exit 1
+ echo '2 morceaux de gateau' > plural-1-cake.ok
+-LANGUAGE= ../cake fr 2 > plural-1-cake.tmp || exit 1
++LANGUAGE= ../cake fr_FR 2 > plural-1-cake.tmp || exit 1
+ LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1
+ ${DIFF} plural-1-cake.ok cake.out || exit 1
+ echo '10 morceaux de gateau' > plural-1-cake.ok
+-LANGUAGE= ../cake fr 10 > plural-1-cake.tmp || exit 1
++LANGUAGE= ../cake fr_FR 10 > plural-1-cake.tmp || exit 1
+ LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1
+ ${DIFF} plural-1-cake.ok cake.out || exit 1
+
+--- origsrc/gettext-0.19.3/gettext-tools/tests/plural-1-prg.c 2013-05-31
00:01:54.000000000 -0500
++++ src/gettext-0.19.3/gettext-tools/tests/plural-1-prg.c 2014-11-17
23:26:21.989058800 -0600
+@@ -30,7 +30,7 @@
+ /* Disable the override of setlocale that libgnuintl.h activates on MacOS X
+ and Windows. This test relies on the fake setlocale function in
+ setlocale.c. */
+-#undef setlocale
++/* #undef setlocale */
+
+ int
+ main (int argc, char *argv[])
+--- origsrc/gettext-0.19.3/gettext-tools/tests/plural-2 2014-04-14
20:52:11.000000000 -0500
++++ src/gettext-0.19.3/gettext-tools/tests/plural-2 2014-11-17
23:25:50.637077600 -0600
+@@ -3,8 +3,8 @@
+
+ : ${MSGFMT=msgfmt}
+ test -d plural-2-dir || mkdir plural-2-dir
+-test -d plural-2-dir/ll || mkdir plural-2-dir/ll
+-test -d plural-2-dir/ll/LC_MESSAGES || mkdir plural-2-dir/ll/LC_MESSAGES
++test -d plural-2-dir/es || mkdir plural-2-dir/es
++test -d plural-2-dir/es/LC_MESSAGES || mkdir plural-2-dir/es/LC_MESSAGES
+
+ cat <<EOF > plural-2.data
+ ja
+@@ -44,7 +44,7 @@ EOF
+ while read lang; do
+ read formula
+ read dataok
+- cat > plural-2-ll.po <<EOF
++ cat > plural-2-es.po <<EOF
+ msgid ""
+ msgstr ""
+ "MIME-Version: 1.0\n"
+@@ -65,10 +65,10 @@ msgstr[7] "7"
+ msgstr[8] "8"
+ msgstr[9] "9"
+ EOF
+- ${MSGFMT} -o plural-2-dir/ll/LC_MESSAGES/plural.mo plural-2-ll.po || exit 1
++ ${MSGFMT} -o plural-2-dir/es/LC_MESSAGES/plural.mo plural-2-es.po || exit 1
+ (for i in '' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19; do
+ LANGUAGE= TEXTDOMAIN=plural TEXTDOMAINDIR=plural-2-dir \
+- $NGETTEXT --env LC_ALL=ll X Y ${i}0 ${i}1 ${i}2 ${i}3 ${i}4 ${i}5
${i}6 ${i}7 ${i}8 ${i}9
++ $NGETTEXT --env LC_ALL=es_ES X Y ${i}0 ${i}1 ${i}2 ${i}3 ${i}4 ${i}5
${i}6 ${i}7 ${i}8 ${i}9
+ done) > dataout
+ test "$dataok" = `cat dataout` || {
+ echo "Formula evaluation error for language $lang" 1>&2
diff --git a/sys-devel/gettext/files/0.19.7-gnulib-cygwin25.patch
b/sys-devel/gettext/files/0.19.7-gnulib-cygwin25.patch
new file mode 100644
index 0000000..e2e6954
--- /dev/null
+++ b/sys-devel/gettext/files/0.19.7-gnulib-cygwin25.patch
@@ -0,0 +1,22 @@
+https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00057.html
+
+--- origsrc/gettext-0.19.7/gettext-tools/gnulib-lib/sys_select.in.h
2015-12-27 17:08:31.000000000 -0600
++++ src/gettext-0.19.7/gettext-tools/gnulib-lib/sys_select.in.h
2016-05-04 10:07:56.425638400 -0500
+@@ -82,7 +82,7 @@
+ Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
+ in <sys/time.h>.
+ But avoid namespace pollution on glibc systems. */
+-# ifndef __GLIBC__
++# if !(defined __GLIBC__ || defined __NEWLIB__)
+ # include <sys/time.h>
+ # endif
+
+@@ -103,7 +103,7 @@
+ But avoid namespace pollution on glibc systems.
+ Do this after the include_next (for the sake of OpenBSD 5.0) but before
+ the split double-inclusion guard (for the sake of Solaris). */
+-#if !(defined __GLIBC__ && !defined __UCLIBC__)
++#if !((defined __GLIBC__ || defined __NEWLIB__) && !defined __UCLIBC__)
+ # include <signal.h>
+ #endif
+
diff --git a/sys-devel/gettext/gettext-0.19.7.ebuild
b/sys-devel/gettext/gettext-0.19.7.ebuild
index 77d493c..ba8005d 100644
--- a/sys-devel/gettext/gettext-0.19.7.ebuild
+++ b/sys-devel/gettext/gettext-0.19.7.ebuild
@@ -49,6 +49,12 @@ pkg_setup() {
src_prepare() {
java-pkg-opt-2_src_prepare
+ # Cygwin patches
+ epatch "${FILESDIR}"/0.18.1.1-no-woe32dll.patch
+ epatch "${FILESDIR}"/0.19.3-localename.patch
+ epatch "${FILESDIR}"/0.19.3-tests-cygwin.patch
+ epatch "${FILESDIR}"/0.19.7-gnulib-cygwin25.patch
+
# this script uses syntax that Solaris /bin/sh doesn't grok
sed -i -e '1c\#!/usr/bin/env sh' \
gettext-tools/misc/convert-archive.in || die