Subject: [bug#29574] Fwd: [PATCH] Add Krita to guix

From: Mark Meyer <[email-masked]>
Date: Mon, 11 Dec 2017 01:29:18 +0100

Hi Kei,
Poppler was an easy target, it just pointed to the wrong package. JPEG
requires some more packaging and EXR some thought. Meanwhile the
attached patch should be ok.

Cheers, Mark

On Sun, Dec 10, 2017, at 20:32, Kei Kebreau wrote:
> Mark Meyer <[email-masked]> writes:
> 
> > On Tue, Dec 5, 2017, at 02:26, Mark Meyer wrote:
> >> Second  try.
> >> 
> >> I disabled all tests, since these required an X11 display to be present.
> >> It's running now. I created a new file and saved the output. Looks good.
> >> 
> >> Please find the patch attached.
> >> 
> >> Lints fine, but I didn't test if this is reproducible, since the build
> >> is taking a very long time (even with all tests disabled).
> >> 
> >> Cheers, Mark
> >> 
> >> -- 
> >>   Mark Meyer
> >>   [email-masked]
> 
> Hi Mark,
> 
> I built this package twice and it is reproducible! I've moved some
> inputs to native-inputs in the attached patch because they didn't show
> up as requisites for krita (i.e. I ran 'guix gc -R
> /gnu/store/...-krita-3.3.2.1'
> to find this out).
> 
> Please tell me if this build works properly for you as it seems to for
> me.
> 
> Thanks,
> Kei
> 
> Email had 2 attachments:
> + 0001-gnu-Add-krita.patch
>   5k (text/plain)
> + signature.asc
>   1k (application/pgp-signature)

-- 
  Mark Meyer
  [email-masked]
From 341c2de5b922e6062e9a65ea88cdfcc6062819e6 Mon Sep 17 00:00:00 2001
From: Mark Meyer <[email-masked]>
Date: Tue, 5 Dec 2017 00:52:42 +0100
Subject: [PATCH] * gnu/packages/kde.scm (krita): Add new variable.

---
 gnu/packages/kde.scm | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 84 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index 59271ebee..a384626c0 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2016, 2017 Thomas Danckaert <[email-masked]>
+;;; Copyright © 2017 Mark Meyer <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,18 +24,29 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages apr)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages maths)
+  #:use-module (gnu packages pdf)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages photo)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages qt)
-  #:use-module (gnu packages version-control))
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xorg))
 
 (define-public kdevelop
   (package
@@ -220,6 +232,77 @@ for some KDevelop language plugins (Ruby, PHP, CSS...).")
 plugins, as well as code to create plugins, or complete applications.")
     (license license:gpl3+)))
 
+(define-public krita
+  (package
+    (name "krita")
+    (version "3.3.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kde/stable/krita/"
+                    "3.3.2/" name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0i3l27cfi1h486m74xf4ynk0pwx32xaqraa91a0g1bpj1jxf2mg5"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list "-DBUILD_TESTING=OFF" "-DKDE4_BUILD_TESTS=OFF"
+             (string-append "-DWITH_FFTW3="
+                            (assoc-ref %build-inputs "fftw"))
+             (string-append "-DWITH_GSL="
+                            (assoc-ref %build-inputs "gsl"))
+             (string-append "-DWITH_LibRaw="
+                            (assoc-ref %build-inputs "libraw"))
+             (string-append "-DWITH_TIFF="
+                            (assoc-ref %build-inputs "libtiff")))))
+    (native-inputs
+     `(("curl" ,curl)
+       ("eigen" ,eigen)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("gettext-minimal" ,gettext-minimal)
+       ("kitemmodels" ,kitemmodels)
+       ("qwt" ,qwt)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtx11extras" ,qtx11extras)
+       ("qtsvg" ,qtsvg)
+       ("karchive" ,karchive)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kcrash" ,kcrash)
+       ("kguiaddons" ,kguiaddons)
+       ("ki18n" ,ki18n)
+       ("kiconthemes" ,kiconthemes)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kxmlgui" ,kxmlgui)
+       ("boost" ,boost)
+       ("exiv2" ,exiv2)
+       ("lcms" ,lcms)
+       ("libpng" ,libpng)
+       ("zlib" ,zlib)
+       ("libx11" ,libx11)
+       ("libxcb" ,libxcb)
+       ("libxi" ,libxi)
+       ("fftw" ,fftw)
+       ("gsl" ,gsl)
+       ("poppler-qt5" ,poppler-qt5)
+       ("libraw" ,libraw)
+       ("libtiff" ,libtiff)
+       ("perl" ,perl)))
+    (home-page "https://krita.org")
+    (synopsis "Digital painting application")
+    (description
+     "A digital image editor, primarily aimed at digital painting and animation.")
+    (license license:gpl2+)))
+
 (define-public libkomparediff2
   (package
     (name "libkomparediff2")
-- 
2.15.0