diff options
Diffstat (limited to 'system/xonsh/xonsh.SlackBuild')
-rw-r--r-- | system/xonsh/xonsh.SlackBuild | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/system/xonsh/xonsh.SlackBuild b/system/xonsh/xonsh.SlackBuild index eb1ac14701..ac0907d994 100644 --- a/system/xonsh/xonsh.SlackBuild +++ b/system/xonsh/xonsh.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for xonsh -# Copyright 2016-2019 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2016-2024 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,16 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220208 bkw: modified by SlackBuilds.org: updated for version 0.11.0, +# to fix the build on 15.0. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=xonsh -VERSION=${VERSION:-0.9.12} +VERSION=${VERSION:-0.14.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +41,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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} @@ -69,7 +79,14 @@ 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 {} \; -python3 setup.py install --root=$PKG +# Fixed compatibility with python3.9 +patch -p1 < $CWD/v310.patch + +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +export PYTHONPATH=/opt/python$PYVER/site-packages/ + +python3 -m build --wheel --no-isolation +python3 -m installer --destdir "$PKG" dist/*.whl find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -82,4 +99,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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 |