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