diff -ur clearsilver.orig/clearsilver-0.10.5-r1.ebuild clearsilver/clearsilver-0.10.5-r1.ebuild --- clearsilver.orig/clearsilver-0.10.5-r1.ebuild 2011-03-26 19:01:07.000000000 +0800 +++ clearsilver/clearsilver-0.10.5-r1.ebuild 2011-11-13 17:52:42.061915025 +0800 @@ -7,7 +7,11 @@ # # dju@gentoo.org, 4th July 2005 -inherit eutils perl-app multilib autotools +EAPI="3" + +PYTHON_DEPEND="*:2.6" + +inherit eutils perl-app multilib autotools python DESCRIPTION="Clearsilver is a fast, powerful, and language-neutral HTML template system." HOMEPAGE="http://www.clearsilver.net/" @@ -18,33 +22,32 @@ KEYWORDS="amd64 ppc ppc64 ~sparc x86 ~x86-fbsd" IUSE="perl python zlib" -DEPEND="python? ( dev-lang/python ) - perl? ( dev-lang/perl ) +DEPEND="perl? ( dev-lang/perl ) zlib? ( sys-libs/zlib )" +RDEPEND=${DEPEND} -DOCS="README INSTALL" +DOCS=( "README INSTALL" ) if use python ; then DOCS="${DOCS} README.python" fi -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/${P}-perl_installdir.patch +pkg_setup() { + python_pkg_setup +} +src_prepare() { use zlib && epatch "${FILESDIR}"/${P}-libz.patch - - epatch "${FILESDIR}"/${P}-libdir.patch + epatch "${FILESDIR}"/${P}-perl_installdir.patch \ + "${FILESDIR}"/${P}-libdir.patch sed -i -e "s:GENTOO_LIBDIR:$(get_libdir):" configure.in - eautoreconf || die "eautoreconf failed" - + # Fix for Gentoo/Freebsd [[ "${ARCH}" == FreeBSD ]] && touch ${S}/features.h ${S}/cgi/features.h + eautoreconf || die "eautoreconf failed" } -src_compile() { +src_configure() { econf \ $(use_enable perl) \ $(use_with perl perl /usr/bin/perl) \ @@ -56,16 +59,19 @@ "--disable-java" \ "--disable-csharp" \ || die "./configure failed" +} +src_compile() { emake || die "emake failed" } src_install () { - make DESTDIR="${D}" install || die "make install failed" + make DESTDIR="${ED}" install || die "make install failed" dodoc ${DOCS} || die "dodoc failed" if use perl ; then fixlocalpod || die "fixlocalpod failed" fi -} + python_convert_shebangs -r 2 "${ED}" +}