--- spectemu-0.99.3.ebuild +++ spectemu-0.99.3-r1.ebuild @@ -2,12 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-emulation/spectemu/spectemu-0.99.3.ebuild,v 1.13 2009/03/03 20:37:38 flameeyes Exp $ -### Several versions of specemu exist, xspect & vgaspect, utilising X11 -### and/or svgalib. libreadline provides optional runtime features. -### The ./configure script automagically figures out which binaries to build -### so the run/compiletime dependancies here are use dependant +EAPI=4 -inherit eutils +inherit autotools eutils DESCRIPTION="48k ZX Spectrum Emulator" HOMEPAGE="http://kempelen.iit.bme.hu/~mszeredi/spectemu/spectemu.html" @@ -15,8 +12,10 @@ LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ppc x86" -IUSE="X readline svga" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="readline svga +X" + +REQUIRED_USE="|| ( svga X )" DEPEND="X? ( >=x11-proto/xf86vidmodeproto-2.2.2 >=x11-proto/xextproto-7.0.2 @@ -25,24 +24,22 @@ >=x11-libs/libXext-1.0.0 >=x11-libs/libXxf86vm-1.0.0 ) readline? ( sys-libs/readline )" -RDEPEND="svga? ( media-libs/svgalib )" +RDEPEND="${DEPEND} + svga? ( media-libs/svgalib )" -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-qa.patch +src_prepare() { + epatch "${FILESDIR}"/${P}-automagic.patch + epatch "${FILESDIR}"/${P}-build.patch + eautoreconf } -src_compile() { +src_configure() { econf \ $(use_with readline) \ + $(use_with svga) \ $(use_with X x) - emake CC="$(tc-getCC)" \ - CPP="$(tc-getCPP)" \ - || die "emake failed" } src_install() { - # Parallel install bug #255777 - emake -j1 install_root="${D}" install || die "emake install failed" + emake install_root="${D}" install }