diff options
Diffstat (limited to 'development/ninja-ide/ninja-ide.SlackBuild')
-rw-r--r-- | development/ninja-ide/ninja-ide.SlackBuild | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/development/ninja-ide/ninja-ide.SlackBuild b/development/ninja-ide/ninja-ide.SlackBuild index 49cffef7b3..5cedda5472 100644 --- a/development/ninja-ide/ninja-ide.SlackBuild +++ b/development/ninja-ide/ninja-ide.SlackBuild @@ -1,10 +1,10 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for ninja-ide # Copyright 2012 Binh Nguyen <binhvng@gmail.com> # Copyright 2014 Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org -# Copyright 2017 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2017-2022 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,10 +24,13 @@ # 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=ninja-ide -VERSION=${VERSION:-2.3} +VERSION=${VERSION:-2.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -48,7 +58,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -57,7 +67,17 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -python setup.py install --root=$PKG -O1 +# This was missed in the v2.4 backport (Thanks aur repository) + sed -r "s/(print) ('.+')$/\1\(\2\)/" \ + -i "ninja_tests/core/examples/file_for_tests.py" + +# Work around not being prepared for python 3.8 (Thanks aur repository) + sed -e "s/_ast.Num/_ast.Constant/" \ + -e "/_ast.Str/ s/^/#/" \ + -i ninja_ide/tools/introspection.py \ + ninja_ide/tools/completion/analyzer.py + +python3 setup.py install --root=$PKG -O1 find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -77,4 +97,4 @@ 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:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |