Merge the GLEP 67 transition changes
[gentoo.git] / dev-libs / libiconv / libiconv-1.13.1.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 inherit eutils multilib flag-o-matic libtool toolchain-funcs
6
7 DESCRIPTION="GNU charset conversion library for libc which doesn't implement it"
8 HOMEPAGE="https://www.gnu.org/software/libiconv/"
9 SRC_URI="mirror://gnu/libiconv/${P}.tar.gz"
10
11 LICENSE="GPL-3"
12 SLOT="0"
13 KEYWORDS="~sparc-fbsd ~x86-fbsd"
14 IUSE=""
15
16 DEPEND="!sys-libs/glibc
17         !sys-apps/man-pages"
18 RDEPEND="${DEPEND}"
19
20 src_unpack() {
21         unpack ${A}
22         cd "${S}"
23
24         # This patch is needed as libiconv 1.10 provides (and uses) new functions
25         # and they are not present in the old libiconv.so, and this breaks the
26         # ${DESTDIR} != ${prefix} that we use. It's a problem for Solaris, but we
27         # don't have to deal with it for now.
28         #epatch "${FILESDIR}"/${PN}-1.10-link.patch
29
30         # Make sure that libtool support is updated to link "the linux way" on
31         # FreeBSD.
32         elibtoolize
33 }
34
35 src_compile() {
36         # Install in /lib as utils installed in /lib like gnutar
37         # can depend on this
38
39         # Disable NLS support because that creates a circular dependency
40         # between libiconv and gettext
41
42         econf \
43                 --disable-nls \
44                 --enable-shared \
45                 --enable-static \
46                  || die "econf failed"
47         emake || die "emake failed"
48 }
49
50 src_install() {
51         emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed"
52
53         # Move static libs and creates ldscripts into /usr/lib
54         dodir /$(get_libdir)
55         mv "${D}"/usr/$(get_libdir)/lib{iconv,charset}*$(get_libname)* "${D}/$(get_libdir)" || die
56         gen_usr_ldscript libiconv$(get_libname)
57         gen_usr_ldscript libcharset$(get_libname)
58 }