mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
games/rlvm: Fix 15.0 build, better parallel support.
Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
parent
7c0947548d
commit
dcd95394ee
2 changed files with 28 additions and 32 deletions
|
@ -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>
|
|
@ -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 {} \+
|
||||
|
||||
# From upstream
|
||||
patch -p1 < $CWD/gcc.patch
|
||||
# 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
|
||||
|
||||
scons --release
|
||||
# 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 jobs=$NUMJOBS
|
||||
|
||||
mkdir -p ${PKG}/usr/games ${PKG}/usr/bin
|
||||
cp build/release/rlvm $PKG/usr/games
|
||||
|
|
Loading…
Reference in a new issue