summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/unvanquished/90-mmap_min_addr.conf5
-rw-r--r--games/unvanquished/README7
-rw-r--r--games/unvanquished/doinst.sh2
-rw-r--r--games/unvanquished/unvanquished.SlackBuild21
-rw-r--r--games/unvanquished/unvanquished.info8
5 files changed, 35 insertions, 8 deletions
diff --git a/games/unvanquished/90-mmap_min_addr.conf b/games/unvanquished/90-mmap_min_addr.conf
new file mode 100644
index 0000000000..5ec0f225c5
--- /dev/null
+++ b/games/unvanquished/90-mmap_min_addr.conf
@@ -0,0 +1,5 @@
+# 90-mmap_min_addr.conf
+
+# Part of SlackBuilds.org games/unvanquished. See its README for details.
+
+vm.mmap_min_addr = 65536
diff --git a/games/unvanquished/README b/games/unvanquished/README
index 75a25dae15..22a39fc7cd 100644
--- a/games/unvanquished/README
+++ b/games/unvanquished/README
@@ -1,4 +1,11 @@
+unvanquished (FPS/RTS Game - Aliens vs. Humans)
+
Unvanquished is a fast-paced, futuristic FPS with RTS elements,
pitting technologically advanced humans against hordes of highly
adaptable aliens. The player can choose from either team, providing
a fresh gameplay experience on both sides of the conflict.
+
+Note: this package sets the sysctl variable 'vm.mmap_min_addr' to 65536.
+For more information, see:
+https://sysctl-explorer.net/vm/mmap_min_addr/
+https://wiki.debian.org/mmap_min_addr
diff --git a/games/unvanquished/doinst.sh b/games/unvanquished/doinst.sh
index 790741ddfe..5a7175642d 100644
--- a/games/unvanquished/doinst.sh
+++ b/games/unvanquished/doinst.sh
@@ -2,6 +2,8 @@ if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+[ -x /sbin/sysctl ] && /sbin/sysctl -p etc/sysctl.d/90-mmap_min_addr.conf >/dev/null 2>&1
+
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
diff --git a/games/unvanquished/unvanquished.SlackBuild b/games/unvanquished/unvanquished.SlackBuild
index 0ddd97b02b..5048dd33d5 100644
--- a/games/unvanquished/unvanquished.SlackBuild
+++ b/games/unvanquished/unvanquished.SlackBuild
@@ -22,9 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20210216 bkw: modified by SlackBuilds.org, BUILD=2:
+# - add -fpermissive to get it to compile
+# - include the complete game data (*.pk3 files) so the game actually runs
+# - add sysctl stuff to let the game actually start up
+# Apparently this build never worked and nobody noticed.
+
PRGNAM=unvanquished
VERSION=${VERSION:-0.50.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCNAM=Unvanquished
@@ -101,7 +107,7 @@ mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_CGAME=OFF \
-DBUILD_SGAME=OFF \
@@ -144,9 +150,10 @@ ln -sf $PKG/etc/$PRGNAM/config/server.cfg \
ln -sf $PKG/etc/$PRGNAM/config/maprotation.cfg \
$PKG/var/lib/$PRGNAM-server/config/maprotation.cfg
-# Copy the data-game
+# Copy the game data
mkdir -p $PKG/usr/share/games/$PRGNAM/pkg
-cp $CWD/$PRGNAM\_$VERSION.pk3 $PKG/usr/share/games/$PRGNAM/pkg
+unzip $CWD/${PRGNAM}_$VERSION.zip '*/pkg/*'
+cp -a ${PRGNAM}_$VERSION/pkg/* $PKG/usr/share/games/$PRGNAM/pkg
mkdir -p $PKG/usr/share/applications
install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
@@ -158,6 +165,12 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a GPL.txt README.md COPYING.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20210216 bkw: sysctl is needed per
+# https://github.com/Unvanquished/Unvanquished/issues/944
+# It actually makes the game start up.
+mkdir -p $PKG/etc/sysctl.d
+cat $CWD/90-mmap_min_addr.conf > $PKG/etc/sysctl.d/90-mmap_min_addr.conf
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
diff --git a/games/unvanquished/unvanquished.info b/games/unvanquished/unvanquished.info
index f349cdf0ff..1a59696c92 100644
--- a/games/unvanquished/unvanquished.info
+++ b/games/unvanquished/unvanquished.info
@@ -2,16 +2,16 @@ PRGNAM="unvanquished"
VERSION="0.50.0"
HOMEPAGE="http://www.unvanquished.net/"
DOWNLOAD="http://ponce.cc/slackware/sources/repo/unvanquished/v0.50.0.tar.gz \
- http://ponce.cc/slackware/sources/repo/unvanquished/unvanquished_0.50.0.pk3 \
+ https://github.com/Unvanquished/Unvanquished/releases/download/v0.50.0/unvanquished_0.50.0.zip \
http://ponce.cc/slackware/sources/repo/unvanquished/linux32-4.tar.bz2"
MD5SUM="d9279452fb1a6747f830660b444e7b20 \
- 36860685567cd7e4198726e1a4b0ce40 \
+ 591662c094a39be954af2e9167e1f075 \
dd2cb5419bac9a1b81a8a996312e33ff"
DOWNLOAD_x86_64="http://ponce.cc/slackware/sources/repo/unvanquished/v0.50.0.tar.gz \
- http://ponce.cc/slackware/sources/repo/unvanquished/unvanquished_0.50.0.pk3 \
+ https://github.com/Unvanquished/Unvanquished/releases/download/v0.50.0/unvanquished_0.50.0.zip \
http://ponce.cc/slackware/sources/repo/unvanquished/linux64-4.tar.bz2"
MD5SUM_x86_64="d9279452fb1a6747f830660b444e7b20 \
- 36860685567cd7e4198726e1a4b0ce40 \
+ 591662c094a39be954af2e9167e1f075 \
2ba12c71625919ddc282172b74fa4887"
REQUIRES="GeoIP SDL2 libwebp speex OpenAL opusfile lua PyYAML Jinja2"
MAINTAINER="Dimitris Zlatanidis"