summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2024-07-11 14:24:31 +0800
committerLeo Famulari <leo@famulari.name>2024-07-11 11:38:01 -0400
commit50243774824597dbd141a074a7be0117dc450cef (patch)
treee474180368243dfccea98ca9956d65bbb77a7f87
parent172355c2c3ca60e60aa4e238f85284480375bd15 (diff)
downloadguix-patches-50243774824597dbd141a074a7be0117dc450cef.tar
guix-patches-50243774824597dbd141a074a7be0117dc450cef.tar.gz
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
-rw-r--r--gnu/packages/gnome.scm4
-rw-r--r--gnu/packages/graphics.scm12
2 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 0f94dec591..0f853875be 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7256,6 +7256,10 @@ almost all of them.")
(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))
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index d23ea01b02..22ef878972 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1350,7 +1350,17 @@ with strong support for multi-part, multi-channel use cases.")
(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