summaryrefslogtreecommitdiff
path: root/pcr/mitsuba
diff options
context:
space:
mode:
authorMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-04-26 10:21:01 -0300
committerMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-04-26 10:21:01 -0300
commit8b62eb163aaa29bfe1668e5169271a04b0716c7f (patch)
tree9c35b41aa56447121a0a5921f9140199073fb16a /pcr/mitsuba
parentee387c4f2fc3fc5fc3251fd84a7386202e270d63 (diff)
add mitsuba and collada-dom to pcr repo
Diffstat (limited to 'pcr/mitsuba')
-rw-r--r--pcr/mitsuba/PKGBUILD130
-rw-r--r--pcr/mitsuba/blender-addon-mitsuba.install11
-rw-r--r--pcr/mitsuba/mitsuba.install13
3 files changed, 154 insertions, 0 deletions
diff --git a/pcr/mitsuba/PKGBUILD b/pcr/mitsuba/PKGBUILD
new file mode 100644
index 000000000..d418e5d55
--- /dev/null
+++ b/pcr/mitsuba/PKGBUILD
@@ -0,0 +1,130 @@
+# Maintainer: Márcio Silva <coadde@lavabit.com>
+
+pkgname=(
+ mitsuba
+ blender-addon-mitsuba
+)
+_bldname=${pkgname[1]::7}
+_addname=${pkgname[0]}-${_bldname}
+pkgver=0.4.4 # Thu Feb 28 15:00:37 2013 -0800 tag:v0.4.4 rev:1674
+_pkgdat=20130228
+_pkgrev=1674
+_bldver=2.66
+_addver=0.2.1 # Wed Mar 20 01:30:37 2013 +0100 rev:40 ($srcdir/$_addname/${pkgname[0]}/__init__.py:bl_info>version)
+_adddat=20130320
+_addrev=40
+_bldep=7
+_pyver=3.3
+pkgrel=1
+pkgdesc='A physically based renderer'
+arch=(
+ i686
+ x86_64
+ mips64el
+)
+url=https://${pkgname[0]}-renderer.org/
+license=GPL3
+depends=(
+ boost-libs
+ collada-dom
+ glew
+ libxxf86vm
+ 'openexr=2.0.0'
+ qt4
+ xerces-c
+)
+optdepends=(
+ 'python: Python bindings'
+ "${pkgname[1]}: ${_bldname^} addon exporter and renderer"
+)
+makedepends=(
+ boost
+ cmake
+ eigen3
+ mercurial
+ python
+)
+install=$pkgname.install
+source=(
+ hg+https://${pkgname[0]}-renderer.org/hg/${pkgname[0]}
+ hg+https://${pkgname[0]}-renderer.org/hg/$_addname
+ ${pkgname[1]}.install
+)
+sha512sums=(SKIP SKIP SKIP)
+
+prepare() {
+ mv $srcdir/${pkgname[1]}.install $startdir
+
+ cd $srcdir/${pkgname[0]}
+
+ [[ -d build ]] && rm -r build
+ mkdir build
+
+ cd $startdir/../srcdest/${pkgname[0]}
+
+ msg "${pkgname[0]}"
+ hg update -c v$pkgver
+ hg log -l 1 -r v$pkgver
+
+ cd $startdir/../srcdest/$_addname
+
+ msg "${pkgname[1]}"
+ hg update -c -r $_addrev
+ hg log -l 1 -r $_addrev
+}
+
+build() {
+ cd $srcdir/${pkgname[0]}/build
+
+ setarch $CARCH cmake .. -DCMAKE_INSTALL_PREFIX=/usr\
+ -DBoost_PYTHON_LIBRARY=/usr/lib/libboost_python${_pyver::1}.so\
+ -DPYTHON_INCLUDE_DIR=/usr/include/python${_pyver}m\
+ -DPYTHON_LIBRARY=/usr/lib/libpython${_pyver}m.so
+
+ setarch $CARCH make
+}
+
+package_mitsuba() {
+ cd $srcdir/${pkgname[0]}/build
+ setarch $CARCH make DESTDIR=$pkgdir install
+
+ #fixing files and folders location
+ a=$pkgdir/usr
+ b=$srcdir/${pkgname[0]}
+ install -d $a/{bin,lib{,/python$_pyver/lib-dynload},share/{applications,{licenses/,}${pkgname[0]},pixmaps}}
+ install -m644 $b/data/linux/${pkgname[0]}.desktop $a/share/applications
+ install -m644 $b/src/mtsgui/resources/${pkgname[0]}48.png $a/share/pixmaps
+ install -m644 $b/doc/license.txt $a/share/licenses/${pkgname[0]}/LICENSE
+ mv $a/{m{itsuba,ts{gui,import,srv,util}},bin}
+ mv $a/lib{${pkgname[0]}-{bidir,core,hw,render}.so,}
+ mv $a/{{data,plugins},share/${pkgname[0]}}
+ mv $a/{python/mitsuba.so,lib/python$_pyver/lib-dynload}
+ mv $a/{sdk/include,}
+ rmdir $a/{python,sdk}
+}
+
+package_blender-addon-mitsuba() {
+ _pkgname=${pkgname:14}
+ _pkgver=$pkgver
+ pkgver=$_addver.r$_addrev.v$_bldver
+ pkgdesc="A addon for the ${_bldname^} which allows render and export with Mitsuba (built for the $_bldname-libre package)"
+ arch=any
+ depends=(
+ $_pkgname=$_pkgver
+ "$_bldname>=$(($_bldep-1)):$_bldver"
+ "$_bldname<$_bldep:${_bldver::2}$((${_bldver:2:4}+1))"
+ )
+ optdepends=
+ install=$pkgname.install
+
+ cd $srcdir/$_addname
+
+ a=$pkgdir/usr/share/$_bldname/$_bldver/scripts/addons
+ b=$pkgdir/usr/share/licenses/$pkgname
+ c=$srcdir/$_pkgname/doc/license.txt
+
+ install -d $a && cp -a $_pkgname $a
+ install -d $b && install -m644 $c $b/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/mitsuba/blender-addon-mitsuba.install b/pcr/mitsuba/blender-addon-mitsuba.install
new file mode 100644
index 000000000..41d69870d
--- /dev/null
+++ b/pcr/mitsuba/blender-addon-mitsuba.install
@@ -0,0 +1,11 @@
+post_install() {
+ cat << EOF
+## Please type "/usr/bin" in
+## "Mitsuba Engine Settings" > "Executable path:" option
+## to correct fuction.
+EOF
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/pcr/mitsuba/mitsuba.install b/pcr/mitsuba/mitsuba.install
new file mode 100644
index 000000000..724bfce00
--- /dev/null
+++ b/pcr/mitsuba/mitsuba.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ update-mime-database usr/share/mime &> /dev/null
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}