diff options
-rw-r--r-- | games/bsnes/README | 12 | ||||
-rw-r--r-- | games/bsnes/bsnes-0.072-makefile.patch | 128 | ||||
-rw-r--r-- | games/bsnes/bsnes-0.076-toolkit.patch | 23 | ||||
-rw-r--r-- | games/bsnes/bsnes-0.077-makefile.patch | 40 | ||||
-rw-r--r-- | games/bsnes/bsnes.SlackBuild | 93 | ||||
-rw-r--r-- | games/bsnes/bsnes.info | 8 |
6 files changed, 127 insertions, 177 deletions
diff --git a/games/bsnes/README b/games/bsnes/README index 4450eab2fd..059112c7d0 100644 --- a/games/bsnes/README +++ b/games/bsnes/README @@ -7,3 +7,15 @@ This includes speed and game-specific hacks for compatibility. As a result, the minimum system requirements for bsnes are very high. bsnes requires OpenAL. + +Options: +1) Bsnes now has 2 interfaces to choose from. The default is QT4 +and the other is GTK. If you'd like to choose the GTK interface, +then pass INTERFACE=gtk to the slackbuild. + +2) There are 3 modes that bsnes can be built. The 3 modes can no +longer be chosen from within the game. There can only be one mode +chosen at build time. The 3 modes are accuracy (default), +compatibility, and performance. To choose compatibility modes +pass PROFILE=compatibility to the slackbuild. For performance +mode pass PROFILE=performance to the slackbuild. diff --git a/games/bsnes/bsnes-0.072-makefile.patch b/games/bsnes/bsnes-0.072-makefile.patch deleted file mode 100644 index 0d49c85a7b..0000000000 --- a/games/bsnes/bsnes-0.072-makefile.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/snesfilter/Makefile b/snesfilter/Makefile -index 089b86e..08ba81b 100755 ---- a/../snesfilter/Makefile -+++ b/../snesfilter/Makefile -@@ -5,12 +5,12 @@ include nall/qt/Makefile - - c := $(compiler) -std=gnu99 - cpp := $(subst cc,++,$(compiler)) -std=gnu++0x --flags := -O3 -I. -Iobj -fomit-frame-pointer $(qtinc) -+flags := $(CXXFLAGS) -I. -Iobj -fomit-frame-pointer $(qtinc) - link := - - ifeq ($(platform),x) - flags := -fPIC -fopenmp $(flags) -- link += -s -fopenmp -lpthread -lgomp -+ link += -fopenmp -lpthread -lgomp - else ifeq ($(platform),osx) - flags := -fPIC -fopenmp $(flags) - link += -fopenmp -lpthread -lgomp -@@ -73,9 +73,8 @@ endif - - install: - ifeq ($(platform),x) -- install -D -m 755 libsnesfilter.a $(DESTDIR)$(prefix)/lib -- install -D -m 755 libsnesfilter.so $(DESTDIR)$(prefix)/lib -- ldconfig -n $(DESTDIR)$(prefix)/lib -+ install -D -m 755 libsnesfilter.a $(DESTDIR)$(prefix)/lib/libsnesfilter.a -+ install -D -m 755 libsnesfilter.so $(DESTDIR)$(prefix)/lib/libsnesfilter.so - else ifeq ($(platform),osx) - cp libsnesfilter.dylib /usr/local/lib/libsnesfilter.dylib - endif -diff --git a/snesreader/Makefile b/snesreader/Makefile -index 761317b..868a0cc 100755 ---- a/../snesreader/Makefile -+++ b/../snesreader/Makefile -@@ -5,12 +5,11 @@ include nall/qt/Makefile - - c := $(compiler) -std=gnu99 - cpp := $(subst cc,++,$(compiler)) -std=gnu++0x --flags := -O3 -I. -Iobj -fomit-frame-pointer -+flags := $(CXXFLAGS) -I. -Iobj -fomit-frame-pointer - link := - - ifeq ($(platform),x) - flags := -fPIC $(flags) -- link += -s - else ifeq ($(platform),osx) - flags := -fPIC $(flags) - endif -@@ -171,9 +170,8 @@ endif - - install: - ifeq ($(platform),x) -- install -D -m 755 libsnesreader.a $(DESTDIR)$(prefix)/lib -- install -D -m 755 libsnesreader.so $(DESTDIR)$(prefix)/lib -- ldconfig -n $(DESTDIR)$(prefix)/lib -+ install -D -m 755 libsnesreader.a $(DESTDIR)$(prefix)/lib/libsnesreader.a -+ install -D -m 755 libsnesreader.so $(DESTDIR)$(prefix)/lib/libsnesreader.so - else ifeq ($(platform),osx) - cp libsnesreader.dylib /usr/local/lib/libsnesreader.dylib - endif -diff --git a/src/Makefile b/src/Makefile -index c3c1fe9..4b5de6d 100755 ---- a/Makefile -+++ b/Makefile -@@ -4,7 +4,7 @@ ui := qt - # compiler - c := $(compiler) -std=gnu99 - cpp := $(subst cc,++,$(compiler)) -std=gnu++0x --flags := -O3 -fomit-frame-pointer -I. -I$(snes) -+flags := $(CXXFLAGS) -fomit-frame-pointer -I. -I$(snes) - link := - objects := - -@@ -17,7 +17,7 @@ objects := - - # platform - ifeq ($(platform),x) -- link += -s -ldl -lX11 -lXext -+ link += -ldl -lX11 -lXext - else ifeq ($(platform),osx) - else ifeq ($(platform),win) - link += -mwindows -mthreads -@@ -60,11 +60,8 @@ endif - install: - ifeq ($(platform),x) -- install -D -m 755 out/bsnes $(DESTDIR)$(prefix)/bin/bsnes -+ install -D -m 755 out/bsnes $(DESTDIR)$(prefix)/bin/bsnes-$(profile) - install -D -m 644 data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png - install -D -m 644 data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop -- test -d ~/.bsnes || mkdir ~/.bsnes -- cp data/cheats.xml ~/.bsnes/cheats.xml -- chmod 777 ~/.bsnes ~/.bsnes/cheats.xml - endif - - uninstall: -diff --git a/supergameboy/Makefile b/supergameboy/Makefile -index 60409af..cbef9ac 100755 ---- a/../supergameboy/Makefile -+++ b/../supergameboy/Makefile -@@ -2,14 +2,13 @@ include nall/Makefile - - c := $(compiler) -std=gnu99 - cpp := $(subst cc,++,$(compiler)) -std=gnu++0x --flags := -O3 -fomit-frame-pointer -I. -Icommon -Ilibgambatte/include -Ilibgambatte/src -+flags := $(CXXFLAGS) -fomit-frame-pointer -I. -Icommon -Ilibgambatte/include -Ilibgambatte/src - link := - - ifeq ($(platform),osx) - flags := -fPIC $(flags) - else ifeq ($(platform),x) - flags := -fPIC $(flags) -- link += -s - endif - - objects := supergameboy -@@ -113,9 +112,8 @@ install: - ifeq ($(platform),osx) - cp libsupergameboy.dylib /usr/local/lib/libsupergameboy.dylib - else -- install -D -m 755 libsupergameboy.a $(DESTDIR)$(prefix)/lib -- install -D -m 755 libsupergameboy.so $(DESTDIR)$(prefix)/lib -- ldconfig -n $(DESTDIR)$(prefix)/lib -+ install -D -m 755 libsupergameboy.a $(DESTDIR)$(prefix)/lib/libsupergameboy.a -+ install -D -m 755 libsupergameboy.so $(DESTDIR)$(prefix)/lib/libsupergameboy.so - endif - - clean: diff --git a/games/bsnes/bsnes-0.076-toolkit.patch b/games/bsnes/bsnes-0.076-toolkit.patch new file mode 100644 index 0000000000..079a864dd0 --- /dev/null +++ b/games/bsnes/bsnes-0.076-toolkit.patch @@ -0,0 +1,23 @@ +diff --git a/bsnes/ui/Makefile b/bsnes/ui/Makefile +index d5f72eb..604a0f7 100755 +--- a/bsnes/ui/Makefile ++++ b/bsnes/ui/Makefile +@@ -7,11 +7,13 @@ ui_objects += $(if $(call streq,$(platform),win),resource) + + # platform + ifeq ($(platform),x) +-# phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`) +-# link += `pkg-config --libs gtk+-2.0` +- +- phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`) +- link += `pkg-config --libs QtCore QtGui` ++ ifeq ($(toolkit),gtk) ++ phoenix_compile = $(call compile,-DPHOENIX_GTK `pkg-config --cflags gtk+-2.0`) ++ link += `pkg-config --libs gtk+-2.0` ++ else ifeq ($(toolkit),qt) ++ phoenix_compile = $(call compile,-DPHOENIX_QT `pkg-config --cflags QtCore QtGui`) ++ link += `pkg-config --libs QtCore QtGui` ++ endif + + ruby := video.glx video.xv video.sdl + ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao diff --git a/games/bsnes/bsnes-0.077-makefile.patch b/games/bsnes/bsnes-0.077-makefile.patch new file mode 100644 index 0000000000..f432458661 --- /dev/null +++ b/games/bsnes/bsnes-0.077-makefile.patch @@ -0,0 +1,40 @@ +diff --git a/bsnes/Makefile b/bsnes/Makefile +index 4af8708..2e95a38 100755 +--- a/bsnes/Makefile ++++ b/bsnes/Makefile +@@ -10,7 +10,7 @@ options := + # compiler + c := $(compiler) -std=gnu99 + cpp := $(subst cc,++,$(compiler)) -std=gnu++0x +-flags := -O3 -fomit-frame-pointer -I. ++flags := $(CXXFLAGS) -fomit-frame-pointer -I. + link := + objects := libco + +@@ -25,7 +25,7 @@ flags := $(flags) $(foreach o,$(call strupper,$(options)),-D$o) + + # platform + ifeq ($(platform),x) +- link += -s -ldl -lX11 -lXext ++ link += -ldl -lX11 -lXext + else ifeq ($(platform),osx) + else ifeq ($(platform),win) + link += -mwindows +diff --git a/bsnes/ui/Makefile b/bsnes/ui/Makefile +index 7cf3420..dd3f89b 100755 +--- a/bsnes/ui/Makefile ++++ b/bsnes/ui/Makefile +@@ -94,11 +94,8 @@ install: + ifeq ($(platform),x) + install -D -m 755 out/bsnes $(DESTDIR)$(prefix)/bin/bsnes + endif +- install -D -m 644 data/bsnes.png $(DESTDIR)$(prefix)/share/pixmaps/bsnes.png +- install -D -m 644 data/bsnes.desktop $(DESTDIR)$(prefix)/share/applications/bsnes.desktop +- mkdir -p ~/.config/bsnes +- cp data/cheats.xml ~/.config/bsnes/cheats.xml +- chmod 777 ~/.config/bsnes ~/.config/bsnes/cheats.xml ++ install -D -m 644 data/bsnes.png $(DESTDIR)/usr/share/pixmaps/bsnes.png ++ install -D -m 644 data/bsnes.desktop $(DESTDIR)/usr/share/applications/bsnes.desktop + + uninstall: + ifeq ($(platform),x) diff --git a/games/bsnes/bsnes.SlackBuild b/games/bsnes/bsnes.SlackBuild index 187a0b584c..cfde6e25e0 100644 --- a/games/bsnes/bsnes.SlackBuild +++ b/games/bsnes/bsnes.SlackBuild @@ -5,7 +5,7 @@ # Written by Larry Hajali <larryhaja[at]gmail[dot]com> PRGNAM=bsnes -VERSION=${VERSION:-0.072} +VERSION=${VERSION:-0.079} SRCVER=${VERSION:2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -42,10 +42,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -mkdir $PRGNAM-$VERSION -cd $PRGNAM-$VERSION -tar xvf $CWD/${PRGNAM}_v${SRCVER}.tar.bz2 +rm -rf ${PRGNAM}_v${SRCVER}-source +tar xvf $CWD/${PRGNAM}_v${SRCVER}-source.tar.bz2 +cd ${PRGNAM}_v${SRCVER}-source find . -type d -exec chmod -R 0755 {} \; chown -R root:root . find . \ @@ -54,61 +53,65 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -cd $PRGNAM +# Patch makefile so SLKCFLAGS are recognized and give option to choose +# Qt4 or Gtk interface. +patch -p1 < $CWD/bsnes-0.076-toolkit.patch +patch -p1 < $CWD/bsnes-0.077-makefile.patch + +# Fix snespurify scripts. +sed -i 's|g++-4.5|g++|g' snespurify/cc-{gtk,qt}.sh -# Patch makefile so SLKCFLAGS and LIBDIRSUFFIX are recognized. -cat $CWD/bsnes-0.072-makefile.patch \ - | sed -e "/^\+/s|/lib/|/lib${LIBDIRSUFFIX}/|g" \ - | patch -p1 +cd $PRGNAM # Remove pulseaudio as there is no package for it at SBo. # Comment out or delete the following 4 lines to enable pulseaudio. sed -i \ -e 's|audio.pulseaudio ||' \ -e 's|audio.pulseaudiosimple ||' \ - -e '/pulse/d' ui-qt/Makefile - -for profile in compatibility performance accuracy; do - CXXFLAGS="$SLKCFLAGS" \ - make \ - platform=x \ - compiler=gcc \ - prefix=/usr \ - ui=ui-qt \ - profile=$profile - - make install DESTDIR=$PKG prefix=/usr profile=$profile - make clean -done - -# Install the launcher -cd launcher -sed -i -e '/^clear/d' -e "s|-O3|$SLKCFLAGS|" cc.sh -./cc.sh -install -m 0755 ../out/bsnes $PKG/usr/bin/bsnes -cd .. + -e '/pulse/d' ui{,-gameboy}/Makefile + +# Choose whether qt or gtk interface is used. Qt4 is default. +INTERFACE=${INTERFACE:-QT4} +if ! [ "$INTERFACE" == 'QT4' ]; then + TOOLKIT='gtk' +else + TOOLKIT='qt' +fi -# Install plugins. -for i in snesfilter snesreader supergameboy; do - cd ../${i} - CXXFLAGS="$SLKCFLAGS" \ - make \ - platform=x \ - compiler=gcc \ - prefix=/usr +# Determine which mode to build bsnes. +# Possible values for PROFILE are accuracy, compatibility, and performance. +PROFILE=${PROFILE:-accuracy} - make install DESTDIR=$PKG prefix=/usr - ( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -s lib${i}.so lib${i}.so.1 ) - cd - -done +# Determine which mode for profile in compatibility performance accuracy; do +CXXFLAGS="$SLKCFLAGS" \ +make \ + platform=x \ + compiler=gcc \ + prefix=/usr \ + toolkit="$TOOLKIT" \ + profile="$PROFILE" + +make install DESTDIR=$PKG prefix=/usr +cd .. + +# Compile snespurify. It helps clean up ROMS for use with bsnes. +cd snespurify +# Fix snespurify scripts. +sed -i -e 's|g++-4.5|g++|g' -e "s|-O3|$SLKCFLAGS|" cc-{gtk,qt}.sh +if [ "$INTERFACE" == "QT4" ]; then + ./cc-qt.sh + install -m 0755 snespurify-qt $PKG/usr/bin +else + ./cc-gtk.sh + install -m 0755 snespurify-gtk $PKG/usr/bin +fi +cd .. find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ui-qt/data/*.html $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -find $PKG/usr/doc -type f -exec chmod 0644 {} \; mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/games/bsnes/bsnes.info b/games/bsnes/bsnes.info index 1fa6930910..92360ec36c 100644 --- a/games/bsnes/bsnes.info +++ b/games/bsnes/bsnes.info @@ -1,10 +1,10 @@ PRGNAM="bsnes" -VERSION="0.072" +VERSION="0.079" HOMEPAGE="http://byuu.org/bsnes/" -DOWNLOAD="http://bsnes.googlecode.com/files/bsnes_v072.tar.bz2" -MD5SUM="dcbd0f2a88682fb25d409a8276576983" +DOWNLOAD="http://bsnes.googlecode.com/files/bsnes_v079-source.tar.bz2" +MD5SUM="22513f713e29824a85a0fe193298f9f2" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Larry Hajali" EMAIL="larryhaja[at]gmail[dot]com" -APPROVED="Erik Hanson" +APPROVED="rworkman" |