summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f5e6d0369ee38914e5b63389f5f5a4a19c7b32a2 (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
# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
pkgname=appleseed-git
#_fragment="#branch=2.0.5-beta-maintenance"
pkgver=2.0.0.beta.r291.g653efbc37
pkgrel=1
epoch=1
pkgdesc="physically-based global illumination rendering engine primarily designed for animation and visual effects. "
arch=(i686 x86_64)
url="http://appleseedhq.net"
license=('MIT')
provides=('appleseed')
conflicts=('appleseed')
depends=(python2 python embree qt4 'seexpr>=2.11' boost openexr opencolorio openimageio 'openshadinglanguage>=1.8.9' xerces-c zlib)
makedepends=(git cmake)
options=()
source=("${pkgname}::git+https://github.com/appleseedhq/appleseed.git${_fragment}"
        "cmake.extra.install.dirs.remove.patch"
        )
md5sums=('SKIP'
         '1cc8d927665c126dde4d1135e500c0dc')
  
#_pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
#_pyver=$(pacman -Sddp --print-format %v python|grep -oP ^[0-9.]{3})
CMAKE_FLAGS=" -DWITH_EMBREE=ON \
              -DWITH_DISNEY_MATERIAL=ON \
              -DWITH_PYTHON3_BINDINGS=ON \
              -DUSE_STATIC_EMBREE=OFF \
              -DUSE_STATIC_EXR=OFF \
              -DUSE_STATIC_BOOST=OFF \
              -DUSE_STATIC_OCIO=OFF \
              -DUSE_STATIC_OIIO=OFF \
              -DUSE_STATIC_OSL=OFF \
              -DPYTHON3_INCLUDE_DIR=/usr/include/python3.7m \
              -DWARNINGS_AS_ERRORS=OFF"

pkgver() {
  cd ${srcdir}/${pkgname}
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd ${pkgname}
  git apply -v ../cmake.extra.install.dirs.remove.patch
  grep -q avx /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_AVX=ON"
  grep -q avx2 /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_AVX2=ON"
  grep -q f16c /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_F16C=ON"
  grep -q sse4_2 /proc/cpuinfo && CMAKE_FLAGS="${CMAKE_FLAGS} -DUSE_SSE42=ON"
}
build() {
  cd ${pkgname}
  mkdir -p build
  cd build
  cmake -DCMAKE_BUILD_TYPE=Ship -DCMAKE_INSTALL_PREFIX=/opt/appleseed ${CMAKE_FLAGS} ..
  make
}

package() {
  cd ${pkgname}/build
  make DESTDIR="$pkgdir/" install
  install -D -m644 "../LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

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