#!/bin/bash # Slackware build script for minimal-basic # Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # Notes: # Abandon all hope, ye who attempt to build this on non-x86_64 # platforms. The ecma55 binary gets linked with a bunch of x86_64 # object files in a directory named AMD64 (which ought to be a clue), # which are built from x86_64 assembly source (not C). Nothing you do # (hacking up the Makefile, etc) will let you link x86_64 objects with # non-x86_64 ones. Seriously. Do not email me asking for help with it. # Building on multilib should be possible, but I haven't tested it. # If you do, you can only build an x86_64 binary. See above. # There's a Makefile.clang, but it won't work on Slackware 15.0's # clang 13.x because it's too *new*. That's a rare situation in # Slackware... # There's also a Makefile.tcc, which actually does work with the # tcc in our repo (20220221_308d8d1), but I see no advantage to # building with tcc. And no, using tcc won't get around the "only # builds on x86_64" rule, either. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=minimal-basic SRCNAM=MinimalBASIC VERSION=${VERSION:-2.40} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi 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" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" else cat < $PKGDOC/$PRGNAM.SlackBuild 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