diff options
-rw-r--r-- | graphics/yafray/README | 8 | ||||
-rw-r--r-- | graphics/yafray/slack-desc | 19 | ||||
-rw-r--r-- | graphics/yafray/yafray.SlackBuild | 91 | ||||
-rw-r--r-- | graphics/yafray/yafray.info | 8 |
4 files changed, 126 insertions, 0 deletions
diff --git a/graphics/yafray/README b/graphics/yafray/README new file mode 100644 index 0000000000..2fdf3d036a --- /dev/null +++ b/graphics/yafray/README @@ -0,0 +1,8 @@ +YafRay is a powerful raytracer, under the LGPL license. It enables you to +create fantastic images and animations of a photorealistic quality. + +YafRay's dependencies are: + +libc, libgcc, libstdc++, libjpeg, zlib included in Slackware 12.1. + +scons, libopenexr, and ilmbase available at SlackBuilds.org. diff --git a/graphics/yafray/slack-desc b/graphics/yafray/slack-desc new file mode 100644 index 0000000000..00f329994c --- /dev/null +++ b/graphics/yafray/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------------------------------------------------------| +yafray: Yafray (Free Raytracing for the masses) +yafray: +yafray: YafRay is a powerful raytracer, under the LGPL license. It enables +yafray: you to create fantastic images and animations of a photorealistic +yafray: quality. +yafray: +yafray: For more information, see: http://www.yafray.org/ +yafray: +yafray: +yafray: +yafray: diff --git a/graphics/yafray/yafray.SlackBuild b/graphics/yafray/yafray.SlackBuild new file mode 100644 index 0000000000..41ca01e256 --- /dev/null +++ b/graphics/yafray/yafray.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for yafray +# +# This script is very fragile and works around the Scons setup, so be +# careful when upgrading to a new version! +# +# Written by Brian Muramatsu (brian@fhobia.org) + +PRGNAM=yafray +VERSION=0.0.9 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +# Extracts to "yafray" rather than "yafray-0.0.9" as might be expected. +tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# SConstruct uses linux-settings.py to parse arguments. In the get_cxxflags, +# it looks for "arch" and "tune" and doesn't seem to look at the regular +# CFLAGS and CXXFLAGS. These are the only optimization flags I saw in +# linux-settings.py. +if [ "$ARCH" = "i486" ]; then + SCONFLAGS="arch=i486 tune=i486" +elif [ "$ARCH" = "i586" ]; then + SCONFLAGS="arch=i586 tune=i586" +elif [ "$ARCH" = "i686" ]; then + SCONFLAGS="arch=i686 tune=i686" +fi + +# linux-settings.py shows that there is only the "prefix" flag to control +# where files will be copied to. Set the prefix to the SBo package directory, +# so that we can work on the package there. +SCONFLAGS="prefix=$PKG/usr $SCONFLAGS" + +# Equivalent to the usual "make" step... +scons $SCONFLAGS + +# The Yafray wiki says you need to put the flags again or else the information +# about the architecture will be lost, and it will compile it all over again! +# +# http://wiki.yafray.org/bin/view.pl/UserDoc/FaqEng#Compilation +scons $SCONFLAGS install + +# Move /usr/etc/gram.yafray to /etc/gram.yafray. Other distributions like +# Debian, Fedora, and Gentoo seem to do the same. At this point, I don't know +# what the impact of moving this is, but it does not seem to impede Yafray's +# function as described in the README. +mkdir $PKG/etc +mv $PKG/usr/etc/gram.yafray $PKG/etc/gram.yafray +rm -rf $PKG/usr/etc + +# Yafray's code seems to hardcode /usr/local/lib...so create a symlink from +# /usr/local/lib/yafray to /usr/lib/yafray. This made Blender work properly +# with Yafray immediately after installing this package. +mkdir -p $PKG/usr/local/lib +ln -sf /usr/lib/yafray $PKG/usr/local/lib/yafray + +# Copy over documentation. The only difference is there are some technical +# documents under the doc directory that are also copied besides the usual +# suspects. +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README doc $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Strip some libraries and binaries +( 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 +) + +# Build the package +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/graphics/yafray/yafray.info b/graphics/yafray/yafray.info new file mode 100644 index 0000000000..5344d7e367 --- /dev/null +++ b/graphics/yafray/yafray.info @@ -0,0 +1,8 @@ +PRGNAM="yafray" +VERSION="0.0.9" +HOMEPAGE="http://www.yafray.org/" +DOWNLOAD="http://www.yafray.org/sec/2/downloads/yafray-0.0.9.tar.gz" +MD5SUM="7365122e0ca6f439988f51e8b4db935c" +MAINTAINER="Brian Muramatsu" +EMAIL="brian@fhobia.org" +APPROVED="David Somero"
\ No newline at end of file |