aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-21 16:30:09 -0500
committerRobby Workman <rworkman@slackbuilds.org>2022-02-21 17:16:51 -0600
commitdcd95394eed356d210ef7732e1fabd5067461a11 (patch)
tree55f731687cef3912f181c1d264e45e89e8b4af87
parent7c0947548de8557502a3c7d07a44f72d93e2431b (diff)
games/rlvm: Fix 15.0 build, better parallel support.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r--games/rlvm/gcc.patch24
-rw-r--r--games/rlvm/rlvm.SlackBuild36
2 files changed, 28 insertions, 32 deletions
diff --git a/games/rlvm/gcc.patch b/games/rlvm/gcc.patch
deleted file mode 100644
index fc4bedfb6902..000000000000
--- a/games/rlvm/gcc.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 668863d2222b962ee8e7d9829e972ef05c990302 Mon Sep 17 00:00:00 2001
-From: Elliot Glaysher <glaysher@umich.edu>
-Date: Sun, 22 May 2016 10:29:27 -0700
-Subject: [PATCH] Theoretical compile fix for gcc 4 series.
-
-Adds <iostream> to GraphicsObject.
-
-Closes #76.
----
- src/systems/base/graphics_object.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/systems/base/graphics_object.cc b/src/systems/base/graphics_object.cc
-index 9490b3b0..af22177d 100644
---- a/src/systems/base/graphics_object.cc
-+++ b/src/systems/base/graphics_object.cc
-@@ -36,6 +36,7 @@
- #include <boost/serialization/shared_ptr.hpp>
-
- #include <algorithm>
-+#include <iostream>
- #include <numeric>
- #include <sstream>
- #include <string>
diff --git a/games/rlvm/rlvm.SlackBuild b/games/rlvm/rlvm.SlackBuild
index 074eecda2f2a..3fd016166830 100644
--- a/games/rlvm/rlvm.SlackBuild
+++ b/games/rlvm/rlvm.SlackBuild
@@ -23,6 +23,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220221 bkw: Modified by SlackBuilds.org: fix build on 15.0.
+# TODO: Someone should explain why there's both /usr/games/rlvm and
+# /usr/bin/rlvm in the package. Not today.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM="rlvm"
@@ -39,9 +43,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
@@ -56,6 +57,19 @@ SRC_FLDR=$PRGNAM-$VERSION/
set -e
+if [ -z "$NUMJOBS" ]; then
+ # 20220221 bkw: everything else respects MAKEFLAGS, set NUMJOBS here
+ # from environment MAKEFLAGS, if we can...
+ NUMJOBS="$( echo $MAKEFLAGS | sed 's,.*-j *\([0-9][0-9]*\).*,\1,' )"
+
+ # ...if not, cores - 1:
+ [ -z "$NUMJOBS" ] && NUMJOBS=$(( $( nproc ) - 1 ))
+
+ # ...but not if we only had one core!
+ [ "$NUMJOBS" = "0" ] && NUMJOBS=1
+fi
+
+echo "=== NUMJOBS='$NUMJOBS'"
rm -fr $TMP/$SRC_FLDR $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -65,14 +79,20 @@ cd $SRC_FLDR
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 \
+ -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# 20220221 bkw: C++ infelicities.
+sed -i '1i#include <iostream>' src/systems/base/gan_graphics_object_data.cc
+sed -i '1i#include <memory>' src/systems/base/system.h
-# From upstream
-patch -p1 < $CWD/gcc.patch
+# 20220221 bkw: ancient python2 scons stuff, 2to3 actually works here:
+SCONSFIX="$( find . -type f -a -name SCons\* )"
+SCONSFIX+=" site_scons/site_tools/rlvm.py"
+2to3 --no-diffs -nw $SCONSFIX
-scons --release
+scons --release jobs=$NUMJOBS
mkdir -p ${PKG}/usr/games ${PKG}/usr/bin
cp build/release/rlvm $PKG/usr/games