diff options
Diffstat (limited to 'graphics/povray/povray.SlackBuild')
-rw-r--r-- | graphics/povray/povray.SlackBuild | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/graphics/povray/povray.SlackBuild b/graphics/povray/povray.SlackBuild index ac77e1e034..621556b943 100644 --- a/graphics/povray/povray.SlackBuild +++ b/graphics/povray/povray.SlackBuild @@ -3,22 +3,40 @@ # Slackware build script for povray: # the Persistence of Vision Raytracer -# Written by Niels Horn - niels.horn@gmail.com -# revision date 2009/10/05 +# Copyright 2009,2011 Niels Horn, Rio de Janeiro, RJ, Brazil +# 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. + +# revision date 2011/12/09 PRGNAM=povray -VERSION=3.6.1 -# The Source tarball does not contain the 'minor' version number in its name: -SRCVERSION=3.6 +VERSION=${VERSION:-3.7.0.RC3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: +# The "short" version number is needed later: +SHORT_VERSION=$( echo $VERSION | cut -f1-2 -d. ) + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -50,11 +68,19 @@ set -e rm -rf $TMP/$PRGNAM-$VERSION $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . +# Need to specify boost_thread for 64-bits +# (upstream is aware of this glitch) +if [ "$ARCH" = "x86_64" ]; then + BOOST64="--with-boost-thread=boost_thread" +else + BOOST64="" +fi + CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -63,6 +89,7 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=/var \ --mandir=/usr/man \ --build=$ARCH-slackware-linux \ + $BOOST64 \ COMPILED_BY="$POVRAY_BUILDER" make @@ -71,20 +98,18 @@ make install DESTDIR=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done -) +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 # Rename configuration files to .new, will be checked by doinst.sh -mv $PKG/etc/$PRGNAM/$SRCVERSION/$PRGNAM.conf \ - $PKG/etc/$PRGNAM/$SRCVERSION/$PRGNAM.conf.new -mv $PKG/etc/$PRGNAM/$SRCVERSION/$PRGNAM.ini \ - $PKG/etc/$PRGNAM/$SRCVERSION/$PRGNAM.ini.new +mv $PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.conf \ + $PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.conf.new +mv $PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.ini \ + $PKG/etc/$PRGNAM/$SHORT_VERSION/$PRGNAM.ini.new # ./configure does not accept "--docdir=", so we'll move the docdir manually mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -mv $PKG/usr/share/doc/$PRGNAM-$SRCVERSION/* $PKG/usr/doc/$PRGNAM-$VERSION/ +mv $PKG/usr/share/doc/$PRGNAM-$SHORT_VERSION/* $PKG/usr/doc/$PRGNAM-$VERSION/ rm -r $PKG/usr/share/doc cp -a COPYING INSTALL $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; @@ -92,7 +117,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -sed "s,__VERSION__,$SRCVERSION,g" $CWD/doinst.sh > $PKG/install/doinst.sh +sed "s,@VERSION@,$SHORT_VERSION,g" $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |