aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusmir Dusko <nemysis@FreeBSD.org>2013-10-23 02:54:44 +0000
committerRusmir Dusko <nemysis@FreeBSD.org>2013-10-23 02:54:44 +0000
commit5b15a8323c64e2ea8b68a5abbe913159d21ea9f4 (patch)
treef1b9dcf50e6fe1a338393b299442ae9e21502448
parent012ad4f28eac02421dbc32420efa08a9b56320a7 (diff)
downloadports-5b15a8323c64e2ea8b68a5abbe913159d21ea9f4.tar.gz
ports-5b15a8323c64e2ea8b68a5abbe913159d21ea9f4.zip
Notes
-rw-r--r--audio/portaudio2/Makefile70
-rw-r--r--audio/portaudio2/pkg-plist1
2 files changed, 39 insertions, 32 deletions
diff --git a/audio/portaudio2/Makefile b/audio/portaudio2/Makefile
index 2634fd1048da..3800ffb1b850 100644
--- a/audio/portaudio2/Makefile
+++ b/audio/portaudio2/Makefile
@@ -3,30 +3,29 @@
PORTNAME= portaudio
DISTVERSION= 19_20111121
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://www.portaudio.com/archives/
+PKGNAMESUFFIX= 2
DISTNAME= pa_stable_v${DISTVERSION}
EXTRACT_SUFX= .tgz
-MAINTAINER= nemysis@gmx.ch
+MAINTAINER= nemysis@FreeBSD.org
COMMENT= Portable cross-platform Audio API
LICENSE= MIT
-LATEST_LINK= ${PORTNAME}19
-WRKSRC= ${WRKDIR}/${PORTNAME}
+WRKSRC= ${WRKDIR}/${PORTNAME:S/2//}
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=PKG_CONFIG_LIBDIR=${PREFIX}/libdata/pkgconfig \
--without-alsa \
- --libdir=${PREFIX}/lib/${PORTNAME}2 \
- --includedir=${PREFIX}/include/${PORTNAME}2
+ --libdir=${PREFIX}/lib/${PORTNAME}${PKGNAMESUFFIX} \
+ --includedir=${PREFIX}/include/${PORTNAME}${PKGNAMESUFFIX}
-USES= gmake pkgconfig
-NO_STAGE= yes
+USES= gmake pathfix pkgconfig
USE_DOS2UNIX= yes
-USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}2
+USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}${PKGNAMESUFFIX}
CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
@@ -34,42 +33,38 @@ LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
PORTDOCS= *
PORTEXAMPLES= *
-DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}2
+DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
+EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}${PKGNAMESUFFIX}
DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= README.txt index.html
-OPTIONS_DEFINE= JACK PATEST DOXYGEN
+OPTIONS_DEFINE= DOCS DOXYGEN EXAMPLES JACK PATEST
OPTIONS_DEFAULT=PATEST DOXYGEN
PATEST_DESC= PortAudio Test Programs
DOXYGEN_DESC= Install API documentation (requires DOCS)
+
+OPTIONS_SUB= yes
+
+JACK_LIB_DEPENDS= libjack.so:${PORTSDIR}/audio/jack
+JACK_CONFIGURE_ON= --with-jack
+JACK_CONFIGURE_OFF= --without-jack
+
+EXAMPLES_BIN= pa_d* pa_f* paex_*
+PATEST_BIN= pa_m* paqa_* patest*
+
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOXYGEN} && ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen
.endif
-.if ${PORT_OPTIONS:MJACK}
-CONFIGURE_ARGS+=--with-jack
-LIB_DEPENDS+= jack:${PORTSDIR}/audio/jack
-.else
-CONFIGURE_ARGS+=--without-jack
-.endif
-
-.if ${PORT_OPTIONS:MPATEST}
-PLIST_SUB+= PATEST=""
-.else
-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
@${REINPLACE_CMD} -e 's|PACKAGE_NAME=|PACKAGE_NAME=portaudio2|' ${WRKSRC}/configure
- @${REINPLACE_CMD} -e 's|$$(DESTDIR)$$(libdir)/pkgconfig|$$(prefix)/libdata/pkgconfig|g' \
- ${WRKSRC}/Makefile.in
.if ! ${PORT_OPTIONS:MEXAMPLES}
@${REINPLACE_CMD} -i '' '/EXAMPLES =/,/bin\/paex_write_sine_nonint/s/^/#/' \
@@ -77,23 +72,34 @@ post-patch:
.endif
post-install:
+.if ${PORT_OPTIONS:MEXAMPLES} || ${PORT_OPTIONS:MPATEST}
+ @(cd ${WRKSRC}/bin && for i in *; do ${MV} "$$i" "$${i}"-${PKGNAMESUFFIX}; done)
+.endif
+
+.if ${PORT_OPTIONS:MEXAMPLES}
+.for f in ${EXAMPLES_BIN}
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/bin/
+.endfor
+.endif
+
.if ${PORT_OPTIONS:MPATEST}
- @(cd ${WRKSRC}/bin && for i in *; do ${MV} "$$i" "$${i}"-2; done)
- ${INSTALL_SCRIPT} ${WRKSRC}/bin/* ${PREFIX}/bin
+.for f in ${PATEST_BIN}
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/bin/
+.endfor
.endif
.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
.endif
.if ${PORT_OPTIONS:MDOXYGEN} && ${PORT_OPTIONS:MDOCS}
@cd ${WRKSRC} && doxygen
- @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${DOCSDIR})
+ @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR})
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
- @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR})
+ @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.endif
.include <bsd.port.mk>
diff --git a/audio/portaudio2/pkg-plist b/audio/portaudio2/pkg-plist
index cb9f67c7690c..1d02a5ccf6b7 100644
--- a/audio/portaudio2/pkg-plist
+++ b/audio/portaudio2/pkg-plist
@@ -40,6 +40,7 @@
%%PATEST%%bin/patest_two_rates-2
%%PATEST%%bin/patest_underflow-2
%%PATEST%%bin/patest_wire-2
+%%JACK%%include/portaudio2/pa_jack.h
include/portaudio2/portaudio.h
lib/portaudio2/libportaudio.a
lib/portaudio2/libportaudio.la