[gentoo-commits] repo/gentoo:master commit in: games-emulation/gens/, games-emulation/gens/files/

2020-11-21 Thread David Seifert
commit: 02744bab811337194c9f27182e6e912020034221
Author: David Seifert  gentoo  org>
AuthorDate: Sat Nov 21 20:38:14 2020 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Nov 21 20:38:14 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02744bab

games-emulation/gens: Port to EAPI 7

Closes: https://bugs.gentoo.org/654420
Closes: https://bugs.gentoo.org/712982
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: David Seifert  gentoo.org>

 .../gens/files/gens-2.15.5-fno-common.patch| 58 ++
 .../gens/files/gens-2.15.5-zlib-OF.patch   |  7 +++
 games-emulation/gens/gens-2.15.5-r1.ebuild | 48 --
 games-emulation/gens/gens-2.15.5-r2.ebuild | 50 +++
 4 files changed, 115 insertions(+), 48 deletions(-)

diff --git a/games-emulation/gens/files/gens-2.15.5-fno-common.patch 
b/games-emulation/gens/files/gens-2.15.5-fno-common.patch
new file mode 100644
index 000..b4493378e6f
--- /dev/null
+++ b/games-emulation/gens/files/gens-2.15.5-fno-common.patch
@@ -0,0 +1,58 @@
+--- a/src/gens/gens_core/sound/ym2612.c
 b/src/gens/gens_core/sound/ym2612.c
+@@ -241,7 +241,7 @@
+  ***/
+ 
+ 
+-INLINE void
++void
+ CALC_FINC_SL (slot_ * SL, int finc, int kc)
+ {
+   int ksr;
+@@ -284,7 +284,7 @@
+ }
+ 
+ 
+-INLINE void
++void
+ CALC_FINC_CH (channel_ * CH)
+ {
+   int finc, kc;
+@@ -305,7 +305,7 @@
+  ***/
+ 
+ 
+-INLINE void
++void
+ KEY_ON (channel_ * CH, int nsl)
+ {
+   slot_ *SL = &(CH->SLOT[nsl]);   // on recupère le bon pointeur de slot
+@@ -331,7 +331,7 @@
+ }
+ 
+ 
+-INLINE void
++void
+ KEY_OFF (channel_ * CH, int nsl)
+ {
+   slot_ *SL = &(CH->SLOT[nsl]);   // on recupère le bon pointeur de slot
+@@ -351,7 +351,7 @@
+ }
+ 
+ 
+-INLINE void
++void
+ CSM_Key_Control ()
+ {
+   KEY_ON (&YM2612.CHANNEL[2], 0);
+--- a/src/gens/segacd/cd_aspi.c
 b/src/gens/segacd/cd_aspi.c
+@@ -55,7 +55,7 @@
+ DWORD (*Get_ASPI_Version) (void);
+ DWORD (*Send_ASPI_Command) (LPSRB);
+ int ASPI_Command_Running;
+-int CDROM_SPEED;
++extern int CDROM_SPEED;
+ int Num_CD_Drive;
+ int CUR_DEV; // a che serve?
+ int DEV_PAR[8][3];

diff --git a/games-emulation/gens/files/gens-2.15.5-zlib-OF.patch 
b/games-emulation/gens/files/gens-2.15.5-zlib-OF.patch
new file mode 100644
index 000..5a357cc633e
--- /dev/null
+++ b/games-emulation/gens/files/gens-2.15.5-zlib-OF.patch
@@ -0,0 +1,7 @@
+--- a/src/gens/util/file/unzip.h
 b/src/gens/util/file/unzip.h
+@@ -1,3 +1,4 @@
++#define OF(x) x
+ /* unzip.h -- IO for uncompress .zip files using zlib 
+Version 0.15 beta, Mar 19th, 1998,
+ 

diff --git a/games-emulation/gens/gens-2.15.5-r1.ebuild 
b/games-emulation/gens/gens-2.15.5-r1.ebuild
deleted file mode 100644
index de49e5ffa08..000
--- a/games-emulation/gens/gens-2.15.5-r1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# 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"
-}

diff --git a/games-emulation/gens/gens-2.15.5-r2.ebuild 
b/games-emulation/gens/gens-2.15.5-r2.ebuild
new file mode 100644
index 000..7b8c385e9b0
--- /dev/null
+++ b/games-emulation/gens/gens-2.15.5-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MULTILIB_COMPAT=( abi_x86_32 )
+
+inherit desktop flag-o-matic multilib-build
+
+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"
+
+RDEPEND="
+   media-libs/libsdl[${MULTILIB_USEDEP},joystick,video]
+   sys-libs/zlib[${MULTILIB_USEDEP}]
+   virt

[gentoo-commits] repo/gentoo:master commit in: games-emulation/gens/, games-emulation/gens/files/

2018-04-29 Thread Pacho Ramos
commit: bd0466c872ae5d294fbf42d8f598a00387eba67a
Author: Pacho Ramos  gentoo  org>
AuthorDate: Sun Apr 29 09:49:23 2018 +
Commit: Pacho Ramos  gentoo  org>
CommitDate: Sun Apr 29 11:25:46 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd0466c8

games-emulation/gens: Drop games.eclass, add amd64 support (#441876)

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../gens/files/gens-2.15.5-as-needed.patch |  4 +-
 .../gens/files/gens-2.15.5-ovflfix.patch   |  4 +-
 .../gens/files/gens-2.15.5-romsdir.patch   |  4 +-
 games-emulation/gens/gens-2.15.5-r1.ebuild | 48 ++
 4 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/games-emulation/gens/files/gens-2.15.5-as-needed.patch 
b/games-emulation/gens/files/gens-2.15.5-as-needed.patch
index 02aed32b802..2b58e7f94b3 100644
--- a/games-emulation/gens/files/gens-2.15.5-as-needed.patch
+++ b/games-emulation/gens/files/gens-2.15.5-as-needed.patch
@@ -1,5 +1,5 @@
 configure.old   2009-02-04 14:41:40.0 +0100
-+++ configure   2009-02-04 14:48:52.0 +0100
+--- a/configure.old   2009-02-04 14:41:40.0 +0100
 b/configure   2009-02-04 14:48:52.0 +0100
 @@ -4929,7 +4929,7 @@
 { echo "$as_me:$LINENO: result: $with_opengl" >&5
  echo "${ECHO_T}$with_opengl" >&6; }

diff --git a/games-emulation/gens/files/gens-2.15.5-ovflfix.patch 
b/games-emulation/gens/files/gens-2.15.5-ovflfix.patch
index f5b98a54245..fdbef69dba0 100644
--- a/games-emulation/gens/files/gens-2.15.5-ovflfix.patch
+++ b/games-emulation/gens/files/gens-2.15.5-ovflfix.patch
@@ -1,5 +1,5 @@
 src/gens/gens_core/cpu/68k/cpu_68k.c.old   2010-10-28 09:34:52.0 
+0200
-+++ src/gens/gens_core/cpu/68k/cpu_68k.c   2010-10-28 09:35:53.0 
+0200
+--- a/src/gens/gens_core/cpu/68k/cpu_68k.c.old 2010-10-28 09:34:52.0 
+0200
 b/src/gens/gens_core/cpu/68k/cpu_68k.c 2010-10-28 09:35:53.0 
+0200
 @@ -239,8 +239,8 @@
memset (Ram_Word_2M, 0, 256 * 1024);
memset (Ram_Word_1M, 0, 256 * 1024);

diff --git a/games-emulation/gens/files/gens-2.15.5-romsdir.patch 
b/games-emulation/gens/files/gens-2.15.5-romsdir.patch
index 606efe2dd6f..c885552f12d 100644
--- a/games-emulation/gens/files/gens-2.15.5-romsdir.patch
+++ b/games-emulation/gens/files/gens-2.15.5-romsdir.patch
@@ -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.0 +0100
-+++ src/gens/util/file/rom.c   2006-10-29 14:58:14.0 +0100
+--- a/src/gens/util/file/rom.c 2005-01-10 22:24:01.0 +0100
 b/src/gens/util/file/rom.c 2006-10-29 14:58:14.0 +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
index 000..de49e5ffa08
--- /dev/null
+++ b/games-emulation/gens/gens-2.15.5-r1.ebuild
@@ -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"
+}