From 612bbda85991927cd57f5d0f946338768aa54af4 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 13 Jun 2016 23:38:28 +0200 Subject: media-sound/mpd: Fix configure with >=sys-apps/systemd-230 Gentoo-bug: 584742 Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/1651 Signed-off-by: Patrice Clement --- media-sound/mpd/files/mpd-0.9.15-systemd.patch | 106 +++++++++++++++++++++++++ media-sound/mpd/mpd-0.19.15.ebuild | 10 ++- 2 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 media-sound/mpd/files/mpd-0.9.15-systemd.patch (limited to 'media-sound/mpd') diff --git a/media-sound/mpd/files/mpd-0.9.15-systemd.patch b/media-sound/mpd/files/mpd-0.9.15-systemd.patch new file mode 100644 index 000000000000..cd03ebe16855 --- /dev/null +++ b/media-sound/mpd/files/mpd-0.9.15-systemd.patch @@ -0,0 +1,106 @@ +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 +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 + #include + +-#ifdef ENABLE_SYSTEMD_DAEMON ++#ifdef ENABLE_SYSTEMD + #include + #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 diff --git a/media-sound/mpd/mpd-0.19.15.ebuild b/media-sound/mpd/mpd-0.19.15.ebuild index 386d24ada927..ed101036896e 100644 --- a/media-sound/mpd/mpd-0.19.15.ebuild +++ b/media-sound/mpd/mpd-0.19.15.ebuild @@ -4,7 +4,7 @@ EAPI=6 -inherit eutils flag-o-matic linux-info multilib systemd user +inherit autotools eutils flag-o-matic linux-info multilib systemd user DESCRIPTION="The Music Player Daemon (mpd)" HOMEPAGE="http://www.musicpd.org" @@ -102,7 +102,10 @@ RDEPEND="${CDEPEND} selinux? ( sec-policy/selinux-mpd ) " -PATCHES=( "${FILESDIR}"/${PN}-0.18.conf.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-0.18.conf.patch + "${FILESDIR}"/${PN}-0.9.15-systemd.patch # bug 584742 +) pkg_setup() { use network || ewarn "Icecast and Shoutcast streaming needs networking." @@ -133,6 +136,7 @@ pkg_setup() { src_prepare() { cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed" default + eautoreconf } src_configure() { @@ -205,7 +209,7 @@ src_configure() { $(use_enable sid sidplay) \ $(use_enable sndfile sndfile) \ $(use_enable sqlite) \ - $(use_enable systemd systemd-daemon) \ + $(use_enable systemd) \ $(use_enable vorbis) \ $(use_enable wavpack) \ $(use_enable wildmidi) \ -- cgit v1.2.3-65-gdbad