summary refs log tree commit diff
path: root/gnu/packages/graphics.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2016-05-15 13:08:20 +0200
committerRicardo Wurmus <rekado@elephly.net>2016-05-16 16:16:15 +0200
commit002528bca512c2f45a7880e09be7c655bba7d2b0 (patch)
treeffbeecd3b686f2bc3b78efdbca00270cbd4ec4a3 /gnu/packages/graphics.scm
parent44877dcc66ee5bb38101e32a32b11069e02813f1 (diff)
downloadguix-002528bca512c2f45a7880e09be7c655bba7d2b0.tar.gz
gnu: rapicorn: Fix tests.
* gnu/packages/graphics.scm (rapicorn)[arguments]: Add build phases
"fix-tests" and "pre-check".  Generalize "replace-/bin/ls" phase to
"replace-fhs-paths".
[propagated-inputs]: Add python2-enum34.
[native-inputs]: Add xorg-server.
Diffstat (limited to 'gnu/packages/graphics.scm')
-rw-r--r--gnu/packages/graphics.scm31
1 files changed, 24 insertions, 7 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index d08542fd4a..ca99cd0302 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -295,15 +295,30 @@ visual effects work for film.")
                 "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))))
     (build-system gnu-build-system)
     (arguments
-     `(;; FIXME: At least "testrcore1" fails.
-       #:tests? #f
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'replace-/bin/ls
+         (add-after 'unpack 'fix-tests
+           (lambda _
+             ;; Our grep does not support perl regular expressions.
+             (substitute* "taptool.sh"
+               (("grep -P") "grep -E"))
+             ;; Disable path tests because we cannot access /bin or /sbin.
+             (substitute* "rcore/tests/multitest.cc"
+               (("TCMP \\(Path::equals \\(\"/bin\"") "//"))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; The test suite requires a running X server (with DISPLAY
+             ;; number 99 or higher).
+             (system "Xvfb :99 &")
+             (setenv "DISPLAY" ":99")
+             #t))
+         (add-after 'unpack 'replace-fhs-paths
            (lambda _
              (substitute* (cons "Makefile.decl"
                                 (find-files "." "^Makefile\\.in$"))
-               (("/bin/ls") (which "ls")))
+               (("/bin/ls") (which "ls"))
+               (("/usr/bin/env") (which "env")))
              #t)))))
     ;; These libraries are listed in the "Required" section of the pkg-config
     ;; file.
@@ -311,7 +326,8 @@ visual effects work for film.")
      `(("librsvg" ,librsvg)
        ("cairo" ,cairo)
        ("pango" ,pango)
-       ("libxml2" ,libxml2)))
+       ("libxml2" ,libxml2)
+       ("python2-enum34" ,python2-enum34)))
     (inputs
      `(("gdk-pixbuf" ,gdk-pixbuf)
        ("libpng" ,libpng-1.2)
@@ -326,7 +342,8 @@ visual effects work for film.")
        ("doxygen" ,doxygen)
        ("graphviz" ,graphviz)
        ("intltool" ,intltool)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ("xvfb" ,xorg-server)))
     (home-page "http://rapicorn.org")
     (synopsis "Toolkit for rapid development of user interfaces")
     (description