aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorSean Hinchee <henesy.dev@gmail.com>2024-11-06 15:30:53 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-11-06 15:43:07 +0700
commit7bedcec2532fdae9d4d23d9c93bc763131c32504 (patch)
treedddd637f48dc9868c499c86b93d9fab9ced80dbc /games
parent68d3a873efa85159cc00ed85cffa8cc2b1101a0f (diff)
games/openrct2: Added (Open Source RollerCoaster Tycoon 2).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/openrct2/README12
-rw-r--r--games/openrct2/doinst.sh10
-rw-r--r--games/openrct2/openrct2.SlackBuild129
-rw-r--r--games/openrct2/openrct2.info18
-rw-r--r--games/openrct2/slack-desc19
5 files changed, 188 insertions, 0 deletions
diff --git a/games/openrct2/README b/games/openrct2/README
new file mode 100644
index 000000000000..6964f54fe1ea
--- /dev/null
+++ b/games/openrct2/README
@@ -0,0 +1,12 @@
+Re-implementation of RollerCoaster Tycoon 2.
+
+An open-source re-implementation of RollerCoaster
+Tycoon 2, a construction and management simulation
+video game that simulates amusement park management.
+
+Original files from RollerCoaster Tycoon 2 (and
+optionally RollerCoaster Tycoon 1) are required to
+play.
+
+You should add /opt/openrct2/bin to your $PATH to
+play.
diff --git a/games/openrct2/doinst.sh b/games/openrct2/doinst.sh
new file mode 100644
index 000000000000..98a8e99da0dc
--- /dev/null
+++ b/games/openrct2/doinst.sh
@@ -0,0 +1,10 @@
+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
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/games/openrct2/openrct2.SlackBuild b/games/openrct2/openrct2.SlackBuild
new file mode 100644
index 000000000000..57bad1b3b1b1
--- /dev/null
+++ b/games/openrct2/openrct2.SlackBuild
@@ -0,0 +1,129 @@
+#!/bin/bash
+
+# Slackware build script for openrct2
+
+# Copyright 2024 Sean Hinchee
+# 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=openrct2
+VERSION=${VERSION:-0.4.15}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+COMMIT=c7c8fad822d10e7fbec26eeefbf2e552a02b8ea9
+ARCHIVE=OpenRCT2-$COMMIT.tar.gz
+
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$ARCHIVE
+cd $(basename -s '.tar.gz' $ARCHIVE)
+
+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 {} \;
+
+# Insert the extra asset downloads
+
+mkdir -p $PKG/opt/openrct2/share/openrct2/sequence/
+cp $CWD/title-sequences.zip $PKG/opt/openrct2/share/openrct2/sequence/
+
+mkdir -p $PKG//opt/openrct2/share/openrct2/object/
+cp $CWD/objects.zip $PKG/opt/openrct2/share/openrct2/object/
+
+mkdir -p $PKG/opt/openrct2/share/openrct2/
+cp $CWD/opensound.zip $PKG/opt/openrct2/share/openrct2/
+cp $CWD/openmusic.zip $PKG/opt/openrct2/share/openrct2/
+
+mkdir -p $PKG/opt/openrct2
+
+cmake -S . -B build -DCMAKE_INSTALL_PREFIX:PATH=/opt/openrct2
+cmake --build build
+cd build
+make install DESTDIR=$PKG
+cd ..
+
+### Fix /usr/share nonsense
+mkdir -p $PKG/usr/man
+mv $PKG/opt/openrct2/share/man/* $PKG/usr/man
+
+# Fix misplaced docs
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+
+mv $PKG/opt/openrct2/share/doc/openrct2/* $PKG/usr/doc/$PRGNAM-$VERSION/
+
+rm -r $PKG/opt/openrct2/share/doc
+rm -r $PKG/opt/openrct2/share/man
+
+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
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+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/openrct2/openrct2.info b/games/openrct2/openrct2.info
new file mode 100644
index 000000000000..3ea78e2109be
--- /dev/null
+++ b/games/openrct2/openrct2.info
@@ -0,0 +1,18 @@
+PRGNAM="openrct2"
+VERSION="0.4.15"
+HOMEPAGE="https://github.com/OpenRCT2/OpenRCT2"
+DOWNLOAD="https://github.com/OpenRCT2/OpenRCT2/archive/c7c8fad8/OpenRCT2-c7c8fad822d10e7fbec26eeefbf2e552a02b8ea9.tar.gz \
+https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.14/title-sequences.zip \
+https://github.com/OpenRCT2/objects/releases/download/v1.4.8/objects.zip \
+https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.5/opensound.zip \
+https://github.com/OpenRCT2/OpenMusic/releases/download/v1.6/openmusic.zip"
+MD5SUM="af969d4436f12bc1f00c291d9c200e36 \
+b536668efe23bfb23dd696b2d766f9a3 \
+d7127c2e70974d68129bb80b42bfec81 \
+2cd0f1526a6823acbf434436bda0f760 \
+f63abc576314641b2b4eeeaaf5757f47"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="nlohmann_json innoextract"
+MAINTAINER="Sean Hinchee"
+EMAIL="henesy.dev@gmail.com"
diff --git a/games/openrct2/slack-desc b/games/openrct2/slack-desc
new file mode 100644
index 000000000000..7df7cef70026
--- /dev/null
+++ b/games/openrct2/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------------------------------------------------------|
+openrct2: openrct2 (re-implementation of RollerCoaster Tycoon 2)
+openrct2:
+openrct2: An open-source re-implementation of RollerCoaster
+openrct2: Tycoon 2, a construction and management simulation
+openrct2: video game that simulates amusement park management.
+openrct2:
+openrct2:
+openrct2:
+openrct2:
+openrct2: Homepage: https://github.com/OpenRCT2/OpenRCT2
+openrct2: