CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
reminiscence: added optional patch for disable sdl_mixer when using -DNO_SDL_MIXER...
authorJose V Beneyto <sepen@crux.nu>
Wed, 13 Jan 2010 20:30:02 +0000 (21:30 +0100)
committerJose V Beneyto <sepen@crux.nu>
Wed, 13 Jan 2010 20:30:02 +0000 (21:30 +0100)
fceux/Pkgfile [new file with mode: 0644]
fceux/README [new file with mode: 0644]
reminiscence/.md5sum
reminiscence/Pkgfile
reminiscence/reminiscence-0.1.9.nosound.patch [new file with mode: 0644]

diff --git a/fceux/Pkgfile b/fceux/Pkgfile
new file mode 100644 (file)
index 0000000..2692dfa
--- /dev/null
@@ -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 (file)
index 0000000..20f3603
--- /dev/null
@@ -0,0 +1,7 @@
+
+README for fceux
+
+
+NOTES
+
+Scons is required to build fceux from sources.
index 7056dc1c6013894ba58fd0ca8f26267cf0fddfd9..d3106b01f2bd4bab96b24e66429c64bfe6ac7763 100644 (file)
@@ -1 +1,2 @@
 26bc8a0f2ef2ba53f61245ab6b2b2d6b  REminiscence-0.1.9.tar.bz2
+7a87aa1b2d2640ea9c87d435d4c772ac  reminiscence-0.1.9.nosound.patch
index 66e468aa884141db2f4c0d5987142b7ffcac5324..cce5c12e40e396598fc2262bbfe7f145420a7c5a 100644 (file)
@@ -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 (file)
index 0000000..a3b536f
--- /dev/null
@@ -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() {\r
+       }\r
+ #endif\r
\r
++#ifndef NO_SDL_MIXER\r
+       _mix.init();\r
++#endif\r
\r
+       playCutscene(0x40);\r
+       playCutscene(0x0D);\r
+@@ -77,8 +79,9 @@ void Game::run() {\r
+       }\r
\r
+       _res.free_TEXT();\r
+-\r
++#ifndef NO_SDL_MIXER\r
+       _mix.free();\r
++#endif\r
+       _stub->destroy();\r
+ }\r
\r
+@@ -615,17 +618,21 @@ void Game::drawStoryTexts() {\r
+                       }\r
+                       MixerChunk chunk;\r
+                       _res.load_VCE(_textToDisplay, textSpeechSegment++, &chunk.data, &chunk.len);\r
++#ifndef NO_SDL_MIXER\r
+                       if (chunk.data) {\r
+                               _mix.play(&chunk, 32000, Mixer::MAX_VOLUME);\r
+                       }\r
++#endif\r
+                       _vid.updateScreen();\r
+                       while (!_stub->_pi.backspace && !_stub->_pi.quit) {\r
+                               inp_update();\r
+                               _stub->sleep(80);\r
+                       }\r
++#ifndef NO_SDL_MIXER\r
+                       if (chunk.data) {\r
+                               _mix.stopAll();\r
+                       }\r
++#endif\r
+                       _stub->_pi.backspace = false;\r
+                       if (*str == 0) {\r
+                               break;\r
+@@ -1191,7 +1198,9 @@ void Game::playSound(uint8 sfxId, uint8 
+                       MixerChunk mc;\r
+                       mc.data = sfx->data;\r
+                       mc.len = sfx->len;\r
++#ifndef NO_SDL_MIXER\r
+                       _mix.play(&mc, 6000, Mixer::MAX_VOLUME >> softVol);\r
++#endif\r
+               }\r
+       } else {\r
+               // in-game music\r