diff options
author | Steven Voges <svoges.sbo@gmail.com> | 2023-09-09 10:55:40 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-09-09 10:14:14 +0700 |
commit | cf4e8bb2f6904c3b91840ab3ea02ca16e6d76dd8 (patch) | |
tree | 0deff9d5be20af1f08f0750e2c897a24573d742f /games/stepmania | |
parent | 5522e231bbb04b8975a685576e3a0ebd3bb55a31 (diff) |
games/stepmania: Added (dance and rhythm game).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/stepmania')
-rw-r--r-- | games/stepmania/README | 6 | ||||
-rw-r--r-- | games/stepmania/doinst.sh | 12 | ||||
-rw-r--r-- | games/stepmania/slack-desc | 19 | ||||
-rw-r--r-- | games/stepmania/stepmania.SlackBuild | 161 | ||||
-rw-r--r-- | games/stepmania/stepmania.info | 10 |
5 files changed, 208 insertions, 0 deletions
diff --git a/games/stepmania/README b/games/stepmania/README new file mode 100644 index 0000000000000..2486a57a02e13 --- /dev/null +++ b/games/stepmania/README @@ -0,0 +1,6 @@ +StepMania is a free dance and rhythm game for Windows, Mac, and Linux. +It features 3D graphics, keyboard and "dance pad" support, and an +editor for creating your own steps. + +StepMania may be optionally built with jack support. To enable, pass +JACK=ON to the script. This introduces a dependency on jack. diff --git a/games/stepmania/doinst.sh b/games/stepmania/doinst.sh new file mode 100644 index 0000000000000..e0358ddf8d2c5 --- /dev/null +++ b/games/stepmania/doinst.sh @@ -0,0 +1,12 @@ +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 + +( cd usr/bin ; rm -rf stepmania ) +( cd usr/bin ; ln -sf /usr/share/stepmania-5.1/stepmania stepmania ) diff --git a/games/stepmania/slack-desc b/games/stepmania/slack-desc new file mode 100644 index 0000000000000..06a03e5733f26 --- /dev/null +++ b/games/stepmania/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------------------------------------------------------| +stepmania: stepmania (Rhythm Game) +stepmania: +stepmania: StepMania is an advanced cross-platform rhythm game for home and +stepmania: arcade use. +stepmania: +stepmania: Homepage: https://www.stepmania.com +stepmania: +stepmania: +stepmania: +stepmania: +stepmania: diff --git a/games/stepmania/stepmania.SlackBuild b/games/stepmania/stepmania.SlackBuild new file mode 100644 index 0000000000000..a199a077afa70 --- /dev/null +++ b/games/stepmania/stepmania.SlackBuild @@ -0,0 +1,161 @@ +#!/bin/bash + +# Slackware build script for stepmania + +# Copyright 2023 Steven Voges <Oregon, USA> +# All rights reserved. +# +# 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=stepmania +VERSION=${VERSION:-20221114_d55acb1} +SRCVER=${SRCVER:-d55acb1ba26f1c5b5e3048d6d6c0bd116625216f} +JACK=${JACK:-OFF} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +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} + +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-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER +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 {} \; + +# Fixes for ffmpeg5 +sed -i "446s/NOT YASM_FOUND/NOT WITH_SYSTEM_FFMPEG AND NOT YASM_FOUND/" StepmaniaCore.cmake + +sed -i "480s/avcodec::CODEC_ID_NONE/avcodec::AV_CODEC_ID_NONE/" src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +sed -i "519d;520d;521d;522d;523d;" src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +sed -i "82s/avcodec::PixelFormat/avcodec::AVPixelFormat/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "109s/avcodec::PixelFormat/avcodec::AVPixelFormat/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "120s/avcodec::PIX_FMT_YUYV422,/avcodec::AV_PIX_FMT_YUYV422,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "131s/avcodec::PIX_FMT_BGRA,/avcodec::AV_PIX_FMT_BGRA,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "142s/avcodec::PIX_FMT_ARGB,/avcodec::AV_PIX_FMT_ARGB,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "154s/avcodec::PIX_FMT_ABGR,/avcodec::AV_PIX_FMT_ABGR,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "165s/avcodec::PIX_FMT_RGBA,/avcodec::AV_PIX_FMT_RGBA,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "176s/avcodec::PIX_FMT_RGB24,/avcodec::AV_PIX_FMT_RGB24,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "187s/avcodec::PIX_FMT_BGR24,/avcodec::AV_PIX_FMT_BGR24,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "198s/avcodec::PIX_FMT_RGB555,/avcodec::AV_PIX_FMT_RGB555,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h +sed -i "203s/avcodec::PIX_FMT_NB,/avcodec::AV_PIX_FMT_NB,/" src/arch/MovieTexture/MovieTexture_FFMpeg.h + +sed -i "108i add_compile_definitions(FF_API_NEXT)" src/CMakeData-arch.cmake +sed -i "511s/avcodec::AVCodec/const avcodec::AVCodec/" src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +sed -i "16i #include <libavcodec/avcodec.h>" src/arch/MovieTexture/MovieTexture_FFMpeg.h + +# Fix desktop entry +sed -i "11s/Application;Game;ArcadeGame/Game;ArcadeGame/" $PRGNAM.desktop +sed -i "3d" $PRGNAM.desktop + +mkdir -p build +cd build + cmake \ + -Wno-dev \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr/share \ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DWITH_JACK=$JACK \ + -DWITH_SDL=ON \ + -DWITH_SYSTEM_FFMPEG=ON \ + -DWITH_SYSTEM_GLEW=ON \ + -DWITH_SYSTEM_JPEG=ON \ + -DWITH_SYSTEM_JSONCPP=ON \ + -DWITH_SYSTEM_MAD=ON \ + -DWITH_SYSTEM_OGG=ON \ + -DWITH_SYSTEM_PCRE=ON \ + -DWITH_SYSTEM_PNG=ON \ + -DWITH_SYSTEM_TOMCRYPT=ON \ + -DWITH_SYSTEM_TOMMATH=ON \ + -DWITH_SYSTEM_ZLIB=ON \ + -DWITH_TTY=OFF \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +mkdir -p $PKG/usr/bin +chmod 0755 $PKG/usr/share/${PRGNAM}-5.1/GtkModule.so +for SIZE in 16 22 24 32 36 48 64 72 96 128 192 256 ; do + install -vDm0644 icons/hicolor/${SIZE}x${SIZE}/apps/${PRGNAM}-ssc.png \ + $PKG/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/${PRGNAM}-ssc.png +done +install -vDm0644 icons/hicolor/scalable/apps/${PRGNAM}-ssc.svg \ + $PKG/usr/share/icons/hicolor/scalable/apps/${PRGNAM}-ssc.svg +install -vDm0644 $PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop + +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 +cp -a \ + README.md 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/stepmania/stepmania.info b/games/stepmania/stepmania.info new file mode 100644 index 0000000000000..1d789abd06836 --- /dev/null +++ b/games/stepmania/stepmania.info @@ -0,0 +1,10 @@ +PRGNAM="stepmania" +VERSION="20221114_d55acb1" +HOMEPAGE="https://www.stepmania.com" +DOWNLOAD="https://github.com/stepmania/stepmania/archive/d55acb1ba26f1c5b5e3048d6d6c0bd116625216f/stepmania-d55acb1ba26f1c5b5e3048d6d6c0bd116625216f.tar.gz" +MD5SUM="77482300fb2019386ef7b8a7214ea859" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="jsoncpp libtomcrypt libtommath" +MAINTAINER="Steven Voges" +EMAIL="svoges.sbo@gmail.com" |