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 <soap@gentoo.org>
This commit is contained in:
David Seifert 2020-11-21 21:38:14 +01:00
parent 94d1d63f0c
commit 02744bab81
No known key found for this signature in database
GPG Key ID: CE36E117202E3842
4 changed files with 115 additions and 48 deletions

View File

@ -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];

View File

@ -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,

View File

@ -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"
}

View File

@ -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}]
virtual/opengl[${MULTILIB_USEDEP}]
x11-libs/gtk+:2[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-lang/nasm-0.98"
PATCHES=(
"${FILESDIR}"/${P}-romsdir.patch
"${FILESDIR}"/${P}-as-needed.patch
"${FILESDIR}"/${P}-ovflfix.patch
"${FILESDIR}"/${P}-gcc34.patch
"${FILESDIR}"/${P}-fno-common.patch
"${FILESDIR}"/${P}-zlib-OF.patch
)
src_configure() {
append-ldflags -Wl,-z,noexecstack
use amd64 && multilib_toolchain_setup x86 #441876
econf \
--disable-gtktest \
--disable-sdltest
}
src_install() {
default
dodoc gens.txt history.txt
newicon pixmaps/gens_small.png gens.png
make_desktop_entry "gens" "Gens"
}