1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit epatch toolchain-funcs flag-o-matic
7 PATCH="${P/-/_}-10.diff"
8 DESCRIPTION="NES emulation for Linux/x86"
9 HOMEPAGE="http://nestra.linuxgames.com/"
10 SRC_URI="http://nestra.linuxgames.com/${P}.tar.gz
11 mirror://debian/pool/contrib/n/nestra/${PATCH}.gz"
15 KEYWORDS="~amd64 ~x86"
18 RDEPEND="x11-libs/libX11[abi_x86_32(-)]"
25 epatch "${WORKDIR}"/${PATCH}
26 eapply "${FILESDIR}"/${P}-exec-stack.patch
27 eapply "${FILESDIR}"/${P}-include.patch
29 append-ldflags -Wl,-z,noexecstack
30 use amd64 && multilib_toolchain_setup x86
33 -e "s:-L/usr/X11R6/lib:${LDFLAGS}:" \
35 -e "s:gcc:$(tc-getCC) ${CFLAGS}:" \
36 -e "s:ld:$(tc-getLD) -m elf_i386 $(raw-ldflags):" \
41 use amd64 && multilib_toolchain_setup x86