gnu: openimageio: Fix build.

This fixes <https://issues.guix.gnu.org/72046>.

* gnu/packages/graphics.scm (openimageio)[arguments]<#:phases>: Add
fix-zlib-version phase.

Change-Id: I7ea6e7b7da675bf11a85381cbe26c6992f2bd299
This commit is contained in:
Zheng Junjie 2024-07-11 14:24:31 +08:00 committed by Ludovic Courtès
parent c289311336
commit 319ce074fa
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 15 additions and 1 deletions

View file

@ -7257,6 +7257,10 @@ (define-public epiphany
(replace 'check
(lambda* (#:key parallel-tests? tests? #:allow-other-keys)
(when tests?
(setenv "XDG_RUNTIME_DIR" (string-append (getcwd)
"/runtime-dir"))
(mkdir (getenv "XDG_RUNTIME_DIR"))
(chmod (getenv "XDG_RUNTIME_DIR") #o700)
(setenv "MESON_TESTTHREADS"
(if parallel-tests?
(number->string (parallel-job-count))

View file

@ -1350,7 +1350,17 @@ (define-public openimageio
(arguments
(list #:tests? #f ; half the tests require online data or use redirection
#:configure-flags #~(list "-DUSE_EXTERNAL_PUGIXML=1"
"-DOIIO_BUILD_TESTS=false")))
"-DOIIO_BUILD_TESTS=false")
#:phases
#~(modify-phases %standard-phases
; Work around a CMake Zlib-detection bug:
; https://issues.guix.gnu.org/72046
; https://gitlab.kitware.com/cmake/cmake/-/issues/25200
(add-after 'configure 'fix-zlib-version
(lambda _
(substitute* "include/imageio_pvt.h"
(("#define ZLIB_VERSION \"1\\.3\"")
"")))))))
(native-inputs
(list pkg-config))
(inputs