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> |