[arch-commits] Commit in openshadinglanguage/repos (4 files)

Sven-Hendrik Haase svenstaro at archlinux.org
Sat Jul 13 04:08:33 UTC 2019


    Date: Saturday, July 13, 2019 @ 04:08:32
  Author: svenstaro
Revision: 489320

archrelease: copy trunk to community-testing-x86_64

Added:
  openshadinglanguage/repos/community-testing-x86_64/
  openshadinglanguage/repos/community-testing-x86_64/PKGBUILD
    (from rev 489319, openshadinglanguage/trunk/PKGBUILD)
  openshadinglanguage/repos/community-testing-x86_64/clang7.patch
    (from rev 489319, openshadinglanguage/trunk/clang7.patch)
  openshadinglanguage/repos/community-testing-x86_64/llvm-static-system-libs.patch
    (from rev 489319, openshadinglanguage/trunk/llvm-static-system-libs.patch)

-------------------------------+
 PKGBUILD                      |   40 +++++++++
 clang7.patch                  |  173 ++++++++++++++++++++++++++++++++++++++++
 llvm-static-system-libs.patch |   15 +++
 3 files changed, 228 insertions(+)

Copied: openshadinglanguage/repos/community-testing-x86_64/PKGBUILD (from rev 489319, openshadinglanguage/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2019-07-13 04:08:32 UTC (rev 489320)
@@ -0,0 +1,40 @@
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+pkgname=openshadinglanguage
+pkgver=1.10.6
+pkgrel=1
+pkgdesc="Advanced shading language for production GI renderers"
+arch=(x86_64)
+url="https://github.com/imageworks/OpenShadingLanguage"
+license=('custom')
+depends=('boost-libs' 'openimageio' 'openexr' 'intel-tbb' 'freetype2' 'libpng'
+         'libtiff' 'zlib' 'ncurses')
+makedepends=('boost' 'cmake' 'python' 'llvm' 'clang')
+source=(https://github.com/imageworks/OpenShadingLanguage/archive/Release-${pkgver}.tar.gz)
+sha512sums=('5d3a735fa33bfebdba9082345dcfeb89c17e876c9958d8af78f4e2150153062013a88644fc612b5778236eebb16a5ebae9a6d0adb4ff1e152a5c451905220481')
+
+build() {
+  cd OpenShadingLanguage-Release-$pkgver/src
+
+  [[ -d build ]] && rm -r build
+  mkdir build && cd build
+
+  cmake ../.. \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DLLVM_STATIC=0 \
+    -DENABLERTTI=ON \
+    -DSTOP_ON_WARNING=OFF
+  make
+}
+
+package() {
+  cd OpenShadingLanguage-Release-$pkgver/src/build
+
+  make DESTDIR="$pkgdir/" install
+  mkdir "$pkgdir"/usr/share/OSL
+  mv "$pkgdir"/usr/shaders "$pkgdir"/usr/share/OSL/shaders
+
+  install -Dm644 "$pkgdir"/usr/share/doc/OSL/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:

Copied: openshadinglanguage/repos/community-testing-x86_64/clang7.patch (from rev 489319, openshadinglanguage/trunk/clang7.patch)
===================================================================
--- community-testing-x86_64/clang7.patch	                        (rev 0)
+++ community-testing-x86_64/clang7.patch	2019-07-13 04:08:32 UTC (rev 489320)
@@ -0,0 +1,173 @@
+From 8fbbe7dc32e2a418cc259ff8392bd29045d228f8 Mon Sep 17 00:00:00 2001
+From: Larry Gritz <lg at larrygritz.com>
+Date: Sun, 23 Sep 2018 13:19:49 -0700
+Subject: [PATCH] Support clang7 and llvm7
+
+(backported from master)
+---
+ CHANGES.md                                    |   2 +-
+ INSTALL.md                                    |   2 +-
+ site/spi/Makefile-bits                        |  24 +++++++++++++--
+ src/liboslcomp/oslcomp.cpp                    |   6 ++++
+ src/liboslexec/llvm_util.cpp                  |  28 +++++++++++++++---
+ .../render-background/ref/out-clang7mac.exr   | Bin 0 -> 345516 bytes
+ 6 files changed, 53 insertions(+), 9 deletions(-)
+ create mode 100644 testsuite/render-background/ref/out-clang7mac.exr
+
+diff --git a/site/spi/Makefile-bits b/site/spi/Makefile-bits
+index fc7dd5542..3ec6a4270 100644
+--- a/site/spi/Makefile-bits
++++ b/site/spi/Makefile-bits
+@@ -18,7 +18,7 @@ ifeq ($(SP_OS), rhel7)
+ 
+     ## If not overridden, here is our preferred LLVM installation
+     ## (may be changed as new versions are rolled out to the facility)
+-    LLVM_DIRECTORY ?= /shots/spi/home/lib/arnold/rhel7/llvm_5.0.0
++    LLVM_DIRECTORY ?= /shots/spi/home/lib/arnold/rhel7/llvm_7.0.0
+ 
+     # A variety of tags can be used to try specific versions of gcc or
+     # clang from the site-specific places we have installed them.
+@@ -28,14 +28,26 @@ ifeq ($(SP_OS), rhel7)
+            -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_4.0_final/bin/clang++
+     else ifeq (${COMPILER}, clang5)
+         MY_CMAKE_FLAGS += \
+-           -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.0/bin/clang \
+-           -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.0/bin/clang++
++           -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.1/bin/clang \
++           -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.1/bin/clang++
++    else ifeq (${COMPILER}, clang6)
++        MY_CMAKE_FLAGS += \
++           -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_6.0.1/bin/clang \
++           -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_6.0.1/bin/clang++
++    else ifeq (${COMPILER}, clang7)
++        MY_CMAKE_FLAGS += \
++           -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_7.0.0/bin/clang \
++           -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_7.0.0/bin/clang++
+     else ifeq (${COMPILER},clang)
+         MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
+     else ifeq (${COMPILER}, gcc490)
+       MY_CMAKE_FLAGS += \
+          -DCMAKE_C_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.9-20130512-test/bin/gcc \
+          -DCMAKE_CXX_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.9-20130512-test/bin/g++
++    else ifeq (${COMPILER}, gcc6)
++      MY_CMAKE_FLAGS += \
++         -DCMAKE_C_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/gcc \
++         -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/g++
+     else ifeq (${COMPILER},gcc)
+         MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
+     else ifeq (${COMPILER},)
+@@ -43,8 +55,12 @@ ifeq ($(SP_OS), rhel7)
+         MY_CMAKE_FLAGS += \
+            -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
+            -DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
++        MY_CMAKE_FLAGS += -DCMAKE_C_FLAGS="--gcc-toolchain=/usr" \
++                          -DCMAKE_CXX_FLAGS="--gcc-toolchain=/usr" \
++			  -DTOOLCHAIN_FLAGS="--gcc-toolchain=/usr"
+     endif
+ 
++
+     MY_CMAKE_FLAGS += \
+ 	-DOPENEXR_CUSTOM_INCLUDE_DIR=/usr/include/OpenEXR2 \
+ 	-DOPENEXR_CUSTOM_LIB_DIR=/usr/lib64/OpenEXR2 \
+@@ -93,6 +109,8 @@ else ifeq (${platform}, macosx)
+         MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5
+     else ifeq (${COMPILER},clang40)
+         MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm at 4/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm at 4/bin/clang++
++    else ifeq (${COMPILER},clang7)
++        MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/Cellar/llvm/7.0.0/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm/7.0.0/bin/clang++
+     else ifeq (${COMPILER},clang)
+         MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
+     else ifeq (${COMPILER},gcc)
+diff --git a/src/liboslcomp/oslcomp.cpp b/src/liboslcomp/oslcomp.cpp
+index 56baa05dc..308d88cad 100644
+--- a/src/liboslcomp/oslcomp.cpp
++++ b/src/liboslcomp/oslcomp.cpp
+@@ -331,6 +331,12 @@ OSLCompilerImpl::preprocess_buffer (const std::string &buffer,
+ 
+     inst.getPreprocessorOutputOpts().ShowCPP = 1;
+     inst.getPreprocessorOutputOpts().ShowMacros = 0;
++#if OSL_LLVM_VERSION >= 40
++    inst.getPreprocessorOutputOpts().ShowComments = 0;
++    inst.getPreprocessorOutputOpts().ShowLineMarkers = 1;
++    inst.getPreprocessorOutputOpts().ShowMacroComments = 0;
++    inst.getPreprocessorOutputOpts().ShowIncludeDirectives = 0;
++#endif
+ 
+     clang::HeaderSearchOptions &headerOpts = inst.getHeaderSearchOpts();
+     headerOpts.UseBuiltinIncludes = 0;
+diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp
+index ca8b3585d..041f6cd0d 100644
+--- a/src/liboslexec/llvm_util.cpp
++++ b/src/liboslexec/llvm_util.cpp
+@@ -88,6 +88,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #  include <llvm/Transforms/Scalar/GVN.h>
+ #endif
+ 
++#if OSL_LLVM_VERSION >= 70
++#include <llvm/Transforms/Utils.h>
++#include <llvm/Transforms/InstCombine/InstCombine.h>
++#endif
++
+ OSL_NAMESPACE_ENTER
+ 
+ namespace pvt {
+@@ -1353,6 +1358,10 @@ LLVM_Util::op_memset (llvm::Value *ptr, int val, int len, int align)
+ void
+ LLVM_Util::op_memset (llvm::Value *ptr, int val, llvm::Value *len, int align)
+ {
++#if OSL_LLVM_VERSION >= 70
++    builder().CreateMemSet (ptr, builder().getInt8((unsigned char)val),
++                            len, (unsigned)align);
++#else
+     // memset with i32 len
+     // and with an i8 pointer (dst) for LLVM-2.8
+     llvm::Type* types[] = {
+@@ -1381,6 +1390,7 @@ LLVM_Util::op_memset (llvm::Value *ptr, int val, llvm::Value *len, int align)
+     };
+     builder().CreateCall (func, llvm::ArrayRef<llvm::Value*>(args, 5));
+ 
++#endif
+ #endif
+ }
+ 
+@@ -1389,6 +1399,10 @@ LLVM_Util::op_memset (llvm::Value *ptr, int val, llvm::Value *len, int align)
+ void
+ LLVM_Util::op_memcpy (llvm::Value *dst, llvm::Value *src, int len, int align)
+ {
++#if OSL_LLVM_VERSION >= 70
++    builder().CreateMemCpy (dst, (unsigned)align, src, (unsigned)align,
++                            uint64_t(len));
++#else
+     // i32 len
+     // and with i8 pointers (dst and src) for LLVM-2.8
+     llvm::Type* types[] = {
+@@ -1412,6 +1426,7 @@ LLVM_Util::op_memcpy (llvm::Value *dst, llvm::Value *src, int len, int align)
+     };
+     builder().CreateCall (func, llvm::ArrayRef<llvm::Value*>(args, 5));
+ #endif
++#endif
+ }
+ 
+ 
+@@ -1713,12 +1728,17 @@ LLVM_Util::write_bitcode_file (const char *filename, std::string *err)
+     std::string local_error;
+     llvm::raw_fd_ostream out (filename, err ? *err : local_error, llvm::sys::fs::F_None);
+ #endif
+-    llvm::WriteBitcodeToFile (module(), out);
+-
++    if (! out.has_error()) {
++#if OSL_LLVM_VERSION >= 70
++        llvm::WriteBitcodeToFile (*module(), out);
++#else
++        llvm::WriteBitcodeToFile (module(), out);
++#endif
+ #if OSL_LLVM_VERSION >= 36
+-    if (err && local_error)
+-        *err = local_error.message ();
++        if (err && local_error)
++            *err = local_error.message ();
+ #endif
++    }
+ }
+ 
+ 

Copied: openshadinglanguage/repos/community-testing-x86_64/llvm-static-system-libs.patch (from rev 489319, openshadinglanguage/trunk/llvm-static-system-libs.patch)
===================================================================
--- community-testing-x86_64/llvm-static-system-libs.patch	                        (rev 0)
+++ community-testing-x86_64/llvm-static-system-libs.patch	2019-07-13 04:08:32 UTC (rev 489320)
@@ -0,0 +1,15 @@
+diff -upr OpenShadingLanguage-Release-1.5.12.orig/src/cmake/externalpackages.cmake OpenShadingLanguage-Release-1.5.12/src/cmake/externalpackages.cmake
+--- OpenShadingLanguage-Release-1.5.12.orig/src/cmake/externalpackages.cmake	2014-12-26 22:22:53.000000000 +0200
++++ OpenShadingLanguage-Release-1.5.12/src/cmake/externalpackages.cmake	2015-03-16 03:12:56.052479730 +0200
+@@ -211,9 +211,10 @@ if ((LLVM_LIBRARY OR LLVM_STATIC) AND LL
+     # if static LLVM libraries were requested, use llvm-config to generate
+     # the list of what libraries we need, and substitute that in the right
+     # way for LLVM_LIBRARY.
+-    execute_process (COMMAND ${LLVM_CONFIG} --libfiles
++    execute_process (COMMAND ${LLVM_CONFIG} --libfiles --system-libs
+                      OUTPUT_VARIABLE LLVM_LIBRARY
+                      OUTPUT_STRIP_TRAILING_WHITESPACE)
++    string (REPLACE "\n" " " LLVM_LIBRARY ${LLVM_LIBRARY})
+     string (REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
+   endif ()
+   if (VERBOSE)


More information about the arch-commits mailing list