dev-qt/qtdeclarative: stable 5.14.2-r2 for ppc, bug #719732
[gentoo.git] / games-emulation / nestra / nestra-0.66-r3.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit epatch toolchain-funcs flag-o-matic
6
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"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 RDEPEND="x11-libs/libX11[abi_x86_32(-)]"
19 DEPEND="${RDEPEND}"
20
21 S="${WORKDIR}/${PN}"
22
23 src_prepare() {
24         default
25         epatch "${WORKDIR}"/${PATCH}
26         eapply "${FILESDIR}"/${P}-exec-stack.patch
27         eapply "${FILESDIR}"/${P}-include.patch
28
29         append-ldflags -Wl,-z,noexecstack
30         use amd64 && multilib_toolchain_setup x86
31
32         sed -i \
33                 -e "s:-L/usr/X11R6/lib:${LDFLAGS}:" \
34                 -e 's:-O2 ::' \
35                 -e "s:gcc:$(tc-getCC) ${CFLAGS}:" \
36                 -e "s:ld:$(tc-getLD) -m elf_i386 $(raw-ldflags):" \
37                 Makefile || die
38 }
39
40 src_compile() {
41         use amd64 && multilib_toolchain_setup x86
42         default
43 }
44
45 src_install() {
46         dobin nestra
47         einstalldocs
48         doman nestra.6
49 }