You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-sound/mpd/files/mpd-0.9.15-systemd.patch

107 lines
3.0 KiB

Description: transition to libsystemd from deprecated libsystemd-daemon
systemd 209 merged the various libsystemd-* libraries into a single
libsystemd.so, so we check for that instead and rename the configure
option, define, etc accordingly.
Author: Florian Schlichting <fsfs@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779762
Forwarded: not-needed (solved in a less invasive and backward-compatible way upstream)
--- a/configure.ac
+++ b/configure.ac
@@ -572,10 +572,10 @@
MPD_DEPENDS([enable_sqlite], [enable_glib],
[Cannot use --enable-sqlite with --disable-glib])
-AC_ARG_ENABLE(systemd-daemon,
- AS_HELP_STRING([--enable-systemd-daemon],
- [use the systemd daemon library (default=auto)]),,
- [enable_systemd_daemon=$linux_auto])
+AC_ARG_ENABLE(systemd,
+ AS_HELP_STRING([--enable-systemd],
+ [use the systemd library (default=auto)]),,
+ [enable_systemd=$linux_auto])
AC_ARG_ENABLE(tcp,
AS_HELP_STRING([--disable-tcp],
@@ -762,11 +762,11 @@
AC_MSG_ERROR([No client interfaces configured!])
fi
-MPD_AUTO_PKG(systemd_daemon, SYSTEMD_DAEMON, libsystemd-daemon,
- [systemd activation], [libsystemd-daemon not found])
-AM_CONDITIONAL(ENABLE_SYSTEMD_DAEMON, test x$enable_systemd_daemon = xyes)
-if test x$enable_systemd_daemon = xyes; then
- AC_DEFINE([ENABLE_SYSTEMD_DAEMON], 1, [Define to use the systemd daemon library])
+MPD_AUTO_PKG(systemd, SYSTEMD, libsystemd,
+ [systemd activation], [libsystemd not found])
+AM_CONDITIONAL(ENABLE_SYSTEMD, test x$enable_systemd = xyes)
+if test x$enable_systemd = xyes; then
+ AC_DEFINE([ENABLE_SYSTEMD], 1, [Define to use the systemd library])
fi
dnl ---------------------------------------------------------------------------
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,7 +58,7 @@
$(ICU_LDADD) \
libutil.a \
$(FS_LIBS) \
- $(SYSTEMD_DAEMON_LIBS) \
+ $(SYSTEMD_LIBS) \
$(GLIB_LIBS)
src_mpd_SOURCES = \
--- a/config.h.in
+++ b/config.h.in
@@ -75,8 +75,8 @@
/* Define to enable sqlite database support */
#undef ENABLE_SQLITE
-/* Define to use the systemd daemon library */
-#undef ENABLE_SYSTEMD_DAEMON
+/* Define to use the systemd library */
+#undef ENABLE_SYSTEMD
/* Define to enable the TwoLAME encoder plugin */
#undef ENABLE_TWOLAME_ENCODER
--- a/src/Listen.cxx
+++ b/src/Listen.cxx
@@ -32,7 +32,7 @@
#include <string.h>
#include <assert.h>
-#ifdef ENABLE_SYSTEMD_DAEMON
+#ifdef ENABLE_SYSTEMD
#include <systemd/sd-daemon.h>
#endif
@@ -77,7 +77,7 @@
}
}
-#ifdef ENABLE_SYSTEMD_DAEMON
+#ifdef ENABLE_SYSTEMD
static bool
listen_systemd_activation(Error &error_r)
@@ -109,7 +109,7 @@
listen_socket = new ClientListener(loop, partition);
-#ifdef ENABLE_SYSTEMD_DAEMON
+#ifdef ENABLE_SYSTEMD
if (listen_systemd_activation(error))
return true;
--- a/doc/user.xml
+++ b/doc/user.xml
@@ -110,7 +110,7 @@
libupnp-dev \
libavahi-client-dev \
libsqlite3-dev \
- libsystemd-daemon-dev libwrap0-dev \
+ libsystemd-dev libwrap0-dev \
libcppunit-dev xmlto \
libboost-dev \
libglib2.0-dev libicu-dev