Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mate-base/mate-session-manager/files/, mate-base/mate-session-manager/
Date: Sun, 31 Mar 2019 10:47:58
Message-Id: 1554028776.5bd270f4a595255b62e34e17375c50d5ef82f15f.asturm@gentoo
1 commit: 5bd270f4a595255b62e34e17375c50d5ef82f15f
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 30 22:32:54 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 31 10:39:36 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd270f4
7
8 mate-base/mate-session-manager: Add USE elogind
9
10 Bug: https://bugs.gentoo.org/633336
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 .../mate-session-manager-1.22.0-elogind.patch | 84 ++++++++++++++++++++++
15 .../mate-session-manager-1.22.0.ebuild | 16 +++--
16 2 files changed, 96 insertions(+), 4 deletions(-)
17
18 diff --git a/mate-base/mate-session-manager/files/mate-session-manager-1.22.0-elogind.patch b/mate-base/mate-session-manager/files/mate-session-manager-1.22.0-elogind.patch
19 new file mode 100644
20 index 00000000000..ebe68a0b354
21 --- /dev/null
22 +++ b/mate-base/mate-session-manager/files/mate-session-manager-1.22.0-elogind.patch
23 @@ -0,0 +1,84 @@
24 +From e6f62cd82d2717cb26951629e3f071814694fd07 Mon Sep 17 00:00:00 2001
25 +From: Victor Kareh <vkareh@××××××.com>
26 +Date: Fri, 8 Mar 2019 13:37:01 -0500
27 +Subject: [PATCH] Add ELOGIND support
28 +
29 +Reuses HAVE_SYSTEMD #define to reduce #ifdef mess.
30 +
31 +ELOGIND is not officially supported, but since it's
32 +a subset of systemd, it should work out of the box.
33 +
34 +Co-authored-by: Joakim Tjernlund <joakim.tjernlund@××××××××.com>
35 +Co-authored-by: Jorge Pizarro Callejas <jpizarrocallejas@×××××.com>
36 +---
37 + configure.ac | 29 +++++++++++++++++++++++++++++
38 + mate-session/Makefile.am | 2 ++
39 + 2 files changed, 31 insertions(+)
40 +
41 +diff --git a/configure.ac b/configure.ac
42 +index 207ad97..1390ba0 100644
43 +--- a/configure.ac
44 ++++ b/configure.ac
45 +@@ -109,6 +109,34 @@ fi
46 + AM_CONDITIONAL(HAVE_SYSTEMD, test "x$use_systemd" = "xyes")
47 + AC_SUBST(HAVE_SYSTEMD)
48 +
49 ++dnl ====================================================================
50 ++dnl Check for elogind
51 ++dnl
52 ++dnl elogind is not officially supported, but since it's a subset of
53 ++dnl systemd, it should work out of the box
54 ++dnl ====================================================================
55 ++
56 ++AC_ARG_WITH(elogind,
57 ++ AS_HELP_STRING([--with-elogind],
58 ++ [Use libelogind instead of libsystemd-login]),,
59 ++ with_elogind=auto)
60 ++
61 ++use_elogind=no
62 ++if test "x$with_elogind" != "xno"; then
63 ++ PKG_CHECK_MODULES(LIBELOGIND,[libelogind], [use_elogind=yes],
64 ++ [PKG_CHECK_MODULES([LIBELOGIND], [libelogind],
65 ++ [use_elogind=yes], [use_elogind=no])])
66 ++
67 ++ if test "x$use_elogind" = "xyes"; then
68 ++ AC_DEFINE([HAVE_ELOGIND], 1, [elogind support])
69 ++ AC_DEFINE([HAVE_SYSTEMD], 1, [Define to 1 to reduce ifdefs since elogind is a drop-in replacement for systemd])
70 ++ AC_SUBST(LIBELOGIND_CFLAGS)
71 ++ AC_SUBST(LIBELOGIND_LIBS)
72 ++ fi
73 ++fi
74 ++AM_CONDITIONAL(HAVE_ELOGIND, [test "x$use_elogind" = "xyes"])
75 ++AC_SUBST(HAVE_ELOGIND)
76 ++
77 + dnl ====================================================================
78 + dnl Check for XSync extension
79 + dnl ====================================================================
80 +@@ -333,6 +361,7 @@ echo "
81 +
82 + Default WM: ${with_default_wm}
83 + Systemd support: ${use_systemd}
84 ++ Elogind support: ${use_elogind}
85 + IPv6 support: ${have_full_ipv6}
86 + Backtrace support: ${have_backtrace}
87 + XRender support: ${have_xrender}
88 +diff --git a/mate-session/Makefile.am b/mate-session/Makefile.am
89 +index 093c908..ea0dc95 100644
90 +--- a/mate-session/Makefile.am
91 ++++ b/mate-session/Makefile.am
92 +@@ -7,6 +7,7 @@ noinst_PROGRAMS = \
93 + AM_CPPFLAGS = \
94 + $(MATE_SESSION_CFLAGS) \
95 + $(SYSTEMD_CFLAGS) \
96 ++ $(LIBELOGIND_CFLAGS) \
97 + $(DISABLE_DEPRECATED_CFLAGS)
98 +
99 + AM_CFLAGS = $(WARN_CFLAGS)
100 +@@ -80,6 +81,7 @@ mate_session_LDADD = \
101 + $(XEXT_LIBS) \
102 + $(MATE_SESSION_LIBS) \
103 + $(SYSTEMD_LIBS) \
104 ++ $(LIBELOGIND_LIBS) \
105 + $(EXECINFO_LIBS)
106 +
107 + libgsmutil_la_SOURCES = \
108
109 diff --git a/mate-base/mate-session-manager/mate-session-manager-1.22.0.ebuild b/mate-base/mate-session-manager/mate-session-manager-1.22.0.ebuild
110 index 9b948b23038..47d803f592f 100644
111 --- a/mate-base/mate-session-manager/mate-session-manager-1.22.0.ebuild
112 +++ b/mate-base/mate-session-manager/mate-session-manager-1.22.0.ebuild
113 @@ -14,10 +14,9 @@ HOMEPAGE="http://mate-desktop.org/"
114
115 LICENSE="GPL-2 LGPL-2 FDL-1.1"
116 SLOT="0"
117 +IUSE="debug elibc_FreeBSD elogind gnome-keyring ipv6 systemd +xtrans"
118
119 -IUSE="debug elibc_FreeBSD gnome-keyring ipv6 systemd +xtrans"
120 -
121 -PATCHES=( "${FILESDIR}"/${P}-fix-systemd-regression.patch )
122 +REQUIRED_USE="?? ( elogind systemd )"
123
124 # x11-misc/xdg-user-dirs{,-gtk} are needed to create the various XDG_*_DIRs, and
125 # create .config/user-dirs.dirs which is read by glib to get G_USER_DIRECTORY_*
126 @@ -40,7 +39,10 @@ COMMON_DEPEND=">=dev-libs/dbus-glib-0.76
127 virtual/libintl
128 elibc_FreeBSD? ( || ( dev-libs/libexecinfo >=sys-freebsd/freebsd-lib-10.0 ) )
129 systemd? ( sys-apps/systemd )
130 - !systemd? ( >=sys-auth/consolekit-0.9.2 )
131 + !systemd? (
132 + elogind? ( sys-auth/elogind )
133 + !elogind? ( >=sys-auth/consolekit-0.9.2 )
134 + )
135 xtrans? ( x11-libs/xtrans )"
136
137 RDEPEND="${COMMON_DEPEND}
138 @@ -56,11 +58,17 @@ DEPEND="${COMMON_DEPEND}
139 virtual/pkgconfig:*
140 !<gnome-base/gdm-2.20.4"
141
142 +PATCHES=(
143 + "${FILESDIR}"/${P}-fix-systemd-regression.patch
144 + "${FILESDIR}"/${P}-elogind.patch
145 +)
146 +
147 MATE_FORCE_AUTORECONF=true
148
149 src_configure() {
150 mate_src_configure \
151 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
152 + $(use_with elogind) \
153 $(use_with systemd) \
154 $(use_with xtrans) \
155 $(use_enable debug) \