Add Drawpile

  • Done
  • quality assurance status badge
Details
4 participants
  • Maxim Cournoyer
  • Tobias Geerinckx-Rice
  • pkill9
  • Ricardo Wurmus
Owner
unassigned
Submitted by
pkill9
Severity
normal

Debbugs page

pkill9 wrote 6 years ago
(name . guix-patches)(address . guix-patches@gnu.org)
E1gw43s-0007Fe-8u@rmmprod05.runbox
Drawpile is a collaborative drawing program - https://drawpile.net
From b97d29def74a08af396b562962d558b689b3fc5e Mon Sep 17 00:00:00 2001
From: Pkill -9 <pkill9@runbox.com>
Date: Tue, 19 Feb 2019 11:58:09 +0000
Subject: [PATCH] gnu: Add drawpile.

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

Toggle diff (63 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index bf4cc89b0..1d4a848d4 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -51,6 +52,7 @@
#: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 multiprecision)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
@@ -856,3 +858,40 @@ your terminal. It comes bundled with predefined styles:
look. The result can be uploaded on any web server without additional
requirements.")
(license license:gpl2+)))
+
+(define-public drawpile
+ (package
+ (name "drawpile")
+ (version "2.0.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://drawpile.net/files/src/drawpile-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0h018rxhc0lwpqwmlihalz634nd0xaafk4p2b782djjd87irnjpk"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("qttools" ,qttools)))
+ (inputs
+ `(("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtcolorwidgets" ,qtcolorwidgets)
+ ("karchive" ,karchive)
+ ("giflib" ,giflib) ; optional
+ ("kdnssd" ,kdnssd) ; optional
+ ("miniupnpc" ,(@ (gnu packages upnp) miniupnpc)) ; optional
+ ("libmicrohttpd" ,(@ (gnu packages gnunet) libmicrohttpd)) ; optional
+ ("libsodium" ,(@ (gnu packages crypto) libsodium)))) ; optional
+ (arguments
+ `(#:configure-flags (list "-DTESTS=on" "-DCMAKE_BUILD_TYPE=Release" "-DTOOLS=on"
+ (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
+ (assoc-ref %build-inputs "qtcolorwidgets")
+ "/lib/libQtColorWidgets-Qt52.so"))))
+ (home-page "https://drawpile.net")
+ (synopsis "Collaborative drawing")
+ (description "Drawpile is a collaborative drawing program that allows
+multiple users to sketch on the same canvas simultaneously.")
+ (license license:gpl3)))
--
2.20.1
Ricardo Wurmus wrote 6 years ago
(address . pkill9@runbox.com)(address . 34572@debbugs.gnu.org)
878sya5g45.fsf@elephly.net
Hi pkill9,

Toggle quote (2 lines)
> * gnu/packages/graphics.scm (drawpile): New variable.

Thank you for your patch.

[…]
Toggle quote (9 lines)
> +(define-public drawpile
> + (package
> + (name "drawpile")
> + (version "2.0.11")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://drawpile.net/files/src/drawpile-" version ".tar.gz"))

Please break this line.

Toggle quote (19 lines)
> + (sha256
> + (base32
> + "0h018rxhc0lwpqwmlihalz634nd0xaafk4p2b782djjd87irnjpk"))))
> + (build-system cmake-build-system)
> + (native-inputs
> + `(("pkg-config" ,pkg-config)
> + ("qttools" ,qttools)))
> + (inputs
> + `(("qtbase" ,qtbase)
> + ("qtsvg" ,qtsvg)
> + ("qtmultimedia" ,qtmultimedia)
> + ("qtcolorwidgets" ,qtcolorwidgets)
> + ("karchive" ,karchive)
> + ("giflib" ,giflib) ; optional
> + ("kdnssd" ,kdnssd) ; optional
> + ("miniupnpc" ,(@ (gnu packages upnp) miniupnpc)) ; optional
> + ("libmicrohttpd" ,(@ (gnu packages gnunet) libmicrohttpd)) ; optional
> + ("libsodium" ,(@ (gnu packages crypto) libsodium)))) ; optional

Please don’t use these inline module references.

Toggle quote (6 lines)
> + (arguments
> + `(#:configure-flags (list "-DTESTS=on" "-DCMAKE_BUILD_TYPE=Release" "-DTOOLS=on"
> + (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
> + (assoc-ref %build-inputs "qtcolorwidgets")
> + "/lib/libQtColorWidgets-Qt52.so"))))

Please put “(list” on a new line and then break after every item, so
that you can add comments as to why these flags are required.

I don’t think you need "-DCMAKE_BUILD_TYPE=Release" as we’re building
with “RelWithDebInfo” by default.

Toggle quote (3 lines)
> + (home-page "https://drawpile.net")
> + (synopsis "Collaborative drawing")

“Collaborative drawing program” would be better.

Toggle quote (2 lines)
> + (license license:gpl3)))

This looks like gpl3+. See for example:


Please check the licenses more carefully.

Could you please send an updated patch?

--
Ricardo
pkill9 wrote 6 years ago
(name . Ricardo Wurmus)(address . rekado@elephly.net)(name . 34572)(address . 34572@debbugs.gnu.org)
E1gwnpA-0005aL-Mm@rmmprod05.runbox
Hi Rekado, thanks for looking at this patch. I've updated it.

Toggle quote (2 lines)
> Please don’t use these inline module references.

Sorry, I forgot to remove them (I'm moving my package definitions to Guix upstream which have the modules inline).

Toggle quote (2 lines)
> Please check the licenses more carefully.

Will do.


On Wed, 20 Feb 2019 22:01:30 +0100, Ricardo Wurmus <rekado@elephly.net> wrote:

Toggle quote (69 lines)
>
> Hi pkill9,
>
> > * gnu/packages/graphics.scm (drawpile): New variable.
>
> Thank you for your patch.
>
> […]
> > +(define-public drawpile
> > + (package
> > + (name "drawpile")
> > + (version "2.0.11")
> > + (source
> > + (origin
> > + (method url-fetch)
> > + (uri (string-append "https://drawpile.net/files/src/drawpile-" version ".tar.gz"))
>
> Please break this line.
>
> > + (sha256
> > + (base32
> > + "0h018rxhc0lwpqwmlihalz634nd0xaafk4p2b782djjd87irnjpk"))))
> > + (build-system cmake-build-system)
> > + (native-inputs
> > + `(("pkg-config" ,pkg-config)
> > + ("qttools" ,qttools)))
> > + (inputs
> > + `(("qtbase" ,qtbase)
> > + ("qtsvg" ,qtsvg)
> > + ("qtmultimedia" ,qtmultimedia)
> > + ("qtcolorwidgets" ,qtcolorwidgets)
> > + ("karchive" ,karchive)
> > + ("giflib" ,giflib) ; optional
> > + ("kdnssd" ,kdnssd) ; optional
> > + ("miniupnpc" ,(@ (gnu packages upnp) miniupnpc)) ; optional
> > + ("libmicrohttpd" ,(@ (gnu packages gnunet) libmicrohttpd)) ; optional
> > + ("libsodium" ,(@ (gnu packages crypto) libsodium)))) ; optional
>
> Please don’t use these inline module references.
>
> > + (arguments
> > + `(#:configure-flags (list "-DTESTS=on" "-DCMAKE_BUILD_TYPE=Release" "-DTOOLS=on"
> > + (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
> > + (assoc-ref %build-inputs "qtcolorwidgets")
> > + "/lib/libQtColorWidgets-Qt52.so"))))
>
> Please put “(list” on a new line and then break after every item, so
> that you can add comments as to why these flags are required.
>
> I don’t think you need "-DCMAKE_BUILD_TYPE=Release" as we’re building
> with “RelWithDebInfo” by default.
>
> > + (home-page "https://drawpile.net")
> > + (synopsis "Collaborative drawing")
>
> “Collaborative drawing program” would be better.
>
> > + (license license:gpl3)))
>
> This looks like gpl3+. See for example:
>
> https://github.com/drawpile/Drawpile/blob/master/src/server/initsys_systemd.cpp#L9
>
> Please check the licenses more carefully.
>
> Could you please send an updated patch?
>
> --
> Ricardo
From 3003c82cf97e129e177011e34b5a208cf6bbf188 Mon Sep 17 00:00:00 2001
From: Pkill -9 <pkill9@runbox.com>
Date: Thu, 21 Feb 2019 12:47:37 +0000
Subject: [PATCH] gnu: Add drawpile.

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

Toggle diff (89 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index bf4cc89b0..07f801ef0 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,7 @@
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crypto) ; libsodium
#:use-module (gnu packages documentation)
#:use-module (gnu packages flex)
#:use-module (gnu packages fonts)
@@ -45,12 +47,14 @@
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnunet) ; libmicrohttpd
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages haskell)
#: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 multiprecision)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
@@ -64,6 +68,7 @@
#:use-module (gnu packages readline)
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
+ #:use-module (gnu packages upnp)
#:use-module (gnu packages video)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -856,3 +861,43 @@ your terminal. It comes bundled with predefined styles:
look. The result can be uploaded on any web server without additional
requirements.")
(license license:gpl2+)))
+
+(define-public drawpile
+ (package
+ (name "drawpile")
+ (version "2.0.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://drawpile.net/files/src/"
+ "drawpile-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0h018rxhc0lwpqwmlihalz634nd0xaafk4p2b782djjd87irnjpk"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("qttools" ,qttools)))
+ (inputs
+ `(("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtcolorwidgets" ,qtcolorwidgets)
+ ("karchive" ,karchive)
+ ("giflib" ,giflib) ; optional
+ ("kdnssd" ,kdnssd) ; optional
+ ("miniupnpc" ,miniupnpc) ; optional
+ ("libmicrohttpd" ,libmicrohttpd) ; optional
+ ("libsodium" ,libsodium))) ; optional
+ (arguments
+ `(#:configure-flags
+ (list "-DTESTS=on" ; build unit tests.
+ "-DTOOLS=on" ; build dprec2txt command line tool.
+ (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
+ (assoc-ref %build-inputs "qtcolorwidgets")
+ "/lib/libQtColorWidgets-Qt52.so"))))
+ (home-page "https://drawpile.net")
+ (synopsis "Collaborative drawing program")
+ (description "Drawpile is a collaborative drawing program that allows
+multiple users to sketch on the same canvas simultaneously.")
+ (license license:gpl3+)))
--
2.20.1
Tobias Geerinckx-Rice wrote 6 years ago
(address . pkill9@runbox.com)(name . 34572)(address . 34572@debbugs.gnu.org)
87va1dutti.fsf@nckx
Pkill -9,

Thanks for this patch, and your many others.

pkill9 wrote:
Toggle quote (3 lines)
> + #:use-module (gnu packages crypto) ; libsodium
> + #:use-module (gnu packages gnunet) ; libmicrohttpd

In my experience, what little value such comments add is quickly
lost. Anyone adding new inputs will not update (or even notice)
them.

Toggle quote (6 lines)
> + ("giflib" ,giflib) ; optional
> + ("kdnssd" ,kdnssd) ; optional
> + ("miniupnpc" ,miniupnpc) ; optional
> + ("libmicrohttpd" ,libmicrohttpd) ; optional
> + ("libsodium" ,libsodium))) ; optional

Same here: nothing wrong with these, I guess, but *many* package
dependencies are optionally detected at build time and this isn't
usually pointed out unless there's something more interesting
going on.

Toggle quote (4 lines)
> + (arguments
> + `(#:configure-flags
> + (list "-DTESTS=on" ; build unit tests.

General remark: no full stop after inline comments.

;; Foo bar.
(foo bar) ; foo bar

Toggle quote (7 lines)
> + "-DTOOLS=on" ; build dprec2txt command line tool.
> + (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
> + (assoc-ref %build-inputs
> "qtcolorwidgets")
> +
> "/lib/libQtColorWidgets-Qt52.so"))))

What about using FIND-FILES "\*.so$" here instead of hard-coding
"52"? Overkill?

Kind regards,

T G-R
pkill9 wrote 6 years ago
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(name . 34572)(address . 34572@debbugs.gnu.org)
E1gx5Fw-0005PI-Mt@rmmprod05.runbox
Thanks Tobias, I removed those inline comments and removed the full stops after the other inline comments.

Haven't changed the qtcolorwidgets library config flag for now, I think drawpile upstream needs to improve the code that looks for qtcolorwidgets (https://github.com/drawpile/Drawpile/blob/master/config/FindQtColorWidgets.cmake)but I don't know how. Hardcoding the path isn't ideal but I'll leave it for now.

On Thu, 21 Feb 2019 14:58:33 +0100, Tobias Geerinckx-Rice <me@tobias.gr> wrote:

Toggle quote (45 lines)
> Pkill -9,
>
> Thanks for this patch, and your many others.
>
> pkill9 wrote:
> > + #:use-module (gnu packages crypto) ; libsodium
> > + #:use-module (gnu packages gnunet) ; libmicrohttpd
>
> In my experience, what little value such comments add is quickly
> lost. Anyone adding new inputs will not update (or even notice)
> them.
>
> > + ("giflib" ,giflib) ; optional
> > + ("kdnssd" ,kdnssd) ; optional
> > + ("miniupnpc" ,miniupnpc) ; optional
> > + ("libmicrohttpd" ,libmicrohttpd) ; optional
> > + ("libsodium" ,libsodium))) ; optional
>
> Same here: nothing wrong with these, I guess, but *many* package
> dependencies are optionally detected at build time and this isn't
> usually pointed out unless there's something more interesting
> going on.
>
> > + (arguments
> > + `(#:configure-flags
> > + (list "-DTESTS=on" ; build unit tests.
>
> General remark: no full stop after inline comments.
>
> ;; Foo bar.
> (foo bar) ; foo bar
>
> > + "-DTOOLS=on" ; build dprec2txt command line tool.
> > + (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
> > + (assoc-ref %build-inputs
> > "qtcolorwidgets")
> > +
> > "/lib/libQtColorWidgets-Qt52.so"))))
>
> What about using FIND-FILES "\*.so$" here instead of hard-coding
> "52"? Overkill?
>
> Kind regards,
>
> T G-R
From 916968e5f419e339aacd3b91d9e15a39ae87f9db Mon Sep 17 00:00:00 2001
From: Pkill -9 <pkill9@runbox.com>
Date: Fri, 22 Feb 2019 07:23:39 +0000
Subject: [PATCH] gnu: Add drawpile.

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

Toggle diff (89 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index bf4cc89b0..ae30607cb 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,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 documentation)
#:use-module (gnu packages flex)
#:use-module (gnu packages fonts)
@@ -45,12 +47,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)
#: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 multiprecision)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
@@ -64,6 +68,7 @@
#:use-module (gnu packages readline)
#:use-module (gnu packages sdl)
#:use-module (gnu packages swig)
+ #:use-module (gnu packages upnp)
#:use-module (gnu packages video)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -856,3 +861,43 @@ your terminal. It comes bundled with predefined styles:
look. The result can be uploaded on any web server without additional
requirements.")
(license license:gpl2+)))
+
+(define-public drawpile
+ (package
+ (name "drawpile")
+ (version "2.0.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://drawpile.net/files/src/"
+ "drawpile-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0h018rxhc0lwpqwmlihalz634nd0xaafk4p2b782djjd87irnjpk"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("qttools" ,qttools)))
+ (inputs
+ `(("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtcolorwidgets" ,qtcolorwidgets)
+ ("karchive" ,karchive)
+ ("giflib" ,giflib)
+ ("kdnssd" ,kdnssd)
+ ("miniupnpc" ,miniupnpc)
+ ("libmicrohttpd" ,libmicrohttpd)
+ ("libsodium" ,libsodium)))
+ (arguments
+ `(#:configure-flags
+ (list "-DTESTS=on" ; build unit tests
+ "-DTOOLS=on" ; build dprec2txt command line tool
+ (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
+ (assoc-ref %build-inputs "qtcolorwidgets")
+ "/lib/libQtColorWidgets-Qt52.so"))))
+ (home-page "https://drawpile.net")
+ (synopsis "Collaborative drawing program")
+ (description "Drawpile is a collaborative drawing program that allows
+multiple users to sketch on the same canvas simultaneously.")
+ (license license:gpl3+)))
--
2.20.1
Maxim Cournoyer wrote 4 years ago
Re: bug#34572: Add Drawpile
(address . pkill9@runbox.com)(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(name . 34572)(address . 34572-done@debbugs.gnu.org)
87zgtvjjbg.fsf_-_@gmail.com
Hello,

We now have drawpile 2.1.17 in Guix. It seems this patch failed between
the cracks. Sorry!

Closing.

Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 34572@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 34572
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help