1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python2_7 )
10 inherit autotools distutils-r1 eutils ltprune
12 DESCRIPTION="simplified, portable interface to several low-level networking routines"
13 HOMEPAGE="https://github.com/dugsong/libdnet"
14 SRC_URI="https://libdnet.googlecode.com/files/${P}.tgz
15 ipv6? ( https://fragroute-ipv6.googlecode.com/files/${P}.ipv6-1.patch.gz )"
19 KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 sparc x86"
20 IUSE="ipv6 python static-libs test"
22 #DEPEND="test? ( dev-libs/check )"
23 DEPEND="python? ( ${PYTHON_DEPS} )"
26 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
28 DOCS=( README THANKS TODO )
35 -e 's/libcheck.a/libcheck.so/g' \
36 -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
38 sed -i -e 's|-L@libdir@ ||g' dnet-config.in || die
39 use ipv6 && epatch "${WORKDIR}/${P}.ipv6-1.patch"
40 sed -i -e '/^SUBDIRS/s|python||g' Makefile.am || die
44 distutils-r1_src_prepare
51 $(use_enable static-libs static)
58 distutils-r1_src_compile
67 distutils-r1_src_install