x11-misc/light-locker: fix systemd compatibility, bug #588894
authorDenis Dupeyron <calchan@gentoo.org>
Tue, 13 Sep 2016 02:02:43 +0000 (20:02 -0600)
committerDenis Dupeyron <calchan@gentoo.org>
Tue, 13 Sep 2016 02:03:14 +0000 (20:03 -0600)
profiles/package.mask
x11-misc/light-locker/files/light-locker-1.7.0-systemd.patch [new file with mode: 0644]
x11-misc/light-locker/light-locker-1.7.0-r1.ebuild [new file with mode: 0644]

index 387bd4bf3e53bf77cef7d9247019232faea50b0b..3b0a4a7be1cd9c2705b19d47ab6e7faafe4076e1 100644 (file)
 
 #--- END OF EXAMPLES ---
 
+# Denis Dupeyron <calchan@gentoo.org> (12 Sep 2016)
+# Masked for testing, see bug #588894.
+=x11-misc/light-locker-1.7.0-r1
+
 # James Le Cuirot <chewi@gentoo.org> (12 Sep 2016)
 # Now only available on Steam. Binaries were removed by the publisher
 # and Humble Bundle over 2 years ago. Removal in 60 days. Bug #588110.
diff --git a/x11-misc/light-locker/files/light-locker-1.7.0-systemd.patch b/x11-misc/light-locker/files/light-locker-1.7.0-systemd.patch
new file mode 100644 (file)
index 0000000..757dda2
--- /dev/null
@@ -0,0 +1,46 @@
+--- configure.orig     2016-09-12 19:48:08.510799596 -0600
++++ configure  2016-09-12 19:48:33.804071980 -0600
+@@ -17532,12 +17532,12 @@
+     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libsystemd-login") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-login" 2>/dev/null`
++  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+@@ -17549,12 +17549,12 @@
+     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
+  elif test -n "$PKG_CONFIG"; then
+     if test -n "$PKG_CONFIG" && \
+-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login\""; } >&5
+-  ($PKG_CONFIG --exists --print-errors "libsystemd-login") 2>&5
++    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
++  ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
+   ac_status=$?
+   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; }; then
+-  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-login" 2>/dev/null`
++  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+ else
+   pkg_failed=yes
+@@ -17575,9 +17575,9 @@
+         _pkg_short_errors_supported=no
+ fi
+         if test $_pkg_short_errors_supported = yes; then
+-              SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-login" 2>&1`
++              SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
+         else
+-              SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-login" 2>&1`
++              SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
+         fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$SYSTEMD_PKG_ERRORS" >&5
diff --git a/x11-misc/light-locker/light-locker-1.7.0-r1.ebuild b/x11-misc/light-locker/light-locker-1.7.0-r1.ebuild
new file mode 100644 (file)
index 0000000..d5f10dc
--- /dev/null
@@ -0,0 +1,69 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit gnome2-utils
+
+DESCRIPTION="A simple locker using lightdm"
+HOMEPAGE="https://github.com/the-cavalry/light-locker"
+SRC_URI="${HOMEPAGE}/releases/download/v${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+consolekit +dpms gtk3 +screensaver -systemd +upower"
+
+RDEPEND="dev-libs/dbus-glib
+       >=dev-libs/glib-2.25.6:2
+       >=sys-apps/dbus-0.30
+       x11-libs/cairo
+       x11-libs/libX11
+       x11-libs/pango
+       x11-libs/libXxf86vm
+       consolekit? ( sys-auth/consolekit )
+       dpms? ( x11-libs/libXext )
+       !gtk3? ( >=x11-libs/gtk+-2.24:2 )
+       gtk3? ( x11-libs/gtk+:3 )
+       screensaver? ( x11-libs/libXScrnSaver )
+       systemd? ( sys-apps/systemd )
+       upower? ( || ( sys-power/upower sys-power/upower-pm-utils ) )"
+DEPEND="${RDEPEND}
+       dev-lang/perl
+       dev-perl/XML-Parser
+       dev-util/intltool
+       sys-devel/gettext"
+RDEPEND="${RDEPEND}
+       x11-misc/lightdm"
+
+DOCS=( AUTHORS HACKING NEWS README )
+
+src_prepare() {
+       # Not using debian's patch on configure.ac because it requires running xdg-autogen which is a mess
+       epatch "${FILESDIR}/${PN}-${PV}-systemd.patch"
+       eapply_user
+}
+
+src_configure() {
+       econf \
+               $(use_with consolekit console-kit) \
+               $(use_with dpms dpms-ext) \
+               $(use_with !gtk3 gtk2) \
+               $(use_with screensaver x) \
+               $(use_with screensaver mit-ext) \
+               $(use_with systemd) \
+               $(use_with upower)
+}
+
+pkg_preinst() {
+       gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+       gnome2_schemas_update
+}
+
+pkg_postrm() {
+       gnome2_schemas_update
+}