diff options
Diffstat (limited to 'system/xboxdrv-linux/xboxdrv-linux.SlackBuild')
-rw-r--r-- | system/xboxdrv-linux/xboxdrv-linux.SlackBuild | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/system/xboxdrv-linux/xboxdrv-linux.SlackBuild b/system/xboxdrv-linux/xboxdrv-linux.SlackBuild index 3c62fb1969..731080f529 100644 --- a/system/xboxdrv-linux/xboxdrv-linux.SlackBuild +++ b/system/xboxdrv-linux/xboxdrv-linux.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for xboxdrv-linux @@ -23,26 +23,42 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220209 bkw: Modified by SlackBuilds.org: handle both possibilities for +# the tarball filename. However, this is *still broken* due to scons issues. + +# 20220218 acl: Modified by SlackBuilds.org: fix scons issues with arch +# patches. Update homepage to gitlab. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=xboxdrv-linux VERSION=${VERSION:-0.8.8} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; 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} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -61,15 +77,19 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -mkdir $PRGNAM-$VERSION -tar xvf $CWD/6e5e8a57628095d8d0c8bbb38187afb0f3a42112.tar.gz --strip-components 1 -C $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION +# thanks arch maintainers +patch -p1 < "$CWD/fix-60-sec-delay.patch" +patch -p1 < "$CWD/scons-py3.patch" +patch -p1 < "$CWD/scons-v4.2.0.patch" +patch -p1 < "$CWD/xboxdrvctl-py3.patch" 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 \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -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 {} \; scons \ CFLAGS="$SLKCFLAGS" \ @@ -96,4 +116,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 |