[bug#34105] Add pencil2d.

Message ID E1gjn6L-0004yG-02@rmmprod07.runbox
State Accepted
Headers show
Series [bug#34105] Add pencil2d. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

pkill9 Jan. 16, 2019, 3:27 p.m. UTC
This patch adds the Pencil2D software package (https://www.pencil2d.org). I've run `guix lint`, and checked that it builds/runs fine.

Patch

From d0c680e629b4c85ee462b624c65683a0a52306d9 Mon Sep 17 00:00:00 2001
From: Pkill -9 <pkill9@runbox.com>
Date: Wed, 16 Jan 2019 15:14:45 +0000
Subject: [PATCH] gnu: Add pencil2d.

* gnu/packages/animation.scm (pencil2d): New variable.
---
 gnu/packages/animation.scm | 41 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index a10747ef3..5b9ca033b 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -26,6 +26,7 @@ 
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fontutils)
@@ -258,3 +259,43 @@  easy to lip sync animated characters by making the process very simple – just
 type in the words being spoken, then drag the words on top of the sound’s
 waveform until they line up with the proper sounds.")
       (license license:gpl3+))))
+
+(define-public pencil2d
+  (package
+    (name "pencil2d")
+    (version "0.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pencil2d/pencil")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1iv7drwxs32mqs3hybjx2lxyqn8cv2b4rw9ny7gzdacsbhi65knr"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("bash" ,bash) ;; Bash is used for wrap-program
+       ("qtbase" ,qtbase)
+       ("qtxmlpatterns" ,qtxmlpatterns)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtsvg" ,qtsvg)))
+    (arguments
+     `(#:phases
+       (modify-phases standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (qmake (string-append (assoc-ref inputs "qtbase")
+                                         "/bin/qmake")))
+               (invoke qmake (string-append "PREFIX=" out)))))
+         (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")
+    (synopsis "Tool to make 2D hand-drawn animations")
+    (description "Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations.")
+    (license license:gpl2)))
-- 
2.20.1