Subject: [bug#44957] [PIDGIN]: v4

From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:37:19 -0500

Hi Danny!

> please, when enabling features, add one feature per patch here and mention the
> feature by name per patch.

Please find the revised patch attached with this email.

> Also, please keep in mind the issues raised in '"questionable changes" commits'
> mailing list thread.

Yes, I have not removed any comments or moved the fields around. I will 
soon be not doing cosmetic changes at all, as I am working on my OCD.

Regards,
RG.
>From e9abb81da9753026ed5e9228d91ccded74f3a161 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 30 Dec 2020 14:59:50 -0500
Subject: [PATCH 01/17] gnu: pidgin: Make some cosmetic changes.

* gnu/packages/messaging.scm (pidgin): Make some cosmetic changes.
---
 gnu/packages/messaging.scm | 57 +++++++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 1393843e57..4bee2ded23 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -527,14 +527,17 @@ authentication.")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://sourceforge/pidgin/Pidgin/"
-                           version "/pidgin-" version ".tar.bz2"))
+       (uri
+        (string-append "mirror://sourceforge/pidgin/Pidgin/"
+                       version "/pidgin-" version ".tar.bz2"))
        (sha256
         (base32 "13vdqj70315p9rzgnbxjp9c51mdzf1l4jg1kvnylc4bidw61air7"))
-       (patches (search-patches "pidgin-add-search-path.patch"
-                                ;; Remove the snippet and bootstrapping
-                                ;; native-inputs together with this patch.
-                                "pidgin-libnm.patch"))
+       (patches
+        (search-patches
+         "pidgin-add-search-path.patch"
+         ;; Remove the snippet and bootstrapping
+         ;; native-inputs together with this patch.
+         "pidgin-libnm.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -549,7 +552,6 @@ authentication.")
        ("gconf" ,gconf)
        ("python" ,python-2)
        ("doxygen" ,doxygen)
-
        ;; For bootstrapping after applying pidgin-libnm.patch.
        ("autoconf" ,autoconf)
        ("automake" ,automake)
@@ -582,30 +584,33 @@ authentication.")
        ("startup-notification" ,startup-notification)))
     (arguments
      `(#:configure-flags
-       (list "--disable-gtkspell"
-             "--disable-tcl"
-             "--disable-meanwhile"
-             "--disable-vv"  ; XXX remove when we have farstream and gstreamer
-             "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
-             "--enable-cyrus-sasl"
-             (string-append "--with-ncurses-headers="
-                            (assoc-ref %build-inputs "ncurses")
-                            "/include"))))
+       (list
+        "--disable-gtkspell"
+        "--disable-tcl"
+        "--disable-meanwhile"
+        "--disable-vv" ; XXX remove when we have farstream and gstreamer
+        "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
+        "--enable-cyrus-sasl"
+        (string-append "--with-ncurses-headers="
+                       (assoc-ref %build-inputs "ncurses")
+                       "/include"))))
     (native-search-paths
-     (list (search-path-specification
-            (variable "PURPLE_PLUGIN_PATH")
-            (files (list (string-append "lib/purple-"
-                                        (version-major version))
-                         "lib/pidgin")))))
+     (list
+      (search-path-specification
+       (variable "PURPLE_PLUGIN_PATH")
+       (files
+        (list
+         (string-append "lib/purple-"
+                        (version-major version))
+         "lib/pidgin")))))
     (home-page "https://www.pidgin.im/")
     (synopsis "Graphical multi-protocol instant messaging client")
-    (description
-     "Pidgin is a modular instant messaging client that supports many popular
-chat protocols.")
+    (description "Pidgin is a modular instant messaging client that supports
+many popular chat protocols.")
     (license
      (list
-      license:gpl2+    ; Most of the code
-      license:lgpl2.1  ; GG protocol plugin (libpurple/protocols/gg/lib)
+      license:gpl2+   ; Most of the code
+      license:lgpl2.1 ; GG protocol plugin (libpurple/protocols/gg/lib)
       license:lgpl2.0+ ; OSCAR protocol plugin (libpurple/protocols/oscar)
       ;; The following licenses cover the zephyr protocol plugin:
       (license:non-copyleft
-- 
2.29.2

>From c15039b7fb7b6a5daa29340f1afd2cf550669134 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 30 Dec 2020 15:08:25 -0500
Subject: [PATCH 02/17] gnu: pidgin: Re-arrange inputs in alphabetical order.

* gnu/packages/messaging.scm (pidgin) [native-inputs]: Re-order.
[inputs]: Re-order.
---
 gnu/packages/messaging.scm | 44 ++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 4bee2ded23..759a432fb1 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -546,41 +546,39 @@ authentication.")
            #t))))
     (build-system glib-or-gtk-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("check" ,check-0.14)
-       ("intltool" ,intltool)
+     `(("autoconf" ,autoconf) ;; For bootstrap
+       ("automake" ,automake) ;; For bootstrap
+       ("check" ,check)
        ("gconf" ,gconf)
-       ("python" ,python-2)
-       ("doxygen" ,doxygen)
-       ;; For bootstrapping after applying pidgin-libnm.patch.
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)))
+       ("intltool" ,intltool)
+       ("libtool" ,libtool) ;; For bootstrap
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-2)))
     (inputs
-     `(("gtk+" ,gtk+-2)
-       ("libgcrypt" ,libgcrypt)
-       ("gnutls" ,gnutls)
+     `(("avahi" ,avahi)
        ("cyrus-sasl" ,cyrus-sasl)
        ("dbus" ,dbus)
        ("dbus-glib" ,dbus-glib)
-       ("python2-dbus" ,python2-dbus)
+       ;; farstream
+       ("gnutls" ,gnutls)
+       ;; gstreamer
+       ("gtk+" ,gtk+-2)
+       ;; gtkspell
+       ;; libgadu
+       ("libgcrypt" ,libgcrypt)
+       ("libice" ,libice)
        ("libidn" ,libidn)
        ("libltdl" ,libltdl)
+       ("libsm" ,libsm)
+       ;; libxephyr
        ("libxml2" ,libxml2)
-       ;; TODO: gstreamer: patches needed to support gstreamer-1.0 or later
-       ;; TODO: farstream
-       ;; TODO: meanwhile
-       ;; TODO: gtkspell
-       ;; TODO: libxephyr
-       ;; TODO: libgadu
+       ("libxscrnsaver" ,libxscrnsaver)
        ("libxslt" ,libxslt)
-       ("avahi" ,avahi)
+       ;; meanwhile
        ("ncurses" ,ncurses)
        ("network-manager" ,network-manager)
+       ("python2-dbus" ,python2-dbus)
        ("sqlite" ,sqlite)
-       ("libice" ,libice)
-       ("libsm" ,libsm)
-       ("libxscrnsaver" ,libxscrnsaver)
        ("startup-notification" ,startup-notification)))
     (arguments
      `(#:configure-flags
-- 
2.29.2

>From 9d305107a5395a8decae13425f1bea8b80eb489c Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 30 Dec 2020 23:57:17 -0500
Subject: [PATCH 03/17] gnu: pidgin: Add missing inputs.

These new inputs are referenced by the package but was missing in
the package definition. Some of these inputs might have been used
by the package indirectly via propagation from other inputs.

* gnu/packages/messaging.scm (pidgin) [native-inputs]: Add graphviz.
Move python-2 to ...
[inputs]: ... here. Add libgnt, libx11, libxext, nspr, nss, pango
and perl.
---
 gnu/packages/messaging.scm | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 759a432fb1..8c069c08cf 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -71,6 +71,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
@@ -87,6 +88,7 @@
   #:use-module (gnu packages mpd)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
+  #:use-module (gnu packages nss)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages photo)
@@ -549,37 +551,50 @@ authentication.")
      `(("autoconf" ,autoconf) ;; For bootstrap
        ("automake" ,automake) ;; For bootstrap
        ("check" ,check)
+       ("dot" ,graphviz)
        ("gconf" ,gconf)
        ("intltool" ,intltool)
        ("libtool" ,libtool) ;; For bootstrap
-       ("pkg-config" ,pkg-config)
-       ("python" ,python-2)))
+       ("pkg-config" ,pkg-config)))
     (inputs
      `(("avahi" ,avahi)
        ("cyrus-sasl" ,cyrus-sasl)
        ("dbus" ,dbus)
        ("dbus-glib" ,dbus-glib)
-       ;; farstream
+       ;; ("evolution-data-server" ,evolution-data-server)
+       ;; ("farstream" ,farstream)
        ("gnutls" ,gnutls)
-       ;; gstreamer
+       ;; ("gstreamer" ,gstreamer)
        ("gtk+" ,gtk+-2)
-       ;; gtkspell
-       ;; libgadu
+       ;; ("gtkspell2" ,gtkspell2)
+       ;; ("libgadu" ,libgadu)
        ("libgcrypt" ,libgcrypt)
+       ("libgnt" ,libgnt)
        ("libice" ,libice)
        ("libidn" ,libidn)
        ("libltdl" ,libltdl)
        ("libsm" ,libsm)
-       ;; libxephyr
+       ("libx11" ,libx11)
+       ("libxext" ,libxext)
        ("libxml2" ,libxml2)
        ("libxscrnsaver" ,libxscrnsaver)
        ("libxslt" ,libxslt)
-       ;; meanwhile
+       ;; ("libzephyr" ,libzephyr)
+       ;; ("meanwhile" ,meanwhile)
+       ;; ("mono" ,mono)
        ("ncurses" ,ncurses)
        ("network-manager" ,network-manager)
+       ("nspr" ,nspr)
+       ("nss" ,nss)
+       ("pango" ,pango)
+       ("perl" ,perl)
+       ("python" ,python-2)
        ("python2-dbus" ,python2-dbus)
+       ;; ("silc" ,silc-toolkit)
        ("sqlite" ,sqlite)
        ("startup-notification" ,startup-notification)))
+    (propagated-inputs
+     `(("glib" ,glib)))
     (arguments
      `(#:configure-flags
        (list
-- 
2.29.2

>From 2805e08eed9e3d60af0b0e949c24936cffdaa407 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:03:35 -0500
Subject: [PATCH 04/17] gnu: pidgin: Enable support for mono.

* gnu/packages/messaging.scm (pidgin) [inputs]: Add mono.
[arguments]<#:configure-flags>[--enable-mono]: New flag.
---
 gnu/packages/messaging.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 8c069c08cf..e422f27233 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -85,6 +85,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages man)
   #:use-module (gnu packages markup)
+  #:use-module (gnu packages mono)
   #:use-module (gnu packages mpd)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
@@ -581,7 +582,7 @@ authentication.")
        ("libxslt" ,libxslt)
        ;; ("libzephyr" ,libzephyr)
        ;; ("meanwhile" ,meanwhile)
-       ;; ("mono" ,mono)
+       ("mono" ,mono)
        ("ncurses" ,ncurses)
        ("network-manager" ,network-manager)
        ("nspr" ,nspr)
@@ -601,6 +602,7 @@ authentication.")
         "--disable-gtkspell"
         "--disable-tcl"
         "--disable-meanwhile"
+        "--enable-mono"
         "--disable-vv" ; XXX remove when we have farstream and gstreamer
         "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
         "--enable-cyrus-sasl"
-- 
2.29.2

>From 74e4c033ce86a1ad73d7d4bc59a1f53f5bd08ccf Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:05:14 -0500
Subject: [PATCH 05/17] gnu: pidgin: Enable meanwhile.

* gnu/packages/messaging.scm (pidgin) [inputs]: Add meanwhile.
[arguments]<#:configure-flags>[--disable-meanwhile]: Remove flag.
---
 gnu/packages/messaging.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index e422f27233..cd1d992897 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -581,7 +581,7 @@ authentication.")
        ("libxscrnsaver" ,libxscrnsaver)
        ("libxslt" ,libxslt)
        ;; ("libzephyr" ,libzephyr)
-       ;; ("meanwhile" ,meanwhile)
+       ("meanwhile" ,meanwhile)
        ("mono" ,mono)
        ("ncurses" ,ncurses)
        ("network-manager" ,network-manager)
@@ -601,7 +601,6 @@ authentication.")
        (list
         "--disable-gtkspell"
         "--disable-tcl"
-        "--disable-meanwhile"
         "--enable-mono"
         "--disable-vv" ; XXX remove when we have farstream and gstreamer
         "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
-- 
2.29.2

>From c02edbd0d1d13b866547c02813aa5a0f4faf13fc Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:07:24 -0500
Subject: [PATCH 06/17] gnu: pidgin: Enable CAP.

* gnu/packages/messaging.scm (pidgin) [arguments]<#:configure-flags>
[--enable-cap]: New flag.
---
 gnu/packages/messaging.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index cd1d992897..1fc117273d 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -600,6 +600,8 @@ authentication.")
      `(#:configure-flags
        (list
         "--disable-gtkspell"
+        ;; "--enable-gevolution"
+        "--enable-cap"
         "--disable-tcl"
         "--enable-mono"
         "--disable-vv" ; XXX remove when we have farstream and gstreamer
-- 
2.29.2

>From 6d356e247f922e17efe4b377b9324ee80f8b1ba2 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:09:56 -0500
Subject: [PATCH 07/17] gnu: pidgin: Enable SILC protocol support.

* gnu/packages/messaging.scm (pidgin) [inputs]: Add silc-toolkit.
---
 gnu/packages/messaging.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 1fc117273d..1484ce3c39 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -591,7 +591,7 @@ authentication.")
        ("perl" ,perl)
        ("python" ,python-2)
        ("python2-dbus" ,python2-dbus)
-       ;; ("silc" ,silc-toolkit)
+       ("silc" ,silc-toolkit)
        ("sqlite" ,sqlite)
        ("startup-notification" ,startup-notification)))
     (propagated-inputs
-- 
2.29.2

>From 43921e941819f949c4d04ab3420aa703c234157e Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:11:49 -0500
Subject: [PATCH 08/17] gnu: pidgin: Enable support for Tcl.

* gnu/packages/messaging.scm (pidgin) [inputs]: Add Tcl.
[arguments]<#:configure-flags>[--disable-tcl]: Remove flag.
[--with-tclconfig]: New flag.
---
 gnu/packages/messaging.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 1484ce3c39..b068c9c5d2 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -593,7 +593,8 @@ authentication.")
        ("python2-dbus" ,python2-dbus)
        ("silc" ,silc-toolkit)
        ("sqlite" ,sqlite)
-       ("startup-notification" ,startup-notification)))
+       ("startup-notification" ,startup-notification)
+       ("tcl" ,tcl)))
     (propagated-inputs
      `(("glib" ,glib)))
     (arguments
@@ -609,7 +610,10 @@ authentication.")
         "--enable-cyrus-sasl"
         (string-append "--with-ncurses-headers="
                        (assoc-ref %build-inputs "ncurses")
-                       "/include"))))
+                       "/include")
+        (string-append "--with-tclconfig="
+                       (assoc-ref %build-inputs "tcl")
+                       "/lib"))))
     (native-search-paths
      (list
       (search-path-specification
-- 
2.29.2

>From 2d041c74b2288f73a235f4e6b5b629013db96303 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:14:25 -0500
Subject: [PATCH 09/17] gnu: pidgin: Enable support for Tk.

* gnu/packages/messaging.scm (pidgin) [inputs]: Add tk.
[arguments]<#:configure-flags>[--with-tkconfig]: New flag.
---
 gnu/packages/messaging.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index b068c9c5d2..b28dcf329c 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -594,7 +594,8 @@ authentication.")
        ("silc" ,silc-toolkit)
        ("sqlite" ,sqlite)
        ("startup-notification" ,startup-notification)
-       ("tcl" ,tcl)))
+       ("tcl" ,tcl)
+       ("tk" ,tk)))
     (propagated-inputs
      `(("glib" ,glib)))
     (arguments
@@ -603,7 +604,6 @@ authentication.")
         "--disable-gtkspell"
         ;; "--enable-gevolution"
         "--enable-cap"
-        "--disable-tcl"
         "--enable-mono"
         "--disable-vv" ; XXX remove when we have farstream and gstreamer
         "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
@@ -613,6 +613,9 @@ authentication.")
                        "/include")
         (string-append "--with-tclconfig="
                        (assoc-ref %build-inputs "tcl")
+                       "/lib")
+        (string-append "--with-tkconfig="
+                       (assoc-ref %build-inputs "tk")
                        "/lib"))))
     (native-search-paths
      (list
-- 
2.29.2

>From 731b277ff17be54cd823898aaf8ac1f21965c606 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sun, 29 Nov 2020 17:30:04 -0500
Subject: [PATCH 10/17] gnu: pidgin: Upgrade to 2.14.1.

* gnu/packages/messaging.scm (pidgin) [version]: Modify.
[source]<origin>[sha256]: Modify base32.
[patches]<search-patches>[pidgin-libnm.patch]: Remove obsolete patch.
* gnu/packages/patches/pidgin-libnm.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Remove entry.
---
 gnu/local.mk                            |  1 -
 gnu/packages/messaging.scm              | 13 +++---
 gnu/packages/patches/pidgin-libnm.patch | 60 -------------------------
 3 files changed, 5 insertions(+), 69 deletions(-)
 delete mode 100644 gnu/packages/patches/pidgin-libnm.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 204850c4e6..1c61b7a3c1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1471,7 +1471,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/picard-fix-id3-rename-test.patch		\
   %D%/packages/patches/picprog-non-intel-support.patch		\
   %D%/packages/patches/pidgin-add-search-path.patch		\
-  %D%/packages/patches/pidgin-libnm.patch			\
   %D%/packages/patches/pinball-const-fix.patch			\
   %D%/packages/patches/pinball-cstddef.patch			\
   %D%/packages/patches/pinball-missing-separators.patch		\
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index b28dcf329c..5f50643f45 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -526,25 +526,22 @@ authentication.")
 (define-public pidgin
   (package
     (name "pidgin")
-    (version "2.13.0")
+    (version "2.14.1")
     (source
      (origin
        (method url-fetch)
        (uri
         (string-append "mirror://sourceforge/pidgin/Pidgin/"
-                       version "/pidgin-" version ".tar.bz2"))
+                       version "/pidgin-" version ".tar.gz"))
        (sha256
-        (base32 "13vdqj70315p9rzgnbxjp9c51mdzf1l4jg1kvnylc4bidw61air7"))
+        (base32 "1c4dzxg9c3d9zfqqa7jwijj9rv9fm6w95igmpljwy88lxq7v5w11"))
        (patches
         (search-patches
-         "pidgin-add-search-path.patch"
-         ;; Remove the snippet and bootstrapping
-         ;; native-inputs together with this patch.
-         "pidgin-libnm.patch"))
+         "pidgin-add-search-path.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
-           ;; Remove stale generated file after applying pidgin-libnm.patch.
+           ;; Remove stale generated file after applying patches.
            (delete-file "configure")
            #t))))
     (build-system glib-or-gtk-build-system)
diff --git a/gnu/packages/patches/pidgin-libnm.patch b/gnu/packages/patches/pidgin-libnm.patch
deleted file mode 100644
index d34af749af..0000000000
--- a/gnu/packages/patches/pidgin-libnm.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From: Tobias Geerinckx-Rice <[email-masked]>
-Date: Sun, 24 May 2020 16:11:01 +0200
-Subject: [PATCH] gnu: pidgin: Find libnm.
-
-Copied verbatim from[0].
-
-[0]: https://git.archlinux.org/svntogit/packages.git/plain/trunk/pidgin-nm-1.0.patch?h=packages/pidgin
-
-diff --git a/configure.ac b/configure.ac
-index 04836fa..0a2d451 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1423,18 +1423,24 @@ fi
- dnl Check for NetworkManager.h; if we don't have it, oh well
- if test "x$enable_dbus" = "xyes" ; then
- 	if test "x$enable_nm" = "xyes" ; then
--		PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
-+		PKG_CHECK_MODULES(NETWORKMANAGER, [libnm], [
- 			AC_SUBST(NETWORKMANAGER_CFLAGS)
- 			AC_SUBST(NETWORKMANAGER_LIBS)
- 			AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
- 		], [
--			enable_nm=no
--			if test "x$force_deps" = "xyes" ; then
--				AC_MSG_ERROR([
-+			PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
-+				AC_SUBST(NETWORKMANAGER_CFLAGS)
-+				AC_SUBST(NETWORKMANAGER_LIBS)
-+				AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
-+			], [
-+				enable_nm=no
-+				if test "x$force_deps" = "xyes" ; then
-+					AC_MSG_ERROR([
- NetworkManager development headers not found.
- Use --disable-nm if you do not need NetworkManager support.
- ])
--			fi])
-+				fi])
-+		])
- 	fi
- else
- 	enable_nm=no
-diff --git a/libpurple/network.c b/libpurple/network.c
-index c43e3c7..b17e439 100644
---- a/libpurple/network.c
-+++ b/libpurple/network.c
-@@ -939,8 +939,13 @@ nm_update_state(NMState state)
- #if NM_CHECK_VERSION(0,8,992)
- 		case NM_STATE_DISCONNECTING:
- #endif
-+#if NM_CHECK_VERSION(1,0,0)
-+			if (prev != NM_STATE_CONNECTED_GLOBAL && prev != NM_STATE_UNKNOWN)
-+				break;
-+#else
- 			if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
- 				break;
-+#endif
- 			if (ui_ops != NULL && ui_ops->network_disconnected != NULL)
- 				ui_ops->network_disconnected();
- 			break;
-- 
2.29.2

>From 5024f4c20fa97edbf3d8d7e2c24592c089a9c7af Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:20:56 -0500
Subject: [PATCH 11/17] gnu: pidgin: Enable Gadu-Gadu protocol support.

* gnu/packages/messaging.scm (pidgin) [inputs]: Add libgadu.
---
 gnu/packages/messaging.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 5f50643f45..deecfc6f7e 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -565,7 +565,7 @@ authentication.")
        ;; ("gstreamer" ,gstreamer)
        ("gtk+" ,gtk+-2)
        ;; ("gtkspell2" ,gtkspell2)
-       ;; ("libgadu" ,libgadu)
+       ("libgadu" ,libgadu)
        ("libgcrypt" ,libgcrypt)
        ("libgnt" ,libgnt)
        ("libice" ,libice)
-- 
2.29.2

>From d9355a55ad32ff7a534005bb59c3afe44c990d8f Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 31 Dec 2020 00:30:09 -0500
Subject: [PATCH 12/17] gnu: pidgin: Enable MultiMedia and A/V support.

* gnu/packages/messaging.scm (pidgin) [patches]<search-patches>
[pidgin-vv-gst.patch]: New patch.
[arguments]<#:configure-flags>[--diable-vv]: Remove flag.
[--disable-gstreamer]: Remove flag.
[CFLAGS]: New flag.
[inputs]: Add farstream and gstreamer. Move gtk+-2 to ...
[propagated-inputs]: ... here.
* gnu/packages/patches/pidgin-vv-gst.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add entry.
---
 gnu/local.mk                             |  1 +
 gnu/packages/messaging.scm               | 16 ++++----
 gnu/packages/patches/pidgin-vv-gst.patch | 48 ++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/pidgin-vv-gst.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1c61b7a3c1..8acc74a456 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1471,6 +1471,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/picard-fix-id3-rename-test.patch		\
   %D%/packages/patches/picprog-non-intel-support.patch		\
   %D%/packages/patches/pidgin-add-search-path.patch		\
+  %D%/packages/patches/pidgin-vv-gst.patch                        \
   %D%/packages/patches/pinball-const-fix.patch			\
   %D%/packages/patches/pinball-cstddef.patch			\
   %D%/packages/patches/pinball-missing-separators.patch		\
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index deecfc6f7e..ddd1e87c71 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -537,7 +537,8 @@ authentication.")
         (base32 "1c4dzxg9c3d9zfqqa7jwijj9rv9fm6w95igmpljwy88lxq7v5w11"))
        (patches
         (search-patches
-         "pidgin-add-search-path.patch"))
+         "pidgin-add-search-path.patch"
+         "pidgin-vv-gst.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -560,10 +561,9 @@ authentication.")
        ("dbus" ,dbus)
        ("dbus-glib" ,dbus-glib)
        ;; ("evolution-data-server" ,evolution-data-server)
-       ;; ("farstream" ,farstream)
+       ("farstream" ,farstream)
        ("gnutls" ,gnutls)
-       ;; ("gstreamer" ,gstreamer)
-       ("gtk+" ,gtk+-2)
+       ("gstreamer" ,gstreamer)
        ;; ("gtkspell2" ,gtkspell2)
        ("libgadu" ,libgadu)
        ("libgcrypt" ,libgcrypt)
@@ -594,16 +594,18 @@ authentication.")
        ("tcl" ,tcl)
        ("tk" ,tk)))
     (propagated-inputs
-     `(("glib" ,glib)))
+     `(("glib" ,glib)
+       ("gtk+" ,gtk+-2)))
     (arguments
      `(#:configure-flags
        (list
+        (string-append "CFLAGS=-I"
+                       (assoc-ref %build-inputs "gst-plugins-base")
+                       "/include/gstreamer-1.0")
         "--disable-gtkspell"
         ;; "--enable-gevolution"
         "--enable-cap"
         "--enable-mono"
-        "--disable-vv" ; XXX remove when we have farstream and gstreamer
-        "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
         "--enable-cyrus-sasl"
         (string-append "--with-ncurses-headers="
                        (assoc-ref %build-inputs "ncurses")
diff --git a/gnu/packages/patches/pidgin-vv-gst.patch b/gnu/packages/patches/pidgin-vv-gst.patch
new file mode 100644
index 0000000000..e0553dd119
--- /dev/null
+++ b/gnu/packages/patches/pidgin-vv-gst.patch
@@ -0,0 +1,48 @@
+Name: Gary Kramlich
+Date: 2020-07-12
+Source: https://keep.imfreedom.org/pidgin/pidgin/rev/39ac50435cfb
+
+diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c
+--- a/libpurple/mediamanager.c
++++ b/libpurple/mediamanager.c
+@@ -2231,6 +2231,7 @@
+ purple_media_manager_unregister_gst_device(PurpleMediaManager *manager,
+ 		GstDevice *device)
+ {
++#ifdef USE_VV
+ 	GList *i;
+ 	gchar *name;
+ 	gchar *device_class;
+@@ -2277,6 +2278,7 @@
+ 
+ 	g_free(name);
+ 	g_free(device_class);
++#endif /* USE_VV */
+ }
+ 
+ static gboolean
+@@ -2304,7 +2306,7 @@
+ static void
+ purple_media_manager_init_device_monitor(PurpleMediaManager *manager)
+ {
+-#if GST_CHECK_VERSION(1, 4, 0)
++#if GST_CHECK_VERSION(1, 4, 0) && defined(USE_VV)
+ 	GstBus *bus;
+ 	GList *i;
+ 
+@@ -2334,6 +2336,7 @@
+ 		PurpleMediaElementType type)
+ {
+ 	GList *result = NULL;
++#ifdef USE_VV
+ 	GList *i;
+ 
+ 	for (i = manager->priv->elements; i; i = i->next) {
+@@ -2347,6 +2350,7 @@
+ 			result = g_list_prepend(result, info);
+ 		}
+ 	}
++#endif /* USE_VV */
+ 
+ 	return result;
+ }
-- 
2.29.2

>From c3ec0f582abad2b6b40ca16f46f6cfc4947a670a Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Mon, 30 Nov 2020 00:48:09 -0500
Subject: [PATCH 13/17] gnu: libotr: Make some cosmetic changes.

* gnu/packages/messaging.scm (libotr): Make some cosmetic changes.
---
 gnu/packages/messaging.scm | 49 +++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index ddd1e87c71..f07ee9da28 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -186,32 +186,37 @@ powerful, standard and open protocol.")
   (package
     (name "libotr")
     (version "4.1.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://otr.cypherpunks.ca/libotr-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1x8rliydhbibmzwdbyr7pd7n87m2jmxnqkpvaalnf4154hj1hfwb"))
-              (patches (search-patches "libotr-test-auth-fix.patch"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://otr.cypherpunks.ca/libotr-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "1x8rliydhbibmzwdbyr7pd7n87m2jmxnqkpvaalnf4154hj1hfwb"))
+       (patches
+        (search-patches "libotr-test-auth-fix.patch"))))
     (build-system gnu-build-system)
+    (native-inputs
+     `(("perl" ,perl)))                 ; for the test suite
+    (inputs
+     `(("libgpg-error" ,libgpg-error)))
     (propagated-inputs
-     `(("libgcrypt" ,libgcrypt)))  ; libotr headers include gcrypt.h
-    (inputs `(("libgpg-error" ,libgpg-error)))
-    (native-inputs `(("perl" ,perl))) ; for the test suite
+     `(("libgcrypt" ,libgcrypt)))    ; libotr headers include gcrypt.h
     (synopsis "Off-the-Record (OTR) Messaging Library and Toolkit")
-    (description
-     "OTR allows you to have private conversations over instant messaging by
-providing: (1) Encryption: No one else can read your instant messages.  (2)
-Authentication: You are assured the correspondent is who you think it is.  (3)
-Deniability: The messages you send do not have digital signatures that are
-checkable by a third party.  Anyone can forge messages after a conversation to
-make them look like they came from you.  However, during a conversation, your
-correspondent is assured the messages he sees are authentic and
-unmodified.  (4) Perfect forward secrecy: If you lose control of your private
-keys, no previous conversation is compromised.")
+    (description "OTR allows you to have private conversations over instant
+messaging by providing: (1) Encryption: No one else can read your instant
+messages.  (2) Authentication: You are assured the correspondent is who you
+think it is.  (3) Deniability: The messages you send do not have digital
+signatures that are checkable by a third party.  Anyone can forge messages
+after a conversation to make them look like they came from you.  However,
+during a conversation, your correspondent is assured the messages he sees are
+authentic and unmodified.  (4) Perfect forward secrecy: If you lose control of
+your private keys, no previous conversation is compromised.")
     (home-page "https://otr.cypherpunks.ca/")
-    (license (list license:lgpl2.1 license:gpl2))))
+    (license
+     (list
+      license:lgpl2.1
+      license:gpl2))))
 
 (define-public libsignal-protocol-c
   (package
-- 
2.29.2

>From 86f2d8a03316491b960c352ef01c7dae4ac2a594 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Mon, 30 Nov 2020 00:49:38 -0500
Subject: [PATCH 14/17] gnu: libotr: Update license.

* gnu/packages/messaging.scm (libotr) [license]: Modify.
---
 gnu/packages/messaging.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index f07ee9da28..33ee8e760f 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -215,8 +215,10 @@ your private keys, no previous conversation is compromised.")
     (home-page "https://otr.cypherpunks.ca/")
     (license
      (list
-      license:lgpl2.1
-      license:gpl2))))
+      ;; Library
+      license:lgpl2.1+
+      ;; Others
+      license:gpl2+))))
 
 (define-public libsignal-protocol-c
   (package
-- 
2.29.2

>From 21f94ff6148a810479ca6578a1b481f5ad14ef08 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 30 Dec 2020 16:02:17 -0500
Subject: [PATCH 15/17] gnu: pidgin-otr: Make some cosmetic changes.

* gnu/packages/messaging.scm (pidgin-otr): Make some cosmetic changes.
---
 gnu/packages/messaging.scm | 49 +++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 33ee8e760f..4018cae5fc 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -653,38 +653,37 @@ many popular chat protocols.")
   (package
     (name "pidgin-otr")
     (version "4.0.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://otr.cypherpunks.ca/"
-                                  name "-" version ".tar.gz"))
-              (sha256
-               (base32
-                "1i5s9rrgbyss9rszq6c6y53hwqyw1k86s40cpsfx5ccl9bprxdgl"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://otr.cypherpunks.ca/"
+                       name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1i5s9rrgbyss9rszq6c6y53hwqyw1k86s40cpsfx5ccl9bprxdgl"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("intltool" ,intltool)))
+     `(("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
     (inputs
-     `(("pidgin" ,pidgin)
-       ("libotr" ,libotr)
-       ("libgpg-error" ,libgpg-error)
+     `(("glib" ,glib)
+       ("gtk+" ,gtk+-2)
        ("libgcrypt" ,libgcrypt)
-       ("glib" ,glib)
-       ("gtk+" ,gtk+-2)))
+       ("libgpg-error" ,libgpg-error)
+       ("libotr" ,libotr)
+       ("pidgin" ,pidgin)))
     (home-page "https://otr.cypherpunks.ca/")
     (synopsis "Off-the-Record Messaging plugin for Pidgin")
-    (description
-     "Pidgin-OTR is a plugin that adds support for OTR to the Pidgin instant
-messaging client.  OTR (Off-the-Record) Messaging allows you to have private
-conversations over instant messaging by providing: (1) Encryption: No one else
-can read your instant messages.  (2) Authentication: You are assured the
-correspondent is who you think it is.  (3) Deniability: The messages you send
-do not have digital signatures that are checkable by a third party.  Anyone
+    (description "Pidgin-OTR is a plugin that adds support for OTR to the Pidgin
+instant messaging client.  OTR (Off-the-Record) Messaging allows you to have
+private conversations over instant messaging by providing: (1) Encryption: No
+one else can read your instant messages.  (2) Authentication: You are assured
+the correspondent is who you think it is.  (3) Deniability: The messages you
+send do not have digital signatures that are checkable by a third party.  Anyone
 can forge messages after a conversation to make them look like they came from
-you.  However, during a conversation, your correspondent is assured the
-messages he sees are authentic and unmodified.  (4) Perfect forward secrecy:
-If you lose control of your private keys, no previous conversation is
-compromised.")
+you.  However, during a conversation, your correspondent is assured the messages
+he sees are authentic and unmodified.  (4) Perfect forward secrecy: If you lose
+control of your private keys, no previous conversation is compromised.")
     (license license:gpl2)))
 
 (define-public znc
-- 
2.29.2

>From 8ed7a58bbf7890830126c9d8871024aa8f382a79 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 30 Dec 2020 16:03:35 -0500
Subject: [PATCH 16/17] gnu: pidgin-otr: Update license.

* gnu/packages/messaging.scm (pidgin-otr) [license]: Modify.
---
 gnu/packages/messaging.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 4018cae5fc..cf63cf76ff 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -684,7 +684,7 @@ can forge messages after a conversation to make them look like they came from
 you.  However, during a conversation, your correspondent is assured the messages
 he sees are authentic and unmodified.  (4) Perfect forward secrecy: If you lose
 control of your private keys, no previous conversation is compromised.")
-    (license license:gpl2)))
+    (license license:gpl2+)))
 
 (define-public znc
   (package
-- 
2.29.2

>From 4bdf865574fa41ecb8aee96f7a1283974febd89c Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Wed, 30 Dec 2020 16:05:42 -0500
Subject: [PATCH 17/17] gnu: pidgin-otr: Add some inputs.

* gnu/packages/messaging.scm (pidgin-otr) [native-inputs]: Add
gettext-minimal.
[inputs]: Add perl.
---
 gnu/packages/messaging.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index cf63cf76ff..41c45dcf78 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -663,7 +663,8 @@ many popular chat protocols.")
         (base32 "1i5s9rrgbyss9rszq6c6y53hwqyw1k86s40cpsfx5ccl9bprxdgl"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("intltool" ,intltool)
+     `(("gettext" ,gettext-minimal)
+       ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("glib" ,glib)
@@ -671,6 +672,7 @@ many popular chat protocols.")
        ("libgcrypt" ,libgcrypt)
        ("libgpg-error" ,libgpg-error)
        ("libotr" ,libotr)
+       ("perl" ,perl)
        ("pidgin" ,pidgin)))
     (home-page "https://otr.cypherpunks.ca/")
     (synopsis "Off-the-Record Messaging plugin for Pidgin")
-- 
2.29.2