summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-09-05 19:58:02 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-09-05 19:58:02 -0300
commite463af48daaa0bfcbbb8bb360b5c0c12b97fe48e (patch)
treeaffe913f4ecdc8c677672b65cd76ab2bde6aea66 /pcr
parent6a98243c20f29dd8425a617c815a4bd87b20d94a (diff)
mitsuba: divide to 2 pkgs
Diffstat (limited to 'pcr')
-rw-r--r--pcr/mitsuba/PKGBUILD58
1 files changed, 36 insertions, 22 deletions
diff --git a/pcr/mitsuba/PKGBUILD b/pcr/mitsuba/PKGBUILD
index 210c6dfc6..c299c226b 100644
--- a/pcr/mitsuba/PKGBUILD
+++ b/pcr/mitsuba/PKGBUILD
@@ -1,8 +1,12 @@
# Maintainer: Márcio Silva <coadde@parabola.nu>
-_build_pkg=no
+_build_pkg=yes
_build_add=yes
+[[ $_build_pkg != yes && $_build_pkg != no ]] && _build_pkg=yes
+[[ $_build_add != yes && $_build_add != no ]] && _build_add=yes
+[[ $_build_pkg == no && $_build_add == no ]] && _build_add=yes
+
_pkgname=mitsuba
_pkgver=0.5.0
_pkgrel=3
@@ -18,24 +22,25 @@ _pyver=3.4
# rev:55 addon ($srcdir/$_addname/mtsblend/__init__.py:bl_info>version)
_addver=0.3.0
+pkgbase=$_pkgname
[[ $_build_pkg == yes ]] && pkgname+=("$_pkgname")
[[ $_build_add == yes ]] && pkgname+=("$_bldname-addon-$_pkgname")
pkgver=$_pkgver
pkgrel=$_pkgrel
-pkgdesc='A physically based renderer'
arch=('i686' 'x86_64' 'mips64el')
url="https://www.$_pkgname-renderer.org/"
license=('GPL3')
-depends=('boost-libs' 'collada-dom' 'glew' 'libxxf86vm' 'openexr' 'qt4' 'xerces-c')
-makedepends=('boost' 'cmake' 'eigen3' 'mercurial' 'python')
-source=("$_pkgname-$pkgver.tar.bz2::${url}repos/$_pkgname/archive/v$pkgver.tar.bz2"
- "$_addname-$_addver-$_addrev.tar.bz2::${url}repos/exporters/$_addname/archive/$_addrev.tar.bz2")
-sha512sums=('cb30ca95ada36bec56aca3af55af19511ae64f05631d3e221308dee6fe04a1de08daab6e89c9025c8f6492731ed586d40d92f2168c5d49a060f31cd0afc7d0a7'
- '1eacba1c290f288b8d59000097912be54e79f8c49ef8e3cb094b50d8548dc615db13ff8f2481860235a02b49ab58b6bdb0a9dfd95acec66727a454affa49abdd')
-
-prepare() {
+[[ $_build_pkg == yes ]] && depends=('boost-libs' 'collada-dom' 'glew' 'libxxf86vm' 'openexr' 'qt4' 'xerces-c')
+[[ $_build_pkg == yes ]] && makedepends=('boost' 'cmake' 'eigen3' 'mercurial' 'python')
+source=('http://www.gnu.org/licenses/gpl-3.0.txt')
+[[ $_build_pkg == yes ]] && source+=("$_pkgname-$pkgver.tar.bz2::${url}repos/$_pkgname/archive/v$pkgver.tar.bz2")
+[[ $_build_add == yes ]] && source+=("$_addname-$_addver-$_addrev.tar.bz2::${url}repos/exporters/$_addname/archive/$_addrev.tar.bz2")
+sha512sums=('7633623b66b5e686bb94dd96a7cdb5a7e5ee00e87004fab416a5610d59c62badaf512a2e26e34e2455b7ed6b76690d2cd47464836d7d85d78b51d50f7e933d5c')
+[[ $_build_pkg == yes ]] && sha512sums+=('cb30ca95ada36bec56aca3af55af19511ae64f05631d3e221308dee6fe04a1de08daab6e89c9025c8f6492731ed586d40d92f2168c5d49a060f31cd0afc7d0a7')
+[[ $_build_add == yes ]] && sha512sums+=('cd812c46ccfb4673a5d170c96e4aa8275d136ef4ae300b50944aac69ff646e9118afa78a9a1f22e7b03fcc1e4fa496c889f59d8bf40836e27d023548061a4491')
+
+_prepare_mitsuba() {
mv -v $srcdir/$_pkgname-???????????? $srcdir/$_pkgname-v$pkgver
- mv -v $srcdir/$_addname-???????????? $srcdir/$_addname-$_addrev
cd $srcdir/$_pkgname-v$pkgver
@@ -56,7 +61,16 @@ prepare() {
mkdir -v build
}
-build() {
+_prepare_blender-addon-mitsuba() {
+ mv -v $srcdir/$_addname-???????????? $srcdir/$_addname-$_addrev
+}
+
+prepare() {
+ [[ $_build_pkg == yes ]] && _prepare_mitsuba
+ [[ $_build_add == yes ]] && _prepare_blender-addon-mitsuba
+}
+
+_build_mitsuba() {
cd $srcdir/$_pkgname-v$pkgver/build
[[ $CARCH == x86_64 ]] && _SSE=ON || _SSE=OFF
@@ -69,11 +83,13 @@ build() {
-DPYTHON_LIBRARY=/usr/lib/libpython${_pyver}m.so
make
}
+[[ $_build_pkg == yes ]] && build() { _build_mitsuba; }
package_mitsuba() {
- install="$_pkgname.install"
+ pkgdesc='A physically based renderer'
optdepends=('python: Python bindings'
- "${pkgname[1]}: ${_bldname^} addon exporter and renderer")
+ "$_pkgname: ${_bldname^} addon exporter and renderer")
+ install="$_pkgname.install"
cd $srcdir/$_pkgname-v$pkgver/build
make DESTDIR=$pkgdir install
@@ -84,7 +100,7 @@ package_mitsuba() {
install -vd $a/{bin,lib{,/python$_pyver/lib-dynload},share/{applications,{licenses/,}$_pkgname,pixmaps}}
install -vm644 $b/data/linux/$_pkgname.desktop $a/share/applications
install -vm644 $b/src/mtsgui/resources/${_pkgname}48.png $a/share/pixmaps
- install -vm644 $b/doc/license.txt $a/share/licenses/$_pkgname/LICENSE
+ install -vm644 $startdir/gpl-3.0.txt $a/share/licenses/$_pkgname/LICENSE
mv -v $a/{m{itsuba,ts{gui,import,srv,util}},bin}
#mv -v $a/{m{itsuba,ts{gui,srv,util}},bin}
mv -v $a/lib{$pkgname-{bidir,core,hw,render}.so,}
@@ -95,14 +111,13 @@ package_mitsuba() {
}
package_blender-addon-mitsuba() {
- pkgdesc="A addon for the ${_bldname^} which allows render and export with Mitsuba (built for the $_bldname package)"
- arch=('any')
- depends=("$_pkgname=$pkgver"
- "$_bldname-libre>=$_bldep:$_bldver"
- "$_bldname-libre<$(($_bldep+1)):${_bldver::2}$((${_bldver:2:4}+1))")
_pkgver=$pkgver
pkgver=$_addver.r$_addrev.v$_bldver
pkgrel=$_addrel
+ pkgdesc="A addon for the ${_bldname^} which allows render and export with Mitsuba (built for the $_bldname package)"
+ arch=('any')
+ depends=("$_pkgname=$pkgver" "$_bldname-libre>=$_bldep:$_bldver" "$_bldname-libre<$(($_bldep+1)):${_bldver::2}$((${_bldver:2:4}+1))")
+ makedepends=()
cd $srcdir/$_addname-$_addrev
@@ -112,10 +127,9 @@ package_blender-addon-mitsuba() {
a=$pkgdir/usr/share/$_bldname/$_bldver/scripts/addons
b=$pkgdir/usr/share/licenses/$pkgname
- c=$srcdir/$_pkgname-v$_pkgver/doc/license.txt
install -vd $a && cp -a mtsblend $a/$_pkgname
- install -vd $b && install -m644 $c $b/LICENSE
+ install -vd $b && install -m644 $startdir/gpl-3.0.txt $b/LICENSE
}
# vim:set ts=2 sw=2 et: