From 172ab570e9bb2f7baa7af66f2fe1718c38140cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Arroyo=20Calle?= Date: Sun, 15 Dec 2013 02:06:13 +0000 Subject: [PATCH] VisualBoyAdvance 1.8 --- .../patches/Makefile.am.patch | 91 +++++++++++++++++++ .../visualboyadvance/patches/Util.patch | 26 ++++++ .../patches/configure.in.patch | 12 +++ .../patches/visualboyadvance-1.7.2.patch | 11 --- .../visualboyadvance-1.7.2.recipe | 33 ------- .../visualboyadvance-1.8.recipe | 70 ++++++++++++++ 6 files changed, 199 insertions(+), 44 deletions(-) create mode 100644 games-emulation/visualboyadvance/patches/Makefile.am.patch create mode 100644 games-emulation/visualboyadvance/patches/Util.patch create mode 100644 games-emulation/visualboyadvance/patches/configure.in.patch delete mode 100644 games-emulation/visualboyadvance/patches/visualboyadvance-1.7.2.patch delete mode 100644 games-emulation/visualboyadvance/visualboyadvance-1.7.2.recipe create mode 100644 games-emulation/visualboyadvance/visualboyadvance-1.8.recipe diff --git a/games-emulation/visualboyadvance/patches/Makefile.am.patch b/games-emulation/visualboyadvance/patches/Makefile.am.patch new file mode 100644 index 000000000..9aef1e939 --- /dev/null +++ b/games-emulation/visualboyadvance/patches/Makefile.am.patch @@ -0,0 +1,91 @@ +diff --git a/src/sdl/Makefile.am b/src/sdl/Makefile.am +index bcc9f92..ba6db7a 100644 +--- a/src/sdl/Makefile.am ++++ b/src/sdl/Makefile.am +@@ -1,7 +1,5 @@ + bin_PROGRAMS = VisualBoyAdvance + +-noinst_PROGRAMS = TestEmu +- + VisualBoyAdvance_SOURCES = \ + SDL.cpp \ + debugger.cpp \ +@@ -79,78 +77,6 @@ VisualBoyAdvance_LDADD = @VBA_LIBS@ @SDL_LIBS@ + + VisualBoyAdvance_DEPENDENCIES = @VBA_LIBS@ + +-TestEmu_SOURCES = \ +- TestEmu.cpp \ +- debugger.cpp \ +- debugger.h \ +- ../2xSaI.cpp \ +- ../AutoBuild.h \ +- ../Cheats.cpp \ +- ../Cheats.h \ +- ../EEprom.cpp \ +- ../EEprom.h \ +- ../Flash.cpp \ +- ../Flash.h \ +- ../GBA.cpp \ +- ../GBA.h \ +- ../GBAinline.h \ +- ../Gfx.cpp \ +- ../Gfx.h \ +- ../Globals.cpp \ +- ../Globals.h \ +- ../Mode0.cpp \ +- ../Mode1.cpp \ +- ../Mode2.cpp \ +- ../Mode3.cpp \ +- ../Mode4.cpp \ +- ../Mode5.cpp \ +- ../NLS.h \ +- ../Port.h \ +- ../RTC.cpp \ +- ../RTC.h \ +- ../Sound.cpp \ +- ../Sound.h \ +- ../Sram.cpp \ +- ../Sram.h \ +- ../System.h \ +- ../Text.cpp \ +- ../Text.h \ +- ../Util.cpp \ +- ../Util.h \ +- ../admame.cpp \ +- ../agbprint.cpp \ +- ../agbprint.h \ +- ../arm-new.h \ +- ../armdis.cpp \ +- ../armdis.h \ +- ../bios.cpp \ +- ../bios.h \ +- ../elf.cpp \ +- ../elf.h \ +- ../expr-lex.cpp \ +- ../expr.cpp \ +- ../expr.cpp.h \ +- ../exprNode.cpp \ +- ../exprNode.h \ +- ../hq2x.cpp \ +- ../hq2x.h \ +- ../interp.h \ +- ../lq2x.h \ +- ../memgzio.c \ +- ../memgzio.h \ +- ../motionblur.cpp \ +- ../pixel.cpp \ +- ../remote.cpp \ +- ../scanline.cpp \ +- ../simple2x.cpp \ +- ../thumb.h \ +- ../unzip.cpp \ +- ../unzip.h +- +-TestEmu_LDADD = @VBA_LIBS@ @SDL_LIBS@ +- +-TestEmu_DEPENDENCIES = @VBA_LIBS@ +- + AM_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -DSDL \ diff --git a/games-emulation/visualboyadvance/patches/Util.patch b/games-emulation/visualboyadvance/patches/Util.patch new file mode 100644 index 000000000..891ac1d84 --- /dev/null +++ b/games-emulation/visualboyadvance/patches/Util.patch @@ -0,0 +1,26 @@ +diff --git a/src/Util.cpp b/src/Util.cpp +index 9e3b7d9..6ab1614 100644 +--- a/src/Util.cpp ++++ b/src/Util.cpp +@@ -86,8 +86,12 @@ bool utilWritePNGFile(const char *fileName, int w, int h, u8 *pix) + fclose(fp); + return false; + } ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + ++#else + if(setjmp(png_ptr->jmpbuf)) { ++#endif ++ if(setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr,NULL); + fclose(fp); + return false; +@@ -992,7 +996,7 @@ void utilWriteData(gzFile gzFile, variable_desc *data) + + gzFile utilGzOpen(const char *file, const char *mode) + { +- utilGzWriteFunc = (int (ZEXPORT *)(void *,void * const, unsigned int))gzwrite; ++ utilGzWriteFunc = (int (ZEXPORT *)(gzFile,const voidp, unsigned int))gzwrite; + utilGzReadFunc = gzread; + utilGzCloseFunc = gzclose; + diff --git a/games-emulation/visualboyadvance/patches/configure.in.patch b/games-emulation/visualboyadvance/patches/configure.in.patch new file mode 100644 index 000000000..0ff81324a --- /dev/null +++ b/games-emulation/visualboyadvance/patches/configure.in.patch @@ -0,0 +1,12 @@ +diff --git a/configure.in b/configure.in +index 159bf87..1ad2fac 100644 +--- a/configure.in ++++ b/configure.in +@@ -64,6 +64,7 @@ dnl Checks for libraries. + AC_CHECK_LIB(z, gzopen, + , AC_MSG_ERROR([*** Cannot compile without zlib.])) + AC_CHECK_LIB(pthread, pthread_yield) ++AC_CHECK_LIB(network, socket) + + PKG_CHECK_MODULES(LIBPNG, libpng) + CPPFLAGS="$CPPFLAGS $LIBPNG_CFLAGS" diff --git a/games-emulation/visualboyadvance/patches/visualboyadvance-1.7.2.patch b/games-emulation/visualboyadvance/patches/visualboyadvance-1.7.2.patch deleted file mode 100644 index 1f45d7d7b..000000000 --- a/games-emulation/visualboyadvance/patches/visualboyadvance-1.7.2.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur VisualBoyAdvance-1.7.2/configure.in VisualBoyAdvance-1.7.2-haiku/configure.in ---- VisualBoyAdvance-1.7.2/configure.in 2004-05-13 21:38:35.039583744 +0000 -+++ VisualBoyAdvance-1.7.2-haiku/configure.in 2010-05-01 03:37:15.941621248 +0000 -@@ -66,6 +66,7 @@ - AC_CHECK_LIB(png, png_create_write_struct, - , AC_MSG_ERROR([*** Cannot compile without libpng.]), [-lz]) - AC_CHECK_LIB(pthread, pthread_yield) -+AC_CHECK_LIB(network, socket) - - dnl Checks for header files. - AC_PATH_X diff --git a/games-emulation/visualboyadvance/visualboyadvance-1.7.2.recipe b/games-emulation/visualboyadvance/visualboyadvance-1.7.2.recipe deleted file mode 100644 index 2cfddb434..000000000 --- a/games-emulation/visualboyadvance/visualboyadvance-1.7.2.recipe +++ /dev/null @@ -1,33 +0,0 @@ -DESCRIPTION="VisualBoyAdvance" -HOMEPAGE="http://vba.ngemu.com" -SRC_URI="http://sourceforge.net/projects/vba/files/VisualBoyAdvance/1.7.2/VisualBoyAdvance-src-1.7.2.tar.gz" -CHECKSUM_MD5="cc02339e3fd8efd9f23121b0a2f81fd8" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="dev-lang/nasm >= 2.03.01 - media-libs/libsdl >= 1.2.14 - media-libs/sdl-mixer >= 1.2.11" - -BUILD() -{ - cd VisualBoyAdvance-1.7.2 - libtoolize --force --copy --install - autoreconf -i - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - --enable-c-core --disable-profiling --without-mmx - make -} - -INSTALL() -{ - cd VisualBoyAdvance-1.7.2/src - GAMEDIR=`finddir B_APPS_DIRECTORY`/Visualboyadvance - mkdir -p ${DESTDIR}/${GAMEDIR} - cp -af VisualBoyAdvance.cfg ${DESTDIR}/${GAMEDIR} - cd sdl - cp -af TestEmu ${DESTDIR}/${GAMEDIR} - cp -af VisualBoyAdvance ${DESTDIR}/${GAMEDIR} -} - -LICENSE="GNU GPL v2" -COPYRIGHT="2002 Forgotten" diff --git a/games-emulation/visualboyadvance/visualboyadvance-1.8.recipe b/games-emulation/visualboyadvance/visualboyadvance-1.8.recipe new file mode 100644 index 000000000..65440f416 --- /dev/null +++ b/games-emulation/visualboyadvance/visualboyadvance-1.8.recipe @@ -0,0 +1,70 @@ +SUMMARY="VisualBoyAdvance, a GBA Emulator" +DESCRIPTION="VisualBoyAdvance is a Game Boy Advance emulator which runs your prefered ROMS" +HOMEPAGE="http://vba.ngemu.com" +SRC_URI="git://git.debian.org/git/pkg-games/visualboyadvance" +REVISION="1" +LICENSE="GNU GPL v2" +COPYRIGHT="2002-2004 Forgotten" + +ARCHITECTURES="x86 ?x86_64" +if [ $effectiveArchitecture != x86_gcc2 ]; then + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86 ?x86_64" + +PROVIDES=" + visualboyadvance$secondaryArchSuffix = $portVersion + app:visualboyadvance$secondaryArchSuffix = $portVersion +" + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libsdl$secondaryArchSuffix + lib:libsdl_mixer$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libpng$secondaryArchSuffix +" +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libsdl$secondaryArchSuffix + devel:libsdl_mixer$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libpng$secondaryArchSuffix +" +BUILD_PREREQUIRES=" + cmd:nasm$secondaryArchSuffix + cmd:make + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize + cmd:autoconf + cmd:aclocal + cmd:pkg_config +" + +SOURCE_DIR="VisualBoyAdvance-1.8" + +PATCHES=" + Util.patch + Makefile.am.patch + configure.in.patch +" + +BUILD() +{ + libtoolize --force --copy --install + autoreconf -i + runConfigure ./configure --enable-c-core --disable-profilling --without-mmx + make +} + +INSTALL() +{ + cd src + GAMEDIR=$appsDir/Visualboyadvance + mkdir -p ${GAMEDIR} + cp VisualBoyAdvance.cfg ${GAMEDIR} + cp sdl/VisualBoyAdvance ${GAMEDIR} + + addAppDeskbarSymlink ${GAMEDIR}/VisualBoyAdvance +}