summaryrefslogtreecommitdiff
path: root/libre/openshadinglanguage-parabola/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/openshadinglanguage-parabola/PKGBUILD')
-rw-r--r--libre/openshadinglanguage-parabola/PKGBUILD39
1 files changed, 32 insertions, 7 deletions
diff --git a/libre/openshadinglanguage-parabola/PKGBUILD b/libre/openshadinglanguage-parabola/PKGBUILD
index 630a0573c..ce04f74c1 100644
--- a/libre/openshadinglanguage-parabola/PKGBUILD
+++ b/libre/openshadinglanguage-parabola/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=openshadinglanguage
pkgname=$_pkgname-parabola
-pkgver=1.5.10
+pkgver=1.4.2 # 1.5.10 for blender 2.72
pkgrel=1
pkgdesc='Advanced shading language for production GI renderers (built for the blender-parabola package)'
arch=('i686' 'x86_64' 'mips64el')
@@ -14,8 +14,10 @@ makedepends=('boost' 'clang' 'cmake')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
replaces=("$_pkgname")
-source=("https://github.com/imageworks/OpenShadingLanguage/archive/Release-$pkgver.tar.gz")
-md5sums=('b828366f056e115b539ee1780883fc7d')
+source=("https://github.com/imageworks/OpenShadingLanguage/archive/Release-$pkgver.tar.gz"
+ 'llvm-141.patch')
+md5sums=('5aeb3c9502aedf62d0120b3523957e92'
+ 'b948e5df8710366b65027d1d8450f340')
prepare() {
cd OpenShadingLanguage-Release-$pkgver
@@ -33,15 +35,38 @@ prepare() {
' src/cmake/platform.cmake
sed -i 's|[{]uname[}][,]linux]|{uname -o},GNU/kFreeBSD|;\|platform| s|linux|GNU/kFreeBSD|i
' src/make/detectplatform.mk
- sed -i 's|Linux/OSX|GNU/BSD|' src/include/OSL/export.h
+
+ if [[ ${pkgver::3} == 1.4 ]]; then
+ # renaming wrong OS name
+ sed -i 's|Linux/OSX|GNU/BSD|' src/include/export.h
+
+ # LLVM 3.4 build fix
+ # based of "https://github.com/imageworks/OpenShadingLanguage/pull/320.patch"
+ patch -Np1 < $srcdir/llvm-141.patch
+
+ # fix include paths
+ sed -i 's|oslconfig.h|../include/oslconfig.h|
+ s|dual.h|../include/dual.h|
+ s|dual_vec.h|../include/dual_vec.h|
+ ' src/liboslexec/llvm_ops.cpp
+ sed -i 's|oslexec.h|../include/oslexec.h|
+ s|oslclosure.h|../include/oslclosure.h|
+ s|osl_pvt.h|../include/osl_pvt.h|
+ ' src/liboslexec/oslexec_pvt.h
+ else
+ # renaming wrong OS name
+ sed -i 's|Linux/OSX|GNU/BSD|' src/include/OSL/export.h
+ fi
}
build() {
cd OpenShadingLanguage-Release-$pkgver
- # Fails building this file on i686
- if [[ $CARCH == i686 ]]; then
- sed -i "/src\/testshade/d" CMakeLists.txt
+ if [[ ${pkgver::3} == 1.5 ]]; then
+ # Fails building this file on i686
+ if [[ $CARCH == i686 ]]; then
+ sed -i "/src\/testshade/d" CMakeLists.txt
+ fi
fi
cd src