From takefu@airport.fm  Thu Aug 19 06:16:30 2010
Return-Path: <takefu@airport.fm>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 077FC1065697
	for <freebsd-gnats-submit@freebsd.org>; Thu, 19 Aug 2010 06:16:30 +0000 (UTC)
	(envelope-from takefu@airport.fm)
Received: from ae-osaka.co.jp (unknown [IPv6:2001:3e0:4ec:a000::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 940C88FC13
	for <freebsd-gnats-submit@freebsd.org>; Thu, 19 Aug 2010 06:16:29 +0000 (UTC)
Received: from ae-osaka.co.jp (localhost.ae-osaka.co.jp [127.0.0.1])
	by ae-osaka.co.jp (Postfix) with ESMTP id ED1D61146E
	for <freebsd-gnats-submit@freebsd.org>; Thu, 19 Aug 2010 15:16:28 +0900 (JST)
Received: from ae-osaka.co.jp ([127.0.0.1])
	by ae-osaka.co.jp (ae-osaka.co.jp [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id IviJJ+MtV8jm for <freebsd-gnats-submit@freebsd.org>;
	Thu, 19 Aug 2010 15:16:28 +0900 (JST)
Received: from [IPv6:2001:3e0:4ec:a011:d8ef:8751:ca79:39de] (unknown [IPv6:2001:3e0:4ec:a011:d8ef:8751:ca79:39de])
	by ae-osaka.co.jp (Postfix) with ESMTPSA id BCDE311469
	for <freebsd-gnats-submit@freebsd.org>; Thu, 19 Aug 2010 15:16:28 +0900 (JST)
Message-Id: <4C6CCC3C.3020707@airport.fm>
Date: Thu, 19 Aug 2010 15:16:28 +0900
From: Takefu <takefu@airport.fm>
To: freebsd-gnats-submit@freebsd.org
Subject: [PATCH] audio/darkice to 1.0 libaacplus support

>Number:         149795
>Category:       ports
>Synopsis:       [UPDATE] audio/darkice: libaacplus support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    amdmi3
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 19 06:20:04 UTC 2010
>Closed-Date:    Thu Sep 23 04:40:20 UTC 2010
>Last-Modified:  Thu Sep 23 04:40:20 UTC 2010
>Originator:     Takefu
>Release:        
>Organization:
FOX Amateur Radio Club
>Environment:
>Description:
libaacplus support PR #149794
Use new USE_RC_SUBR format
Fix config file handling

>How-To-Repeat:
>Fix:
--- darkice.diff begins here ---
diff -ruN /usr/ports/audio/darkice/Makefile audio/darkice/Makefile
--- /usr/ports/audio/darkice/Makefile	2010-07-21 16:52:35.000000000 +0900
+++ audio/darkice/Makefile	2010-08-03 19:45:16.000000000 +0900
@@ -19,16 +19,20 @@
 		TWOLAME "TwoLAME support for MP2" off \
 		FAAC "FAAC support for AAC" off \
 		JACK "Jack support" off \
+		AACPLUS "AAC HEv2 support" off \
 		SAMPLERATE "Libsamplerate support" off

 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	CPPFLAGS="${PTHREAD_CFLAGS}" LDFLAGS="${PTHREAD_LIBS}" \
 		ac_cv_prog_acx_pthread_config=no
-CONFIGURE_ARGS=	--without-alsa --without-aacplus
+CONFIGURE_ARGS=	--without-alsa
+
+SUB_FILES=	pkg-message
+USE_RC_SUBR=	${PORTNAME}

 MAN1=		darkice.1
 MAN5=		darkice.cfg.5
-PLIST_FILES=	bin/darkice etc/darkice.cfg
+PLIST_FILES=	bin/darkice etc/darkice.cfg.dist

 .include <bsd.port.pre.mk>

@@ -67,6 +71,13 @@
 CONFIGURE_ARGS+=	--without-jack
 .endif

+.if defined(WITH_AACPLUS)
+LIB_DEPENDS+=	aacplus.1:${PORTSDIR}/audio/libaacplus
+CONFIGURE_ARGS+=	--with-aacplus-prefix=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--without-aacplus
+.endif
+
 .if defined(WITH_SAMPLERATE)
 LIB_DEPENDS+=	samplerate.1:${PORTSDIR}/audio/libsamplerate
 CONFIGURE_ARGS+=	--with-samplerate-prefix=${LOCALBASE}
@@ -78,4 +89,11 @@
 	@${REINPLACE_CMD} -e '/test/s|==|=|g' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's|-O2 -pedantic||g' ${WRKSRC}/src/Makefile.in

+do-install:
+	@${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin
+	@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.cfg ${PREFIX}/etc/${PORTNAME}.cfg.dist
+	@${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.1 ${MANPREFIX}/man/man1
+	@${INSTALL_MAN} ${WRKSRC}/man/${PORTNAME}.cfg.5 ${MANPREFIX}/man/man5
+	@${CAT} ${PKGMESSAGE}
+
 .include <bsd.port.post.mk>
diff -ruN /usr/ports/audio/darkice/files/darkice.in audio/darkice/files/darkice.in
--- /usr/ports/audio/darkice/files/darkice.in	1970-01-01 09:00:00.000000000 +0900
+++ audio/darkice/files/darkice.in	2010-04-15 15:09:19.000000000 +0900
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: darkice
+# REQUIRE: DAEMON
+# BEFORE:  LOGIN
+# KEYWORD: SHUTDOWN
+
+. "/etc/rc.subr"
+
+name="darkice"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/$name"
+command_args="& 1>/dev/null"
+required_files="%%ETCDIR%%.cfg"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${darkice_enable="NO"}
+: ${darkice_flags="-c ${required_files}"}
+
+run_rc_command "$1"
diff -ruN /usr/ports/audio/darkice/files/pkg-message.in audio/darkice/files/pkg-message.in
--- /usr/ports/audio/darkice/files/pkg-message.in	1970-01-01 09:00:00.000000000 +0900
+++ audio/darkice/files/pkg-message.in	2010-04-15 16:44:52.000000000 +0900
@@ -0,0 +1,19 @@
+********************************************************************
+Unless this file already existed, a sample configuration file
+has been placed in %%ETCDIR%%.cfg.
+
+Please edit it according to your needs.
+
+********************************************************************
+
+The darkice will *not* be started automatically. To allow it
+to start, put this line in /etc/rc.conf:
+
+darkice_enable="YES"
+
+Then, it will be started on the next boot. If this line is already
+present, the client will be started now.  Otherwise, edit
+/etc/rc.conf and execute this command:
+
+    %%ETCDIR%%/rc.d/darkice start
+********************************************************************
--- darkice.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->amdmi3 
Responsible-Changed-By: amdmi3 
Responsible-Changed-When: Thu Aug 19 17:42:43 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149795 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149795: commit references a PR
Date: Thu, 23 Sep 2010 04:09:44 +0000 (UTC)

 amdmi3      2010-09-23 04:09:39 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/darkice        Makefile 
   Added files:
     audio/darkice/files  darkice.in pkg-message.in 
   Log:
   - added libaacplus support
   - added rc.d script
   - improved config file handling
   
   PR:             149795
   Submitted by:   Takefu <takefu@airport.fm>
   
   Revision  Changes    Path
   1.34      +21 -3     ports/audio/darkice/Makefile
   1.1       +25 -0     ports/audio/darkice/files/darkice.in (new)
   1.1       +19 -0     ports/audio/darkice/files/pkg-message.in (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: amdmi3 
State-Changed-When: Thu Sep 23 04:40:19 UTC 2010 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

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