summaryrefslogtreecommitdiff
path: root/libraries/isl/isl.SlackBuild
diff options
context:
space:
mode:
authorJan F. Chadima <jfch@jagda.eu>2017-12-03 23:36:30 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-12-09 08:27:19 +0700
commitcda89be7fd7a3ecdc3ea35382624d5f0f377e4e9 (patch)
treeed266124b50112b313a9a17788e044f5c8c89306 /libraries/isl/isl.SlackBuild
parentfb9324b1e59c511164417b0d4c74aec5596d04be (diff)
downloadslackbuilds-cda89be7fd7a3ecdc3ea35382624d5f0f377e4e9.tar.gz
libraries/isl: Added (Integer point manipulation library).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'libraries/isl/isl.SlackBuild')
-rw-r--r--libraries/isl/isl.SlackBuild115
1 files changed, 115 insertions, 0 deletions
diff --git a/libraries/isl/isl.SlackBuild b/libraries/isl/isl.SlackBuild
new file mode 100644
index 0000000000..58173fad6d
--- /dev/null
+++ b/libraries/isl/isl.SlackBuild
@@ -0,0 +1,115 @@
+#!/bin/sh
+
+# Slackware build script for isl
+
+# Copyright 2017 Jan F. Chadima <jfch@jagda.eu>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=isl
+VERSION=${VERSION:-0.18}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="${SLKCFLAGS:--O2 -march=i586 -mtune=i686}"
+ LIBDIRSUFFIX=""
+ GNUEABI=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="${SLKCFLAGS:--O2 -march=i686 -mtune=i686}"
+ LIBDIRSUFFIX=""
+ GNUEABI=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="${SLKCFLAGS:--O2 -fPIC}"
+ LIBDIRSUFFIX="64"
+ GNUEABI=""
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="${SLKCFLAGS:--O3 -march=armv4t -mtune=cortex-a6 -fPIC}"
+ LIBDIRSUFFIX=""
+ GNUEABI="-gnueabi"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="${SLKCFLAGS:--O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon-vfpv4 -fPIC}"
+ LIBDIRSUFFIX=""
+ GNUEABI="-gnueabi"
+else
+ SLKCFLAGS="${SLKCFLAGS:--O2}"
+ LIBDIRSUFFIX=""
+ GNUEABI=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$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 \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux$GNUEABI
+
+make
+make install DESTDIR=$PKG
+
+# Move gdb extension to its place.
+mkdir -p $PKG/usr/share/gdb/auto-load/usr/lib$LIBDIRSUFFIX
+mv $PKG/usr/lib$LIBDIRSUFFIX/*-gdb.py* \
+ $PKG/usr/share/gdb/auto-load/usr/lib$LIBDIRSUFFIX
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog LICENSE README doc/*.bib doc/*.pdf doc/*.pod doc/*.tex \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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:-tgz}