diff options
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r-- | gnu/packages/image.scm | 78 |
1 files changed, 44 insertions, 34 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 1598d33046..33e8b32c10 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1036,7 +1036,6 @@ test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC (list "-DBUILD_STATIC_LIBS=OFF" "-DBUILD_UNIT_TESTS=ON" - "-DBUILD_TESTING=ON" (string-append "-DOPJ_DATA_ROOT=" (assoc-ref %build-inputs "openjpeg-data"))) #:phases @@ -1461,7 +1460,6 @@ from Lisp and S-expressions, building pixel perfect badges.") (native-inputs (list doxygen python-nose python-sphinx)) (arguments (list - #:test-target "check" #:configure-flags #~(list "-Wno-dev" ;suppress developer mode with lots of warnings (string-append @@ -1477,7 +1475,11 @@ from Lisp and S-expressions, building pixel perfect badges.") ;; needs to be set. (string-append "-DCMAKE_CXX_FLAGS=-I" (assoc-ref %build-inputs "ilmbase") - "/include/OpenEXR" " -ffloat-store")))) + "/include/OpenEXR" " -ffloat-store") + ;; Tests are not built by default. + "-DAUTOBUILD_TESTS=ON" + ;; Disable running tests during the build. + "-DAUTOEXEC_TESTS=OFF"))) (synopsis "Computer vision library") (description "VIGRA stands for Vision with Generic Algorithms. It is an image @@ -1614,38 +1616,46 @@ channels.") (base32 "1qm6bvj28l42km009nc60gffn1qhngc0m2wjlhf90si3mcc8d99m")))) (build-system cmake-build-system) (arguments - `(#:test-target "tests" - #:configure-flags (list "-DEXIV2_BUILD_UNIT_TESTS=ON" - ;; darktable needs BMFF to support - ;; CR3 files. - "-DEXIV2_ENABLE_BMFF=ON") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-gcc-reference - (lambda _ - ;; _GLIBCXX_ASSERTIONS brings reference to GCC. - (substitute* "cmake/compilerFlags.cmake" - (("add_compile_options[(]-Wp,-D_GLIBCXX_ASSERTIONS[)]") - "")))) - (add-after 'install 'delete-static-libraries - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - (for-each delete-file (find-files lib "\\.a$"))))) + (list + #:configure-flags + #~(list "-DEXIV2_BUILD_UNIT_TESTS=ON" + ;; darktable needs BMFF to support + ;; CR3 files. + "-DEXIV2_ENABLE_BMFF=ON") + #:modules '((guix build cmake-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-gcc-reference + (lambda _ + ;; _GLIBCXX_ASSERTIONS brings reference to GCC. + (substitute* "cmake/compilerFlags.cmake" + (("add_compile_options[(]-Wp,-D_GLIBCXX_ASSERTIONS[)]") + "")))) + (add-after 'install 'delete-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (for-each delete-file (find-files lib "\\.a$"))))) + (replace 'check + (lambda* (#:rest args) + (apply (assoc-ref gnu:%standard-phases 'check) + #:test-target "tests" args))) - ,@(if (or (target-ppc64le?) - (target-aarch64?) - (target-riscv64?)) - '((add-after 'unpack 'adjust-tests - (lambda _ - ;; Adjust test on ppc64 and aarch64, where no exception - ;; is raised and thus the return value is different. See - ;; <https://github.com/Exiv2/exiv2/issues/365> and - ;; <https://github.com/Exiv2/exiv2/issues/933>. - (substitute* "tests/bugfixes/github/test_CVE_2018_12265.py" - (("\\$uncaught_exception \\$addition_overflow_message\n") "") - (("retval = \\[1\\]") "retval = [0]"))))) - '())))) + #$@(if (or (target-ppc64le?) + (target-aarch64?) + (target-riscv64?)) + '((add-after 'unpack 'adjust-tests + (lambda _ + ;; Adjust test on ppc64 and aarch64, where no exception + ;; is raised and thus the return value is different. See + ;; <https://github.com/Exiv2/exiv2/issues/365> and + ;; <https://github.com/Exiv2/exiv2/issues/933>. + (substitute* "tests/bugfixes/github/test_CVE_2018_12265.py" + (("\\$uncaught_exception \\$addition_overflow_message\n") "") + (("retval = \\[1\\]") "retval = [0]"))))) + '())))) (propagated-inputs (list expat zlib)) (native-inputs |