forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gnome-extra/cinnamon-session: Add elogind
Package-Manager: Portage-2.3.13, Repoman-2.3.3
- Loading branch information
Showing
2 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
gnome-extra/cinnamon-session/cinnamon-session-3.6.1-r1.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
inherit autotools eutils gnome2 | ||
|
||
DESCRIPTION="Cinnamon session manager" | ||
HOMEPAGE="http://cinnamon.linuxmint.com/" | ||
SRC_URI="https://github.com/linuxmint/cinnamon-session/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="GPL-2+ FDL-1.1+ LGPL-2+" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="doc ipv6 systemd" | ||
|
||
COMMON_DEPEND=" | ||
>=dev-libs/dbus-glib-0.88 | ||
>=dev-libs/glib-2.37.3:2 | ||
media-libs/libcanberra | ||
x11-libs/gdk-pixbuf:2 | ||
>=x11-libs/gtk+-3:3 | ||
x11-libs/cairo | ||
x11-libs/libICE | ||
x11-libs/libSM | ||
x11-libs/libX11 | ||
x11-libs/libXau | ||
x11-libs/libXcomposite | ||
x11-libs/libXext | ||
x11-libs/libXrender | ||
x11-libs/libXtst | ||
x11-libs/pango[X] | ||
virtual/opengl | ||
systemd? ( >=sys-apps/systemd-183 ) | ||
!systemd? ( >=sys-power/upower-pm-utils-0.9.23 ) | ||
" | ||
RDEPEND="${COMMON_DEPEND} | ||
>=gnome-extra/cinnamon-desktop-2.6[systemd=] | ||
!systemd? ( sys-auth/elogind ) | ||
" | ||
DEPEND="${COMMON_DEPEND} | ||
dev-libs/libxslt | ||
>=dev-util/intltool-0.40.6 | ||
virtual/pkgconfig | ||
doc? ( app-text/xmlto ) | ||
gnome-base/gnome-common | ||
" | ||
# gnome-base/gnome-common for eautoreconf | ||
|
||
src_prepare() { | ||
# make upower and logind check non-automagic | ||
eapply "${FILESDIR}/${PN}-3.0.1-automagic.patch" | ||
eapply "${FILESDIR}/${PN}-3.6.1-elogind.patch" | ||
|
||
eautoreconf | ||
gnome2_src_prepare | ||
} | ||
|
||
src_configure() { | ||
gnome2_src_configure \ | ||
--disable-gconf \ | ||
--disable-static \ | ||
--enable-logind \ | ||
$(use_enable doc docbook-docs) \ | ||
$(use_enable ipv6) | ||
} |
65 changes: 65 additions & 0 deletions
65
gnome-extra/cinnamon-session/files/cinnamon-session-3.6.1-elogind.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
diff --git a/cinnamon-session/Makefile.am b/cinnamon-session/Makefile.am | ||
index 789d47d..d8093d4 100644 | ||
--- a/cinnamon-session/Makefile.am | ||
+++ b/cinnamon-session/Makefile.am | ||
@@ -71,6 +71,7 @@ cinnamon_session_CPPFLAGS = \ | ||
$(XEXT_CFLAGS) \ | ||
$(GCONF_CFLAGS) \ | ||
$(LOGIND_CFLAGS) \ | ||
+ $(ELOGIND_CFLAGS) \ | ||
-I$(top_srcdir)/egg \ | ||
-DLOCALE_DIR=\""$(datadir)/locale"\" \ | ||
-DDATA_DIR=\""$(datadir)/cinnamon-session"\" \ | ||
@@ -91,6 +92,7 @@ cinnamon_session_LDADD = \ | ||
$(UPOWER_LIBS) \ | ||
$(GCONF_LIBS) \ | ||
$(LOGIND_LIBS) \ | ||
+ $(ELOGIND_LIBS) \ | ||
$(EXECINFO_LIBS) | ||
|
||
libcsmutil_la_SOURCES = \ | ||
diff --git a/cinnamon-session/csm-systemd.c b/cinnamon-session/csm-systemd.c | ||
index cef991c..dc2aa2e 100644 | ||
--- a/cinnamon-session/csm-systemd.c | ||
+++ b/cinnamon-session/csm-systemd.c | ||
@@ -32,7 +32,11 @@ | ||
#include <sys/types.h> | ||
#include <pwd.h> | ||
|
||
+#ifdef HAVE_ELOGIND | ||
+#include <elogind/sd-login.h> | ||
+#else | ||
#include <systemd/sd-login.h> | ||
+#endif | ||
|
||
#include <glib.h> | ||
#include <glib-object.h> | ||
diff --git a/configure.ac b/configure.ac | ||
index 38db5a3..8dafc6a 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -113,15 +113,23 @@ AC_ARG_ENABLE([logind], | ||
|
||
have_logind=no | ||
if test x$enable_logind != xno ; then | ||
- PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0 libsystemd >= 183], [have_logind=yes], [have_logind=no]) | ||
+ PKG_CHECK_MODULES(LOGIND, [gio-unix-2.0], [have_logind=yes], [have_logind=no]) | ||
fi | ||
|
||
if test x$have_logind = xyes; then | ||
AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported]) | ||
fi | ||
|
||
+have_elogind=no | ||
+PKG_CHECK_MODULES(ELOGIND, [libelogind], [have_elogind=yes], [have_elogind=no]) | ||
+if test x$have_elogind = xyes; then | ||
+ AC_DEFINE(HAVE_ELOGIND, 1, [Define if logind is supported]) | ||
+fi | ||
+ | ||
AC_SUBST(LOGIND_CFLAGS) | ||
AC_SUBST(LOGIND_LIBS) | ||
+AC_SUBST(ELOGIND_CFLAGS) | ||
+AC_SUBST(ELOGIND_LIBS) | ||
|
||
dnl ==================================================================== | ||
dnl Option to disable DBus user session support. |