---- src/effect/2xsaimmx.asm
-+++ src/effect/2xsaimmx.asm
+--- a/src/effect/2xsaimmx.asm
++++ b/src/effect/2xsaimmx.asm
@@ -2107,3 +2107,7 @@
final1b resb 8
final2a resb 8
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
---- src/effect/effect_i386.asm
-+++ src/effect/effect_i386.asm
+--- a/src/effect/effect_i386.asm
++++ b/src/effect/effect_i386.asm
@@ -88,3 +88,7 @@
emms
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
---- src/effect/hq2x16.asm
-+++ src/effect/hq2x16.asm
+--- a/src/effect/hq2x16.asm
++++ b/src/effect/hq2x16.asm
@@ -1935,3 +1935,7 @@
dd ..@cross8, ..@flag0, ..@flag0, ..@flag0,\r
dd ..@flag0, ..@flag0, ..@flag0, ..@flag0\r
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
---- src/effect/hq3x16.asm
-+++ src/effect/hq3x16.asm
+--- a/src/effect/hq3x16.asm
++++ b/src/effect/hq3x16.asm
@@ -2520,3 +2520,7 @@
dd ..@cross8, ..@flag0, ..@flag0, ..@flag0,\r
dd ..@flag0, ..@flag0, ..@flag0, ..@flag0\r
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
---- src/memcpy.S
-+++ src/memcpy.S
+--- a/src/memcpy.S
++++ b/src/memcpy.S
@@ -495,4 +495,8 @@
Lmemcpy_bsrcul1l4:
+#ifdef __ELF__
+.section .note.GNU-stack,"",@progbits
+#endif
---- src/raze/Makefile.am
-+++ src/raze/Makefile.am
+--- a/src/raze/Makefile.am
++++ b/src/raze/Makefile.am
@@ -20,7 +20,7 @@
$(srcdir)/strip_ $< $@
# This assembles the file, once it's been pre-processed
raze.o: raze2.asm
---- src/raze/raze.asm
-+++ src/raze/raze.asm
+--- a/src/raze/raze.asm
++++ b/src/raze/raze.asm
@@ -4259,3 +4259,6 @@
;- the end ------------------------------------------------------------------;
+%ifidn ___OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
---- src/screen_i386.asm
-+++ src/screen_i386.asm
+--- a/src/screen_i386.asm
++++ b/src/screen_i386.asm
@@ -96,3 +96,6 @@
endproc
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
---- src/star/star.c
-+++ src/star/star.c
+--- a/src/star/star.c
++++ b/src/star/star.c
@@ -2431,6 +2431,10 @@
*/
static void suffixes(void) {
}
/****************************************************************************
---- src/video_i386.asm
-+++ src/video_i386.asm
+--- a/src/video_i386.asm
++++ b/src/video_i386.asm
@@ -86,3 +86,7 @@
popa
--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools desktop flag-o-matic
+
+DESCRIPTION="A NeoGeo emulator"
+HOMEPAGE="https://code.google.com/p/gngeo/"
+SRC_URI="https://gngeo.googlecode.com/files/${P}.tar.gz
+ https://storage.googleapis.com/google-code-archive/v2/code.google.com/gngeo/logo.png -> ${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/opengl
+ media-libs/libsdl[joystick,opengl,sound,video]
+ sys-libs/zlib[minizip]"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+ eapply \
+ "${FILESDIR}"/${P}-execstacks.patch \
+ "${FILESDIR}"/${P}-zlib.patch \
+ "${FILESDIR}"/${P}-concurrentMake.patch \
+ "${FILESDIR}"/${P}-cflags.patch
+ mv configure.in configure.ac || die
+ eautoreconf
+ append-cflags -std=gnu89 # build with gcc5 (bug #571056)
+}
+
+src_configure() {
+ econf --disable-i386asm
+}
+
+src_install() {
+ DOCS=( AUTHORS FAQ NEWS README* TODO sample_gngeorc )
+ default
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN}
+}