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.
This commit is contained in:
Mike Frysinger
2015-10-12 19:14:37 -04:00
parent 030b323567
commit 2bb8a68aaa
5 changed files with 101 additions and 12 deletions

View File

@@ -0,0 +1 @@
DIST gettext-0.19.6.tar.gz 18619659 SHA256 ed4b4c19bd3a3034eb6769500a3592ff616759ef43cf30586dbb7a17c9dd695d SHA512 46adfd4a6d0038aba999658bebe51117e3ab3dc149a9054c1087d3e79ec7ba3371a7e78a8ca30a8872d162c2dc44aba6e67e4d64808c4f92e1e2bd674174f1db WHIRLPOOL 1988f9ddfd603734b4a632291925c8e5b31e7384eea1c6641d52aa58cb6b8f892e7664dd145a53435b7d2a4540ac65aeae1cb528a004c35832087c2820dafbcb

View File

@@ -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
}

View File

@@ -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>

View File

@@ -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
}

View File

@@ -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}] ) ) )"