From 2718616f77aace28b3962fef29b4e38b87a512ce Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 10 Apr 2024 10:52:14 -0400 Subject: gnu: openexr: Fix build. Two issues are fixed with this commit. First, openexr would fail to build on i686-linux due to a test which checks for SSE2. Secondly, dependents could fail to find openexr as it now has libdeflate in the Requires.private of OpenEXR.pc. * gnu/packages/graphics.scm (openexr)[arguments]: Enable SSE2 for x86_64-linux and i686-linux in configure-flags. [inputs]: Remove zlib (no longer used). Move libdeflate from here ... [propagated-inputs]: ... to here. Change-Id: Ib2e6669036033e262447ba4b1b98c20c7db13bf1 --- gnu/packages/graphics.scm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index ec1d7c9569..a5e36d6513 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2021 Ekaitz Zarraga ;;; Copyright © 2021, 2022 Vinicius Monego ;;; Copyright © 2022 Michael Rohleder -;;; Copyright © 2022, 2023 John Kehayias +;;; Copyright © 2022, 2023, 2024 John Kehayias ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2022 Tobias Kortkamp ;;; Copyright © 2022 Paul A. Patience @@ -142,7 +142,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix deprecation) - #:use-module (guix utils)) + #:use-module (guix utils) + #:use-module (ice-9 match)) (define-public mmm (package @@ -1204,7 +1205,16 @@ graphics.") "00s1a05kggk71vfbnsvykyjc2j7y6yyzgl63sy4yiddshz2k2mcr")))) (build-system cmake-build-system) (arguments - (list #:phases + (list #:configure-flags + #~(list #$@(match (%current-system) + ;; A test explicitly checks for SSE2 (would fail on + ;; i686-linux), so make sure it is enabled for both C + ;; and CPP. + ((or "x86_64-linux" "i686-linux") + '("-DCMAKE_CXX_FLAGS=-mfpmath=sse -msse2" + "-DCMAKE_C_FLAGS=-mfpmath=sse -msse2")) + (_ '()))) + #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-test-directory (lambda _ @@ -1236,7 +1246,10 @@ graphics.") "") (("TEST \\(testOptimizedInterleavePatterns, \"basic\"\\);") ""))))))))) - (inputs (list imath libdeflate zlib)) + (inputs (list imath)) + (propagated-inputs + ;; Marked as Requires.private in OpenEXR.pc. + (list libdeflate)) (home-page "https://www.openexr.com/") (synopsis "High-dynamic-range file format library") (description -- cgit v1.2.3