aboutsummaryrefslogtreecommitdiff
path: root/games/smc
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-26 03:59:43 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:24 +0700
commit6639ea9752682c6640f1d0462603f2466c03a451 (patch)
tree706de66518aa88d9224f2e97856394d36331e0c7 /games/smc
parent5302c35e63561403585dbacfcd68c69bfe40c840 (diff)
games/smc: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/smc')
-rw-r--r--games/smc/README26
-rw-r--r--games/smc/doinst.sh6
-rw-r--r--games/smc/icons/16.pngbin0 -> 845 bytes
-rw-r--r--games/smc/icons/32.pngbin0 -> 2352 bytes
-rw-r--r--games/smc/icons/48.pngbin0 -> 4351 bytes
-rw-r--r--games/smc/icons/64.pngbin0 -> 6750 bytes
-rw-r--r--games/smc/smc.SlackBuild38
-rw-r--r--games/smc/smc.desktop4
8 files changed, 47 insertions, 27 deletions
diff --git a/games/smc/README b/games/smc/README
index 21f7187b7b41..a98dc65930cc 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 5fb28930db0b..3e5691a052b5 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
new file mode 100644
index 000000000000..329c0cebb3c9
--- /dev/null
+++ b/games/smc/icons/16.png
Binary files differ
diff --git a/games/smc/icons/32.png b/games/smc/icons/32.png
new file mode 100644
index 000000000000..1e7a2ae5128f
--- /dev/null
+++ b/games/smc/icons/32.png
Binary files differ
diff --git a/games/smc/icons/48.png b/games/smc/icons/48.png
new file mode 100644
index 000000000000..c20e5da6ae0a
--- /dev/null
+++ b/games/smc/icons/48.png
Binary files differ
diff --git a/games/smc/icons/64.png b/games/smc/icons/64.png
new file mode 100644
index 000000000000..fe9224f1b394
--- /dev/null
+++ b/games/smc/icons/64.png
Binary files differ
diff --git a/games/smc/smc.SlackBuild b/games/smc/smc.SlackBuild
index b72a47b79127..90f565dcc4c1 100644
--- a/games/smc/smc.SlackBuild
+++ b/games/smc/smc.SlackBuild
@@ -14,6 +14,11 @@
# 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
# issues with fontconfig.
@@ -41,9 +46,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -76,11 +78,8 @@ 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
@@ -89,6 +88,8 @@ 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
@@ -106,17 +107,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
diff --git a/games/smc/smc.desktop b/games/smc/smc.desktop
index f11676a85a87..d792590c25bb 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;