diff options
author | Pacho Ramos <pacho@gentoo.org> | 2018-04-29 11:18:15 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2018-04-29 13:25:20 +0200 |
commit | 5e2a03877a1d861a33fef173c274b3ccee5f2820 (patch) | |
tree | 3b4e48dcf7c2acc6242ec3d46f9ff42b414f36f2 /games-emulation/fakenes | |
parent | games-emulation/emutos: Drop old (diff) | |
download | gentoo-5e2a03877a1d861a33fef173c274b3ccee5f2820.tar.gz gentoo-5e2a03877a1d861a33fef173c274b3ccee5f2820.tar.bz2 gentoo-5e2a03877a1d861a33fef173c274b3ccee5f2820.zip |
games-emulation/fakenes: Stop using games.eclass
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'games-emulation/fakenes')
-rw-r--r-- | games-emulation/fakenes/fakenes-0.5.8-r3.ebuild | 77 | ||||
-rw-r--r-- | games-emulation/fakenes/files/fakenes-0.5.8-underlink.patch | 4 |
2 files changed, 79 insertions, 2 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 +} diff --git a/games-emulation/fakenes/files/fakenes-0.5.8-underlink.patch b/games-emulation/fakenes/files/fakenes-0.5.8-underlink.patch index a5f6f699fc7c..48f37a5fd83d 100644 --- a/games-emulation/fakenes/files/fakenes-0.5.8-underlink.patch +++ b/games-emulation/fakenes/files/fakenes-0.5.8-underlink.patch @@ -1,5 +1,5 @@ ---- build/hawknl.cbd.old 2011-06-22 17:28:16.733408930 +0200 -+++ build/hawknl.cbd 2011-06-22 17:28:29.217203187 +0200 +--- a/build/hawknl.cbd.old 2011-06-22 17:28:16.733408930 +0200 ++++ b/build/hawknl.cbd 2011-06-22 17:28:29.217203187 +0200 @@ -22,4 +22,4 @@ # -- |