Bug 172678 - [PATCH] audio/portaudio: update to 19.20111121, take maintainership, OptionsNG
Summary: [PATCH] audio/portaudio: update to 19.20111121, take maintainership, OptionsNG
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marcus von Appen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-13 23:50 UTC by nemysis
Modified: 2012-12-30 18:00 UTC (History)
0 users

See Also:


Attachments
portaudio-19.20111121.patch (12.27 KB, patch)
2012-10-13 23:50 UTC, nemysis
no flags Details | Diff
portaudio.diff (9.39 KB, patch)
2012-12-22 13:32 UTC, nemysis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nemysis 2012-10-13 23:50:00 UTC
- Update to 19.20111121
- Take maintainership

Removed file(s):
- files/patch-Makefile.in
- files/patch-configure
- files/patch-pa_tests::patest_record.c
- files/patch-pa_tests::patest_wire.c

Makefile changed:

+LICENSE=	MIT

+OPTIONS_DEFINE=	ALSA JACK PATEST DOXYGEN

+.include <bsd.port.options.mk>

Changed
+post-patch:

+.if defined(WITH_PATEST)

Changed pkg-plist

+%%PATEST%%bin/pa_devs

Generated and tested manually, tested with port test and with RedPorts (all RELEASES, CLANG), sent with FreeBSD Port Tools 0.99_6 (mode: update, diff: ports)

How-To-Repeat: 
portlint -A
WARN: Makefile: [70]: use ${VARIABLE}, instead of $(VARIABLE).
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: only one MASTER_SITE configured.  Consider adding additional mirrors.
0 fatal errors and 3 warnings found.

WARN: Makefile: [70] because is used

@${REINPLACE_CMD} -e 's|$$(DESTDIR)$$(libdir)/pkgconfig|$$(DESTDIR)$$(PREFIX)/libdata/pkgconfig|g' \


port test: clean


Build log

https://redports.org/buildarchive/20121013175137-33493/
Comment 1 Marcus von Appen freebsd_committer freebsd_triage 2012-12-22 10:54:25 UTC
State Changed
From-To: open->feedback

audio/portaudio2 exists in the ports tree, which uses the new API and 
ABI from V19 - audio/portaudio uses V18, which is still needed by one 
port or the other. Please use audio/portaudio2 for the update instead 
and ensure that there are no ABI or API breakages, which might have an 
impact on depending ports.
Comment 2 nemysis 2012-12-22 13:32:45 UTC
Thanks this is now update for audio/portaudio

Makefile changed:
+CPPFLAGS+=     -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+LDFLAGS+=      -L${LOCALBASE}/lib ${PTHREAD_CFLAGS}
+PORTDOCS=      *
+OPTIONS_DEFINE=        PATEST
+OPTIONS_DEFAULT=       PATEST
+PATEST_DESC=   PortAudio Test Programs
+.include <bsd.port.options.mk>


Changed and refined:
 post-patch:
 post-install
 pkg-descr
 pkg-plist

Patches no use more :: now is __

Removed files:
files/patch-pa_tests::patest_record.c
files/patch-pa_tests::patest_wire.c


Added files:
files/patch-pa_tests-patest__record.c
files/patch-pa_tests-patest__wire.c
Comment 3 Marcus von Appen freebsd_committer freebsd_triage 2012-12-23 08:28:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mva

I'll take it.
Comment 4 dfilter service freebsd_committer freebsd_triage 2012-12-30 17:57:18 UTC
Author: mva
Date: Sun Dec 30 17:57:04 2012
New Revision: 309683
URL: http://svnweb.freebsd.org/changeset/ports/309683

Log:
  - Convert to OptionsNG framework
  - Trim Makefile headers
  - Add LICENSE
  - Pass maintainership to submitter
  
  PR:		ports/172678
  Submitted by:	nemysis <nemysis@gmx.ch>

Added:
  head/audio/portaudio/files/patch-pa_tests-patest__record.c   (contents, props changed)
  head/audio/portaudio/files/patch-pa_tests-patest__wire.c   (contents, props changed)
Deleted:
  head/audio/portaudio/files/patch-pa_tests::patest_record.c
  head/audio/portaudio/files/patch-pa_tests::patest_wire.c
Modified:
  head/audio/portaudio/Makefile   (contents, props changed)
  head/audio/portaudio/pkg-descr   (contents, props changed)
  head/audio/portaudio/pkg-plist   (contents, props changed)

Modified: head/audio/portaudio/Makefile
==============================================================================
--- head/audio/portaudio/Makefile	Sun Dec 30 17:41:43 2012	(r309682)
+++ head/audio/portaudio/Makefile	Sun Dec 30 17:57:04 2012	(r309683)
@@ -1,62 +1,72 @@
-# New ports collection makefile for:	portaudio
-# Date created:		18 May 2003
-# Whom:			michaelnottebrock@gmx.net and lioux@FreeBSD.org
-#
+# Created by: michaelnottebrock@gmx.net and lioux@FreeBSD.org
 # $FreeBSD$
-#
 
 PORTNAME=	portaudio
 PORTVERSION=	18.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	audio
 MASTER_SITES=	http://www.portaudio.com/archives/
 DISTNAME=	${PORTNAME}_v${PORTVERSION:S/./_/}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	nemysis@gmx.ch
 COMMENT=	Portable cross-platform Audio API
 
+LICENSE=	MIT
+
 USE_ZIP=	yes
-USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
+USE_GMAKE=	yes
+USE_DOS2UNIX=	yes
 USE_LDCONFIG=	yes
 
-USE_DOS2UNIX=	yes
+CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_CFLAGS}
 
 PLIST_SUB+=	SHLIB_VERSION=${SHLIB_VERSION}
 SHLIB_VERSION=	0
 
-pre-everything::
-.if !defined(WITH_PATESTS)
-	@${ECHO_MSG}
-	@${ECHO_MSG} "You can additionally build portaudio's testsuite by defining WITH_PATESTS."
-	@${ECHO_MSG}
-PLIST_SUB+=	WITH_PATESTS="@comment "
+PORTDOCS=	*
+
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES1=	README.txt index.html
+
+DOCSRCDIR2=	${WRKSRC}/docs
+DOCSDIR2=	${DOCSDIR}/docs
+DOC_FILES2=	*.html *.txt *.pdf
+
+OPTIONS_DEFINE=		PATEST
+OPTIONS_DEFAULT=	PATEST
+
+PATEST_DESC=	PortAudio Test Programs
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MPATEST}
+PLIST_SUB+=	PATEST=""
 .else
-PLIST_SUB+=	WITH_PATESTS=""
+PLIST_SUB+=	PATEST="@comment "
 .endif
 
 post-patch:
-# 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|machine\/soundcard.h|sys\/soundcard.h|' \
-				-e 's|-lpthread|${PTHREAD_LIBS}|'
+	@${REINPLACE_CMD} -e 's|#include <malloc.h>|#include <stdlib.h>|' ${WRKSRC}/pa_unix_oss/pa_unix.h
+	@${REINPLACE_CMD} -e 's|machine/soundcard.h|sys/soundcard.h|' ${WRKSRC}/pa_unix_oss/pa_unix_oss.c
+	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure ${WRKSRC}/configure.in \
+		${WRKSRC}/pa_unix_oss/Makefile
+
 pre-configure:
-# Make configure executable
 	@${CHMOD} +x ${WRKSRC}/configure
 
-.if !defined(WITH_PATESTS)
-post-configure:
-	@${REINPLACE_CMD} -e 's|tests$$||' ${WRKSRC}/Makefile
-.endif
-
 post-install:
-.if defined(WITH_PATESTS)
-	@${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/bin
-.endif
 	@${LN} -sf libportaudio.so \
 		${PREFIX}/lib/libportaudio.so.${SHLIB_VERSION}
+.if ${PORT_OPTIONS:MPATEST}
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/* ${PREFIX}/bin
+.endif
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
+	${MKDIR} ${DOCSDIR2}
+	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
+.endif
 
 .include <bsd.port.mk>

Added: head/audio/portaudio/files/patch-pa_tests-patest__record.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/portaudio/files/patch-pa_tests-patest__record.c	Sun Dec 30 17:57:04 2012	(r309683)
@@ -0,0 +1,14 @@
+--- pa_tests/patest_record.c.orig	2012-12-22 13:48:25.000000000 +0100
++++ pa_tests/patest_record.c	2012-12-22 13:48:25.000000000 +0100
+@@ -138,10 +138,10 @@
+     SAMPLE *wptr = (SAMPLE*)outputBuffer;
+     unsigned int i;
+     int finished;
++    int framesToPlay, samplesToPlay, samplesPerBuffer;
+     unsigned int framesLeft = data->maxFrameIndex - data->frameIndex;
+     (void) inputBuffer; /* Prevent unused variable warnings. */
+     (void) outTime;
+-    int framesToPlay, samplesToPlay, samplesPerBuffer;
+ 
+     if( framesLeft < framesPerBuffer )
+     {

Added: head/audio/portaudio/files/patch-pa_tests-patest__wire.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/portaudio/files/patch-pa_tests-patest__wire.c	Sun Dec 30 17:57:04 2012	(r309683)
@@ -0,0 +1,13 @@
+--- pa_tests/patest_wire.c.orig	2012-12-22 13:48:25.000000000 +0100
++++ pa_tests/patest_wire.c	2012-12-22 13:48:25.000000000 +0100
+@@ -74,9 +74,9 @@
+     SAMPLE *out = (SAMPLE*)outputBuffer;
+     SAMPLE *in = (SAMPLE*)inputBuffer;
+     unsigned int i;
+-    (void) outTime;
+     int samplesPerFrame;
+     int numSamples;
++    (void) outTime;
+     
+     samplesPerFrame = (int) userData;
+     numSamples =  framesPerBuffer * samplesPerFrame;

Modified: head/audio/portaudio/pkg-descr
==============================================================================
--- head/audio/portaudio/pkg-descr	Sun Dec 30 17:41:43 2012	(r309682)
+++ head/audio/portaudio/pkg-descr	Sun Dec 30 17:57:04 2012	(r309683)
@@ -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/

Modified: head/audio/portaudio/pkg-plist
==============================================================================
--- head/audio/portaudio/pkg-plist	Sun Dec 30 17:41:43 2012	(r309682)
+++ head/audio/portaudio/pkg-plist	Sun Dec 30 17:57:04 2012	(r309683)
@@ -1,26 +1,26 @@
-%%WITH_PATESTS%%bin/patest_buffer
-%%WITH_PATESTS%%bin/patest_clip
-%%WITH_PATESTS%%bin/patest_dither
-%%WITH_PATESTS%%bin/patest_hang
-%%WITH_PATESTS%%bin/patest_latency
-%%WITH_PATESTS%%bin/patest_leftright
-%%WITH_PATESTS%%bin/patest_longsine
-%%WITH_PATESTS%%bin/patest_many
-%%WITH_PATESTS%%bin/patest_maxsines
-%%WITH_PATESTS%%bin/patest_multi_sine
-%%WITH_PATESTS%%bin/patest_pink
-%%WITH_PATESTS%%bin/patest_record
-%%WITH_PATESTS%%bin/patest_ringmix
-%%WITH_PATESTS%%bin/patest_saw
-%%WITH_PATESTS%%bin/patest_sine
-%%WITH_PATESTS%%bin/patest_sine8
-%%WITH_PATESTS%%bin/patest_sine_formats
-%%WITH_PATESTS%%bin/patest_sine_time
-%%WITH_PATESTS%%bin/patest_stop
-%%WITH_PATESTS%%bin/patest_sync
-%%WITH_PATESTS%%bin/patest_toomanysines
-%%WITH_PATESTS%%bin/patest_underflow
-%%WITH_PATESTS%%bin/patest_wire
+%%PATEST%%bin/patest_buffer
+%%PATEST%%bin/patest_clip
+%%PATEST%%bin/patest_dither
+%%PATEST%%bin/patest_hang
+%%PATEST%%bin/patest_latency
+%%PATEST%%bin/patest_leftright
+%%PATEST%%bin/patest_longsine
+%%PATEST%%bin/patest_many
+%%PATEST%%bin/patest_maxsines
+%%PATEST%%bin/patest_multi_sine
+%%PATEST%%bin/patest_pink
+%%PATEST%%bin/patest_record
+%%PATEST%%bin/patest_ringmix
+%%PATEST%%bin/patest_saw
+%%PATEST%%bin/patest_sine
+%%PATEST%%bin/patest_sine8
+%%PATEST%%bin/patest_sine_formats
+%%PATEST%%bin/patest_sine_time
+%%PATEST%%bin/patest_stop
+%%PATEST%%bin/patest_sync
+%%PATEST%%bin/patest_toomanysines
+%%PATEST%%bin/patest_underflow
+%%PATEST%%bin/patest_wire
 include/portaudio.h
 lib/libportaudio.a
 lib/libportaudio.so
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Marcus von Appen freebsd_committer freebsd_triage 2012-12-30 17:57:34 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!