aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/elogind/files')
-rw-r--r--sys-auth/elogind/files/elogind-226.4-docs.patch15
-rw-r--r--sys-auth/elogind/files/elogind-fix-musl.patch38
-rw-r--r--sys-auth/elogind/files/elogind.conf8
-rw-r--r--sys-auth/elogind/files/elogind.conf.in7
-rw-r--r--sys-auth/elogind/files/elogind.init25
5 files changed, 93 insertions, 0 deletions
diff --git a/sys-auth/elogind/files/elogind-226.4-docs.patch b/sys-auth/elogind/files/elogind-226.4-docs.patch
new file mode 100644
index 0000000..4161f63
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-226.4-docs.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.am 2017-02-16 13:22:56.764985896 +0100
++++ b/Makefile.am 2017-02-16 13:23:04.998986057 +0100
+@@ -194,12 +194,6 @@
+ bin_PROGRAMS =
+ rootlibexec_PROGRAMS =
+
+-dist_doc_DATA = \
+- README \
+- NEWS \
+- LICENSE.LGPL2.1 \
+- LICENSE.GPL2
+-
+ @INTLTOOL_POLICY_RULE@
+
+ # ------------------------------------------------------------------------------
diff --git a/sys-auth/elogind/files/elogind-fix-musl.patch b/sys-auth/elogind/files/elogind-fix-musl.patch
new file mode 100644
index 0000000..4aba103
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-fix-musl.patch
@@ -0,0 +1,38 @@
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -22,6 +22,16 @@
+ #include "macro.h"
+ #include "string-util.h"
+
++#define strndupa(s, n) \
++ ({ \
++ const char *__in = (s); \
++ size_t __len = strnlen(__in, (n)); \
++ char *__out = (char *)alloca(__len + 1); \
++ __out[__len] = '\0'; \
++ (char *)memcpy(__out, __in, __len); \
++ })
++
++
+ static void test_hexchar(void) {
+ assert_se(hexchar(0xa) == 'a');
+ assert_se(hexchar(0x0) == '0');
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -48,8 +48,6 @@
+ info(unsigned);
+ info(long unsigned);
+ info(long long unsigned);
+- info(__syscall_ulong_t);
+- info(__syscall_slong_t);
+
+ info(float);
+ info(double);
+@@ -59,7 +57,6 @@
+ info(ssize_t);
+ info(time_t);
+ info(usec_t);
+- info(__time_t);
+
+ info(enum Enum);
+ info(enum BigEnum);
diff --git a/sys-auth/elogind/files/elogind.conf b/sys-auth/elogind/files/elogind.conf
new file mode 100644
index 0000000..b66a158
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.conf
@@ -0,0 +1,8 @@
+# /etc/conf.d/elogind: config file for /etc/init.d/elogind
+
+# this is the elogind executable
+ELOGIND_EXEC="/usr/libexec/elogind/elogind"
+
+# this is where elogind will store its pid file
+ELOGIND_PIDFILE="/var/run/elogind.pid"
+
diff --git a/sys-auth/elogind/files/elogind.conf.in b/sys-auth/elogind/files/elogind.conf.in
new file mode 100644
index 0000000..7b05b35
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.conf.in
@@ -0,0 +1,7 @@
+# /etc/conf.d/elogind: config file for /etc/init.d/elogind
+
+# this is the elogind executable
+ELOGIND_EXEC="/@libdir@/elogind/elogind"
+
+# this is where elogind will store its pid file
+ELOGIND_PIDFILE="/run/elogind.pid"
diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
new file mode 100644
index 0000000..019c3af
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.init
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need dbus
+
+ # Make sure elogind is up before xdm starts any dm
+ before xdm
+}
+
+start() {
+ ebegin "Starting elogind"
+
+ start-stop-daemon --start --quiet \
+ --pidfile "${ELOGIND_PIDFILE}" \
+ --exec "${ELOGIND_EXEC}" -- --daemon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping elogind"
+ start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
+ eend $?
+}