summaryrefslogtreecommitdiff
path: root/pcr/yafaray/PKGBUILD
blob: e42a63269d62da2768ab18c6b6d1a198f927db44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Maintainer: Márcio Silva <coadde@lavabit.com>

_pkgname=yafaray
_pkgdate=20130510
_bldname=blender
_bldver=2.68
_bldep=10
_gitname=Core
_addname=${_bldname^}-Exporter
_addrel=2
_pyver=3.3

# Fri May 10 00:57:12 2013 -0700 - Merge pull request #67 from DarkTide/master // Depth fix for hist on background
_srcver=44323def5b3866ff601fd401ef2160b80ced8141                                  
# Fri May 10 00:24:58 2013 -0700 - Merge pull request #14 from DarkTide/master // Version bump, and some other fixes
_addver=e6688fc4f480bcb1ae7d0a6dbe65563b3d070169

pkgname=(
  $_pkgname
  $_bldname-addon-$_pkgname
)
pkgver=1.5.$_pkgdate
pkgrel=2
pkgdesc='A libre software raytracing engine'
arch=(
  mips64el
  x86_64
  i686
)
url=http://www.$_pkgname.org
license=LGPL2.1
depends=(
  freetype2
  libjpeg
  libxml2
  openexr
)
optdepends=(
  'python: Python bindings'
  'qt4: QT GUI'
  "${pkgname[1]}: ${_bldname^} addon renderer"
)
makedepends=(
  cmake
  git
  python
  qt4
  swig
)
source=(
  git://github.com/YafaRay/$_gitname.git
  git://github.com/YafaRay/$_addname.git
)
sha512sums=(SKIP SKIP)

prepare() {
  cd $srcdir/$_gitname

  git checkout $_srcver

  [[ -d build ]] && rm -vr build
  mkdir -v build
}

build() {
  cd $srcdir/$_gitname/build
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr\
    -DYAF_PY_VERSION=$_pyver\
    -DYAF_BINDINGS_PY_DIR=/usr/lib/python$_pyver
  make
}

package_yafaray() {
  cd $srcdir/$_gitname/build
  make DESTDIR=$pkgdir install
}

package_blender-addon-yafaray() {
  pkgdesc="A addon for the ${_bldname^} which allows render with YafaRay (built for the $_bldname-libre package)"
  arch=any
  depends=(
    $_pkgname=$pkgver
    "$_bldname>=$(($_bldep-1)):$_bldver"
    "$_bldname<$_bldep:${_bldver::2}$((${_bldver:2:4}+1))"
  )
  pkgver=$pkgver.v$_bldver
  pkgrel=$_addrel
  optdepends=

  cd $srcdir/$_addname

  a=/usr/lib
  b=$pkgdir/usr/share/$_bldname/$_bldver/scripts/addons/$_pkgname/bin

  git checkout $_addver
  git checkout-index -a -f --prefix=${b%bin}

  install -vd $b
  ln -vsf $a/lib${_pkgname}core.so   $b/lib${_pkgname}core.so
  ln -vsf $a/lib${_pkgname}plugin.so $b/lib${_pkgname}plugin.so
  ln -vsf $a/$_pkgname               $b/plugins
}

# vim:set ts=2 sw=2 et: