diff options
-rw-r--r-- | graphics/mitsuba/README | 34 | ||||
-rw-r--r-- | graphics/mitsuba/doinst.sh | 4 | ||||
-rw-r--r-- | graphics/mitsuba/mitsuba.SlackBuild | 116 | ||||
-rw-r--r-- | graphics/mitsuba/mitsuba.info | 10 | ||||
-rw-r--r-- | graphics/mitsuba/slack-desc | 19 |
5 files changed, 183 insertions, 0 deletions
diff --git a/graphics/mitsuba/README b/graphics/mitsuba/README new file mode 100644 index 0000000000..59dfbdc6ad --- /dev/null +++ b/graphics/mitsuba/README @@ -0,0 +1,34 @@ +PREAMBLE +-------- + +Mitsuba is a GPLv3 research-oriented rendering system in the style of +PBRT. It is written in C++, implements unbiased as well as biased techniques, +and contains heavy optimizations targeted towards current CPU +architectures. + +Mitsuba places a strong emphasis on experimental rendering techniques, +such as path-based formulations of Metropolis Light Transport and +volumetric modeling approaches. + +http://mitsuba-renderer.org +This SlackBuild uses a git snapshot from 7 Feb 2015. + + +BUILDING AND INSTALLING +----------------------- + +Mitsuba requires libglewmx. Slackware ships with GLEW but it has not been compiled to include libglewmx, +so you will have to re-compile and re-install it manually. + +To do this, get the glew Slackbuild from your install disc (or your nearest Slackware mirror) and the glew source code. +Compile as normal, but your install line should be: + +make install.all GLEW_DEST=$PKG/usr +(where $PKG is your DESTDIR, which you will run makepkg against) + +Install your new version of glew and then build Mitsuba. + + +SEE ALSO +-------- +There is a handy Mitsuba Blender plugin available from SlackBuilds.org so that you can use Mitsuba as your Blender renderer. diff --git a/graphics/mitsuba/doinst.sh b/graphics/mitsuba/doinst.sh new file mode 100644 index 0000000000..4e8ba7071d --- /dev/null +++ b/graphics/mitsuba/doinst.sh @@ -0,0 +1,4 @@ +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/mitsuba/mitsuba.SlackBuild b/graphics/mitsuba/mitsuba.SlackBuild new file mode 100644 index 0000000000..b4eb99141e --- /dev/null +++ b/graphics/mitsuba/mitsuba.SlackBuild @@ -0,0 +1,116 @@ +#!/bin/sh +# Slackware build script for Klaatu + +# Copyright 2014 Klaatu, Wellington NZ +# GNU All-Permissive License +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +PRGNAM=mitsuba +VERSION=${VERSION:-b85118cd30d2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +unzip $CWD/$PRGNAM-$VERSION.zip +cd $PRGNAM-* +chown -R root:root . +find -L . \ + \( -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 {} \; + +sed -i "s%/usr/lib/%/usr/lib${LIBDIRSUFFIX}/%" data/cmake/FindGLEW.cmake + +cd build +cp config-linux-gcc.py ../config.py +DISTDIR=$PKG scons --jobs=$[${MAKEOPTS/-j/} - 1] -C .. prefix=$PKG/usr + +install -d \ + ${PKG}/usr/bin \ + ${PKG}/usr/lib${LIBDIRSUFFIX} \ + ${PKG}/usr/share/mitsuba/plugins \ + ${PKG}/usr/share/mitsuba/data/schema \ + ${PKG}/usr/share/mitsuba/data/ior \ + ${PKG}/usr/share/mitsuba/data/microfacet \ + ${PKG}/usr/share/applications \ + ${PKG}/usr/share/pixmaps \ + ${PKG}/usr/include/mitsuba/{core,hw,render,bidir} \ + ${PKG}/usr/lib${LIBDIRSUFFIX}/python2.7/lib-dynload + +install -m755 ../dist/mitsuba ../dist/mtsgui ../dist/mtssrv ../dist/mtsutil ${PKG}/usr/bin +install -m755 ../dist/libmitsuba-core.so \ + ../dist/libmitsuba-hw.so \ + ../dist/libmitsuba-render.so \ + ../dist/libmitsuba-bidir.so \ + ${PKG}/usr/lib${LIBDIRSUFFIX} +install -m755 ../dist/plugins/* ${PKG}/usr/share/mitsuba/plugins +install -m644 ../dist/data/schema/* ${PKG}/usr/share/mitsuba/data/schema +install -m644 ../dist/data/ior/* ${PKG}/usr/share/mitsuba/data/ior +install -m644 ../dist/data/microfacet/* ${PKG}/usr/share/mitsuba/data/microfacet +install -m644 ../dist/python/2.7/mitsuba.so ${PKG}/usr/lib${LIBDIRSUFFIX}/python2.7/lib-dynload + +if [ -e ../dist/python/3.3/mitsuba.so ]; then + install -d ${PKG}/usr/lib${LIBDIRSUFFIX}/python3.3/lib-dynload + install -m644 ../dist/python/3.3/mitsuba.so ${PKG}/usr/lib${LIBDIRSUFFIX}/python3.3/lib-dynload +fi + +install -m644 ../data/linux/mitsuba.desktop ${PKG}/usr/share/applications +install -m644 ../src/mtsgui/resources/mitsuba48.png ${PKG}/usr/share/pixmaps +install -m644 ../include/mitsuba/*.h ${PKG}/usr/include/mitsuba +install -m644 ../include/mitsuba/core/* ${PKG}/usr/include/mitsuba/core +install -m644 ../include/mitsuba/render/* ${PKG}/usr/include/mitsuba/render +install -m644 ../include/mitsuba/hw/* ${PKG}/usr/include/mitsuba/hw +install -m644 ../include/mitsuba/bidir/* ${PKG}/usr/include/mitsuba/bidir + +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 + +cd .. + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a setpath*sh $PKG/usr/doc/$PRGNAM-$VERSION + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $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/mitsuba/mitsuba.info b/graphics/mitsuba/mitsuba.info new file mode 100644 index 0000000000..9b9eccce04 --- /dev/null +++ b/graphics/mitsuba/mitsuba.info @@ -0,0 +1,10 @@ +PRGNAM="mitsuba" +VERSION="b85118cd30d2" +HOMEPAGE="http://mitsuba-renderer.org" +DOWNLOAD="http://slackermedia.info/slackbuilds/mitsuba/src/mitsuba-b85118cd30d2.zip" +MD5SUM="2b2dafee41dac5561f36f7064b7c87ee" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="%README% xerces-c collada-dom scons eigen3" +MAINTAINER="klaatu" +EMAIL="klaatu@member.fsf.org" diff --git a/graphics/mitsuba/slack-desc b/graphics/mitsuba/slack-desc new file mode 100644 index 0000000000..3923f80392 --- /dev/null +++ b/graphics/mitsuba/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +mitsuba: mitsuba (computer graphics renderer) +mitsuba: +mitsuba: A modular, experimental graphics renderer, placing an emphasis +mitsuba: upon experimental techniques like path-based formulations and +mitsuba: volumetric modeling. +mitsuba: +mitsuba: http://mitsuba-renderer.org +mitsuba: +mitsuba: +mitsuba: +mitsuba: |