mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
games/smc: Updated for version 1.8
This commit is contained in:
parent
068409fd7d
commit
6a623a0050
6 changed files with 45 additions and 46 deletions
|
@ -16,10 +16,8 @@ must be installed as a separate package. SlackBuilds for the music pack,
|
||||||
Boost, FreeImage, and CEGUI can all be found on SlackBuilds.org.
|
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
|
*NOTE* If you are using a Boost version prior to 1.36 you should try using
|
||||||
this SlackBuild without the boost patch by executing
|
this SlackBuild without the boost patch by executing:
|
||||||
|
PATCHBOOST=NO ./smc.SlackBuild
|
||||||
PATCHBOOST=NO ./smc.SlackBuild
|
|
||||||
|
|
||||||
|
|
||||||
Please see readme-linux.txt in the docs directory of the source for more
|
Please see readme-linux.txt in the docs directory of the source for more
|
||||||
information on this software.
|
information on this software.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
if [ -x /usr/bin/update-desktop-database ]; then
|
if [ -x /usr/bin/update-desktop-database ]; then
|
||||||
/usr/bin/update-desktop-database -q usr/share/applications
|
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ 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: as Super Mario Bros. It uses the platform independent library SDL
|
||||||
smc: and, since version 0.98, the OpenGL accelerated Graphics Renderer.
|
smc: and, since version 0.98, the OpenGL accelerated Graphics Renderer.
|
||||||
smc: The game is developed in C++.
|
smc: The game is developed in C++.
|
||||||
smc: Requires OpenGL (with hardware acceleration), CEGUI (with FreeImage
|
smc:
|
||||||
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/
|
smc: http://www.secretmaryo.org/
|
||||||
|
smc:
|
||||||
|
smc:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# Written by Phillip Warner <pc_warner@yahoo.com>
|
# Written by Phillip Warner <pc_warner@yahoo.com>
|
||||||
|
|
||||||
PRGNAM=smc
|
PRGNAM=smc
|
||||||
VERSION=${VERSION:-1.6}
|
VERSION=${VERSION:-1.8}
|
||||||
ARCH=${ARCH:-i486}
|
ARCH=${ARCH:-i486}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
@ -17,54 +17,54 @@ OUTPUT=${OUTPUT:-/tmp}
|
||||||
# Say NO here if using boost < 1.36
|
# Say NO here if using boost < 1.36
|
||||||
PATCHBOOST=${PATCHBOOST:-YES}
|
PATCHBOOST=${PATCHBOOST:-YES}
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$ARCH" = "i486" ]; then
|
if [ "$ARCH" = "i486" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
elif [ "$ARCH" = "i686" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||||
elif [ "$ARCH" = "x86_64" ]; then
|
LIBDIRSUFFIX=""
|
||||||
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
SLKCFLAGS="-O2 -fPIC"
|
SLKCFLAGS="-O2 -fPIC"
|
||||||
|
LIBDIRSUFFIX="64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
rm -rf $PKG
|
rm -rf $PKG
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
|
|
||||||
cd $TMP
|
cd $TMP
|
||||||
rm -rf $PRGNAM-$VERSION
|
rm -rf $PRGNAM-$VERSION
|
||||||
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||||
tar -xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
|
||||||
|
|
||||||
if [ "$PATCHBOOST" == "YES" ]; then
|
|
||||||
patch -p0 < $CWD/smc1.6_boost1.36.patch
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $PRGNAM-$VERSION
|
cd $PRGNAM-$VERSION
|
||||||
|
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
chmod -R a-s,u+rw,go-w .
|
chmod -R a-s,u+rw,go-w .
|
||||||
|
|
||||||
|
if [ "$PATCHBOOST" == "YES" ]; then
|
||||||
|
patch -p1 < $CWD/smc1.8_boost1.36.patch
|
||||||
|
fi
|
||||||
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
|
||||||
CFLAGS="$SLKCFLAGS" \
|
CFLAGS="$SLKCFLAGS" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr
|
--prefix=/usr \
|
||||||
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||||
|
--build=$ARCH-slackware-linux
|
||||||
|
|
||||||
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make
|
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make
|
||||||
|
|
||||||
make install DESTDIR=$PKG
|
make install DESTDIR=$PKG
|
||||||
|
|
||||||
find $PKG | xargs file | grep -e "executable" -e "shared object"| grep ELF | \
|
find $PKG | xargs file | grep -e "executable" -e "shared object"| grep ELF | \
|
||||||
cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
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
|
mkdir -p $PKG/usr/share/applications
|
||||||
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
||||||
|
|
||||||
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
PRGNAM="smc"
|
PRGNAM="smc"
|
||||||
VERSION="1.6"
|
VERSION="1.8"
|
||||||
HOMEPAGE="http://www.secretmaryo.org/"
|
HOMEPAGE="http://www.secretmaryo.org/"
|
||||||
DOWNLOAD="http://downloads.sourceforge.net/smclone/smc-1.6.tar.bz2"
|
DOWNLOAD="http://downloads.sourceforge.net/smclone/smc-1.8.tar.bz2"
|
||||||
MD5SUM="f3197a5e61c1899637ff1a2a858db226"
|
MD5SUM="448efe236ae6031dcf08761496d469ad"
|
||||||
MAINTAINER="Phillip Warner"
|
MAINTAINER="Phillip Warner"
|
||||||
EMAIL="pc_warner@yahoo.com"
|
EMAIL="pc_warner@yahoo.com"
|
||||||
APPROVED="David Somero"
|
APPROVED="Erik Hanson,rworkman"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff -Naur smc-1.6-orig/src/core/game_core.cpp smc-1.6/src/core/game_core.cpp
|
diff -Naru smc-1.8-orig/src/core/game_core.cpp smc-1.8/src/core/game_core.cpp
|
||||||
--- smc-1.6-orig/src/core/game_core.cpp 2008-09-26 13:55:50.000000000 -0500
|
--- smc-1.8-orig/src/core/game_core.cpp 2009-04-08 00:48:08.000000000 -0500
|
||||||
+++ smc-1.6/src/core/game_core.cpp 2008-10-12 22:01:35.000000000 -0500
|
+++ smc-1.8/src/core/game_core.cpp 2009-06-05 23:26:43.000000000 -0500
|
||||||
@@ -1577,32 +1577,32 @@
|
@@ -1632,32 +1632,32 @@
|
||||||
if( fs::is_directory( *dir_itr ) )
|
if( fs::is_directory( *dir_itr ) )
|
||||||
{
|
{
|
||||||
// ignore hidden directories
|
// ignore hidden directories
|
||||||
|
@ -26,8 +26,8 @@ diff -Naur smc-1.6-orig/src/core/game_core.cpp smc-1.6/src/core/game_core.cpp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// valid file
|
// valid file
|
||||||
- else if( file_type.empty() || dir_itr->leaf().rfind( file_type ) != string::npos )
|
- else if( file_type.empty() || dir_itr->leaf().rfind( file_type ) != std::string::npos )
|
||||||
+ else if( file_type.empty() || dir_itr->filename().rfind( file_type ) != string::npos )
|
+ else if( file_type.empty() || dir_itr->filename().rfind( file_type ) != std::string::npos )
|
||||||
{
|
{
|
||||||
- valid_files.push_back( dir + "/" + dir_itr->leaf() );
|
- valid_files.push_back( dir + "/" + dir_itr->leaf() );
|
||||||
+ valid_files.push_back( dir + "/" + dir_itr->filename() );
|
+ valid_files.push_back( dir + "/" + dir_itr->filename() );
|
||||||
|
@ -40,19 +40,19 @@ diff -Naur smc-1.6-orig/src/core/game_core.cpp smc-1.6/src/core/game_core.cpp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diff -Naur smc-1.6-orig/src/overworld/world_manager.cpp smc-1.6/src/overworld/world_manager.cpp
|
diff -Naru smc-1.8-orig/src/overworld/world_manager.cpp smc-1.8/src/overworld/world_manager.cpp
|
||||||
--- smc-1.6-orig/src/overworld/world_manager.cpp 2008-07-01 16:11:12.000000000 -0500
|
--- smc-1.8-orig/src/overworld/world_manager.cpp 2009-02-17 22:10:12.000000000 -0600
|
||||||
+++ smc-1.6/src/overworld/world_manager.cpp 2008-10-12 22:01:42.000000000 -0500
|
+++ smc-1.8/src/overworld/world_manager.cpp 2009-06-05 23:27:21.000000000 -0500
|
||||||
@@ -111,7 +111,7 @@
|
@@ -116,7 +116,7 @@
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
- string current_dir = dir_itr->leaf();
|
- std::string current_dir = dir_itr->leaf();
|
||||||
+ string current_dir = dir_itr->filename();
|
+ std::string current_dir = dir_itr->filename();
|
||||||
|
|
||||||
// only directories with an existing description
|
// only directories with an existing description
|
||||||
if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) )
|
if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) )
|
||||||
@@ -138,7 +138,7 @@
|
@@ -143,7 +143,7 @@
|
||||||
}
|
}
|
||||||
catch( const std::exception &ex )
|
catch( const std::exception &ex )
|
||||||
{
|
{
|
Loading…
Reference in a new issue