1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python2_7 )
9 inherit autotools distutils-r1
11 DESCRIPTION="simplified, portable interface to several low-level networking routines"
12 HOMEPAGE="https://github.com/dugsong/libdnet"
14 https://github.com/dugsong/libdnet/archive/${P}.tar.gz
15 ipv6? ( https://fragroute-ipv6.googlecode.com/files/${P}.ipv6-1.patch.gz )
20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
21 IUSE="ipv6 python static-libs test"
24 python? ( ${PYTHON_DEPS} )
30 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
31 DOCS=( README THANKS TODO )
32 S=${WORKDIR}/${PN}-${P}
39 -e 's/libcheck.a/libcheck.so/g' \
40 -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
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
49 distutils-r1_src_prepare
58 $(use_enable static-libs static)
65 distutils-r1_src_compile
74 distutils-r1_src_install
76 find "${D}" -name '*.la' -delete || die