summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-08-17 00:06:07 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-08-20 06:20:10 +0200
commit2283cf4c1d5db8ed9330c1d1b6fd6b0e46857086 (patch)
tree4e2b505628ca95e6403ad7322bdff653f0321acc
parent48d9c7c59a31b4e5c49bb89026469d2d69bbcae7 (diff)
downloadguix-2283cf4c1d5db8ed9330c1d1b6fd6b0e46857086.tar.gz
gnu: Add opencolorio.
* gnu/packages/image-processing.scm (opencolorio): New public variable.
-rw-r--r--gnu/packages/image-processing.scm73
1 files changed, 73 insertions, 0 deletions
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 52e0311943..cd580d53b9 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -69,6 +69,7 @@
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
@@ -165,6 +166,78 @@ without compromising the original code base and it makes use of a wide variety
 of external libraries that provide additional functionality.")
     (license license:gpl3+)))
 
+(define-public opencolorio
+  (package
+    (name "opencolorio")
+    (version "1.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/AcademySoftwareFoundation/OpenColorIO")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb"))
+       (file-name (git-file-name name version))
+       (modules '((guix build utils)))
+       (snippet
+        `(begin
+           ;; Remove bundled tarballs, patches, and .jars(!).  XXX: Upstream
+           ;; claims to have fixed USE_EXTERNAL_YAML, but it still fails with:
+           ;; https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/517
+           ;; When removing it, also remove it from the licence field comment.
+           (for-each delete-file-recursively
+                     (filter
+                      (lambda (full-name)
+                        (let ((file (basename full-name)))
+                          (not (or (string-prefix? "yaml-cpp-0.3" file)
+                                   (string=? "unittest.h" file)))))
+                      (find-files "ext" ".*")))
+
+           #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "-DCMAKE_CXX_FLAGS="
+                            "-Wno-error=deprecated-declarations "
+                            "-Wno-error=unused-function")
+             "-DOCIO_BUILD_STATIC=OFF"
+             ;; "-DUSE_EXTERNAL_YAML=ON"
+             "-DUSE_EXTERNAL_TINYXML=ON"
+             "-DUSE_EXTERNAL_LCMS=ON")
+       #: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
+     `(("git" ,git)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     ;; XXX Adding freeglut, glew, ilmbase, mesa, and openimageio for
+     ;; ocioconvert fails: error: conflicting declaration ?typedef void
+     ;; (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)
+     `(("lcms" ,lcms)
+       ("openexr" ,openexr)
+       ("tinyxml" ,tinyxml)))
+    (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 vtk
   (package
     (name "vtk")