media-sound/mt-daapd: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Mon, 8 Apr 2019 16:43:23 +0000 (18:43 +0200)
committerDavid Seifert <soap@gentoo.org>
Mon, 8 Apr 2019 16:43:23 +0000 (18:43 +0200)
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: David Seifert <soap@gentoo.org>
media-sound/mt-daapd/files/mt-daapd-0.2.3-sparc.patch
media-sound/mt-daapd/files/mt-daapd-0.2.4.1-libsorder.patch
media-sound/mt-daapd/files/mt-daapd-0.2.4.1-pidfile.patch
media-sound/mt-daapd/files/mt-daapd-0.2.4.2-maintainer-mode.patch
media-sound/mt-daapd/files/mt-daapd-0.2.4.2-oggvorbis.patch
media-sound/mt-daapd/files/mt-daapd.init.2
media-sound/mt-daapd/mt-daapd-0.2.4.2.ebuild

index 482b25c137793c053b2066768b2ab075028343c5..71d3009c8aca76981dc7f54cb8caa4ebac8d33a3 100644 (file)
@@ -1,6 +1,5 @@
-diff -Nura mt-daapd-0.2.3/src/mp3-scanner.c mt-daapd-0.2.3.sparc/src/mp3-scanner.c
---- mt-daapd-0.2.3/src/mp3-scanner.c   2005-02-05 18:22:47.000000000 -0300
-+++ mt-daapd-0.2.3.sparc/src/mp3-scanner.c     2006-01-03 16:39:50.000000000 -0300
+--- a/src/mp3-scanner.c
++++ b/src/mp3-scanner.c
 @@ -1663,14 +1663,14 @@
      /* now check for an XING header */
      if(strncasecmp((char*)&buffer[index+fi.xing_offset+4],"XING",4) == 0) {
index a4c5a176ada46b600067a3bbaa8b0992ec8d5bad..91d9e848c12474674061b4b299ad884a81dcc239 100644 (file)
@@ -1,6 +1,5 @@
-diff -ur mt-daapd-0.2.4.1.orig/configure.in mt-daapd-0.2.4.1/configure.in
---- mt-daapd-0.2.4.1.orig/configure.in 2007-10-22 02:50:24.000000000 +0300
-+++ mt-daapd-0.2.4.1/configure.in      2007-10-28 23:31:43.000000000 +0200
+--- a/configure.in
++++ b/configure.in
 @@ -20,8 +20,9 @@
  CPPFLAGS="${CPPFLAGS} -g"
  
@@ -126,8 +125,8 @@ diff -ur mt-daapd-0.2.4.1.orig/configure.in mt-daapd-0.2.4.1/configure.in
    fi
  fi
 diff -ur mt-daapd-0.2.4.1.orig/src/Makefile.am mt-daapd-0.2.4.1/src/Makefile.am
---- mt-daapd-0.2.4.1.orig/src/Makefile.am      2007-10-22 03:32:27.000000000 +0300
-+++ mt-daapd-0.2.4.1/src/Makefile.am   2007-10-28 23:31:33.000000000 +0200
+--- a/src/Makefile.am
++++ b/src/Makefile.am
 @@ -34,6 +34,9 @@
        redblack.c redblack.h dynamic-art.c dynamic-art.h query.c query.h \
        $(PRENDSRC) $(ORENDSRC) $(HRENDSRC) $(OGGVORBISSRC) $(ARENDSRC)
index 5976316e5bf257a3a8f8ea45256c0648d18f4c31..71178f678118d098da1cb2fed261da9cebcb2bf4 100644 (file)
@@ -1,6 +1,5 @@
-diff -ur mt-daapd-0.2.4.1.orig/src/main.c mt-daapd-0.2.4.1/src/main.c
---- mt-daapd-0.2.4.1.orig/src/main.c   2007-10-22 02:27:57.000000000 +0300
-+++ mt-daapd-0.2.4.1/src/main.c        2007-10-28 23:54:29.000000000 +0200
+--- a/src/main.c
++++ b/src/main.c
 @@ -551,6 +551,7 @@
      printf("  -m             Disable mDNS\n");
      printf("  -c <file>      Use configfile specified\n");
index a81483db6a11770822e5e2633cbc4ea44b8f577b..7fc127fa6957456d483d543aadd52d8c10d05333 100644 (file)
@@ -1,5 +1,5 @@
---- configure.in.orig  2008-07-06 23:57:08.000000000 +0200
-+++ configure.in       2008-07-06 23:57:46.000000000 +0200
+--- a/configure.in
++++ b/configure.in
 @@ -17,10 +17,12 @@
  rend_posix=true
  
index 714f34142ac2f0e06ef1f9d0f288aeaac611538e..b0352587a96597b3cce3423a0a17e58977d5e29a 100644 (file)
@@ -1,5 +1,5 @@
---- configure.in.orig  2009-03-11 08:15:14.000000000 -0500
-+++ configure.in       2009-03-11 08:25:36.000000000 -0500
+--- a/configure.in
++++ b/configure.in
 @@ -63,9 +63,14 @@
  AC_SUBST(AVAHI_LIBS)
  
index eacc6ea7b7e1313ad53b6d3d5bc9754f19e77b60..c77b7dd2bb5dc1e60a79d9a42415f3df61e4bc04 100644 (file)
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 # Somehow based on init.d file shipped with mt-daapd itself.
 #
@@ -26,7 +26,7 @@ fi
 
 depend() {
        need net
-       #USEHOWL need mDNSResponderPosix
+       need avahi-daemon
 }
 
 start() {
index a36e59993f8ebaa9d2f872a363859124c242fe96..572b7c21787837b5befdb52701a6f9e64ee4f32a 100644 (file)
@@ -1,11 +1,12 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=2
-inherit autotools eutils
+EAPI=7
+
+inherit autotools
 
 DESCRIPTION="A multi-threaded implementation of Apple's DAAP server"
-HOMEPAGE="http://www.mt-daapd.org"
+HOMEPAGE="https://sourceforge.net/projects/mt-daapd/"
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 
 LICENSE="GPL-2"
@@ -13,63 +14,69 @@ SLOT="0"
 KEYWORDS="amd64 arm ~hppa ~mips ppc sh sparc x86 ~amd64-linux ~x86-linux"
 IUSE="vorbis"
 
-RDEPEND="media-libs/libid3tag
-       sys-libs/gdbm
-       net-dns/avahi[dbus]
-       vorbis? ( media-libs/libvorbis )"
+RDEPEND="
+       media-libs/libid3tag:=
+       net-dns/avahi:=[dbus]
+       sys-libs/gdbm:=
+       sys-libs/zlib:=
+       vorbis? (
+               media-libs/libvorbis:=
+               media-libs/libogg:=
+       )"
 DEPEND="${RDEPEND}
        virtual/pkgconfig"
 
-src_prepare() {
-       cp "${FILESDIR}"/${PN}.init.2 initd
-
-       sed -i -e 's:#USEHOWL need mDNSResponderPosix:need avahi-daemon:' initd
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.2.3-sparc.patch
+       "${FILESDIR}"/${PN}-0.2.4.1-libsorder.patch
+       "${FILESDIR}"/${PN}-0.2.4.1-pidfile.patch
+       "${FILESDIR}"/${P}-maintainer-mode.patch
+       "${FILESDIR}"/${P}-oggvorbis.patch
+)
 
-       epatch "${FILESDIR}"/${PN}-0.2.3-sparc.patch \
-               "${FILESDIR}"/${PN}-0.2.4.1-libsorder.patch \
-               "${FILESDIR}"/${PN}-0.2.4.1-pidfile.patch \
-               "${FILESDIR}"/${P}-maintainer-mode.patch \
-               "${FILESDIR}"/${P}-oggvorbis.patch
+src_prepare() {
+       default
+       mv configure.{in,ac} || die
        eautoreconf
 }
 
 src_configure() {
-       econf $(use_enable vorbis oggvorbis) \
+       econf \
+               $(use_enable vorbis oggvorbis) \
                --disable-maintainer-mode \
                --enable-avahi \
                --disable-mdns
 }
 
 src_install() {
-       emake DESTDIR="${D}" install || die "emake install failed."
+       default
 
        insinto /etc
        newins contrib/mt-daapd.conf mt-daapd.conf.example
        doins contrib/mt-daapd.playlist
 
-       newinitd initd ${PN}
+       newinitd "${FILESDIR}"/${PN}.init.2 ${PN}
 
        keepdir /var/cache/mt-daapd /etc/mt-daapd.d
-       dodoc AUTHORS ChangeLog CREDITS NEWS README TODO
 }
 
 pkg_postinst() {
-       einfo
+       elog
        elog "You have to configure your mt-daapd.conf following"
-       elog "/etc/mt-daapd.conf.example file."
-       einfo
+       elog "${EROOT}/etc/mt-daapd.conf.example file."
+       elog
 
        if use vorbis; then
-               einfo
-               elog "You need to edit you extensions list in /etc/mt-daapd.conf"
+               elog
+               elog "You need to edit you extensions list in ${EROOT}/etc/mt-daapd.conf"
                elog "if you want your mt-daapd to serve ogg files."
-               einfo
+               elog
        fi
 
-       einfo
+       elog
        elog "If you want to start more than one ${PN} service, symlink"
-       elog "/etc/init.d/${PN} to /etc/init.d/${PN}.<name>, and it will"
-       elog "load the data from /etc/${PN}.d/<name>.conf."
+       elog "${EROOT}/etc/init.d/${PN} to ${EROOT}/etc/init.d/${PN}.<name>, and it will"
+       elog "load the data from ${EROOT}/etc/${PN}.d/<name>.conf."
        elog "Make sure that you have different cache directories for them."
-       einfo
+       elog
 }