diff options
author | Chris Abela <kristofru@gmail.com> | 2012-04-02 14:52:03 -0400 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2012-04-02 17:11:38 -0500 |
commit | fbf6db4c35d4bd0558f06f309c51408f926fb9fa (patch) | |
tree | bc85607e40bdfb8ce7f06001e00f4f7d113decad /academic/qhull/qhull.SlackBuild | |
parent | 57d794011a7aebb49f12ce5d25b019c0787c26ea (diff) |
academic/qhull: Updated for version 2012.1.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'academic/qhull/qhull.SlackBuild')
-rw-r--r-- | academic/qhull/qhull.SlackBuild | 73 |
1 files changed, 43 insertions, 30 deletions
diff --git a/academic/qhull/qhull.SlackBuild b/academic/qhull/qhull.SlackBuild index ca478dd9fd9b0..b2872a2193904 100644 --- a/academic/qhull/qhull.SlackBuild +++ b/academic/qhull/qhull.SlackBuild @@ -2,12 +2,29 @@ # Slackware build script for qhull -# Written by Chris Abela <chris.abela@maltats.com> -# 2010.03.19 +# Copyright 2012 Chris Abela, Malta +# 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=qhull -VERSION=${VERSION:-2010.1} -BUILD=${BUILD:-2} +VERSION=${VERSION:-2012.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -24,13 +41,13 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686 -fno-strict-aliasing" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686 -fno-strict-aliasing" + SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC -fno-strict-aliasing" + SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" @@ -52,29 +69,25 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -cd src -# Amongst other things, this caters for the octave SlackBuild -patch -Np0 -i $CWD/Make-config.sh.patch Make-config.sh -./Make-config.sh -cd - - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --datarootdir=/usr \ - --docdir=/usr \ - --disable-static \ - --build=$ARCH-slackware-linux - -make \ - docdir=/usr/doc/$PRGNAM-$VERSION -make install \ - docdir=/usr/doc/$PRGNAM-$VERSION \ - DESTDIR=$PKG - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man/man1 \ + -DDOC_INSTALL_DIR=/usr/doc/$PRGNAM-$VERSION \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +# Let octave find us +ln -s libqhull $PKG/usr/include/qhull +ln -s libqhull.h $PKG/usr/include/libqhull/qhull.h + +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 find $PKG/usr/man -type f -exec gzip -9 {} \; |