(define-public yaml-cpp-0.7
(package
(name "yaml-cpp")
(version "0.7.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/jbeder/yaml-cpp"
"/archive/refs/tags/yaml-cpp-" version ".tar.gz"))
(sha256
(base32
"1hxp11rb95ra235mh366r6hrgm758wwqgl7h2laqgba6n7yakrj3"))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags '("-DYAML_BUILD_SHARED_LIBS=ON")))
(native-inputs
(list python))
(home-page "https://github.com/jbeder/yaml-cpp")
(synopsis "YAML parser and emitter in C++")
(description "YAML parser and emitter in C++ matching the YAML 1.2 spec.")
(license license:bsd-3)))
(define-public pystring
(package
(name "pystring")
(version "1.1.4")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/imageworks/pystring"
"/archive/refs/tags/v" version ".tar.gz"))
(sha256
(base32
"1yw8szpqrdl708rl4dh06vwql9x2cggk1rfc8ly0sd29l3i0znj9"))))
(build-system cmake-build-system)
(arguments
'(;;#:configure-flags '("-DYAML_BUILD_SHARED_LIBS=ON")))
#:phases
(modify-phases %standard-phases
(add-after 'install 'install-header
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(include (string-append out "/include/pystring")))
(install-file "../pystring-1.1.4/pystring.h" include)
#t))))))
(home-page "https://github.com/imageworks/pystring")
(synopsis "C++ functions matching the interface of python's string.")
(description "Pystring is a collection of C++ functions which match the
interface and behavior of python's string class methods using std::string.
Implemented in C++, it does not require or make use of a python interpreter.
It provides convenience and familiarity for common string operations not
included in the standard C++ library. It's also useful in environments where
both C++ and python are used.")
(license license:bsd-3)))
(define-public zlib-1.2.13
(package
(inherit zlib)
(version "1.2.13")
(source
(origin
(method url-fetch)
(uri (list (string-append "http://zlib.net/zlib-"
version ".tar.gz")
(string-append "mirror://sourceforge/libpng/zlib/"
version "/zlib-" version ".tar.gz")))
(sha256
(base32
"0c5b8vw40dy178xlpddw65q9gf1h2186jcc3p4swinwggbllv8mk"))))))
(define-public minizip-ng
(package
(name "minizip-ng")
(version "3.0.8")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/zlib-ng/minizip-ng"
"/archive/refs/tags/" version ".tar.gz"))
(sha256
(base32
"16k20h57kc328095yswwpbw8b0vj0b76mz26ndqrpmq2rmi2zk17"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f))
(native-inputs
(list pkg-config))
(inputs
(list zlib))
(home-page "https://github.com/zlib-ng/minizip-ng")
(synopsis "Zip manipulation library")
(description "minizip-ng is a zip manipulation library written in C
that is supported on Windows, macOS, and Linux.")
(license license:zlib)))
(define-public pybind11-2.10
(package
(name "pybind11")
(version "2.10.3")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/pybind/pybind11"
"/archive/refs/tags/v" version ".tar.gz"))
(sha256
(base32
"05d3did0fjasb83mh3b7wkxc525r5hhsblm39fa3m3a2v9flr32x"))))
(build-system cmake-build-system)
(native-inputs
(list python-wrapper
python-pytest
catch-framework
eigen))
(inputs (list boost))
(arguments
`(#:configure-flags
(list (string-append "-DCATCH_INCLUDE_DIR="
(assoc-ref %build-inputs "catch")
"/include"))
#:phases (modify-phases %standard-phases
(add-after 'install 'install-python
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(with-directory-excursion "../pybind11-2.10.3"
(setenv "PYBIND11_USE_CMAKE" "yes")
(invoke "python" "setup.py" "install"
"--single-version-externally-managed"
"--root=/"
(string-append "--prefix=" out)))))))
#:test-target "check"))
(home-page "https://github.com/pybind/pybind11/")
(synopsis "Seamless operability between C++11 and Python")
(description
"@code{pybind11} is a lightweight header-only library that exposes C++
types in Python and vice versa, mainly to create Python bindings of existing
C++ code. Its goals and syntax are similar to the @code{Boost.Python}
library: to minimize boilerplate code in traditional extension modules by
inferring type information using compile-time introspection.")
(license license:bsd-3)))
(define-public opencolorio-2.2
(package
(name "opencolorio")
(version "2.2.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/AcademySoftwareFoundation/OpenColorIO"
"/archive/refs/tags/v" version ".tar.gz"))
(sha256
(base32
"03jqp0i08k68gryamg10anh5lwk8is5rphh530j5qkpwhxc7rwin"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
(list (string-append "-DCMAKE_CXX_FLAGS="
"-Wno-error=deprecated-declarations "
"-Wno-error=unused-function")
"-DOCIO_BUILD_APPS=OFF"
"-DOCIO_BUILD_PYTHON=OFF"
"-DOCIO_BUILD_TESTS=OFF"
(string-append "-Dpystring_INCLUDE_DIR="
(assoc-ref %build-inputs "pystring")
"/include"))))
;; #:phases
;; (modify-phases %standard-phases
;; (add-after 'unpack 'patch-test-suite
;; (lambda _
;; (substitute* "src/core_tests/CMakeLists.txt"
;; (("/bin/sh") (which "bash")))
;; #t)))))
(native-inputs
(list ;;git
pkg-config))
(inputs
;; XXX Adding freeglut, glew, ilmbase, mesa, and openimageio for
;; ocioconvert fails: error: conflicting declaration ?typedef void
;; (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)
(list mesa glew freeglut expat yaml-cpp-0.7 lcms openexr tinyxml pystring imath zlib-1.2.13 minizip-ng pybind11-2.10))
(home-page "https://opencolorio.org")
(synopsis "Color management for visual effects and animation")
(description
"OpenColorIO, or OCIO, is a complete color management solution geared
towards motion picture production, with an emphasis on visual effects and
computer animation. It provides a straightforward and consistent user
experience across all supporting applications while allowing for sophisticated
back-end configuration options suitable for high-end production usage.
OCIO is compatible with the @acronym{ACES, Academy Color Encoding
Specification} and is @acronym{LUT, look-up table}-format agnostic, supporting
many popular formats.")
(license (list license:expat ; docs/ociotheme/static, ext/yaml-cpp-*
license:zlib ; src/core/md5
license:bsd-3)))) ; the rest
(define-public openimageio-2.4
(package
(name "openimageio")
(version "2.4.8.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/OpenImageIO/oiio"
"/archive/refs/tags/v" version ".tar.gz"))
(sha256
(base32
"0169f7wx1w6ls1y36mk5658a0xbxpdwzlq3hj4ccfj0djx8jhh78"))))
(build-system cmake-build-system)
;; FIXME: To run all tests successfully, test image sets from multiple
;; third party sources have to be present. For details see
;; <https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md>
(arguments
`(#:tests? #f
#:configure-flags (list ;;(string-append "-DImath_DIR="
;; (assoc-ref %build-inputs "ilmbase")
;; "/include/OpenEXR")
"-DUSE_EXTERNAL_PUGIXML=1")))
(native-inputs
(list pkg-config))
(inputs
(list
boost
zlib
libtiff
openexr
imath
libjpeg-turbo
pugixml
python-wrapper
libpng
freetype
opencolorio-2.2
tbb
ffmpeg
giflib
libheif
libraw
openjpeg
;;openvdb-10.0 ;; libopenvdb.so.10.0: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
ptex
qtbase-5
robin-map
fmt-8
pybind11))
(synopsis "C++ library for reading and writing images")
(description
"OpenImageIO is a library for reading and writing images, and a bunch of
related classes, utilities, and applications. There is a particular emphasis
on formats and functionality used in professional, large-scale animation and
visual effects work for film.")
(home-page "https://www.openimageio.org")
(license license:bsd-3)))
(define-public openshadinglanguage-1.12
(package
(name "openshadinglanguage")
(version "1.12.9.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage"
"/archive/refs/tags/v" version ".tar.gz"))
(sha256
(base32
"0a6bzcrdd6hxrwp58zjd7j289s1169ki0k8xgpkig8swqf7qzm8j"))
(patches (search-patches "vfx/patches/openshadinglanguage-custom-clang.patch"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
(list "-DUSE_PARTIO=OFF" ; TODO: not packaged
(string-append "-DLLVM_DIRECTORY="
(assoc-ref %build-inputs "llvm"))
(string-append "-DCLANG_DIRECTORY="
(assoc-ref %build-inputs "clang")))
#: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
"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-15
flex
llvm-15
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)))