summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRaghav Gururajan <raghavgururajan@disroot.org>2020-09-24 10:48:08 -0400
committerDanny Milosavljevic <dannym@scratchpost.org>2020-12-01 22:06:03 +0100
commit49d38b9a44d1045133e993f372394f9d3c626a72 (patch)
treeeb9b32f30c7f9dad5d6c755823b9aea0631ec7dd /gnu/packages
parentb96961c9d25dd4efeaecf33813f9025282b25869 (diff)
gnu: openjpeg: Enable tests.
* gnu/packages/image.scm (openjpeg) [arguments]<#:tests?>: Remove argument. <#:configure-flags>[-DBUILD_UNIT_TESTS]: New flag. [-DBUILD_TESTING]: New flag. [-DOPJ_DATA_ROOT]: New flag. <#:phases>['disable-failing-tests]: New phase. [native-inputs]: Add openjpeg-data. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/image.scm21
1 files changed, 19 insertions, 2 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index f4d619eabc..e8e0c88c34 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -824,8 +824,25 @@ test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC
(base32 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb"))))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f ;TODO: requires a 1.1 GiB data repository
- #:configure-flags '("-DBUILD_STATIC_LIBS=OFF")))
+ `(#:configure-flags
+ (list
+ "-DBUILD_STATIC_LIBS=OFF"
+ "-DBUILD_UNIT_TESTS=ON"
+ "-DBUILD_TESTING=ON"
+ (string-append "-DOPJ_DATA_ROOT="
+ (assoc-ref %build-inputs "openjpeg-data")))
+ #:phases
+ (modify-phases %standard-phases
+ ;; To be re-enabled after upstream fixes the bug,
+ ;; https://github.com/uclouvain/openjpeg/issues/1264
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/CMakeLists.txt"
+ (("add_subdirectory\\(nonregression\\)")
+ ""))
+ #t)))))
+ (native-inputs
+ `(("openjpeg-data" ,openjpeg-data))) ; Files for test-suite
(inputs
`(("lcms" ,lcms)
("libpng" ,libpng)