guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: pidgin: Fix build with Meson network-manager


From: guix-commits
Subject: branch master updated: gnu: pidgin: Fix build with Meson network-manager.
Date: Sun, 24 May 2020 10:17:36 -0400

This is an automated email from the git hooks/post-receive script.

nckx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 4492981  gnu: pidgin: Fix build with Meson network-manager.
4492981 is described below

commit 4492981706e0f2041053fdc728e29232855d8689
Author: Tobias Geerinckx-Rice <address@hidden>
AuthorDate: Sun May 24 16:09:36 2020 +0200

    gnu: pidgin: Fix build with Meson network-manager.
    
    This is a follow-up commit to 255ff74f3ab514a76068f6cfccc7f8dbcf8b7f3f:
    building network-manager with Meson breaks users of NetworkManager.pc.
    
    * gnu/packages/messaging.scm (pidgin)[source]: Add pidgin-libnm.patch.
    Force re-bootstrapping in a new snippet.
    [native-inputs]: Add autoconf, automake, and libtool.
    * gnu/packages/patches/pidgin-libnm.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                            |  1 +
 gnu/packages/messaging.scm              | 18 ++++++++--
 gnu/packages/patches/pidgin-libnm.patch | 60 +++++++++++++++++++++++++++++++++
 3 files changed, 77 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 4270782..bbe06d2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1363,6 +1363,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/perl-www-curl-remove-symbol.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 57ff083..ce542ad 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -440,7 +440,16 @@ authentication.")
                            version "/pidgin-" version ".tar.bz2"))
        (sha256
         (base32 "13vdqj70315p9rzgnbxjp9c51mdzf1l4jg1kvnylc4bidw61air7"))
-       (patches (search-patches "pidgin-add-search-path.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
+           ;; Remove stale generated file after applying pidgin-libnm.patch.
+           (delete-file "configure")
+           #t))))
     (build-system glib-or-gtk-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -448,7 +457,12 @@ authentication.")
        ("intltool" ,intltool)
        ("gconf" ,gconf)
        ("python" ,python-2)
-       ("doxygen" ,doxygen)))
+       ("doxygen" ,doxygen)
+
+       ;; For bootstrapping after applying pidgin-libnm.patch.
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
     (inputs
      `(("gtk+" ,gtk+-2)
        ("libgcrypt" ,libgcrypt)
diff --git a/gnu/packages/patches/pidgin-libnm.patch 
b/gnu/packages/patches/pidgin-libnm.patch
new file mode 100644
index 0000000..d34af74
--- /dev/null
+++ b/gnu/packages/patches/pidgin-libnm.patch
@@ -0,0 +1,60 @@
+From: Tobias Geerinckx-Rice <address@hidden>
+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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]