dev-libs/libintl: Stable for PPC64 (bug #584616).
[gentoo.git] / dev-libs / libintl / libintl-0.19.7.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 # Note: Keep version bumps in sync with sys-devel/gettext.
6
7 EAPI="5"
8
9 MY_P="gettext-${PV}"
10
11 inherit multilib-minimal toolchain-funcs libtool
12
13 DESCRIPTION="the GNU international library (split out of gettext)"
14 HOMEPAGE="https://www.gnu.org/software/gettext/"
15 SRC_URI="mirror://gnu/gettext/${MY_P}.tar.gz"
16
17 LICENSE="LGPL-2.1+"
18 SLOT="0"
19 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 ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
20 IUSE="static-libs +threads"
21
22 DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]"
23 # Block C libraries known to provide libintl.
24 RDEPEND="${DEPEND}
25         !sys-libs/glibc
26         !sys-libs/musl
27         !<sys-devel/gettext-0.19.6-r1"
28
29 S="${WORKDIR}/${MY_P}/gettext-runtime"
30
31 src_prepare() {
32         # The libtool files are stored higher up, so make sure we run in the
33         # whole tree and not just the subdir we build.
34         elibtoolize "${WORKDIR}"
35 }
36
37 multilib_src_configure() {
38         local myconf=(
39                 # Emacs support is now in a separate package.
40                 --without-emacs
41                 --without-lispdir
42                 # Normally this controls nls behavior in general, but the libintl
43                 # subdir is skipped unless this is explicitly set.  ugh.
44                 --enable-nls
45                 # This magic flag enables libintl.
46                 --with-included-gettext
47                 # The gettext package provides this library.
48                 --disable-c++
49                 --disable-libasprintf
50                 # No java until someone cares.
51                 --disable-java
52
53                 $(use_enable static-libs static)
54                 $(use_enable threads)
55         )
56         ECONF_SOURCE=${S} econf "${myconf[@]}"
57 }
58
59 multilib_src_compile() {
60         # We only need things in the intl/ subdir.
61         emake -C intl
62 }
63
64 multilib_src_install() {
65         # We only need things in the intl/ subdir.
66         emake DESTDIR="${D}" install -C intl
67
68         gen_usr_ldscript -a intl
69 }
70
71 multilib_src_install_all() {
72         use static-libs || prune_libtool_files --all
73
74         rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
75
76         dodoc AUTHORS ChangeLog NEWS README
77 }