1 |
commit: 393984133a76c16b28926eb17352f2bb10df7512 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 4 17:23:44 2016 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 4 17:24:27 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39398413 |
7 |
|
8 |
net-misc/networkmanager: fix build with USE=-systemd |
9 |
|
10 |
Thanks to Ben Kohler for getting this sorted with upstream. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/590432 |
13 |
|
14 |
Package-Manager: portage-2.3.0_p16 |
15 |
|
16 |
net-misc/networkmanager/files/1.2.4-upower.patch | 67 ++++++++++++++++++++++ |
17 |
.../networkmanager/networkmanager-1.2.4.ebuild | 5 ++ |
18 |
2 files changed, 72 insertions(+) |
19 |
|
20 |
diff --git a/net-misc/networkmanager/files/1.2.4-upower.patch b/net-misc/networkmanager/files/1.2.4-upower.patch |
21 |
new file mode 100644 |
22 |
index 0000000..a08e34a |
23 |
--- /dev/null |
24 |
+++ b/net-misc/networkmanager/files/1.2.4-upower.patch |
25 |
@@ -0,0 +1,67 @@ |
26 |
+From f864c58cfe87533c69dcf00e3ea236809392a8e0 Mon Sep 17 00:00:00 2001 |
27 |
+From: Beniamino Galvani <bgalvani@××××××.com> |
28 |
+Date: Thu, 4 Aug 2016 16:25:30 +0200 |
29 |
+Subject: build: fix build with '--with-suspend-resume=upower' |
30 |
+ |
31 |
+Now we have a single file for all suspend APIs and the selection is |
32 |
+done through the preprocessor: remove stale AM_CONDITIONALs and define |
33 |
+SUSPEND_RESUME_UPOWER when needed. |
34 |
+ |
35 |
+Fixes: c76eb3e8f7a80b69c570b513ee3eb16bea1b34bd |
36 |
+(cherry picked from commit e4b2c989dc51818e52906b5120ea6a0659274631) |
37 |
+ |
38 |
+diff --git a/configure.ac b/configure.ac |
39 |
+index 46775c3..7869f07 100644 |
40 |
+--- a/configure.ac |
41 |
++++ b/configure.ac |
42 |
+@@ -472,7 +472,9 @@ if test "z$with_suspend_resume" = "z"; then |
43 |
+ fi |
44 |
+ |
45 |
+ case $with_suspend_resume in |
46 |
+- upower) ;; |
47 |
++ upower) |
48 |
++ AC_DEFINE([SUSPEND_RESUME_UPOWER], 1, [Define to 1 to use UPower suspend api]) |
49 |
++ ;; |
50 |
+ systemd) |
51 |
+ PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd >= 209],, |
52 |
+ [PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])]) |
53 |
+@@ -485,9 +487,6 @@ case $with_suspend_resume in |
54 |
+ AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd, consolekit]) |
55 |
+ ;; |
56 |
+ esac |
57 |
+-AM_CONDITIONAL(SUSPEND_RESUME_UPOWER, test "x$with_suspend_resume" = "xupower") |
58 |
+-AM_CONDITIONAL(SUSPEND_RESUME_SYSTEMD, test "x$with_suspend_resume" = "xsystemd") |
59 |
+-AM_CONDITIONAL(SUSPEND_RESUME_CONSOLEKIT, test "x$with_suspend_resume" = "xconsolekit") |
60 |
+ |
61 |
+ # SELinux support |
62 |
+ AC_ARG_WITH(selinux, AS_HELP_STRING([--with-selinux=yes|no|auto], [Build with SELinux (default: auto)]),,[with_selinux=auto]) |
63 |
+-- |
64 |
+cgit v0.10.2 |
65 |
+ |
66 |
+--- a/config.h.in |
67 |
++++ b/config.h.in |
68 |
+@@ -216,6 +216,9 @@ |
69 |
+ /* Define to 1 to use systemd suspend api */ |
70 |
+ #undef SUSPEND_RESUME_SYSTEMD |
71 |
+ |
72 |
++/* Define to 1 to use UPower suspend api */ |
73 |
++#undef SUSPEND_RESUME_UPOWER |
74 |
++ |
75 |
+ /* Define to 1 if libsystemd-journald is available */ |
76 |
+ #undef SYSTEMD_JOURNAL |
77 |
+ |
78 |
+--- a/configure |
79 |
++++ b/configure |
80 |
+@@ -22776,7 +22776,11 @@ |
81 |
+ fi |
82 |
+ |
83 |
+ case $with_suspend_resume in |
84 |
+- upower) ;; |
85 |
++ upower) |
86 |
++ |
87 |
++$as_echo "#define SUSPEND_RESUME_UPOWER 1" >>confdefs.h |
88 |
++ |
89 |
++ ;; |
90 |
+ systemd) |
91 |
+ |
92 |
+ pkg_failed=no |
93 |
|
94 |
diff --git a/net-misc/networkmanager/networkmanager-1.2.4.ebuild b/net-misc/networkmanager/networkmanager-1.2.4.ebuild |
95 |
index 56aa7e0..c4cc3d4 100644 |
96 |
--- a/net-misc/networkmanager/networkmanager-1.2.4.ebuild |
97 |
+++ b/net-misc/networkmanager/networkmanager-1.2.4.ebuild |
98 |
@@ -122,6 +122,11 @@ src_prepare() { |
99 |
DOC_CONTENTS="To modify system network connections without needing to enter the |
100 |
root password, add your user account to the 'plugdev' group." |
101 |
|
102 |
+ local PATCHES=( |
103 |
+ # https://bugs.gentoo.org/590432 |
104 |
+ "${FILESDIR}/1.2.4-upower.patch" |
105 |
+ ) |
106 |
+ |
107 |
use vala && vala_src_prepare |
108 |
gnome2_src_prepare |
109 |
} |