summaryrefslogtreecommitdiffstats
path: root/libraries/mathgl/mathgl.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/mathgl/mathgl.SlackBuild')
-rw-r--r--libraries/mathgl/mathgl.SlackBuild30
1 files changed, 22 insertions, 8 deletions
diff --git a/libraries/mathgl/mathgl.SlackBuild b/libraries/mathgl/mathgl.SlackBuild
index 87dbc2451a..3527625222 100644
--- a/libraries/mathgl/mathgl.SlackBuild
+++ b/libraries/mathgl/mathgl.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for MathGL
@@ -15,26 +15,36 @@
# (INCLUDING NEGLIGENCE OR 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=mathgl
-VERSION=${VERSION:-2.3.3}
+VERSION=${VERSION:-2.4.4}
BUILD=${BUILD:-1}
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"
@@ -83,6 +93,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+sed -i CMakeLists.txt \
+ -e "s|lib/cmake/mathgl|lib$LIBDIRSUFFIX/cmake/mathgl|" \
+ -e "s|\"lib\"|\"lib$LIBDIRSUFFIX\"|"
+
mkdir -p build
cd build
cmake -D CMAKE_C_FLAGS="$SLKCFLAGS" \
@@ -105,7 +119,7 @@ cd build
-D enable-octave:BOOL=$OCTAVE_FLAG \
-D enable-opengl:BOOL=ON \
-D enable-wx:BOOL=ON \
- -D enable-qt4:BOOL=ON \
+ -D enable-qt5:BOOL=ON \
-D CMAKE_BUILD_TYPE:STRING=$ARCH-slackware-linux .. -L
make
make install DESTDIR=$PKG
@@ -125,4 +139,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