summaryrefslogtreecommitdiff
path: root/pcr/mitsuba/PKGBUILD
diff options
context:
space:
mode:
authorMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-08-01 22:09:26 -0300
committerMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-08-01 22:09:26 -0300
commitbd137597091609d028d6488e0e2edc9aa0c993a5 (patch)
treeb553faa5880b0895bf888241636bd016f2a821f9 /pcr/mitsuba/PKGBUILD
parent906eb058d481ef38069400bb39ccde268b229daf (diff)
downloadabslibre-bd137597091609d028d6488e0e2edc9aa0c993a5.tar.gz
abslibre-bd137597091609d028d6488e0e2edc9aa0c993a5.tar.bz2
abslibre-bd137597091609d028d6488e0e2edc9aa0c993a5.zip
mitsuba: fixing pkg
Diffstat (limited to 'pcr/mitsuba/PKGBUILD')
-rw-r--r--pcr/mitsuba/PKGBUILD63
1 files changed, 36 insertions, 27 deletions
diff --git a/pcr/mitsuba/PKGBUILD b/pcr/mitsuba/PKGBUILD
index b83e7fef9..0961ef11d 100644
--- a/pcr/mitsuba/PKGBUILD
+++ b/pcr/mitsuba/PKGBUILD
@@ -1,24 +1,26 @@
# Maintainer: Márcio Silva <coadde@lavabit.com>
_pkgname=mitsuba
+_pkgver=0.4.4
+_pkgrel=4
_bldname=blender
_bldver=2.68
-_bldep=10
+_bldep=9
_addname=$_pkgname-$_bldname
_adddat=20130320
_addrev=40
-_addrel=2
+_addrel=3
_pyver=3.3
-# Wed Mar 20 01:30:37 2013 +0100 rev:40 ($srcdir/$_addname/${pkgname[0]}/__init__.py:bl_info>version)
+# Wed Mar 20 01:30:37 2013 +0100 rev:40 ($srcdir/$_addname/$_pkgname/__init__.py:bl_info>version)
_addver=0.2.1
pkgname=(
$_pkgname
$_bldname-addon-$_pkgname
)
-pkgver=0.4.4
-pkgrel=3
+pkgver=$_pkgver
+pkgrel=$_pkgrel
pkgdesc='A physically based renderer'
arch=(
mips64el
@@ -32,7 +34,7 @@ depends=(
collada-dom
glew
libxxf86vm
- openexr
+ openexr-libre
qt4
xerces-c
)
@@ -47,40 +49,43 @@ makedepends=(
mercurial
python
)
-install=$_pkgname.install
source=(
- ${url}hg/$_pkgname/archive/v$pkgver.tar.bz2
- hg+${url}hg/$_addname
- ${pkgname[1]}.install
+ $_pkgname-$pkgver.tar.bz2::${url}hg/$_pkgname/archive/v$pkgver.tar.bz2
+ $_addname-$_addver.tar.bz2::${url}hg/$_addname/archive/$_addrev.tar.bz2
)
sha512sums=(
66dcab376a44eeb2fbe808a32ead5b554d777fb2f6a73c43883086b7829e0c697aaeccbb6fbbed9fcb221684a64ccce8be81a78ebcd228316ea12b8f6f3e7f6c
- SKIP SKIP
+ c829978a28c7780605662c604450c3d00b8ac958310e26aa7ad02dfb50f1875420e0e85fe0c868e030946c894cb939d18a4589c9e06a169f86eba5948eb2147e
)
prepare() {
- mv $srcdir/${pkgname[1]}.install $startdir
-
cd $srcdir/$_pkgname-v$pkgver
- [[ -d build ]] && rm -vr build
- mkdir -v build
+ msg 'renaming wrong OS name'
+ _OS=$(uname -o)
+ [[ $_OS == GNU ]] && sed -i 's|Linux|GNU|I' src/libcore/plugin.cpp
+ [[ $_OS == GNU/Linux ]] && sed -i 's|Linux,|GNU/Linux-libre,|' src/libcore/plugin.cpp
+ sed -i 's|Linux/|Linux,|
+ s|Linux|GNU/Linux|
+ ' include/$_pkgname/core/{atomic,fstream,random,thread}.h
- cd $startdir/../srcdest/$_addname
+ msg 'removing Open Source term'
+ sed -i 's|free-software/open-source|free-software|
+ ' include/$_pkgname/core/quad.h
- msg "${pkgname[1]}"
- hg update -c -r $_addrev
- hg log -l 1 -r $_addrev
+ [[ -d build ]] && rm -vr build
+ mkdir -v build
}
build() {
cd $srcdir/$_pkgname-v$pkgver/build
- [[ $CARCH != x86_64 ]] && DMTS_SSE='-DMTS_SSE=OFF'
+ [[ $CARCH == x86_64 ]] && _SSE=ON || _SSE=OFF
+ # i686: MTS_SSE disabled
cmake .. -DCMAKE_INSTALL_PREFIX=/usr\
- $DMTS_SSE\
-DBoost_PYTHON_LIBRARY=/usr/lib/libboost_python${_pyver::1}.so\
+ -DMTS_SSE=$_SSE\
-DPYTHON_INCLUDE_DIR=/usr/include/python${_pyver}m\
-DPYTHON_LIBRARY=/usr/lib/libpython${_pyver}m.so
make
@@ -89,8 +94,9 @@ build() {
package_mitsuba() {
cd $srcdir/$_pkgname-v$pkgver/build
make DESTDIR=$pkgdir install
+ install=$_pkgname.install
- #fixing files and folders location
+ msg 'fixing files and folders location'
a=$pkgdir/usr
b=$srcdir/$_pkgname-v$pkgver
install -vd $a/{bin,lib{,/python$_pyver/lib-dynload},share/{applications,{licenses/,}$_pkgname,pixmaps}}
@@ -98,7 +104,7 @@ package_mitsuba() {
install -vm644 $b/src/mtsgui/resources/${_pkgname}48.png $a/share/pixmaps
install -vm644 $b/doc/license.txt $a/share/licenses/$_pkgname/LICENSE
mv -v $a/{m{itsuba,ts{gui,import,srv,util}},bin}
- mv -v $a/lib{${pkgname[0]}-{bidir,core,hw,render}.so,}
+ mv -v $a/lib{$pkgname-{bidir,core,hw,render}.so,}
mv -v $a/{{data,plugins},share/$_pkgname}
mv -v $a/{python/mitsuba.so,lib/python$_pyver/lib-dynload}
mv -v $a/{sdk/include,}
@@ -110,16 +116,19 @@ package_blender-addon-mitsuba() {
arch=any
depends=(
$_pkgname=$pkgver
- "$_bldname>=$(($_bldep-1)):$_bldver"
- "$_bldname<$_bldep:${_bldver::2}$((${_bldver:2:4}+1))"
+ "$_bldname-libre>=$_bldep:$_bldver"
+ "$_bldname-libre<$(($_bldep+1)):${_bldver::2}$((${_bldver:2:4}+1))"
)
_pkgver=$pkgver
pkgver=$_addver.r$_addrev.v$_bldver
pkgrel=$_addrel
optdepends=
- install=$pkgname.install
- cd $srcdir/$_addname
+ cd $srcdir/$_addname-$_addrev
+
+ msg 'fixing binary path'
+ sed -i 's|'"'default'"': efutil.find_config_value('"'mitsuba', 'defaults', 'binary_path', ''"')|'"'default'"': '"'/usr/bin'"'|
+ ' $_pkgname/properties/engine.py
a=$pkgdir/usr/share/$_bldname/$_bldver/scripts/addons
b=$pkgdir/usr/share/licenses/$pkgname