diff options
author | Timothy Redaelli <drizzt@gentoo.org> | 2007-01-29 21:10:31 +0000 |
---|---|---|
committer | Timothy Redaelli <drizzt@gentoo.org> | 2007-01-29 21:10:31 +0000 |
commit | 40e772b55f308a8eb472a57924c94821b1cc1140 (patch) | |
tree | 80f7e7d051b3c453864f2802f263a96ba1e9d746 | |
parent | Sign Manfiest (diff) | |
download | gentoo-2-40e772b55f308a8eb472a57924c94821b1cc1140.tar.gz gentoo-2-40e772b55f308a8eb472a57924c94821b1cc1140.tar.bz2 gentoo-2-40e772b55f308a8eb472a57924c94821b1cc1140.zip |
Add custom-cflags use, also disable libao on amd64.
(Portage version: 2.1.2-r4)
-rw-r--r-- | games-emulation/zsnes/ChangeLog | 5 | ||||
-rw-r--r-- | games-emulation/zsnes/zsnes-1.51.ebuild | 42 |
2 files changed, 35 insertions, 12 deletions
diff --git a/games-emulation/zsnes/ChangeLog b/games-emulation/zsnes/ChangeLog index e28f88197427..1540db959478 100644 --- a/games-emulation/zsnes/ChangeLog +++ b/games-emulation/zsnes/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for games-emulation/zsnes # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/ChangeLog,v 1.23 2007/01/29 17:04:23 drizzt Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/ChangeLog,v 1.24 2007/01/29 21:10:31 drizzt Exp $ + + 29 Jan 2007; Timothy Redaelli <drizzt@gentoo.org> zsnes-1.51.ebuild: + Add custom-cflags use, also disable libao on amd64. *zsnes-1.51 (29 Jan 2007) diff --git a/games-emulation/zsnes/zsnes-1.51.ebuild b/games-emulation/zsnes/zsnes-1.51.ebuild index c04965474792..318a15afeae5 100644 --- a/games-emulation/zsnes/zsnes-1.51.ebuild +++ b/games-emulation/zsnes/zsnes-1.51.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.51.ebuild,v 1.1 2007/01/29 17:04:23 drizzt Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.51.ebuild,v 1.2 2007/01/29 21:10:31 drizzt Exp $ WANT_AUTOCONF="latest" WANT_AUTOMAKE="latest" -inherit eutils autotools games toolchain-funcs +inherit eutils autotools flag-o-matic games toolchain-funcs DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly" HOMEPAGE="http://www.zsnes.com/ http://ipherswipsite.com/zsnes/" @@ -14,12 +14,12 @@ SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//./}src.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="-* ~amd64 ~x86" -IUSE="ao opengl png" +IUSE="ao custom-cflags opengl png" RDEPEND=">=media-libs/libsdl-1.2.0 >=sys-libs/zlib-1.2.3-r1 amd64? ( app-emulation/emul-linux-x86-sdl ) - ao? ( media-libs/libao ) + !amd64? ( ao? ( media-libs/libao ) ) opengl? ( virtual/opengl ) png? ( media-libs/libpng )" DEPEND="${RDEPEND} @@ -27,6 +27,12 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${PN}_${PV//./_}/src" +pkg_setup() { + if use ao && [[ "${ARCH}" = "amd64" ]]; then + ewarn "libao use flag is disabled on amd64 since deps cannot be met." + fi +} + src_unpack() { unpack ${A} cd "${S}" @@ -36,8 +42,14 @@ src_unpack() { [[ "${ARCH}" = amd64 ]] && epatch "${FILESDIR}"/${P}-gzdirect.patch # Remove hardcoded CFLAGS and LDFLAGS + if use custom-cflags; then + sed -i -e '/^\s*CFLAGS=.* -fomit-frame-pointer /d' \ + configure.in || die + append-flags -fomit-frame-pointer -D__RELEASE__ + else + strip-flags + fi sed -i \ - -e '/^\s*CFLAGS=.* -fomit-frame-pointer /d' \ -e 's:^\s*CFLAGS=.* -I\/usr\/local\/include .*$:CFLAGS="${CFLAGS} -I.":' \ -e '/^\s*LDFLAGS=.* -L\/usr\/local\/lib /d' \ configure.in || die @@ -47,16 +59,24 @@ src_unpack() { src_compile() { tc-export CC + use amd64 && multilib_toolchain_setup x86 + + local myconf + use custom-cflags && myconf="--disable-cpucheck force_arch=no" + + if use ao && [[ "${ARCH}" != amd64 ]]; then + myconf="--enable-ao" + else + myconf="--disable-ao" + fi + egamesconf \ - $(use_enable ao libao) \ $(use_enable png libpng) \ $(use_enable opengl) \ --disable-debug \ - --disable-debugger \ - --disable-cpucheck \ --enable-release \ - force_arch=no \ + ${myconf} \ || die emake || die "emake failed" } @@ -64,8 +84,8 @@ src_compile() { src_install() { dogamesbin zsnes || die "dogamesbin failed" newman linux/zsnes.1 zsnes.6 - dodoc ../docs/{*.txt,README.LINUX} - dohtml -r ../docs/Linux/* + dodoc "${WORKDIR}"/docs/{*.txt,README.LINUX} + dohtml -r "${WORKDIR}"/docs/Linux/* make_desktop_entry zsnes ZSNES zsnes.png doicon "${T}/${PN}.png" prepgamesdirs |