gnu: pencil2d: Fix tests.

* gnu/packages/animation.scm (pencil2d)[arguments]: Use gexps.
Add fix-tests phase.
This commit is contained in:
宋文武 2023-08-27 10:54:41 +08:00
parent d6966b8a5b
commit 5078e98cf3
No known key found for this signature in database
GPG key ID: D415BF253B515976

View file

@ -442,19 +442,24 @@ (define-public pencil2d
(inputs (inputs
(list qtbase-5 qtxmlpatterns qtmultimedia-5 qtsvg-5)) (list qtbase-5 qtxmlpatterns qtmultimedia-5 qtsvg-5))
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(replace 'configure #~(modify-phases %standard-phases
(lambda* (#:key inputs outputs #:allow-other-keys) (add-after 'unpack 'fix-tests
(let ((out (assoc-ref outputs "out"))) (lambda _
(invoke "qmake" (string-append "PREFIX=" out))))) ;; Its bundled catch2-2.5.0 fails to build with glibc-2.35.
(add-after 'install 'wrap-executable (copy-file #$(file-append catch2 "/include/catch2/catch.hpp")
(lambda* (#:key inputs outputs #:allow-other-keys) "tests/src/catch.hpp")))
(let ((out (assoc-ref outputs "out")) (replace 'configure
(plugin-path (getenv "QT_PLUGIN_PATH"))) (lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append out "/bin/pencil2d") (let ((out (assoc-ref outputs "out")))
`("QT_PLUGIN_PATH" ":" prefix (,plugin-path))) (invoke "qmake" (string-append "PREFIX=" out)))))
#t)))))) (add-after 'install 'wrap-executable
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(plugin-path (getenv "QT_PLUGIN_PATH")))
(wrap-program (string-append out "/bin/pencil2d")
`("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))))))))
(home-page "https://www.pencil2d.org") (home-page "https://www.pencil2d.org")
(synopsis "Make 2D hand-drawn animations") (synopsis "Make 2D hand-drawn animations")
(description (description