Bug 174635 - [PATCH] audio/portaudio2: update to 19.20111121, take maintainership, added OptionsNG, License
Summary: [PATCH] audio/portaudio2: update to 19.20111121, take maintainership, added O...
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-12-22 16:50 UTC by nemysis
Modified: 2013-01-05 17:40 UTC (History)
1 user (show)

See Also:


Attachments
portaudio2.diff (7.24 KB, patch)
2012-12-22 16:50 UTC, nemysis
no flags Details | Diff
portaudio2.diff (11.55 KB, patch)
2012-12-30 22:01 UTC, nemysis
no flags Details | Diff
portaudio2.diff (7.81 KB, patch)
2013-01-01 11:01 UTC, nemysis
no flags Details | Diff
portaudio2.diff (7.97 KB, patch)
2013-01-04 10:00 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-12-22 16:50:00 UTC
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
Comment 1 Marcus von Appen freebsd_committer freebsd_triage 2012-12-23 08:28:02 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mva

I'll take it.
Comment 2 nemysis 2012-12-30 22:01:03 UTC
That documentation go to doc/portaudio2

DOCSDIR=        ${PREFIX}/share/doc/${PORTNAME}2

Only this works

        @(cd ${WRKSRC}/bin && for i in *; do ${MV} "$$i" "$${i}"-2; done)                                                                                      

This can you delete I have only tried but not works at all, i knew must use
.for and .endfor in Makefile but...

#.for i in ${WRKSRC}/bin/*                                                                                                                                     
#       ${MV} $i $i-2                                                                                                                                          
#       ${MV} "$$i" "$$i"-2                                                                                                                                    
#.endfor                                                                                                                                                       


portlint -A
WARN: Makefile: [74]: 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: [74] because is used

        @${REINPLACE_CMD} -e 's|$$(DESTDIR)$$(libdir)/pkgconfig|$$(prefix)/libdata/pkgconfig|g' \
                ${WRKSRC}/Makefile.in

port test: clean
Comment 3 nemysis 2013-01-01 11:01:44 UTC
Patch against audio/portaudio2 with 

/usr/local/ports/local/pr/audio/ > diff -ruN /usr/ports/audio/portaudio2 ./portaudio2 > portaudio2.diff

not used port diff which look against audio/portaudio
Comment 4 Marcus von Appen freebsd_committer freebsd_triage 2013-01-04 07:04:03 UTC
Thanks for the updated patch. A last issue remains, though.

If DOXYGEN is selected and NOPORTDOCS is set, the doxygen-generated
documentation will be installed properly, but not picked up by
PORTDOCS = *, since NOPORTDOCS modifies the behaviour.

DOXYGEN should depend on the DOCS port option instead.

Cheers
Marcus
Comment 5 nemysis 2013-01-04 10:00:00 UTC
On Fri, 4 Jan 2013 08:04:03 +0100
Marcus von Appen <mva@FreeBSD.org> wrote:

> Thanks for the updated patch. A last issue remains, though.
> 
> If DOXYGEN is selected and NOPORTDOCS is set, the doxygen-generated
> documentation will be installed properly, but not picked up by
> PORTDOCS = *, since NOPORTDOCS modifies the behaviour.
> 
> DOXYGEN should depend on the DOCS port option instead.
> 
> Cheers
> Marcus

Thanks for the tip

Now have for FreeBSD_Ports ezjail and native in /etc/make.conf

# Only for testing PORTDATA
#NOPORTDATA=yes

# Only for testing PORTDOCS
#NOPORTDOCS=yes


Changed this option, hope this is good

.if ${PORT_OPTIONS:MDOXYGEN} && ${PORT_OPTIONS:MDOCS}


Now port test are clean with and without NOPORTDOCS=yes

Cheers
nemysis
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-01-05 17:34:49 UTC
Author: mva
Date: Sat Jan  5 17:34:41 2013
New Revision: 309968
URL: http://svnweb.freebsd.org/changeset/ports/309968

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

Modified:
  head/audio/portaudio2/Makefile   (contents, props changed)
  head/audio/portaudio2/distinfo   (contents, props changed)
  head/audio/portaudio2/pkg-descr   (contents, props changed)
  head/audio/portaudio2/pkg-plist   (contents, props changed)

Modified: head/audio/portaudio2/Makefile
==============================================================================
--- head/audio/portaudio2/Makefile	Sat Jan  5 16:25:17 2013	(r309967)
+++ head/audio/portaudio2/Makefile	Sat Jan  5 17:34:41 2013	(r309968)
@@ -1,49 +1,91 @@
-# 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
-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=	*
+
+DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}2
+
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES1=	README.txt index.html
+
+OPTIONS_DEFINE=	DOCS EXAMPLES JACK PATEST DOXYGEN
+OPTIONS_DEFAULT=PATEST DOXYGEN
+
+PATEST_DESC=	PortAudio Test Programs
+DOXYGEN_DESC=	Install API documentation (requires DOCS)
+.include <bsd.port.options.mk>
 
-.if exists(${LOCALBASE}/lib/libjack.so)
-WITH_JACK=	yes
+.if ${PORT_OPTIONS:MDOXYGEN} && ${PORT_OPTIONS:MDOCS}
+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 ${PORT_OPTIONS:MPATEST}
+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
+	@${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
+
+post-install:
+.if ${PORT_OPTIONS:MPATEST}
+	@(cd ${WRKSRC}/bin && for i in *; do ${MV} "$$i" "$${i}"-2; done)
+	${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} && ${PORT_OPTIONS:MDOCS}
+	@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>

Modified: head/audio/portaudio2/distinfo
==============================================================================
--- head/audio/portaudio2/distinfo	Sat Jan  5 16:25:17 2013	(r309967)
+++ head/audio/portaudio2/distinfo	Sat Jan  5 17:34:41 2013	(r309968)
@@ -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

Modified: head/audio/portaudio2/pkg-descr
==============================================================================
--- head/audio/portaudio2/pkg-descr	Sat Jan  5 16:25:17 2013	(r309967)
+++ head/audio/portaudio2/pkg-descr	Sat Jan  5 17:34:41 2013	(r309968)
@@ -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/portaudio2/pkg-plist
==============================================================================
--- head/audio/portaudio2/pkg-plist	Sat Jan  5 16:25:17 2013	(r309967)
+++ head/audio/portaudio2/pkg-plist	Sat Jan  5 17:34:41 2013	(r309968)
@@ -1,8 +1,63 @@
+%%PATEST%%bin/pa_devs-2
+%%PATEST%%bin/pa_fuzz-2
+%%PATEST%%bin/pa_minlat-2
+%%PATEST%%bin/paex_pink-2
+%%PATEST%%bin/paex_read_write_wire-2
+%%PATEST%%bin/paex_record-2
+%%PATEST%%bin/paex_saw-2
+%%PATEST%%bin/paex_sine-2
+%%PATEST%%bin/paex_write_sine-2
+%%PATEST%%bin/paex_write_sine_nonint-2
+%%PATEST%%bin/paqa_devs-2
+%%PATEST%%bin/paqa_errs-2
+%%PATEST%%bin/paqa_latency-2
+%%PATEST%%bin/patest1-2
+%%PATEST%%bin/patest_buffer-2
+%%PATEST%%bin/patest_callbackstop-2
+%%PATEST%%bin/patest_clip-2
+%%PATEST%%bin/patest_dither-2
+%%PATEST%%bin/patest_hang-2
+%%PATEST%%bin/patest_in_overflow-2
+%%PATEST%%bin/patest_latency-2
+%%PATEST%%bin/patest_leftright-2
+%%PATEST%%bin/patest_longsine-2
+%%PATEST%%bin/patest_many-2
+%%PATEST%%bin/patest_maxsines-2
+%%PATEST%%bin/patest_mono-2
+%%PATEST%%bin/patest_multi_sine-2
+%%PATEST%%bin/patest_out_underflow-2
+%%PATEST%%bin/patest_prime-2
+%%PATEST%%bin/patest_ringmix-2
+%%PATEST%%bin/patest_sine8-2
+%%PATEST%%bin/patest_sine_channelmaps-2
+%%PATEST%%bin/patest_sine_formats-2
+%%PATEST%%bin/patest_sine_srate-2
+%%PATEST%%bin/patest_sine_time-2
+%%PATEST%%bin/patest_start_stop-2
+%%PATEST%%bin/patest_stop-2
+%%PATEST%%bin/patest_stop_playout-2
+%%PATEST%%bin/patest_toomanysines-2
+%%PATEST%%bin/patest_two_rates-2
+%%PATEST%%bin/patest_underflow-2
+%%PATEST%%bin/patest_wire-2
 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
_______________________________________________
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 7 Marcus von Appen freebsd_committer freebsd_triage 2013-01-05 17:35:10 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!