From cab6a2535abfe0d5dbf7c3e88d51de62becaf370 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 25 Feb 2015 16:52:05 +0100 Subject: gnu: Add OpenEXR and IlmBase. * gnu/packages/graphics.scm (ilmbase, openexr): New variables. * gnu/packages/patches/openexr-missing-samples.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu/packages/graphics.scm | 56 ++++++++++++++++++++++ gnu/packages/patches/openexr-missing-samples.patch | 23 +++++++++ 2 files changed, 79 insertions(+) create mode 100644 gnu/packages/patches/openexr-missing-samples.patch (limited to 'gnu/packages') diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 55d2a198eb..7cbb86fe6e 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -22,6 +22,9 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages compression) #:use-module (gnu packages multiprecision) #:use-module (gnu packages boost)) @@ -63,3 +66,56 @@ many more.") ;; The 'LICENSE' file explains that a subset is available under more ;; permissive licenses. (license license:gpl3+))) + +(define-public ilmbase + (package + (name "ilmbase") + (version "2.2.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://savannah/openexr/ilmbase-" + version ".tar.gz")) + (sha256 + (base32 + "1izddjwbh1grs8080vmaix72z469qy29wrvkphgmqmcm0sv1by7c")))) + (build-system gnu-build-system) + (home-page "http://www.openexr.com/") + (synopsis "Utility C++ libraries for threads, maths, and exceptions") + (description + "IlmBase provides several utility libraries for C++. Half is a class +that encapsulates ILM's 16-bit floating-point format. IlmThread is a thread +abstraction. Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices, +quaternions and other useful 2D and 3D math functions. Iex is an +exception-handling library.") + (license license:bsd-3))) + +(define-public openexr + (package + (name "openexr") + (version "2.2.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://savannah/openexr/openexr-" + version ".tar.gz")) + (sha256 + (base32 + "0ca2j526n4wlamrxb85y2jrgcv0gf21b3a19rr0gh4rjqkv1581n")) + (modules '((guix build utils))) + (snippet + '(substitute* (find-files "." "tmpDir\\.h") + (("\"/var/tmp/\"") + "\"/tmp/\""))) + (patches (list (search-patch "openexr-missing-samples.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + `(("ilmbase" ,ilmbase) ;used in public headers + ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz" + (home-page "http://www.openexr.com") + (synopsis #f) + (description + "OpenEXR is a high dynamic-range (HDR) image file format developed for +use in computer imaging applications. The IlmImf libraries supports storage +of the \"EXR\" file format for storing 16-bit floating-point images.") + (license license:bsd-3))) diff --git a/gnu/packages/patches/openexr-missing-samples.patch b/gnu/packages/patches/openexr-missing-samples.patch new file mode 100644 index 0000000000..16cc9bb625 --- /dev/null +++ b/gnu/packages/patches/openexr-missing-samples.patch @@ -0,0 +1,23 @@ +This patch comments out tests that rely on files that are missing +from the source tarball. + +--- openexr-2.2.0/IlmImfTest/testSampleImages.cpp 2015-02-25 16:19:21.565105625 +0100 ++++ openexr-2.2.0/IlmImfTest/testSampleImages.cpp 2015-02-25 16:21:46.394128206 +0100 +@@ -162,16 +162,6 @@ testSampleImages (const std::string&) + compareImages (ILM_IMF_TEST_IMAGEDIR "comp_b44.exr", + ILM_IMF_TEST_IMAGEDIR "comp_b44_piz.exr"); + +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v1.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr"); +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwaa_v2.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwaa_piz.exr"); +- +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v1.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr"); +- compareImages (ILM_IMF_TEST_IMAGEDIR "comp_dwab_v2.exr", +- ILM_IMF_TEST_IMAGEDIR "comp_dwab_piz.exr"); +- + + cout << "ok\n" << endl; + } + -- cgit v1.2.3