diff options
Diffstat (limited to 'games/rlvm/rlvm.SlackBuild')
-rw-r--r-- | games/rlvm/rlvm.SlackBuild | 36 |
1 files changed, 28 insertions, 8 deletions
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 |