games-emulation/gens: Drop games.eclass, add amd64 support (#441876)
authorPacho Ramos <pacho@gentoo.org>
Sun, 29 Apr 2018 09:49:23 +0000 (11:49 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 29 Apr 2018 11:25:46 +0000 (13:25 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-emulation/gens/files/gens-2.15.5-as-needed.patch
games-emulation/gens/files/gens-2.15.5-ovflfix.patch
games-emulation/gens/files/gens-2.15.5-romsdir.patch
games-emulation/gens/gens-2.15.5-r1.ebuild [new file with mode: 0644]

index 02aed32b802c236ef5e76a7aac5fa710859225ed..2b58e7f94b33e59818111d1c81106b3def7e67f1 100644 (file)
@@ -1,5 +1,5 @@
---- configure.old       2009-02-04 14:41:40.000000000 +0100
-+++ configure   2009-02-04 14:48:52.000000000 +0100
+--- a/configure.old       2009-02-04 14:41:40.000000000 +0100
++++ b/configure   2009-02-04 14:48:52.000000000 +0100
 @@ -4929,7 +4929,7 @@
         { echo "$as_me:$LINENO: result: $with_opengl" >&5
  echo "${ECHO_T}$with_opengl" >&6; }
index f5b98a54245f8c831bcc1ffc34f8e81938244cca..fdbef69dba0a776b8cd3b20e673c03d28e38579c 100644 (file)
@@ -1,5 +1,5 @@
---- src/gens/gens_core/cpu/68k/cpu_68k.c.old   2010-10-28 09:34:52.000000000 +0200
-+++ src/gens/gens_core/cpu/68k/cpu_68k.c       2010-10-28 09:35:53.000000000 +0200
+--- a/src/gens/gens_core/cpu/68k/cpu_68k.c.old 2010-10-28 09:34:52.000000000 +0200
++++ b/src/gens/gens_core/cpu/68k/cpu_68k.c     2010-10-28 09:35:53.000000000 +0200
 @@ -239,8 +239,8 @@
    memset (Ram_Word_2M, 0, 256 * 1024);
    memset (Ram_Word_1M, 0, 256 * 1024);
index 606efe2dd6f9aba8ed6aa66927d105d95d65e4ed..c885552f12d52b09b323bb6be185260e335f5e25 100644 (file)
@@ -1,6 +1,6 @@
 diff -ruN gens-rc3.5-opengl/src/gens/util/rom.c gens-rc3.5-opengl-patched/src/gens/util/rom.c
---- src/gens/util/file/rom.c   2005-01-10 22:24:01.000000000 +0100
-+++ src/gens/util/file/rom.c   2006-10-29 14:58:14.000000000 +0100
+--- a/src/gens/util/file/rom.c 2005-01-10 22:24:01.000000000 +0100
++++ b/src/gens/util/file/rom.c 2006-10-29 14:58:14.000000000 +0100
 @@ -411,6 +411,9 @@
      create_file_chooser_dialog ("Open Rom", GTK_FILE_CHOOSER_ACTION_OPEN);
  //      fileselection_set_dir (fd.filesel, Rom_Dir);
diff --git a/games-emulation/gens/gens-2.15.5-r1.ebuild b/games-emulation/gens/gens-2.15.5-r1.ebuild
new file mode 100644 (file)
index 0000000..de49e5f
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop flag-o-matic
+
+DESCRIPTION="A Sega Genesis/CD/32X emulator"
+HOMEPAGE="https://sourceforge.net/projects/gens/"
+SRC_URI="mirror://sourceforge/gens/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+       virtual/opengl
+       >=media-libs/libsdl-1.2[joystick,video]
+       x11-libs/gtk+:2
+"
+DEPEND="${RDEPEND}
+       >=dev-lang/nasm-0.98
+"
+
+src_prepare() {
+       default
+       eapply \
+               "${FILESDIR}"/${P}-romsdir.patch \
+               "${FILESDIR}"/${P}-as-needed.patch \
+               "${FILESDIR}"/${P}-ovflfix.patch \
+               "${FILESDIR}"/${P}-gcc34.patch
+       sed -i -e '1i#define OF(x) x' src/gens/util/file/unzip.h || die
+       append-ldflags -Wl,-z,noexecstack
+}
+
+src_configure() {
+       use amd64 && multilib_toolchain_setup x86 #441876
+       econf \
+               --disable-gtktest \
+               --disable-sdltest
+}
+
+src_install() {
+       DOCS="AUTHORS BUGS README gens.txt history.txt" \
+               default
+       newicon pixmaps/gens_small.png ${PN}.png
+       make_desktop_entry "${PN}" "Gens"
+}