dev-qt/qtx11extras: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-libs / libdnet / libdnet-1.12-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 AT_M4DIR="config"
7 PYTHON_COMPAT=( python2_7 )
8 DISTUTILS_OPTIONAL=1
9 inherit autotools distutils-r1
10
11 DESCRIPTION="simplified, portable interface to several low-level networking routines"
12 HOMEPAGE="https://github.com/dugsong/libdnet"
13 SRC_URI="
14         https://github.com/dugsong/libdnet/archive/${P}.tar.gz
15         ipv6? ( https://fragroute-ipv6.googlecode.com/files/${P}.ipv6-1.patch.gz )
16 "
17 LICENSE="LGPL-2"
18
19 SLOT="0"
20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
21 IUSE="ipv6 python static-libs test"
22
23 DEPEND="
24         python? ( ${PYTHON_DEPS} )
25 "
26 RDEPEND="
27         ${DEPEND}
28 "
29 RESTRICT="test"
30 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
31 DOCS=( README THANKS TODO )
32 S=${WORKDIR}/${PN}-${P}
33
34 src_prepare() {
35         # Useless copy
36         rm -r trunk/ || die
37
38         sed -i \
39                 -e 's/libcheck.a/libcheck.so/g' \
40                 -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
41                 configure.in || die
42         sed -i -e 's|-L@libdir@ ||g' dnet-config.in || die
43         use ipv6 && eapply "${WORKDIR}/${P}.ipv6-1.patch"
44         sed -i -e '/^SUBDIRS/s|python||g' Makefile.am || die
45         eautoreconf
46
47         if use python; then
48                 cd python
49                 distutils-r1_src_prepare
50         fi
51
52         eapply_user
53 }
54
55 src_configure() {
56         econf \
57                 $(use_with python) \
58                 $(use_enable static-libs static)
59 }
60
61 src_compile() {
62         default
63         if use python; then
64                 cd python
65                 distutils-r1_src_compile
66         fi
67 }
68
69 src_install() {
70         default
71         if use python; then
72                 cd python
73                 unset DOCS
74                 distutils-r1_src_install
75         fi
76         find "${D}" -name '*.la' -delete || die
77 }