[bug#34572] Add Drawpile

Message ID E1gw43s-0007Fe-8u@rmmprod05.runbox
State Accepted
Headers show
Series [bug#34572] Add Drawpile | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

pkill9 Feb. 19, 2019, 11:59 a.m. UTC
Drawpile is a collaborative drawing program - https://drawpile.net

Comments

Ricardo Wurmus Feb. 20, 2019, 9:01 p.m. UTC | #1
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?

Patch

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(+)

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