Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2012 17:44:32 +0100
From:      nemysis <nemysis@gmx.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/174635: [PATCH] audio/portaudio2: update to 19.20111121, take maintainership, added OptionsNG, License
Message-ID:  <20121222164436.39745237@hub.freebsd.org>
Resent-Message-ID: <201212221650.qBMGo0TZ038797@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174635
>Category:       ports
>Synopsis:       [PATCH] audio/portaudio2: update to 19.20111121, take maintainership, added OptionsNG, License
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 22 16:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64

>Description:

Makefile changed:
+DISTNAME=	pa_stable_v${DISTVERSION:S/./_/}
+EXTRACT_SUFX=	.tgz
+LICENSE=	MIT
+.include <bsd.port.options.mk>
+post-patch:
+ post-install:
+.if ${PORT_OPTIONS:MDOXYGEN}
+.if ${PORT_OPTIONS:MEXAMPLES}

Changed and refined:
 Documentation
 pkg-descr
 pkg-plist

Generated and tested manually, tested with port test
>How-To-Repeat:

portlint -A
looks fine.

port test: clean

>Fix:

--- portaudio2.diff begins here ---
diff -ruN portaudio2.orig/Makefile portaudio2/Makefile
--- portaudio2.orig/Makefile	2012-12-05 00:40:59.000000000 +0100
+++ portaudio2/Makefile	2012-12-22 16:21:56.000000000 +0100
@@ -6,44 +6,85 @@
 #
 
 PORTNAME=	portaudio
-DISTVERSION=	19_20071207
+PORTVERSION=	19.20111121
 CATEGORIES=	audio
 MASTER_SITES=	http://www.portaudio.com/archives/
-DISTNAME=	pa_stable_v${DISTVERSION}
+DISTNAME=	pa_stable_v${DISTVERSION:S/./_/}
+EXTRACT_SUFX=	.tgz
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	nemysis@gmx.ch
 COMMENT=	Portable cross-platform Audio API
 
-USE_GMAKE=	yes
-GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--without-alsa	\
-		--libdir=${PREFIX}/lib/${PORTNAME}2 --includedir=${PREFIX}/include/${PORTNAME}2
-CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}2
+LICENSE=	MIT
 
-LATEST_LINK=	${PORTNAME}2
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-.include <bsd.port.pre.mk>
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS+=PKG_CONFIG_LIBDIR=${PREFIX}/libdata/pkgconfig \
+			--without-alsa \
+			--libdir=${PREFIX}/lib/${PORTNAME}2 \
+			--includedir=${PREFIX}/include/${PORTNAME}2
+
+USE_GMAKE=	yes
+USE_DOS2UNIX=	yes
+USE_PKGCONFIG=	build
+USE_LDCONFIG=	yes
+
+CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
+
+PORTDOCS=	*
+
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES1=	README.txt index.html
+
+OPTIONS_DEFINE=	JACK PATEST DOXYGEN
+
+OPTIONS_DEFAULT=	PATEST DOXYGEN
+
+PATEST_DESC=	PortAudio Test Programs
+
+.include <bsd.port.options.mk>
 
-.if exists(${LOCALBASE}/lib/libjack.so)
-WITH_JACK=	yes
+.if ${PORT_OPTIONS:MDOXYGEN}
+BUILD_DEPENDS+=	doxygen:${PORTSDIR}/devel/doxygen
 .endif
-.if !defined(WITH_JACK)
-CONFIGURE_ARGS+=	--without-jack
+
+.if ${PORT_OPTIONS:MJACK}
+CONFIGURE_ARGS+=--with-jack
+LIB_DEPENDS+=	jack:${PORTSDIR}/audio/jack
+.else
+CONFIGURE_ARGS+=--without-jack
+.endif
+
+.if defined(WITH_PATEST)
+PLIST_SUB+=	PATEST=""
 .else
-# Avoid a circular dependency
-CONFIGURE_ARGS+=	--with-jack
-#LIB_DEPENDS+=	jack.0:${PORTSDIR}/audio/jack
+PLIST_SUB+=	PATEST="@comment "
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|#include <malloc.h>|#include <stdlib.h>|' ${WRKSRC}/ltmain.sh
+	@${REINPLACE_CMD} -e 's|machine/soundcard.h|sys/soundcard.h|' ${WRKSRC}/configure.in \
+		${WRKSRC}/src/hostapi/oss/pa_unix_oss.c ${WRKSRC}/src/SConscript
+
+post-install:
+.if ${PORT_OPTIONS:MPATEST}
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/* ${PREFIX}/bin
 .endif
 
-pre-configure:
-# replace obsolete headers, and fix up thread library
-	${FIND} ${WRKSRC} -type f \
-		| ${XARGS} -x -n 10 \
-			${REINPLACE_CMD} -E \
-				-e 's|malloc.h|stdlib.h|' \
-				-e 's|-lpthread|${PTHREAD_LIBS}|'
-	${REINPLACE_CMD} -e '/pkgconfig/s|$$[(]libdir[)]|${PREFIX}/libdata|' ${WRKSRC}/Makefile.in
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
+.endif
+
+.if ${PORT_OPTIONS:MDOXYGEN}
+	@cd ${WRKSRC} && doxygen
+	@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${DOCSDIR})
+.endif
+
+.if ${PORT_OPTIONS:MEXAMPLES}
+	@cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}
+.endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN portaudio2.orig/distinfo portaudio2/distinfo
--- portaudio2.orig/distinfo	2012-12-05 00:40:59.000000000 +0100
+++ portaudio2/distinfo	2012-12-22 15:29:25.000000000 +0100
@@ -1,2 +1,2 @@
-SHA256 (pa_stable_v19_20071207.tar.gz) = 06a17727d56d382a69036de2ed9aee9a15cac0329b995b8cfcd69b357f47bf2b
-SIZE (pa_stable_v19_20071207.tar.gz) = 1113282
+SHA256 (pa_stable_v19_20111121.tgz) = 9c26d1330d506496789edafe55b0386f20d83c4aa2c0e3f81fbeb0f114ab1b99
+SIZE (pa_stable_v19_20111121.tgz) = 1422825
diff -ruN portaudio2.orig/pkg-descr portaudio2/pkg-descr
--- portaudio2.orig/pkg-descr	2012-12-05 00:40:59.000000000 +0100
+++ portaudio2/pkg-descr	2012-10-09 19:05:26.000000000 +0200
@@ -1,9 +1,12 @@
-PortAudio is a free, cross platform, open-source, audio I/O library.
-It lets you write simple audio programs in 'C' that will compile
-and run on many platforms including Windows, Macintosh (8,9,X),
-Unix (OSS), SGI, and BeOS. PortAudio is intended to promote the
-exchange of audio synthesis software between developers on different
-platforms, and was recently selected as the audio component of a
-larger PortMusic project that includes MIDI and sound file support.
+PortAudio is a free, cross-platform, open-source, audio I/O library.
+It lets you write simple audio programs in 'C' or C++ that will compile and run
+on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA).
+It is intended to promote the exchange of audio software between developers
+on different platforms. Many applications use PortAudio for Audio I/O.
+
+PortAudio provides a very simple API for recording and/or playing sound using
+a simple callback function or a blocking read/write interface.
+Example programs are included that play sine waves, process audio input
+(guitar fuzz), record and playback audio, list available audio devices, etc.
 
 WWW: http://www.portaudio.com/
diff -ruN portaudio2.orig/pkg-plist portaudio2/pkg-plist
--- portaudio2.orig/pkg-plist	2012-12-05 00:40:59.000000000 +0100
+++ portaudio2/pkg-plist	2012-12-22 15:39:52.000000000 +0100
@@ -1,8 +1,63 @@
+%%PATEST%%bin/pa_devs
+%%PATEST%%bin/pa_fuzz
+%%PATEST%%bin/pa_minlat
+%%PATEST%%bin/paex_pink
+%%PATEST%%bin/paex_read_write_wire
+%%PATEST%%bin/paex_record
+%%PATEST%%bin/paex_saw
+%%PATEST%%bin/paex_sine
+%%PATEST%%bin/paex_write_sine
+%%PATEST%%bin/paex_write_sine_nonint
+%%PATEST%%bin/paqa_devs
+%%PATEST%%bin/paqa_errs
+%%PATEST%%bin/paqa_latency
+%%PATEST%%bin/patest1
+%%PATEST%%bin/patest_buffer
+%%PATEST%%bin/patest_callbackstop
+%%PATEST%%bin/patest_clip
+%%PATEST%%bin/patest_dither
+%%PATEST%%bin/patest_hang
+%%PATEST%%bin/patest_in_overflow
+%%PATEST%%bin/patest_latency
+%%PATEST%%bin/patest_leftright
+%%PATEST%%bin/patest_longsine
+%%PATEST%%bin/patest_many
+%%PATEST%%bin/patest_maxsines
+%%PATEST%%bin/patest_mono
+%%PATEST%%bin/patest_multi_sine
+%%PATEST%%bin/patest_out_underflow
+%%PATEST%%bin/patest_prime
+%%PATEST%%bin/patest_ringmix
+%%PATEST%%bin/patest_sine8
+%%PATEST%%bin/patest_sine_channelmaps
+%%PATEST%%bin/patest_sine_formats
+%%PATEST%%bin/patest_sine_srate
+%%PATEST%%bin/patest_sine_time
+%%PATEST%%bin/patest_start_stop
+%%PATEST%%bin/patest_stop
+%%PATEST%%bin/patest_stop_playout
+%%PATEST%%bin/patest_toomanysines
+%%PATEST%%bin/patest_two_rates
+%%PATEST%%bin/patest_underflow
+%%PATEST%%bin/patest_wire
 include/portaudio2/portaudio.h
 lib/portaudio2/libportaudio.a
 lib/portaudio2/libportaudio.la
 lib/portaudio2/libportaudio.so
 lib/portaudio2/libportaudio.so.2
 libdata/pkgconfig/portaudio-2.0.pc
-@dirrm include/portaudio2
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pa_devs.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pa_fuzz.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_mono_asio_channel_select.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_pink.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_read_write_wire.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_record.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_saw.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_sine.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_wmme_ac3.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_wmme_surround.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_write_sine.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/paex_write_sine_nonint.c
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
 @dirrm lib/portaudio2
+@dirrm include/portaudio2
--- portaudio2.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121222164436.39745237>