public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gettext/, sys-devel/gettext/files/
@ 2016-05-09 13:41 Michael Haubenwallner
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Haubenwallner @ 2016-05-09 13:41 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gettext/, sys-devel/gettext/files/
@ 2018-04-19 19:33 Fabian Groffen
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Groffen @ 2018-04-19 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     944205f846c562430015be2d118762d1280c239e
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 19 19:33:29 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Apr 19 19:33:29 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=944205f8

sys-devel/gettext: sync

Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/gettext/Manifest                         |   3 +-
 .../files/gettext-0.19.7-disable-libintl.patch     |  30 ++++
 .../files/gettext-0.19.8.1-format-security.patch   |  87 +++++++++++
 sys-devel/gettext/gettext-0.18.3.2.ebuild          | 163 --------------------
 sys-devel/gettext/gettext-0.19.3.ebuild            | 169 ---------------------
 sys-devel/gettext/gettext-0.19.8.1.ebuild          | 144 ++++++++++++++++++
 6 files changed, 262 insertions(+), 334 deletions(-)

diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest
index c7880b2ecb..d3eb9b6db9 100644
--- a/sys-devel/gettext/Manifest
+++ b/sys-devel/gettext/Manifest
@@ -1,3 +1,2 @@
-DIST gettext-0.18.3.2.tar.gz 16189249 BLAKE2B e91a4ebc71aafaac7f13a7271063904051c7fc1c1451f84487f50cc8328e93fdaaebc198e7c4a04faeb54e23afb0e3d9f7821d2269906e6d9e31bae148823eff SHA512 0cf8f2bb844b9d94f5e63a0f4bddc133e2388d103fd4189614d2fc157a94e27836ec399eb32ab69410e2214425676e6bc195bbf13238cc5ad32b454ec6e2b5ef
-DIST gettext-0.19.3.tar.gz 17414357 BLAKE2B b2b2085e8ee7339c6b6509807a9601163498edd9265f2ec899337943bd2c1394a905b01e8a9f44e7a57985cb11f4fdfe302ff9320dacf1da78fdc4fdb5e30fd9 SHA512 2ec02065b376cf9ec2b9d32328a7181d292ac940356a710f785450f37e03a8513e07d4b981824374671cfa2f60024e4649fc89ad79ee0adda87a8b9b63ad28e8
 DIST gettext-0.19.7.tar.gz 19235781 BLAKE2B 4c2cfcb0b21a66a9f8d2d57de7420e624a1235f97180ad5ac194a5eb629760a9cacc7f3966cdf893d7af86c1740d8bb2266c639ebe2664ea44f2c47a962a841a SHA512 7ba89074d3eddd0b4a5e2980e1ec74b53c49b7a04a1fa91c70c4bc11ce9c30415e4df9d79698148eaaed325fb4feb25a340a2e8e01fbe86b1a66b1376a4c9e3d
+DIST gettext-0.19.8.1.tar.gz 19704011 BLAKE2B 17dc7aad338a26d71b818fea51e46a47dccf14744ee575ce86b591becaea402e36d64dc018e1a84113c356122ffef367cf2fa424e51ebc9720350040b4960091 SHA512 073042fa2dc48804c58e76f036130a669e19612c25427b0ab14d0b366b549a63751bf3af03bfd0745d7c4f72497a4b2aab26a3cc6de83189ce111679073878e1

diff --git a/sys-devel/gettext/files/gettext-0.19.7-disable-libintl.patch b/sys-devel/gettext/files/gettext-0.19.7-disable-libintl.patch
new file mode 100644
index 0000000000..f51de34843
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.19.7-disable-libintl.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/564168
+Never build libintl since it's in dev-libs/libintl now.
+
+We can drop this if/when upstream fixes the configure flag handling:
+https://savannah.gnu.org/bugs/?48233
+
+--- a/gettext-runtime/configure
++++ b/gettext-runtime/configure
+@@ -20391,8 +20391,7 @@ $as_echo "$ac_res" >&6; }
+ 
+                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+-                && test "$PACKAGE" != gettext-runtime \
+-                && test "$PACKAGE" != gettext-tools; }; then
++                }; then
+           gt_use_preinstalled_gnugettext=yes
+         else
+                     LIBINTL=
+--- a/gettext-tools/configure
++++ b/gettext-tools/configure
+@@ -22746,8 +22746,7 @@ $as_echo "$ac_res" >&6; }
+ 
+                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+-                && test "$PACKAGE" != gettext-runtime \
+-                && test "$PACKAGE" != gettext-tools; }; then
++                }; then
+           gt_use_preinstalled_gnugettext=yes
+         else
+                     LIBINTL=

diff --git a/sys-devel/gettext/files/gettext-0.19.8.1-format-security.patch b/sys-devel/gettext/files/gettext-0.19.8.1-format-security.patch
new file mode 100644
index 0000000000..6af1604198
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.19.8.1-format-security.patch
@@ -0,0 +1,87 @@
+From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 19 Feb 2017 23:32:46 -0800
+Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues
+
+Fixed when compile with "-Wformat -Wformat-security -Werror=format-security":
+| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset':
+| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security]
+|                  fprintf (a_fp, str) ;
+
+And:
+gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
+       fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++-----
+ gettext-tools/gnulib-lib/libxml/timsort.h        |  2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
+index 617520f..100104b 100644
+--- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c
++++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
+@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent)
+         g_return_if_fail (a_fp && a_this);
+         str = cr_statement_ruleset_to_string (a_this, a_indent);
+         if (str) {
+-                fprintf (a_fp, str);
++                fprintf (a_fp, "%s", str);
+                 g_free (str);
+                 str = NULL;
+         }
+@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent)
+         str = cr_statement_charset_to_string (a_this,
+                                               a_indent) ;
+         if (str) {
+-                fprintf (a_fp, str) ;
++                fprintf (a_fp, "%s", str) ;
+                 g_free (str) ;
+                 str = NULL ;
+         }
+@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent)
+ 
+         str = cr_statement_at_page_rule_to_string (a_this, a_indent) ;
+         if (str) {
+-                fprintf (a_fp, str);
++                fprintf (a_fp, "%s", str);
+                 g_free (str) ;
+                 str = NULL ; 
+         }
+@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this,
+ 
+         str = cr_statement_media_rule_to_string (a_this, a_indent) ;
+         if (str) {
+-                fprintf (a_fp, str) ;
++                fprintf (a_fp, "%s", str) ;
+                 g_free (str) ;
+                 str = NULL ;
+         }
+@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp,
+ 
+         str = cr_statement_import_rule_to_string (a_this, a_indent) ;
+         if (str) {
+-                fprintf (a_fp, str) ;
++                fprintf (a_fp, "%s", str) ;
+                 g_free (str) ;
+                 str = NULL ;
+         }
+diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h
+index 795f272..443918a 100644
+--- a/gettext-tools/gnulib-lib/libxml/timsort.h
++++ b/gettext-tools/gnulib-lib/libxml/timsort.h
+@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size)
+     SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE));
+     if (tempstore == NULL)
+     {
+-      fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
++      fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size);
+       exit(1);
+     }
+     store->storage = tempstore;
+-- 
+2.10.2
+

diff --git a/sys-devel/gettext/gettext-0.18.3.2.ebuild b/sys-devel/gettext/gettext-0.18.3.2.ebuild
deleted file mode 100644
index 7d535a1466..0000000000
--- a/sys-devel/gettext/gettext-0.18.3.2.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gettext/gettext-0.18.3.2.ebuild,v 1.15 2014/06/18 20:47:33 mgorny Exp $
-
-EAPI="4"
-
-inherit flag-o-matic eutils multilib toolchain-funcs mono-env libtool java-pkg-opt-2 multilib-minimal
-
-DESCRIPTION="GNU locale utilities"
-HOMEPAGE="http://www.gnu.org/software/gettext/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3 LGPL-2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="acl -cvs doc emacs git java nls +cxx ncurses openmp static-libs elibc_glibc"
-
-# only runtime goes multilib
-DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	dev-libs/libxml2
-	dev-libs/expat
-	acl? ( virtual/acl )
-	ncurses? ( sys-libs/ncurses )
-	java? ( >=virtual/jdk-1.4 )"
-RDEPEND="${DEPEND}
-	!git? ( cvs? ( dev-vcs/cvs ) )
-	git? ( dev-vcs/git )
-	java? ( >=virtual/jre-1.4 )
-	abi_x86_32? (
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-		!<=app-emulation/emul-linux-x86-baselibs-20131008-r11
-	)"
-PDEPEND="emacs? ( app-emacs/po-mode )"
-
-MULTILIB_WRAPPED_HEADERS=(
-	# only installed for native ABI
-	/usr/include/gettext-po.h
-)
-
-src_prepare() {
-	java-pkg-opt-2_src_prepare
-	# this script uses syntax that Solaris /bin/sh doesn't grok
-	sed -i -e '1c\#!/usr/bin/env sh' \
-		"${S}"/gettext-tools/misc/convert-archive.in || die
-
-#	# work around problem in gnulib on OSX Lion, Mountain Lion and Mavericks
-#	if [[ ${CHOST} == *-darwin1[123] ]] ; then
-#		sed -i -e '/^#ifndef weak_alias$/a\# undef __stpncpy' \
-#			gettext-tools/gnulib-lib/stpncpy.c || die
-#		sed -i -e '/^# undef __stpncpy$/a\# undef stpncpy' \
-#			gettext-tools/gnulib-lib/stpncpy.c || die
-#	fi
-
-	epunt_cxx
-	elibtoolize
-}
-
-multilib_src_configure() {
-	local myconf=(
-		# switches common to runtime and top-level
-		--cache-file="${BUILD_DIR}"/config.cache
-		--docdir="${EPREFIX}/usr/share/doc/${PF}"
-
-		$(use_enable cxx libasprintf)
-		$(use_enable java)
-		$(use_enable static-libs static)
-	)
-
-	# Build with --without-included-gettext (on glibc systems)
-	if use elibc_glibc ; then
-		myconf+=(
-			--without-included-gettext
-			$(use_enable nls)
-		)
-	else
-		myconf+=(
-			--with-included-gettext
-			--enable-nls
-		)
-	fi
-	use cxx || export CXX=$(tc-getCC)
-
-	# Should be able to drop this hack in next release. #333887
-	tc-is-cross-compiler && export gl_cv_func_working_acl_get_file=yes
-
-	local ECONF_SOURCE=${S}
-	if ! multilib_is_native_abi ; then
-		# for non-native ABIs, we build runtime only
-		ECONF_SOURCE+=/gettext-runtime
-	else
-		# remaining switches
-		myconf+=(
-			# Emacs support is now in a separate package
-			--without-emacs
-			--without-lispdir
-			# glib depends on us so avoid circular deps
-			--with-included-glib
-			# libcroco depends on glib which ... ^^^
-			--with-included-libcroco
-			# this will _disable_ libunistring (since it is not bundled),
-			# see bug #326477
-			--with-included-libunistring
-
-			$(use_enable acl)
-			$(use_enable ncurses curses)
-			$(use_enable openmp)
-			$(use_with git)
-			$(usex git --without-cvs $(use_with cvs))
-		)
-	fi
-
-	econf "${myconf[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	if multilib_is_native_abi ; then
-		dosym msgfmt /usr/bin/gmsgfmt #43435
-		dobin gettext-tools/misc/gettextize
-
-		[[ ${USERLAND} == "BSD" ]] && gen_usr_ldscript -a intl
-	fi
-}
-
-multilib_src_install_all() {
-	use nls || rm -r "${ED}"/usr/share/locale
-	use static-libs || prune_libtool_files --all
-
-	rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
-
-	if use java ; then
-		java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar
-		rm -f "${ED}"/usr/share/${PN}/*.jar
-		rm -f "${ED}"/usr/share/${PN}/*.class
-		if use doc ; then
-			java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/javadoc2
-			rm -rf "${ED}"/usr/share/doc/${PF}/javadoc2
-		fi
-	fi
-
-	if use doc ; then
-		dohtml "${ED}"/usr/share/doc/${PF}/*.html
-	else
-		rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
-	fi
-	rm -f "${ED}"/usr/share/doc/${PF}/*.html
-
-	dodoc AUTHORS ChangeLog NEWS README THANKS
-}
-
-pkg_preinst() {
-	# older gettext's sometimes installed libintl ...
-	# need to keep the linked version or the system
-	# could die (things like sed link against it :/)
-	preserve_old_lib /{,usr/}$(get_libdir)/libintl$(get_libname 7)
-
-	java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
-	preserve_old_lib_notify /{,usr/}$(get_libdir)/libintl$(get_libname 7)
-}

diff --git a/sys-devel/gettext/gettext-0.19.3.ebuild b/sys-devel/gettext/gettext-0.19.3.ebuild
deleted file mode 100644
index 09eed01487..0000000000
--- a/sys-devel/gettext/gettext-0.19.3.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gettext/gettext-0.19.3.ebuild,v 1.1 2014/10/17 16:25:10 polynomial-c Exp $
-
-EAPI="4"
-
-inherit flag-o-matic eutils multilib toolchain-funcs mono-env libtool java-pkg-opt-2 multilib-minimal
-
-DESCRIPTION="GNU locale utilities"
-HOMEPAGE="http://www.gnu.org/software/gettext/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3 LGPL-2"
-SLOT="0"
-KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="acl -cvs doc emacs git java nls +cxx ncurses openmp static-libs elibc_glibc elibc_musl"
-
-if [[ ${PV} =~ _rc ]] ; then
-	SRC_URI="mirror://gnu-alpha/${PN}/${P/_/-}.tar.xz"
-	KEYWORDS=""
-	S="${WORKDIR}/${P/_/-}"
-fi
-
-# only runtime goes multilib
-DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
-	dev-libs/libxml2
-	dev-libs/expat
-	acl? ( virtual/acl )
-	ncurses? ( sys-libs/ncurses )
-	java? ( >=virtual/jdk-1.4 )"
-RDEPEND="${DEPEND}
-	!git? ( cvs? ( dev-vcs/cvs ) )
-	git? ( dev-vcs/git )
-	java? ( >=virtual/jre-1.4 )
-	abi_x86_32? (
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-		!<=app-emulation/emul-linux-x86-baselibs-20131008-r11
-	)"
-PDEPEND="emacs? ( app-emacs/po-mode )"
-
-MULTILIB_WRAPPED_HEADERS=(
-	# only installed for native ABI
-	/usr/include/gettext-po.h
-)
-
-src_prepare() {
-	java-pkg-opt-2_src_prepare
-	# this script uses syntax that Solaris /bin/sh doesn't grok
-	sed -i -e '1c\#!/usr/bin/env sh' \
-		"${S}"/gettext-tools/misc/convert-archive.in || die
-
-#	# work around problem in gnulib on OSX Lion, Mountain Lion and Mavericks
-#	if [[ ${CHOST} == *-darwin1[123] ]] ; then
-#		sed -i -e '/^#ifndef weak_alias$/a\# undef __stpncpy' \
-#			gettext-tools/gnulib-lib/stpncpy.c || die
-#		sed -i -e '/^# undef __stpncpy$/a\# undef stpncpy' \
-#			gettext-tools/gnulib-lib/stpncpy.c || die
-#	fi
-
-	epunt_cxx
-	elibtoolize
-}
-
-multilib_src_configure() {
-	local myconf=(
-		# switches common to runtime and top-level
-		--cache-file="${BUILD_DIR}"/config.cache
-		--docdir="${EPREFIX}/usr/share/doc/${PF}"
-
-		$(use_enable cxx libasprintf)
-		$(use_enable java)
-		$(use_enable static-libs static)
-	)
-
-	# Build with --without-included-gettext (on glibc systems)
-	if use elibc_glibc || use elibc_musl ; then
-		myconf+=(
-			--without-included-gettext
-			$(use_enable nls)
-		)
-	else
-		myconf+=(
-			--with-included-gettext
-			--enable-nls
-		)
-	fi
-	use cxx || export CXX=$(tc-getCC)
-
-	# Should be able to drop this hack in next release. #333887
-	tc-is-cross-compiler && export gl_cv_func_working_acl_get_file=yes
-
-	local ECONF_SOURCE=${S}
-	if ! multilib_is_native_abi ; then
-		# for non-native ABIs, we build runtime only
-		ECONF_SOURCE+=/gettext-runtime
-	else
-		# remaining switches
-		myconf+=(
-			# Emacs support is now in a separate package
-			--without-emacs
-			--without-lispdir
-			# glib depends on us so avoid circular deps
-			--with-included-glib
-			# libcroco depends on glib which ... ^^^
-			--with-included-libcroco
-			# this will _disable_ libunistring (since it is not bundled),
-			# see bug #326477
-			--with-included-libunistring
-
-			$(use_enable acl)
-			$(use_enable ncurses curses)
-			$(use_enable openmp)
-			$(use_with git)
-			$(usex git --without-cvs $(use_with cvs))
-		)
-	fi
-
-	econf "${myconf[@]}"
-}
-
-multilib_src_install() {
-	default
-
-	if multilib_is_native_abi ; then
-		dosym msgfmt /usr/bin/gmsgfmt #43435
-		dobin gettext-tools/misc/gettextize
-
-		[[ ${USERLAND} == "BSD" ]] && gen_usr_ldscript -a intl
-	fi
-}
-
-multilib_src_install_all() {
-	use nls || rm -r "${ED}"/usr/share/locale
-	use static-libs || prune_libtool_files --all
-
-	rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
-
-	if use java ; then
-		java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar
-		rm -f "${ED}"/usr/share/${PN}/*.jar
-		rm -f "${ED}"/usr/share/${PN}/*.class
-		if use doc ; then
-			java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/javadoc2
-			rm -rf "${ED}"/usr/share/doc/${PF}/javadoc2
-		fi
-	fi
-
-	if use doc ; then
-		dohtml "${ED}"/usr/share/doc/${PF}/*.html
-	else
-		rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
-	fi
-	rm -f "${ED}"/usr/share/doc/${PF}/*.html
-
-	dodoc AUTHORS ChangeLog NEWS README THANKS
-}
-
-pkg_preinst() {
-	# older gettext's sometimes installed libintl ...
-	# need to keep the linked version or the system
-	# could die (things like sed link against it :/)
-	preserve_old_lib /{,usr/}$(get_libdir)/libintl$(get_libname 7)
-
-	java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
-	preserve_old_lib_notify /{,usr/}$(get_libdir)/libintl$(get_libname 7)
-}

diff --git a/sys-devel/gettext/gettext-0.19.8.1.ebuild b/sys-devel/gettext/gettext-0.19.8.1.ebuild
new file mode 100644
index 0000000000..b83c0f8a1d
--- /dev/null
+++ b/sys-devel/gettext/gettext-0.19.8.1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: Keep version bumps in sync with dev-libs/libintl.
+
+EAPI="5"
+
+inherit epatch epunt-cxx ltprune mono-env libtool java-pkg-opt-2 multilib-minimal
+
+DESCRIPTION="GNU locale utilities"
+HOMEPAGE="https://www.gnu.org/software/gettext/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+# Only libasprintf is under the LGPL (and libintl is in a sep package),
+# so put that license behind USE=cxx.
+LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )"
+SLOT="0"
+KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs"
+
+# only runtime goes multilib
+# Note: The version of libxml2 corresponds to the version bundled via gnulib.
+# If the build detects too old of a system version, it will end up falling back
+# to the bundled copy.  #596918
+# Note: expat lacks a subslot because it is dynamically loaded at runtime.  We
+# would depend on older subslots if they were available (based on the ABIs that
+# are explicitly handled), but expat doesn't currently use subslots.
+DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	>=dev-libs/libxml2-2.9.3:=
+	dev-libs/expat
+	acl? ( virtual/acl )
+	ncurses? ( sys-libs/ncurses:0= )
+	java? ( >=virtual/jdk-1.4:= )"
+RDEPEND="${DEPEND}
+	!git? ( cvs? ( dev-vcs/cvs ) )
+	git? ( dev-vcs/git )
+	java? ( >=virtual/jre-1.4 )"
+PDEPEND="emacs? ( app-emacs/po-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+	# only installed for native ABI
+	/usr/include/gettext-po.h
+)
+
+pkg_setup() {
+	mono-env_pkg_setup
+	java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+	java-pkg-opt-2_src_prepare
+
+	epatch "${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168
+	epatch "${FILESDIR}"/${PN}-0.19.8.1-format-security.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
+
+	epunt_cxx
+	elibtoolize
+}
+
+multilib_src_configure() {
+	local myconf=(
+		# switches common to runtime and top-level
+		--cache-file="${BUILD_DIR}"/config.cache
+		--docdir="\$(datarootdir)/doc/${PF}"
+
+		# Emacs support is now in a separate package
+		--without-emacs
+		--without-lispdir
+		# glib depends on us so avoid circular deps
+		--with-included-glib
+		# libcroco depends on glib which ... ^^^
+		--with-included-libcroco
+		# this will _disable_ libunistring (since it is not bundled),
+		# see bug #326477
+		--with-included-libunistring
+		# Never build libintl since it's in dev-libs/libintl now.
+		--without-included-gettext
+		# Never build bundled copy of libxml2.
+		--without-included-libxml
+
+		$(use_enable acl)
+		$(use_enable cxx c++)
+		$(use_enable cxx libasprintf)
+		$(use_with git)
+		$(usex git --without-cvs $(use_with cvs))
+		$(use_enable java)
+		$(use_enable ncurses curses)
+		$(use_enable nls)
+		$(use_enable openmp)
+		$(use_enable static-libs static)
+	)
+
+	local ECONF_SOURCE=${S}
+	if ! multilib_is_native_abi ; then
+		# for non-native ABIs, we build runtime only
+		ECONF_SOURCE+=/gettext-runtime
+	fi
+
+	econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi ; then
+		dosym msgfmt /usr/bin/gmsgfmt #43435
+		dobin gettext-tools/misc/gettextize
+	fi
+}
+
+multilib_src_install_all() {
+	use nls || rm -r "${ED}"/usr/share/locale
+	use static-libs || prune_libtool_files --all
+
+	rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
+
+	if use java ; then
+		java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar
+		rm -f "${ED}"/usr/share/${PN}/*.jar
+		rm -f "${ED}"/usr/share/${PN}/*.class
+		if use doc ; then
+			java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/javadoc2
+			rm -rf "${ED}"/usr/share/doc/${PF}/javadoc2
+		fi
+	fi
+
+	if use doc ; then
+		dohtml "${ED}"/usr/share/doc/${PF}/*.html
+	else
+		rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
+	fi
+	rm -f "${ED}"/usr/share/doc/${PF}/*.html
+
+	dodoc AUTHORS ChangeLog NEWS README THANKS
+}
+
+pkg_preinst() {
+	java-pkg-opt-2_pkg_preinst
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gettext/, sys-devel/gettext/files/
@ 2020-08-03  6:53 Fabian Groffen
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Groffen @ 2020-08-03  6:53 UTC (permalink / raw
  To: gentoo-commits

commit:     5a162a149bf1b24dadd6277a12728019929d2de2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  3 06:52:58 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Aug  3 06:52:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5a162a14

sys-devel/gettext-0.21: sync with gx86

Package-Manager: Portage-3.0.1-prefix, Repoman-2.3.23
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-devel/gettext/Manifest                         |   1 +
 .../files/gettext-0.20-parallel_install.patch      |  37 +++++
 .../files/gettext-0.21_rc1-avoid_eautomake.patch   |  22 +++
 sys-devel/gettext/gettext-0.21.ebuild              | 169 +++++++++++++++++++++
 4 files changed, 229 insertions(+)

diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest
index d3eb9b6db9..993bbc9245 100644
--- a/sys-devel/gettext/Manifest
+++ b/sys-devel/gettext/Manifest
@@ -1,2 +1,3 @@
 DIST gettext-0.19.7.tar.gz 19235781 BLAKE2B 4c2cfcb0b21a66a9f8d2d57de7420e624a1235f97180ad5ac194a5eb629760a9cacc7f3966cdf893d7af86c1740d8bb2266c639ebe2664ea44f2c47a962a841a SHA512 7ba89074d3eddd0b4a5e2980e1ec74b53c49b7a04a1fa91c70c4bc11ce9c30415e4df9d79698148eaaed325fb4feb25a340a2e8e01fbe86b1a66b1376a4c9e3d
 DIST gettext-0.19.8.1.tar.gz 19704011 BLAKE2B 17dc7aad338a26d71b818fea51e46a47dccf14744ee575ce86b591becaea402e36d64dc018e1a84113c356122ffef367cf2fa424e51ebc9720350040b4960091 SHA512 073042fa2dc48804c58e76f036130a669e19612c25427b0ab14d0b366b549a63751bf3af03bfd0745d7c4f72497a4b2aab26a3cc6de83189ce111679073878e1
+DIST gettext-0.21.tar.gz 24181849 BLAKE2B 2eae99d0916b00b2af6fbc6bf7e309076519a10fea16cd49e7aa29fe8aec1ee7c784c6277281b764dc4abacf400cd3fe461129586303c8cd337db15c76cb4b87 SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1

diff --git a/sys-devel/gettext/files/gettext-0.20-parallel_install.patch b/sys-devel/gettext/files/gettext-0.20-parallel_install.patch
new file mode 100644
index 0000000000..e47beaf944
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.20-parallel_install.patch
@@ -0,0 +1,37 @@
+From 829660df1583c6c3ee1d90291dd910f08e3b777e Mon Sep 17 00:00:00 2001
+From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
+Date: Fri, 10 May 2019 20:08:25 +0200
+Subject: [PATCH] Fix parallel install issue
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ gettext-tools/src/Makefile.am | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am
+index 09a3c153d..1ee49cdca 100644
+--- a/gettext-tools/src/Makefile.am
++++ b/gettext-tools/src/Makefile.am
+@@ -252,9 +252,16 @@ cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
+ 
+ # How to get the include files of libtextstyle.
+ textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
+-	here=`pwd`; \
+-	cd ../../libtextstyle/lib && \
+-	  $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
++	cd "$(abs_top_builddir)/../libtextstyle/lib" && $(MAKE) $@
++	if test -f "$(abs_top_builddir)/../libtextstyle/lib/$@"; then \
++		file="$(abs_top_builddir)/../libtextstyle/lib/$@"; \
++	else \
++		file="$(abs_top_srcdir)/../libtextstyle/lib/$@"; \
++	fi; \
++	target_dir="$(abs_builddir)/$@"; \
++	target_dir="$${target_dir%/*}"; \
++	$(MKDIR_P) "$${target_dir}"; \
++	$(INSTALL_HEADER) "$$file" $@
+ BUILT_SOURCES    += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
+ MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
+ 
+-- 
+2.21.0
+

diff --git a/sys-devel/gettext/files/gettext-0.21_rc1-avoid_eautomake.patch b/sys-devel/gettext/files/gettext-0.21_rc1-avoid_eautomake.patch
new file mode 100644
index 0000000000..8adae5d548
--- /dev/null
+++ b/sys-devel/gettext/files/gettext-0.21_rc1-avoid_eautomake.patch
@@ -0,0 +1,22 @@
+--- gettext-0.21-rc1/gettext-tools/src/Makefile.in
++++ gettext-0.21-rc1/gettext-tools/src/Makefile.in
+@@ -4106,9 +4106,16 @@
+ 
+ # How to get the include files of libtextstyle.
+ @USE_INSTALLED_LIBTEXTSTYLE_FALSE@textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
+-@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	here=`pwd`; \
+-@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	cd ../../libtextstyle/lib && \
+-@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	  $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	cd "$(abs_top_builddir)/../libtextstyle/lib" && $(MAKE) $@
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	if test -f "$(abs_top_builddir)/../libtextstyle/lib/$@"; then \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@		file="$(abs_top_builddir)/../libtextstyle/lib/$@"; \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	else \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@		file="$(abs_top_srcdir)/../libtextstyle/lib/$@"; \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	fi; \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	target_dir="$(abs_builddir)/$@"; \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	target_dir="$${target_dir%/*}"; \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	$(MKDIR_P) "$${target_dir}"; \
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@	$(INSTALL_HEADER) "$$file" $@
+ 
+ # No need to install libgettextsrc.a, except on AIX.
+ install-exec-hook: install-exec-clean

diff --git a/sys-devel/gettext/gettext-0.21.ebuild b/sys-devel/gettext/gettext-0.21.ebuild
new file mode 100644
index 0000000000..69790191b8
--- /dev/null
+++ b/sys-devel/gettext/gettext-0.21.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Note: Keep version bumps in sync with dev-libs/libintl.
+
+EAPI=7
+
+inherit mono-env libtool java-pkg-opt-2 multilib-minimal
+
+DESCRIPTION="GNU locale utilities"
+HOMEPAGE="https://www.gnu.org/software/gettext/"
+if [[ "${PV}" == *_rc* ]] ; then
+	SRC_URI="mirror://gnu-alpha/${PN}/${P/_/-}.tar.bz2"
+	S="${WORKDIR}/${P/_/-}"
+else
+	SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+	KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+# Only libasprintf is under the LGPL (and libintl is in a sep package),
+# so put that license behind USE=cxx.
+LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )"
+SLOT="0"
+IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs"
+
+# only runtime goes multilib
+# Note: The version of libxml2 corresponds to the version bundled via gnulib.
+# If the build detects too old of a system version, it will end up falling back
+# to the bundled copy.  #596918
+# Note: expat lacks a subslot because it is dynamically loaded at runtime.  We
+# would depend on older subslots if they were available (based on the ABIs that
+# are explicitly handled), but expat doesn't currently use subslots.
+DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+	>=dev-libs/libxml2-2.9.3:=
+	dev-libs/expat
+	acl? ( virtual/acl )
+	ncurses? ( sys-libs/ncurses:0= )
+	java? ( >=virtual/jdk-1.4:= )"
+RDEPEND="${DEPEND}
+	!git? ( cvs? ( dev-vcs/cvs ) )
+	git? ( dev-vcs/git )
+	java? ( >=virtual/jre-1.4 )"
+BDEPEND="
+	git? ( dev-vcs/git )
+"
+PDEPEND="emacs? ( app-emacs/po-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+	# only installed for native ABI
+	/usr/include/gettext-po.h
+
+	/usr/include/autosprintf.h
+	/usr/include/textstyle.h
+	/usr/include/textstyle/stdbool.h
+	/usr/include/textstyle/version.h
+	/usr/include/textstyle/woe32dll.h
+)
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168
+	"${FILESDIR}"/${PN}-0.20-parallel_install.patch #685530
+	"${FILESDIR}"/${PN}-0.21_rc1-avoid_eautomake.patch
+)
+
+QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
+
+pkg_setup() {
+	mono-env_pkg_setup
+	java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+	java-pkg-opt-2_src_prepare
+
+	if use elibc_Cygwin; then
+		PATCHES+=(
+			"${FILESDIR}"/0.19.8.1-no-woe32dll.patch
+			"${FILESDIR}"/0.19.3-localename.patch
+			"${FILESDIR}"/0.19.8.1-tests-cygwin.patch
+			"${FILESDIR}"/0.19.8.1-cygwin-ftm.patch
+		)
+	fi
+
+	default
+
+	# 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
+
+	elibtoolize
+}
+
+multilib_src_configure() {
+	local myconf=(
+		# switches common to runtime and top-level
+		--cache-file="${BUILD_DIR}"/config.cache
+		#--docdir="\$(datarootdir)/doc/${PF}"
+
+		# Emacs support is now in a separate package
+		--without-emacs
+		--without-lispdir
+		# glib depends on us so avoid circular deps
+		--with-included-glib
+		# libcroco depends on glib which ... ^^^
+		--with-included-libcroco
+		# this will _disable_ libunistring (since it is not bundled),
+		# see bug #326477
+		--with-included-libunistring
+		# Never build libintl since it's in dev-libs/libintl now.
+		--without-included-gettext
+		# Never build bundled copy of libxml2.
+		--without-included-libxml
+
+		$(use_enable acl)
+		$(use_enable cxx c++)
+		$(use_enable cxx libasprintf)
+		$(use_with git)
+		$(usex git --without-cvs $(use_with cvs))
+		$(use_enable java)
+		$(use_enable ncurses curses)
+		$(use_enable nls)
+		$(use_enable openmp)
+		$(use_enable static-libs static)
+	)
+
+	local ECONF_SOURCE="${S}"
+	if ! multilib_is_native_abi ; then
+		# for non-native ABIs, we build runtime only
+		ECONF_SOURCE+=/gettext-runtime
+	fi
+
+	econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+	emake DESTDIR="${D}" install
+
+	if multilib_is_native_abi ; then
+		dosym msgfmt /usr/bin/gmsgfmt #43435
+		dobin gettext-tools/misc/gettextize
+	fi
+}
+
+multilib_src_install_all() {
+	find "${ED}" -type f -name "*.la" -delete || die
+
+	if use java ; then
+		java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar
+		rm "${ED}"/usr/share/${PN}/*.jar || die
+		rm "${ED}"/usr/share/${PN}/*.class || die
+		if use doc ; then
+			java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2
+		fi
+	fi
+
+	dodoc AUTHORS ChangeLog NEWS README THANKS
+
+	if use doc ; then
+		docinto html
+		dodoc "${ED}"/usr/share/doc/${PF}/*.html
+	else
+		rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
+	fi
+	rm "${ED}"/usr/share/doc/${PF}/*.html || die
+}
+
+pkg_preinst() {
+	java-pkg-opt-2_pkg_preinst
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-03  6:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 19:33 [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gettext/, sys-devel/gettext/files/ Fabian Groffen
  -- strict thread matches above, loose matches on Subject: below --
2020-08-03  6:53 Fabian Groffen
2016-05-09 13:41 Michael Haubenwallner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox