summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
author Yth - Arnaud2024-01-05 23:26:23 +0100
committer Willy Sudiarto Raharjo2024-01-06 02:08:37 +0100
commite3fa6ee4196ff57a9aff843d81fbdc6ec6b42a99 (patch)
tree435eac184c6b7ca0f4843ebf07dee57c43d5e1cd /games
parentfbaec84b71571d794e8d39ad458bacbd7ec9f9fd (diff)
downloadslackbuilds-e3fa6ee4196ff57a9aff843d81fbdc6ec6b42a99.tar.gz
games/blupimania: Added (new port of an old Blupi game).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/blupimania/README13
-rw-r--r--games/blupimania/blupimania.SlackBuild220
-rw-r--r--games/blupimania/blupimania.info14
-rw-r--r--games/blupimania/doinst.sh9
-rw-r--r--games/blupimania/slack-desc19
5 files changed, 275 insertions, 0 deletions
diff --git a/games/blupimania/README b/games/blupimania/README
new file mode 100644
index 0000000000..d6a2b14d98
--- /dev/null
+++ b/games/blupimania/README
@@ -0,0 +1,13 @@
+Blupimania is a modern port of the Epsitec SA 1994 game.
+
+It features a little yellow guy called Blupi facing various puzzles.
+
+Blupi comes out of a hole holding on to a balloon.
+Unfortunately he let's it blow away.
+Blupi is lost, he turns to the left or the right and does various
+unpredictable things of his own.
+The object of the game is to help him find another balloon, so that he
+can move on to the next riddle.
+Blupimania offers the option of creating your own riddles in level 5.
+
+See planetblupi, on SBo, for other Blupi related games.
diff --git a/games/blupimania/blupimania.SlackBuild b/games/blupimania/blupimania.SlackBuild
new file mode 100644
index 0000000000..a1ea62410f
--- /dev/null
+++ b/games/blupimania/blupimania.SlackBuild
@@ -0,0 +1,220 @@
+#!/bin/bash
+# Slackware build script for blupimania
+#
+# Yth | Pont-en-Royans, France | yth@ythogtha.org
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=blupimania
+VERSION=${VERSION:-1.6.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+BINDIR=/usr/games
+SDL2_IMAGE_VERSION=2.6.3
+SDL2_MIXER_VERSION=2.6.3
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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}
+
+DOCS="README.md LICENSE"
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+tar xvf $CWD/SDL_image-release-${SDL2_IMAGE_VERSION}.tar.gz
+tar xvf $CWD/SDL_mixer-release-${SDL2_MIXER_VERSION}.tar.gz
+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 {} \;
+sed -i 's#/lib/#/lib64/#g;s#NO_DEFAULT_PATH##g' CMakeLists.txt
+sed -i 's#<SDL2/SDL_image.h>#"SDL_image.h"#' src/blupimania.h
+sed -i 's#<SDL2/SDL_image.h>#"SDL_image.h"#' src/sdl/SDL3_IMG_webp.c src/sdl/SDL3_IMG.h src/blupimania.h
+sed -i 's#<SDL2/SDL_mixer.h>#"SDL_mixer.h"#' src/smaky.c src/play.c
+WORKDIR=$(pwd)
+
+## slackware's SDL2_image and SDL2_mixer are outdated, using more recent ones
+mkdir -p build $PKG/usr/share/blupimania \
+ SDL_image-release-${SDL2_IMAGE_VERSION}/build \
+ SDL_mixer-release-${SDL2_MIXER_VERSION}/build
+# SDL2_image
+pushd SDL_image-release-${SDL2_IMAGE_VERSION}
+./configure \
+ --prefix=/install \
+ --libdir=/install/lib$LIBDIRSUFFIX \
+ --enable-shared \
+ --disable-static \
+ --disable-sdltest \
+ --disable-bmp \
+ --disable-gif \
+ --disable-jpg \
+ --disable-jpg-shared \
+ --disable-lbm \
+ --disable-pcx \
+ --enable-png \
+ --disable-png-shared \
+ --disable-pnm \
+ --disable-tga \
+ --disable-tif \
+ --disable-tif-shared \
+ --disable-xcf \
+ --disable-xpm \
+ --disable-xv \
+ --enable-webp \
+ --enable-webp-shared
+# ./configure --enable-webp --disable-webp-shared
+# cd build
+# cmake \
+# -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+# -DCMAKE_INSTALL_PREFIX=/install \
+# -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+# -DCMAKE_BUILD_TYPE=Release ..
+make
+make install DESTDIR=$WORKDIR
+popd
+# SDL2_mixer
+pushd SDL_mixer-release-${SDL2_MIXER_VERSION}
+./configure \
+ --prefix=/install \
+ --libdir=/install/lib$LIBDIRSUFFIX \
+ --enable-shared \
+ --disable-static \
+ --disable-sdltest \
+ --disable-music-cmd \
+ --enable-music-wave \
+ --disable-music-mod \
+ --disable-music-mod-modplug \
+ --disable-music-mod-modplug-shared \
+ --disable-music-mod-mikmod \
+ --disable-music-mod-mikmod-shared \
+ --enable-music-midi \
+ --enable-music-midi-timidity \
+ --enable-music-midi-native \
+ --disable-music-midi-fluidsynth \
+ --disable-music-midi-fluidsynth-shared \
+ --enable-music-ogg \
+ --disable-music-ogg-tremor \
+ --disable-music-ogg-shared \
+ --disable-music-flac \
+ --disable-music-flac-shared \
+ --disable-music-mp3 \
+ --disable-music-mp3-smpeg \
+ --disable-music-mp3-smpeg-shared \
+ --disable-smpegtest \
+ --disable-music-mp3-mad-gpl
+# cmake \
+# -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+# -DCMAKE_INSTALL_PREFIX=/install \
+# -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+# -DCMAKE_BUILD_TYPE=Release ..
+make
+make install DESTDIR=$WORKDIR
+popd
+## End of SDL2 block
+
+BMDIR=$PKG/usr/share/blupimania
+cp $WORKDIR/install/lib64/*.so* $BMDIR
+# blupimania expects to find its files in (binary path)/../share/blupimania
+# Hence we are installing blupimania binary in /usr/libexec
+# and a shell wrapper in /usr/games.
+BINDIR=/usr/libexec
+mkdir -p $PKG/usr/games
+cat <<EOF > $PKG/usr/games/blupimania
+#!/bin/bash
+export LD_LIBRARY_PATH=/usr/share/blupimania:\$LD_LIBRARY_PATH
+exec "$BINDIR/blupimania" "\$@"
+EOF
+chmod 755 $PKG/usr/games/blupimania
+
+export SDL2_image_DIR=$WORKDIR/install/lib64/cmake/SDL2_image
+export SDL2_mixer_DIR=$WORKDIR/install/lib64/cmake/SDL2_mixer
+SLKCFLAGS="${SLKCFLAGS} -L$BMDIR -iquote${WORKDIR}/install/include/SDL2"
+export CMAKE_INSTALL_PREFIX=${WORKDIR}/install
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+ -DCMAKE_INSTALL_BINDIR:PATH=$BINDIR \
+ -DSTATIC_BUILD=OFF \
+ -DBUILD_LINUX=ON \
+ -Wno-dev \
+ -DCMAKE_BUILD_TYPE=Release ..
+ sed -i 's#-L/usr/lib#-L'$BMDIR'#g;s#-Wl,-rpath,/usr/lib#-Wl,-rpath,'$BMDIR'#g;s#-lSDL2#-lSDL2 -lSDL2_image -lSDL2_mixer -lwebp -lwebpdemux -lmodplug#g' CMakeFiles/blupimania.dir/link.txt
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+find $PKG -print0 | xargs -0 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
+mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/doc
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/blupimania/blupimania.info b/games/blupimania/blupimania.info
new file mode 100644
index 0000000000..6a748e7639
--- /dev/null
+++ b/games/blupimania/blupimania.info
@@ -0,0 +1,14 @@
+PRGNAM="blupimania"
+VERSION="1.6.2"
+HOMEPAGE="http://www.blupi.org/"
+DOWNLOAD="https://github.com/blupi-games/blupimania/archive/v1.6.2/blupimania-1.6.2.tar.gz \
+ https://github.com/libsdl-org/SDL_image/archive/release-2.6.3/SDL_image-release-2.6.3.tar.gz \
+ https://github.com/libsdl-org/SDL_mixer/archive/release-2.6.3/SDL_mixer-release-2.6.3.tar.gz"
+MD5SUM="da1b22b4bed62a50ee13392cf6e06ec9 \
+ bd3726acc520eb9f56f8698e74a22202 \
+ dad3d8c9b59b6eedda2d2fe2b1355fd9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="libmodplug"
+MAINTAINER="Yth - Arnaud"
+EMAIL="yth@ythogtha.org"
diff --git a/games/blupimania/doinst.sh b/games/blupimania/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/games/blupimania/doinst.sh
@@ -0,0 +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 -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/blupimania/slack-desc b/games/blupimania/slack-desc
new file mode 100644
index 0000000000..0facb73517
--- /dev/null
+++ b/games/blupimania/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+blupimania: blupimania (port of Epsitec SA 1994)
+blupimania:
+blupimania: Planet-Blupi is a modern port of the Epsitec SA 1994 game.
+blupimania:
+blupimania: It features a little yellow guy called Blupi facing various puzzles
+blupimania:
+blupimania: Blupi comes out of a hole holding on to a balloon.
+blupimania: Unfortunately he let's it blow away.
+blupimania:
+blupimania: The object of the game is to help him find another balloon, so that he
+blupimania: can move on to the next riddle.