diff options
author | Vinicius Monego <monego@posteo.net> | 2021-12-28 13:26:03 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-01-15 23:27:34 +0100 |
commit | 8972972cbf7fbbbeb0e4ca4b5d1e564c8eb57484 (patch) | |
tree | 319f6f9292a4fbffc98d0e8371ae0287b9d4b9a7 | |
parent | 560fd9906112c7e2022c9ffe048f6840efd9c684 (diff) |
gnu: Add openshadinglanguage.
* gnu/packages/graphics.scm (openshadinglanguage): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r-- | gnu/packages/graphics.scm | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index fb3fa49a89..b69ab52aec 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -79,6 +79,7 @@ #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) #:use-module (gnu packages lua) #:use-module (gnu packages maths) #:use-module (gnu packages mp3) @@ -571,6 +572,72 @@ vertices, sorting by primitive type, merging of redundant materials and many more.") (license license:bsd-3))) +(define-public openshadinglanguage + (package + (name "openshadinglanguage") + (version "1.11.16.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x0lc163vl2b57l75bf5zxlr6vm2y1f1izlxdnrw3vsapv3r9k9g")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DUSE_PARTIO=OFF") ; TODO: not packaged + #:phases + (modify-phases %standard-phases + (add-after 'set-paths 'add-ilmbase-include-path + (lambda* (#:key inputs #:allow-other-keys) + ;; OpenEXR 2 propagates ilmbase, but its include files do not + ;; appear in the C_INCLUDE_PATH. + (let ((headers (string-append + (assoc-ref inputs "ilmbase") + "/include/OpenEXR"))) + (setenv "C_INCLUDE_PATH" + (string-append headers ":" + (or (getenv "C_INCLUDE_PATH") ""))) + (setenv "CPLUS_INCLUDE_PATH" + (string-append headers ":" + (or (getenv "CPLUS_INCLUDE_PATH") "")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "ctest" "--exclude-regex" + (string-join + (list + "osl-imageio" ; OIIO not compiled with freetype + "osl-imageio.opt" ; OIIO not compiled with freetype + "texture-udim" ; file does not exist + "texture-udim.opt" ; file does not exist + "example-deformer" ; could not find OSLConfig + "python-oslquery") ; no module oslquery + "|")))))))) + (native-inputs + (list bison + clang + flex + llvm + pybind11 + python-wrapper)) + (inputs + (list boost + imath + openexr-2 + openimageio + pugixml + qtbase-5 + zlib)) + (home-page "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage") + (synopsis "Shading language for production GI renderers") + (description "Open Shading Language (OSL) is a language for programmable +shading in advanced renderers and other applications, ideal for describing +materials, lights, displacement, and pattern generation.") + (license license:bsd-3))) + (define-public cgal (package (name "cgal") |