--- libdnet.orig/libdnet-1.11-r1.ebuild 2011-12-23 18:25:46.351203748 +0800 +++ libdnet.orig/libdnet-1.11-r1.ebuild 2011-12-23 18:32:57.298164241 +0800 @@ -3,6 +3,8 @@ # $Header: /var/cvsroot/gentoo-x86/dev-libs/libdnet/libdnet-1.11-r1.ebuild,v 1.11 2010/07/19 21:35:59 maekke Exp $ #WANT_AUTOMAKE=1.6 +EAPI=4 +PYTHON_DEPEND="python? 2" inherit eutils autotools python DESCRIPTION="simplified, portable interface to several low-level networking routines" @@ -14,18 +16,23 @@ KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86" IUSE="python" -src_unpack() { - unpack ${A} - cd "${S}" +pkg_setup() { + python_set_active_version 2 +} + +src_prepare() { sed -i 's/suite_free(s);//' test/check/*.c || die "sed failed" epatch "${FILESDIR}"/${PN}-1.10-gcc4.diff AT_M4DIR="config" eautoreconf } +src_configure() { +econf $(use_with python) +} + src_compile () { - econf $(use_with python) || die "econf failed" - emake || die "emake failed" + emake } src_test() { @@ -33,6 +40,6 @@ } src_install () { - emake DESTDIR="${D}" install || die "make install failed" + emake DESTDIR="${D}" install dodoc README THANKS TODO }