Gentoo Archives: gentoo-commits

From: Kristian Fiskerstrand <k_f@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-extra/cinnamon-session/files/, gnome-extra/cinnamon-session/
Date: Mon, 27 Nov 2017 21:22:37
Message-Id: 1511817742.acf9a86375dd07521bf6c8f706c7c9534f37a9a5.k_f@gentoo
1 commit: acf9a86375dd07521bf6c8f706c7c9534f37a9a5
2 Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 27 21:22:08 2017 +0000
4 Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 27 21:22:22 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acf9a863
7
8 gnome-extra/cinnamon-session: Add elogind
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.3
11
12 .../cinnamon-session-3.6.1-r1.ebuild | 66 ++++++++++++++++++++++
13 .../files/cinnamon-session-3.6.1-elogind.patch | 65 +++++++++++++++++++++
14 2 files changed, 131 insertions(+)
15
16 diff --git a/gnome-extra/cinnamon-session/cinnamon-session-3.6.1-r1.ebuild b/gnome-extra/cinnamon-session/cinnamon-session-3.6.1-r1.ebuild
17 new file mode 100644
18 index 00000000000..14a94279c74
19 --- /dev/null
20 +++ b/gnome-extra/cinnamon-session/cinnamon-session-3.6.1-r1.ebuild
21 @@ -0,0 +1,66 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +inherit autotools eutils gnome2
27 +
28 +DESCRIPTION="Cinnamon session manager"
29 +HOMEPAGE="http://cinnamon.linuxmint.com/"
30 +SRC_URI="https://github.com/linuxmint/cinnamon-session/archive/${PV}.tar.gz -> ${P}.tar.gz"
31 +
32 +LICENSE="GPL-2+ FDL-1.1+ LGPL-2+"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~x86"
35 +IUSE="doc ipv6 systemd"
36 +
37 +COMMON_DEPEND="
38 + >=dev-libs/dbus-glib-0.88
39 + >=dev-libs/glib-2.37.3:2
40 + media-libs/libcanberra
41 + x11-libs/gdk-pixbuf:2
42 + >=x11-libs/gtk+-3:3
43 + x11-libs/cairo
44 + x11-libs/libICE
45 + x11-libs/libSM
46 + x11-libs/libX11
47 + x11-libs/libXau
48 + x11-libs/libXcomposite
49 + x11-libs/libXext
50 + x11-libs/libXrender
51 + x11-libs/libXtst
52 + x11-libs/pango[X]
53 + virtual/opengl
54 + systemd? ( >=sys-apps/systemd-183 )
55 + !systemd? ( >=sys-power/upower-pm-utils-0.9.23 )
56 +"
57 +RDEPEND="${COMMON_DEPEND}
58 + >=gnome-extra/cinnamon-desktop-2.6[systemd=]
59 + !systemd? ( sys-auth/elogind )
60 +"
61 +DEPEND="${COMMON_DEPEND}
62 + dev-libs/libxslt
63 + >=dev-util/intltool-0.40.6
64 + virtual/pkgconfig
65 + doc? ( app-text/xmlto )
66 +
67 + gnome-base/gnome-common
68 +"
69 +# gnome-base/gnome-common for eautoreconf
70 +
71 +src_prepare() {
72 + # make upower and logind check non-automagic
73 + eapply "${FILESDIR}/${PN}-3.0.1-automagic.patch"
74 + eapply "${FILESDIR}/${PN}-3.6.1-elogind.patch"
75 +
76 + eautoreconf
77 + gnome2_src_prepare
78 +}
79 +
80 +src_configure() {
81 + gnome2_src_configure \
82 + --disable-gconf \
83 + --disable-static \
84 + --enable-logind \
85 + $(use_enable doc docbook-docs) \
86 + $(use_enable ipv6)
87 +}
88
89 diff --git a/gnome-extra/cinnamon-session/files/cinnamon-session-3.6.1-elogind.patch b/gnome-extra/cinnamon-session/files/cinnamon-session-3.6.1-elogind.patch
90 new file mode 100644
91 index 00000000000..b35ce9e55bf
92 --- /dev/null
93 +++ b/gnome-extra/cinnamon-session/files/cinnamon-session-3.6.1-elogind.patch
94 @@ -0,0 +1,65 @@
95 +diff --git a/cinnamon-session/Makefile.am b/cinnamon-session/Makefile.am
96 +index 789d47d..d8093d4 100644
97 +--- a/cinnamon-session/Makefile.am
98 ++++ b/cinnamon-session/Makefile.am
99 +@@ -71,6 +71,7 @@ cinnamon_session_CPPFLAGS = \
100 + $(XEXT_CFLAGS) \
101 + $(GCONF_CFLAGS) \
102 + $(LOGIND_CFLAGS) \
103 ++ $(ELOGIND_CFLAGS) \
104 + -I$(top_srcdir)/egg \
105 + -DLOCALE_DIR=\""$(datadir)/locale"\" \
106 + -DDATA_DIR=\""$(datadir)/cinnamon-session"\" \
107 +@@ -91,6 +92,7 @@ cinnamon_session_LDADD = \
108 + $(UPOWER_LIBS) \
109 + $(GCONF_LIBS) \
110 + $(LOGIND_LIBS) \
111 ++ $(ELOGIND_LIBS) \
112 + $(EXECINFO_LIBS)
113 +
114 + libcsmutil_la_SOURCES = \
115 +diff --git a/cinnamon-session/csm-systemd.c b/cinnamon-session/csm-systemd.c
116 +index cef991c..dc2aa2e 100644
117 +--- a/cinnamon-session/csm-systemd.c
118 ++++ b/cinnamon-session/csm-systemd.c
119 +@@ -32,7 +32,11 @@
120 + #include <sys/types.h>
121 + #include <pwd.h>
122 +
123 ++#ifdef HAVE_ELOGIND
124 ++#include <elogind/sd-login.h>
125 ++#else
126 + #include <systemd/sd-login.h>
127 ++#endif
128 +
129 + #include <glib.h>
130 + #include <glib-object.h>
131 +diff --git a/configure.ac b/configure.ac
132 +index 38db5a3..8dafc6a 100644
133 +--- a/configure.ac
134 ++++ b/configure.ac
135 +@@ -113,15 +113,23 @@ AC_ARG_ENABLE([logind],
136 +
137 + have_logind=no
138 + if test x$enable_logind != xno ; then
139 +- PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd >= 183], [have_logind=yes], [have_logind=no])
140 ++ PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0], [have_logind=yes], [have_logind=no])
141 + fi
142 +
143 + if test x$have_logind = xyes; then
144 + AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported])
145 + fi
146 +
147 ++have_elogind=no
148 ++PKG_CHECK_MODULES(ELOGIND, [libelogind], [have_elogind=yes], [have_elogind=no])
149 ++if test x$have_elogind = xyes; then
150 ++ AC_DEFINE(HAVE_ELOGIND, 1, [Define if logind is supported])
151 ++fi
152 ++
153 + AC_SUBST(LOGIND_CFLAGS)
154 + AC_SUBST(LOGIND_LIBS)
155 ++AC_SUBST(ELOGIND_CFLAGS)
156 ++AC_SUBST(ELOGIND_LIBS)
157 +
158 + dnl ====================================================================
159 + dnl Option to disable DBus user session support.