From acbc567979e6a8579952197379ed05274209f24e Mon Sep 17 00:00:00 2001 From: Jose V Beneyto Date: Wed, 13 Jan 2010 21:30:02 +0100 Subject: [PATCH] reminiscence: added optional patch for disable sdl_mixer when using -DNO_SDL_MIXER flag --- fceux/Pkgfile | 36 ++++++++++++ fceux/README | 7 +++ reminiscence/.md5sum | 1 + reminiscence/Pkgfile | 9 ++- reminiscence/reminiscence-0.1.9.nosound.patch | 56 +++++++++++++++++++ 5 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 fceux/Pkgfile create mode 100644 fceux/README create mode 100644 reminiscence/reminiscence-0.1.9.nosound.patch diff --git a/fceux/Pkgfile b/fceux/Pkgfile new file mode 100644 index 0000000..2692dfa --- /dev/null +++ b/fceux/Pkgfile @@ -0,0 +1,36 @@ +# Description: The all in one NES/Famicon Emulator +# URL: http://fceux.com/ +# Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org +# Depends on: zlib libsdl + +name=fceux +version=2.1.2 +release=1 +source=(http://dl.sourceforge.net/project/fceultra/Source%20Code/$version%20src/$name-$version.src.tar.bz2) + +build() { + cd $name-$version +ls +exit + sed -i Makefile \ + -e "s|\$(shell sdl-config --cflags)|-I$CLFS/usr/include -I$CLFS/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT|" \ + -e "s|\$(shell sdl-config --libs)|-L$CLFS/usr/lib -lSDL -lpthread|" \ + -e "s|CC=gcc|CC=$CC|" \ + -e "s|CPP=gcc|CPP=$CC|" + + make SDLVERSION=$(pkginfo -r $CLFS -i | grep libsdl | awk '{print $2}') + + install -d $PKG/usr/{bin,share/$name,man/man6} + install -m 0755 $name $PKG/usr/share/$name + install -m 0644 data.zip $PKG/usr/share/$name + install -m 0644 $name.6.gz $PKG/usr/man/man6 + + cat > $PKG/usr/bin/$name << __EOF__ +#!/bin/sh + +cd /usr/share/$name +./$name \$@ +cd - >/dev/null +__EOF__ + chmod +x $PKG/usr/bin/$name +} diff --git a/fceux/README b/fceux/README new file mode 100644 index 0000000..20f3603 --- /dev/null +++ b/fceux/README @@ -0,0 +1,7 @@ + +README for fceux + + +NOTES + +Scons is required to build fceux from sources. diff --git a/reminiscence/.md5sum b/reminiscence/.md5sum index 7056dc1..d3106b0 100644 --- a/reminiscence/.md5sum +++ b/reminiscence/.md5sum @@ -1 +1,2 @@ 26bc8a0f2ef2ba53f61245ab6b2b2d6b REminiscence-0.1.9.tar.bz2 +7a87aa1b2d2640ea9c87d435d4c772ac reminiscence-0.1.9.nosound.patch diff --git a/reminiscence/Pkgfile b/reminiscence/Pkgfile index 66e468a..cce5c12 100644 --- a/reminiscence/Pkgfile +++ b/reminiscence/Pkgfile @@ -7,15 +7,18 @@ name=reminiscence version=0.1.9 -release=1 -source=(http://cyxdown.free.fr/$name/REminiscence-$version.tar.bz2) +release=2 +source=(http://cyxdown.free.fr/$name/REminiscence-$version.tar.bz2 \ + $name-$version.nosound.patch) build() { cd REminiscence-$version - sed -e "s|CXXFLAGS:=|CXXFLAGS:= $CXXFLAGS|" -i Makefile + patch -p1 -i $SRC/$name-$version.nosound.patch + sed -e "s|CXXFLAGS:=|CXXFLAGS:= $CXXFLAGS|" Makefile make \ + DEFINES="-DBYPASS_PROTECTION -DNO_SDL_MIXER" \ CXX="$CXX" \ SDL_LIBS="-L$CLFS/usr/lib -lSDL -lpthread" \ SDL_CFLAGS="-I$CLFS/usr/include -I$CLFS/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT" \ diff --git a/reminiscence/reminiscence-0.1.9.nosound.patch b/reminiscence/reminiscence-0.1.9.nosound.patch new file mode 100644 index 0000000..a3b536f --- /dev/null +++ b/reminiscence/reminiscence-0.1.9.nosound.patch @@ -0,0 +1,56 @@ +diff -purN REminiscence-0.1.9.orig/game.cpp REminiscence-0.1.9/game.cpp +--- REminiscence-0.1.9.orig/game.cpp 2010-01-13 19:55:11.318625003 +0100 ++++ REminiscence-0.1.9/game.cpp 2010-01-13 20:06:37.770629950 +0100 +@@ -47,7 +47,9 @@ void Game::run() { + } + #endif + ++#ifndef NO_SDL_MIXER + _mix.init(); ++#endif + + playCutscene(0x40); + playCutscene(0x0D); +@@ -77,8 +79,9 @@ void Game::run() { + } + + _res.free_TEXT(); +- ++#ifndef NO_SDL_MIXER + _mix.free(); ++#endif + _stub->destroy(); + } + +@@ -615,17 +618,21 @@ void Game::drawStoryTexts() { + } + MixerChunk chunk; + _res.load_VCE(_textToDisplay, textSpeechSegment++, &chunk.data, &chunk.len); ++#ifndef NO_SDL_MIXER + if (chunk.data) { + _mix.play(&chunk, 32000, Mixer::MAX_VOLUME); + } ++#endif + _vid.updateScreen(); + while (!_stub->_pi.backspace && !_stub->_pi.quit) { + inp_update(); + _stub->sleep(80); + } ++#ifndef NO_SDL_MIXER + if (chunk.data) { + _mix.stopAll(); + } ++#endif + _stub->_pi.backspace = false; + if (*str == 0) { + break; +@@ -1191,7 +1198,9 @@ void Game::playSound(uint8 sfxId, uint8 + MixerChunk mc; + mc.data = sfx->data; + mc.len = sfx->len; ++#ifndef NO_SDL_MIXER + _mix.play(&mc, 6000, Mixer::MAX_VOLUME >> softVol); ++#endif + } + } else { + // in-game music -- 2.26.2