From 2bb8a68aaa9007e1b4f7437453bcf66de097f524 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 12 Oct 2015 19:14:37 -0400 Subject: [PATCH] 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(-) create mode 100644 dev-libs/libintl/Manifest create mode 100644 dev-libs/libintl/libintl-0.19.6.ebuild create mode 100644 dev-libs/libintl/metadata.xml create mode 100644 virtual/libintl/libintl-0-r2.ebuild diff --git a/dev-libs/libintl/Manifest b/dev-libs/libintl/Manifest new file mode 100644 index 0000000000000..ea4c35a81f0e5 --- /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 0000000000000..4da925bef5502 --- /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 + ! + + +base-system + diff --git a/sys-devel/gettext/gettext-0.19.6-r1.ebuild b/sys-devel/gettext/gettext-0.19.6-r1.ebuild index 4ade3f63a9e62..7677f88eb8dd4 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 0000000000000..7a61cb9233d82 --- /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}] ) ) )"