--- xac.orig/xac-0.6_pre4.ebuild 2011-11-16 05:33:52.014999990 +0800 +++ xac.orig/xac-0.6_pre4.ebuild 2011-11-18 16:12:54.818961129 +0800 @@ -2,7 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/x11-misc/xac/xac-0.6_pre4.ebuild,v 1.6 2009/09/30 15:52:20 josejx Exp $ -inherit toolchain-funcs eutils +EAPI="4" +PYTHON_DEPEND="2" + +inherit toolchain-funcs eutils distutils DESCRIPTION="Xorgautoconfig (xac) generates configuration files for X.org" HOMEPAGE="http://dev.gentoo.org/~josejx/xac.html" @@ -15,11 +18,14 @@ RDEPEND=" x11-base/xorg-server" SRC_URI="mirror://gentoo/${P}.tar.bz2" -src_unpack() { - unpack ${A} - cd "${S}" - - ## Replace /usr/lib/xac with libdir version +pkg_setup() { + python_pkg_setup + python_set_active_version 2 +# DISTUTILS_SETUP_FILES +} + +src_prepare() { + ### Replace /usr/lib/xac with libdir version sed -i "s:/usr/lib/xac:/usr/$(get_libdir)/xac:" xac ### Fix the x86 bios call with newer glibc @@ -32,17 +38,16 @@ src_compile() { ### Compile the C bindings cd "${S}"/src - ./setup.py build || die "Failed to build the C modules" + distutils_src_compile } src_install() { local xac_base="/usr/$(get_libdir)/xac" - dosbin "${S}"/xac - ### Install the C mods + ### Install the C mods using distutils_src_install cd "${S}"/src - ./setup.py install --root "${D}" || die "Failed to install the C modules" + distutils_src_install dodir "${xac_base}" insinto ${xac_base} @@ -53,4 +58,9 @@ newinitd "${S}"/xac.init xac newconfd "${S}"/xac.conf xac fi + python_convert_shebangs -r 2 "${ED}" +} + +src_postint() { + distutils_pkg_postinst }