diff options
Diffstat (limited to 'games-emulation/fakenes/fakenes-0.5.8-r3.ebuild')
-rw-r--r-- | games-emulation/fakenes/fakenes-0.5.8-r3.ebuild | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/games-emulation/fakenes/fakenes-0.5.8-r3.ebuild b/games-emulation/fakenes/fakenes-0.5.8-r3.ebuild new file mode 100644 index 000000000000..e8aeb3a8b2c0 --- /dev/null +++ b/games-emulation/fakenes/fakenes-0.5.8-r3.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit desktop flag-o-matic toolchain-funcs gnome2-utils + +DESCRIPTION="Portable, Open Source NES emulator which is written mostly in C" +HOMEPAGE="http://fakenes.sourceforge.net/" +SRC_URI="mirror://sourceforge/fakenes/${P}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="openal opengl zlib" + +RDEPEND=" + >=media-libs/allegro-4.4.1.1:0[opengl?] + dev-games/hawknl + openal? ( + media-libs/openal + media-libs/freealut + ) + zlib? ( sys-libs/zlib ) +" +DEPEND="${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + default + sed -i \ + -e "s:openal-config:pkg-config openal:" \ + build/openal.cbd || die + + sed -i \ + -e "s:LIBAGL = agl:LIBAGL = alleggl:" \ + build/alleggl.cbd || die + eapply "${FILESDIR}"/${P}-{underlink,zlib}.patch +} + +src_compile() { + local myconf + + append-ldflags -Wl,-z,noexecstack + + echo "$(tc-getBUILD_CC) cbuild.c -o cbuild" + $(tc-getBUILD_CC) cbuild.c -o cbuild || die "cbuild build failed" + + use openal || myconf="$myconf -openal" + use opengl || myconf="$myconf -alleggl" + use zlib || myconf="$myconf -zlib" + + LD="$(tc-getCC) ${CFLAGS}" ./cbuild ${myconf} --verbose || die "cbuild failed" +} + +src_install() { + dobin fakenes + insinto "/usr/share/${PN}" + doins support/* + + cd docs && HTML_DOCS="faq.html" einstalldocs && cd .. + + newicon -s 32 support/icon-32x32.png ${PN}.png + make_desktop_entry ${PN} "FakeNES" +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} |