diff --git a/app-emulation/mednafen/mednafen-0.9.26.recipe b/app-emulation/mednafen/mednafen-0.9.26.recipe deleted file mode 100644 index dc8efb9ed..000000000 --- a/app-emulation/mednafen/mednafen-0.9.26.recipe +++ /dev/null @@ -1,35 +0,0 @@ -DESCRIPTION=" -A portable, utilizing OpenGL and SDL, argument(command-line)-driven \ -multi-system emulator -" -HOMEPAGE="http://mednafen.sourceforge.net/" -SOURCE_URI="http://sourceforge.net/projects/mednafen/files/Mednafen/0.9.26-WIP/mednafen-0.9.26-wip.tar.bz2/download" -CHECKSUM_MD5="cf4eadb057e91c59b181d07bc12245f0" -REVISION="1" -STATUS_HAIKU="stable" -MESSAGE="This port builds only with gcc4. Use 'setgcc gcc4' before building." -DEPEND="media-libs/libsdl >= 1.2.15, - dev-libs/libcdio >= 0.82, - media-libs/libsndfile >= 1.0.21" - -BUILD() -{ - cd mednafen - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make -} - -INSTALL() -{ - cd mednafen - make install -} - -TEST() -{ - cd mednafen - make check -} - -LICENSE="GNU GPL v2" -COPYRIGHT="2005-2012 Mednafen Team" diff --git a/app-emulation/mednafen/mednafen-0.9.38.7.recipe b/app-emulation/mednafen/mednafen-0.9.38.7.recipe new file mode 100644 index 000000000..0eff40fdf --- /dev/null +++ b/app-emulation/mednafen/mednafen-0.9.38.7.recipe @@ -0,0 +1,93 @@ +SUMMARY="Emulator for various Nintendo, Sega, etc. consoles" +DESCRIPTION="Mednafen is a portable, utilizing OpenGL and SDL, \ +argument-driven multi-system emulator. Mednafen has the ability to remap \ +hotkey functions and virtual system inputs to a keyboard, a joystick, or \ +both simultaneously. Save states are supported, as is real-time game \ +rewinding. Screen snapshots may be taken, in the PNG file format, at the \ +press of a button. Mednafen can record audiovisual movies in the QuickTime \ +file format, with several different lossless codecs supported. + +The following systems are supported (refer to the emulation module \ +documentation for more details): \ + - Atari Lynx + - Neo Geo Pocket (Color) + - WonderSwan + - GameBoy (Color) + - GameBoy Advance + - Nintendo Entertainment System + - Super Nintendo Entertainment System/Super Famicom + - Virtual Boy + - PC Engine/TurboGrafx 16 (CD) + - SuperGrafx + - PC-FX + - Sega Game Gear + - Sega Genesis/Megadrive + - Sega Master System + - Sony PlayStation" +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_DIR="mednafen" +PATCHES="mednafen-unistd.patch + mednafen-signals.patch" + +ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + mednafen$secondaryArchSuffix = $portVersion + cmd:mednafen$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libsndfile$secondaryArchSuffix + lib:libSDL$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libGLU$secondaryArchSuffix + " + +BUILD_REQUIRES=" + devel:libz$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + devel:libsndfile$secondaryArchSuffix + devel:libSDL$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libGLU$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel + cmd:awk + cmd:sed + cmd:grep + cmd:gettext + cmd:msgfmt + cmd:bison + cmd:pkg_config$secondaryArchSuffix + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " + +PATCH() +{ + sed -i "s/socket\; do/network\; do/" configure + # otherwise it won't find gethostbyname(), etc. +} + +BUILD() +{ + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install +} diff --git a/app-emulation/mednafen/patches/mednafen-0.9.26.patch b/app-emulation/mednafen/patches/mednafen-0.9.26.patch deleted file mode 100644 index 64199c1fe..000000000 --- a/app-emulation/mednafen/patches/mednafen-0.9.26.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur mednafen/mednafen/tremor/misc.h mednafen-haiku/mednafen/tremor/misc.h ---- mednafen/mednafen/tremor/misc.h 2012-03-29 20:58:54.021757952 +0000 -+++ mednafen-haiku/mednafen/tremor/misc.h 2013-01-05 18:21:51.628883456 +0000 -@@ -15,6 +15,9 @@ - - ********************************************************************/ - -+//Haiku -+#include -+ - #ifndef _V_RANDOM_H_ - #define _V_RANDOM_H_ - #include "ivorbiscodec.h" diff --git a/app-emulation/mednafen/patches/mednafen-signals.patch b/app-emulation/mednafen/patches/mednafen-signals.patch new file mode 100644 index 000000000..d294eb542 --- /dev/null +++ b/app-emulation/mednafen/patches/mednafen-signals.patch @@ -0,0 +1,52 @@ +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 new file mode 100644 index 000000000..fa65c3742 --- /dev/null +++ b/app-emulation/mednafen/patches/mednafen-unistd.patch @@ -0,0 +1,26 @@ +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 +