@@ -1342,13 +1342,10 @@ (define-public exiv2
(uri (string-append "https://www.exiv2.org/builds/exiv2-" version
"-Source.tar.gz"))
(sha256
- (base32 "1qm6bvj28l42km009nc60gffn1qhngc0m2wjlhf90si3mcc8d99m"))
- (patches
- (if (target-ppc64le?)
- (list (search-patch "exiv2-ppc64.patch"))))))
+ (base32 "1qm6bvj28l42km009nc60gffn1qhngc0m2wjlhf90si3mcc8d99m"))))
(build-system cmake-build-system)
(arguments
- '(#:test-target "tests"
+ `(#:test-target "tests"
#:configure-flags (list "-DEXIV2_BUILD_UNIT_TESTS=ON"
;; darktable needs BMFF to support
;; CR3 files.
@@ -1359,7 +1356,16 @@ (define-public exiv2
(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$"))))))))
+ (for-each delete-file (find-files lib "\\.a$")))))
+ (add-after 'unpack 'adjust-ppc6-tests
+ (lambda _
+ ,@(if (target-ppc64le?)
+ ;; Adjust test on ppc64
+ ;; See: 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
deleted file mode 100644
@@ -1,11 +0,0 @@
---- /tests/bugfixes/github/test_CVE_2018_12265.py
-+++ /tests/bugfixes/github/test_CVE_2018_12265.py
-@@ -18,7 +18,6 @@
- Warning: Directory Image, entry 0x0201: Strip 0 is outside of the data area; ignored.
- Warning: Directory Image, entry 0x0201: Strip 7 is outside of the data area; ignored.
- Error: Offset of directory Thumbnail, entry 0x0201 is out of bounds: Offset = 0x00000000; truncating the entry
--$uncaught_exception $addition_overflow_message
- """
- ]
-- retval = [1]
-+ retval = [0]