From crees@zeus.bayofrum.net  Sun Apr 24 21:04:24 2011
Return-Path: <crees@zeus.bayofrum.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 146691065672
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Apr 2011 21:04:19 +0000 (UTC)
	(envelope-from crees@zeus.bayofrum.net)
Received: from mail.skyusermail.com (mail.skyusermail.com [77.240.11.49])
	by mx1.freebsd.org (Postfix) with ESMTP id 761A08FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Apr 2011 21:04:18 +0000 (UTC)
Received: from Spooler by mail.skyusermail.com (Mercury/32 v4.52) ID MO0315E7;
    24 Apr 2011 22:04:17 +0100
Received: from spooler by mail.skyusermail.com (Mercury/32 v4.52); 24 Apr 2011 22:04:02 +0100
Received: from zeus.bayofrum.net (90.221.7.100) by mail.skyusermail.com (Mercury/32 v4.52) with ESMTP
  ID MG0315E6 (Using SSL/TLS, 3DES, CBC mode, keysize 192 bits) ; 24 Apr 2011 22:04:00 +0100
Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1])
	by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p3OL3f1Y037779
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO);
	Sun, 24 Apr 2011 22:03:41 +0100 (BST)
	(envelope-from crees@zeus.bayofrum.net)
Received: (from crees@localhost)
	by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p3OL3fLG037778;
	Sun, 24 Apr 2011 22:03:41 +0100 (BST)
	(envelope-from crees)
Message-Id: <201104242103.p3OL3fLG037778@zeus.bayofrum.net>
Date: Sun, 24 Apr 2011 22:03:41 +0100 (BST)
From: Chris Rees <utisoft@gmail.com>
Reply-To: Chris Rees <utisoft@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: nivit@freebsd.org, hrkfdn@gmail.com
Subject: [MAINTAINER] Fix port: audio/musicpd Add avahi OPTION & resolve CONFLICT
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         156625
>Category:       ports
>Synopsis:       [MAINTAINER] Fix port: audio/musicpd Add avahi OPTION & resolve CONFLICT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    nivit
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 24 21:10:11 UTC 2011
>Closed-Date:    Sun Apr 24 23:08:10 UTC 2011
>Last-Modified:  Sun Apr 24 23:08:10 UTC 2011
>Originator:     Chris Rees
>Release:        FreeBSD 8.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD zeus.bayofrum.net 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Sun Feb 27 22:19:51 UTC 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386


	
>Description:
	
>How-To-Repeat:
	
>Fix:

	- Add OPTION for avahi, stop autoactivating
	- Rename binary to musicpd, removing CONFLICT

	Submitted by: Chris Rees (utisoft_at_gmail.com) (maintainer)

	Also, to fix sonata and mpdbrowser's dependencies, patches at [1] and
	[2] (maintainers CC'd)

	[3] is a patch to mpich2, which has the conflict removed (also passing
	maintainership to me)

	[1] http://www.bayofrum.net/~crees/patches/sonata-mpdname.diff
	[2] http://www.bayofrum.net/~crees/patches/mpdbrowser-mpdname.diff
	[3] http://www.bayofrum.net/~crees/patches/mpich2-conflict-remove.diff

--- musicpd-avahi.diff begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/musicpd/Makefile,v
retrieving revision 1.62
diff -u -r1.62 Makefile
--- Makefile	20 Mar 2011 21:28:56 -0000	1.62
+++ Makefile	24 Apr 2011 20:52:10 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	musicpd
 PORTVERSION=	0.16.2
+PORTREVISION=	1
 CATEGORIES=	audio ipv6
 MASTER_SITES=	SF/${PORTNAME}/mpd/${PORTVERSION}
 DISTNAME=	mpd-${PORTVERSION}
@@ -19,8 +20,6 @@
 
 LICENSE=	GPLv2
 
-CONFLICTS_INSTALL=	mpich2-[1-9]*
-
 USE_GMAKE=	yes
 USE_BZIP2=	yes
 GNU_CONFIGURE=	yes
@@ -32,16 +31,17 @@
 
 CFLAGS+=	-I${PREFIX}/include
 
-MAN1=		mpd.1
-MAN5=		mpd.conf.5
+MAN1=		${PORTNAME}.1
+MAN5=		${MPDCONF}.5
 
-DOCSDIR=	${PREFIX}/share/doc/mpd
-PORTDOCS=	mpdconf.example AUTHORS README COPYING NEWS UPGRADING
+DOCSDIR?=	${PREFIX}/share/doc/mpd
+PORTDOCS=	AUTHORS README COPYING NEWS UPGRADING
 
 SUB_FILES=	pkg-message
 
 OPTIONS=	ID3TAG          "Support ID3 v1/v2 tags"                on \
 		IPV6            "Support IPv6 protocol"                 on \
+		AVAHI		"Support Zeroconf through Avahi"	off \
 		FLAC            "Support FLAC audio format"             on \
 		VORBIS          "Support OGG Vorbis audio format"       on \
 		WAV             "Support WAV audio format"              on \
@@ -188,6 +188,13 @@
 CONFIGURE_ARGS+=--disable-ipv6
 .endif
 
+.if defined(WITHOUT_AVAHI)
+CONFIGURE_ARGS+=--with-zeroconf=no
+.else
+CONFIGURE_ARGS+=--with-zeroconf=avahi
+LIB_DEPENDS+=	avahi-client.3:${PORTSDIR}/net/avahi-app
+.endif
+
 .if defined(WITH_AO)
 CONFIGURE_ARGS+=--enable-ao
 LIB_DEPENDS+=	ao.4:${PORTSDIR}/audio/libao
@@ -229,15 +236,29 @@
 	@${REINPLACE_CMD} -e 's,^#\([^"]*"\)~/,\1${MPDDIR}/,g' \
 		-e 's,^#\(user[^"]*"\)nobody,\1${MPDUSER},g' \
 		${WRKSRC}/doc/mpdconf.example
+# Fix man pages for executable names
+	@${REINPLACE_CMD} -e 's/^\(\.B m\)/\1usic/' \
+		-e 's#^\(\.BI \)/etc/mpd.conf#\1${PREFIX}/etc/${MPDCONF}#' \
+		-e 's#^mpd.conf#${MPDCONF}#' \
+		-e 's#^mpd(1)#musicpd(1)#' \
+		${WRKSRC}/doc/mpd.1 ${WRKSRC}/doc/mpd.conf.5
 .if (${OSVERSION} < 800000)
 	${REINPLACE_CMD} -e 's/nan[f]\{0,1\}(\"\")/NAN/g' \
 		${WRKSRC}/src/crossfade.c \
 		${WRKSRC}/src/player_thread.c \
 		${WRKSRC}/src/player_control.c
 .endif
-.if defined(NOPORTDOCS)
-	@${REINPLACE_CMD} -e 's|install-docDATA ||' \
-		${WRKSRC}/Makefile.in
+
+do-install:
+	@${INSTALL_PROGRAM} ${WRKSRC}/src/mpd ${PREFIX}/bin/${PORTNAME}
+	@${INSTALL_MAN} ${WRKSRC}/doc/mpd.1 ${MAN1PREFIX}/man/man1/${PORTNAME}.1
+	@${INSTALL_MAN} ${WRKSRC}/doc/mpd.conf.5 \
+		${MAN5PREFIX}/man/man5/${MPDCONF}.5
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+.   for doc in ${PORTDOCS}
+	@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}/
+.   endfor
 .endif
 
 post-install:
Index: pkg-plist
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/musicpd/pkg-plist,v
retrieving revision 1.8
diff -u -r1.8 pkg-plist
--- pkg-plist	25 Jul 2010 02:48:54 -0000	1.8
+++ pkg-plist	24 Apr 2011 20:52:10 -0000
@@ -1,5 +1,5 @@
-bin/mpd
-@dirrmtry var/mpd
+@stopdaemon musicpd
+bin/musicpd
 @unexec if cmp -s %D/etc/%%MPDCONF%%.sample %D/etc/%%MPDCONF%%; then rm -f %D/etc/%%MPDCONF%%; fi
 etc/%%MPDCONF%%.sample
 @exec if [ ! -f %D/etc/%%MPDCONF%% ] ; then cp -p %D/%F %B/%%MPDCONF%%; fi
Index: files/musicpd.in
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/musicpd/files/musicpd.in,v
retrieving revision 1.6
diff -u -r1.6 musicpd.in
--- files/musicpd.in	3 Feb 2011 20:19:41 -0000	1.6
+++ files/musicpd.in	24 Apr 2011 20:52:10 -0000
@@ -3,7 +3,7 @@
 # $FreeBSD: ports/audio/musicpd/files/musicpd.in,v 1.6 2011/02/03 20:19:41 bapt Exp $
 #
 # PROVIDE: musicpd
-# REQUIRE: mixer LOGIN
+# REQUIRE: mixer LOGIN avahi_daemon
 # KEYWORD: shutdown
 
 # Add the following line to /etc/rc.conf to enable mpd:
@@ -17,7 +17,7 @@
 stop_cmd="${name}_stop"
 
 config=%%PREFIX%%/etc/%%MPDCONF%%
-command=%%PREFIX%%/bin/mpd
+command=%%PREFIX%%/bin/musicpd
 required_files=$config
 
 musicpd_stop()
--- musicpd-avahi.diff ends here ---



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

>Release-Note:
>Audit-Trail:

From: Chris Rees <utisoft@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/156625: [MAINTAINER] Fix port: audio/musicpd Add avahi
 OPTION & resolve CONFLICT
Date: Sun, 24 Apr 2011 22:13:53 +0100

 Argh, my mail server complained about the addresses on the first one, sorry.
 
 Please mark this as a duplicate of ports/156624
 
 Chris
Responsible-Changed-From-To: freebsd-ports-bugs->nivit 
Responsible-Changed-By: nivit 
Responsible-Changed-When: Sun Apr 24 21:56:04 UTC 2011 
Responsible-Changed-Why:  
I will take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156625 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Apr 24 23:07:54 UTC 2011 
State-Changed-Why:  
Duplicate of ports/156624. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156625 
>Unformatted:
