summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2010-05-13 00:58:23 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:58:23 +0200
commit4ea4881ef28d6a990e65b1f65426267f670fc413 (patch)
tree7ee40f8642305b7727fbd89351583ca2f0933a63 /graphics
parent055168680389845d5326b803dce9a0e33a950427 (diff)
downloadslackbuilds-4ea4881ef28d6a990e65b1f65426267f670fc413.tar.gz
graphics/povray: Added to 13.0 repository
Diffstat (limited to 'graphics')
-rw-r--r--graphics/povray/README14
-rw-r--r--graphics/povray/doinst.sh20
-rw-r--r--graphics/povray/povray.SlackBuild90
-rw-r--r--graphics/povray/povray.info10
-rw-r--r--graphics/povray/slack-desc19
5 files changed, 153 insertions, 0 deletions
diff --git a/graphics/povray/README b/graphics/povray/README
new file mode 100644
index 0000000000..95ee387cc2
--- /dev/null
+++ b/graphics/povray/README
@@ -0,0 +1,14 @@
+POV-Ray: The Persistence of Vision Raytracer is a high-quality,
+totally free tool for creating stunning three-dimensional graphics.
+
+The author of POV-Ray asks users who build their own binaries to
+include their name and e-mail in the final result.
+
+The included SlackBuild offers this possibility by entering the
+information on the command line like this:
+
+ # POVRAY_BUILDER="your name <email@address>" ./povray.SlackBuild
+
+If you leave this variable empty, it will be supplied by the
+SlackBuild script as "`whoami` on `hostname`"
+
diff --git a/graphics/povray/doinst.sh b/graphics/povray/doinst.sh
new file mode 100644
index 0000000000..95e20fef95
--- /dev/null
+++ b/graphics/povray/doinst.sh
@@ -0,0 +1,20 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/povray/__VERSION__/povray.conf.new
+config etc/povray/__VERSION__/povray.ini.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/graphics/povray/povray.SlackBuild b/graphics/povray/povray.SlackBuild
new file mode 100644
index 0000000000..e0704a066d
--- /dev/null
+++ b/graphics/povray/povray.SlackBuild
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+# Slackware build script for povray:
+# the Persistence of Vision Raytracer
+
+# Written by Niels Horn - niels.horn@gmail.com
+# revision date 2009/10/05
+
+PRGNAM=povray
+VERSION=3.6.1
+# The Source tarball does not contain the 'minor' version number in its name:
+SRCVERSION=3.6
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+POVRAY_BUILDER=${POVRAY_BUILDER:-"$(whoami) on $(hostname)"}
+
+# povray prefers -O3 to build, so we do not use the -O2 flag
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $TMP/$PRGNAM-$VERSION $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux \
+ COMPILED_BY="$POVRAY_BUILDER"
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+( 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
+)
+
+# 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
+
+# ./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/
+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 {} \;
+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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/graphics/povray/povray.info b/graphics/povray/povray.info
new file mode 100644
index 0000000000..0811ace106
--- /dev/null
+++ b/graphics/povray/povray.info
@@ -0,0 +1,10 @@
+PRGNAM="povray"
+VERSION="3.6.1"
+HOMEPAGE="http://www.povray.org/"
+DOWNLOAD="ftp://ftp.povray.org/pub/povray/Official/Unix/povray-3.6.tar.gz"
+MD5SUM="6d0da1ab9f7a6374d67d6554337311ee"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="rworkman"
diff --git a/graphics/povray/slack-desc b/graphics/povray/slack-desc
new file mode 100644
index 0000000000..a18fc438a5
--- /dev/null
+++ b/graphics/povray/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+povray: povray (3D graphics tool)
+povray:
+povray: The Persistence of Vision Raytracer is a high-quality, totally
+povray: free tool for creating stunning three-dimensional graphics.
+povray:
+povray: http://www.povray.org/
+povray:
+povray:
+povray:
+povray:
+povray: