Subject: Improve Claws-Mail

From: Raghav Gururajan <[email-masked]>
Date: Wed, 17 Feb 2021 01:52:37 -0500

From a8e3b904e398321e039a218425621fe50f6f463e Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 17 Feb 2021 00:05:57 -0500
Subject: [PATCH 1/4] gnu: claws-mail: Add some comments.

* gnu/packages/mail.scm (claws-mail): Add some comments.
---
 gnu/packages/mail.scm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 2bd376a1a1..1cb68ddf92 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1557,20 +1557,20 @@ compresses it.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("bogofilter" ,bogofilter)
+     `(("bogofilter" ,bogofilter)      ; For Bogofilter plugin support
        ("curl" ,curl)
        ("dbus-glib" ,dbus-glib)
-       ("enchant" ,enchant)
+       ("enchant" ,enchant)             ; For spell-checker support
        ("expat" ,expat)
        ("ghostscript" ,ghostscript)
        ("hicolor-icon-theme" ,hicolor-icon-theme)
-       ("gnupg" ,gnupg)
-       ("gnutls" ,gnutls)
-       ("gpgme" ,gpgme)
+       ("gnupg" ,gnupg)                 ; For GnuPG support
+       ("gnutls" ,gnutls)               ; For SSL support
+       ("gpgme" ,gpgme)                 ; For GnuPG support
        ("gtk" ,gtk+-2)
        ("libarchive" ,libarchive)
-       ("libcanberra" ,libcanberra)
-       ("libetpan" ,libetpan)
+       ("libcanberra" ,libcanberra) ; For sound notification support
+       ("libetpan" ,libetpan)           ; For IMAP4 support
        ("libical" ,libical)
        ("libnotify" ,libnotify)
        ("libsm" ,libsm)
-- 
2.30.1

From cd135df5ed7cd315cd3101725513cb1733c65879 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 17 Feb 2021 00:12:13 -0500
Subject: [PATCH 2/4] gnu: claws-mail: Disable static libraries.

* gnu/packages/mail.scm (claws-mail) [arguments]
<#:configure-flags>: Add --disable-static.
---
 gnu/packages/mail.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 1cb68ddf92..793df24404 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1536,6 +1536,7 @@ compresses it.")
     (arguments
      `(#:configure-flags
        (list
+        "--disable-static"
         "--enable-gnutls"
         "--enable-pgpmime-plugin"
         "--enable-enchant"
-- 
2.30.1

From 2c76ff28015f19075a6574b285679bb92f8e1a7a Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 17 Feb 2021 00:20:42 -0500
Subject: [PATCH 3/4] gnu: claws-mail: Remove obsolete configure flags.

Remove these flags that are applied by default.

* gnu/packages/mail.scm (claws-mail) [arguments]<#:configure-flags>:
Remove --enable-gnutls, --enable-pgpmime-plugin, --enable-enchant,
and --enable-ldap.
---
 gnu/packages/mail.scm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 793df24404..a140f2b9e5 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1536,11 +1536,7 @@ compresses it.")
     (arguments
      `(#:configure-flags
        (list
-        "--disable-static"
-        "--enable-gnutls"
-        "--enable-pgpmime-plugin"
-        "--enable-enchant"
-        "--enable-ldap")
+        "--disable-static")
        #:make-flags
        ;; Disable updating icon cache since it's done by the profile hook.
        ;; Conflict with other packages in the profile would be inevitable
-- 
2.30.1

From dce2327c4ccc73c7d4efa81352e27e04ee72c28e Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 17 Feb 2021 01:23:18 -0500
Subject: [PATCH 4/4] gnu: claws-mail: Add missing dependencies for additional
 functionalities.

* gnu/packages/mail.scm (claws-mail) [native-inputs]: Add bison,
flex, gettext-minimal, and gobject-introspection.
[inputs]: Add aspell, cairo, compface, dbus, fontconfig, glib,
glib-networking, gdk-pixbuf+svg, libcanberra-gtk, libgdata,
gumbo-parser, libindicator, librsvg, libsoup, ytnef, nettle,
network-manager, openldap, poppler, python, and python2-pygtk.
---
 gnu/packages/mail.scm | 43 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 40 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index a140f2b9e5..90daa15d6a 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -82,6 +82,7 @@
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages enchant)
   #:use-module (gnu packages file)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gdb)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
@@ -94,6 +95,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages kerberos)
@@ -109,11 +111,13 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages nettle)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages ninja)
   #:use-module (gnu packages openldap)
   #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages perl-web)
@@ -1552,29 +1556,62 @@ compresses it.")
                 (string-append (assoc-ref inputs "mime-info")
                                "/share/mime/globs"))))))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("bison" ,bison)
+       ("flex" ,flex)
+       ("gettext" ,gettext-minimal)
+       ("gobject-introspection" ,gobject-introspection)
+       ("pkg-config" ,pkg-config)))
     (inputs
-     `(("bogofilter" ,bogofilter)      ; For Bogofilter plugin support
+     `(("aspell" ,aspell)         ; For spell-checker support
+       ("bogofilter" ,bogofilter) ; For Bogofilter plugin support
+       ;; TODO: For Bsfilter plugin support
+       ;; ("bsfilter" ,bsfilter)
+       ("cairo" ,cairo)
+       ("compface" ,compface)           ; For X-Face support
        ("curl" ,curl)
+       ("dbus" ,dbus)        ; For automatic offline switching support
        ("dbus-glib" ,dbus-glib)
        ("enchant" ,enchant)             ; For spell-checker support
        ("expat" ,expat)
+       ("fontconfig" ,fontconfig)
        ("ghostscript" ,ghostscript)
+       ("glib" ,glib)
+       ("glib-networking" ,glib-networking)
        ("hicolor-icon-theme" ,hicolor-icon-theme)
+       ("gdk-pixbuf" ,gdk-pixbuf+svg)
        ("gnupg" ,gnupg)                 ; For GnuPG support
        ("gnutls" ,gnutls)               ; For SSL support
        ("gpgme" ,gpgme)                 ; For GnuPG support
        ("gtk" ,gtk+-2)
+       ;; TODO: For J-Pilot support.
+       ;; ("j-pilot" ,j-pilot)
+       ;; TODO: For lcdproc feature of Notification plugin.
+       ;; ("lcdproc" ,lcdproc)
        ("libarchive" ,libarchive)
-       ("libcanberra" ,libcanberra) ; For sound notification support
+       ("libcanberra" ,libcanberra)   ; For sound notification support
+       ("libcanberra-gtk" ,libcanberra/gtk+-2)
        ("libetpan" ,libetpan)           ; For IMAP4 support
+       ("libgdata" ,libgdata)           ; For GData plugin support
+       ("libgumbo" ,gumbo-parser)       ; For LiteHTML support
        ("libical" ,libical)
+       ("libindicator" ,libindicator)   ; For Notification plugin
        ("libnotify" ,libnotify)
+       ("librsvg" ,librsvg)             ; For SVG support
        ("libsm" ,libsm)
+       ("libsoup" ,libsoup)
        ("libxml2" ,libxml2)
+       ("libytnef" ,ytnef)              ; For TNEF support
+       ("nettle" ,nettle)
+       ("network-manager" ,network-manager) ; For NM support
+       ("openldap" ,openldap)               ; For LDAP support
        ("perl" ,perl)
+       ("poppler-glib" ,poppler)       ; For PDF Viewer plugin support
+       ("python" ,python)
        ("python-2" ,python-2)
+       ("python2-pygtk" ,python2-pygtk)
        ("mime-info" ,shared-mime-info)
+       ;; TODO: For SpamAssassin plugin support.
+       ;; ("spamassassin" ,spamassassin)
        ("startup-notification" ,startup-notification)))
     (synopsis "GTK-based Email client")
     (description "Claws-Mail is an email client (and news reader) based on GTK+.
-- 
2.30.1