net-libs/uhttpmock: ia64 keyworded, bug #523686
[gentoo.git] / net-libs / libtirpc / libtirpc-1.0.1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit multilib-minimal toolchain-funcs
7
8 DESCRIPTION="Transport Independent RPC library (SunRPC replacement)"
9 HOMEPAGE="http://libtirpc.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
11         mirror://gentoo/${PN}-glibc-nfs.tar.xz"
12
13 LICENSE="GPL-2"
14 SLOT="0/3" # subslot matches SONAME major
15 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
16 IUSE="ipv6 kerberos static-libs"
17
18 RDEPEND="kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )"
19 DEPEND="${RDEPEND}
20         app-arch/xz-utils
21         >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
22
23 src_unpack() {
24         unpack ${A}
25         cp -r tirpc "${S}"/ || die
26 }
27
28 multilib_src_configure() {
29         ECONF_SOURCE=${S} \
30         econf \
31                 $(use_enable ipv6) \
32                 $(use_enable kerberos gssapi) \
33                 $(use_enable static-libs static)
34 }
35
36 multilib_src_install() {
37         default
38
39         # libtirpc replaces rpc support in glibc, so we need it in /
40         gen_usr_ldscript -a tirpc
41 }
42
43 multilib_src_install_all() {
44         einstalldocs
45
46         insinto /etc
47         doins doc/netconfig
48
49         insinto /usr/include/tirpc
50         doins -r "${WORKDIR}"/tirpc/*
51
52         # makes sure that the linking order for nfs-utils is proper, as
53         # libtool would inject a libgssglue dependency in the list.
54         use static-libs || prune_libtool_files
55 }