commit:     c587470bb86aa2081f287a38e25f9c6510a9c7e4
Author:     Marty E. Plummer <hanetzer <AT> protonmail <DOT> com>
AuthorDate: Fri Oct 13 03:59:34 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Oct 13 07:59:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c587470b

dev-libs/libiconv: version bump to 1.15

Required to build on mingw-w64 with gcc-7.x.x

Package-Manager: Portage-2.3.11, Repoman-2.3.3

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-libs/libiconv/Manifest                         |  1 +
 .../libiconv/files/libiconv-1.15-no-gets.patch     | 22 ++++++++
 dev-libs/libiconv/libiconv-1.15.ebuild             | 58 ++++++++++++++++++++++
 3 files changed, 81 insertions(+)

diff --git a/dev-libs/libiconv/Manifest b/dev-libs/libiconv/Manifest
index 1f26b8b7862..91008439a6f 100644
--- a/dev-libs/libiconv/Manifest
+++ b/dev-libs/libiconv/Manifest
@@ -1 +1,2 @@
 DIST libiconv-1.14.tar.gz 4984397 SHA256 
72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613 SHA512 
b96774fefc4fa1d07948fcc667027701373c34ebf9c4101000428e048addd85a5bb5e05e59f80eb783a3054a3a8a3c0da909450053275bbbf3ffde511eb3f387
 WHIRLPOOL 
e96337209a4f86eccb112e94c3cd6b668b2a8fc4b05ed7becaa2f6fbc9279f7b32ec1fa4b086e61520bfffea5d4f7a1cad58bdb266b5f0aa7d02b89aeed9759a
+DIST libiconv-1.15.tar.gz 5264188 SHA256 
ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 SHA512 
1233fe3ca09341b53354fd4bfe342a7589181145a1232c9919583a8c9979636855839049f3406f253a9d9829908816bb71fd6d34dd544ba290d6f04251376b1a
 WHIRLPOOL 
fabb05b64dc4d51c53b0e82a017c5966de0aba23baa8fd25d09ba14a4327fe8c296365d3f31bedb459bd85cb60c2623ec162b8e0c363f2c56887c4e278323747

diff --git a/dev-libs/libiconv/files/libiconv-1.15-no-gets.patch 
b/dev-libs/libiconv/files/libiconv-1.15-no-gets.patch
new file mode 100644
index 00000000000..5bc20b37749
--- /dev/null
+++ b/dev-libs/libiconv/files/libiconv-1.15-no-gets.patch
@@ -0,0 +1,22 @@
+hack until gzip pulls a newer gnulib version
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <[email protected]>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- a/srclib/stdio.in.h
++++ b/srclib/stdio.in.h
+@@ -744,7 +744,6 @@ _GL_WARN_ON_USE (getline, "getline is un
+    removed it.  */
+ #undef gets
+ #if HAVE_RAW_DECL_GETS && !defined __cplusplus
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@

diff --git a/dev-libs/libiconv/libiconv-1.15.ebuild 
b/dev-libs/libiconv/libiconv-1.15.ebuild
new file mode 100644
index 00000000000..1707033d72b
--- /dev/null
+++ b/dev-libs/libiconv/libiconv-1.15.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit libtool toolchain-funcs multilib-minimal
+
+DESCRIPTION="GNU charset conversion library for libc which doesn't implement 
it"
+HOMEPAGE="https://www.gnu.org/software/libiconv/";
+SRC_URI="mirror://gnu/libiconv/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="static-libs"
+
+DEPEND="!sys-libs/glibc
+       !userland_GNU? ( !sys-apps/man-pages )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-1.15-no-gets.patch"
+)
+
+src_prepare() {
+       default
+       elibtoolize
+}
+
+multilib_src_configure() {
+       # Disable NLS support because that creates a circular dependency
+       # between libiconv and gettext
+       ECONF_SOURCE="${S}" \
+       econf \
+               --docdir="\$(datarootdir)/doc/${PF}/html" \
+               --disable-nls \
+               --enable-shared \
+               $(use_enable static-libs static)
+}
+
+multilib_src_install_all() {
+       use static-libs || find "${ED}" -name 'lib*.la' -delete
+
+       # Install in /lib as utils installed in /lib like gnutar
+       # can depend on this
+       gen_usr_ldscript -a iconv charset
+
+       # If we have a GNU userland, we probably have sys-apps/man-pages
+       # installed, which means we want to rename our copies #503162.
+       # The use of USELAND=GNU is kind of a hack though ...
+       if use userland_GNU ; then
+               cd "${ED}"/usr/share/man || die
+               local f
+               for f in man*/*.[0-9] ; do
+                       mv "${f}" "${f%/*}/${PN}-${f#*/}" || die
+               done
+       fi
+}

Reply via email to