[PATCH] drawpile package (sans upnp)

  • Done
  • quality assurance status badge
Details
3 participants
  • Oleg Pykhalov
  • Mathieu Othacehe
  • raingloom
Owner
unassigned
Submitted by
raingloom
Severity
normal
R
R
raingloom wrote on 6 Aug 2020 00:29
(name . Guix Patches)(address . guix-patches@gnu.org)
20200806002933.1e1996bb@riseup.net
Hai! Packaged this on a whim, it was rather straightforward.

Caveat: it crashes (segfaults) due to a UPnP related error, i have not
yet determined why. It's an optional dependency, so I disabled it for
now.

Tested it through an Yggdrasil connection and it worked.
From 17fd09841ceedb2f15adce22992ccc02be8ef525 Mon Sep 17 00:00:00 2001
From: your friendly localhost admin <raingloom@riseup.net>
Date: Thu, 6 Aug 2020 00:23:34 +0200
Subject: [PATCH] gnu: Added drawpile (without UPnP support, see comment) at
version 2.1.17

* gnu/packages/graphics.scm (drawpile): New variable.
---
gnu/packages/graphics.scm | 54 +++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Toggle diff (97 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index cdb13c2619..f03016c737 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -49,6 +49,7 @@
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crypto)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages documentation)
#:use-module (gnu packages flex)
@@ -59,12 +60,14 @@
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnunet)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages jemalloc)
+ #:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pdf)
@@ -81,12 +84,14 @@
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
#:use-module (gnu packages tbb)
+ #:use-module (gnu packages upnp)
#:use-module (gnu packages video)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
+ #:use-module (guix build-system qt)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix hg-download)
@@ -1431,3 +1436,52 @@ and PC Engine formats")
the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
Automated palette selection is supported.")
(license license:expat)))
+
+(define-public drawpile
+ (package
+ (name "drawpile")
+ (version "2.1.17")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/drawpile/Drawpile/archive/"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0brscm95nay31xa1c02n1w144gg9hm8pxwa9sfnis0x5dj2nkrb7"))))
+ (build-system qt-build-system)
+ (arguments '(#:tests? #f))
+ (native-inputs
+ `(("extra-cmake-modules" ,extra-cmake-modules)))
+ (inputs
+ `(("giflib" ,giflib)
+ ("karchive" ,karchive)
+ ("kdnssd" ,kdnssd)
+ ("libmicrohttpd" ,libmicrohttpd)
+ ("libsodium" ,libsodium)
+ ("libvpx" ,libvpx)
+ ;("miniupnpc" ,miniupnpc) ;; TODO segfaults for some reason
+ ("qtbase" ,qtbase)
+ ("qtkeychain" ,qtkeychain)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtsvg" ,qtsvg)))
+ (home-page "https://drawpile.net")
+ (synopsis "Collaborative drawing program")
+ (description
+"Drawpile is a drawing program that lets you share the canvas with other users
+in real time.
+
+Some feature highlights:
+Runs on Linux, Windows and OSX
+Shared canvas using the built-in server or a dedicated server
+Record, play back and export drawing sessions
+Simple animation support
+Layers and blending modes
+Text layers
+Supports pressure sensitive Wacom tablets
+Built-in chat
+Supports OpenRaster file format
+Encrypted connections using SSL
+Automatic port forwarding with UPnP")
+ (license license:gpl3+)))
--
2.28.0
M
M
Mathieu Othacehe wrote on 7 Aug 2020 10:34
(name . raingloom)(address . raingloom@riseup.net)(address . 42725@debbugs.gnu.org)
87r1sionw1.fsf@gnu.org
Hello,

Toggle quote (5 lines)
> + (method url-fetch)
> + (uri (string-append "https://github.com/drawpile/Drawpile/archive/"
> + version
> + ".tar.gz"))

We prefer not to use those github archives that can be re-generated and
prefer to use "git-fetch" method instead.

Toggle quote (6 lines)
> + (sha256
> + (base32
> + "0brscm95nay31xa1c02n1w144gg9hm8pxwa9sfnis0x5dj2nkrb7"))))
> + (build-system qt-build-system)
> + (arguments '(#:tests? #f))

You should explain why tests are not run with a comment.

Toggle quote (11 lines)
> + (native-inputs
> + `(("extra-cmake-modules" ,extra-cmake-modules)))
> + (inputs
> + `(("giflib" ,giflib)
> + ("karchive" ,karchive)
> + ("kdnssd" ,kdnssd)
> + ("libmicrohttpd" ,libmicrohttpd)
> + ("libsodium" ,libsodium)
> + ("libvpx" ,libvpx)
> + ;("miniupnpc" ,miniupnpc) ;; TODO segfaults for some reason

No need to comment twice.

Toggle quote (13 lines)
> + ("qtbase" ,qtbase)
> + ("qtkeychain" ,qtkeychain)
> + ("qtmultimedia" ,qtmultimedia)
> + ("qtsvg" ,qtsvg)))
> + (home-page "https://drawpile.net")
> + (synopsis "Collaborative drawing program")
> + (description
> +"Drawpile is a drawing program that lets you share the canvas with other users
> +in real time.
> +
> +Some feature highlights:
> +Runs on Linux, Windows and OSX

No need to talk about those operating systems I think.

Toggle quote (11 lines)
> +Shared canvas using the built-in server or a dedicated server
> +Record, play back and export drawing sessions
> +Simple animation support
> +Layers and blending modes
> +Text layers
> +Supports pressure sensitive Wacom tablets
> +Built-in chat
> +Supports OpenRaster file format
> +Encrypted connections using SSL
> +Automatic port forwarding with UPnP")

You could use texinfo to render this list nicely. See "libmemcached"
package for an example.

Could you send an updated patch?

Thanks,

Mathieu
R
R
raingloom wrote on 8 Aug 2020 00:50
(address . 42725@debbugs.gnu.org)
20200808005008.5858e921@riseup.net
On Fri, 07 Aug 2020 10:34:22 +0200
Mathieu Othacehe <othacehe@gnu.org> wrote:

Toggle quote (11 lines)
> Hello,
>
> > + (method url-fetch)
> > + (uri (string-append
> > "https://github.com/drawpile/Drawpile/archive/"
> > + version
> > + ".tar.gz"))
>
> We prefer not to use those github archives that can be re-generated
> and prefer to use "git-fetch" method instead.

Done!

Toggle quote (8 lines)
> > + (sha256
> > + (base32
> > + "0brscm95nay31xa1c02n1w144gg9hm8pxwa9sfnis0x5dj2nkrb7"))))
> > + (build-system qt-build-system)
> > + (arguments '(#:tests? #f))
>
> You should explain why tests are not run with a comment.

It didn't generate a "test" target, but I figured out how to enable it.
Now it runs them! Also enabled some more functionality that could be
useful.

Toggle quote (14 lines)
> > + (native-inputs
> > + `(("extra-cmake-modules" ,extra-cmake-modules)))
> > + (inputs
> > + `(("giflib" ,giflib)
> > + ("karchive" ,karchive)
> > + ("kdnssd" ,kdnssd)
> > + ("libmicrohttpd" ,libmicrohttpd)
> > + ("libsodium" ,libsodium)
> > + ("libvpx" ,libvpx)
> > + ;("miniupnpc" ,miniupnpc) ;; TODO segfaults for some reason
> >
>
> No need to comment twice.

Makes it easier to enable the dependency and still keep the TODO note
without causing a syntax error.

Toggle quote (15 lines)
> > + ("qtbase" ,qtbase)
> > + ("qtkeychain" ,qtkeychain)
> > + ("qtmultimedia" ,qtmultimedia)
> > + ("qtsvg" ,qtsvg)))
> > + (home-page "https://drawpile.net")
> > + (synopsis "Collaborative drawing program")
> > + (description
> > +"Drawpile is a drawing program that lets you share the canvas with
> > other users +in real time.
> > +
> > +Some feature highlights:
> > +Runs on Linux, Windows and OSX
>
> No need to talk about those operating systems I think.

Done.

Toggle quote (20 lines)
> > +Shared canvas using the built-in server or a dedicated server
> > +Record, play back and export drawing sessions
> > +Simple animation support
> > +Layers and blending modes
> > +Text layers
> > +Supports pressure sensitive Wacom tablets
> > +Built-in chat
> > +Supports OpenRaster file format
> > +Encrypted connections using SSL
> > +Automatic port forwarding with UPnP")
>
> You could use texinfo to render this list nicely. See "libmemcached"
> package for an example.
>
> Could you send an updated patch?
>
> Thanks,
>
> Mathieu

Thanks for the quick response! Here it is :D
From 0b0751f31bca2b8861e6ef43e9c5f0fbad43fca7 Mon Sep 17 00:00:00 2001
From: your friendly localhost admin <raingloom@riseup.net>
Date: Thu, 6 Aug 2020 00:23:34 +0200
Subject: [PATCH] gnu: Added drawpile (UPnP support pending) at version 2.1.17

* gnu/packages/graphics.scm (drawpile): New variable.
---
gnu/packages/graphics.scm | 59 +++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)

Toggle diff (102 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index cdb13c2619..be66bed479 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -49,6 +49,7 @@
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crypto)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages documentation)
#:use-module (gnu packages flex)
@@ -59,12 +60,14 @@
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnunet)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages jemalloc)
+ #:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pdf)
@@ -81,12 +84,14 @@
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
#:use-module (gnu packages tbb)
+ #:use-module (gnu packages upnp)
#:use-module (gnu packages video)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
+ #:use-module (guix build-system qt)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix hg-download)
@@ -1431,3 +1436,57 @@ and PC Engine formats")
the graphics formats of the SNES, Game Boy Color and PC Engine game consoles.
Automated palette selection is supported.")
(license license:expat)))
+
+(define-public drawpile
+ (package
+ (name "drawpile")
+ (version "2.1.17")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/drawpile/Drawpile/archive/"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0brscm95nay31xa1c02n1w144gg9hm8pxwa9sfnis0x5dj2nkrb7"))))
+ (build-system qt-build-system)
+ (arguments
+ '(#:configure-flags (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
+ (native-inputs
+ `(("extra-cmake-modules" ,extra-cmake-modules)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("giflib" ,giflib)
+ ("karchive" ,karchive)
+ ("kdnssd" ,kdnssd)
+ ("libmicrohttpd" ,libmicrohttpd)
+ ("libsodium" ,libsodium)
+ ("libvpx" ,libvpx)
+ ("libxi" ,libxi)
+ ;("miniupnpc" ,miniupnpc) ;; TODO segfaults for some reason
+ ("qtbase" ,qtbase)
+ ("qtkeychain" ,qtkeychain)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtsvg" ,qtsvg)
+ ("qtx11extras" ,qtx11extras)))
+ (home-page "https://drawpile.net")
+ (synopsis "Collaborative drawing program")
+ (description
+"Drawpile is a drawing program that lets you share the canvas with other users
+in real time.
+
+Some feature highlights:
+@itemize
+@item Shared canvas using the built-in server or a dedicated server
+@item Record, play back and export drawing sessions
+@item Simple animation support
+@item Layers and blending modes
+@item Text layers
+@item Supports pressure sensitive Wacom tablets
+@item Built-in chat
+@item Supports OpenRaster file format
+@item Encrypted connections using SSL
+@item Automatic port forwarding with UPnP
+@end itemize")
+ (license license:gpl3+)))
--
2.28.0
O
O
Oleg Pykhalov wrote on 13 Aug 2020 10:08
(name . raingloom)(address . raingloom@riseup.net)(address . 42725-done@debbugs.gnu.org)
87bljfhssq.fsf@gmail.com
Hi,

Apologies for delay and thank you for the patch!

Pushed to master as 9ac2a4ee3424dd216b1b67056968e0585197952a with
following changes:
Toggle diff (57 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index dabd297c40..c7fefbd57d 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1439,15 +1439,15 @@ Automated palette selection is supported.")
(package
(name "drawpile")
(version "2.1.17")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://github.com/drawpile/Drawpile/archive/"
- version
- ".tar.gz"))
- (sha256
- (base32
- "0brscm95nay31xa1c02n1w144gg9hm8pxwa9sfnis0x5dj2nkrb7"))))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/drawpile/Drawpile")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08w8vad8pw4a8kkshys1kd2kjvzpj62klxxxp904rx0qazw5hl80"))))
(build-system qt-build-system)
(arguments
'(#:configure-flags (list "-DTESTS=ON" "-DTOOLS=ON" "-DKIS_TABLET=ON")))
@@ -1462,7 +1462,7 @@ Automated palette selection is supported.")
("libsodium" ,libsodium)
("libvpx" ,libvpx)
("libxi" ,libxi)
- ;("miniupnpc" ,miniupnpc) ;; TODO segfaults for some reason
+ ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
("qtbase" ,qtbase)
("qtkeychain" ,qtkeychain)
("qtmultimedia" ,qtmultimedia)
@@ -1470,9 +1470,8 @@ Automated palette selection is supported.")
("qtx11extras" ,qtx11extras)))
(home-page "https://drawpile.net")
(synopsis "Collaborative drawing program")
- (description
-"Drawpile is a drawing program that lets you share the canvas with other users
-in real time.
+ (description "Drawpile is a drawing program that allows share the canvas
+with other users in real time.
Some feature highlights:
@itemize
@@ -1486,5 +1485,5 @@ Some feature highlights:
@item Supports OpenRaster file format
@item Encrypted connections using SSL
@item Automatic port forwarding with UPnP
-@end itemize")
+@end itemize\n")
(license license:gpl3+)))
Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl809PUACgkQFn+OpQAa
+pyxeQ/+Ih44Eo875QLNttob1dk8FAncl6IwRaMjYoUhQsEbOYfOF5wN9HkG6Zl5
D94OI4FoDfdUNRMX6KHqe/vVhVee2YvEUZIh5BF1Dj+4lBVDEtOyvv3TLetQWWUR
dpa+m8Yu7KT/WxlsI2462hIZ/UDO0zkldG4Jrx1SypeUrFLVMLjVwSXJTtx5EmQx
oyUZVhqVeU9N1+MtJAtsiiMDO3zEOmjQ37t2mQ7uR4xSt6isSX5cgHz0BzzYQ2eV
LlH5bEIJRpl8y7Vo6fAcBI5LNwLeP/T7UYA5vf0Sb4cy0VX7ZDFtU5JSlHgRc57o
Tpp3F0mxI9jYj1zSkPwPfA2fhHNJdeSjEn/2kOrIl39fJXUL359R2I5aBav4Q1ox
V1XME1iwHl+i1X2a+Q8q0DVsr1Ek+XxZViDhThcwCLHv05gLVYGeDsWhHYcYA0xc
R1C9DOTQeM9Ht/RutZLsI3NWhhWQeq28JHvs/1WSGyIa/kZPpYqISU2tHPzkNC3b
WKOAbuTSraQl9v/+BnU0g8M85pKHF3s9VLaw5Uk9Cts+w0xGuU9inG8wI8/kaQMX
X5pIP63R4GDPfSpjyOXClJAuYrVUzbDHhF0bbeBAMzM1UlhdJYbr9PTcLsc+BD9u
bj6bLGhy40ASbTSja7ug4MhVBJ/fyU/QZ194HDpQN6qFujkMggY=
=0xs1
-----END PGP SIGNATURE-----

Closed
?