summaryrefslogtreecommitdiffstats
path: root/academic/wxMaxima/wxMaxima.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/wxMaxima/wxMaxima.SlackBuild')
-rw-r--r--academic/wxMaxima/wxMaxima.SlackBuild32
1 files changed, 19 insertions, 13 deletions
diff --git a/academic/wxMaxima/wxMaxima.SlackBuild b/academic/wxMaxima/wxMaxima.SlackBuild
index 80b7aa18e0..feb51615b1 100644
--- a/academic/wxMaxima/wxMaxima.SlackBuild
+++ b/academic/wxMaxima/wxMaxima.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for wxMaxima
@@ -22,13 +22,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230627 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - use DESTDIR properly, to avoid baking $PKG into the binary.
+
# Mar 2021 - updated for v. 21.01, Judah Milgram, milgram at cgpp com
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=wxMaxima
SRCNAM=wxmaxima
VERSION=${VERSION:-21.01.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,23 +44,23 @@ 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}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -e
@@ -63,14 +69,14 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-Version-$VERSION
-tar xvf $CWD/Version-$VERSION.tar.gz
+tar xvf $CWD/$SRCNAM-Version-$VERSION.tar.gz
cd $SRCNAM-Version-$VERSION
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 {} +
BUILDDIR=build
mkdir -p $BUILDDIR
@@ -78,11 +84,11 @@ mkdir -p $BUILDDIR
export PATH="/opt/cmake-202x/bin:$PATH"
cmake \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=$PKG/usr \
+ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja -S . -B $BUILDDIR
cmake --build $BUILDDIR
-cmake --install $BUILDDIR
+DESTDIR=$PKG cmake --install $BUILDDIR
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
@@ -104,4 +110,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