diff mbox series

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

Message ID 877dxwvsy6.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 1, 2020, 10:40 a.m. UTC
Hello,

Here are the new patches.

Leo Famulari <leo@famulari.name> writes:

> On Thu, Apr 30, 2020 at 11:13:26PM +0200, L p R n d n wrote:
>> Leo Famulari <leo@famulari.name> writes:
>> 
>> > On Thu, Apr 30, 2020 at 07:12:23PM +0200, L p R n d n wrote:
>> >> Here are the updated patches. First patch moves libmypaint and
>> >> mypaint-brushes to a new drawing.scm file, second adds mypaint.
>> >
>> > I'm not sure about adding a module (gnu packages drawing). The software
>> > that could fit there can generally also be used for "painting",
>> > "drafting", "photography post-production", and other activities of a
>> > visual nature.
>> >
>> > We already have image and graphics modules that are rather ambiguous.
>> > How about one of those? Or creating a mypaint module?
>> 
>> You're right! I didn't find image.scm when searching for the right
>> place. Should I move libpaint and mypaint-brushes too? It feels weird to
>> have them in a different place.
>
> Yeah, now that we will have mypaint, it makes sense to keep them all
> together :)

Have a nice day,

L  p R n  d n

Comments

Leo Famulari May 1, 2020, 9:05 p.m. UTC | #1
On Fri, May 01, 2020 at 12:40:49PM +0200, L p R n d n wrote:
> Here are the new patches.

Thanks!

But, MyPaint doesn't run for me when I install it based on these
patches:

------
$ mypaint
INFO: mypaint: Installation layout: conventional POSIX-like structure with prefix '/gnu/store/dbs4r9qs1qjaf7sh12fy7v837280ip5d-mypaint-2.0.0'
Traceback (most recent call last):
  File "/gnu/store/dbs4r9qs1qjaf7sh12fy7v837280ip5d-mypaint-2.0.0/bin/.mypaint-real", line 294, in <module>
    = get_paths()
  File "/gnu/store/dbs4r9qs1qjaf7sh12fy7v837280ip5d-mypaint-2.0.0/bin/.mypaint-real", line 241, in get_paths
    from lib import fileutils
  File "/gnu/store/dbs4r9qs1qjaf7sh12fy7v837280ip5d-mypaint-2.0.0/lib/mypaint/lib/fileutils.py", line 25, in <module>
    import lib.gichecks
  File "/gnu/store/dbs4r9qs1qjaf7sh12fy7v837280ip5d-mypaint-2.0.0/lib/mypaint/lib/gichecks.py", line 19, in <module>
    gi.require_version('GdkPixbuf', '2.0')
  File "/gnu/store/y4qwsw06ynvw3fjk2lrspp89mfmjzj5i-python-pygobject-3.28.3/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GdkPixbuf not available
------

This is on Debian. Is it working for you?
L p R n d n May 2, 2020, 8:09 a.m. UTC | #2
Hello,

Hum it does work for me on a Guix system. But looking at my env, I have
gdk-pixbuf in GI_TYPELIB_PATH. I think wrapping mypaint like with
glib-or-gtk-build system should do the trick. I'll look into that. ;)

Have a nice fay,

L  p R n  d n
diff mbox series

Patch

From 6727d751c75b51e9f8b7544420e108142f32d9dd 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 | 50 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 08accd1b2f..8ceb8fe881 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.
 ;;;
@@ -74,6 +75,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 +2131,51 @@  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
+     `(#: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-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)
+       ("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