diff mbox series

[bug#51350,3/3] gnu: Add OpenEXR 3.

Message ID 20211023121801.5889-3-monego@posteo.net
State Accepted
Headers show
Series [bug#51350,1/3] gnu: Add imath. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Oct. 23, 2021, 12:18 p.m. UTC
* gnu/packages/graphics.scm (openexr): New variable.
(openexr-2)[home-page]: Use home-page from openexr.
[synopsis]: Use synopsis from openexr.
[description]: Use description from openexr.
[license]: Use license from openexr.
---
 gnu/packages/graphics.scm | 46 +++++++++++++++++++++++++++++++++------
 1 file changed, 39 insertions(+), 7 deletions(-)

Comments

Leo Famulari Oct. 23, 2021, 8:28 p.m. UTC | #1
On Sat, Oct 23, 2021 at 12:18:01PM +0000, Vinicius Monego wrote:
> * gnu/packages/graphics.scm (openexr): New variable.
> (openexr-2)[home-page]: Use home-page from openexr.
> [synopsis]: Use synopsis from openexr.
> [description]: Use description from openexr.
> [license]: Use license from openexr.

Thanks! Pushed as c52ba63c673f90be1d3b52be0051961ed2a9181a

> +       (snippet
> +        '(begin
> +           (with-directory-excursion "src/test"
> +             (substitute* (append (find-files "." "tmpDir\\.h")
> +                                  '("OpenEXRCoreTest/main.cpp"))
> +               (("\"/var/tmp/\"")
> +                "\"/tmp/\"")))
> +           #t))))

I pushed this patch separately from the rest of the series because I was
going to ask you to revise it, changing this snippet to a build phase.
But then I realized that it was already like this in the OpenEXR 2
package so I went ahead and pushed.

I'll make that change myself shortly. Snippets should be reserved for
really critical problems like fixing bugs or removing nonfree
components.
diff mbox series

Patch

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 6f478a0b81..0baf0af6ac 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1106,6 +1106,41 @@  graphics.")
     (home-page "https://www.ogre3d.org/")
     (license license:expat)))
 
+(define-public openexr
+  (package
+    (name "openexr")
+    (version "3.1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/AcademySoftwareFoundation/openexr")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0vyclrrikphwkkpyjg8kzh3qzflzk3d6xsidgqllgfdgllr9wmgv"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (with-directory-excursion "src/test"
+             (substitute* (append (find-files "." "tmpDir\\.h")
+                                  '("OpenEXRCoreTest/main.cpp"))
+               (("\"/var/tmp/\"")
+                "\"/tmp/\"")))
+           #t))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("imath" ,imath)
+       ("zlib" ,zlib)))
+    (home-page "https://www.openexr.com/")
+    (synopsis "High-dynamic-range file format library")
+    (description
+     "OpenEXR provides the specification and reference implementation of the
+EXR file format.  The purpose of EXR format is to accurately and efficiently
+represent high-dynamic-range scene-linear image data and associated metadata,
+with strong support for multi-part, multi-channel use cases.")
+    (license license:bsd-3)))
+
 (define-public openexr-2
   (package
     (name "openexr")
@@ -1153,13 +1188,10 @@  graphics.")
     (propagated-inputs
      `(("ilmbase" ,ilmbase)                       ;used in public headers
        ("zlib" ,zlib)))                           ;OpenEXR.pc reads "-lz"
-    (home-page "https://www.openexr.com/")
-    (synopsis "High-dynamic range file format library")
-    (description
-     "OpenEXR is a high dynamic-range (HDR) image file format developed for
-use in computer imaging applications.  The IlmImf C++ libraries support
-storage of the \"EXR\" file format for storing 16-bit floating-point images.")
-    (license license:bsd-3)))
+    (home-page (package-home-page openexr))
+    (synopsis (package-synopsis openexr))
+    (description (package-description openexr))
+    (license (package-license openexr))))
 
 (define-public openimageio
   (package