diff --git a/app-emulation/mednafen/mednafen-0.9.38.7.recipe b/app-emulation/mednafen/mednafen-1.22.1.recipe similarity index 76% rename from app-emulation/mednafen/mednafen-0.9.38.7.recipe rename to app-emulation/mednafen/mednafen-1.22.1.recipe index e349738c8..3330f647c 100644 --- a/app-emulation/mednafen/mednafen-0.9.38.7.recipe +++ b/app-emulation/mednafen/mednafen-1.22.1.recipe @@ -28,11 +28,12 @@ HOMEPAGE="http://mednafen.fobby.net/" COPYRIGHT="2005-2015 Mednafen Team" LICENSE="GNU GPL v2" REVISION="1" -SOURCE_URI="http://mednafen.fobby.net/releases/files/mednafen-$portVersion.tar.bz2" -CHECKSUM_SHA256="1bb3beef883a325c35d1a1ce14959c307a4c321f2ea29d4ddb216c6dd03aded8" +SOURCE_URI="http://mednafen.github.io/releases/files/mednafen-$portVersion.tar.xz" +CHECKSUM_SHA256="f5b502e9f2f615c8b69fa1e151da20ab387377c72748cd8e19deb75a432ecfd2" SOURCE_DIR="mednafen" PATCHES="mednafen-unistd.patch - mednafen-signals.patch" + mednafen-signals.patch + mednafen-$portVersion.patchset" ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" SECONDARY_ARCHITECTURES="?x86" @@ -47,8 +48,11 @@ REQUIRES=" lib:libGLU$secondaryArchSuffix lib:libiconv$secondaryArchSuffix lib:libintl$secondaryArchSuffix - lib:libSDL$secondaryArchSuffix + lib:liblzo2$secondaryArchSuffix + lib:libmpcdec$secondaryArchSuffix + lib:libSDL2_2.0$secondaryArchSuffix lib:libsndfile$secondaryArchSuffix + lib:libvorbisidec$secondaryArchSuffix lib:libz$secondaryArchSuffix " @@ -57,12 +61,17 @@ BUILD_REQUIRES=" devel:libGLU$secondaryArchSuffix devel:libiconv$secondaryArchSuffix devel:libintl$secondaryArchSuffix - devel:libSDL$secondaryArchSuffix + devel:liblzo2$secondaryArchSuffix + devel:libmpcdec$secondaryArchSuffix + devel:libsdl2$secondaryArchSuffix devel:libsndfile$secondaryArchSuffix + devel:libvorbisidec$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" haiku${secondaryArchSuffix}_devel + cmd:aclocal + cmd:autoreconf cmd:awk cmd:bison cmd:gcc$secondaryArchSuffix @@ -83,7 +92,12 @@ PATCH() BUILD() { - runConfigure ./configure + autoreconf -vfi + runConfigure ./configure \ + --with-external-mpcdec \ + --with-external-tremor \ + --with-external-lzo + make $jobArgs } diff --git a/app-emulation/mednafen/patches/mednafen-1.22.1.patchset b/app-emulation/mednafen/patches/mednafen-1.22.1.patchset new file mode 100644 index 000000000..847168911 --- /dev/null +++ b/app-emulation/mednafen/patches/mednafen-1.22.1.patchset @@ -0,0 +1,72 @@ +From a026443b62d64cca452b9304c31ce50795399949 Mon Sep 17 00:00:00 2001 +From: miqlas +Date: Sat, 13 Apr 2019 18:55:11 +0200 +Subject: applying patch mednafen-unistd.patch + + +diff --git a/src/mempatcher.cpp b/src/mempatcher.cpp +index 9995db2..fd3306b 100644 +--- a/src/mempatcher.cpp ++++ b/src/mempatcher.cpp +@@ -31,6 +31,7 @@ + #include "mempatcher.h" + #include "FileStream.h" + #include "MemoryStream.h" ++#include + + namespace Mednafen + { +-- +2.21.0 + + +From f9adbbe2f8b0a07779fbb9ffd2d6f0efb49a166e Mon Sep 17 00:00:00 2001 +From: miqlas +Date: Sat, 13 Apr 2019 18:55:11 +0200 +Subject: applying patch mednafen-signals.patch + + +diff --git a/src/drivers/main.cpp b/src/drivers/main.cpp +index ff7d59a..1f999ab 100644 +--- a/src/drivers/main.cpp ++++ b/src/drivers/main.cpp +@@ -481,7 +481,7 @@ static void CreateDirs(void) + } + + static bool volatile SignalSafeExitWanted = false; +-#if defined(HAVE_SIGNAL) || defined(HAVE_SIGACTION) ++#if 0 + static const char *SiginfoString = NULL; + typedef struct + { +-- +2.21.0 + + +From 1a85c7774c56a25761446f108ee6c4713010d6a0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Tue, 16 Apr 2019 10:38:48 +0200 +Subject: Enable PIC/PIE + + +diff --git a/configure.ac b/configure.ac +index 10cd75b..ddec364 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -125,12 +125,7 @@ dnl -mfunction-return=keep, -mindirect-branch=keep, -mno-indirect-branch-registe + dnl + CODEGEN_FLAGS="" + +-AX_CFLAGS_GCC_OPTION([-fno-pic], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-pie], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-PIC], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-fno-PIE], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-nopie], CODEGEN_FLAGS) +-AX_CFLAGS_GCC_OPTION([-no-pie], CODEGEN_FLAGS) ++ + + AX_CFLAGS_GCC_OPTION([-fwrapv], CODEGEN_FLAGS) + AX_CFLAGS_GCC_OPTION([-fjump-tables], CODEGEN_FLAGS) +-- +2.21.0 + diff --git a/app-emulation/mednafen/patches/mednafen-signals.patch b/app-emulation/mednafen/patches/mednafen-signals.patch deleted file mode 100644 index d294eb542..000000000 --- a/app-emulation/mednafen/patches/mednafen-signals.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 829e5a683e69191a1af9a38102339b9ab972794f Mon Sep 17 00:00:00 2001 -From: Augustin Cavalier -Date: Sun, 6 Mar 2016 14:57:13 -0500 -Subject: [PATCH] main: Don't use the custom signal handler. - ---- - src/drivers/main.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/drivers/main.cpp b/src/drivers/main.cpp -index 36b5408..dcfb48d 100644 ---- a/src/drivers/main.cpp -+++ b/src/drivers/main.cpp -@@ -286,7 +286,7 @@ static void CreateDirs(void) - } - } - --#if defined(HAVE_SIGNAL) || defined(HAVE_SIGACTION) -+#if 0 - - static const char *SiginfoString = NULL; - static bool volatile SignalSafeExitWanted = false; -@@ -1273,7 +1273,7 @@ void PumpWrap(void) - krepeat = 0; - } - -- #if defined(HAVE_SIGNAL) || defined(HAVE_SIGACTION) -+ #if 0 - if(SignalSafeExitWanted) - NeedExitNow = true; - #endif -@@ -1739,7 +1739,7 @@ int main(int argc, char *argv[]) - - SDL_EnableUNICODE(1); - -- #if defined(HAVE_SIGNAL) || defined(HAVE_SIGACTION) -+ #if 0 - SetSignals(CloseStuff); - #endif - -@@ -1912,7 +1912,7 @@ for(int zgi = 1; zgi < argc; zgi++)// start game load test loop - MDFND_DestroyMutex(VTMutex); - MDFND_DestroyMutex(EVMutex); - -- #if defined(HAVE_SIGNAL) || defined(HAVE_SIGACTION) -+ #if 0 - SetSignals(SIG_IGN); - #endif - --- -2.7.0 - diff --git a/app-emulation/mednafen/patches/mednafen-unistd.patch b/app-emulation/mednafen/patches/mednafen-unistd.patch deleted file mode 100644 index fa65c3742..000000000 --- a/app-emulation/mednafen/patches/mednafen-unistd.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b22df22583fef8b9100e239de6184af1f6863de5 Mon Sep 17 00:00:00 2001 -From: waddlesplash -Date: Sun, 6 Mar 2016 12:42:53 -0500 -Subject: [PATCH] mempatcher: Include unistd.h, as unlink(3) is used. - -Some systems (e.g. Haiku) which have strict(er) POSIX implementations -require this. ---- - src/mempatcher.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/mempatcher.cpp b/src/mempatcher.cpp -index a7e58ca..1c41b8d 100644 ---- a/src/mempatcher.cpp -+++ b/src/mempatcher.cpp -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #include - - #include "general.h" --- -2.7.0 -