diff options
author | Nick Smallbone <nick@smallbone.se> | 2020-01-18 07:33:52 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-01-18 07:33:52 +0700 |
commit | b604b899eac64c1eca513cf29fb1d8c45ac58ddd (patch) | |
tree | 41cd96dcc7bf4be6aa277a9e15c4fc5e732e411f /development/swi-prolog/swi-prolog.SlackBuild | |
parent | e7be376fdb05a7cdff9fbed0171c253d74f471b0 (diff) |
development/swi-prolog: Updated for version 8.0.3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/swi-prolog/swi-prolog.SlackBuild')
-rw-r--r-- | development/swi-prolog/swi-prolog.SlackBuild | 115 |
1 files changed, 51 insertions, 64 deletions
diff --git a/development/swi-prolog/swi-prolog.SlackBuild b/development/swi-prolog/swi-prolog.SlackBuild index 4df1f0196a289..0ffc6dc4de092 100644 --- a/development/swi-prolog/swi-prolog.SlackBuild +++ b/development/swi-prolog/swi-prolog.SlackBuild @@ -1,34 +1,49 @@ #!/bin/sh -# Slackware build script for swi prolog -# written by Florian Kanngiesser (florian.kanngiesser@googlemail.com) + +# Slackware build script for swi-prolog + +# Copyright 2020 Nick Smallbone <nick@smallbone.se>, Gothenburg, Sweden +# 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=swi-prolog -VERSION=${VERSION:-6.2.4} +VERSION=${VERSION:-8.0.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -SRCNAM=pl +SRCNAM=swipl if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -# GMP requires gmplib. -if [ "${GMP:-no}" = "no" ]; then - SETGMP="out" -fi - CWD=$(pwd) 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" @@ -51,67 +66,39 @@ tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -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 {} \; -# Build with default options: In future hopefully we can build with BerkeleyDB -# support (--with-db). -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --mandir=/usr/man \ - --with$SETGMP-gmp \ - --build=$ARCH-slackware-linux -make all -make install DESTDIR=$PKG -cd packages -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --with-cpp \ - --with-clib \ - --with-odbc \ - --with-table \ - --with-xpce \ - --with-sgml \ - --with-RDF \ - --with-semweb \ - --with-http \ - --with-chr \ - --with-clpqr \ - --with-nlp \ - --with-ssl \ - --with-tipc \ - --with-pldoc \ - --with-plunit \ - --with-zlib \ - --with-R \ - --with-protobufs \ - --with-PDT \ - --with-utf8proc \ - --with-archive \ - --without-jpl -make all -make install DESTDIR=$PKG -cd - +# Compatibility with 14.2's version of CMake +sed -i 's/NATIVE_COMMAND/UNIX_COMMAND/g' packages/odbc/cmake/FindODBC.cmake -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DSWIPL_INSTALL_MANPAGES=man/man1 \ + -DINSTALL_DOCUMENTATION=1 \ + .. + make + make install/strip DESTDIR=$PKG +cd .. find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - COPYING INSTALL README* VERSION demo ReleaseNotes \ + LICENSE INSTALL VERSION customize \ $PKG/usr/doc/$PRGNAM-$VERSION +ln -s ../../lib/$SRCNAM/doc/Manual $PKG/usr/doc/$PRGNAM-$VERSION/manual +ln -s ../../lib/$SRCNAM/doc/packages $PKG/usr/doc/$PRGNAM-$VERSION +ln -s ../../lib/$SRCNAM/demo $PKG/usr/doc/$PRGNAM-$VERSION +ln -s ../../lib/$SRCNAM/README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |