diff mbox series

[bug#40214,1/4] gnu: libmypaint: Update to 1.5.1.

Message ID 87pnbmufii.fsf@lprndn.info
State Accepted
Headers show
Series [bug#40214,1/4] gnu: libmypaint: Update to 1.5.1. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

L p R n d n May 2, 2020, 10:40 p.m. UTC
Hello,

Here is the new patch for adding Mypaint.
Added two wrapping phases, one from glib-or-gtk and one adding
GI_TYPELIB_PATH. Also switched from gdk-pixbuf to gdk-pixbuf+svg and added the
hicolor-icon-theme as input. It should work now.

Have a nice day,

L  p R n  d n

Comments

Christopher Baines Dec. 8, 2020, 8:11 p.m. UTC | #1
L p R n d n <guix@lprndn.info> writes:

> Here is the new patch for adding Mypaint.
> Added two wrapping phases, one from glib-or-gtk and one adding
> GI_TYPELIB_PATH. Also switched from gdk-pixbuf to gdk-pixbuf+svg and added the
> hicolor-icon-theme as input. It should work now.

Hey,

Sorry for the delay in pushing this forward. I've had a look at this
patch and it looks pretty good to me.

I've updated mypaint to 2.0.1 which removed the need for one of the
phases. I've pushed to master as
8a55a3994c805aa2d4f5d04433908b206c294d47.

I've only just realised that you'd intended in moving some other
packages around. If you're still interested in making those changes, can
you resubmit the patches as new bugs.

Thanks,

Chris
diff mbox series

Patch

From cc7b7faa4493445ef70004d185ea37a4d462b17f Mon Sep 17 00:00:00 2001
From: L  p R n  d n <guix@lprndn.info>
Date: Fri, 1 May 2020 12:21:55 +0200
Subject: [PATCH 2/2] gnu: Add Mypaint.

* gnu/packages/image.scm (mypaint): New variable.
---
 gnu/packages/image.scm | 68 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 08accd1b2f..736b3012a1 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -25,6 +25,7 @@ 
 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
+;;; Copyright © 2020 L  p R n  d n <guix@lprndn.info>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +60,7 @@ 
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages graphics)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages lua)
@@ -74,6 +76,7 @@ 
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
@@ -2129,3 +2132,68 @@  MyPaint.")
        (file-name (git-file-name name version))
        (sha256
         (base32 "1c95l1vfz7sbrdlzrbz7h1p6s1k113kyjfd9wfnxlm0p6562cz3j"))))))
+
+(define-public mypaint
+  (package
+    (name "mypaint")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/mypaint/mypaint/"
+                                  "releases/download/v" version "/mypaint-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "0pja0w005qn0qzy01y0nwbvi7xnmpq5s2bdlhhg8r4s2wdk7imni"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:imported-modules ((guix build glib-or-gtk-build-system)
+                           ,@%python-build-system-modules)
+       #:modules ((guix build python-build-system)
+                  ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-relinfo
+           (lambda _
+             ;; #1058 https://github.com/mypaint/mypaint/pull/1058
+             (substitute* "lib/meta.py"
+               (("relinfo_fp,") "relinfo_fp.read(),"))
+             #t))
+         (add-after 'install 'glib-or-gtk-wrap
+                    (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (gdk-pixbuf (assoc-ref inputs "gdk-pixbuf"))
+                    (gtk+ (assoc-ref inputs "gtk+")))
+               (wrap-program (string-append out "/bin/mypaint")
+                 `("GI_TYPELIB_PATH" ":" prefix
+                   (,(getenv "GI_TYPELIB_PATH"))))
+               #t)))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests need writing access
+             (setenv "HOME" "/tmp")
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gobject-introspection" ,gobject-introspection)
+       ("swig" ,swig)
+       ("gettext" ,gettext-minimal)))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("gdk-pixbuf" ,gdk-pixbuf+svg)
+       ("hicolor-icon-theme" ,hicolor-icon-theme)
+       ("libmypaint" ,libmypaint)
+       ("mypaint-brushes" ,mypaint-brushes)
+       ("json-c" ,json-c)
+       ("lcms" ,lcms)
+       ("python-numpy" ,python-numpy)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pygobject" ,python-pygobject)))
+    (home-page "http://mypaint.org/")
+    (synopsis "Fast and dead-simple painting app for artists")
+    (description "MyPaint is a simple drawing and painting program
+ that works well with Wacom-style graphics tablets.")
+    (license license:gpl2+)))
-- 
2.26.1