summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2019-02-27 13:26:35 +0100
committerMichael Haubenwallner <haubi@gentoo.org>2019-02-27 13:45:19 +0100
commit5787ea66fc8036852796a38227d3444ce125880d (patch)
treeac35daf123d80478a282fa93a8af4472623263b3
parentdev-libs/openssl: fix parallel install (#671602) (diff)
downloadprefix-5787ea66fc8036852796a38227d3444ce125880d.tar.gz
prefix-5787ea66fc8036852796a38227d3444ce125880d.tar.bz2
prefix-5787ea66fc8036852796a38227d3444ce125880d.zip
sys-devel/gettext: update cygwin patches
Package-Manager: Portage-2.3.55.1-prefix, Repoman-2.3.12 Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>
-rw-r--r--sys-devel/gettext/files/0.19.8.1-cygwin-ftm.patch11
-rw-r--r--sys-devel/gettext/files/0.19.8.1-no-woe32dll.patch95
-rw-r--r--sys-devel/gettext/files/0.19.8.1-tests-cygwin.patch89
-rw-r--r--sys-devel/gettext/gettext-0.19.8.1.ebuild9
4 files changed, 203 insertions, 1 deletions
diff --git a/sys-devel/gettext/files/0.19.8.1-cygwin-ftm.patch b/sys-devel/gettext/files/0.19.8.1-cygwin-ftm.patch
new file mode 100644
index 0000000000..23f88f0b56
--- /dev/null
+++ b/sys-devel/gettext/files/0.19.8.1-cygwin-ftm.patch
@@ -0,0 +1,11 @@
+--- origsrc/gettext-0.19.8.1/gettext-runtime/intl/libgnuintl.in.h 2016-06-09 17:56:00.000000000 -0500
++++ src/gettext-0.19.8.1/gettext-runtime/intl/libgnuintl.in.h 2016-10-20 11:03:43.187813700 -0500
+@@ -435,7 +435,7 @@ extern int vswprintf (wchar_t *, size_t,
+ extern char *setlocale (int, const char *);
+ #endif
+
+-#if @HAVE_NEWLOCALE@
++#if @HAVE_NEWLOCALE@ && __POSIX_VISIBLE >= 200809
+
+ #undef newlocale
+ #define newlocale libintl_newlocale
diff --git a/sys-devel/gettext/files/0.19.8.1-no-woe32dll.patch b/sys-devel/gettext/files/0.19.8.1-no-woe32dll.patch
new file mode 100644
index 0000000000..75bb0a1e1e
--- /dev/null
+++ b/sys-devel/gettext/files/0.19.8.1-no-woe32dll.patch
@@ -0,0 +1,95 @@
+Derived from Cygwin: gettext-0.19.8.1-2.src/0.19.8.1-no-woe32dll.patch
+
+--- origsrc/gettext-0.19.8.1/gettext-tools/configure.ac 2016-06-09 17:56:00.000000000 -0500
++++ src/gettext-0.19.8.1/gettext-tools/configure.ac 2016-10-10 02:10:37.323106300 -0500
+#@@ -100,7 +100,7 @@ LT_LANG([Windows Resource])
+ 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*) special_makefile_rules=woe32 ;;
++ mingw*) special_makefile_rules=woe32 ;;
+ os2*) special_makefile_rules=os2 ;;
+ *) special_makefile_rules=none ;;
+ esac
+#@@ -212,7 +212,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
+--- gettext-0.19.8.1/gettext-tools/configure
++++ gettext-0.19.8.1/gettext-tools/configure
+@@ -100,7 +100,7 @@
+
+
+ case "$host_os" in
+- mingw* | cygwin*) special_makefile_rules=woe32 ;;
++ mingw*) special_makefile_rules=woe32 ;;
+ os2*) special_makefile_rules=os2 ;;
+ *) special_makefile_rules=none ;;
+ esac
+@@ -100,7 +100,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
+@@ -100,7 +100,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
+--- origsrc/gettext-0.19.8.1/m4/woe32-dll.m4 2016-03-20 02:37:53.000000000 -0500
++++ src/gettext-0.19.8.1/m4/woe32-dll.m4 2016-10-10 02:11:04.906081600 -0500
+#@@ -30,7 +30,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"
+--- gettext-0.19.8.1/gettext-runtime/configure
++++ gettext-0.19.8.1/gettext-runtime/configure
+@@ -100,7 +100,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 :
+--- gettext-0.19.8.1/gettext-runtime/libasprintf/configure
++++ gettext-0.19.8.1/gettext-runtime/libasprintf/configure
+@@ -100,7 +100,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 :
+--- gettext-0.19.8.1/gettext-tools/configure
++++ gettext-0.19.8.1/gettext-tools/configure
+@@ -100,7 +100,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.8.1-tests-cygwin.patch b/sys-devel/gettext/files/0.19.8.1-tests-cygwin.patch
new file mode 100644
index 0000000000..38aefe9904
--- /dev/null
+++ b/sys-devel/gettext/files/0.19.8.1-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/gettext-0.19.8.1.ebuild b/sys-devel/gettext/gettext-0.19.8.1.ebuild
index b83c0f8a1d..d73a427485 100644
--- a/sys-devel/gettext/gettext-0.19.8.1.ebuild
+++ b/sys-devel/gettext/gettext-0.19.8.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Note: Keep version bumps in sync with dev-libs/libintl.
@@ -54,6 +54,13 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168
epatch "${FILESDIR}"/${PN}-0.19.8.1-format-security.patch
+ if use elibc_Cygwin; then
+ epatch "${FILESDIR}"/0.19.8.1-no-woe32dll.patch
+ epatch "${FILESDIR}"/0.19.3-localename.patch
+ epatch "${FILESDIR}"/0.19.8.1-tests-cygwin.patch
+ epatch "${FILESDIR}"/0.19.8.1-cygwin-ftm.patch
+ fi
+
# 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