View | Details | Raw Unified | Return to bug 172678 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-30 / +41 lines)
Lines 2-62 Link Here
2
# Date created:		18 May 2003
2
# Date created:		18 May 2003
3
# Whom:			michaelnottebrock@gmx.net and lioux@FreeBSD.org
3
# Whom:			michaelnottebrock@gmx.net and lioux@FreeBSD.org
4
#
4
#
5
# $FreeBSD: head/audio/portaudio/Makefile 300895 2012-07-14 12:56:14Z beat $
5
# $FreeBSD: ports/audio/portaudio/Makefile,v 1.14 2012/05/05 17:46:40 ak Exp $
6
#
6
#
7
7
8
PORTNAME=	portaudio
8
PORTNAME=	portaudio
9
PORTVERSION=	18.1
9
PORTVERSION=	18.1
10
PORTREVISION=	2
10
PORTREVISION=	3
11
CATEGORIES=	audio
11
CATEGORIES=	audio
12
MASTER_SITES=	http://www.portaudio.com/archives/
12
MASTER_SITES=	http://www.portaudio.com/archives/
13
DISTNAME=	${PORTNAME}_v${PORTVERSION:S/./_/}
13
DISTNAME=	${PORTNAME}_v${PORTVERSION:S/./_/}
14
14
15
MAINTAINER=	ports@FreeBSD.org
15
MAINTAINER=	nemysis@gmx.ch
16
COMMENT=	Portable cross-platform Audio API
16
COMMENT=	Portable cross-platform Audio API
17
17
18
LICENSE=	MIT
19
18
USE_ZIP=	yes
20
USE_ZIP=	yes
19
USE_GMAKE=	yes
20
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
22
USE_GMAKE=	yes
23
USE_DOS2UNIX=	yes
21
USE_LDCONFIG=	yes
24
USE_LDCONFIG=	yes
22
25
23
USE_DOS2UNIX=	yes
26
CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
27
LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_CFLAGS}
28
29
PORTDOCS=	*
30
31
DOCSRCDIR1=	${WRKSRC}
32
DOC_FILES1=	README.txt index.html
24
33
25
PLIST_SUB+=	SHLIB_VERSION=${SHLIB_VERSION}
34
DOCSRCDIR2=	${WRKSRC}/docs
26
SHLIB_VERSION=	0
35
DOCSDIR2=	${DOCSDIR}/docs
36
DOC_FILES2=	*.html *.txt *.pdf
27
37
28
pre-everything::
38
OPTIONS_DEFINE=	PATEST
29
.if !defined(WITH_PATESTS)
39
30
	@${ECHO_MSG}
40
OPTIONS_DEFAULT=	PATEST
31
	@${ECHO_MSG} "You can additionally build portaudio's testsuite by defining WITH_PATESTS."
41
32
	@${ECHO_MSG}
42
PATEST_DESC=	PortAudio Test Programs
33
PLIST_SUB+=	WITH_PATESTS="@comment "
43
44
.include <bsd.port.options.mk>
45
46
.if defined(WITH_PATEST)
47
PLIST_SUB+=	PATEST=""
34
.else
48
.else
35
PLIST_SUB+=	WITH_PATESTS=""
49
PLIST_SUB+=	PATEST="@comment "
36
.endif
50
.endif
37
51
38
post-patch:
52
post-patch:
39
# replace obsolete headers, and fix up thread library
53
	@${REINPLACE_CMD} -e 's|#include <malloc.h>|#include <stdlib.h>|' ${WRKSRC}/pa_unix_oss/pa_unix.h
40
	@${FIND} ${WRKSRC} -type f \
54
	@${REINPLACE_CMD} -e 's|machine/soundcard.h|sys/soundcard.h|' ${WRKSRC}/pa_unix_oss/pa_unix_oss.c
41
		| ${XARGS} -x -n 10 \
55
	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure ${WRKSRC}/configure.in \
42
			${REINPLACE_CMD} -E \
56
		${WRKSRC}/pa_unix_oss/Makefile
43
				-e 's|malloc.h|stdlib.h|' \
57
44
				-e 's|machine\/soundcard.h|sys\/soundcard.h|' \
45
				-e 's|-lpthread|${PTHREAD_LIBS}|'
46
pre-configure:
58
pre-configure:
47
# Make configure executable
48
	@${CHMOD} +x ${WRKSRC}/configure
59
	@${CHMOD} +x ${WRKSRC}/configure
49
60
50
.if !defined(WITH_PATESTS)
61
post-install:
51
post-configure:
62
.if ${PORT_OPTIONS:MPATEST}
52
	@${REINPLACE_CMD} -e 's|tests$$||' ${WRKSRC}/Makefile
63
	${INSTALL_SCRIPT} ${WRKSRC}/bin/* ${PREFIX}/bin
53
.endif
64
.endif
54
65
55
post-install:
66
.if ${PORT_OPTIONS:MDOCS}
56
.if defined(WITH_PATESTS)
67
	${MKDIR} ${DOCSDIR}
57
	@${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/bin
68
	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
69
	${MKDIR} ${DOCSDIR2}
70
	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
58
.endif
71
.endif
59
	@${LN} -sf libportaudio.so \
60
		${PREFIX}/lib/libportaudio.so.${SHLIB_VERSION}
61
72
62
.include <bsd.port.mk>
73
.include <bsd.port.mk>
(-)./files/patch-pa_tests-patest__record.c (+14 lines)
Line 0 Link Here
1
--- pa_tests/patest_record.c.orig	2012-12-22 13:48:25.000000000 +0100
2
+++ pa_tests/patest_record.c	2012-12-22 13:48:25.000000000 +0100
3
@@ -138,10 +138,10 @@
4
     SAMPLE *wptr = (SAMPLE*)outputBuffer;
5
     unsigned int i;
6
     int finished;
7
+    int framesToPlay, samplesToPlay, samplesPerBuffer;
8
     unsigned int framesLeft = data->maxFrameIndex - data->frameIndex;
9
     (void) inputBuffer; /* Prevent unused variable warnings. */
10
     (void) outTime;
11
-    int framesToPlay, samplesToPlay, samplesPerBuffer;
12
 
13
     if( framesLeft < framesPerBuffer )
14
     {
(-)./files/patch-pa_tests-patest__wire.c (+13 lines)
Line 0 Link Here
1
--- pa_tests/patest_wire.c.orig	2012-12-22 13:48:25.000000000 +0100
2
+++ pa_tests/patest_wire.c	2012-12-22 13:48:25.000000000 +0100
3
@@ -74,9 +74,9 @@
4
     SAMPLE *out = (SAMPLE*)outputBuffer;
5
     SAMPLE *in = (SAMPLE*)inputBuffer;
6
     unsigned int i;
7
-    (void) outTime;
8
     int samplesPerFrame;
9
     int numSamples;
10
+    (void) outTime;
11
     
12
     samplesPerFrame = (int) userData;
13
     numSamples =  framesPerBuffer * samplesPerFrame;
(-)./files/patch-pa_tests::patest_record.c (-14 lines)
Lines 1-14 Link Here
1
--- pa_tests/patest_record.c.orig	Sun Dec  7 14:48:31 2003
2
+++ pa_tests/patest_record.c	Sun Dec  7 14:48:53 2003
3
@@ -138,10 +138,10 @@
4
     SAMPLE *wptr = (SAMPLE*)outputBuffer;
5
     unsigned int i;
6
     int finished;
7
+    int framesToPlay, samplesToPlay, samplesPerBuffer;
8
     unsigned int framesLeft = data->maxFrameIndex - data->frameIndex;
9
     (void) inputBuffer; /* Prevent unused variable warnings. */
10
     (void) outTime;
11
-    int framesToPlay, samplesToPlay, samplesPerBuffer;
12
 
13
     if( framesLeft < framesPerBuffer )
14
     {
(-)./files/patch-pa_tests::patest_wire.c (-13 lines)
Lines 1-13 Link Here
1
--- pa_tests/patest_wire.c.orig	Sun Dec  7 14:49:15 2003
2
+++ pa_tests/patest_wire.c	Sun Dec  7 14:49:52 2003
3
@@ -74,9 +74,9 @@
4
     SAMPLE *out = (SAMPLE*)outputBuffer;
5
     SAMPLE *in = (SAMPLE*)inputBuffer;
6
     unsigned int i;
7
-    (void) outTime;
8
     int samplesPerFrame;
9
     int numSamples;
10
+    (void) outTime;
11
     
12
     samplesPerFrame = (int) userData;
13
     numSamples =  framesPerBuffer * samplesPerFrame;
(-)./pkg-descr (-7 / +10 lines)
Lines 1-9 Link Here
1
PortAudio is a free, cross platform, open-source, audio I/O library.
1
PortAudio is a free, cross-platform, open-source, audio I/O library.
2
It lets you write simple audio programs in 'C' that will compile
2
It lets you write simple audio programs in 'C' or C++ that will compile and run
3
and run on many platforms including Windows, Macintosh (8,9,X),
3
on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA).
4
Unix (OSS), SGI, and BeOS. PortAudio is intended to promote the
4
It is intended to promote the exchange of audio software between developers
5
exchange of audio synthesis software between developers on different
5
on different platforms. Many applications use PortAudio for Audio I/O.
6
platforms, and was recently selected as the audio component of a
6
7
larger PortMusic project that includes MIDI and sound file support.
7
PortAudio provides a very simple API for recording and/or playing sound using
8
a simple callback function or a blocking read/write interface.
9
Example programs are included that play sine waves, process audio input
10
(guitar fuzz), record and playback audio, list available audio devices, etc.
8
11
9
WWW: http://www.portaudio.com/
12
WWW: http://www.portaudio.com/
(-)./pkg-plist (-24 / +23 lines)
Lines 1-28 Link Here
1
%%WITH_PATESTS%%bin/patest_buffer
1
%%PATEST%%bin/patest_buffer
2
%%WITH_PATESTS%%bin/patest_clip
2
%%PATEST%%bin/patest_clip
3
%%WITH_PATESTS%%bin/patest_dither
3
%%PATEST%%bin/patest_dither
4
%%WITH_PATESTS%%bin/patest_hang
4
%%PATEST%%bin/patest_hang
5
%%WITH_PATESTS%%bin/patest_latency
5
%%PATEST%%bin/patest_latency
6
%%WITH_PATESTS%%bin/patest_leftright
6
%%PATEST%%bin/patest_leftright
7
%%WITH_PATESTS%%bin/patest_longsine
7
%%PATEST%%bin/patest_longsine
8
%%WITH_PATESTS%%bin/patest_many
8
%%PATEST%%bin/patest_many
9
%%WITH_PATESTS%%bin/patest_maxsines
9
%%PATEST%%bin/patest_maxsines
10
%%WITH_PATESTS%%bin/patest_multi_sine
10
%%PATEST%%bin/patest_multi_sine
11
%%WITH_PATESTS%%bin/patest_pink
11
%%PATEST%%bin/patest_pink
12
%%WITH_PATESTS%%bin/patest_record
12
%%PATEST%%bin/patest_record
13
%%WITH_PATESTS%%bin/patest_ringmix
13
%%PATEST%%bin/patest_ringmix
14
%%WITH_PATESTS%%bin/patest_saw
14
%%PATEST%%bin/patest_saw
15
%%WITH_PATESTS%%bin/patest_sine
15
%%PATEST%%bin/patest_sine
16
%%WITH_PATESTS%%bin/patest_sine8
16
%%PATEST%%bin/patest_sine8
17
%%WITH_PATESTS%%bin/patest_sine_formats
17
%%PATEST%%bin/patest_sine_formats
18
%%WITH_PATESTS%%bin/patest_sine_time
18
%%PATEST%%bin/patest_sine_time
19
%%WITH_PATESTS%%bin/patest_stop
19
%%PATEST%%bin/patest_stop
20
%%WITH_PATESTS%%bin/patest_sync
20
%%PATEST%%bin/patest_sync
21
%%WITH_PATESTS%%bin/patest_toomanysines
21
%%PATEST%%bin/patest_toomanysines
22
%%WITH_PATESTS%%bin/patest_underflow
22
%%PATEST%%bin/patest_underflow
23
%%WITH_PATESTS%%bin/patest_wire
23
%%PATEST%%bin/patest_wire
24
include/portaudio.h
24
include/portaudio.h
25
lib/libportaudio.a
25
lib/libportaudio.a
26
lib/libportaudio.so
26
lib/libportaudio.so
27
lib/libportaudio.so.0.0.18
27
lib/libportaudio.so.0.0.18
28
lib/libportaudio.so.%%SHLIB_VERSION%%

Return to bug 172678