summaryrefslogtreecommitdiffstats
path: root/libraries/muParser/muParser.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/muParser/muParser.SlackBuild')
-rw-r--r--libraries/muParser/muParser.SlackBuild61
1 files changed, 30 insertions, 31 deletions
diff --git a/libraries/muParser/muParser.SlackBuild b/libraries/muParser/muParser.SlackBuild
index 998068dfd6..671e707fa5 100644
--- a/libraries/muParser/muParser.SlackBuild
+++ b/libraries/muParser/muParser.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for muParser
-# Copyright 2011-2016 Petar Petrov slackalaxy@gmail.com
+# Copyright 2011-2021 Petar Petrov slackalaxy@gmail.com
+# Copyright 2022 Fellype do Nascimento, Guaratingueta, Brazil
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,29 +23,38 @@
# 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=muParser
-VERSION=${VERSION:-2.2.5}
+VERSION=${VERSION:-2.3.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=$(echo $PRGNAM | tr A-Z a-z)
-SRCVER=v2.2.5
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
*) export 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"
@@ -63,13 +73,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
-
-if [ -e $CWD/$SRCVER.tar.gz ]; then
- tar xvf $CWD/$SRCVER.tar.gz
-else
- tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-fi
-
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
@@ -78,21 +82,16 @@ 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 {} \;
-chmod +x configure
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
-
-make -j1
-make install DESTDIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
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
@@ -107,4 +106,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