diff options
Diffstat (limited to 'games/smc')
-rw-r--r-- | games/smc/README | 26 | ||||
-rw-r--r-- | games/smc/doinst.sh | 6 | ||||
-rw-r--r-- | games/smc/icons/16.png | bin | 0 -> 845 bytes | |||
-rw-r--r-- | games/smc/icons/32.png | bin | 0 -> 2352 bytes | |||
-rw-r--r-- | games/smc/icons/48.png | bin | 0 -> 4351 bytes | |||
-rw-r--r-- | games/smc/icons/64.png | bin | 0 -> 6750 bytes | |||
-rw-r--r-- | games/smc/smc.SlackBuild | 63 | ||||
-rw-r--r-- | games/smc/smc.desktop | 4 | ||||
-rw-r--r-- | games/smc/smc.info | 4 |
9 files changed, 65 insertions, 38 deletions
diff --git a/games/smc/README b/games/smc/README index 21f7187b7b..a98dc65930 100644 --- a/games/smc/README +++ b/games/smc/README @@ -1,23 +1,23 @@ 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 from CEGUI. The -game is developed in C++. +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 from +CEGUI. The game is developed in C++. Notes: The default keyboard controls are arrows to move, A to run, S to jump, and Enter to use an item or (in the Overworld) start a level. See -/usr/doc/smc-$VERSION/controls.html and the in-game Options -> Keyboard -menu for more information. +/usr/doc/smc-$VERSION/controls.html and the in-game Options -> +Keyboard menu for more information. To compile this game you will need CEGUI0.7. Make sure CEGUI0.7 is -compiled after FreeImage, as this needs a CEGUI0.7 with FreeImage support -built in (the latest CEGUI0.7 SlackBuild will automatically use FreeImage -if available). +compiled after FreeImage, as this needs a CEGUI0.7 with FreeImage +support built in (the latest CEGUI0.7 SlackBuild will automatically +use FreeImage if available). -Unfortunately, as of this writing, it's impossible to install both CEGUI -and CEGUI0.7 at the same time, so make sure CEGUI (the 0.8 version) -isn't installed or you'll end up with a mess. +Unfortunately, as of this writing, it's impossible to install both +CEGUI and CEGUI0.7 at the same time, so make sure CEGUI (the 0.8 +version) isn't installed or you'll end up with a mess. diff --git a/games/smc/doinst.sh b/games/smc/doinst.sh index 5fb28930db..3e5691a052 100644 --- a/games/smc/doinst.sh +++ b/games/smc/doinst.sh @@ -1,3 +1,9 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/games/smc/icons/16.png b/games/smc/icons/16.png Binary files differnew file mode 100644 index 0000000000..329c0cebb3 --- /dev/null +++ b/games/smc/icons/16.png diff --git a/games/smc/icons/32.png b/games/smc/icons/32.png Binary files differnew file mode 100644 index 0000000000..1e7a2ae512 --- /dev/null +++ b/games/smc/icons/32.png diff --git a/games/smc/icons/48.png b/games/smc/icons/48.png Binary files differnew file mode 100644 index 0000000000..c20e5da6ae --- /dev/null +++ b/games/smc/icons/48.png diff --git a/games/smc/icons/64.png b/games/smc/icons/64.png Binary files differnew file mode 100644 index 0000000000..fe9224f1b3 --- /dev/null +++ b/games/smc/icons/64.png diff --git a/games/smc/smc.SlackBuild b/games/smc/smc.SlackBuild index e18b21dc10..3f05ae23fc 100644 --- a/games/smc/smc.SlackBuild +++ b/games/smc/smc.SlackBuild @@ -1,18 +1,18 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for smc (Secret Maryo Chronicles) # Originally written by Phillip Warner. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. -# Modified by B. Watson, for post-1.9 git snapshot and Slack 14.1. -# - removed boost patch (no longer needed) -# - changed Categories in .desktop file (make it validate) -# - got CEGUI0.7 maintainer to add a couple configure options this needs +# 20230110 bkw: BUILD=4 +# - look for CEGUI0.7 libraries in /opt/CEGUI0.7, since they've +# been moved there (as of CEGUI0.7 build 5). -# Note about the REQUIRES in the .info file: I listed FreeImage first -# because it's an optional dep for CEGUI0.7. This build needs CEGUI0.7 -# with FreeImage support compiled in. +# 20211026 bkw: BUILD=3 +# - new-style icons (extracted from the windows .ico file). +# - /usr/share/smc => /usr/share/games/smc. +# - binary in /usr/games. # 20160809 bkw: # - modified for Slack 14.2, specifically the game's fonts were causing @@ -25,10 +25,13 @@ # - remove original author's email # - add WTFPL license +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=smc VERSION=${VERSION:-20140328} -BUILD=${BUILD:-2} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -38,7 +41,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -66,22 +73,23 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ ./autogen.sh +export PKG_CONFIG_PATH=/opt/CEGUI0.7/lib$LIBDIRSUFFIX/pkgconfig + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --bindir=/usr/games \ + --datadir=/usr/share/games \ --build=$ARCH-slackware-linux -CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make +CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" force_arch="$ARCH" make V=1 make install-strip DESTDIR=$PKG # The fonts included in the game cause 14.2's fontconfig to fail, @@ -96,17 +104,30 @@ make install-strip DESTDIR=$PKG # But that'll likely have to wait for the next Slackware release, a # few years from now. -rm -f $PKG/usr/share/$PRGNAM/gui/font/*.ttf +rm -f $PKG/usr/share/games/$PRGNAM/gui/font/*.ttf ln -s /usr/share/fonts/TTF/LiberationSans-Regular.ttf \ - $PKG/usr/share/$PRGNAM/gui/font/default.ttf + $PKG/usr/share/games/$PRGNAM/gui/font/default.ttf ln -s /usr/share/fonts/TTF/LiberationSans-Bold.ttf \ - $PKG/usr/share/$PRGNAM/gui/font/default_bold.ttf + $PKG/usr/share/games/$PRGNAM/gui/font/default_bold.ttf +# .desktop modified from makefiles/unix/smc.desktop mkdir -p $PKG/usr/share/applications cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +# icon extracted from makefiles/MSVC9.0/idr_main.ico with icotool +for i in $CWD/icons/*.png; do + px=$( basename $i | cut -d. -f1 ) + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + cat $i > $dir/$PRGNAM.png +done + +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a docs/* $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 @@ -114,4 +135,4 @@ 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.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/smc/smc.desktop b/games/smc/smc.desktop index f11676a85a..d792590c25 100644 --- a/games/smc/smc.desktop +++ b/games/smc/smc.desktop @@ -1,8 +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 +Exec=/usr/games/smc +Icon=smc Terminal=false Type=Application Categories=Game;ActionGame; diff --git a/games/smc/smc.info b/games/smc/smc.info index b4808cd15a..2fe86a5168 100644 --- a/games/smc/smc.info +++ b/games/smc/smc.info @@ -5,6 +5,6 @@ DOWNLOAD="https://slackware.uk/~urchlay/src/smc-20140328.tar.gz" MD5SUM="a0d2e7a20d93badf2708baabcaabedba" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="FreeImage CEGUI0.7" +REQUIRES="CEGUI0.7" MAINTAINER="B. Watson" -EMAIL="yalhcru@gmail.com" +EMAIL="urchlay@slackware.uk" |