commit:     2bb8a68aaa9007e1b4f7437453bcf66de097f524
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 23:14:37 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 13 00:20:19 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bb8a68a

dev-libs/libiconv: split out from gettext

The gettext ebuild is big and fat and full of tools/deps that are
independent of libintl.  Since slimming that down with USE flags
gets ugly fast (it provides multiple libs in addition to tools),
just create a dedicated libintl package.

 dev-libs/libintl/Manifest                  |  1 +
 dev-libs/libintl/libintl-0.19.6.ebuild     | 67 ++++++++++++++++++++++++++++++
 dev-libs/libintl/metadata.xml              |  5 +++
 sys-devel/gettext/gettext-0.19.6-r1.ebuild | 22 +++++-----
 virtual/libintl/libintl-0-r2.ebuild        | 18 ++++++++
 5 files changed, 101 insertions(+), 12 deletions(-)

diff --git a/dev-libs/libintl/Manifest b/dev-libs/libintl/Manifest
new file mode 100644
index 0000000..ea4c35a
--- /dev/null
+++ b/dev-libs/libintl/Manifest
@@ -0,0 +1 @@
+DIST gettext-0.19.6.tar.gz 18619659 SHA256 
ed4b4c19bd3a3034eb6769500a3592ff616759ef43cf30586dbb7a17c9dd695d SHA512 
46adfd4a6d0038aba999658bebe51117e3ab3dc149a9054c1087d3e79ec7ba3371a7e78a8ca30a8872d162c2dc44aba6e67e4d64808c4f92e1e2bd674174f1db
 WHIRLPOOL 
1988f9ddfd603734b4a632291925c8e5b31e7384eea1c6641d52aa58cb6b8f892e7664dd145a53435b7d2a4540ac65aeae1cb528a004c35832087c2820dafbcb

diff --git a/dev-libs/libintl/libintl-0.19.6.ebuild 
b/dev-libs/libintl/libintl-0.19.6.ebuild
new file mode 100644
index 0000000..4da925b
--- /dev/null
+++ b/dev-libs/libintl/libintl-0.19.6.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Note: Keep version bumps in sync with sys-devel/gettext.
+
+EAPI="5"
+
+MY_P="gettext-${PV}"
+
+inherit eutils multilib-minimal toolchain-funcs libtool
+
+DESCRIPTION="the GNU international library (split out of gettext)"
+HOMEPAGE="https://www.gnu.org/software/gettext/";
+SRC_URI="mirror://gnu/gettext/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="nls static-libs +threads"
+
+DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
+# Block C libraries known to provide libintl.
+RDEPEND="${DEPEND}
+       !sys-libs/glibc
+       !<sys-devel/gettext-0.19.6-r1"
+
+S="${WORKDIR}/${MY_P}/gettext-runtime"
+
+src_prepare() {
+       elibtoolize
+}
+
+multilib_src_configure() {
+       local myconf=(
+               # Emacs support is now in a separate package.
+               --without-emacs
+               --without-lispdir
+               # This magic flag enables libintl.
+               --with-included-gettext
+               # The gettext package provides this library.
+               --disable-c++
+               --disable-libasprintf
+               # No java until someone cares.
+               --disable-java
+
+               $(use_enable nls)
+               $(use_enable static-libs static)
+               $(use_enable threads)
+       )
+       ECONF_SOURCE=${S} econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+       # We only need things in the intl/ subdir.
+       emake DESTDIR="${D}" install -C intl
+
+       gen_usr_ldscript -a intl
+}
+
+multilib_src_install_all() {
+       use static-libs || prune_libtool_files --all
+
+       rm -f "${ED}"/usr/share/locale/locale.alias 
"${ED}"/usr/lib/charset.alias
+
+       dodoc AUTHORS ChangeLog NEWS README
+}

diff --git a/dev-libs/libintl/metadata.xml b/dev-libs/libintl/metadata.xml
new file mode 100644
index 0000000..96a2d58
--- /dev/null
+++ b/dev-libs/libintl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>

diff --git a/sys-devel/gettext/gettext-0.19.6-r1.ebuild 
b/sys-devel/gettext/gettext-0.19.6-r1.ebuild
index 4ade3f6..7677f88 100644
--- a/sys-devel/gettext/gettext-0.19.6-r1.ebuild
+++ b/sys-devel/gettext/gettext-0.19.6-r1.ebuild
@@ -2,24 +2,29 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
+# Note: Keep version bumps in sync with dev-libs/libintl.
+
 EAPI="5"
 
-inherit eutils toolchain-funcs mono-env libtool java-pkg-opt-2 multilib-minimal
+inherit eutils 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"
 
-LICENSE="GPL-3+ LGPL-2.1+"
+# 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs 
elibc_glibc elibc_musl"
+IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs"
 
 # only runtime goes multilib
 # 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:=
        dev-libs/expat
        acl? ( virtual/acl )
@@ -64,6 +69,8 @@ multilib_src_configure() {
                # 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
 
                $(use_enable acl)
                $(use_enable cxx c++)
@@ -77,13 +84,6 @@ multilib_src_configure() {
                $(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 )
-       else
-               myconf+=( --with-included-gettext )
-       fi
-
        local ECONF_SOURCE=${S}
        if ! multilib_is_native_abi ; then
                # for non-native ABIs, we build runtime only
@@ -99,8 +99,6 @@ multilib_src_install() {
        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
 }
 

diff --git a/virtual/libintl/libintl-0-r2.ebuild 
b/virtual/libintl/libintl-0-r2.ebuild
new file mode 100644
index 0000000..7a61cb9
--- /dev/null
+++ b/virtual/libintl/libintl-0-r2.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit multilib-build
+
+DESCRIPTION="Virtual for the GNU Internationalization Library"
+
+LICENSE=""
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc 
x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd 
~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="elibc_glibc elibc_musl elibc_uclibc"
+
+# - Don't put elibc_glibc? ( sys-libs/glibc ) to avoid circular deps between
+# that and gcc. And don't force uClibc to dep on this.
+RDEPEND="!elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( 
dev-libs/libiconv[${MULTILIB_USEDEP}] ) ) )"

Reply via email to