[bug#34283,PATCH-4/4] Add: mypaint@2.0.0-alpha.2

Message ID 20190208072700.6q3jtvz3lfikyjme@WaraToNora
State Accepted
Headers show
Series [bug#34283] Add: mypaint | expand

Commit Message

Yoshinori Arai Feb. 8, 2019, 7:27 a.m. UTC
From 624bcd336536880cf802e87bb25aeac8aac97c0a Mon Sep 17 00:00:00 2001
From: Yoshinori Arai <kumagusu08@gmail.com>
Date: Fri, 8 Feb 2019 13:07:44 +0900
Subject: [PATCH 4/4] Add: mypaint@2.0.0-alpha.2

---
 gnu/packages/graphics.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Patch

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 03b411a50..325a9dd51 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -944,3 +944,35 @@  requirements.")
                      (sha256
                       (base32
                        "0ap2b6n20lnvdm06x91qawk1k8jmxnf7zffxrqxw60fgqd4whwjm"))))))
+
+(define-public mypaint-2
+  (package (inherit mypaint)
+    (version "2.0.0-alpha.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/mypaint/mypaint/"
+                                  "archive/v" version ".tar.gz"))
+              (sha256
+               (base32
+                "0nmcvma2vg2iqlvg8v96d3mppc5cn46591hh8jhppgibcvifc81m"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-for-buildconfig-and-test
+           (lambda _
+             (for-each make-file-writable (find-files "." ".*"))
+             ;; FATAL: Cannot create cache dir '/homeless-shelter
+             (setenv "HOME" "/tmp")))
+         (add-before 'build 'set-cflags
+           (lambda _
+             (setenv "CFLAGS" "-Ofast -ftree-vectorize -fopt-info-vec-optimized -march=native -mtune=native -funsafe-math-optimizations -funsafe-loop-optimizations")))
+         (replace 'install
+           (lambda _
+             (invoke "python" "setup.py" "managed_install"
+                     (string-append "--prefix=" (assoc-ref %outputs "out"))))))))
+    (inputs
+     `(("gettext" ,gettext-minimal)
+       ("libmypaint" ,libmypaint-2)
+       ("mypaint-brushes" ,mypaint-brushes-2)))))