Merge the GLEP 67 transition changes
[gentoo.git] / dev-libs / libiconv / libiconv-1.14-r2.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="4"
6
7 inherit libtool toolchain-funcs multilib-minimal
8
9 DESCRIPTION="GNU charset conversion library for libc which doesn't implement it"
10 HOMEPAGE="https://www.gnu.org/software/libiconv/"
11 SRC_URI="mirror://gnu/libiconv/${P}.tar.gz"
12
13 LICENSE="GPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
16 IUSE="static-libs"
17
18 DEPEND="!sys-libs/glibc
19         !userland_GNU? ( !sys-apps/man-pages )"
20 RDEPEND="${DEPEND}"
21
22 src_prepare() {
23         epatch "${FILESDIR}"/${P}-no-gets.patch
24         elibtoolize
25 }
26
27 multilib_src_configure() {
28         # Disable NLS support because that creates a circular dependency
29         # between libiconv and gettext
30         ECONF_SOURCE="${S}" \
31         econf \
32                 --docdir="\$(datarootdir)/doc/${PF}/html" \
33                 --disable-nls \
34                 --enable-shared \
35                 $(use_enable static-libs static)
36 }
37
38 multilib_src_install_all() {
39         use static-libs || find "${ED}" -name 'lib*.la' -delete
40
41         # Install in /lib as utils installed in /lib like gnutar
42         # can depend on this
43         gen_usr_ldscript -a iconv charset
44
45         # If we have a GNU userland, we probably have sys-apps/man-pages
46         # installed, which means we want to rename our copies #503162.
47         # The use of USELAND=GNU is kind of a hack though ...
48         if use userland_GNU ; then
49                 cd "${ED}"/usr/share/man || die
50                 local f
51                 for f in man*/*.[0-9] ; do
52                         mv "${f}" "${f%/*}/${PN}-${f#*/}" || die
53                 done
54         fi
55 }