aboutsummaryrefslogtreecommitdiff
path: root/games/smc
diff options
context:
space:
mode:
authorPhillip Warner <pc_warner@yahoo.com>2010-05-11 22:53:47 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:53:47 +0200
commit160c11c9896b479e9a2b3850f9de750b70893803 (patch)
tree411bf43875dc04be066ddef07d3bda798cb321af /games/smc
parentd93495cdcf1751829f06899bb4eedd3b28deae41 (diff)
games/smc: Added to 12.1 repository
Diffstat (limited to 'games/smc')
-rw-r--r--games/smc/README25
-rw-r--r--games/smc/doinst.sh3
-rw-r--r--games/smc/slack-desc19
-rw-r--r--games/smc/smc.SlackBuild73
-rw-r--r--games/smc/smc.desktop8
-rw-r--r--games/smc/smc.info8
-rw-r--r--games/smc/smc1.6_boost1.36.patch63
7 files changed, 199 insertions, 0 deletions
diff --git a/games/smc/README b/games/smc/README
new file mode 100644
index 000000000000..63d9143f9afe
--- /dev/null
+++ b/games/smc/README
@@ -0,0 +1,25 @@
+smc (Secret Maryo Chronicles)
+
+Secret Maryo Chronicles is an Open Source two-dimensional platform game
+with a style designed similar to classic sidescroller games such as Super
+Mario Bros. It uses the platform independent library SDL and, since
+version 0.98, the OpenGL accelerated Graphics Renderer. The game is
+developed in C++.
+
+** REQUIRES **
+To compile this game you will need OpenGL (with hardware acceleration
+enabled), CEGUI, and Boost. Make sure CEGUI is compiled *WITHOUT* DevIL
+support (or just make sure it is not the default image codec) and *WITH*
+either FreeImage or SILLY codec support (FreeImage is the most
+recommended choice). Also, the background music for this game, if desired,
+must be installed as a separate package. SlackBuilds for the music pack,
+Boost, FreeImage, and CEGUI can all be found on SlackBuilds.org.
+
+*NOTE* If you are using a Boost version prior to 1.36 you should try using
+this SlackBuild without the boost patch by executing
+
+PATCHBOOST=NO ./smc.SlackBuild
+
+
+Please see readme-linux.txt in the docs directory of the source for more
+information on this software.
diff --git a/games/smc/doinst.sh b/games/smc/doinst.sh
new file mode 100644
index 000000000000..140e33222297
--- /dev/null
+++ b/games/smc/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications
+fi
diff --git a/games/smc/slack-desc b/games/smc/slack-desc
new file mode 100644
index 000000000000..9df9b37e0301
--- /dev/null
+++ b/games/smc/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+smc: smc (Secret Maryo Chronicles)
+smc:
+smc: Secret Maryo Chronicles is an Open Source two-dimensional platform
+smc: game with a style designed similar to classic sidescroller games such
+smc: as Super Mario Bros. It uses the platform independent library SDL
+smc: and, since version 0.98, the OpenGL accelerated Graphics Renderer.
+smc: The game is developed in C++.
+smc: Requires OpenGL (with hardware acceleration), CEGUI (with FreeImage
+smc: or SILLY support), and Boost. All other dependencies should be in
+smc: stock Slackware. This package does NOT include the music pack.
+smc: http://www.secretmaryo.org/ \ No newline at end of file
diff --git a/games/smc/smc.SlackBuild b/games/smc/smc.SlackBuild
new file mode 100644
index 000000000000..03ae3f47a7b9
--- /dev/null
+++ b/games/smc/smc.SlackBuild
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Slackware build script for smc (Secret Maryo Chronicles)
+# Written by Phillip Warner <pc_warner@yahoo.com>
+
+PRGNAM=smc
+VERSION=${VERSION:-1.6}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# Say NO here if using boost < 1.36
+PATCHBOOST=${PATCHBOOST:-YES}
+
+set -e
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+
+tar -xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+
+if [ "$PATCHBOOST" == "YES" ]; then
+ patch -p0 < $CWD/smc1.6_boost1.36.patch
+fi
+
+cd $PRGNAM-$VERSION
+
+chown -R root:root .
+chmod -R a-s,u+rw,go-w .
+
+./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr
+
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make
+
+make install DESTDIR=$PKG
+
+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 $TMP/$PRGNAM-$VERSION/docs/* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/games/smc/smc.desktop b/games/smc/smc.desktop
new file mode 100644
index 000000000000..e055dd49afa6
--- /dev/null
+++ b/games/smc/smc.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Secret Maryo Chronicles
+Comment=An Open Source 2-D platform game like Super Mario Bros.
+Exec=smc
+Icon=/usr/share/smc/icon/window_32.png
+Terminal=false
+Type=Application
+Categories=Application;Game;
diff --git a/games/smc/smc.info b/games/smc/smc.info
new file mode 100644
index 000000000000..78c4da984318
--- /dev/null
+++ b/games/smc/smc.info
@@ -0,0 +1,8 @@
+PRGNAM="smc"
+VERSION="1.6"
+HOMEPAGE="http://www.secretmaryo.org/"
+DOWNLOAD="http://downloads.sourceforge.net/smclone/smc-1.6.tar.bz2"
+MD5SUM="f3197a5e61c1899637ff1a2a858db226"
+MAINTAINER="Phillip Warner"
+EMAIL="pc_warner@yahoo.com"
+APPROVED="David Somero"
diff --git a/games/smc/smc1.6_boost1.36.patch b/games/smc/smc1.6_boost1.36.patch
new file mode 100644
index 000000000000..c489bb514b5d
--- /dev/null
+++ b/games/smc/smc1.6_boost1.36.patch
@@ -0,0 +1,63 @@
+diff -Naur smc-1.6-orig/src/core/game_core.cpp smc-1.6/src/core/game_core.cpp
+--- smc-1.6-orig/src/core/game_core.cpp 2008-09-26 13:55:50.000000000 -0500
++++ smc-1.6/src/core/game_core.cpp 2008-10-12 22:01:35.000000000 -0500
+@@ -1577,32 +1577,32 @@
+ if( fs::is_directory( *dir_itr ) )
+ {
+ // ignore hidden directories
+- if( dir_itr->leaf().find( "." ) == 0 )
++ if( dir_itr->filename().find( "." ) == 0 )
+ {
+ continue;
+ }
+
+ if( with_directories )
+ {
+- valid_files.push_back( dir + "/" + dir_itr->leaf() );
++ valid_files.push_back( dir + "/" + dir_itr->filename() );
+ }
+
+ // load all items from the sub-directory
+ if( search_in_sub_directories )
+ {
+- vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->leaf(), file_type, with_directories );
++ vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->filename(), file_type, with_directories );
+ valid_files.insert( valid_files.end(), new_valid_files.begin(), new_valid_files.end() );
+ }
+ }
+ // valid file
+- else if( file_type.empty() || dir_itr->leaf().rfind( file_type ) != string::npos )
++ else if( file_type.empty() || dir_itr->filename().rfind( file_type ) != string::npos )
+ {
+- valid_files.push_back( dir + "/" + dir_itr->leaf() );
++ valid_files.push_back( dir + "/" + dir_itr->filename() );
+ }
+ }
+ catch( const std::exception &ex )
+ {
+- printf( "%s %s\n", dir_itr->leaf().c_str(), ex.what() );
++ printf( "%s %s\n", dir_itr->filename().c_str(), ex.what() );
+ }
+ }
+
+diff -Naur smc-1.6-orig/src/overworld/world_manager.cpp smc-1.6/src/overworld/world_manager.cpp
+--- smc-1.6-orig/src/overworld/world_manager.cpp 2008-07-01 16:11:12.000000000 -0500
++++ smc-1.6/src/overworld/world_manager.cpp 2008-10-12 22:01:42.000000000 -0500
+@@ -111,7 +111,7 @@
+ {
+ try
+ {
+- string current_dir = dir_itr->leaf();
++ string current_dir = dir_itr->filename();
+
+ // only directories with an existing description
+ if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) )
+@@ -138,7 +138,7 @@
+ }
+ catch( const std::exception &ex )
+ {
+- printf( "%s %s\n", dir_itr->leaf().c_str(), ex.what() );
++ printf( "%s %s\n", dir_itr->filename().c_str(), ex.what() );
+ }
+ }
+ }