summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/pd/DESCR20
-rw-r--r--audio/pd/Makefile63
-rw-r--r--audio/pd/PLIST517
-rw-r--r--audio/pd/distinfo21
-rw-r--r--audio/pd/patches/patch-Makefile.am28
-rw-r--r--audio/pd/patches/patch-extra_bonk~_bonk~.c18
-rw-r--r--audio/pd/patches/patch-extra_pd~_pd~.c31
-rw-r--r--audio/pd/patches/patch-extra_sigmund~_sigmund~.c18
-rw-r--r--audio/pd/patches/patch-src_Makefile.am15
-rw-r--r--audio/pd/patches/patch-src_configure15
-rw-r--r--audio/pd/patches/patch-src_d__array.c15
-rw-r--r--audio/pd/patches/patch-src_d__osc.c15
-rw-r--r--audio/pd/patches/patch-src_m__binbuf.c18
-rw-r--r--audio/pd/patches/patch-src_s__audio__oss.c25
-rw-r--r--audio/pd/patches/patch-src_s__file.c15
-rw-r--r--audio/pd/patches/patch-src_s__loader.c19
-rw-r--r--audio/pd/patches/patch-src_s__stuff.h15
-rw-r--r--audio/pd/patches/patch-src_s__utf8.c18
-rw-r--r--audio/pd/patches/patch-src_x__list.c18
-rw-r--r--audio/pd/patches/patch-src_x__misc.c15
20 files changed, 919 insertions, 0 deletions
diff --git a/audio/pd/DESCR b/audio/pd/DESCR
new file mode 100644
index 00000000000..e6adb5d65a0
--- /dev/null
+++ b/audio/pd/DESCR
@@ -0,0 +1,20 @@
+Pd (aka Pure Data) is a real-time graphical programming environment
+for audio, video, and graphical processing. It is the third major
+branch of the family of patcher programming languages known as Max
+(Max/FTS, ISPW Max, Max/MSP, jMax, etc.) originally developed by
+Miller Puckette and company at IRCAM. The core of Pd is written
+and maintained by Miller Puckette and includes the work of many
+developers, making the whole package very much a community effort.
+
+Pd was created to explore ideas of how to further refine the Max
+paradigm with the core ideas of allowing data to be treated in a
+more open-ended way and opening it up to applications outside of
+audio and MIDI, such as graphics and video.
+
+It is easy to extend Pd by writing object classes ("externals") or
+patches ("abstractions"). The work of many developers is already
+available as part of the standard Pd packages and the Pd developer
+community is growing rapidly. Recent developments include a system
+of abstractions for building performance environments; a library
+of objects for physical modeling; and a library of objects for
+generating and processing video in realtime.
diff --git a/audio/pd/Makefile b/audio/pd/Makefile
new file mode 100644
index 00000000000..535643cc87d
--- /dev/null
+++ b/audio/pd/Makefile
@@ -0,0 +1,63 @@
+# $NetBSD: Makefile,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+#
+
+DISTNAME= pd-0.43-0.src
+PKGNAME= ${DISTNAME:S/-0.src/.0/}
+CATEGORIES= audio
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pure-data/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://puredata.info/
+COMMENT= Real-time graphical programming environment for audio+video
+LICENSE= modified-bsd
+
+DEPENDS+= tcl-[0-9]*:../../lang/tcl
+DEPENDS+= tk-[0-9]*:../../x11/tk
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+WRKSRC= ${WRKDIR}/pd-0.43-0
+USE_TOOLS+= autoconf automake gmake msgfmt pkg-config
+USE_LANGUAGES= c c++
+GNU_CONFIGURE= YES
+USE_LIBTOOL= YES
+
+PKGCONFIG_OVERRIDE+= pd.pc.in
+
+SUBST_CLASSES+= tclsh
+SUBST_SED.tclsh= -e "s,/usr/bin/tclsh,${PREFIX}/bin/tclsh,"
+SUBST_MESSAGE.tclsh= Fix path to tclsh.
+SUBST_STAGE.tclsh= pre-build
+SUBST_FILES.tclsh= tcl/pkg_mkIndex.tcl
+
+SUBST_CLASSES+= device
+SUBST_SED.device= -e "s,/dev/dsp,${DEVOSSAUDIO},"
+SUBST_MESSAGE.device= Fix path to audio device.
+SUBST_STAGE.device= pre-build
+SUBST_FILES.device= src/s_audio_oss.c
+
+SUBST_CLASSES+= doc
+SUBST_SED.doc= -e "s,\\.\\./doc/,${PREFIX}/share/doc/pd/doc/,"
+SUBST_SED.doc+= -e "s,.::sys_libdir/doc/,${PREFIX}/share/doc/pd/doc/,"
+SUBST_SED.doc+= -e "s,menu_doc_open doc/,menu_doc_open ${PREFIX}/share/doc/pd/doc/,"
+SUBST_SED.doc+= -e "s,/doc/5.reference,/share/doc/pd/doc/5.reference,"
+SUBST_SED.doc+= -e "s,PD_BASEDIR/doc/,${PREFIX}/share/doc/pd/doc/,"
+SUBST_SED.doc+= -e "s,/usr/local/bin/pd/doc/,${PREFIX}/share/doc/pd/doc/,"
+SUBST_SED.doc+= -e "s,/usr/bin/pd/doc/,${PREFIX}/share/doc/pd/doc/,"
+SUBST_MESSAGE.doc= Fix path to docs.
+SUBST_STAGE.doc= pre-build
+SUBST_FILES.doc= doc/1.manual/1.introduction.txt
+SUBST_FILES.doc+= doc/4.data.structures/14.partialtracer.pd
+SUBST_FILES.doc+= extra/loop~/loop~-help.pd
+SUBST_FILES.doc+= extra/loop~/test-loop~.pd
+SUBST_FILES.doc+= man/pd.1
+SUBST_FILES.doc+= src/s_main.c
+SUBST_FILES.doc+= tcl/pd_menucommands.tcl
+SUBST_FILES.doc+= tcl/pd_menus.tcl
+
+pre-configure:
+ cd ${WRKSRC} && ./autogen.sh
+
+.include "../../mk/oss.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/pd/PLIST b/audio/pd/PLIST
new file mode 100644
index 00000000000..bdb5908fd2c
--- /dev/null
+++ b/audio/pd/PLIST
@@ -0,0 +1,517 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+bin/pd
+bin/pd-gui.tcl
+bin/pdreceive
+bin/pdsend
+include/m_pd.h
+include/pd/g_all_guis.h
+include/pd/g_canvas.h
+include/pd/m_imp.h
+include/pd/m_pd.h
+include/pd/s_stuff.h
+lib/pd/extra/bonk~/bonk~-help.pd
+lib/pd/extra/bonk~/bonk~.la
+lib/pd/extra/bonk~/templates.txt
+lib/pd/extra/choice/choice-help.pd
+lib/pd/extra/choice/choice.la
+lib/pd/extra/complex-mod~-help.pd
+lib/pd/extra/complex-mod~.pd
+lib/pd/extra/expr-help.pd
+lib/pd/extra/expr.
+lib/pd/extra/expr~-help.pd
+lib/pd/extra/expr~.
+lib/pd/extra/expr~/LICENSE.txt
+lib/pd/extra/expr~/README.txt
+lib/pd/extra/expr~/expr-help.pd
+lib/pd/extra/expr~/expr.
+lib/pd/extra/expr~/expr~.la
+lib/pd/extra/expr~/fexpr~.
+lib/pd/extra/fexpr~-help.pd
+lib/pd/extra/fexpr~.
+lib/pd/extra/fiddle~/fiddle~-help.pd
+lib/pd/extra/fiddle~/fiddle~.la
+lib/pd/extra/hilbert~-help.pd
+lib/pd/extra/hilbert~.pd
+lib/pd/extra/loop~/loop~-help.pd
+lib/pd/extra/loop~/loop~.la
+lib/pd/extra/loop~/test-loop~.pd
+lib/pd/extra/lrshift~/lrshift~-help.pd
+lib/pd/extra/lrshift~/lrshift~.la
+lib/pd/extra/pd~/pdsched.la
+lib/pd/extra/pd~/pd~-help.pd
+lib/pd/extra/pd~/pd~-subprocess.pd
+lib/pd/extra/pd~/pd~.la
+lib/pd/extra/pique/pique-help.pd
+lib/pd/extra/pique/pique.la
+lib/pd/extra/rev1-final.pd
+lib/pd/extra/rev1-stage.pd
+lib/pd/extra/rev1~-help.pd
+lib/pd/extra/rev1~.pd
+lib/pd/extra/rev2~-help.pd
+lib/pd/extra/rev2~.pd
+lib/pd/extra/rev3~-help.pd
+lib/pd/extra/rev3~.pd
+lib/pd/extra/sigmund~/sigmund~-help.pd
+lib/pd/extra/sigmund~/sigmund~.la
+lib/pd/extra/stdout/stdout-help.pd
+lib/pd/extra/stdout/stdout.la
+lib/pd/po/af.msg
+lib/pd/po/az.msg
+lib/pd/po/be.msg
+lib/pd/po/bg.msg
+lib/pd/po/de.msg
+lib/pd/po/el.msg
+lib/pd/po/en_ca.msg
+lib/pd/po/eu.msg
+lib/pd/po/fr.msg
+lib/pd/po/gu.msg
+lib/pd/po/he.msg
+lib/pd/po/hi.msg
+lib/pd/po/hu.msg
+lib/pd/po/it.msg
+lib/pd/po/pa.msg
+lib/pd/po/pt_br.msg
+lib/pd/po/pt_pt.msg
+lib/pd/po/sq.msg
+lib/pd/po/sv.msg
+lib/pd/po/vi.msg
+lib/pd/tcl/AppMain.tcl
+lib/pd/tcl/apple_events.tcl
+lib/pd/tcl/dialog_array.tcl
+lib/pd/tcl/dialog_audio.tcl
+lib/pd/tcl/dialog_canvas.tcl
+lib/pd/tcl/dialog_data.tcl
+lib/pd/tcl/dialog_find.tcl
+lib/pd/tcl/dialog_font.tcl
+lib/pd/tcl/dialog_gatom.tcl
+lib/pd/tcl/dialog_iemgui.tcl
+lib/pd/tcl/dialog_message.tcl
+lib/pd/tcl/dialog_midi.tcl
+lib/pd/tcl/dialog_path.tcl
+lib/pd/tcl/dialog_startup.tcl
+lib/pd/tcl/helpbrowser.tcl
+lib/pd/tcl/opt_parser.tcl
+lib/pd/tcl/pd-gui.tcl
+lib/pd/tcl/pd.ico
+lib/pd/tcl/pd_bindings.tcl
+lib/pd/tcl/pd_connect.tcl
+lib/pd/tcl/pd_menucommands.tcl
+lib/pd/tcl/pd_menus.tcl
+lib/pd/tcl/pdtk_array.tcl
+lib/pd/tcl/pdtk_canvas.tcl
+lib/pd/tcl/pdtk_text.tcl
+lib/pd/tcl/pdwindow.tcl
+lib/pd/tcl/pkgIndex.tcl
+lib/pd/tcl/pkg_mkIndex.tcl
+lib/pd/tcl/scrollbox.tcl
+lib/pd/tcl/scrollboxwindow.tcl
+lib/pd/tcl/wheredoesthisgo.tcl
+lib/pkgconfig/pd.pc
+man/man1/pd.1
+man/man1/pdreceive.1
+man/man1/pdsend.1
+share/doc/pd/doc/1.manual/1.introduction.txt
+share/doc/pd/doc/1.manual/fig1.1.png
+share/doc/pd/doc/1.manual/fig1.2.jpg
+share/doc/pd/doc/1.manual/fig1.3.jpg
+share/doc/pd/doc/1.manual/fig1.4.png
+share/doc/pd/doc/1.manual/fig1.5.jpg
+share/doc/pd/doc/1.manual/fig11.1.png
+share/doc/pd/doc/1.manual/fig11.2.png
+share/doc/pd/doc/1.manual/fig11.3.png
+share/doc/pd/doc/1.manual/fig11.4.png
+share/doc/pd/doc/1.manual/fig3.1.jpg
+share/doc/pd/doc/1.manual/fig3.10.jpg
+share/doc/pd/doc/1.manual/fig3.2.jpg
+share/doc/pd/doc/1.manual/fig3.3.jpg
+share/doc/pd/doc/1.manual/fig3.4.jpg
+share/doc/pd/doc/1.manual/fig3.5.jpg
+share/doc/pd/doc/1.manual/fig3.6.jpg
+share/doc/pd/doc/1.manual/fig3.7.jpg
+share/doc/pd/doc/1.manual/fig3.8.jpg
+share/doc/pd/doc/1.manual/fig3.9.jpg
+share/doc/pd/doc/1.manual/fig7.1.jpg
+share/doc/pd/doc/1.manual/fig7.2.jpg
+share/doc/pd/doc/1.manual/fig7.3.jpg
+share/doc/pd/doc/1.manual/fig7.4.jpg
+share/doc/pd/doc/1.manual/fig7.5.jpg
+share/doc/pd/doc/1.manual/fig7.6.jpg
+share/doc/pd/doc/1.manual/fig8.1.jpg
+share/doc/pd/doc/1.manual/fig8.2.jpg
+share/doc/pd/doc/1.manual/fig8.3.jpg
+share/doc/pd/doc/1.manual/fig8.4.jpg
+share/doc/pd/doc/1.manual/fig8.5.jpg
+share/doc/pd/doc/1.manual/fig8.6.jpg
+share/doc/pd/doc/1.manual/fig9.1.jpg
+share/doc/pd/doc/1.manual/fig9.2.jpg
+share/doc/pd/doc/1.manual/fig9.3.jpg
+share/doc/pd/doc/1.manual/index.htm
+share/doc/pd/doc/1.manual/pdmanual.css
+share/doc/pd/doc/1.manual/x1.htm
+share/doc/pd/doc/1.manual/x2.htm
+share/doc/pd/doc/1.manual/x3.htm
+share/doc/pd/doc/1.manual/x4.htm
+share/doc/pd/doc/1.manual/x5.htm
+share/doc/pd/doc/2.control.examples/00.INTRO.txt
+share/doc/pd/doc/2.control.examples/01.PART1.hello.pd
+share/doc/pd/doc/2.control.examples/02.editing.pd
+share/doc/pd/doc/2.control.examples/03.connections.pd
+share/doc/pd/doc/2.control.examples/04.messages.pd
+share/doc/pd/doc/2.control.examples/05.counter.pd
+share/doc/pd/doc/2.control.examples/06.more.counters.pd
+share/doc/pd/doc/2.control.examples/07.time.pd
+share/doc/pd/doc/2.control.examples/08.depthfirst.pd
+share/doc/pd/doc/2.control.examples/09.send_receive.pd
+share/doc/pd/doc/2.control.examples/10.more.messages.pd
+share/doc/pd/doc/2.control.examples/11.review.pd
+share/doc/pd/doc/2.control.examples/12.PART2.subpatch.pd
+share/doc/pd/doc/2.control.examples/13.locality.pd
+share/doc/pd/doc/2.control.examples/14.dollarsigns.pd
+share/doc/pd/doc/2.control.examples/15.array.pd
+share/doc/pd/doc/2.control.examples/15.file.txt
+share/doc/pd/doc/2.control.examples/16.more.arrays.pd
+share/doc/pd/doc/2.control.examples/17.PART3.midi.pd
+share/doc/pd/doc/2.control.examples/18.conditional.pd
+share/doc/pd/doc/2.control.examples/19.random.pd
+share/doc/pd/doc/2.control.examples/20.weighted-random.pd
+share/doc/pd/doc/2.control.examples/21.markov.chain.pd
+share/doc/pd/doc/2.control.examples/22.random-walk.pd
+share/doc/pd/doc/2.control.examples/23.sequencing.pd
+share/doc/pd/doc/2.control.examples/24.loops.pd
+share/doc/pd/doc/2.control.examples/dollarsign.pd
+share/doc/pd/doc/2.control.examples/dollarsign2.pd
+share/doc/pd/doc/2.control.examples/sendnumber.pd
+share/doc/pd/doc/3.audio.examples/A00.intro.pd
+share/doc/pd/doc/3.audio.examples/A00.intro.txt
+share/doc/pd/doc/3.audio.examples/A01.sinewave.pd
+share/doc/pd/doc/3.audio.examples/A02.amplitude.pd
+share/doc/pd/doc/3.audio.examples/A03.line.pd
+share/doc/pd/doc/3.audio.examples/A04.line2.pd
+share/doc/pd/doc/3.audio.examples/A05.output.subpatch.pd
+share/doc/pd/doc/3.audio.examples/A06.frequency.pd
+share/doc/pd/doc/3.audio.examples/A07.fusion.pd
+share/doc/pd/doc/3.audio.examples/A08.beating.pd
+share/doc/pd/doc/3.audio.examples/A09.frequency.mod.pd
+share/doc/pd/doc/3.audio.examples/A10.review.pd
+share/doc/pd/doc/3.audio.examples/B01.wavetables.pd
+share/doc/pd/doc/3.audio.examples/B02.two-wavetables.pd
+share/doc/pd/doc/3.audio.examples/B03.tabread4.pd
+share/doc/pd/doc/3.audio.examples/B04.tabread4.interpolation.pd
+share/doc/pd/doc/3.audio.examples/B05.tabread.FM.pd
+share/doc/pd/doc/3.audio.examples/B06.table.switching.pd
+share/doc/pd/doc/3.audio.examples/B07.sampler.pd
+share/doc/pd/doc/3.audio.examples/B08.sampler.loop.pd
+share/doc/pd/doc/3.audio.examples/B09.sampler.loop.smooth.pd
+share/doc/pd/doc/3.audio.examples/B10.sampler.scratch.pd
+share/doc/pd/doc/3.audio.examples/B11.sampler.nodoppler.pd
+share/doc/pd/doc/3.audio.examples/B12.sampler.transpose.pd
+share/doc/pd/doc/3.audio.examples/B13.sampler.overlap.pd
+share/doc/pd/doc/3.audio.examples/B14.sampler.rockafella.pd
+share/doc/pd/doc/3.audio.examples/B15.tabread4~-onset.pd
+share/doc/pd/doc/3.audio.examples/B16.long-varispeed.pd
+share/doc/pd/doc/3.audio.examples/C01.nyquist.pd
+share/doc/pd/doc/3.audio.examples/C02.sawtooth-foldover.pd
+share/doc/pd/doc/3.audio.examples/C03.zipper.noise.pd
+share/doc/pd/doc/3.audio.examples/C04.control.to.signal.pd
+share/doc/pd/doc/3.audio.examples/C05.sampler.oneshot.pd
+share/doc/pd/doc/3.audio.examples/C06.signal.to.control.pd
+share/doc/pd/doc/3.audio.examples/C07.envelope.follower.pd
+share/doc/pd/doc/3.audio.examples/C08.analog.sequencer.pd
+share/doc/pd/doc/3.audio.examples/C09.sample.hold.pd
+share/doc/pd/doc/3.audio.examples/C10.monophonic.synth.pd
+share/doc/pd/doc/3.audio.examples/D01.envelope.gen.pd
+share/doc/pd/doc/3.audio.examples/D02.adsr.pd
+share/doc/pd/doc/3.audio.examples/D03.envelope.dB.pd
+share/doc/pd/doc/3.audio.examples/D04.envelope.quartic.pd
+share/doc/pd/doc/3.audio.examples/D05.envelope.pitch.pd
+share/doc/pd/doc/3.audio.examples/D06.envelope.portamento.pd
+share/doc/pd/doc/3.audio.examples/D07.additive.pd
+share/doc/pd/doc/3.audio.examples/D08.table.spectrum.pd
+share/doc/pd/doc/3.audio.examples/D09.shepard.tone.pd
+share/doc/pd/doc/3.audio.examples/D10.sampler.notes.pd
+share/doc/pd/doc/3.audio.examples/D11.sampler.poly.pd
+share/doc/pd/doc/3.audio.examples/D12.sampler.bis.pd
+share/doc/pd/doc/3.audio.examples/D13.additive.qlist.pd
+share/doc/pd/doc/3.audio.examples/D14.vibrato.pd
+share/doc/pd/doc/3.audio.examples/E01.spectrum.pd
+share/doc/pd/doc/3.audio.examples/E02.ring.modulation.pd
+share/doc/pd/doc/3.audio.examples/E03.octave.divider.pd
+share/doc/pd/doc/3.audio.examples/E04.difference.tone.pd
+share/doc/pd/doc/3.audio.examples/E05.chebychev.pd
+share/doc/pd/doc/3.audio.examples/E06.exponential.pd
+share/doc/pd/doc/3.audio.examples/E07.evenodd.pd
+share/doc/pd/doc/3.audio.examples/E08.phase.mod.pd
+share/doc/pd/doc/3.audio.examples/E09.FM.spectrum.pd
+share/doc/pd/doc/3.audio.examples/E10.complex.FM.pd
+share/doc/pd/doc/3.audio.examples/F01.pulse.pd
+share/doc/pd/doc/3.audio.examples/F02.just.say.pd
+share/doc/pd/doc/3.audio.examples/F03.pulse.spectrum.pd
+share/doc/pd/doc/3.audio.examples/F04.waveshaping.pulse.pd
+share/doc/pd/doc/3.audio.examples/F05.ring.modulation.pd
+share/doc/pd/doc/3.audio.examples/F06.packets.pd
+share/doc/pd/doc/3.audio.examples/F07.packet.spectrum.pd
+share/doc/pd/doc/3.audio.examples/F08.two.cosines.pd
+share/doc/pd/doc/3.audio.examples/F09.declickit.pd
+share/doc/pd/doc/3.audio.examples/F10.sweepable.FM.pd
+share/doc/pd/doc/3.audio.examples/F11.anharmonic.FM.pd
+share/doc/pd/doc/3.audio.examples/F12.paf.pd
+share/doc/pd/doc/3.audio.examples/F13.paf.control.pd
+share/doc/pd/doc/3.audio.examples/F14.wave.packet.pd
+share/doc/pd/doc/3.audio.examples/G01.delay.pd
+share/doc/pd/doc/3.audio.examples/G02.delay.loop.pd
+share/doc/pd/doc/3.audio.examples/G03.delay.variable.pd
+share/doc/pd/doc/3.audio.examples/G04.control.blocksize.pd
+share/doc/pd/doc/3.audio.examples/G05.execution.order.pd
+share/doc/pd/doc/3.audio.examples/G06.octave.doubler.pd
+share/doc/pd/doc/3.audio.examples/G07.shaker.pd
+share/doc/pd/doc/3.audio.examples/G08.reverb.pd
+share/doc/pd/doc/3.audio.examples/G09.pitchshift.pd
+share/doc/pd/doc/3.audio.examples/H01.low-pass.pd
+share/doc/pd/doc/3.audio.examples/H02.high-pass.pd
+share/doc/pd/doc/3.audio.examples/H03.band-pass.pd
+share/doc/pd/doc/3.audio.examples/H04.filter.sweep.pd
+share/doc/pd/doc/3.audio.examples/H05.filter.floyd.pd
+share/doc/pd/doc/3.audio.examples/H06.envelope.follower.pd
+share/doc/pd/doc/3.audio.examples/H07.measure.spectrum.pd
+share/doc/pd/doc/3.audio.examples/H08.heterodyning.pd
+share/doc/pd/doc/3.audio.examples/H09.ssb.modulation.pd
+share/doc/pd/doc/3.audio.examples/H10.measurement.pd
+share/doc/pd/doc/3.audio.examples/H11.shelving.pd
+share/doc/pd/doc/3.audio.examples/H12.peaking.pd
+share/doc/pd/doc/3.audio.examples/H13.butterworth.pd
+share/doc/pd/doc/3.audio.examples/H14.all.pass.pd
+share/doc/pd/doc/3.audio.examples/H15.phaser.pd
+share/doc/pd/doc/3.audio.examples/H16.adsr.filter.qlist.pd
+share/doc/pd/doc/3.audio.examples/I01.Fourier.analysis.pd
+share/doc/pd/doc/3.audio.examples/I02.Hann.window.pd
+share/doc/pd/doc/3.audio.examples/I03.resynthesis.pd
+share/doc/pd/doc/3.audio.examples/I04.noisegate.pd
+share/doc/pd/doc/3.audio.examples/I05.compressor.pd
+share/doc/pd/doc/3.audio.examples/I06.timbre.stamp.pd
+share/doc/pd/doc/3.audio.examples/I07.phase.vocoder.pd
+share/doc/pd/doc/3.audio.examples/I08.pvoc.reverb.pd
+share/doc/pd/doc/3.audio.examples/I09.sheep.from.goats.pd
+share/doc/pd/doc/3.audio.examples/I10.phase.bash.pd
+share/doc/pd/doc/3.audio.examples/J01.even.odd.pd
+share/doc/pd/doc/3.audio.examples/J02.trapezoids.pd
+share/doc/pd/doc/3.audio.examples/J03.pulse.width.mod.pd
+share/doc/pd/doc/3.audio.examples/J04.corners.pd
+share/doc/pd/doc/3.audio.examples/J05.triangle.pd
+share/doc/pd/doc/3.audio.examples/J06.enveloping.pd
+share/doc/pd/doc/3.audio.examples/J07.oversampling.pd
+share/doc/pd/doc/3.audio.examples/J08.classicsynth.pd
+share/doc/pd/doc/3.audio.examples/J09.bandlimited.pd
+share/doc/pd/doc/3.audio.examples/adsr.pd
+share/doc/pd/doc/3.audio.examples/buttercoef3.pd
+share/doc/pd/doc/3.audio.examples/butterworth3~.pd
+share/doc/pd/doc/3.audio.examples/filter-graph1.pd
+share/doc/pd/doc/3.audio.examples/filter-graph2.pd
+share/doc/pd/doc/3.audio.examples/osc-voice.pd
+share/doc/pd/doc/3.audio.examples/output~.pd
+share/doc/pd/doc/3.audio.examples/partial.pd
+share/doc/pd/doc/3.audio.examples/qlist-sampler.txt
+share/doc/pd/doc/3.audio.examples/qlist.txt
+share/doc/pd/doc/3.audio.examples/qlist2.txt
+share/doc/pd/doc/3.audio.examples/reverb-echo.pd
+share/doc/pd/doc/3.audio.examples/sampvoice.pd
+share/doc/pd/doc/3.audio.examples/sampvoice2.pd
+share/doc/pd/doc/3.audio.examples/shepvoice.pd
+share/doc/pd/doc/3.audio.examples/sinevoice.pd
+share/doc/pd/doc/3.audio.examples/spectrum-partial.pd
+share/doc/pd/doc/4.data.structures/00.intro.txt
+share/doc/pd/doc/4.data.structures/01.scalars.pd
+share/doc/pd/doc/4.data.structures/02.getting.data.pd
+share/doc/pd/doc/4.data.structures/03.setting.data.pd
+share/doc/pd/doc/4.data.structures/04.append.pd
+share/doc/pd/doc/4.data.structures/05.array.pd
+share/doc/pd/doc/4.data.structures/06.file.pd
+share/doc/pd/doc/4.data.structures/07.sequencer.pd
+share/doc/pd/doc/4.data.structures/08.selection.pd
+share/doc/pd/doc/4.data.structures/09.scaling.pd
+share/doc/pd/doc/4.data.structures/10.onoff.pd
+share/doc/pd/doc/4.data.structures/11.array.controls.pd
+share/doc/pd/doc/4.data.structures/12.beat-patterns.pd
+share/doc/pd/doc/4.data.structures/13.sliderule.pd
+share/doc/pd/doc/4.data.structures/14.partialtracer.pd
+share/doc/pd/doc/4.data.structures/add-trace.pd
+share/doc/pd/doc/4.data.structures/beat-maker.pd
+share/doc/pd/doc/4.data.structures/data-array.pd
+share/doc/pd/doc/4.data.structures/data-start.pd
+share/doc/pd/doc/4.data.structures/file.txt
+share/doc/pd/doc/4.data.structures/osc-voice.pd
+share/doc/pd/doc/4.data.structures/output~.pd
+share/doc/pd/doc/4.data.structures/voice.pd
+share/doc/pd/doc/4.data.structures/z.txt
+share/doc/pd/doc/5.reference/0_all_guis-INTRO.txt
+share/doc/pd/doc/5.reference/abs~-help.pd
+share/doc/pd/doc/5.reference/acoustics-help.pd
+share/doc/pd/doc/5.reference/acoustics~-help.pd
+share/doc/pd/doc/5.reference/adc~_dac~-help.pd
+share/doc/pd/doc/5.reference/append-help.pd
+share/doc/pd/doc/5.reference/bag-help.pd
+share/doc/pd/doc/5.reference/bang-help.pd
+share/doc/pd/doc/5.reference/bang~-help.pd
+share/doc/pd/doc/5.reference/biquad~-help.pd
+share/doc/pd/doc/5.reference/block~-help.pd
+share/doc/pd/doc/5.reference/bng-help.pd
+share/doc/pd/doc/5.reference/bp~-help.pd
+share/doc/pd/doc/5.reference/canvas-help.pd
+share/doc/pd/doc/5.reference/change-help.pd
+share/doc/pd/doc/5.reference/clip~-help.pd
+share/doc/pd/doc/5.reference/cos~-help.pd
+share/doc/pd/doc/5.reference/cpole~-help.pd
+share/doc/pd/doc/5.reference/cputime-help.pd
+share/doc/pd/doc/5.reference/czero_rev~-help.pd
+share/doc/pd/doc/5.reference/czero~-help.pd
+share/doc/pd/doc/5.reference/declare-help.pd
+share/doc/pd/doc/5.reference/delay-help.pd
+share/doc/pd/doc/5.reference/delread~-help.pd
+share/doc/pd/doc/5.reference/delwrite~-help.pd
+share/doc/pd/doc/5.reference/drawnumber-help.pd
+share/doc/pd/doc/5.reference/drawpolygon-help.pd
+share/doc/pd/doc/5.reference/element-help.pd
+share/doc/pd/doc/5.reference/env~-help.pd
+share/doc/pd/doc/5.reference/exp~-help.pd
+share/doc/pd/doc/5.reference/fft~-help.pd
+share/doc/pd/doc/5.reference/float-help.pd
+share/doc/pd/doc/5.reference/framp~-help.pd
+share/doc/pd/doc/5.reference/gatom-help.pd
+share/doc/pd/doc/5.reference/get-help.pd
+share/doc/pd/doc/5.reference/getsize-help.pd
+share/doc/pd/doc/5.reference/graph-help.pd
+share/doc/pd/doc/5.reference/hdial-help.pd
+share/doc/pd/doc/5.reference/help-intro.pd
+share/doc/pd/doc/5.reference/hip~-help.pd
+share/doc/pd/doc/5.reference/hslider-help.pd
+share/doc/pd/doc/5.reference/int-help.pd
+share/doc/pd/doc/5.reference/key-help.pd
+share/doc/pd/doc/5.reference/line-help.pd
+share/doc/pd/doc/5.reference/line~-help.pd
+share/doc/pd/doc/5.reference/list-help.pd
+share/doc/pd/doc/5.reference/log~-help.pd
+share/doc/pd/doc/5.reference/lop~-help.pd
+share/doc/pd/doc/5.reference/makefilename-help.pd
+share/doc/pd/doc/5.reference/makenote-help.pd
+share/doc/pd/doc/5.reference/math-help.pd
+share/doc/pd/doc/5.reference/message-help.pd
+share/doc/pd/doc/5.reference/metro.pd
+share/doc/pd/doc/5.reference/midi-help.pd
+share/doc/pd/doc/5.reference/moses-help.pd
+share/doc/pd/doc/5.reference/my_canvas-help.pd
+share/doc/pd/doc/5.reference/namecanvas-help.pd
+share/doc/pd/doc/5.reference/netreceive-help.pd
+share/doc/pd/doc/5.reference/netsend-help.pd
+share/doc/pd/doc/5.reference/noise~-help.pd
+share/doc/pd/doc/5.reference/numbox2-help.pd
+share/doc/pd/doc/5.reference/openpanel-help.pd
+share/doc/pd/doc/5.reference/operators-help.pd
+share/doc/pd/doc/5.reference/osc~-help.pd
+share/doc/pd/doc/5.reference/otherbinops-help.pd
+share/doc/pd/doc/5.reference/pack-help.pd
+share/doc/pd/doc/5.reference/pd-help.pd
+share/doc/pd/doc/5.reference/phasor~-help.pd
+share/doc/pd/doc/5.reference/pipe-help.pd
+share/doc/pd/doc/5.reference/plot-help.pd
+share/doc/pd/doc/5.reference/pointer-help.pd
+share/doc/pd/doc/5.reference/poly-help.pd
+share/doc/pd/doc/5.reference/pow~-help.pd
+share/doc/pd/doc/5.reference/print-help.pd
+share/doc/pd/doc/5.reference/print~-help.pd
+share/doc/pd/doc/5.reference/qlist-help.pd
+share/doc/pd/doc/5.reference/qlist.txt
+share/doc/pd/doc/5.reference/random-help.pd
+share/doc/pd/doc/5.reference/readsf~-help.pd
+share/doc/pd/doc/5.reference/realtime-help.pd
+share/doc/pd/doc/5.reference/receive-help.pd
+share/doc/pd/doc/5.reference/route-help.pd
+share/doc/pd/doc/5.reference/rpole~-help.pd
+share/doc/pd/doc/5.reference/rsqrt~-help.pd
+share/doc/pd/doc/5.reference/rzero_rev~-help.pd
+share/doc/pd/doc/5.reference/rzero~-help.pd
+share/doc/pd/doc/5.reference/samphold~-help.pd
+share/doc/pd/doc/5.reference/savepanel-help.pd
+share/doc/pd/doc/5.reference/select-help.pd
+share/doc/pd/doc/5.reference/send-help.pd
+share/doc/pd/doc/5.reference/send~-help.pd
+share/doc/pd/doc/5.reference/set-help.pd
+share/doc/pd/doc/5.reference/setsize-help.pd
+share/doc/pd/doc/5.reference/setsize.txt
+share/doc/pd/doc/5.reference/sigbinops-help.pd
+share/doc/pd/doc/5.reference/sig~-help.pd
+share/doc/pd/doc/5.reference/snapshot~-help.pd
+share/doc/pd/doc/5.reference/soundfiler-help.pd
+share/doc/pd/doc/5.reference/spigot-help.pd
+share/doc/pd/doc/5.reference/sqrt~-help.pd
+share/doc/pd/doc/5.reference/stripnote-help.pd
+share/doc/pd/doc/5.reference/struct-help.pd
+share/doc/pd/doc/5.reference/sublist-help.pd
+share/doc/pd/doc/5.reference/swap-help.pd
+share/doc/pd/doc/5.reference/switch~-help.pd
+share/doc/pd/doc/5.reference/table.txt
+share/doc/pd/doc/5.reference/tabosc4~-help.pd
+share/doc/pd/doc/5.reference/tabplay~-help.pd
+share/doc/pd/doc/5.reference/tabread-help.pd
+share/doc/pd/doc/5.reference/tabread4~-help.pd
+share/doc/pd/doc/5.reference/tabreceive~-help.pd
+share/doc/pd/doc/5.reference/tabsend~-help.pd
+share/doc/pd/doc/5.reference/tabwrite-help.pd
+share/doc/pd/doc/5.reference/tabwrite~-help.pd
+share/doc/pd/doc/5.reference/text-help.pd
+share/doc/pd/doc/5.reference/textfile-help.pd
+share/doc/pd/doc/5.reference/textfile.txt
+share/doc/pd/doc/5.reference/threshold~-help.pd
+share/doc/pd/doc/5.reference/throw~-help.pd
+share/doc/pd/doc/5.reference/timer-help.pd
+share/doc/pd/doc/5.reference/toggle-help.pd
+share/doc/pd/doc/5.reference/trigger-help.pd
+share/doc/pd/doc/5.reference/unpack-help.pd
+share/doc/pd/doc/5.reference/until-help.pd
+share/doc/pd/doc/5.reference/value-help.pd
+share/doc/pd/doc/5.reference/vcf~-help.pd
+share/doc/pd/doc/5.reference/vdial-help.pd
+share/doc/pd/doc/5.reference/vd~-help.pd
+share/doc/pd/doc/5.reference/vline~-help.pd
+share/doc/pd/doc/5.reference/vslider-help.pd
+share/doc/pd/doc/5.reference/vu-help.pd
+share/doc/pd/doc/5.reference/wrap~-help.pd
+share/doc/pd/doc/5.reference/writesf~-help.pd
+share/doc/pd/doc/5.reference/x_all_guis.pd
+share/doc/pd/doc/6.externs/0.README.txt
+share/doc/pd/doc/6.externs/dspobj~.c
+share/doc/pd/doc/6.externs/makefile
+share/doc/pd/doc/6.externs/obj1.c
+share/doc/pd/doc/6.externs/obj2.c
+share/doc/pd/doc/6.externs/obj3.c
+share/doc/pd/doc/6.externs/obj4.c
+share/doc/pd/doc/6.externs/obj5.c
+share/doc/pd/doc/6.externs/test-dspobj~.pd
+share/doc/pd/doc/6.externs/test-obj1.pd
+share/doc/pd/doc/6.externs/test-obj2.pd
+share/doc/pd/doc/6.externs/test-obj3.pd
+share/doc/pd/doc/6.externs/test-obj4.pd
+share/doc/pd/doc/6.externs/test-obj5.pd
+share/doc/pd/doc/7.stuff/soundfile-tools/1.ring-mod.pd
+share/doc/pd/doc/7.stuff/soundfile-tools/2.bandpass.pd
+share/doc/pd/doc/7.stuff/soundfile-tools/3.phase.vocoder.pd
+share/doc/pd/doc/7.stuff/soundfile-tools/4.looper.pd
+share/doc/pd/doc/7.stuff/soundfile-tools/5.reverb.pd
+share/doc/pd/doc/7.stuff/soundfile-tools/6.vocoder.pd
+share/doc/pd/doc/7.stuff/soundfile-tools/README.txt
+share/doc/pd/doc/7.stuff/synth/1.poly.synth.pd
+share/doc/pd/doc/7.stuff/synth/README.txt
+share/doc/pd/doc/7.stuff/synth/gadsr.pd
+share/doc/pd/doc/7.stuff/synth/numset.pd
+share/doc/pd/doc/7.stuff/synth/preset.pd
+share/doc/pd/doc/7.stuff/synth/preset1.txt
+share/doc/pd/doc/7.stuff/synth/preset2.txt
+share/doc/pd/doc/7.stuff/synth/preset3.txt
+share/doc/pd/doc/7.stuff/synth/preset4.txt
+share/doc/pd/doc/7.stuff/synth/synthvoice.pd
+share/doc/pd/doc/7.stuff/synth/test-gadsr.pd
+share/doc/pd/doc/7.stuff/tools/latency.pd
+share/doc/pd/doc/7.stuff/tools/load-meter.pd
+share/doc/pd/doc/7.stuff/tools/testtone.pd
+share/doc/pd/doc/7.stuff/tools/testtone16.pd
+share/doc/pd/doc/sound/bell.aiff
+share/doc/pd/doc/sound/voice.wav
+share/doc/pd/doc/sound/voice2.wav
diff --git a/audio/pd/distinfo b/audio/pd/distinfo
new file mode 100644
index 00000000000..6489ed58269
--- /dev/null
+++ b/audio/pd/distinfo
@@ -0,0 +1,21 @@
+$NetBSD: distinfo,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+SHA1 (pd-0.43-0.src.tar.gz) = 9bc4377fe25d034120bd393d63fe4180c7a500bc
+RMD160 (pd-0.43-0.src.tar.gz) = 6c737e69430180187281747830e655401b803b55
+Size (pd-0.43-0.src.tar.gz) = 2194131 bytes
+SHA1 (patch-Makefile.am) = 7a8da5f1902dcfb8f49ef9c915ae96a1996bd83d
+SHA1 (patch-extra_bonk~_bonk~.c) = c394543ddc963c8398cd0cea4bdb60b23d5c6ca5
+SHA1 (patch-extra_pd~_pd~.c) = f4b6760b4434de25b34c499d9a8216c4ffe22ec8
+SHA1 (patch-extra_sigmund~_sigmund~.c) = e42d3fe3808dbff6b40aa8e0c59b929159113f03
+SHA1 (patch-src_Makefile.am) = a87c3380b0180a906c0496e743fbece772226da3
+SHA1 (patch-src_configure) = 6f86f1045081f56603cca030dfe0b501eaef7e6a
+SHA1 (patch-src_d__array.c) = 86dc633efa9f14e57cdfcfbf9a0a6bb7f36f6ca5
+SHA1 (patch-src_d__osc.c) = 82095c2b269368dde69202c6845b3103e0c00995
+SHA1 (patch-src_m__binbuf.c) = 6ee7b8b62fc8bbe4b9522e8c6323d1e0ad5f1638
+SHA1 (patch-src_s__audio__oss.c) = 6fad31cce878b2eefa19060cef3072bc6a49b70b
+SHA1 (patch-src_s__file.c) = 1577bcc0cd6fb252172410f5b52b1bac465a3779
+SHA1 (patch-src_s__loader.c) = 0bfcb810e450983775c1c7da9b95ed0e8e152316
+SHA1 (patch-src_s__stuff.h) = b0b93853e5c06d367788429d95085da941f3d25e
+SHA1 (patch-src_s__utf8.c) = d75ea717e611c01d1c00a8f99779ff1fc47a92f8
+SHA1 (patch-src_x__list.c) = 36135361c5a186a4352ed55d743683e4d6a18087
+SHA1 (patch-src_x__misc.c) = ca8704f4a8a6b904a04169577df29373665f3aa7
diff --git a/audio/pd/patches/patch-Makefile.am b/audio/pd/patches/patch-Makefile.am
new file mode 100644
index 00000000000..5bd8434b00e
--- /dev/null
+++ b/audio/pd/patches/patch-Makefile.am
@@ -0,0 +1,28 @@
+$NetBSD: patch-Makefile.am,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Fix path to documentation (installed following pksrc conventions).
+Avoid creating unnecessary(?) empty directory.
+
+--- Makefile.am.orig 2010-08-18 23:42:59.000000000 +0000
++++ Makefile.am
+@@ -37,11 +37,7 @@ endif
+ ## FIXXXME
+ ## $(pkglibdir) is used throughout the other Makefile.amS
+ ## simply ignoring the special case for other OSs...
+-if LINUX
+-libpddir = $(pkglibdir)
+-else
+-libpddir = $(prefix)
+-endif
++libpddir = $(prefix)/share/doc/pd
+
+ # Symlinks don't work on Windows/MinGW but they do on Cygwin.
+ bin:
+@@ -51,6 +47,7 @@ locales:
+ make -C po all
+
+ install-data-local:
++mingw-install-data-local:
+ $(INSTALL) -d $(DESTDIR)$(libpddir)/startup
+ $(INSTALL) -d $(DESTDIR)$(libpddir)/startup/disabled
+
diff --git a/audio/pd/patches/patch-extra_bonk~_bonk~.c b/audio/pd/patches/patch-extra_bonk~_bonk~.c
new file mode 100644
index 00000000000..5d89871d9d6
--- /dev/null
+++ b/audio/pd/patches/patch-extra_bonk~_bonk~.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-extra_bonk~_bonk~.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- extra/bonk~/bonk~.c.orig 2010-08-19 01:37:00.000000000 +0000
++++ extra/bonk~/bonk~.c
+@@ -82,11 +82,7 @@ void *bonk_class;
+ static t_class *bonk_class;
+ #endif
+
+-#ifdef _WIN32
+ #include <malloc.h>
+-#elif ! defined(_MSC_VER)
+-#include <alloca.h>
+-#endif
+
+ /* ------------------------ bonk~ ----------------------------- */
+
diff --git a/audio/pd/patches/patch-extra_pd~_pd~.c b/audio/pd/patches/patch-extra_pd~_pd~.c
new file mode 100644
index 00000000000..efaa2b1a246
--- /dev/null
+++ b/audio/pd/patches/patch-extra_pd~_pd~.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-extra_pd~_pd~.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Add missing include (for SIGPIPE).
+Define extensions for NetBSD.
+
+--- extra/pd~/pd~.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ extra/pd~/pd~.c
+@@ -6,6 +6,7 @@
+ */
+
+ #include <stdio.h>
++#include <signal.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+@@ -56,6 +57,15 @@ static char pd_tilde_dllextent[] = ".l_i
+ pd_tilde_dllextent2[] = ".pd_linux";
+ #endif
+ #endif
++#if defined(__NetBSD__)
++#ifdef __x86_64__
++static char pd_tilde_dllextent[] = ".n_ia64",
++ pd_tilde_dllextent2[] = ".pd_netbsd";
++#else
++static char pd_tilde_dllextent[] = ".n_i386",
++ pd_tilde_dllextent2[] = ".pd_netbsd";
++#endif
++#endif
+ #ifdef __APPLE__
+ static char pd_tilde_dllextent[] = ".d_fat",
+ pd_tilde_dllextent2[] = ".pd_darwin";
diff --git a/audio/pd/patches/patch-extra_sigmund~_sigmund~.c b/audio/pd/patches/patch-extra_sigmund~_sigmund~.c
new file mode 100644
index 00000000000..6e2aa4b2e57
--- /dev/null
+++ b/audio/pd/patches/patch-extra_sigmund~_sigmund~.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-extra_sigmund~_sigmund~.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- extra/sigmund~/sigmund~.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ extra/sigmund~/sigmund~.c
+@@ -26,11 +26,7 @@ for example, defines this in the file d_
+ #include <math.h>
+ #include <stdio.h>
+ #include <string.h>
+-#ifdef _WIN32
+ #include <malloc.h>
+-#elif ! defined(_MSC_VER)
+-#include <alloca.h>
+-#endif
+ #include <stdlib.h>
+ #ifdef _MSC_VER
+ #pragma warning( disable : 4244 )
diff --git a/audio/pd/patches/patch-src_Makefile.am b/audio/pd/patches/patch-src_Makefile.am
new file mode 100644
index 00000000000..15f637c9f66
--- /dev/null
+++ b/audio/pd/patches/patch-src_Makefile.am
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Makefile.am,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Add missing libraries to linker line.
+
+--- src/Makefile.am.orig 2011-02-27 03:22:57.000000000 +0000
++++ src/Makefile.am
+@@ -6,7 +6,7 @@ pd_LDFLAGS =
+ pdsend_CFLAGS =
+ pdreceive_CFLAGS =
+ pd_watchdog_CFLAGS =
+-LIBS =
++LIBS = $(LIBOSSAUDIO) $(PTHREAD_LDFLAGS) $(PTHREAD_LIBS) -lm
+ INCLUDES = @INCLUDES@
+
+ SUFFIXES = .@EXTENSION@ .@SHARED_LIB@
diff --git a/audio/pd/patches/patch-src_configure b/audio/pd/patches/patch-src_configure
new file mode 100644
index 00000000000..3f7570350ac
--- /dev/null
+++ b/audio/pd/patches/patch-src_configure
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_configure,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Fix unportable test(1) construct.
+
+--- src/configure.orig 2011-03-21 01:41:34.000000000 +0000
++++ src/configure
+@@ -5407,7 +5407,7 @@ then
+ then
+ fat="no"
+ fi
+- if test "x$fat" == "xyes";
++ if test "x$fat" = "xyes";
+ then
+ MORECFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -arch i386 -arch ppc -Wno-error"
diff --git a/audio/pd/patches/patch-src_d__array.c b/audio/pd/patches/patch-src_d__array.c
new file mode 100644
index 00000000000..c2af6a1c64d
--- /dev/null
+++ b/audio/pd/patches/patch-src_d__array.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_d__array.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Detect endianness on NetBSD.
+
+--- src/d_array.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ src/d_array.c
+@@ -502,7 +502,7 @@ static void tabread4_tilde_setup(void)
+ #include <sys/endian.h>
+ #endif
+
+-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ #include <machine/endian.h>
+ #endif
+
diff --git a/audio/pd/patches/patch-src_d__osc.c b/audio/pd/patches/patch-src_d__osc.c
new file mode 100644
index 00000000000..069dbe40d47
--- /dev/null
+++ b/audio/pd/patches/patch-src_d__osc.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_d__osc.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Detect endianness on NetBSD.
+
+--- src/d_osc.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ src/d_osc.c
+@@ -15,7 +15,7 @@
+ #include <sys/endian.h>
+ #endif
+
+-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ #include <machine/endian.h>
+ #endif
+
diff --git a/audio/pd/patches/patch-src_m__binbuf.c b/audio/pd/patches/patch-src_m__binbuf.c
new file mode 100644
index 00000000000..396705df820
--- /dev/null
+++ b/audio/pd/patches/patch-src_m__binbuf.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_m__binbuf.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- src/m_binbuf.c.orig 2011-03-10 06:02:41.000000000 +0000
++++ src/m_binbuf.c
+@@ -530,11 +530,7 @@ done:
+
+ #define SMALLMSG 5
+ #define HUGEMSG 1000
+-#ifdef MSW
+ #include <malloc.h>
+-#else
+-#include <alloca.h>
+-#endif
+ #if HAVE_ALLOCA
+ #define ATOMS_ALLOCA(x, n) ((x) = (t_atom *)((n) < HUGEMSG ? \
+ alloca((n) * sizeof(t_atom)) : getbytes((n) * sizeof(t_atom))))
diff --git a/audio/pd/patches/patch-src_s__audio__oss.c b/audio/pd/patches/patch-src_s__audio__oss.c
new file mode 100644
index 00000000000..345e21bcd0f
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__audio__oss.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_s__audio__oss.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Use proper soundcard.h include on NetBSD and add missing argument
+to ioctl().
+
+--- src/s_audio_oss.c.orig 2011-03-07 01:33:39.000000000 +0000
++++ src/s_audio_oss.c
+@@ -5,7 +5,7 @@
+
+ /* this file inputs and outputs audio using the OSS API available on linux. */
+
+-#if defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ # include <sys/soundcard.h>
+ #else
+ # include <linux/soundcard.h>
+@@ -120,7 +120,7 @@ typedef struct _multidev {
+
+ int oss_reset(int fd) {
+ int err;
+- if ((err = ioctl(fd,SNDCTL_DSP_RESET)) < 0)
++ if ((err = ioctl(fd,SNDCTL_DSP_RESET,0)) < 0)
+ error("OSS: Could not reset");
+ return err;
+ }
diff --git a/audio/pd/patches/patch-src_s__file.c b/audio/pd/patches/patch-src_s__file.c
new file mode 100644
index 00000000000..adbb3e32159
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__file.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_s__file.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+File handling under NetBSD is the same as under Linux.
+
+--- src/s_file.c.orig 2011-03-19 22:22:27.000000000 +0000
++++ src/s_file.c
+@@ -36,7 +36,7 @@ int sys_defeatrt;
+ t_symbol *sys_flags = &s_;
+ void sys_doflags( void);
+
+-#if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(ANDROID)
++#if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(ANDROID) || defined(__NetBSD__)
+
+ static char *sys_prefbuf;
+ static int sys_prefbufsize;
diff --git a/audio/pd/patches/patch-src_s__loader.c b/audio/pd/patches/patch-src_s__loader.c
new file mode 100644
index 00000000000..21f9da6287f
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__loader.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_s__loader.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Define extensions for NetBSD.
+
+--- src/s_loader.c.orig 2010-07-29 03:50:34.000000000 +0000
++++ src/s_loader.c
+@@ -38,6 +38,12 @@ a fat binary or an indication of the ins
+
+ #ifdef __FreeBSD__
+ static char sys_dllextent[] = ".b_i386", sys_dllextent2[] = ".pd_freebsd";
++#elif defined(__NetBSD__)
++# ifdef __x86_64__
++static char sys_dllextent[] = ".n_ia64", sys_dllextent2[] = ".pd_netbsd";
++# else
++static char sys_dllextent[] = ".n_i386", sys_dllextent2[] = ".pd_netbsd";
++# endif
+ #elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
+ # ifdef __x86_64__
+ static char sys_dllextent[] = ".l_ia64", sys_dllextent2[] = ".pd_linux";
diff --git a/audio/pd/patches/patch-src_s__stuff.h b/audio/pd/patches/patch-src_s__stuff.h
new file mode 100644
index 00000000000..175aa5fc555
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__stuff.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_s__stuff.h,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Use OSS on NetBSD.
+
+--- src/s_stuff.h.orig 2011-03-13 00:19:29.000000000 +0000
++++ src/s_stuff.h
+@@ -204,7 +204,7 @@ void sys_setalarm(int microsec);
+ #define API_DEFAULT API_DUMMY
+ #define API_DEFSTRING "dummy audio"
+ #else
+-#if defined(__linux__) || defined(__FreeBSD_kernel__)
++#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+ # define API_DEFAULT API_OSS
+ # define API_DEFSTRING "OSS"
+ #endif
diff --git a/audio/pd/patches/patch-src_s__utf8.c b/audio/pd/patches/patch-src_s__utf8.c
new file mode 100644
index 00000000000..471c45b7c3c
--- /dev/null
+++ b/audio/pd/patches/patch-src_s__utf8.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_s__utf8.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- src/s_utf8.c.orig 2010-08-18 03:51:01.000000000 +0000
++++ src/s_utf8.c
+@@ -18,11 +18,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
+-#ifdef WIN32
+ #include <malloc.h>
+-#else
+-#include <alloca.h>
+-#endif
+
+ #include "s_utf8.h"
+
diff --git a/audio/pd/patches/patch-src_x__list.c b/audio/pd/patches/patch-src_x__list.c
new file mode 100644
index 00000000000..ce4e28568ba
--- /dev/null
+++ b/audio/pd/patches/patch-src_x__list.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_x__list.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+alloca.h is not portable.
+
+--- src/x_list.c.orig 2010-07-21 18:37:47.000000000 +0000
++++ src/x_list.c
+@@ -4,11 +4,7 @@
+
+ #include "m_pd.h"
+ /* #include <string.h> */
+-#ifdef MSW
+ #include <malloc.h>
+-#else
+-#include <alloca.h>
+-#endif
+
+ extern t_pd *newest;
+
diff --git a/audio/pd/patches/patch-src_x__misc.c b/audio/pd/patches/patch-src_x__misc.c
new file mode 100644
index 00000000000..56b94dd2133
--- /dev/null
+++ b/audio/pd/patches/patch-src_x__misc.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_x__misc.c,v 1.1.1.1 2011/09/15 01:05:05 wiz Exp $
+
+Define missing symbol the same as on FreeBSD/Mac OS X.
+
+--- src/x_misc.c.orig 2010-07-28 20:55:17.000000000 +0000
++++ src/x_misc.c
+@@ -20,7 +20,7 @@
+ #include <unistd.h>
+ #endif /* _WIN32 */
+
+-#if defined (__APPLE__) || defined (__FreeBSD__)
++#if defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__)
+ #define CLOCKHZ CLK_TCK
+ #endif
+ #if defined (__linux__) || defined (__CYGWIN__) || defined (ANDROID)