From 24f7bac02a70257a7cd1bb2e1ec35d7cc753057e Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 24 Sep 2019 19:18:58 +0200 Subject: gnu: openscenegraph: Update to 3.6.4 and build JPEG plugin. * gnu/packages/graphics.scm (openscenegraph): Update to 3.6.4. [inputs]: Add libjpeg. --- gnu/packages/graphics.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gnu/packages/graphics.scm') diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index cd33ea2800..d4e9adb84a 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2019 Carlo Zancanaro ;;; Copyright © 2019 Steve Sprang ;;; Copyright © 2019 John Soo +;;; Copyright © 2019 Pierre Neidhardt ;;; ;;; This file is part of GNU Guix. ;;; @@ -510,7 +511,7 @@ visual effects work for film.") (define-public openscenegraph (package (name "openscenegraph") - (version "3.6.3") + (version "3.6.4") (source (origin (method git-fetch) @@ -519,7 +520,7 @@ visual effects work for film.") (commit (string-append "OpenSceneGraph-" version)))) (sha256 (base32 - "0h32z15sa8sbq276j0iib0n707m8bs4p5ji9z2ah411446paad9q")) + "0x8hdbzw0b71j91fzp9cwmy9a7ava8v8wwyj8nxijq942vdx1785")) (file-name (git-file-name name version)))) (properties `((upstream-name . "OpenSceneGraph"))) @@ -538,6 +539,7 @@ visual effects work for film.") ("unzip" ,unzip))) (inputs `(("giflib" ,giflib) + ("libjpeg" ,libjpeg) ; Required for the JPEG texture plugin. ("jasper" ,jasper) ("librsvg" ,librsvg) ("libxrandr" ,libxrandr) -- cgit v1.2.3 From 942c7889498fc8e680a16d500e166c9ade84e640 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 23 Sep 2019 17:15:50 +0200 Subject: gnu: OpenEXR: Update to 2.4.0 [fixes CVE-2018-18443, CVE-2018-18444]. * gnu/packages/patches/ilmbase-fix-tests.patch: Adjust for new origin. * gnu/packages/patches/ilmbase-openexr-pkg-config.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/graphics.scm (ilmbase): Update to 2.4.0. [source]: Change to GIT-FETCH, as tarballs are no longer provided. Add new patch. [build-system]: Change to CMAKE-BUILD-SYSTEM. [arguments]: Add phase to enter the correct source directory. * gnu/packages/graphics.scm (openexr): Update to 2.4.0. [source]: Inherit from ILMBASE, which comes from the same repository. [build-system]: Change to CMAKE-BUILD-SYSTEM. [arguments]: Add phase to enter the correct source directory. * gnu/packages/gstreamer.scm (gst-plugins-bad)[arguments]: Enable C++11. * gnu/packages/image-processing.scm (opencv)[arguments]: Likewise. --- gnu/local.mk | 1 + gnu/packages/graphics.scm | 46 +++++++++++++--------- gnu/packages/gstreamer.scm | 5 +++ gnu/packages/image-processing.scm | 4 ++ gnu/packages/patches/ilmbase-fix-tests.patch | 12 ++---- .../patches/ilmbase-openexr-pkg-config.patch | 40 +++++++++++++++++++ 6 files changed, 81 insertions(+), 27 deletions(-) create mode 100644 gnu/packages/patches/ilmbase-openexr-pkg-config.patch (limited to 'gnu/packages/graphics.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 0e279d8303..bf0f9de26e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -962,6 +962,7 @@ dist_patch_DATA = \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/idris-test-no-node.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ + %D%/packages/patches/ilmbase-openexr-pkg-config.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index d4e9adb84a..795e750cb5 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2019 Steve Sprang ;;; Copyright © 2019 John Soo ;;; Copyright © 2019 Pierre Neidhardt +;;; Copyright © 2019 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -327,17 +328,25 @@ many more.") (define-public ilmbase (package (name "ilmbase") - (version "2.3.0") + (version "2.4.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/openexr/openexr/releases" - "/download/v" version "/ilmbase-" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/openexr/openexr") + (commit (string-append "v" version)))) + (file-name (git-file-name "ilmbase" version)) (sha256 (base32 - "0qiq5bqq9rxhqjiym2k36sx4vq8adgrz6xf6qwizi9bqm78phsa5")) - (patches (search-patches "ilmbase-fix-tests.patch")))) - (build-system gnu-build-system) + "0g3rz11cvb7gnphp2np9z7bfl7v4dprq4w5hnsvx7yrasgsdyn8s")) + (patches (search-patches "ilmbase-fix-tests.patch" + "ilmbase-openexr-pkg-config.patch")))) + (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "IlmBase") + #t))))) (home-page "http://www.openexr.com/") (synopsis "Utility C++ libraries for threads, maths, and exceptions") (description @@ -409,27 +418,26 @@ graphics.") (define-public openexr (package (name "openexr") - (version "2.3.0") + (version (package-version ilmbase)) (source (origin - (method url-fetch) - (uri (string-append "https://github.com/openexr/openexr/releases" - "/download/v" version "/openexr-" - version ".tar.gz")) - (sha256 - (base32 - "19jywbs9qjvsbkvlvzayzi81s976k53wg53vw4xj66lcgylb6v7x")) + (inherit (package-source ilmbase)) + (file-name (git-file-name "openexr" version)) (modules '((guix build utils))) (snippet '(begin - (substitute* (find-files "." "tmpDir\\.h") + (substitute* (find-files "OpenEXR" "tmpDir\\.h") (("\"/var/tmp/\"") "\"/tmp/\"")) #t)))) - (build-system gnu-build-system) + (build-system cmake-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-broken-test + (add-after 'unpack 'change-directory + (lambda _ + (chdir "OpenEXR") + #t)) + (add-after 'change-directory 'disable-broken-test ;; This test fails on i686. Upstream developers suggest that ;; this test is broken on i686 and can be safely disabled: ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748 diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 13c2c2fc27..8b81cc91a0 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -286,6 +286,11 @@ developers consider to have good quality code and correct functionality.") (build-system gnu-build-system) (arguments '(#:tests? #f ; XXX: 13 of 53 tests fail + + ;; FIXME: OpenEXR 2.4.0 requires C++ 11 or later. Remove when the + ;; default compiler is >= GCC 5. + #:make-flags '("CXXFLAGS=-std=gnu++11") + #:configure-flags (list (string-append "--with-html-dir=" (assoc-ref %outputs "doc") diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index b3972a2b76..460f35dbae 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -269,6 +269,10 @@ integrates with various databases on GUI toolkits such as Qt and Tk.") "-DWITH_CAROTENE=OFF" ; only visible on arm/aarch64 "-DENABLE_PRECOMPILED_HEADERS=OFF" + ;; FIXME: OpenEXR requires C++11 or later. Remove this when + ;; the default compiler is GCC 7. + "-DCMAKE_CXX_FLAGS=-std=gnu++11" + ;; CPU-Features: ;; See cmake/OpenCVCompilerOptimizations.cmake ;; (CPU_ALL_OPTIMIZATIONS) for a list of all optimizations diff --git a/gnu/packages/patches/ilmbase-fix-tests.patch b/gnu/packages/patches/ilmbase-fix-tests.patch index fcaa37d201..34d3a180c4 100644 --- a/gnu/packages/patches/ilmbase-fix-tests.patch +++ b/gnu/packages/patches/ilmbase-fix-tests.patch @@ -22,10 +22,8 @@ Date: Wed, 24 Feb 2016 01:04:11 +0000 Also fix a pre-existing typo. -Index: ilmbase/ImathTest/testBoxAlgo.cpp -=================================================================== ---- ilmbase.orig/ImathTest/testBoxAlgo.cpp -+++ ilmbase/ImathTest/testBoxAlgo.cpp +--- a/IlmBase/ImathTest/testBoxAlgo.cpp ++++ b/IlmBase/ImathTest/testBoxAlgo.cpp @@ -886,10 +886,11 @@ boxMatrixTransform () assert (approximatelyEqual (b2.min, b4.min, e)); @@ -54,10 +52,8 @@ On 32-bit x86, allow even greater discrepency at double precision, due to possible double-rounding. See https://lists.nongnu.org/archive/html/openexr-devel/2015-12/msg00001.html -Index: ilmbase/ImathTest/testBox.cpp -=================================================================== ---- ilmbase.orig/ImathTest/testBox.cpp -+++ ilmbase/ImathTest/testBox.cpp +--- a/IlmBase/ImathTest/testBox.cpp ++++ b/IlmBase/ImathTest/testBox.cpp @@ -47,6 +47,58 @@ using namespace IMATH_INTERNAL_NAMESPACE namespace { diff --git a/gnu/packages/patches/ilmbase-openexr-pkg-config.patch b/gnu/packages/patches/ilmbase-openexr-pkg-config.patch new file mode 100644 index 0000000000..99613080d8 --- /dev/null +++ b/gnu/packages/patches/ilmbase-openexr-pkg-config.patch @@ -0,0 +1,40 @@ +Fix pkg-config files when using the CMake build system. + +Upstream bug report: +https://github.com/openexr/openexr/issues/567 + +diff --git a/IlmBase/config/CMakeLists.txt b/IlmBase/config/CMakeLists.txt +index 508176a..9e6ab91 100644 +--- a/IlmBase/config/CMakeLists.txt ++++ b/IlmBase/config/CMakeLists.txt +@@ -71,9 +71,9 @@ if(ILMBASE_INSTALL_PKG_CONFIG) + # use a helper function to avoid variable pollution, but pretty simple + function(ilmbase_pkg_config_help pcinfile) + set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_BINDIR}) +- set(libdir ${CMAKE_INSTALL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(exec_prefix ${CMAKE_INSTALL_FULL_BINDIR}) ++ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) + set(LIB_SUFFIX_DASH ${ILMBASE_LIB_SUFFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions +diff --git a/OpenEXR/config/CMakeLists.txt b/OpenEXR/config/CMakeLists.txt +index 1ef829a..b8dc141 100644 +--- a/OpenEXR/config/CMakeLists.txt ++++ b/OpenEXR/config/CMakeLists.txt +@@ -72,9 +72,9 @@ if(OPENEXR_INSTALL_PKG_CONFIG) + # use a helper function to avoid variable pollution, but pretty simple + function(openexr_pkg_config_help pcinfile) + set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_BINDIR}) +- set(libdir ${CMAKE_INSTALL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(exec_prefix ${CMAKE_INSTALL_FULL_BINDIR}) ++ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) + set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions + -- cgit v1.2.3 From 25c4a04fded1bc129df6af5fa563771194ebd7a1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 23 Sep 2019 17:17:04 +0200 Subject: gnu: OpenEXR: Update home page. * gnu/packages/graphics.scm (ilmbase, openexr)[home-page]: Use HTTPS. --- gnu/packages/graphics.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/graphics.scm') diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 795e750cb5..8d04e95937 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -347,7 +347,7 @@ many more.") (lambda _ (chdir "IlmBase") #t))))) - (home-page "http://www.openexr.com/") + (home-page "https://www.openexr.com/") (synopsis "Utility C++ libraries for threads, maths, and exceptions") (description "IlmBase provides several utility libraries for C++. Half is a class @@ -453,7 +453,7 @@ graphics.") (propagated-inputs `(("ilmbase" ,ilmbase) ;used in public headers ("zlib" ,zlib))) ;OpenEXR.pc reads "-lz" - (home-page "http://www.openexr.com") + (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 -- cgit v1.2.3 From 84a0c6ff63afc296c1bc5873f783693dccc5ded2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 24 Sep 2019 23:51:48 +0200 Subject: gnu: Move openmw-openscenegraph to graphics.scm. Package inheritance across modules may cause unbound variable errors at expansion time because of cyclic dependencies between the modules. * gnu/packages/game-development.scm (openmw-openscenegraph): Move from here ... * gnu/packages/graphics.scm (openmw-openscenegraph): ... to here. Make the variable public and "hide" the package. --- gnu/packages/game-development.scm | 34 ---------------------------------- gnu/packages/graphics.scm | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 34 deletions(-) (limited to 'gnu/packages/graphics.scm') diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index ee9e63ea29..7fc0122faa 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1109,40 +1109,6 @@ of use.") '("ogre")))) (synopsis "Fast, flexible and simple GUI (OpenGL backend)"))) -(define openmw-openscenegraph - ;; OpenMW prefers its own fork of openscenegraph: - ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph. - (let ((commit "36a962845a2c87a6671fd822157e0729d164e940")) - (package - (inherit openscenegraph) - (version (git-version "3.6" "1" commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/OpenMW/osg/") - (commit commit))) - (file-name (git-file-name (package-name openscenegraph) version)) - (sha256 - (base32 - "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia")))) - (arguments - (substitute-keyword-arguments (package-arguments openscenegraph) - ((#:configure-flags flags) - ;; As per the above wiki link, the following plugins are enough: - `(append - '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0" - "-DBUILD_OSG_PLUGIN_OSG=1" - "-DBUILD_OSG_PLUGIN_DDS=1" - "-DBUILD_OSG_PLUGIN_TGA=1" - "-DBUILD_OSG_PLUGIN_BMP=1" - "-DBUILD_OSG_PLUGIN_JPEG=1" - "-DBUILD_OSG_PLUGIN_PNG=1" - "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0" - ;; The jpeg plugin requires conversion between integers and booleans - "-DCMAKE_CXX_FLAGS=-fpermissive") - ,flags))))))) - (define-public openmw (package (name "openmw") diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 8d04e95937..6d6c8d1e1c 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -589,6 +589,42 @@ virtual reality, scientific visualization and modeling.") `(("libjpeg" ,libjpeg) ,@(package-inputs openscenegraph))))) + +(define-public openmw-openscenegraph + ;; OpenMW prefers its own fork of openscenegraph: + ;; https://wiki.openmw.org/index.php?title=Development_Environment_Setup#OpenSceneGraph. + (let ((commit "36a962845a2c87a6671fd822157e0729d164e940")) + (hidden-package + (package + (inherit openscenegraph) + (version (git-version "3.6" "1" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenMW/osg/") + (commit commit))) + (file-name (git-file-name (package-name openscenegraph) version)) + (sha256 + (base32 + "05yhgq3qm5q277y32n5sf36vx5nv5qd3zlhz4csgd3a6190jrnia")))) + (arguments + (substitute-keyword-arguments (package-arguments openscenegraph) + ((#:configure-flags flags) + ;; As per the above wiki link, the following plugins are enough: + `(append + '("-DBUILD_OSG_PLUGINS_BY_DEFAULT=0" + "-DBUILD_OSG_PLUGIN_OSG=1" + "-DBUILD_OSG_PLUGIN_DDS=1" + "-DBUILD_OSG_PLUGIN_TGA=1" + "-DBUILD_OSG_PLUGIN_BMP=1" + "-DBUILD_OSG_PLUGIN_JPEG=1" + "-DBUILD_OSG_PLUGIN_PNG=1" + "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0" + ;; The jpeg plugin requires conversion between integers and booleans + "-DCMAKE_CXX_FLAGS=-fpermissive") + ,flags)))))))) + (define-public povray (package (name "povray") -- cgit v1.2.3