pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rtcmix: Import rtcmix-4.2.0 as wip/rtcmix



Module Name:	pkgsrc-wip
Committed By:	trebol <trebol4444%gmx.com@localhost>
Pushed By:	trebol
Date:		Mon Oct 16 14:05:37 2017 +0100
Changeset:	428192ce8e00d1ef926512f81d5fc5cd6cee6b6f

Modified Files:
	Makefile
Added Files:
	rtcmix/DESCR
	rtcmix/Makefile
	rtcmix/PLIST
	rtcmix/TODO
	rtcmix/distinfo
	rtcmix/patches/patch-Makefile
	rtcmix/patches/patch-configure.ac
	rtcmix/patches/patch-defs.conf.in
	rtcmix/patches/patch-docs_Makefile
	rtcmix/patches/patch-docs_README.documentation
	rtcmix/patches/patch-docs_pod_Makefile
	rtcmix/patches/patch-docs_pod_copygen.pod
	rtcmix/patches/patch-docs_pod_gen20.pod
	rtcmix/patches/patch-docs_pod_gen25.pod
	rtcmix/patches/patch-docs_pod_gen4.pod
	rtcmix/patches/patch-docs_pod_rtoutput.pod
	rtcmix/patches/patch-genlib_Makefile
	rtcmix/patches/patch-insts_base_CHAIN_Makefile
	rtcmix/patches/patch-insts_base_WAVETABLE_Makefile
	rtcmix/patches/patch-insts_bgg_GVERB_Makefile
	rtcmix/patches/patch-insts_bgg_HALFWAVE_Makefile
	rtcmix/patches/patch-insts_bgg_PFSCHED_Makefile
	rtcmix/patches/patch-insts_bgg_SYNC_Makefile
	rtcmix/patches/patch-insts_bgg_VWAVE_Makefile
	rtcmix/patches/patch-insts_jg_BUTTER_Makefile
	rtcmix/patches/patch-insts_jg_COMPLIMIT_Makefile
	rtcmix/patches/patch-insts_jg_CONVOLVE1_Makefile
	rtcmix/patches/patch-insts_jg_DCBLOCK_Makefile
	rtcmix/patches/patch-insts_jg_DECIMATE_Makefile
	rtcmix/patches/patch-insts_jg_DISTORT_Makefile
	rtcmix/patches/patch-insts_jg_ELL_Makefile
	rtcmix/patches/patch-insts_jg_EQ_Makefile
	rtcmix/patches/patch-insts_jg_FILTERBANK_Makefile
	rtcmix/patches/patch-insts_jg_FILTSWEEP_Makefile
	rtcmix/patches/patch-insts_jg_FLANGE_Makefile
	rtcmix/patches/patch-insts_jg_FOLLOWER_Makefile
	rtcmix/patches/patch-insts_jg_FREEVERB_Makefile
	rtcmix/patches/patch-insts_jg_GRANSYNTH_Makefile
	rtcmix/patches/patch-insts_jg_GRANULATE_Makefile
	rtcmix/patches/patch-insts_jg_JCHOR_Makefile
	rtcmix/patches/patch-insts_jg_JDELAY_Makefile
	rtcmix/patches/patch-insts_jg_JFIR_Makefile
	rtcmix/patches/patch-insts_jg_JGRAN_Makefile
	rtcmix/patches/patch-insts_jg_MOOGVCF_Makefile
	rtcmix/patches/patch-insts_jg_MROOM_Makefile
	rtcmix/patches/patch-insts_jg_MULTEQ_Makefile
	rtcmix/patches/patch-insts_jg_MULTIWAVE_Makefile
	rtcmix/patches/patch-insts_jg_NPAN_Makefile
	rtcmix/patches/patch-insts_jg_PAN_Makefile
	rtcmix/patches/patch-insts_jg_QPAN_Makefile
	rtcmix/patches/patch-insts_jg_RESYNTH_Makefile
	rtcmix/patches/patch-insts_jg_REVERBIT_Makefile
	rtcmix/patches/patch-insts_jg_REV_Makefile
	rtcmix/patches/patch-insts_jg_ROOM_Makefile
	rtcmix/patches/patch-insts_jg_SHAPE_Makefile
	rtcmix/patches/patch-insts_jg_SPECTACLE2_Makefile
	rtcmix/patches/patch-insts_jg_SPECTACLE_Makefile
	rtcmix/patches/patch-insts_jg_SPLITTER_Makefile
	rtcmix/patches/patch-insts_jg_SROOM_Makefile
	rtcmix/patches/patch-insts_jg_VOCODE2_Makefile
	rtcmix/patches/patch-insts_jg_VOCODE3_Makefile
	rtcmix/patches/patch-insts_jg_VOCODESYNTH_Makefile
	rtcmix/patches/patch-insts_jg_WAVY_Makefile
	rtcmix/patches/patch-insts_jg_WIGGLE_Makefile
	rtcmix/patches/patch-insts_jg_denoise_Makefile
	rtcmix/patches/patch-insts_joel_jfuncs_Makefile
	rtcmix/patches/patch-insts_joel_tuning_Makefile
	rtcmix/patches/patch-insts_maxmsp_MAXBANG_Makefile
	rtcmix/patches/patch-insts_maxmsp_MAXMESSAGE_Makefile
	rtcmix/patches/patch-insts_std_AMINST_Makefile
	rtcmix/patches/patch-insts_std_AM_Makefile
	rtcmix/patches/patch-insts_std_CLAR_Makefile
	rtcmix/patches/patch-insts_std_COMBIT_Makefile
	rtcmix/patches/patch-insts_std_DEL1_Makefile
	rtcmix/patches/patch-insts_std_DELAY_Makefile
	rtcmix/patches/patch-insts_std_DUMP_Makefile
	rtcmix/patches/patch-insts_std_FIR_Makefile
	rtcmix/patches/patch-insts_std_FMINST_Makefile
	rtcmix/patches/patch-insts_std_HOLO_Makefile
	rtcmix/patches/patch-insts_std_IIR_Makefile
	rtcmix/patches/patch-insts_std_LOOP_Makefile
	rtcmix/patches/patch-insts_std_LPCPLAY_Makefile
	rtcmix/patches/patch-insts_std_MARAGRAN_Makefile
	rtcmix/patches/patch-insts_std_METAFLUTE_Makefile
	rtcmix/patches/patch-insts_std_MMOVE_Makefile
	rtcmix/patches/patch-insts_std_MOCKBEND_Makefile
	rtcmix/patches/patch-insts_std_MOVE_Makefile
	rtcmix/patches/patch-insts_std_MULTICOMB_Makefile
	rtcmix/patches/patch-insts_std_NOISE_Makefile
	rtcmix/patches/patch-insts_std_PANECHO_Makefile
	rtcmix/patches/patch-insts_std_PHASER_Makefile
	rtcmix/patches/patch-insts_std_PVOC.maxmsp_Makefile
	rtcmix/patches/patch-insts_std_PVOC_Makefile
	rtcmix/patches/patch-insts_std_REVMIX_Makefile
	rtcmix/patches/patch-insts_std_SCRUB_Makefile
	rtcmix/patches/patch-insts_std_SCULPT_Makefile
	rtcmix/patches/patch-insts_std_STEREO_Makefile
	rtcmix/patches/patch-insts_std_STRUM2_Makefile
	rtcmix/patches/patch-insts_std_STRUMFB_Makefile
	rtcmix/patches/patch-insts_std_STRUM_Makefile
	rtcmix/patches/patch-insts_std_TRANSBEND_Makefile
	rtcmix/patches/patch-insts_std_TRANS_Makefile
	rtcmix/patches/patch-insts_std_WAVESHAPE_Makefile
	rtcmix/patches/patch-insts_std_convolve_Makefile
	rtcmix/patches/patch-insts_std_gravy_Makefile
	rtcmix/patches/patch-insts_std_mrotate_Makefile
	rtcmix/patches/patch-insts_std_numtest_Makefile
	rtcmix/patches/patch-insts_std_rotate_Makefile
	rtcmix/patches/patch-insts_std_sgran_Makefile
	rtcmix/patches/patch-insts_std_stgran_Makefile
	rtcmix/patches/patch-insts_std_wow_Makefile
	rtcmix/patches/patch-insts_stk_MBANDEDWG_Makefile
	rtcmix/patches/patch-insts_stk_MBLOWBOTL_Makefile
	rtcmix/patches/patch-insts_stk_MBLOWHOLE_Makefile
	rtcmix/patches/patch-insts_stk_MBOWED_Makefile
	rtcmix/patches/patch-insts_stk_MBRASS_Makefile
	rtcmix/patches/patch-insts_stk_MCLAR_Makefile
	rtcmix/patches/patch-insts_stk_MMESH2D_Makefile
	rtcmix/patches/patch-insts_stk_MMODALBAR_Makefile
	rtcmix/patches/patch-insts_stk_MSAXOFONY_Makefile
	rtcmix/patches/patch-insts_stk_MSHAKERS_Makefile
	rtcmix/patches/patch-insts_stk_MSITAR_Makefile
	rtcmix/patches/patch-insts_vccm_COMBFILT_Makefile
	rtcmix/patches/patch-insts_vccm_HAR_Makefile
	rtcmix/patches/patch-insts_vccm_MIXN_Makefile
	rtcmix/patches/patch-insts_vccm_RAP_Makefile
	rtcmix/patches/patch-insts_vccm_vMIX_Makefile
	rtcmix/patches/patch-makefile.conf.in
	rtcmix/patches/patch-site.conf
	rtcmix/patches/patch-src_audio_AudioFileDevice.cpp
	rtcmix/patches/patch-src_audio_Makefile
	rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.cpp
	rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.h
	rtcmix/patches/patch-src_audio_OSSAudioDevice.cpp
	rtcmix/patches/patch-src_audio_OSSAudioDevice.h
	rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.cpp
	rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.h
	rtcmix/patches/patch-src_audio_audio__dev__creator.cpp
	rtcmix/patches/patch-src_audio_sndlibsupport.h
	rtcmix/patches/patch-src_control_datafile_Makefile
	rtcmix/patches/patch-src_control_display_Makefile
	rtcmix/patches/patch-src_control_maxmsp_Makefile
	rtcmix/patches/patch-src_control_midi_Makefile
	rtcmix/patches/patch-src_control_mouse_Makefile
	rtcmix/patches/patch-src_control_osc_Makefile
	rtcmix/patches/patch-src_control_pfbus_Makefile
	rtcmix/patches/patch-src_parser_Makefile
	rtcmix/patches/patch-src_parser_perl_Makefile
	rtcmix/patches/patch-src_rtcmix_Makefile
	rtcmix/patches/patch-src_rtcmix_load__utils.c
	rtcmix/patches/patch-utils_Makefile
	rtcmix/patches/patch-utils_cmixplay.cpp
	rtcmix/patches/patch-utils_head_Makefile
	rtcmix/patches/patch-utils_resample_Makefile

Log Message:
rtcmix:	Import rtcmix-4.2.0 as wip/rtcmix

RTcmix is a real-time software "language" for doing digital sound
synthesis and signal-processing. It is written in C/C++, and is
distributed open-source, free of charge. In certain respects, it
is similar in function to other extant unit-generator-based software
languages such as CSOUND, SuperCollider and (to a lesser extent)
JSyn and Max/MSP -- they do share a common heritage, after all.
There are some differences, however, between all these languages...
and variety is of course the spice of life!

So if you've been searching the web high and low for just the right
library of DSP functions to include in your latest&greatest "killer"
(or maybe "peacefully coexisting"?) app, then RTcmix may just be
the Right Package for You.

P.D.
This is the developers' description of their project, wich I've respected.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=428192ce8e00d1ef926512f81d5fc5cd6cee6b6f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |   1 +
 rtcmix/DESCR                                       |  13 +
 rtcmix/Makefile                                    |  28 ++
 rtcmix/PLIST                                       | 289 +++++++++++++++++++++
 rtcmix/TODO                                        |   5 +
 rtcmix/distinfo                                    | 155 +++++++++++
 rtcmix/patches/patch-Makefile                      |  25 ++
 rtcmix/patches/patch-configure.ac                  | 260 ++++++++++++++++++
 rtcmix/patches/patch-defs.conf.in                  |  18 ++
 rtcmix/patches/patch-docs_Makefile                 |  13 +
 rtcmix/patches/patch-docs_README.documentation     |  15 ++
 rtcmix/patches/patch-docs_pod_Makefile             |  73 ++++++
 rtcmix/patches/patch-docs_pod_copygen.pod          |  24 ++
 rtcmix/patches/patch-docs_pod_gen20.pod            |  44 ++++
 rtcmix/patches/patch-docs_pod_gen25.pod            |  17 ++
 rtcmix/patches/patch-docs_pod_gen4.pod             |  17 ++
 rtcmix/patches/patch-docs_pod_rtoutput.pod         |  17 ++
 rtcmix/patches/patch-genlib_Makefile               |  32 +++
 rtcmix/patches/patch-insts_base_CHAIN_Makefile     |  27 ++
 rtcmix/patches/patch-insts_base_WAVETABLE_Makefile |  27 ++
 rtcmix/patches/patch-insts_bgg_GVERB_Makefile      |  27 ++
 rtcmix/patches/patch-insts_bgg_HALFWAVE_Makefile   |  27 ++
 rtcmix/patches/patch-insts_bgg_PFSCHED_Makefile    |  27 ++
 rtcmix/patches/patch-insts_bgg_SYNC_Makefile       |  27 ++
 rtcmix/patches/patch-insts_bgg_VWAVE_Makefile      |  27 ++
 rtcmix/patches/patch-insts_jg_BUTTER_Makefile      |  27 ++
 rtcmix/patches/patch-insts_jg_COMPLIMIT_Makefile   |  27 ++
 rtcmix/patches/patch-insts_jg_CONVOLVE1_Makefile   |  27 ++
 rtcmix/patches/patch-insts_jg_DCBLOCK_Makefile     |  27 ++
 rtcmix/patches/patch-insts_jg_DECIMATE_Makefile    |  27 ++
 rtcmix/patches/patch-insts_jg_DISTORT_Makefile     |  27 ++
 rtcmix/patches/patch-insts_jg_ELL_Makefile         |  27 ++
 rtcmix/patches/patch-insts_jg_EQ_Makefile          |  27 ++
 rtcmix/patches/patch-insts_jg_FILTERBANK_Makefile  |  27 ++
 rtcmix/patches/patch-insts_jg_FILTSWEEP_Makefile   |  27 ++
 rtcmix/patches/patch-insts_jg_FLANGE_Makefile      |  27 ++
 rtcmix/patches/patch-insts_jg_FOLLOWER_Makefile    |  43 +++
 rtcmix/patches/patch-insts_jg_FREEVERB_Makefile    |  27 ++
 rtcmix/patches/patch-insts_jg_GRANSYNTH_Makefile   |  27 ++
 rtcmix/patches/patch-insts_jg_GRANULATE_Makefile   |  27 ++
 rtcmix/patches/patch-insts_jg_JCHOR_Makefile       |  27 ++
 rtcmix/patches/patch-insts_jg_JDELAY_Makefile      |  27 ++
 rtcmix/patches/patch-insts_jg_JFIR_Makefile        |  27 ++
 rtcmix/patches/patch-insts_jg_JGRAN_Makefile       |  27 ++
 rtcmix/patches/patch-insts_jg_MOOGVCF_Makefile     |  27 ++
 rtcmix/patches/patch-insts_jg_MROOM_Makefile       |  27 ++
 rtcmix/patches/patch-insts_jg_MULTEQ_Makefile      |  27 ++
 rtcmix/patches/patch-insts_jg_MULTIWAVE_Makefile   |  27 ++
 rtcmix/patches/patch-insts_jg_NPAN_Makefile        |  27 ++
 rtcmix/patches/patch-insts_jg_PAN_Makefile         |  27 ++
 rtcmix/patches/patch-insts_jg_QPAN_Makefile        |  27 ++
 rtcmix/patches/patch-insts_jg_RESYNTH_Makefile     |  27 ++
 rtcmix/patches/patch-insts_jg_REVERBIT_Makefile    |  27 ++
 rtcmix/patches/patch-insts_jg_REV_Makefile         |  27 ++
 rtcmix/patches/patch-insts_jg_ROOM_Makefile        |  27 ++
 rtcmix/patches/patch-insts_jg_SHAPE_Makefile       |  27 ++
 rtcmix/patches/patch-insts_jg_SPECTACLE2_Makefile  |  35 +++
 rtcmix/patches/patch-insts_jg_SPECTACLE_Makefile   |  43 +++
 rtcmix/patches/patch-insts_jg_SPLITTER_Makefile    |  27 ++
 rtcmix/patches/patch-insts_jg_SROOM_Makefile       |  27 ++
 rtcmix/patches/patch-insts_jg_VOCODE2_Makefile     |  27 ++
 rtcmix/patches/patch-insts_jg_VOCODE3_Makefile     |  27 ++
 rtcmix/patches/patch-insts_jg_VOCODESYNTH_Makefile |  27 ++
 rtcmix/patches/patch-insts_jg_WAVY_Makefile        |  27 ++
 rtcmix/patches/patch-insts_jg_WIGGLE_Makefile      |  27 ++
 rtcmix/patches/patch-insts_jg_denoise_Makefile     |  27 ++
 rtcmix/patches/patch-insts_joel_jfuncs_Makefile    |  27 ++
 rtcmix/patches/patch-insts_joel_tuning_Makefile    |  27 ++
 rtcmix/patches/patch-insts_maxmsp_MAXBANG_Makefile |  27 ++
 .../patches/patch-insts_maxmsp_MAXMESSAGE_Makefile |  27 ++
 rtcmix/patches/patch-insts_std_AMINST_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_AM_Makefile         |  27 ++
 rtcmix/patches/patch-insts_std_CLAR_Makefile       |  27 ++
 rtcmix/patches/patch-insts_std_COMBIT_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_DEL1_Makefile       |  27 ++
 rtcmix/patches/patch-insts_std_DELAY_Makefile      |  27 ++
 rtcmix/patches/patch-insts_std_DUMP_Makefile       |  27 ++
 rtcmix/patches/patch-insts_std_FIR_Makefile        |  27 ++
 rtcmix/patches/patch-insts_std_FMINST_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_HOLO_Makefile       |  27 ++
 rtcmix/patches/patch-insts_std_IIR_Makefile        |  27 ++
 rtcmix/patches/patch-insts_std_LOOP_Makefile       |  27 ++
 rtcmix/patches/patch-insts_std_LPCPLAY_Makefile    |  27 ++
 rtcmix/patches/patch-insts_std_MARAGRAN_Makefile   |  31 +++
 rtcmix/patches/patch-insts_std_METAFLUTE_Makefile  |  27 ++
 rtcmix/patches/patch-insts_std_MMOVE_Makefile      |  43 +++
 rtcmix/patches/patch-insts_std_MOCKBEND_Makefile   |  27 ++
 rtcmix/patches/patch-insts_std_MOVE_Makefile       |  35 +++
 rtcmix/patches/patch-insts_std_MULTICOMB_Makefile  |  27 ++
 rtcmix/patches/patch-insts_std_NOISE_Makefile      |  27 ++
 rtcmix/patches/patch-insts_std_PANECHO_Makefile    |  27 ++
 rtcmix/patches/patch-insts_std_PHASER_Makefile     |  27 ++
 .../patches/patch-insts_std_PVOC.maxmsp_Makefile   |  27 ++
 rtcmix/patches/patch-insts_std_PVOC_Makefile       |  46 ++++
 rtcmix/patches/patch-insts_std_REVMIX_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_SCRUB_Makefile      |  27 ++
 rtcmix/patches/patch-insts_std_SCULPT_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_STEREO_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_STRUM2_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_STRUMFB_Makefile    |  27 ++
 rtcmix/patches/patch-insts_std_STRUM_Makefile      |  27 ++
 rtcmix/patches/patch-insts_std_TRANSBEND_Makefile  |  27 ++
 rtcmix/patches/patch-insts_std_TRANS_Makefile      |  27 ++
 rtcmix/patches/patch-insts_std_WAVESHAPE_Makefile  |  27 ++
 rtcmix/patches/patch-insts_std_convolve_Makefile   |  27 ++
 rtcmix/patches/patch-insts_std_gravy_Makefile      |  27 ++
 rtcmix/patches/patch-insts_std_mrotate_Makefile    |  27 ++
 rtcmix/patches/patch-insts_std_numtest_Makefile    |  27 ++
 rtcmix/patches/patch-insts_std_rotate_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_sgran_Makefile      |  27 ++
 rtcmix/patches/patch-insts_std_stgran_Makefile     |  27 ++
 rtcmix/patches/patch-insts_std_wow_Makefile        |  27 ++
 rtcmix/patches/patch-insts_stk_MBANDEDWG_Makefile  |  27 ++
 rtcmix/patches/patch-insts_stk_MBLOWBOTL_Makefile  |  27 ++
 rtcmix/patches/patch-insts_stk_MBLOWHOLE_Makefile  |  27 ++
 rtcmix/patches/patch-insts_stk_MBOWED_Makefile     |  27 ++
 rtcmix/patches/patch-insts_stk_MBRASS_Makefile     |  27 ++
 rtcmix/patches/patch-insts_stk_MCLAR_Makefile      |  27 ++
 rtcmix/patches/patch-insts_stk_MMESH2D_Makefile    |  27 ++
 rtcmix/patches/patch-insts_stk_MMODALBAR_Makefile  |  27 ++
 rtcmix/patches/patch-insts_stk_MSAXOFONY_Makefile  |  27 ++
 rtcmix/patches/patch-insts_stk_MSHAKERS_Makefile   |  27 ++
 rtcmix/patches/patch-insts_stk_MSITAR_Makefile     |  27 ++
 rtcmix/patches/patch-insts_vccm_COMBFILT_Makefile  |  27 ++
 rtcmix/patches/patch-insts_vccm_HAR_Makefile       |  27 ++
 rtcmix/patches/patch-insts_vccm_MIXN_Makefile      |  27 ++
 rtcmix/patches/patch-insts_vccm_RAP_Makefile       |  27 ++
 rtcmix/patches/patch-insts_vccm_vMIX_Makefile      |  27 ++
 rtcmix/patches/patch-makefile.conf.in              | 100 +++++++
 rtcmix/patches/patch-site.conf                     |  48 ++++
 rtcmix/patches/patch-src_audio_AudioFileDevice.cpp |  13 +
 rtcmix/patches/patch-src_audio_Makefile            |  19 ++
 .../patch-src_audio_MultiPortOSSAudioDevice.cpp    |  32 +++
 .../patch-src_audio_MultiPortOSSAudioDevice.h      |  21 ++
 rtcmix/patches/patch-src_audio_OSSAudioDevice.cpp  | 112 ++++++++
 rtcmix/patches/patch-src_audio_OSSAudioDevice.h    |  29 +++
 .../patch-src_audio_SinglePortOSSAudioDevice.cpp   |  33 +++
 .../patch-src_audio_SinglePortOSSAudioDevice.h     |  21 ++
 .../patch-src_audio_audio__dev__creator.cpp        |  22 ++
 rtcmix/patches/patch-src_audio_sndlibsupport.h     |  13 +
 rtcmix/patches/patch-src_control_datafile_Makefile |  17 ++
 rtcmix/patches/patch-src_control_display_Makefile  |  33 +++
 rtcmix/patches/patch-src_control_maxmsp_Makefile   |  17 ++
 rtcmix/patches/patch-src_control_midi_Makefile     |  17 ++
 rtcmix/patches/patch-src_control_mouse_Makefile    |  33 +++
 rtcmix/patches/patch-src_control_osc_Makefile      |  17 ++
 rtcmix/patches/patch-src_control_pfbus_Makefile    |  23 ++
 rtcmix/patches/patch-src_parser_Makefile           |  13 +
 rtcmix/patches/patch-src_parser_perl_Makefile      |  22 ++
 rtcmix/patches/patch-src_rtcmix_Makefile           | 127 +++++++++
 rtcmix/patches/patch-src_rtcmix_load__utils.c      |  13 +
 rtcmix/patches/patch-utils_Makefile                |  54 ++++
 rtcmix/patches/patch-utils_cmixplay.cpp            |  34 +++
 rtcmix/patches/patch-utils_head_Makefile           |  21 ++
 rtcmix/patches/patch-utils_resample_Makefile       |  18 ++
 155 files changed, 5025 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 0164c46197..c5a47869a3 100644
--- a/Makefile
+++ b/Makefile
@@ -3953,6 +3953,7 @@ SUBDIR+=	rsound
 SUBDIR+=	rsstail
 SUBDIR+=	rst-mode
 SUBDIR+=	rstudio
+SUBDIR+=	rtcmix
 SUBDIR+=	rte
 SUBDIR+=	rthread
 SUBDIR+=	rtl-sdr-git
diff --git a/rtcmix/DESCR b/rtcmix/DESCR
new file mode 100644
index 0000000000..1178f8e1f6
--- /dev/null
+++ b/rtcmix/DESCR
@@ -0,0 +1,13 @@
+RTcmix is a real-time software "language" for doing digital sound
+synthesis and signal-processing. It is written in C/C++, and is
+distributed open-source, free of charge. In certain respects, it
+is similar in function to other extant unit-generator-based software
+languages such as CSOUND, SuperCollider and (to a lesser extent)
+JSyn and Max/MSP -- they do share a common heritage, after all.
+There are some differences, however, between all these languages...
+and variety is of course the spice of life!
+
+So if you've been searching the web high and low for just the right
+library of DSP functions to include in your latest&greatest "killer"
+(or maybe "peacefully coexisting"?) app, then RTcmix may just be
+the Right Package for You.
diff --git a/rtcmix/Makefile b/rtcmix/Makefile
new file mode 100644
index 0000000000..a0e56d7903
--- /dev/null
+++ b/rtcmix/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD$
+
+GITHUB_PROJECT=	RTcmix
+DISTNAME=	v4.2.0
+PKGNAME=	${GITHUB_PROJECT}-${DISTNAME}
+CATEGORIES=	local
+MASTER_SITES=	${MASTER_SITE_GITHUB:=RTcmix/}
+DIST_SUBDIR=	${GITHUB_PROJECT}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost	
+HOMEPAGE=	http://rtcmix.org
+COMMENT=	An open-source digital signal processing and sound synthesis language
+LICENSE=	apache-2.0
+
+WRKSRC=		${WRKDIR}/RTcmix-4.2.0
+GNU_CONFIGURE=	yes
+# Html documentation and man pages are incomplete.
+# http://rtcmix.org/reference/
+#CONFIGURE_ARGS+= --htmldir=${PREFIX}/share/doc/${PKGBASE}/html
+CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/${PKGBASE}
+USE_LANGUAGES=	c c++
+USE_TOOLS= gmake autoconf perl
+
+pre-configure:
+	cd ${WRKSRC} && autoconf
+	
+.include "../../mk/x11.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/rtcmix/PLIST b/rtcmix/PLIST
new file mode 100644
index 0000000000..4adfbe1fc1
--- /dev/null
+++ b/rtcmix/PLIST
@@ -0,0 +1,289 @@
+@comment $NetBSD$
+bin/CMIX
+bin/cmixplay
+bin/cpspch
+bin/hist
+bin/pchcps
+bin/resample
+bin/rescale
+bin/setup_rtcmixrc
+bin/sfcreate
+bin/sffixsize
+bin/sfhedit
+bin/sfprint
+bin/sfshrink
+bin/sndpeak
+bin/sndreverse
+lib/RTcmix/RTcmixMain.o
+lib/RTcmix/RTsockfuncs.o
+lib/RTcmix/libAM.so
+lib/RTcmix/libAMINST.so
+lib/RTcmix/libBUTTER.so
+lib/RTcmix/libCHAIN.so
+lib/RTcmix/libCLAR.so
+lib/RTcmix/libCOMBFILT.so
+lib/RTcmix/libCOMBIT.so
+lib/RTcmix/libCOMPLIMIT.so
+lib/RTcmix/libCONVOLVE1.so
+lib/RTcmix/libDCBLOCK.so
+lib/RTcmix/libDECIMATE.so
+lib/RTcmix/libDEL1.so
+lib/RTcmix/libDELAY.so
+lib/RTcmix/libDISTORT.so
+lib/RTcmix/libDMOVE.so
+lib/RTcmix/libDUMP.so
+lib/RTcmix/libELL.so
+lib/RTcmix/libEQ.so
+lib/RTcmix/libFILTERBANK.so
+lib/RTcmix/libFILTSWEEP.so
+lib/RTcmix/libFIR.so
+lib/RTcmix/libFLANGE.so
+lib/RTcmix/libFMINST.so
+lib/RTcmix/libFOLLOWBUTTER.so
+lib/RTcmix/libFOLLOWER.so
+lib/RTcmix/libFOLLOWGATE.so
+lib/RTcmix/libFREEVERB.so
+lib/RTcmix/libGRANSYNTH.so
+lib/RTcmix/libGRANULATE.so
+lib/RTcmix/libGVERB.so
+lib/RTcmix/libHALFWAVE.so
+lib/RTcmix/libHAR.so
+lib/RTcmix/libHOLO.so
+lib/RTcmix/libIIR.so
+lib/RTcmix/libJCHOR.so
+lib/RTcmix/libJDELAY.so
+lib/RTcmix/libJFIR.so
+lib/RTcmix/libJGRAN.so
+lib/RTcmix/libLOOP.so
+lib/RTcmix/libLPCPLAY.so
+lib/RTcmix/libMAXBANG.so
+lib/RTcmix/libMAXMESSAGE.so
+lib/RTcmix/libMBANDEDWG.so
+lib/RTcmix/libMBLOWBOTL.so
+lib/RTcmix/libMBLOWHOLE.so
+lib/RTcmix/libMBOWED.so
+lib/RTcmix/libMBRASS.so
+lib/RTcmix/libMCLAR.so
+lib/RTcmix/libMETAFLUTE.so
+lib/RTcmix/libMIXN.so
+lib/RTcmix/libMMESH2D.so
+lib/RTcmix/libMMODALBAR.so
+lib/RTcmix/libMMOVE.so
+lib/RTcmix/libMOCKBEND.so
+lib/RTcmix/libMOOGVCF.so
+lib/RTcmix/libMOVE.so
+lib/RTcmix/libMPLACE.so
+lib/RTcmix/libMROOM.so
+lib/RTcmix/libMSAXOFONY.so
+lib/RTcmix/libMSHAKERS.so
+lib/RTcmix/libMSITAR.so
+lib/RTcmix/libMULTEQ.so
+lib/RTcmix/libMULTICOMB.so
+lib/RTcmix/libMULTIWAVE.so
+lib/RTcmix/libNOISE.so
+lib/RTcmix/libNPAN.so
+lib/RTcmix/libPAN.so
+lib/RTcmix/libPANECHO.so
+lib/RTcmix/libPFSCHED.so
+lib/RTcmix/libPLACE.so
+lib/RTcmix/libPVOC.so
+lib/RTcmix/libPVRandBands.so
+lib/RTcmix/libPVRandBend.so
+lib/RTcmix/libPVTransBend.so
+lib/RTcmix/libQPAN.so
+lib/RTcmix/libRAP.so
+lib/RTcmix/libREV.so
+lib/RTcmix/libREVERBIT.so
+lib/RTcmix/libREVMIX.so
+lib/RTcmix/libROOM.so
+lib/RTcmix/libSCRUB.so
+lib/RTcmix/libSCULPT.so
+lib/RTcmix/libSGRANR.so
+lib/RTcmix/libSHAPE.so
+lib/RTcmix/libSPECTACLE.so
+lib/RTcmix/libSPECTACLE2.so
+lib/RTcmix/libSPECTEQ.so
+lib/RTcmix/libSPECTEQ2.so
+lib/RTcmix/libSPLITTER.so
+lib/RTcmix/libSROOM.so
+lib/RTcmix/libSTEREO.so
+lib/RTcmix/libSTGRANR.so
+lib/RTcmix/libSTRUM.so
+lib/RTcmix/libSTRUM2.so
+lib/RTcmix/libSTRUMFB.so
+lib/RTcmix/libSYNC.so
+lib/RTcmix/libTRANS.so
+lib/RTcmix/libTRANSBEND.so
+lib/RTcmix/libTVSPECTACLE.so
+lib/RTcmix/libVOCODE2.so
+lib/RTcmix/libVOCODE3.so
+lib/RTcmix/libVOCODESYNTH.so
+lib/RTcmix/libVWAVE.so
+lib/RTcmix/libWAVESHAPE.so
+lib/RTcmix/libWAVETABLE.so
+lib/RTcmix/libWAVY.so
+lib/RTcmix/libWIGGLE.so
+lib/RTcmix/libconvolve.so
+lib/RTcmix/libdatafileconn.so
+lib/RTcmix/libdenoise.so
+lib/RTcmix/libdisplayconn.so
+lib/RTcmix/libgen.so
+lib/RTcmix/libgravy.so
+lib/RTcmix/libjfuncs.so
+lib/RTcmix/libmouseconn.so
+lib/RTcmix/libmrotate.so
+lib/RTcmix/libnumtest.so
+lib/RTcmix/libpfbusconn.so
+lib/RTcmix/librotate.so
+lib/RTcmix/librtcmix.so
+lib/RTcmix/libsgran.so
+lib/RTcmix/libstgran.so
+lib/RTcmix/libtuning.so
+lib/RTcmix/libvMIX.so
+lib/RTcmix/libwow.so
+lib/RTcmix/main.o
+man/man1/AM.1
+man/man1/ELL.1
+man/man1/PAN.1
+man/man1/REVERBIT.1
+man/man1/REVMIX.1
+man/man1/SHAPE.1
+man/man1/STEREO.1
+man/man1/TRANS.1
+man/man1/TRANS3.1
+man/man1/WAVETABLE.1
+man/man1/addgens.1
+man/man1/bus_config.1
+man/man1/copygen.1
+man/man1/fdump.1
+man/man1/fplot.1
+man/man1/gen1.1
+man/man1/gen10.1
+man/man1/gen17.1
+man/man1/gen18.1
+man/man1/gen2.1
+man/man1/gen20.1
+man/man1/gen24.1
+man/man1/gen25.1
+man/man1/gen3.1
+man/man1/gen4.1
+man/man1/gen5.1
+man/man1/gen6.1
+man/man1/gen7.1
+man/man1/gen9.1
+man/man1/get_spray.1
+man/man1/infile.1
+man/man1/invertgen.1
+man/man1/irand.1
+man/man1/makegen.1
+man/man1/multgens.1
+man/man1/offsetgen.1
+man/man1/pchcps.1
+man/man1/pickrand.1
+man/man1/pickwrand.1
+man/man1/quantizegen.1
+man/man1/rand.1
+man/man1/random.1
+man/man1/rescale.1
+man/man1/reversegen.1
+man/man1/rtinput.1
+man/man1/rtoutput.1
+man/man1/rtsetparams.1
+man/man1/sampfunc.1
+man/man1/sampfunci.1
+man/man1/scalegen.1
+man/man1/set_option.1
+man/man1/setexp.1
+man/man1/setline.1
+man/man1/setline_size.1
+man/man1/sfcreate.1
+man/man1/sffixsize.1
+man/man1/sfhedit.1
+man/man1/sfprint.1
+man/man1/shiftgen.1
+man/man1/spray_init.1
+man/man1/srand.1
+man/man1/system.1
+share/doc/RTcmix/html/AM.html
+share/doc/RTcmix/html/ELL.html
+share/doc/RTcmix/html/PAN.html
+share/doc/RTcmix/html/REVERBIT.html
+share/doc/RTcmix/html/REVMIX.html
+share/doc/RTcmix/html/SHAPE.html
+share/doc/RTcmix/html/STEREO.html
+share/doc/RTcmix/html/TRANS.html
+share/doc/RTcmix/html/TRANS3.html
+share/doc/RTcmix/html/WAVETABLE.html
+share/doc/RTcmix/html/addgens.html
+share/doc/RTcmix/html/bus_config.html
+share/doc/RTcmix/html/copygen.html
+share/doc/RTcmix/html/fdump.html
+share/doc/RTcmix/html/fplot.html
+share/doc/RTcmix/html/gen1.html
+share/doc/RTcmix/html/gen10.html
+share/doc/RTcmix/html/gen17.html
+share/doc/RTcmix/html/gen18.html
+share/doc/RTcmix/html/gen2.html
+share/doc/RTcmix/html/gen20.html
+share/doc/RTcmix/html/gen24.html
+share/doc/RTcmix/html/gen25.html
+share/doc/RTcmix/html/gen3.html
+share/doc/RTcmix/html/gen4.html
+share/doc/RTcmix/html/gen5.html
+share/doc/RTcmix/html/gen6.html
+share/doc/RTcmix/html/gen7.html
+share/doc/RTcmix/html/gen9.html
+share/doc/RTcmix/html/get_spray.html
+share/doc/RTcmix/html/images/addgens.png
+share/doc/RTcmix/html/images/fplot.png
+share/doc/RTcmix/html/images/gen17.png
+share/doc/RTcmix/html/images/gen20.png
+share/doc/RTcmix/html/images/gen4a.png
+share/doc/RTcmix/html/images/gen4b.png
+share/doc/RTcmix/html/images/gen4c.png
+share/doc/RTcmix/html/images/gen4d.png
+share/doc/RTcmix/html/images/gen5a.png
+share/doc/RTcmix/html/images/gen5b.png
+share/doc/RTcmix/html/images/gen6.png
+share/doc/RTcmix/html/images/gen7.png
+share/doc/RTcmix/html/images/gen9a.png
+share/doc/RTcmix/html/images/gen9b.png
+share/doc/RTcmix/html/images/gen9c.png
+share/doc/RTcmix/html/images/gen9d.png
+share/doc/RTcmix/html/images/gen9e.png
+share/doc/RTcmix/html/images/multgens.png
+share/doc/RTcmix/html/index.html
+share/doc/RTcmix/html/infile.html
+share/doc/RTcmix/html/invertgen.html
+share/doc/RTcmix/html/irand.html
+share/doc/RTcmix/html/makegen.html
+share/doc/RTcmix/html/multgens.html
+share/doc/RTcmix/html/offsetgen.html
+share/doc/RTcmix/html/pchcps.html
+share/doc/RTcmix/html/pickrand.html
+share/doc/RTcmix/html/pickwrand.html
+share/doc/RTcmix/html/quantizegen.html
+share/doc/RTcmix/html/rand.html
+share/doc/RTcmix/html/random.html
+share/doc/RTcmix/html/rescale.html
+share/doc/RTcmix/html/reversegen.html
+share/doc/RTcmix/html/rtinput.html
+share/doc/RTcmix/html/rtoutput.html
+share/doc/RTcmix/html/rtsetparams.html
+share/doc/RTcmix/html/sampfunc.html
+share/doc/RTcmix/html/sampfunci.html
+share/doc/RTcmix/html/scalegen.html
+share/doc/RTcmix/html/set_option.html
+share/doc/RTcmix/html/setexp.html
+share/doc/RTcmix/html/setline.html
+share/doc/RTcmix/html/setline_size.html
+share/doc/RTcmix/html/sfcreate.html
+share/doc/RTcmix/html/sffixsize.html
+share/doc/RTcmix/html/sfhedit.html
+share/doc/RTcmix/html/sfprint.html
+share/doc/RTcmix/html/shiftgen.html
+share/doc/RTcmix/html/spray_init.html
+share/doc/RTcmix/html/srand.html
+share/doc/RTcmix/html/style.css
+share/doc/RTcmix/html/system.html
+@pkgdir man/man3
diff --git a/rtcmix/TODO b/rtcmix/TODO
new file mode 100644
index 0000000000..db84793303
--- /dev/null
+++ b/rtcmix/TODO
@@ -0,0 +1,5 @@
+Add option for MULTI_THREAD_SUPPORT = TRUE.
+Talk with the developers to clean the source and make it more portable.
+Only tested in NetBSD evbarm.
+
+trebol, 2017.
diff --git a/rtcmix/distinfo b/rtcmix/distinfo
new file mode 100644
index 0000000000..59f1f55cf7
--- /dev/null
+++ b/rtcmix/distinfo
@@ -0,0 +1,155 @@
+$NetBSD$
+
+SHA1 (RTcmix/v4.2.0.tar.gz) = 0b4d105becdf9bc0c22d69c99315081c129127d0
+RMD160 (RTcmix/v4.2.0.tar.gz) = cb9f275fde8b8f51daeed80708d92307484f15a7
+SHA512 (RTcmix/v4.2.0.tar.gz) = fe8512520ead40b5c43a66741fa126fed195e84528a0a32c90d57af9a47e28e76fd205389da48067a02cb4289b7e6d96c27e2e86986bd0a25ac1840f50886541
+Size (RTcmix/v4.2.0.tar.gz) = 3242897 bytes
+SHA1 (patch-Makefile) = 68377a598b966ed965e8b023d14f010e0f45ede7
+SHA1 (patch-configure.ac) = ec0e3ef4bb0ae22da40d2ebee3c371dd8f491db1
+SHA1 (patch-defs.conf.in) = 4c86277d16d9e1b2978d478ba7532f99fd229c79
+SHA1 (patch-docs_Makefile) = 1179c12969d87db597012231a8aaab4e2db80f1a
+SHA1 (patch-docs_README.documentation) = 0fa7cd0340115b031b5bb42788bcb828741b3568
+SHA1 (patch-docs_pod_Makefile) = 839377ac7a06d366022f4d2ff887bea3b1624531
+SHA1 (patch-docs_pod_copygen.pod) = b74f2e75ec0e03a1950cb499a613c895a42414bc
+SHA1 (patch-docs_pod_gen20.pod) = aa3adbf3e6ef4e247b7ad25c9ae38e0da0fee563
+SHA1 (patch-docs_pod_gen25.pod) = 63844c8ad93cc77468d5e77ce426b9be02506a19
+SHA1 (patch-docs_pod_gen4.pod) = 3470c5509f371da47b3d6ac792adf244d9db720f
+SHA1 (patch-docs_pod_rtoutput.pod) = 93f517abf48616692153c996c1f66b526d3ed295
+SHA1 (patch-genlib_Makefile) = 07c549e8054f9d584dd248a18e73490a25a0686b
+SHA1 (patch-insts_base_CHAIN_Makefile) = 04d964c66a5df6f3fe37311e964987ed27f81e3f
+SHA1 (patch-insts_base_WAVETABLE_Makefile) = 9492aa2d9578a8cd2f08844422b73dfec063c967
+SHA1 (patch-insts_bgg_GVERB_Makefile) = 8c277ab3d20fd97f5073933398d20b59d7543127
+SHA1 (patch-insts_bgg_HALFWAVE_Makefile) = 9bf9331f5fda219ac5b7b8fa37b552e5d723dbfb
+SHA1 (patch-insts_bgg_PFSCHED_Makefile) = 81a022d662c8ab6897a12690855c30ccd79503b3
+SHA1 (patch-insts_bgg_SYNC_Makefile) = 389da65e60b01ba36316ff232753f670e75fc0e7
+SHA1 (patch-insts_bgg_VWAVE_Makefile) = 4f66f723c05633dd4eca90923992099cfdcb0383
+SHA1 (patch-insts_jg_BUTTER_Makefile) = 39f6d0b86c360158db857c30894e983c8a01d4b2
+SHA1 (patch-insts_jg_COMPLIMIT_Makefile) = 7a857d3b2a029f6cd90ec16b7968fb37b3ec05e0
+SHA1 (patch-insts_jg_CONVOLVE1_Makefile) = e12101b0963fd440b7aa5f6cfc562a6fb270371f
+SHA1 (patch-insts_jg_DCBLOCK_Makefile) = c9456400c4368425ba059e8f6bd7fe7ad98722d6
+SHA1 (patch-insts_jg_DECIMATE_Makefile) = c63a6dd5f759e8567d0d673fcd6c86a0b51c4017
+SHA1 (patch-insts_jg_DISTORT_Makefile) = ea0884d68f2f16600c1a5f239a2eb140a75547ec
+SHA1 (patch-insts_jg_ELL_Makefile) = 936585f2111436bc04fef6a3687c127e994df263
+SHA1 (patch-insts_jg_EQ_Makefile) = 17bc0584fc3d26bf1aff6ab57194c2730cc4ff2e
+SHA1 (patch-insts_jg_FILTERBANK_Makefile) = d333ea6e1af5a95d0cbd190a2cca6e72dd7b85ed
+SHA1 (patch-insts_jg_FILTSWEEP_Makefile) = 6eabc6c6ddcdba7e7772a54f032a70f4e7edd312
+SHA1 (patch-insts_jg_FLANGE_Makefile) = 6f361a0993e33f4acdbfab229f7396c49433a3b7
+SHA1 (patch-insts_jg_FOLLOWER_Makefile) = 9e460718893736ee88f6fafb0246b0f8184d852e
+SHA1 (patch-insts_jg_FREEVERB_Makefile) = 9b1941b06259bc96ff1f9e0534077171f39c9e9a
+SHA1 (patch-insts_jg_GRANSYNTH_Makefile) = 77c95e935c6a484e3c6910108346f238658c6d62
+SHA1 (patch-insts_jg_GRANULATE_Makefile) = df0a9bb04e642702af3658c6623c5ef7db6f55af
+SHA1 (patch-insts_jg_JCHOR_Makefile) = 6992b7a6b4f2796158ae318780b9237c6cf676aa
+SHA1 (patch-insts_jg_JDELAY_Makefile) = 1344f0669a2aa4cdce1eeacbc2b524dc10ada02e
+SHA1 (patch-insts_jg_JFIR_Makefile) = 341738cdd7f0f58147963be4021624ae8bfcbde5
+SHA1 (patch-insts_jg_JGRAN_Makefile) = 49f2b70de64ca89cebb30ce9bac5f3502c6c456b
+SHA1 (patch-insts_jg_MOOGVCF_Makefile) = 704240680d3eb8d8233f9b6352bb3e636510eb7f
+SHA1 (patch-insts_jg_MROOM_Makefile) = a6f4643c9245b5aa964d10ad21e6e54f9d115dab
+SHA1 (patch-insts_jg_MULTEQ_Makefile) = d023a478e7eaa91c90c1c6ceaab109420ed55f70
+SHA1 (patch-insts_jg_MULTIWAVE_Makefile) = d37e81a834d5e2945f4626185a4ff83a89aee276
+SHA1 (patch-insts_jg_NPAN_Makefile) = 63e5fbc43f423ec08110ddcfa1e7d649a8fa7678
+SHA1 (patch-insts_jg_PAN_Makefile) = 166c8f70687518d2ccd34db5c4191eb94154e8f9
+SHA1 (patch-insts_jg_QPAN_Makefile) = d9ab5befbf3b91e31930d40d53d463cfe9d442f2
+SHA1 (patch-insts_jg_RESYNTH_Makefile) = 87c8e9afe165749eadce508830dc2236777e023d
+SHA1 (patch-insts_jg_REVERBIT_Makefile) = 7dc01d6574983b89bb89a3d5163bb62da4bba893
+SHA1 (patch-insts_jg_REV_Makefile) = f4d23d27438f9701f075db84b371c63075c0b042
+SHA1 (patch-insts_jg_ROOM_Makefile) = 02dccc558d228ab114ca0ee0a43d1b03feb21af3
+SHA1 (patch-insts_jg_SHAPE_Makefile) = f93712410a0db0b83a196f42c45a6948effd550d
+SHA1 (patch-insts_jg_SPECTACLE2_Makefile) = 8b323d1a780ac015e62e73df80cf8d3879b9b3b8
+SHA1 (patch-insts_jg_SPECTACLE_Makefile) = 29d4ead4251d552c2f5c2e3e11495b03e3347f70
+SHA1 (patch-insts_jg_SPLITTER_Makefile) = 02431b2bdc8ecee8240a59266ae7e3ca3221d70d
+SHA1 (patch-insts_jg_SROOM_Makefile) = 7370d57fa431b29095bcf760e170dcbe66b2855d
+SHA1 (patch-insts_jg_VOCODE2_Makefile) = 4a0d234f1b435cd24c78a935f73ce11d2cabe153
+SHA1 (patch-insts_jg_VOCODE3_Makefile) = a1ca5dc4d9277df47b6070c9dcc0b8f967dd282d
+SHA1 (patch-insts_jg_VOCODESYNTH_Makefile) = ec3252d5a4ef7808c9ea9c57f0c51f04b3cb1d9e
+SHA1 (patch-insts_jg_WAVY_Makefile) = 92a8c4662568b2f56cd800542d6ed40138c8580f
+SHA1 (patch-insts_jg_WIGGLE_Makefile) = f7384771e7d0a37361cb3f802446a3abc810d281
+SHA1 (patch-insts_jg_denoise_Makefile) = 4104b618116dfd638d687970089392ab853d2524
+SHA1 (patch-insts_joel_jfuncs_Makefile) = 38ac3f14a95acc420be29748e2f4c745b67daf92
+SHA1 (patch-insts_joel_tuning_Makefile) = 54342901df85afacba5855247dfeafa53982fbc8
+SHA1 (patch-insts_maxmsp_MAXBANG_Makefile) = 9c6f4cb22c543ee76373b49923fc6d3f43260272
+SHA1 (patch-insts_maxmsp_MAXMESSAGE_Makefile) = 62c7ad15bda232e39ec76b0b09daee87b819e654
+SHA1 (patch-insts_std_AMINST_Makefile) = 6f098cead183273c496e37b8b429e399031bf00c
+SHA1 (patch-insts_std_AM_Makefile) = 14aa8d3ea8031a3dfdbe7012f694eb0711fe6851
+SHA1 (patch-insts_std_CLAR_Makefile) = 5fe58bd69ae978ccb698bf3627171cee94f80314
+SHA1 (patch-insts_std_COMBIT_Makefile) = db6852569e3d06c4a341e886eaf7be1e0370fc1a
+SHA1 (patch-insts_std_DEL1_Makefile) = 416abbf5eaffacee498907995475e4f4fc3a42dc
+SHA1 (patch-insts_std_DELAY_Makefile) = cf113f312025ba13ac1b1ccfbb2dccf0b3e7e090
+SHA1 (patch-insts_std_DUMP_Makefile) = c4582f6a3570e25bab148065a629e0e6c028df24
+SHA1 (patch-insts_std_FIR_Makefile) = 78fa2b6befd3c6f9466e68fdaed9522f15f6e92b
+SHA1 (patch-insts_std_FMINST_Makefile) = c917f0515bf59cfe6ee17e87e6f033cd66a3ad2e
+SHA1 (patch-insts_std_HOLO_Makefile) = 32a20760475fffc1ad832a9e96d73c9ca9c6cd56
+SHA1 (patch-insts_std_IIR_Makefile) = c49131b98159d529488a8038ce6466346639a44c
+SHA1 (patch-insts_std_LOOP_Makefile) = 732e03e1bbf07f4af101d21a23d3de92241a9a3a
+SHA1 (patch-insts_std_LPCPLAY_Makefile) = a3b94fc5688921029f127b7c08761dbcf516be02
+SHA1 (patch-insts_std_MARAGRAN_Makefile) = 7379e1094dabd8098f1f7993c82d0bea540e6d82
+SHA1 (patch-insts_std_METAFLUTE_Makefile) = 0f25dca5654079d608504c293edead056fa6f2e9
+SHA1 (patch-insts_std_MMOVE_Makefile) = 4f3746e42c14c72e49edf65b87f6b150dc4841bc
+SHA1 (patch-insts_std_MOCKBEND_Makefile) = 9ac25ed1df46180614206ba46033e31e2bcfacf5
+SHA1 (patch-insts_std_MOVE_Makefile) = 6332f71e318971d556f2e04942b5bc06d6b12a40
+SHA1 (patch-insts_std_MULTICOMB_Makefile) = 2e70f26fc489c36601b369d2dedcd1229d045bb9
+SHA1 (patch-insts_std_NOISE_Makefile) = 0631393127fffef3bf2971d5b9cbf759a7d611ca
+SHA1 (patch-insts_std_PANECHO_Makefile) = bd9eb00026921159946f329b096bc1f50038aefc
+SHA1 (patch-insts_std_PHASER_Makefile) = 9c896ad6b426ce011e39fb6bc868fc6c5a1283d9
+SHA1 (patch-insts_std_PVOC.maxmsp_Makefile) = 1700546e87652c5a0a54775a47dd0d9bbad7a6c8
+SHA1 (patch-insts_std_PVOC_Makefile) = b2bd91096a5508b736cbbd6c17f62eb05c3a7e59
+SHA1 (patch-insts_std_REVMIX_Makefile) = 759c759d556a937c43368ccbe3e6e6ba62f5289c
+SHA1 (patch-insts_std_SCRUB_Makefile) = 58c43fecd9e4c4bd676109990a9f59480c289285
+SHA1 (patch-insts_std_SCULPT_Makefile) = 6c33c82c943ecef14215fea39a30434a3c093b1a
+SHA1 (patch-insts_std_STEREO_Makefile) = f40e9294d566e0307a6e7c1e75241e9d7619edcf
+SHA1 (patch-insts_std_STRUM2_Makefile) = 97e7d756cade6d47cd15d96f56c9f97fe6db6839
+SHA1 (patch-insts_std_STRUMFB_Makefile) = 681175870b9fb057d2ea97ad13afa2297052bc57
+SHA1 (patch-insts_std_STRUM_Makefile) = a535a6304c23dffb0903f39aa2be04d8eebfade3
+SHA1 (patch-insts_std_TRANSBEND_Makefile) = c08f0a297915d44430b89c5161ec34e04b28fd17
+SHA1 (patch-insts_std_TRANS_Makefile) = a42a8058708b1f65e4e9a9910b0ed40a45c54766
+SHA1 (patch-insts_std_WAVESHAPE_Makefile) = 2ff89cd59a0a4e0ea5da94c57099b7c21657e4e1
+SHA1 (patch-insts_std_convolve_Makefile) = 605d43b712534b6bf159bae5b392fd8281c32bdc
+SHA1 (patch-insts_std_gravy_Makefile) = d181f60d3695a180e40051f1d135dbf56609f776
+SHA1 (patch-insts_std_mrotate_Makefile) = fef27935e2ee00a96f70ed70a3de0df8d78e86c0
+SHA1 (patch-insts_std_numtest_Makefile) = 17c4cf45aefe38dc0040c4cd7b71af443d2afc4b
+SHA1 (patch-insts_std_rotate_Makefile) = 4088828d9807210365b301880c31d0a2c13c582d
+SHA1 (patch-insts_std_sgran_Makefile) = 0db7a01e9d84047466a953ff9d1281a46ea6c80d
+SHA1 (patch-insts_std_stgran_Makefile) = 21cbc852c1d9636ee0eb97d74d78f2792753d492
+SHA1 (patch-insts_std_wow_Makefile) = 2fca0ad48bf3d50a504996e0ee3984d04241cdb6
+SHA1 (patch-insts_stk_MBANDEDWG_Makefile) = 807ca5d853b7407955e6f6c190aee78468dcf162
+SHA1 (patch-insts_stk_MBLOWBOTL_Makefile) = 9fea7c22227a07905a097c9d18cb255e7c39f817
+SHA1 (patch-insts_stk_MBLOWHOLE_Makefile) = 5c63f5615dc1b438ff618436e52828868c4bf9c6
+SHA1 (patch-insts_stk_MBOWED_Makefile) = 9d9cef634cdd75508e6cb3e9193689fd884a5bdf
+SHA1 (patch-insts_stk_MBRASS_Makefile) = 021644a7678f3fc43738c3984128f77abc629fc7
+SHA1 (patch-insts_stk_MCLAR_Makefile) = efbbdf2042d994a7f7c60033f908761489082acd
+SHA1 (patch-insts_stk_MMESH2D_Makefile) = 0988997ccaf93e5ae149f3080c6f33f6f7dc51a8
+SHA1 (patch-insts_stk_MMODALBAR_Makefile) = 7b263a3836bf6275d4aad770d9a22f00d6a1d322
+SHA1 (patch-insts_stk_MSAXOFONY_Makefile) = 5e1afa23a9006344aa78b35d947abf57dd75f8c8
+SHA1 (patch-insts_stk_MSHAKERS_Makefile) = 53510be5039c0e91158072ff8e8b8b8043f8348f
+SHA1 (patch-insts_stk_MSITAR_Makefile) = 879c50f0413a39f6a35fb3a21459c3d908e6fa05
+SHA1 (patch-insts_vccm_COMBFILT_Makefile) = e380dd34919edc8bc25964107292029a0e9c9adf
+SHA1 (patch-insts_vccm_HAR_Makefile) = 7e4014ae70d7237243b7d5307ecff2065b5309ee
+SHA1 (patch-insts_vccm_MIXN_Makefile) = ca790dc5c35df9975ab553bb2b046a282206556c
+SHA1 (patch-insts_vccm_RAP_Makefile) = 78832cffa134a84f18a0f69d4b0b88bbe98a0768
+SHA1 (patch-insts_vccm_vMIX_Makefile) = 21b813912ddb270aef214168544611ea2b88c5d9
+SHA1 (patch-makefile.conf.in) = 035d166d536c03c810cf92dbe51ebe283552e314
+SHA1 (patch-site.conf) = 90a0cda02ca0517687a7ee1bfa5c52ffabdf4f0e
+SHA1 (patch-src_audio_AudioFileDevice.cpp) = 38d86ac0a45199a89a4b35f973b5fab900c3d702
+SHA1 (patch-src_audio_Makefile) = 2da77c0089361711025fad45f1afa21b082e8395
+SHA1 (patch-src_audio_MultiPortOSSAudioDevice.cpp) = 1d4c18c8a265f06275863658f7c81cdc8379d74f
+SHA1 (patch-src_audio_MultiPortOSSAudioDevice.h) = 7b40dc14141b728048231b64ac0a58efbad3fd5f
+SHA1 (patch-src_audio_OSSAudioDevice.cpp) = 0999fa763b081b12672163399ca36de8e1e9afc1
+SHA1 (patch-src_audio_OSSAudioDevice.h) = bb7c2574bb1c9908a3d152603074b6574ea95381
+SHA1 (patch-src_audio_SinglePortOSSAudioDevice.cpp) = 30524deb98a148c9dc87bc3d599c158adb082527
+SHA1 (patch-src_audio_SinglePortOSSAudioDevice.h) = 0070fa4e6f587f41cc4c61c0882a8b3f50aa46fd
+SHA1 (patch-src_audio_audio__dev__creator.cpp) = d980b96cb37e00fa323b4351df44895f3e8172ae
+SHA1 (patch-src_audio_sndlibsupport.h) = cc3d00dfc68beef559e5d67332ed8cd9d9bc1612
+SHA1 (patch-src_control_datafile_Makefile) = bf52b20932bf6344d7c924f0dc5c76148edab8b7
+SHA1 (patch-src_control_display_Makefile) = 2d9c9d02cca6343b3bf912e2000ce041923b2151
+SHA1 (patch-src_control_maxmsp_Makefile) = b3db4a45ea0bb093077b9dad67ae7d6f469a2db8
+SHA1 (patch-src_control_midi_Makefile) = 5de065fbfe940ac979973b3567c96842565f6e7b
+SHA1 (patch-src_control_mouse_Makefile) = f0e9cd29a06d8da94e30b25fc03f57725b06aa57
+SHA1 (patch-src_control_osc_Makefile) = 9e58fe42bda5c47f02ed751c43f5ef364e107a86
+SHA1 (patch-src_control_pfbus_Makefile) = 9b223ddb65251c0ed2b516a85554b9743e3b1d3a
+SHA1 (patch-src_parser_Makefile) = 72b8d246a333d8ca195fe9196b9bc61c604b885e
+SHA1 (patch-src_parser_perl_Makefile) = 89832d355f927556546b521597cb5fbb42e49036
+SHA1 (patch-src_rtcmix_Makefile) = c5ec9c51ffeadb59affab83a32f4ffa381146bde
+SHA1 (patch-src_rtcmix_load__utils.c) = 9253af10b23fbb86b707dc4f6a5e45def4e1389c
+SHA1 (patch-utils_Makefile) = 48b6d5217560cf6a2de29079291f9c1a242d0b69
+SHA1 (patch-utils_cmixplay.cpp) = a44a43bc115a42e2d780fba17d7e0402bbbae377
+SHA1 (patch-utils_head_Makefile) = 4e285f593c912958c409ae81be0865b65158d8b6
+SHA1 (patch-utils_resample_Makefile) = bcf2582dfb0a3a8e5464f488ac606a8fb35cea70
diff --git a/rtcmix/patches/patch-Makefile b/rtcmix/patches/patch-Makefile
new file mode 100644
index 0000000000..09b291b9f0
--- /dev/null
+++ b/rtcmix/patches/patch-Makefile
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ Makefile
+@@ -11,7 +11,8 @@ else
+ 	DIRS = include genlib insts src
+ endif
+ 
+-all:	install_dirs
++all:
++	@if test ! -d $(BLIBDIR); then mkdir $(BLIBDIR); fi;
+ 	@echo "making all ..."
+ 	@for DIR in $(DIRS); \
+ 	do \
+@@ -105,8 +106,8 @@ standalone_install::
+ 	@echo "standalone_install done."; echo ""
+ 
+ install_dirs::
+-	@if test ! -d $(LIBDIR); then mkdir $(LIBDIR); fi;
+-	@if test ! -d $(LIBDESTDIR); then mkdir $(LIBDESTDIR); fi;
++	@if test ! -d $(DESTDIR)/$(BINDIR); then mkdir -p $(DESTDIR)/$(BINDIR); fi;
++	@if test ! -d $(DESTDIR)/$(LIBDIR); then mkdir -p $(DESTDIR)/$(LIBDIR); fi;
+ 
+ ###########################################################  make uninstall  ###
+ 
diff --git a/rtcmix/patches/patch-configure.ac b/rtcmix/patches/patch-configure.ac
new file mode 100644
index 0000000000..c5877b7f3a
--- /dev/null
+++ b/rtcmix/patches/patch-configure.ac
@@ -0,0 +1,260 @@
+$NetBSD$
+
+--- configure.ac.orig	2015-10-03 21:09:58.000000000 +0000
++++ configure.ac
+@@ -31,12 +31,26 @@ case "$host" in
+    *-*-freebsd*)
+       ARCH=FREEBSD
+       ;;
++   *-*-netbsd*)
++      ARCH=NETBSD
++      ;;
+    *)
+       ARCH=LINUX
+       ;;
+ esac
+ AC_SUBST(ARCH)
+-
++case "$host_cpu" in
++   *arm*)
++      CPU=arm
++      ;;
++   *x86_64*)
++      CPU=x86
++      ;;
++   *i?86*)
++      CPU=x86
++      ;;
++esac
++AC_SUBST(CPU)
+ 
+ # Standard program, library and header checks ----------------------------------
+ 
+@@ -95,104 +109,114 @@ sys/param.h sys/socket.h sys/time.h term
+ #AC_SUBST(PTRSIZEFLAG)
+ 
+ #############################################################################
+-# Architecture -- pointer size
+-# This is set up to allow compiling fat (64/32) binaries eventually.  -JG
+-
+-# First find out which ptr sizes we can support
+-# NB: Must do AC_PROG_CC above this, or it will fail on Slack 10.2.
+-TMP_CFLAGS="$CFLAGS"
+-CFLAGS="-m64"
+-AC_RUN_IFELSE(
+-   [AC_LANG_PROGRAM([], [return sizeof(void *) == 8 ? 0 : 1;])],
+-   [CAN_BUILD_64BIT="yes"],
+-   [CAN_BUILD_64BIT="no"]
+-)
+-CFLAGS="-m32"
+-AC_RUN_IFELSE(
+-   [AC_LANG_PROGRAM([], [return sizeof(void *) == 4 ? 0 : 1;])],
+-   [CAN_BUILD_32BIT="yes"],
+-   [CAN_BUILD_32BIT="no"]
+-)
+-CFLAGS="$TMP_CFLAGS"
+-
+-# Gather user requests
+-WANTS_64BIT=""
+-AC_ARG_WITH(64bit,
+-   AC_HELP_STRING([--with-64bit], [build 64-bit version]),
+-   [if test "$withval" != "no"; then
+-      if test "$CAN_BUILD_64BIT" = "no"; then
+-         AC_MSG_ERROR([Don't know how to build a 64-bit object.])
+-      fi
+-      WANTS_64BIT="yes"
+-   else
+-      WANTS_64BIT="no"
+-   fi]
+-)
+-WANTS_32BIT=""
+-AC_ARG_WITH(32bit,
+-   AC_HELP_STRING([--with-32bit], [build 32-bit version]),
+-   [if test "$withval" != "no"; then
+-      if test "$CAN_BUILD_32BIT" = "no"; then
+-         AC_MSG_ERROR([Don't know how to build a 32-bit object.])
+-      fi
+-      WANTS_32BIT="yes"
+-   else
+-      WANTS_32BIT="no"
+-   fi]
+-)
+-
+-# Build only 64bit by default, unless user requests 32bit, or requests not to
+-# build 64bit, or the system doesn't support 64bit. This logic will have to be
+-# changed if we want to support fat 64/32 binaries.
+-ARCH_64BIT=""
+-ARCH_32BIT=""
+-if test "$CAN_BUILD_64BIT" = "yes" \
+-		-a "$WANTS_32BIT" != "yes" \
+-		-a "$WANTS_64BIT" != "no"; then
+-  	ARCH_64BIT="-m64"
+-else
+-   if test "$CAN_BUILD_32BIT" = "no"; then
+-      AC_MSG_ERROR([Don't know how to build a 32-bit object.])
+-   fi
+-   ARCH_32BIT="-m32"
+-fi
+-
+-# Set up summary display for user and export variables.
+-WITH_64BIT="false"
+-WITH_32BIT="false"
+-if test "$ARCH_64BIT" != ""; then
+-   WITH_64BIT="true"
+-fi
+-if test "$ARCH_32BIT" != ""; then
+-   WITH_32BIT="true"
+-fi
+-
+-# add fPIC flag for Linux 64bit builds
+-PICFLAGS=""
+-if test "$ARCH_64BIT" != ""; then
+-   if test "$ARCH" = "LINUX"; then
+-      PICFLAGS=" -fPIC"
+-   fi
++if test "$CPU" = "x86"; then
++	# Architecture -- pointer size
++	# This is set up to allow compiling fat (64/32) binaries eventually.  -JG
++
++	# First find out which ptr sizes we can support
++	# NB: Must do AC_PROG_CC above this, or it will fail on Slack 10.2.
++	TMP_CFLAGS="$CFLAGS"
++	CFLAGS="-m64"
++	AC_RUN_IFELSE(
++	   [AC_LANG_PROGRAM([], [return sizeof(void *) == 8 ? 0 : 1;])],
++	   [CAN_BUILD_64BIT="yes"],
++	   [CAN_BUILD_64BIT="no"]
++	)
++	CFLAGS="-m32"
++	AC_RUN_IFELSE(
++	   [AC_LANG_PROGRAM([], [return sizeof(void *) == 4 ? 0 : 1;])],
++	   [CAN_BUILD_32BIT="yes"],
++	   [CAN_BUILD_32BIT="no"]
++	)
++
++	CFLAGS="$TMP_CFLAGS"
++	
++	# Gather user requests
++	WANTS_64BIT=""
++	AC_ARG_WITH(64bit,
++	   AC_HELP_STRING([--with-64bit], [build 64-bit version]),
++	   [if test "$withval" != "no"; then
++	      if test "$CAN_BUILD_64BIT" = "no"; then
++	         AC_MSG_ERROR([Don't know how to build a 64-bit object.])
++	      fi
++	      WANTS_64BIT="yes"
++	   else
++	      WANTS_64BIT="no"
++	   fi]
++	)
++
++	WANTS_32BIT=""
++	AC_ARG_WITH(32bit,
++	   AC_HELP_STRING([--with-32bit], [build 32-bit version]),
++	   [if test "$withval" != "no"; then
++	      if test "$CAN_BUILD_32BIT" = "no"; then
++	         AC_MSG_ERROR([Don't know how to build a 32-bit object.])
++	      fi
++	      WANTS_32BIT="yes"
++	   else
++	      WANTS_32BIT="no"
++	   fi]
++	)
++
++
++	# Build only 64bit by default, unless user requests 32bit, or requests not to
++	# build 64bit, or the system doesn't support 64bit. This logic will have to be
++	# changed if we want to support fat 64/32 binaries.
++	ARCH_64BIT=""
++	ARCH_32BIT=""
++	if test "$CAN_BUILD_64BIT" = "yes" \
++			-a "$WANTS_32BIT" != "yes" \
++			-a "$WANTS_64BIT" != "no"; then
++	  	ARCH_64BIT="-m64"
++	else
++	   if test "$CAN_BUILD_32BIT" = "no"; then
++	      AC_MSG_ERROR([Don't know how to build a 32-bit object.])
++	   fi
++	   ARCH_32BIT="-m32"
++	fi
++
++
++	# Set up summary display for user and export variables.
++	WITH_64BIT="false"
++	WITH_32BIT="false"
++	if test "$ARCH_64BIT" != ""; then
++	   WITH_64BIT="true"
++	fi
++	if test "$ARCH_32BIT" != ""; then
++	   WITH_32BIT="true"
++	fi
++	
++	# add fPIC flag for Linux 64bit builds
++	PICFLAGS=""
++	if test "$ARCH_64BIT" != ""; then
++	   if test "$ARCH" = "LINUX"; then
++	      PICFLAGS=" -fPIC"
++	   fi
++	fi
++
++	#echo "****** ARCH_64BIT: $ARCH_64BIT" 
++	#echo "****** ARCH_32BIT: $ARCH_32BIT" 
++	
++	# Combine the bit flags into one symbol to be added to ARCHFLAGS later
++	ARCH_BITFLAGS="$ARCH_64BIT $ARCH_32BIT"
++	
++	# Feed the right arch flags to Xcode for MouseWindow, DisplayWindow
++	BUILD_ARCH=""
++	if test "$ARCH" = "MACOSX"; then  # this trips up slack 10.2, so don't bother
++	   if test "$WITH_32BIT" = "true"; then
++	      BUILD_ARCH+="i386"
++	   fi
++	   if test "$WITH_64BIT" = "true"; then
++	      BUILD_ARCH+="x86_64"
++	   fi
++	fi
++fi
++if test "$CPU" = "arm"; then
++	PICFLAGS=" -fPIC"
++	BUILD_ARCH="arm"
+ fi
+ AC_SUBST(PICFLAGS)
+-
+-#echo "****** ARCH_64BIT: $ARCH_64BIT" 
+-#echo "****** ARCH_32BIT: $ARCH_32BIT" 
+-
+-# Combine the bit flags into one symbol to be added to ARCHFLAGS later
+-ARCH_BITFLAGS="$ARCH_64BIT $ARCH_32BIT"
+ AC_SUBST(ARCH_BITFLAGS)
+-
+-# Feed the right arch flags to Xcode for MouseWindow, DisplayWindow
+-BUILD_ARCH=""
+-if test "$ARCH" = "MACOSX"; then  # this trips up slack 10.2, so don't bother
+-   if test "$WITH_32BIT" = "true"; then
+-      BUILD_ARCH+="i386"
+-   fi
+-   if test "$WITH_64BIT" = "true"; then
+-      BUILD_ARCH+="x86_64"
+-   fi
+-fi
+ AC_SUBST(BUILD_ARCH)
+ #############################################################################
+ 
+@@ -276,14 +300,14 @@ AC_SUBST(PYTHON_SUPPORT)
+ AC_SUBST(PYTHON)
+ 
+ # Documentation options
+-HTMLDESTDIR="$CMIXDIR"/docs/html          # default location
++HTMLDIR="$CMIXDIR"/docs/html          # default location
+ AC_ARG_WITH(docdir,
+    AC_HELP_STRING([--with-docdir=PATH], [put documentation in this directory]),
+    [if test "$withval" != "no" && test "$withval" != "yes"; then
+-      AC_SUBST(HTMLDESTDIR, ["$withval"/html]),
++      AC_SUBST(HTMLDIR, ["$withval"/html]),
+    fi]
+ )
+-AC_SUBST(HTMLDESTDIR)
++AC_SUBST(HTMLDIR)
+ 
+ # NetPlay options
+ NPLAY_SUPPORT=FALSE                       # default
diff --git a/rtcmix/patches/patch-defs.conf.in b/rtcmix/patches/patch-defs.conf.in
new file mode 100644
index 0000000000..f4cc5c4cb2
--- /dev/null
+++ b/rtcmix/patches/patch-defs.conf.in
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- defs.conf.in.orig	2015-10-03 21:09:58.000000000 +0000
++++ defs.conf.in
+@@ -34,9 +34,10 @@ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ # suppress warning in configure...
+ datarootdir = @datarootdir@
+-#DESTDIR = @bindir@
+-MANDESTDIR = @mandir@
+-HTMLDESTDIR = @HTMLDESTDIR@
++BINDIR = @bindir@
++LIBDIR = @libdir@
++MANDIR = @mandir@
++HTMLDIR = @htmldir@
+ 
+ XLIBDIR = @x_libraries@
+ 
diff --git a/rtcmix/patches/patch-docs_Makefile b/rtcmix/patches/patch-docs_Makefile
new file mode 100644
index 0000000000..53ea2e687c
--- /dev/null
+++ b/rtcmix/patches/patch-docs_Makefile
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- docs/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/Makefile
+@@ -4,7 +4,7 @@
+ #
+ include ../makefile.conf
+ 
+-DIRS = #pod
++DIRS = pod
+ 
+ all:
+ 	@for DIR in $(DIRS); \
diff --git a/rtcmix/patches/patch-docs_README.documentation b/rtcmix/patches/patch-docs_README.documentation
new file mode 100644
index 0000000000..f01c649062
--- /dev/null
+++ b/rtcmix/patches/patch-docs_README.documentation
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- docs/README.documentation.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/README.documentation
+@@ -5,8 +5,8 @@ Go to the RTcmix web page for lots of do
+ 
+ This distribution contains documentation in the form of man pages
+ and html.  These are installed in the directories you specify in 
+-makefile.conf.  (Adjust MANDESTDIR and HTMLDESTDIR to taste.)  To see
+-the man pages, add the MANDESTDIR to your MANPATH.  In bash, but 
++makefile.conf.  (Adjust MANPATH and HTMLDIR to taste.)  To see
++the man pages, add the MANPATH to your MANPATH.  In bash, but 
+ something like this in your .profile (or wherever you put such things):
+ 
+    MANPATH="$MANPATH:/usr/local/rtcmix/docs/man"
diff --git a/rtcmix/patches/patch-docs_pod_Makefile b/rtcmix/patches/patch-docs_pod_Makefile
new file mode 100644
index 0000000000..206c4c5cc5
--- /dev/null
+++ b/rtcmix/patches/patch-docs_pod_Makefile
@@ -0,0 +1,73 @@
+$NetBSD$
+
+--- docs/pod/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/pod/Makefile
+@@ -127,46 +127,46 @@ clean:
+ 	$(RM) *.1 *.3 *.html *.ps *.pdf *.tmp pod2htm* $(SYN)
+ 
+ installman: $(MAN)
+-ifneq ($(strip $(MANDESTDIR)),)    # do only if MANDESTDIR is nonempty
+-	$(mkinstalldirs) $(MANDESTDIR)/man1
+-	$(mkinstalldirs) $(MANDESTDIR)/man3
+-	$(INSTALL) $(INST_MAN) $(SCRIPT_MAN) $(CMD_MAN) $(MANDESTDIR)/man1
++ifneq ($(strip $(MANDIR)),)    # do only if MANDIR is nonempty
++	$(mkinstalldirs) $(DESTDIR)/$(MANDIR)/man1
++	$(mkinstalldirs) $(DESTDIR)/$(MANDIR)/man3
++	$(INSTALL) $(INST_MAN) $(SCRIPT_MAN) $(CMD_MAN) $(DESTDIR)/$(MANDIR)/man1
+ ifneq ($(strip $(API_MAN)),)       # do only if API_MAN is nonempty
+-	$(INSTALL) $(API_MAN) $(MANDESTDIR)/man3
++	$(INSTALL) $(API_MAN) $(DESTDIR)/$(MANDIR)/man3
+ endif
+ endif
+ 
+ uninstallman:
+-ifneq ($(strip $(MANDESTDIR)),)    # do only if MANDESTDIR is nonempty
+-	( cd $(MANDESTDIR)/man1; $(RM) $(INST_MAN) $(SCRIPT_MAN) $(CMD_MAN) )
++ifneq ($(strip $(MANDIR)),)    # do only if MANDIR is nonempty
++	( cd $(DESTDIR)/$(MANDIR)/man1; $(RM) $(INST_MAN) $(SCRIPT_MAN) $(CMD_MAN) )
+ ifneq ($(strip $(API_MAN)),)       # do only if API_MAN is nonempty
+-	( cd $(MANDESTDIR)/man3; $(RM) $(API_MAN) )
++	( cd $(DESTDIR)/$(MANDIR)/man3; $(RM) $(API_MAN) )
+ endif
+ endif
+ 
+ installhtml: $(HTML) $(HTML_INDEX)
+-ifneq ($(strip $(HTMLDESTDIR)),)    # do only if HTMLDESTDIR is nonempty
+-	$(mkinstalldirs) $(HTMLDESTDIR)
+-	$(INSTALL) $(HTML) $(HTMLDESTDIR)
+-	$(INSTALL) $(HTML_INDEX) $(HTMLDESTDIR)
+-	$(INSTALL) style.css $(HTMLDESTDIR)
+-	$(mkinstalldirs) $(HTMLDESTDIR)/images
+-	( cd images; $(INSTALL) $(IMAGES) $(HTMLDESTDIR)/images )
++ifneq ($(strip $(HTMLDIR)),)    # do only if HTMLDIR is nonempty
++	$(mkinstalldirs) $(DESTDIR)/$(HTMLDIR)
++	$(INSTALL) $(HTML) $(DESTDIR)/$(HTMLDIR)
++	$(INSTALL) $(HTML_INDEX) $(DESTDIR)/$(HTMLDIR)
++	$(INSTALL) style.css $(DESTDIR)/$(HTMLDIR)
++	$(mkinstalldirs) $(DESTDIR)/$(HTMLDIR)/images
++	( cd images; $(INSTALL) $(IMAGES) $(DESTDIR)/$(HTMLDIR)/images )
+ endif
+ 
+ uninstallhtml:
+-ifneq ($(strip $(HTMLDESTDIR)),)    # do only if HTMLDESTDIR is nonempty
+-	( if test -d $(HTMLDESTDIR); then cd $(HTMLDESTDIR); \
++ifneq ($(strip $(HTMLDIR)),)    # do only if HTMLDIR is nonempty
++	( if test -d $(DESTDIR)/$(HTMLDIR); then cd $(DESTDIR)/$(HTMLDIR); \
+ 		$(RM) $(HTML) $(HTML_INDEX) style.css; fi )
+-	( cd $(HTMLDESTDIR)/images; $(RM) $(IMAGES) )
++	( cd $(DESTDIR)/$(HTMLDIR)/images; $(RM) $(IMAGES) )
+ endif
+ 
+ installsyn: $(SYN)
+-	$(INSTALL) $(SYN) $(BINDIR)
++	$(INSTALL) $(SYN) $(DESTDIR)/$(BINDIR)
+ 
+ uninstallsyn:
+-	( cd $(BINDIR); $(RM) $(SYN) )
++	( cd $(DESTDIR)/$(BINDIR); $(RM) $(SYN) )
+ 
+-install: installman installhtml installsyn
+-uninstall: uninstallman uninstallhtml uninstallsyn
++install: installman installhtml #installsyn
++uninstall: uninstallman uninstallhtml #uninstallsyn
+ 
diff --git a/rtcmix/patches/patch-docs_pod_copygen.pod b/rtcmix/patches/patch-docs_pod_copygen.pod
new file mode 100644
index 0000000000..985233ad4f
--- /dev/null
+++ b/rtcmix/patches/patch-docs_pod_copygen.pod
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- docs/pod/copygen.pod.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/pod/copygen.pod
+@@ -39,15 +39,15 @@ as the old one.
+ This optional argument specifies the type of interpolation to use when
+ copying the table to a new one with a larger size.  The types are:
+ 
+-=over 8
+-
+ =for html <p>
+ 
+-=item 0
++=over 8
++
++=item '0'
+ 
+ no interpolation
+ 
+-=item 1
++=item '1'
+ 
+ linear interpolation
+ 
diff --git a/rtcmix/patches/patch-docs_pod_gen20.pod b/rtcmix/patches/patch-docs_pod_gen20.pod
new file mode 100644
index 0000000000..5b49412905
--- /dev/null
+++ b/rtcmix/patches/patch-docs_pod_gen20.pod
@@ -0,0 +1,44 @@
+$NetBSD$
+
+--- docs/pod/gen20.pod.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/pod/gen20.pod
+@@ -32,31 +32,31 @@ The size of the function table: how many
+ 
+ A code indicating the type of random distribution to use:
+ 
+-=over 8
+-
+ =for html <p>
+ 
+-=item 0
++=over 8
++
++=item '0'
+ 
+ even distribution
+ 
+-=item 1
++=item '1'
+ 
+ low-weighted linear distribution
+ 
+-=item 2
++=item '2'
+ 
+ high-weighted linear distribution
+ 
+-=item 3
++=item '3'
+ 
+ triangular distribution weighted towards 0.5
+ 
+-=item 4
++=item '4'
+ 
+ gaussian distribution, with mean of 0.5 and standard deviation of 0.166666
+ 
+-=item 5
++=item '5'
+ 
+ cauchy distribution, with mean of 0.5 and alpha of 0.00628338
+ 
diff --git a/rtcmix/patches/patch-docs_pod_gen25.pod b/rtcmix/patches/patch-docs_pod_gen25.pod
new file mode 100644
index 0000000000..0576ddfac7
--- /dev/null
+++ b/rtcmix/patches/patch-docs_pod_gen25.pod
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- docs/pod/gen25.pod.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/pod/gen25.pod
+@@ -30,10 +30,10 @@ The size of the function table: how many
+ 
+ A code indicating which type of window function to draw:
+ 
+-=over 8
+-
+ =for html <p>
+ 
++=over 8
++
+ =item 1
+ 
+ Hanning window
diff --git a/rtcmix/patches/patch-docs_pod_gen4.pod b/rtcmix/patches/patch-docs_pod_gen4.pod
new file mode 100644
index 0000000000..e4a969e802
--- /dev/null
+++ b/rtcmix/patches/patch-docs_pod_gen4.pod
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- docs/pod/gen4.pod.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/pod/gen4.pod
+@@ -49,10 +49,10 @@ The value of the curve at I<timeN>.
+ 
+ Controls the curvature of the line segment from point N to point N+1.
+ 
+-=over 8
+-
+ =for html <p>
+ 
++=over 8
++
+ =item I<alpha> = 0
+ 
+ makes a straight line.
diff --git a/rtcmix/patches/patch-docs_pod_rtoutput.pod b/rtcmix/patches/patch-docs_pod_rtoutput.pod
new file mode 100644
index 0000000000..edb16fb076
--- /dev/null
+++ b/rtcmix/patches/patch-docs_pod_rtoutput.pod
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- docs/pod/rtoutput.pod.orig	2015-10-03 21:09:58.000000000 +0000
++++ docs/pod/rtoutput.pod
+@@ -38,10 +38,10 @@ The type of header to use for the sound 
+ string.  Note that if you name the file with a recognized suffix
+ (see above), you don't need to specify a header type in this way.
+ 
+-=over 8
+-
+ =for html <p>
+ 
++=over 8
++
+ =item I<aiff>
+ 
+ AIFF format
diff --git a/rtcmix/patches/patch-genlib_Makefile b/rtcmix/patches/patch-genlib_Makefile
new file mode 100644
index 0000000000..1cb96aa796
--- /dev/null
+++ b/rtcmix/patches/patch-genlib_Makefile
@@ -0,0 +1,32 @@
+$NetBSD$
+
+--- genlib/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ genlib/Makefile
+@@ -162,13 +162,15 @@ endif
+ 	$(CXX) -c $(CXXFLAGS) -o $@ $<
+ 	
+ all : $(LIB)
+-	@if test ! -d $(LIBDIR); then mkdir $(LIBDIR); fi;
+-	$(INSTALL) $(LIB) $(LIBDIR)
++	@if test ! -d $(BLIBDIR); then mkdir -p $(BLIBDIR); fi;
++	$(INSTALL) $(LIB) $(BLIBDIR)
+ 
+ install:	all
++	$(INSTALL) $(LIB) $(DESTDIR)/$(LIBDIR)
+ 
+ uninstall:
+-	$(RM) $(LIBDIR)/$(LIB)
++	$(RM) $(BLIBDIR)/$(LIB)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(LIB)
+ 
+ ifeq ($(BUILDTYPE), STANDALONE)
+ $(LIB):	$(OBJECTS) $(OOBJECTS)
+@@ -201,6 +203,5 @@ clean:
+ 
+ cleanall: clean
+ 	$(RM) depend
+-	$(RM) $(LIBDIR)/$(LIB)
+-
+-
++	$(RM) $(BLIBDIR)/$(LIB)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(LIB)
diff --git a/rtcmix/patches/patch-insts_base_CHAIN_Makefile b/rtcmix/patches/patch-insts_base_CHAIN_Makefile
new file mode 100644
index 0000000000..112b84be79
--- /dev/null
+++ b/rtcmix/patches/patch-insts_base_CHAIN_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/base/CHAIN/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/base/CHAIN/Makefile
+@@ -25,18 +25,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_base_WAVETABLE_Makefile b/rtcmix/patches/patch-insts_base_WAVETABLE_Makefile
new file mode 100644
index 0000000000..b813c1b733
--- /dev/null
+++ b/rtcmix/patches/patch-insts_base_WAVETABLE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/base/WAVETABLE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/base/WAVETABLE/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_bgg_GVERB_Makefile b/rtcmix/patches/patch-insts_bgg_GVERB_Makefile
new file mode 100644
index 0000000000..7264eb0f03
--- /dev/null
+++ b/rtcmix/patches/patch-insts_bgg_GVERB_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/bgg/GVERB/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/bgg/GVERB/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h gverb
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_bgg_HALFWAVE_Makefile b/rtcmix/patches/patch-insts_bgg_HALFWAVE_Makefile
new file mode 100644
index 0000000000..34f0f78cdf
--- /dev/null
+++ b/rtcmix/patches/patch-insts_bgg_HALFWAVE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/bgg/HALFWAVE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/bgg/HALFWAVE/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_bgg_PFSCHED_Makefile b/rtcmix/patches/patch-insts_bgg_PFSCHED_Makefile
new file mode 100644
index 0000000000..4531eb0f5d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_bgg_PFSCHED_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/bgg/PFSCHED/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/bgg/PFSCHED/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_bgg_SYNC_Makefile b/rtcmix/patches/patch-insts_bgg_SYNC_Makefile
new file mode 100644
index 0000000000..e96b1c12e2
--- /dev/null
+++ b/rtcmix/patches/patch-insts_bgg_SYNC_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/bgg/SYNC/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/bgg/SYNC/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_bgg_VWAVE_Makefile b/rtcmix/patches/patch-insts_bgg_VWAVE_Makefile
new file mode 100644
index 0000000000..d0131a40d2
--- /dev/null
+++ b/rtcmix/patches/patch-insts_bgg_VWAVE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/bgg/VWAVE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/bgg/VWAVE/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_BUTTER_Makefile b/rtcmix/patches/patch-insts_jg_BUTTER_Makefile
new file mode 100644
index 0000000000..a901ac1d6a
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_BUTTER_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/BUTTER/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/BUTTER/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_COMPLIMIT_Makefile b/rtcmix/patches/patch-insts_jg_COMPLIMIT_Makefile
new file mode 100644
index 0000000000..870005a047
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_COMPLIMIT_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/COMPLIMIT/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/COMPLIMIT/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_CONVOLVE1_Makefile b/rtcmix/patches/patch-insts_jg_CONVOLVE1_Makefile
new file mode 100644
index 0000000000..53949069fd
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_CONVOLVE1_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/CONVOLVE1/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/CONVOLVE1/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_DCBLOCK_Makefile b/rtcmix/patches/patch-insts_jg_DCBLOCK_Makefile
new file mode 100644
index 0000000000..c9d7304c5a
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_DCBLOCK_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/DCBLOCK/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/DCBLOCK/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_DECIMATE_Makefile b/rtcmix/patches/patch-insts_jg_DECIMATE_Makefile
new file mode 100644
index 0000000000..68a5d97b6d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_DECIMATE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/DECIMATE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/DECIMATE/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_DISTORT_Makefile b/rtcmix/patches/patch-insts_jg_DISTORT_Makefile
new file mode 100644
index 0000000000..57e448e64b
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_DISTORT_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/DISTORT/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/DISTORT/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_ELL_Makefile b/rtcmix/patches/patch-insts_jg_ELL_Makefile
new file mode 100644
index 0000000000..746142ce17
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_ELL_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/ELL/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/ELL/Makefile
+@@ -28,18 +28,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h ellde
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_EQ_Makefile b/rtcmix/patches/patch-insts_jg_EQ_Makefile
new file mode 100644
index 0000000000..ae90093b4d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_EQ_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/EQ/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/EQ/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_FILTERBANK_Makefile b/rtcmix/patches/patch-insts_jg_FILTERBANK_Makefile
new file mode 100644
index 0000000000..601de7b453
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_FILTERBANK_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/FILTERBANK/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/FILTERBANK/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_FILTSWEEP_Makefile b/rtcmix/patches/patch-insts_jg_FILTSWEEP_Makefile
new file mode 100644
index 0000000000..e93a9df781
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_FILTSWEEP_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/FILTSWEEP/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/FILTSWEEP/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_FLANGE_Makefile b/rtcmix/patches/patch-insts_jg_FLANGE_Makefile
new file mode 100644
index 0000000000..a2bd264d0b
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_FLANGE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/FLANGE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/FLANGE/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_FOLLOWER_Makefile b/rtcmix/patches/patch-insts_jg_FOLLOWER_Makefile
new file mode 100644
index 0000000000..70f9060b3d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_FOLLOWER_Makefile
@@ -0,0 +1,43 @@
+$NetBSD$
+
+--- insts/jg/FOLLOWER/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/FOLLOWER/Makefile
+@@ -68,26 +68,26 @@ FOLLOWER_BASE.o: $(INSTRUMENT_H) $(COMMO
+ install: dso_install
+ 
+ dso_install: all
+-	$(INSTALL) $(CURDIR)/libFOLLOWER.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libFOLLOWGATE.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libFOLLOWBUTTER.so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/libFOLLOWER.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libFOLLOWGATE.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libFOLLOWBUTTER.so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/FOLLOWER $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/FOLLOWGATE $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/FOLLOWBUTTER $(DESTDIR)
++	$(INSTALL) $(CURDIR)/FOLLOWER $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/FOLLOWGATE $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/FOLLOWBUTTER $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/libFOLLOWER.so
+-	$(RM) $(LIBDESTDIR)/libFOLLOWGATE.so
+-	$(RM) $(LIBDESTDIR)/libFOLLOWBUTTER.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libFOLLOWER.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libFOLLOWGATE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libFOLLOWBUTTER.so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/FOLLOWER
+-	$(RM) $(DESTDIR)/FOLLOWGATE
+-	$(RM) $(DESTDIR)/FOLLOWBUTTER
++	$(RM) $(DESTDIR)/$(BINDIR)/FOLLOWER
++	$(RM) $(DESTDIR)/$(BINDIR)/FOLLOWGATE
++	$(RM) $(DESTDIR)/$(BINDIR)/FOLLOWBUTTER
+ 
+ clean:
+ 	$(RM) $(FOLLOWER_OBJS) $(FOLLOWGATE_OBJS) $(FOLLOWBUTTER_OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_FREEVERB_Makefile b/rtcmix/patches/patch-insts_jg_FREEVERB_Makefile
new file mode 100644
index 0000000000..aaa11e8c0d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_FREEVERB_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/FREEVERB/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/FREEVERB/Makefile
+@@ -31,18 +31,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h $(HDR
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_GRANSYNTH_Makefile b/rtcmix/patches/patch-insts_jg_GRANSYNTH_Makefile
new file mode 100644
index 0000000000..e1a77096a1
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_GRANSYNTH_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/GRANSYNTH/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/GRANSYNTH/Makefile
+@@ -31,18 +31,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h synth
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_GRANULATE_Makefile b/rtcmix/patches/patch-insts_jg_GRANULATE_Makefile
new file mode 100644
index 0000000000..cd7548b2cc
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_GRANULATE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/GRANULATE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/GRANULATE/Makefile
+@@ -31,18 +31,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h grain
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_JCHOR_Makefile b/rtcmix/patches/patch-insts_jg_JCHOR_Makefile
new file mode 100644
index 0000000000..99143fb233
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_JCHOR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/JCHOR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/JCHOR/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_JDELAY_Makefile b/rtcmix/patches/patch-insts_jg_JDELAY_Makefile
new file mode 100644
index 0000000000..ced31e994b
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_JDELAY_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/JDELAY/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/JDELAY/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_JFIR_Makefile b/rtcmix/patches/patch-insts_jg_JFIR_Makefile
new file mode 100644
index 0000000000..f0a12bd529
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_JFIR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/JFIR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/JFIR/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_JGRAN_Makefile b/rtcmix/patches/patch-insts_jg_JGRAN_Makefile
new file mode 100644
index 0000000000..d5ad559704
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_JGRAN_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/JGRAN/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/JGRAN/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_MOOGVCF_Makefile b/rtcmix/patches/patch-insts_jg_MOOGVCF_Makefile
new file mode 100644
index 0000000000..31e36e8440
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_MOOGVCF_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/MOOGVCF/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/MOOGVCF/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_MROOM_Makefile b/rtcmix/patches/patch-insts_jg_MROOM_Makefile
new file mode 100644
index 0000000000..846060bf4e
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_MROOM_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/MROOM/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/MROOM/Makefile
+@@ -28,18 +28,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h times
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_MULTEQ_Makefile b/rtcmix/patches/patch-insts_jg_MULTEQ_Makefile
new file mode 100644
index 0000000000..41f85093c0
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_MULTEQ_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/MULTEQ/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/MULTEQ/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_MULTIWAVE_Makefile b/rtcmix/patches/patch-insts_jg_MULTIWAVE_Makefile
new file mode 100644
index 0000000000..ae1a325f3d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_MULTIWAVE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/MULTIWAVE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/MULTIWAVE/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_NPAN_Makefile b/rtcmix/patches/patch-insts_jg_NPAN_Makefile
new file mode 100644
index 0000000000..c6008d4e92
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_NPAN_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/NPAN/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/NPAN/Makefile
+@@ -28,18 +28,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h speak
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_PAN_Makefile b/rtcmix/patches/patch-insts_jg_PAN_Makefile
new file mode 100644
index 0000000000..ee5ea3afcc
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_PAN_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/PAN/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/PAN/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_QPAN_Makefile b/rtcmix/patches/patch-insts_jg_QPAN_Makefile
new file mode 100644
index 0000000000..4a7b86a052
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_QPAN_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/QPAN/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/QPAN/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_RESYNTH_Makefile b/rtcmix/patches/patch-insts_jg_RESYNTH_Makefile
new file mode 100644
index 0000000000..ce4a22c699
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_RESYNTH_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/RESYNTH/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/RESYNTH/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h $(PAR
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) -r $(OBJS) SDIFfile.o $(PROGS) test test.o test.dSYM RESYNTH.dSYM
diff --git a/rtcmix/patches/patch-insts_jg_REVERBIT_Makefile b/rtcmix/patches/patch-insts_jg_REVERBIT_Makefile
new file mode 100644
index 0000000000..845cf02b22
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_REVERBIT_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/REVERBIT/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/REVERBIT/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_REV_Makefile b/rtcmix/patches/patch-insts_jg_REV_Makefile
new file mode 100644
index 0000000000..726ed80d19
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_REV_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/REV/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/REV/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_ROOM_Makefile b/rtcmix/patches/patch-insts_jg_ROOM_Makefile
new file mode 100644
index 0000000000..d18834cc80
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_ROOM_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/ROOM/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/ROOM/Makefile
+@@ -28,18 +28,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h rooms
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_SHAPE_Makefile b/rtcmix/patches/patch-insts_jg_SHAPE_Makefile
new file mode 100644
index 0000000000..aafabe9a2b
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_SHAPE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/SHAPE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/SHAPE/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_SPECTACLE2_Makefile b/rtcmix/patches/patch-insts_jg_SPECTACLE2_Makefile
new file mode 100644
index 0000000000..1c7d47aea4
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_SPECTACLE2_Makefile
@@ -0,0 +1,35 @@
+$NetBSD$
+
+--- insts/jg/SPECTACLE2/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/SPECTACLE2/Makefile
+@@ -42,22 +42,22 @@ SPECTACLE2_BASE.o: $(INSTRUMENT_H) $(COM
+ install: dso_install
+ 
+ dso_install: all
+-	$(INSTALL) $(CURDIR)/libSPECTACLE2.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libSPECTEQ2.so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/libSPECTACLE2.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libSPECTEQ2.so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/SPECTACLE2 $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/SPECTEQ2 $(DESTDIR)
++	$(INSTALL) $(CURDIR)/SPECTACLE2 $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/SPECTEQ2 $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/libSPECTACLE2.so
+-	$(RM) $(LIBDESTDIR)/libSPECTEQ2.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libSPECTACLE2.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libSPECTEQ2.so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/SPECTACLE2
+-	$(RM) $(DESTDIR)/SPECTEQ2
++	$(RM) $(DESTDIR)/$(BINDIR)/SPECTACLE2
++	$(RM) $(DESTDIR)/$(BINDIR)/SPECTEQ2
+ 
+ clean:
+ 	$(RM) $(SPECTACLE2_OBJS) $(SPECTEQ2_OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_SPECTACLE_Makefile b/rtcmix/patches/patch-insts_jg_SPECTACLE_Makefile
new file mode 100644
index 0000000000..c86408743f
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_SPECTACLE_Makefile
@@ -0,0 +1,43 @@
+$NetBSD$
+
+--- insts/jg/SPECTACLE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/SPECTACLE/Makefile
+@@ -62,26 +62,26 @@ SPECTACLE_BASE.o: $(INSTRUMENT_H) $(COMM
+ install: dso_install
+ 
+ dso_install: all
+-	$(INSTALL) $(CURDIR)/libSPECTACLE.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libTVSPECTACLE.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libSPECTEQ.so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/libSPECTACLE.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libTVSPECTACLE.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libSPECTEQ.so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/SPECTACLE $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/TVSPECTACLE $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/SPECTEQ $(DESTDIR)
++	$(INSTALL) $(CURDIR)/SPECTACLE $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/TVSPECTACLE $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/SPECTEQ $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/libSPECTACLE.so
+-	$(RM) $(LIBDESTDIR)/libTVSPECTACLE.so
+-	$(RM) $(LIBDESTDIR)/libSPECTEQ.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libSPECTACLE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libTVSPECTACLE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libSPECTEQ.so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/SPECTACLE
+-	$(RM) $(DESTDIR)/TVSPECTACLE
+-	$(RM) $(DESTDIR)/SPECTEQ
++	$(RM) $(DESTDIR)/$(BINDIR)/SPECTACLE
++	$(RM) $(DESTDIR)/$(BINDIR)/TVSPECTACLE
++	$(RM) $(DESTDIR)/$(BINDIR)/SPECTEQ
+ 
+ clean:
+ 	$(RM) $(SPECTACLE_OBJS) $(TVSPECTACLE_OBJS) $(SPECTEQ_OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_SPLITTER_Makefile b/rtcmix/patches/patch-insts_jg_SPLITTER_Makefile
new file mode 100644
index 0000000000..12d09d5ab3
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_SPLITTER_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/SPLITTER/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/SPLITTER/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_SROOM_Makefile b/rtcmix/patches/patch-insts_jg_SROOM_Makefile
new file mode 100644
index 0000000000..a2fcf89158
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_SROOM_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/SROOM/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/SROOM/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_VOCODE2_Makefile b/rtcmix/patches/patch-insts_jg_VOCODE2_Makefile
new file mode 100644
index 0000000000..940b186297
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_VOCODE2_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/VOCODE2/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/VOCODE2/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_VOCODE3_Makefile b/rtcmix/patches/patch-insts_jg_VOCODE3_Makefile
new file mode 100644
index 0000000000..92bd6cd02d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_VOCODE3_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/VOCODE3/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/VOCODE3/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_VOCODESYNTH_Makefile b/rtcmix/patches/patch-insts_jg_VOCODESYNTH_Makefile
new file mode 100644
index 0000000000..3bdd42d523
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_VOCODESYNTH_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/VOCODESYNTH/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/VOCODESYNTH/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_WAVY_Makefile b/rtcmix/patches/patch-insts_jg_WAVY_Makefile
new file mode 100644
index 0000000000..50978b9c93
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_WAVY_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/WAVY/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/WAVY/Makefile
+@@ -30,18 +30,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h $(FPA
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_WIGGLE_Makefile b/rtcmix/patches/patch-insts_jg_WIGGLE_Makefile
new file mode 100644
index 0000000000..a1a4ddf181
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_WIGGLE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/WIGGLE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/WIGGLE/Makefile
+@@ -38,18 +38,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_jg_denoise_Makefile b/rtcmix/patches/patch-insts_jg_denoise_Makefile
new file mode 100644
index 0000000000..4c67e4dc5e
--- /dev/null
+++ b/rtcmix/patches/patch-insts_jg_denoise_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/jg/denoise/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/jg/denoise/Makefile
+@@ -25,18 +25,18 @@ $(OBJS): $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_joel_jfuncs_Makefile b/rtcmix/patches/patch-insts_joel_jfuncs_Makefile
new file mode 100644
index 0000000000..aa9a2a58c3
--- /dev/null
+++ b/rtcmix/patches/patch-insts_joel_jfuncs_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/joel/jfuncs/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/joel/jfuncs/Makefile
+@@ -29,18 +29,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_joel_tuning_Makefile b/rtcmix/patches/patch-insts_joel_tuning_Makefile
new file mode 100644
index 0000000000..702113506d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_joel_tuning_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/joel/tuning/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/joel/tuning/Makefile
+@@ -29,18 +29,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_maxmsp_MAXBANG_Makefile b/rtcmix/patches/patch-insts_maxmsp_MAXBANG_Makefile
new file mode 100644
index 0000000000..24a5daed29
--- /dev/null
+++ b/rtcmix/patches/patch-insts_maxmsp_MAXBANG_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/maxmsp/MAXBANG/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/maxmsp/MAXBANG/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_maxmsp_MAXMESSAGE_Makefile b/rtcmix/patches/patch-insts_maxmsp_MAXMESSAGE_Makefile
new file mode 100644
index 0000000000..dcfa89100c
--- /dev/null
+++ b/rtcmix/patches/patch-insts_maxmsp_MAXMESSAGE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/maxmsp/MAXMESSAGE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/maxmsp/MAXMESSAGE/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_AMINST_Makefile b/rtcmix/patches/patch-insts_std_AMINST_Makefile
new file mode 100644
index 0000000000..a1378c7f18
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_AMINST_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/AMINST/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/AMINST/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_AM_Makefile b/rtcmix/patches/patch-insts_std_AM_Makefile
new file mode 100644
index 0000000000..b5c4cab040
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_AM_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/AM/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/AM/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_CLAR_Makefile b/rtcmix/patches/patch-insts_std_CLAR_Makefile
new file mode 100644
index 0000000000..1a18c27f99
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_CLAR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/CLAR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/CLAR/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_COMBIT_Makefile b/rtcmix/patches/patch-insts_std_COMBIT_Makefile
new file mode 100644
index 0000000000..cd515fc5e9
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_COMBIT_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/COMBIT/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/COMBIT/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_DEL1_Makefile b/rtcmix/patches/patch-insts_std_DEL1_Makefile
new file mode 100644
index 0000000000..d3dd4a6ed4
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_DEL1_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/DEL1/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/DEL1/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_DELAY_Makefile b/rtcmix/patches/patch-insts_std_DELAY_Makefile
new file mode 100644
index 0000000000..1fbfc97afe
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_DELAY_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/DELAY/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/DELAY/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_DUMP_Makefile b/rtcmix/patches/patch-insts_std_DUMP_Makefile
new file mode 100644
index 0000000000..24104ad9a7
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_DUMP_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/DUMP/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/DUMP/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_FIR_Makefile b/rtcmix/patches/patch-insts_std_FIR_Makefile
new file mode 100644
index 0000000000..1a6e9ad6ca
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_FIR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/FIR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/FIR/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_FMINST_Makefile b/rtcmix/patches/patch-insts_std_FMINST_Makefile
new file mode 100644
index 0000000000..5ada18d74d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_FMINST_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/FMINST/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/FMINST/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_HOLO_Makefile b/rtcmix/patches/patch-insts_std_HOLO_Makefile
new file mode 100644
index 0000000000..119af954de
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_HOLO_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/HOLO/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/HOLO/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_IIR_Makefile b/rtcmix/patches/patch-insts_std_IIR_Makefile
new file mode 100644
index 0000000000..f4eb6939db
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_IIR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/IIR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/IIR/Makefile
+@@ -31,18 +31,18 @@ $(OBJS): $(INSTRUMENT_H) $(HEADERS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_LOOP_Makefile b/rtcmix/patches/patch-insts_std_LOOP_Makefile
new file mode 100644
index 0000000000..32e021d021
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_LOOP_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/LOOP/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/LOOP/Makefile
+@@ -27,18 +27,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_LPCPLAY_Makefile b/rtcmix/patches/patch-insts_std_LPCPLAY_Makefile
new file mode 100644
index 0000000000..3bbaff92f6
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_LPCPLAY_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/LPCPLAY/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/LPCPLAY/Makefile
+@@ -47,18 +47,18 @@ rand.o: rand.c lp.h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_MARAGRAN_Makefile b/rtcmix/patches/patch-insts_std_MARAGRAN_Makefile
new file mode 100644
index 0000000000..a0dcd1da0f
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_MARAGRAN_Makefile
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- insts/std/MARAGRAN/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/MARAGRAN/Makefile
+@@ -40,20 +40,20 @@ $(OBJS2): $(INSTRUMENT_H) $(NAME2).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so lib$(NAME2).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/lib$(NAME2).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME2).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/$(NAME2) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/$(NAME2) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so $(LIBDESTDIR)/lib$(NAME2).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)/lib$(NAME2).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME) $(DESTDIR)/$(NAME2)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME) $(DESTDIR)/$(BINDIR)/$(NAME2)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(OBJS2) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_METAFLUTE_Makefile b/rtcmix/patches/patch-insts_std_METAFLUTE_Makefile
new file mode 100644
index 0000000000..3d3643d4a4
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_METAFLUTE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/METAFLUTE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/METAFLUTE/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(HEADERS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_MMOVE_Makefile b/rtcmix/patches/patch-insts_std_MMOVE_Makefile
new file mode 100644
index 0000000000..5de0003c67
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_MMOVE_Makefile
@@ -0,0 +1,43 @@
+$NetBSD$
+
+--- insts/std/MMOVE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/MMOVE/Makefile
+@@ -64,26 +64,26 @@ MBASE.o : $(COMMON_HDRS) MBASE.cpp MBASE
+ install: dso_install
+ 
+ dso_install: all
+-	$(INSTALL) $(CURDIR)/libMPLACE.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libMMOVE.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libDMOVE.so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/libMPLACE.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libMMOVE.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libDMOVE.so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/MPLACE $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/MMOVE $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/DMOVE $(DESTDIR)
++	$(INSTALL) $(CURDIR)/MPLACE $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/MMOVE $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/DMOVE $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/libMPLACE.so
+-	$(RM) $(LIBDESTDIR)/libMMOVE.so
+-	$(RM) $(LIBDESTDIR)/libDMOVE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libMPLACE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libMMOVE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libDMOVE.so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/MPLACE
+-	$(RM) $(DESTDIR)/MMOVE
+-	$(RM) $(DESTDIR)/DMOVE
++	$(RM) $(DESTDIR)/$(BINDIR)/MPLACE
++	$(RM) $(DESTDIR)/$(BINDIR)/MMOVE
++	$(RM) $(DESTDIR)/$(BINDIR)/DMOVE
+ 
+ clean:
+ 	$(RM) $(POBJS) $(MOBJS) $(DOBJS) $(PROGS) $(TRASH)
diff --git a/rtcmix/patches/patch-insts_std_MOCKBEND_Makefile b/rtcmix/patches/patch-insts_std_MOCKBEND_Makefile
new file mode 100644
index 0000000000..23ca1880a8
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_MOCKBEND_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/MOCKBEND/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/MOCKBEND/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_MOVE_Makefile b/rtcmix/patches/patch-insts_std_MOVE_Makefile
new file mode 100644
index 0000000000..cb2a3bf298
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_MOVE_Makefile
@@ -0,0 +1,35 @@
+$NetBSD$
+
+--- insts/std/MOVE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/MOVE/Makefile
+@@ -46,22 +46,22 @@ BASE.o : $(INSTRUMENT_H) $(COMMON_HDRS) 
+ install: dso_install
+ 
+ dso_install: all
+-	$(INSTALL) $(CURDIR)/libPLACE.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libMOVE.so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/libPLACE.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libMOVE.so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/PLACE $(DESTDIR)
+-	$(INSTALL) $(CURDIR)/MOVE $(DESTDIR)
++	$(INSTALL) $(CURDIR)/PLACE $(DESTDIR)/$(BINDIR)
++	$(INSTALL) $(CURDIR)/MOVE $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/libPLACE.so
+-	$(RM) $(LIBDESTDIR)/libMOVE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libPLACE.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libMOVE.so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/PLACE
+-	$(RM) $(DESTDIR)/MOVE
++	$(RM) $(DESTDIR)/$(BINDIR)/PLACE
++	$(RM) $(DESTDIR)/$(BINDIR)/MOVE
+ 
+ clean:
+ 	$(RM) $(OBJS) $(MOBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_MULTICOMB_Makefile b/rtcmix/patches/patch-insts_std_MULTICOMB_Makefile
new file mode 100644
index 0000000000..2c46de3816
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_MULTICOMB_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/MULTICOMB/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/MULTICOMB/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_NOISE_Makefile b/rtcmix/patches/patch-insts_std_NOISE_Makefile
new file mode 100644
index 0000000000..4c0292340d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_NOISE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/NOISE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/NOISE/Makefile
+@@ -26,18 +26,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_PANECHO_Makefile b/rtcmix/patches/patch-insts_std_PANECHO_Makefile
new file mode 100644
index 0000000000..e65770b31f
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_PANECHO_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/PANECHO/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/PANECHO/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_PHASER_Makefile b/rtcmix/patches/patch-insts_std_PHASER_Makefile
new file mode 100644
index 0000000000..1dbef90cda
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_PHASER_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/PHASER/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/PHASER/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_PVOC.maxmsp_Makefile b/rtcmix/patches/patch-insts_std_PVOC.maxmsp_Makefile
new file mode 100644
index 0000000000..0bf9e3b328
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_PVOC.maxmsp_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/PVOC.maxmsp/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/PVOC.maxmsp/Makefile
+@@ -30,18 +30,18 @@ $(NAME):	$(UGENS_H) $(OBJS) $(CMIXOBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_PVOC_Makefile b/rtcmix/patches/patch-insts_std_PVOC_Makefile
new file mode 100644
index 0000000000..e1a7fb8606
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_PVOC_Makefile
@@ -0,0 +1,46 @@
+$NetBSD$
+
+--- insts/std/PVOC/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/PVOC/Makefile
+@@ -6,7 +6,7 @@ CURDIR = $(CMIXDIR)/insts/std/$(NAME)
+ OBJS = PVOC.o lpa.o lpamp.o makewindows.o fft.o fold.o overlapadd.o setup.o
+ 
+ INCLUDES += -I$(CMIXDIR)/src/rtcmix
+-CXXFLAGS +=  -DSHAREDLIBDIR=\"$(LIBDESTDIR)\"
++CXXFLAGS +=  -DSHAREDLIBDIR=\"$(DESTDIR)/$(LIBDIR)\"
+ 
+ FILTERS = libPVRandBend.so libPVRandBands.so libPVTransBend.so
+ 
+@@ -40,23 +40,23 @@ $(NAME):	$(UGENS_H) $(OBJS) $(CMIXOBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so $(FILTERS)
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libPVRandBend.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libPVRandBands.so $(LIBDESTDIR)
+-	$(INSTALL) $(CURDIR)/libPVTransBend.so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libPVRandBend.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libPVRandBands.so $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) $(CURDIR)/libPVTransBend.so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
+-	$(RM) $(LIBDESTDIR)/libPVRandBend.so
+-	$(RM) $(LIBDESTDIR)/libPVRandBands.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libPVRandBend.so
++	$(RM) $(DESTDIR)/$(LIBDIR)/libPVRandBands.so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS) $(FILTERS) PVFilter.o PVFilterTest.o PVRandBend.o PVRandBands.o PVTransBend.o
diff --git a/rtcmix/patches/patch-insts_std_REVMIX_Makefile b/rtcmix/patches/patch-insts_std_REVMIX_Makefile
new file mode 100644
index 0000000000..0c7dd513c1
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_REVMIX_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/REVMIX/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/REVMIX/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_SCRUB_Makefile b/rtcmix/patches/patch-insts_std_SCRUB_Makefile
new file mode 100644
index 0000000000..27538371f2
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_SCRUB_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/SCRUB/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/SCRUB/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_SCULPT_Makefile b/rtcmix/patches/patch-insts_std_SCULPT_Makefile
new file mode 100644
index 0000000000..2b31930822
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_SCULPT_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/SCULPT/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/SCULPT/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_STEREO_Makefile b/rtcmix/patches/patch-insts_std_STEREO_Makefile
new file mode 100644
index 0000000000..d63af9ee64
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_STEREO_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/STEREO/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/STEREO/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_STRUM2_Makefile b/rtcmix/patches/patch-insts_std_STRUM2_Makefile
new file mode 100644
index 0000000000..e2277617f2
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_STRUM2_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/STRUM2/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/STRUM2/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_STRUMFB_Makefile b/rtcmix/patches/patch-insts_std_STRUMFB_Makefile
new file mode 100644
index 0000000000..ef8bcc6cbc
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_STRUMFB_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/STRUMFB/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/STRUMFB/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_STRUM_Makefile b/rtcmix/patches/patch-insts_std_STRUM_Makefile
new file mode 100644
index 0000000000..026d598928
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_STRUM_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/STRUM/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/STRUM/Makefile
+@@ -35,18 +35,18 @@ $(OBJS): $(INSTRUMENT_H) $(HEADERS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_TRANSBEND_Makefile b/rtcmix/patches/patch-insts_std_TRANSBEND_Makefile
new file mode 100644
index 0000000000..74df6065ba
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_TRANSBEND_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/TRANSBEND/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/TRANSBEND/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_TRANS_Makefile b/rtcmix/patches/patch-insts_std_TRANS_Makefile
new file mode 100644
index 0000000000..c6be2c8c24
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_TRANS_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/TRANS/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/TRANS/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_WAVESHAPE_Makefile b/rtcmix/patches/patch-insts_std_WAVESHAPE_Makefile
new file mode 100644
index 0000000000..8456d654b9
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_WAVESHAPE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/WAVESHAPE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/WAVESHAPE/Makefile
+@@ -29,18 +29,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_convolve_Makefile b/rtcmix/patches/patch-insts_std_convolve_Makefile
new file mode 100644
index 0000000000..798c3ccfbd
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_convolve_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/convolve/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/convolve/Makefile
+@@ -25,18 +25,18 @@ fft.o: fft.h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_gravy_Makefile b/rtcmix/patches/patch-insts_std_gravy_Makefile
new file mode 100644
index 0000000000..80a7cc1efb
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_gravy_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/gravy/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/gravy/Makefile
+@@ -23,18 +23,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_mrotate_Makefile b/rtcmix/patches/patch-insts_std_mrotate_Makefile
new file mode 100644
index 0000000000..befdc82f13
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_mrotate_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/mrotate/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/mrotate/Makefile
+@@ -23,18 +23,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_numtest_Makefile b/rtcmix/patches/patch-insts_std_numtest_Makefile
new file mode 100644
index 0000000000..99706d3169
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_numtest_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/numtest/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/numtest/Makefile
+@@ -23,18 +23,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_rotate_Makefile b/rtcmix/patches/patch-insts_std_rotate_Makefile
new file mode 100644
index 0000000000..5f2cea4a5c
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_rotate_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/rotate/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/rotate/Makefile
+@@ -23,18 +23,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_sgran_Makefile b/rtcmix/patches/patch-insts_std_sgran_Makefile
new file mode 100644
index 0000000000..9af81f882a
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_sgran_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/sgran/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/sgran/Makefile
+@@ -26,18 +26,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_stgran_Makefile b/rtcmix/patches/patch-insts_std_stgran_Makefile
new file mode 100644
index 0000000000..1edb4dd876
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_stgran_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/stgran/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/stgran/Makefile
+@@ -26,18 +26,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_std_wow_Makefile b/rtcmix/patches/patch-insts_std_wow_Makefile
new file mode 100644
index 0000000000..409c2e92c8
--- /dev/null
+++ b/rtcmix/patches/patch-insts_std_wow_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/std/wow/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/std/wow/Makefile
+@@ -23,18 +23,18 @@ $(NAME): $(UGENS_H) $(CMIXOBJS) $(OBJS)
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MBANDEDWG_Makefile b/rtcmix/patches/patch-insts_stk_MBANDEDWG_Makefile
new file mode 100644
index 0000000000..3f499912b7
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MBANDEDWG_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MBANDEDWG/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MBANDEDWG/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MBLOWBOTL_Makefile b/rtcmix/patches/patch-insts_stk_MBLOWBOTL_Makefile
new file mode 100644
index 0000000000..3b3120dd88
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MBLOWBOTL_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MBLOWBOTL/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MBLOWBOTL/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MBLOWHOLE_Makefile b/rtcmix/patches/patch-insts_stk_MBLOWHOLE_Makefile
new file mode 100644
index 0000000000..9fd9c2dca0
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MBLOWHOLE_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MBLOWHOLE/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MBLOWHOLE/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MBOWED_Makefile b/rtcmix/patches/patch-insts_stk_MBOWED_Makefile
new file mode 100644
index 0000000000..5bf44baaa1
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MBOWED_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MBOWED/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MBOWED/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MBRASS_Makefile b/rtcmix/patches/patch-insts_stk_MBRASS_Makefile
new file mode 100644
index 0000000000..14a922e6f6
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MBRASS_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MBRASS/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MBRASS/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MCLAR_Makefile b/rtcmix/patches/patch-insts_stk_MCLAR_Makefile
new file mode 100644
index 0000000000..f66240de57
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MCLAR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MCLAR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MCLAR/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MMESH2D_Makefile b/rtcmix/patches/patch-insts_stk_MMESH2D_Makefile
new file mode 100644
index 0000000000..3155c5e4cc
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MMESH2D_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MMESH2D/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MMESH2D/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MMODALBAR_Makefile b/rtcmix/patches/patch-insts_stk_MMODALBAR_Makefile
new file mode 100644
index 0000000000..81ddf55d5d
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MMODALBAR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MMODALBAR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MMODALBAR/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MSAXOFONY_Makefile b/rtcmix/patches/patch-insts_stk_MSAXOFONY_Makefile
new file mode 100644
index 0000000000..64708fd8e1
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MSAXOFONY_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MSAXOFONY/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MSAXOFONY/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MSHAKERS_Makefile b/rtcmix/patches/patch-insts_stk_MSHAKERS_Makefile
new file mode 100644
index 0000000000..bedcbb902f
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MSHAKERS_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MSHAKERS/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MSHAKERS/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_stk_MSITAR_Makefile b/rtcmix/patches/patch-insts_stk_MSITAR_Makefile
new file mode 100644
index 0000000000..8f9d08094b
--- /dev/null
+++ b/rtcmix/patches/patch-insts_stk_MSITAR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/stk/MSITAR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/stk/MSITAR/Makefile
+@@ -33,18 +33,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_vccm_COMBFILT_Makefile b/rtcmix/patches/patch-insts_vccm_COMBFILT_Makefile
new file mode 100644
index 0000000000..1c598cf042
--- /dev/null
+++ b/rtcmix/patches/patch-insts_vccm_COMBFILT_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/vccm/COMBFILT/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/vccm/COMBFILT/Makefile
+@@ -25,18 +25,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_vccm_HAR_Makefile b/rtcmix/patches/patch-insts_vccm_HAR_Makefile
new file mode 100644
index 0000000000..77b963ae78
--- /dev/null
+++ b/rtcmix/patches/patch-insts_vccm_HAR_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/vccm/HAR/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/vccm/HAR/Makefile
+@@ -25,18 +25,18 @@ $(OBJS): $(INSTRUMENT_H) HOLD.h FADE_HOL
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_vccm_MIXN_Makefile b/rtcmix/patches/patch-insts_vccm_MIXN_Makefile
new file mode 100644
index 0000000000..35ed001009
--- /dev/null
+++ b/rtcmix/patches/patch-insts_vccm_MIXN_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/vccm/MIXN/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/vccm/MIXN/Makefile
+@@ -24,18 +24,18 @@ $(OBJS): $(INSTRUMENT_H) $(OBJLIB_H) $(N
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_vccm_RAP_Makefile b/rtcmix/patches/patch-insts_vccm_RAP_Makefile
new file mode 100644
index 0000000000..c0cbd7ea79
--- /dev/null
+++ b/rtcmix/patches/patch-insts_vccm_RAP_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/vccm/RAP/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/vccm/RAP/Makefile
+@@ -25,18 +25,18 @@ $(OBJS): $(INSTRUMENT_H) RECORD.h PLAY.h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-insts_vccm_vMIX_Makefile b/rtcmix/patches/patch-insts_vccm_vMIX_Makefile
new file mode 100644
index 0000000000..0d0320d3d2
--- /dev/null
+++ b/rtcmix/patches/patch-insts_vccm_vMIX_Makefile
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- insts/vccm/vMIX/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ insts/vccm/vMIX/Makefile
+@@ -25,18 +25,18 @@ $(OBJS): $(INSTRUMENT_H) $(NAME).h
+ install: dso_install
+ 
+ dso_install: lib$(NAME).so
+-	$(INSTALL) $(CURDIR)/lib$(NAME).so $(LIBDESTDIR)
++	$(INSTALL) $(CURDIR)/lib$(NAME).so $(DESTDIR)/$(LIBDIR)
+ 
+ standalone_install: standalone
+-	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)
++	$(INSTALL) $(CURDIR)/$(NAME) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall: dso_uninstall standalone_uninstall
+ 
+ dso_uninstall:
+-	$(RM) $(LIBDESTDIR)/lib$(NAME).so
++	$(RM) $(DESTDIR)/$(LIBDIR)/lib$(NAME).so
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/$(NAME)
++	$(RM) $(DESTDIR)/$(BINDIR)/$(NAME)
+ 
+ clean:
+ 	$(RM) $(OBJS) $(PROGS)
diff --git a/rtcmix/patches/patch-makefile.conf.in b/rtcmix/patches/patch-makefile.conf.in
new file mode 100644
index 0000000000..0ac16b91c8
--- /dev/null
+++ b/rtcmix/patches/patch-makefile.conf.in
@@ -0,0 +1,100 @@
+$NetBSD$
+
+--- makefile.conf.in.orig	2015-10-03 21:09:58.000000000 +0000
++++ makefile.conf.in
+@@ -17,13 +17,10 @@ CMIXDIR = @CMIXDIR@
+ # This file is generated by the configure script.
+ include $(CMIXDIR)/defs.conf
+ 
+-# The dir that will contain the instrument dynamic shared objects
+-LIBDESTDIR = $(CMIXDIR)/shlib
+-
+ # This file contains site-specific settings.  Anything that's
+ # uncommented in this file will override the same definition
+ # made inside defs.conf by the configure script. The same goes
+-# for any other symbol defined above (such as LIBDESTDIR).
++# for any other symbol defined above.
+ include $(CMIXDIR)/site.conf
+ 
+ # The path to this file
+@@ -31,11 +28,9 @@ MAKEFILE_CONF = $(CMIXDIR)/makefile.conf
+ 
+ SOUND_DRIVER = -D$(AUDIODRIVER)
+ 
+-LIBDIR = $(CMIXDIR)/lib
+-DESTDIR = $(CMIXDIR)/bin
+-BINDIR = $(DESTDIR)
+ INCLUDEDIR = $(CMIXDIR)/include
+ 
++BLIBDIR = $(CMIXDIR)/lib
+ SRCDIR = $(CMIXDIR)/src
+ AUDIODIR = $(SRCDIR)/audio
+ CONFDIR = $(SRCDIR)/conf
+@@ -180,6 +175,20 @@ ifeq ($(ARCH),FREEBSD)
+   SHLIB_SUFFIX = so
+ endif
+ 
++# -- NetBSD --------------------------------------------------
++ifeq ($(ARCH),NETBSD)
++  ARCHFLAGS = -DNETBSD $(ARCH_BITFLAGS) -DSTANDALONE -I/usr/X11R7/include
++  ARCH_RTLDFLAGS = -Wl,-R$(LIBDIR),-R/usr/X11R7
++  CC = gcc
++  CXX = g++
++  LD = ld
++  MAKE = gmake
++  INSTALL = cp -f
++  RANLIB = touch
++  SHELL = /bin/sh
++  SHLIB_SUFFIX = so
++endif
++
+ # -- Any Standalone --------------------------------------------
+ ifeq ($(BUILDTYPE), STANDALONE)
+     ifeq ($(NPLAY_SUPPORT), TRUE)
+@@ -204,8 +213,8 @@ CXXFLAGS = $(IPHONE_CFLAGS) $(INCLUDES) 
+ # Platform-independent library flags
+ 
+ RTLIB = librtcmix.$(SHLIB_SUFFIX)
+-LIBRTCMIX = $(LIBDIR)/$(RTLIB)
+-RTLDFLAGS = -L$(LIBDIR) -lrtcmix -lgen
++LIBRTCMIX = $(BLIBDIR)/$(RTLIB)
++RTLDFLAGS = -L$(BLIBDIR) -lrtcmix -lgen
+ 
+ LIBGEN = libgen.$(SHLIB_SUFFIX)
+ # GENLIB macro is no longer needed because it is dynamically linked
+@@ -244,7 +253,7 @@ endif
+ ifeq ($(ARCH),SGI)
+   SYS_LDFLAGS = -lpthread -laudio -lm
+   DSO_LDFLAGS = $(SYS_LDFLAGS)
+-  SHARED_LDFLAGS = -shared -update_registry $(LIBDESTDIR)/so_locations
++  SHARED_LDFLAGS = -shared -update_registry $(LIBDIR)/so_locations
+   DYNAMIC_LDFLAGS = $(SHARED_LDFLAGS)
+   DYN = 
+ endif
+@@ -255,9 +264,16 @@ ifeq ($(ARCH),FREEBSD)
+   DYNAMIC_LDFLAGS = $(SHARED_LDFLAGS)
+   DYN = -rdynamic
+ endif
++ifeq ($(ARCH),NETBSD)
++  SYS_LDFLAGS += -pthread -lm -lfl -lossaudio
++  DSO_LDFLAGS = -export-dynamic $(SYS_LDFLAGS)
++  SHARED_LDFLAGS = -shared -Wl,-soname,$@
++  DYNAMIC_LDFLAGS = $(SHARED_LDFLAGS)
++  DYN = -rdynamic
++endif
+ 
+ LDFLAGS = $(ARCH_RTLDFLAGS) $(RTLDFLAGS)
+-SYSLIBS = $(ARCH_RTLDFLAGS) -L$(LIBDIR) -lgen $(SYS_LDFLAGS)
++SYSLIBS = $(ARCH_RTLDFLAGS) -L$(BLIBDIR) -lgen $(SYS_LDFLAGS)
+ 
+ # For benefit of inst makefiles that live outside CMIXDIR hierarchy
+ UGENS_H = $(CMIXDIR)/include/ugens.h
+@@ -269,7 +285,7 @@ PROFILE_O = $(CMIXDIR)/src/rtcmix/profil
+ # for disk-based insts
+ RTPROFILE_O = $(CMIXDIR)/src/rtcmix/rtprofile.o
+ 
+-CMIX_O = $(LIBDIR)/main.o $(LIBDIR)/RTcmixMain.o
++CMIX_O = $(BLIBDIR)/main.o $(BLIBDIR)/RTcmixMain.o
+ M_O =  $(PARSERDIR)/parse_with_minc.o
+ IMB_RTCMIX_O =
+ P_O =  $(PARSERDIR)/parse_with_perl.o
diff --git a/rtcmix/patches/patch-site.conf b/rtcmix/patches/patch-site.conf
new file mode 100644
index 0000000000..3b9d5057e8
--- /dev/null
+++ b/rtcmix/patches/patch-site.conf
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- site.conf.orig	2015-10-03 21:09:58.000000000 +0000
++++ site.conf
+@@ -26,9 +26,6 @@ IPHONE_TYPE = SIMULATOR
+ # If selecting "OPENFRAMEWORKS" then one of the OF_TYPEs has to be uncommented.
+ OF_TYPE = OSXAPP
+ 
+-# If you're building a binary package for OS X or Linux, uncomment this:
+-#PKG = TRUE
+-
+ 
+ #==============================================================
+ # Platform-specific settings
+@@ -40,10 +37,6 @@ OF_TYPE = OSXAPP
+ # -- Linux ----------------------------------------------------
+ ifeq ($(ARCH), LINUX)
+   OPT = -O2 -Wall -Wno-unused
+-  # for use when building binary pkg (currently unimplemented)
+-  ifeq ($(PKG), TRUE)
+-    LIBDESTDIR = /usr/local/src/rtcmix/shlib
+-  endif
+ endif
+ 
+ # -- Mac OS X -------------------------------------------------
+@@ -52,10 +45,6 @@ ifeq ($(ARCH), MACOSX)
+   # -- standalone ---------------------------------------------
+   ifeq ($(BUILDTYPE), STANDALONE)
+     OPT = -O2 -Wall -Wno-unused
+-    # for use when building binary pkg
+-    ifeq ($(PKG), TRUE)
+-      LIBDESTDIR = /Applications/rtcmix/shlib
+-    endif
+   endif
+ 
+   # -- MaxMSP -------------------------------------------------
+@@ -97,6 +86,11 @@ ifeq ($(ARCH), FREEBSD)
+   OPT = -O2 -Wall -Wno-unused
+ endif
+ 
++# -- NetBSD --------------------------------------------------
++ifeq ($(ARCH), NETBSD)
++  OPT = -O2 -Wall -Wno-unused
++endif
++
+ # -- SGI ------------------------------------------------------
+ ifeq ($(ARCH), SGI)
+   OPT = -O2 -Wall -Wno-unused
diff --git a/rtcmix/patches/patch-src_audio_AudioFileDevice.cpp b/rtcmix/patches/patch-src_audio_AudioFileDevice.cpp
new file mode 100644
index 0000000000..1bb58bd8ef
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_AudioFileDevice.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/audio/AudioFileDevice.cpp.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/AudioFileDevice.cpp
+@@ -11,7 +11,7 @@
+ #include <assert.h>
+ #include <errno.h>
+ #include <string.h>
+-#if defined(linux) || defined(MACOSX)
++#if defined(linux) || defined(MACOSX) || defined(NETBSD)
+ #include <unistd.h>
+ #endif
+ 
diff --git a/rtcmix/patches/patch-src_audio_Makefile b/rtcmix/patches/patch-src_audio_Makefile
new file mode 100644
index 0000000000..de0ef8d6e7
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_Makefile
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- src/audio/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/Makefile
+@@ -21,6 +21,14 @@ ifeq ($(ARCH),LINUX)
+ 			MultiPortOSSAudioDevice.o ALSAAudioDevice.o TestAudioDevice.o
+ endif
+ 
++ifeq ($(ARCH),NETBSD)
++# Add this to enable the TestAudioDevice class
++	CXXFLAGS += -DTEST_AUDIO_DEVICE
++
++	OBJECTS +=  OSSAudioDevice.o SinglePortOSSAudioDevice.o \
++			MultiPortOSSAudioDevice.o TestAudioDevice.o
++endif
++
+ ifeq ($(ARCH),MACOSX)
+    ifeq ($(BUILDTYPE), STANDALONE)
+ 		CXXFLAGS += -DOSX
diff --git a/rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.cpp b/rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.cpp
new file mode 100644
index 0000000000..e9b7d0ddd4
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.cpp
@@ -0,0 +1,32 @@
+$NetBSD$
+
+--- src/audio/MultiPortOSSAudioDevice.cpp.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/MultiPortOSSAudioDevice.cpp
+@@ -1,6 +1,6 @@
+ // MultiPortOSSAudioDevice.cpp
+ 
+-#if defined(LINUX)
++#if defined(LINUX) || defined(NETBSD)
+ 
+ #include "MultiPortOSSAudioDevice.h"
+ #include <sys/soundcard.h>
+@@ -161,11 +161,11 @@ MultiPortOSSAudioDevice::doSetQueueSize(
+ 	int fragSize = 0;
+ 	for (int dev = 0; dev < _devCount; ++dev) {
+ 		int fd = _devices[dev];
+-		if (::ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &sizeCode) == -1) {
++		if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &sizeCode) == -1) {
+ 			printf("ioctl(%d, SNDCTL_DSP_SETFRAGMENT, ...) returned -1\n",
+ 				   fd);
+ 		}
+-		if (::ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &fragSize) == -1) {
++		if (ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &fragSize) == -1) {
+ 			return error("OSS error while retrieving fragment size: ",
+ 						 strerror(errno));
+ 		}
+@@ -233,4 +233,4 @@ MultiPortOSSAudioDevice::closeDevice()
+ 	return status;
+ }
+ 
+-#endif	// LINUX
++#endif	// LINUX || NETBSD
diff --git a/rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.h b/rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.h
new file mode 100644
index 0000000000..711c82192a
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_MultiPortOSSAudioDevice.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- src/audio/MultiPortOSSAudioDevice.h.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/MultiPortOSSAudioDevice.h
+@@ -3,7 +3,7 @@
+ #ifndef _MULTI_PORT_OSS_AUDIO_DEVICE_H_
+ #define _MULTI_PORT_OSS_AUDIO_DEVICE_H_
+ 
+-#ifdef LINUX
++#if defined(LINUX) || defined(NETBSD)
+ 
+ #include "OSSAudioDevice.h"
+ 
+@@ -32,6 +32,6 @@ private:
+ 	int *_devices;
+ };
+ 
+-#endif	// LINUX
++#endif	// LINUX || NETBSD
+ 
+ #endif	// _MULTI_PORT_OSS_AUDIO_DEVICE_H_
diff --git a/rtcmix/patches/patch-src_audio_OSSAudioDevice.cpp b/rtcmix/patches/patch-src_audio_OSSAudioDevice.cpp
new file mode 100644
index 0000000000..14a8df4c3f
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_OSSAudioDevice.cpp
@@ -0,0 +1,112 @@
+$NetBSD$
+
+--- src/audio/OSSAudioDevice.cpp.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/OSSAudioDevice.cpp
+@@ -1,6 +1,6 @@
+ // OSSAudioDevice.cpp
+ 
+-#if defined(LINUX)
++#if defined(LINUX) || defined(NETBSD)
+ 
+ #include <math.h>
+ #include "OSSAudioDevice.h"
+@@ -72,7 +72,7 @@ int OSSAudioDevice::doStart()
+ {
+ 	// Get this now if user never set it.
+ 	if (_bufferSize == 0) {
+-		if (ioctl(SNDCTL_DSP_GETBLKSIZE, &_bufferSize) == -1) {
++		if (ioctl(device(), SNDCTL_DSP_GETBLKSIZE, &_bufferSize) == -1) {
+ 			return error("Error while retrieving block size.");
+ 		}
+ 	}
+@@ -90,7 +90,7 @@ OSSAudioDevice::setDeviceFormat(int dev,
+ 								int *chans, int srate)
+ {
+ 	int confirmedFormat = sampleFormat;
+-	if (::ioctl(dev, SNDCTL_DSP_SETFMT, &confirmedFormat))
++	if (ioctl(dev, SNDCTL_DSP_SETFMT, &confirmedFormat))
+ 		return error("OSS error while setting sample format: ", strerror(errno));
+ 	else if (confirmedFormat != sampleFormat)
+ 		return error("This sample format not supported by device.");
+@@ -101,7 +101,7 @@ OSSAudioDevice::setDeviceFormat(int dev,
+ 		return error("This device supports only mono and stereo");
+ 	}
+ #else
+-	if (::ioctl(dev, SOUND_PCM_WRITE_CHANNELS, &reqChans) == 0) {
++	if (ioctl(dev, SOUND_PCM_WRITE_CHANNELS, &reqChans) == 0) {
+ 		if (reqChans < *chans) {
+ 			PRINT0("OSSAudioDevice::setDeviceFormat:  Max device channel count is %d\n", reqChans);
+ 			return error("OSS device does not support this channel count");
+@@ -116,7 +116,7 @@ OSSAudioDevice::setDeviceFormat(int dev,
+ 		 	   strerror(errno));
+ 		// Try opening device in 8-channel mode
+ 		reqChans = 8;
+-		if (::ioctl(dev, SOUND_PCM_WRITE_CHANNELS, &reqChans) == 0) {
++		if (ioctl(dev, SOUND_PCM_WRITE_CHANNELS, &reqChans) == 0) {
+ 			PRINT0("OSSAudioDevice::setDeviceFormat:  Device forced channel count to %d\n", reqChans);
+ 			*chans = reqChans;
+ 		}
+@@ -130,7 +130,7 @@ OSSAudioDevice::setDeviceFormat(int dev,
+ #endif
+ 	{
+ 		int dsp_stereo = (reqChans == 2);
+-		if (::ioctl(dev, SNDCTL_DSP_STEREO, &dsp_stereo)
++		if (ioctl(dev, SNDCTL_DSP_STEREO, &dsp_stereo)
+ 			|| dsp_stereo != (reqChans == 2))
+ 		{
+ 			return error("OSS error while setting channel count: ",
+@@ -138,7 +138,7 @@ OSSAudioDevice::setDeviceFormat(int dev,
+ 		}
+ 	}
+ 	int dsp_speed = (int) srate;
+-	if (::ioctl(dev, SNDCTL_DSP_SPEED, &dsp_speed))
++	if (ioctl(dev, SNDCTL_DSP_SPEED, &dsp_speed))
+ 		return error("OSS error while setting sample rate: ", strerror(errno));
+ 	if (dsp_speed != (int) srate)
+ 		return error("Device does not support this sample rate");
+@@ -148,11 +148,6 @@ OSSAudioDevice::setDeviceFormat(int dev,
+ 	return 0;
+ }
+ 
+-int
+-OSSAudioDevice::ioctl(int req, void *argp) {
+-	return ::ioctl(device(), req, argp);
+-}
+-
+ static char zeroBuffer[32768];
+ 
+ void OSSAudioDevice::run()
+@@ -162,7 +157,7 @@ void OSSAudioDevice::run()
+ 	int ret;
+ 	PRINT1("OSSAudioDevice::run: top of loop\n");
+ 	while ((ret = waitForDevice(0)) == 0) {
+-		if (ioctl(playing ? SNDCTL_DSP_GETOSPACE : SNDCTL_DSP_GETISPACE,
++		if (ioctl(device(), playing ? SNDCTL_DSP_GETOSPACE : SNDCTL_DSP_GETISPACE,
+ 				  &info))
+ 		{
+ 			error("OSS error: ", strerror(errno));
+@@ -184,7 +179,7 @@ void OSSAudioDevice::run()
+ 		}
+ 		// Spin if device is paused
+ 		if (paused()) {
+-			ioctl(SNDCTL_DSP_POST, 0);
++			ioctl(device(), SNDCTL_DSP_POST, 0);
+ 			while (paused()) {
+ 				usleep(1000);
+ 			}
+@@ -196,7 +191,7 @@ void OSSAudioDevice::run()
+ 	
+ 		PRINT1("OSSAudioDevice::run: flushing...\n");
+ 		// Flush device.
+-		ioctl(SNDCTL_DSP_SYNC, 0);
++		ioctl(device(), SNDCTL_DSP_SYNC, 0);
+ 	}
+ 
+ 	// If we stopped due to callback being done, set the state so that the
+@@ -216,5 +211,5 @@ void OSSAudioDevice::run()
+ 	PRINT1("OSSAudioDevice::run: thread exiting\n");
+ }
+ 
+-#endif	// LINUX
++#endif	// LINUX || NETBSD
+ 
diff --git a/rtcmix/patches/patch-src_audio_OSSAudioDevice.h b/rtcmix/patches/patch-src_audio_OSSAudioDevice.h
new file mode 100644
index 0000000000..d6c2e138ff
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_OSSAudioDevice.h
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- src/audio/OSSAudioDevice.h.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/OSSAudioDevice.h
+@@ -3,7 +3,7 @@
+ #ifndef _OSS_AUDIO_DEVICE_H_
+ #define _OSS_AUDIO_DEVICE_H_
+ 
+-#ifdef LINUX
++#if defined(LINUX) || defined(NETBSD)
+ 
+ #include "ThreadedAudioDevice.h"
+ 
+@@ -25,7 +25,6 @@ protected:
+ 	virtual int	doGetFrames(void *frameBuffer, int frameCount)=0;
+ 	virtual int	doSendFrames(void *frameBuffer, int frameCount)=0;
+ 	// Local methods
+-	int			ioctl(int req, void *argp);
+ 	int			bufferSize() const { return _bufferSize; }
+ protected:
+ 	// OSS device-level virtual implementation
+@@ -40,6 +39,6 @@ protected:
+ 	int		_bufferSize;
+ };
+ 
+-#endif	// LINUX
++#endif	// LINUX || NETBSD
+ 
+ #endif	// _OSS_AUDIO_DEVICE_H_
diff --git a/rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.cpp b/rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.cpp
new file mode 100644
index 0000000000..947a333a34
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.cpp
@@ -0,0 +1,33 @@
+$NetBSD$
+
+--- src/audio/SinglePortOSSAudioDevice.cpp.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/SinglePortOSSAudioDevice.cpp
+@@ -1,6 +1,6 @@
+ // SinglePortOSSAudioDevice.cpp
+ 
+-#if defined(LINUX)
++#if defined(LINUX) || defined(NETBSD)
+ 
+ #include "SinglePortOSSAudioDevice.h"
+ #include <sys/soundcard.h>
+@@ -124,11 +124,11 @@ SinglePortOSSAudioDevice::doSetQueueSize
+ 		   reqCount, reqQueueBytes);
+ 	int queuecode = ((int) (log(reqQueueBytes) / log(2.0)));
+ 	int sizeCode = (reqCount << 16) | (queuecode & 0x0000ffff);
+-	if (ioctl(SNDCTL_DSP_SETFRAGMENT, &sizeCode) == -1) {
+-		printf("ioctl(SNDCTL_DSP_SETFRAGMENT, ...) returned -1\n");
++	if (ioctl(device(), SNDCTL_DSP_SETFRAGMENT, &sizeCode) == -1) {
++		printf("ioctl(device(), SNDCTL_DSP_SETFRAGMENT, ...) returned -1\n");
+ 	}
+ 	int fragSize = 0;
+-	if (ioctl(SNDCTL_DSP_GETBLKSIZE, &fragSize) == -1) {
++	if (ioctl(device(), SNDCTL_DSP_GETBLKSIZE, &fragSize) == -1) {
+ 		return error("OSS error while retrieving fragment size: ", strerror(errno));
+ 	}
+ 	PRINT0("SinglePortOSSAudioDevice::doSetQueueSize: OSS returned fragment size of %d bytes\n",
+@@ -184,4 +184,4 @@ SinglePortOSSAudioDevice::closeDevice()
+ 	return status;
+ }
+ 
+-#endif	// LINUX
++#endif	// LINUX || NETBSD
diff --git a/rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.h b/rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.h
new file mode 100644
index 0000000000..92839b9cd6
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_SinglePortOSSAudioDevice.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- src/audio/SinglePortOSSAudioDevice.h.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/SinglePortOSSAudioDevice.h
+@@ -3,7 +3,7 @@
+ #ifndef _SINGLE_PORT_OSS_AUDIO_DEVICE_H_
+ #define _SINGLE_PORT_OSS_AUDIO_DEVICE_H_
+ 
+-#ifdef LINUX
++#if defined(LINUX) || defined(NETBSD)
+ 
+ #include "OSSAudioDevice.h"
+ 
+@@ -28,6 +28,6 @@ protected:
+ 	virtual int closeDevice();
+ };
+ 
+-#endif	// LINUX
++#endif	// LINUX || NETBSD
+ 
+ #endif	// _SINGLE_PORT_OSS_AUDIO_DEVICE_H_
diff --git a/rtcmix/patches/patch-src_audio_audio__dev__creator.cpp b/rtcmix/patches/patch-src_audio_audio__dev__creator.cpp
new file mode 100644
index 0000000000..79e3a7a800
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_audio__dev__creator.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/audio/audio_dev_creator.cpp.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/audio_dev_creator.cpp
+@@ -8,7 +8,7 @@
+ #include <ugens.h>
+ #include <stdio.h>
+ 
+-#ifdef LINUX
++#if defined(LINUX) || defined(NETBSD)
+ #include "SinglePortOSSAudioDevice.h"
+ #include "MultiPortOSSAudioDevice.h"
+ #include "TestAudioDevice.h"
+@@ -59,7 +59,7 @@ static const AudioDevEntry s_AudioDevEnt
+ #ifdef ALSA
+ 	{ &ALSAAudioDevice::recognize, &ALSAAudioDevice::create },
+ #endif
+-#ifdef LINUX
++#if defined(LINUX) || defined(NETBSD)
+ #ifdef TEST_AUDIO_DEVICE
+ 	{ &TestAudioDevice::recognize, &TestAudioDevice::create },
+ #endif
diff --git a/rtcmix/patches/patch-src_audio_sndlibsupport.h b/rtcmix/patches/patch-src_audio_sndlibsupport.h
new file mode 100644
index 0000000000..5ae8d1ff0c
--- /dev/null
+++ b/rtcmix/patches/patch-src_audio_sndlibsupport.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/audio/sndlibsupport.h.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/audio/sndlibsupport.h
+@@ -10,7 +10,7 @@
+ #include <endian.h>      /* so that sndlib.h will get host byte-order right */
+ #elif defined(MACOSX)
+ #include <machine/endian.h>
+-#elif defined(SGI)
++#elif defined(SGI) || defined(NETBSD)
+ #include <sys/endian.h>
+ #elif defined(FREEBSD)
+ #include <machine/endian.h>
diff --git a/rtcmix/patches/patch-src_control_datafile_Makefile b/rtcmix/patches/patch-src_control_datafile_Makefile
new file mode 100644
index 0000000000..b44481113e
--- /dev/null
+++ b/rtcmix/patches/patch-src_control_datafile_Makefile
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- src/control/datafile/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/control/datafile/Makefile
+@@ -22,10 +22,10 @@ depend:
+ -include depend
+ 
+ install: all
+-	$(INSTALL) $(CONNLIB) $(LIBDESTDIR)
++	$(INSTALL) $(CONNLIB) $(DESTDIR)/$(LIBDIR)
+ 
+ uninstall:
+-	$(RM) $(LIBDESTDIR)/$(CONNLIB)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(CONNLIB)
+ 
+ clean:
+ 	$(RM) *.o $(CONNLIB)
diff --git a/rtcmix/patches/patch-src_control_display_Makefile b/rtcmix/patches/patch-src_control_display_Makefile
new file mode 100644
index 0000000000..9fb91e0c36
--- /dev/null
+++ b/rtcmix/patches/patch-src_control_display_Makefile
@@ -0,0 +1,33 @@
+$NetBSD$
+
+--- src/control/display/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/control/display/Makefile
+@@ -16,7 +16,7 @@ ifeq ($(ARCH), MACOSX)
+    # when running from elsewhere, you *must* hardcode path.
+    ifeq ($(PKG), TRUE)
+    else
+-      CXXFLAGS += -DAPP_PATH=\"$(DESTDIR)/$(APP).app\"
++      CXXFLAGS += -DAPP_PATH=\"$(DESTDIR)/$(BINDIR)/$(APP).app\"
+    endif
+ else
+    OBJS += XDisplay.o
+@@ -48,15 +48,15 @@ depend:
+ -include depend
+ 
+ install: all
+-	$(INSTALL) $(LIBDISPLAY) $(LIBDESTDIR)
++	$(INSTALL) $(LIBDISPLAY) $(DESTDIR)/$(LIBDIR)
+ ifeq ($(ARCH), MACOSX)
+-	ditto $(APP)/build/Release/$(APP).app $(DESTDIR)/$(APP).app
++	ditto $(APP)/build/Release/$(APP).app $(DESTDIR)/$(BINDIR)/$(APP).app
+ endif
+ 
+ uninstall:
+-	$(RM) $(LIBDESTDIR)/$(LIBDISPLAY)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(LIBDISPLAY)
+ ifeq ($(ARCH), MACOSX)
+-	$(RM) -r $(DESTDIR)/$(APP).app
++	$(RM) -r $(DESTDIR)/$(BINDIR)/$(APP).app
+ endif
+ 
+ clean:
diff --git a/rtcmix/patches/patch-src_control_maxmsp_Makefile b/rtcmix/patches/patch-src_control_maxmsp_Makefile
new file mode 100644
index 0000000000..a95c46060d
--- /dev/null
+++ b/rtcmix/patches/patch-src_control_maxmsp_Makefile
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- src/control/maxmsp/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/control/maxmsp/Makefile
+@@ -26,10 +26,10 @@ inletglue.o: inletglue.cpp RTInletPField
+ 	$(CXX) $(CXXFLAGS) -c -o inletglue.o inletglue.cpp
+ 
+ install: all
+-#	$(INSTALL) $(LIBINLET) $(LIBDIR)
++#	$(INSTALL) $(LIBINLET) $(BLIBDIR)
+ 
+ uninstall:
+-#	$(RM) $(LIBDIR)/$(LIBINLET)
++#	$(RM) $(BLIBDIR)/$(LIBINLET)
+ 
+ clean:
+ 	$(RM) *.o $(LIBINLET)
diff --git a/rtcmix/patches/patch-src_control_midi_Makefile b/rtcmix/patches/patch-src_control_midi_Makefile
new file mode 100644
index 0000000000..45aba61cab
--- /dev/null
+++ b/rtcmix/patches/patch-src_control_midi_Makefile
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- src/control/midi/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/control/midi/Makefile
+@@ -36,10 +36,10 @@ depend:
+ -include depend
+ 
+ install: all
+-	$(INSTALL) $(LIBMIDI) $(LIBDESTDIR)
++	$(INSTALL) $(LIBMIDI) $(DESTDIR)/$(LIBDIR)
+ 
+ uninstall:
+-	$(RM) $(LIBDESTDIR)/$(LIBMIDI)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(LIBMIDI)
+ 
+ clean:
+ 	( cd portmidi; $(MAKE) $(MFLAGS) clean; )
diff --git a/rtcmix/patches/patch-src_control_mouse_Makefile b/rtcmix/patches/patch-src_control_mouse_Makefile
new file mode 100644
index 0000000000..4011dd9afc
--- /dev/null
+++ b/rtcmix/patches/patch-src_control_mouse_Makefile
@@ -0,0 +1,33 @@
+$NetBSD$
+
+--- src/control/mouse/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/control/mouse/Makefile
+@@ -16,7 +16,7 @@ ifeq ($(ARCH), MACOSX)
+    # when running from elsewhere, you *must* hardcode path.
+    ifeq ($(PKG), TRUE)
+    else
+-      CXXFLAGS += -DAPP_PATH=\"$(DESTDIR)/$(APP).app\"
++      CXXFLAGS += -DAPP_PATH=\"$(DESTDIR)/$(BINDIR)/$(APP).app\"
+    endif
+ else
+    OBJS += XMouse.o
+@@ -56,15 +56,15 @@ depend:
+ -include depend
+ 
+ install: all
+-	$(INSTALL) $(LIBMOUSE) $(LIBDESTDIR)
++	$(INSTALL) $(LIBMOUSE) $(DESTDIR)/$(LIBDIR)
+ ifeq ($(ARCH), MACOSX)
+-	ditto $(APP)/build/Release/$(APP).app $(DESTDIR)/$(APP).app
++	ditto $(APP)/build/Release/$(APP).app $(DESTDIR)/$(BINDIR)/$(APP).app
+ endif
+ 
+ uninstall:
+-	$(RM) $(LIBDESTDIR)/$(LIBMOUSE)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(LIBMOUSE)
+ ifeq ($(ARCH), MACOSX)
+-	$(RM) -r $(DESTDIR)/$(APP).app
++	$(RM) -r $(DESTDIR)/$(BINDIR)/$(APP).app
+ endif
+ 
+ clean:
diff --git a/rtcmix/patches/patch-src_control_osc_Makefile b/rtcmix/patches/patch-src_control_osc_Makefile
new file mode 100644
index 0000000000..85d27ca24d
--- /dev/null
+++ b/rtcmix/patches/patch-src_control_osc_Makefile
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- src/control/osc/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/control/osc/Makefile
+@@ -22,10 +22,10 @@ depend:
+ -include depend
+ 
+ install: all
+-	$(INSTALL) $(LIBOSC) $(LIBDESTDIR)
++	$(INSTALL) $(LIBOSC) $(DESTDIR)/$(LIBDIR)
+ 
+ uninstall:
+-	$(RM) $(LIBDESTDIR)/$(LIBOSC)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(LIBOSC)
+ 
+ clean:
+ 	$(RM) *.o $(LIBOSC)
diff --git a/rtcmix/patches/patch-src_control_pfbus_Makefile b/rtcmix/patches/patch-src_control_pfbus_Makefile
new file mode 100644
index 0000000000..c47348eec4
--- /dev/null
+++ b/rtcmix/patches/patch-src_control_pfbus_Makefile
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- src/control/pfbus/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/control/pfbus/Makefile
+@@ -33,15 +33,15 @@ depend:
+ 
+ install: all
+ ifeq ($(BUILDTYPE), STANDALONE)
+-	$(INSTALL) $(CONNLIB) $(LIBDESTDIR)
++	$(INSTALL) $(CONNLIB) $(DESTDIR)/$(LIBDIR)
+ else
+ endif
+ 
+ uninstall:
+-	$(RM) $(LIBDESTDIR)/$(CONNLIB)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(CONNLIB)
+ 
+ clean:
+-	$(RM) *.o *.so $(LIBDESTDIR)/$(CONNLIB) $(CONNLIB)
++	$(RM) *.o *.so $(DESTDIR)/$(LIBDIR)/$(CONNLIB) $(CONNLIB)
+ 
+ cleanall: clean
+ 	$(RM) depend
diff --git a/rtcmix/patches/patch-src_parser_Makefile b/rtcmix/patches/patch-src_parser_Makefile
new file mode 100644
index 0000000000..4e4dcf93f6
--- /dev/null
+++ b/rtcmix/patches/patch-src_parser_Makefile
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/parser/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/parser/Makefile
+@@ -34,7 +34,7 @@ parse_with_minc.o: parse_with_minc.c rtc
+ 	$(CC) $(CFLAGS) -c parse_with_minc.c
+ 
+ parse_with_perl.o: parse_with_perl.c rtcmix_parse.h
+-	$(CC) $(CFLAGS) $(PERL_CCFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c parse_with_perl.c
++	$(CC) $(CFLAGS) $(PERL_CCFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c parse_with_perl.c
+ 
+ parse_with_python.o: parse_with_python.c rtcmix_parse.h
+ 	$(CC) $(CFLAGS) $(PYTHON_CCFLAGS) $(PYDEF) -c parse_with_python.c
diff --git a/rtcmix/patches/patch-src_parser_perl_Makefile b/rtcmix/patches/patch-src_parser_perl_Makefile
new file mode 100644
index 0000000000..9dc1b6b239
--- /dev/null
+++ b/rtcmix/patches/patch-src_parser_perl_Makefile
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/parser/perl/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/parser/perl/Makefile
+@@ -21,13 +21,13 @@ $(EXT_FILE): $(XS_DIR)/$(XS_FILE) $(XS_D
+ 
+ install: all
+ 	@echo "making install..."	
+-	@$(INSTALL) $(XS_DIR)/$(PM_FILE) $(LIBDESTDIR)
+-	@$(INSTALL) $(EXT_FILE) $(LIBDESTDIR)
++	@$(INSTALL) $(XS_DIR)/$(PM_FILE) $(DESTDIR)/$(LIBDIR)
++	@$(INSTALL) $(EXT_FILE) $(DESTDIR)/$(LIBDIR)
+ 
+ uninstall:
+ 	@echo "making uninstall..."	
+-	$(RM) $(LIBDESTDIR)/$(PM_FILE)
+-	$(RM) $(LIBDESTDIR)/$(EXT_NAME)$(XT_SUFFIX)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(PM_FILE)
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(EXT_NAME)$(XT_SUFFIX)
+ 
+ clean:
+ 	@if (test -f $(XS_DIR)/Makefile) then \
diff --git a/rtcmix/patches/patch-src_rtcmix_Makefile b/rtcmix/patches/patch-src_rtcmix_Makefile
new file mode 100644
index 0000000000..9beed6d262
--- /dev/null
+++ b/rtcmix/patches/patch-src_rtcmix_Makefile
@@ -0,0 +1,127 @@
+$NetBSD$
+
+--- src/rtcmix/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/rtcmix/Makefile
+@@ -221,21 +221,21 @@ else
+ 	endif
+ endif
+ 
+-# This lets me compile without copying to LIBDIR
++# This lets me compile without copying to BLIBDIR
+ targets: $(TARGETS)
+ 
+ ifeq ($(BUILDTYPE), STANDALONE)
+   all: $(TARGETS)
+-		$(INSTALL) main.o $(LIBDIR)
+-		$(INSTALL) RTcmixMain.o $(LIBDIR)
+-		$(INSTALL) RTsockfuncs.o $(LIBDIR)
++		$(INSTALL) main.o $(BLIBDIR)
++		$(INSTALL) RTcmixMain.o $(BLIBDIR)
++		$(INSTALL) RTsockfuncs.o $(BLIBDIR)
+   ifeq ($(PERL_SUPPORT), TRUE)
+-		$(INSTALL) pRTcmix.o $(LIBDIR)
++		$(INSTALL) pRTcmix.o $(BLIBDIR)
+   endif
+   ifeq ($(PYTHON_SUPPORT), TRUE)
+-		$(INSTALL) pyRTcmix.o $(LIBDIR)
++		$(INSTALL) pyRTcmix.o $(BLIBDIR)
+   endif
+-		$(INSTALL) $(RTLIB) $(LIBDIR)
++		$(INSTALL) $(RTLIB) $(BLIBDIR)
+ else
+   all: $(TARGETS)
+ endif
+@@ -287,16 +287,16 @@ ifeq ($(BUILDTYPE), $(filter $(BUILDTYPE
+ endif
+ 
+ loader.o: loader.cpp
+-	$(CXX) $(CFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c loader.cpp
++	$(CXX) $(CFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c loader.cpp
+ 
+ connection.o: connection.cpp
+-	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c connection.cpp
++	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c connection.cpp
+ 
+ addcheckfunc.o: addcheckfunc.cpp
+-	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c addcheckfunc.cpp
++	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c addcheckfunc.cpp
+ 
+ RTcmix.o: RTcmix.cpp
+-	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c RTcmix.cpp
++	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c RTcmix.cpp
+ 
+ intraverse.o: intraverse.cpp
+ 	$(CXX) $(CXXFLAGS) -DRT_THREAD_COUNT=$(THREAD_COUNT) -c intraverse.cpp
+@@ -307,13 +307,13 @@ $(RTLIB): depend $(COMMON_OBJS) $(LIBMIN
+ endif
+ 
+ MMPrint.o: MMPrint.cpp MMPrint.h
+-	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c $< -o $@
++	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c $< -o $@
+ 
+ Option.o: Option.cpp Option.h
+-	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c $< -o $@
++	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c $< -o $@
+ 
+ PFBusData.o: PFBusData.cpp PFBusData.h
+-	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDESTDIR)\" -c $< -o $@
++	$(CXX) $(CXXFLAGS) -DSHAREDLIBDIR=\"$(LIBDIR)\" -c $< -o $@
+ 
+ $(MIX_INST):	
+ 	(cd ../../insts/base/MIX; make all)
+@@ -440,29 +440,41 @@ install:	standalone_install
+ 
+ endif
+ 
+-
+ standalone_install: all
+-	@if test ! -d $(DESTDIR); then mkdir $(DESTDIR); fi;
+-	$(INSTALL) MIX $(DESTDIR)/CMIX
++	@if test ! -d $(DESTDIR)/$(BINDIR); then mkdir -p $(DESTDIR)/$(BINDIR); fi;
++	@if test ! -d $(DESTDIR)/$(LIBDIR); then mkdir -p $(DESTDIR)/$(LIBDIR); fi;
++	$(INSTALL) MIX $(DESTDIR)/$(BINDIR)/CMIX
++	$(INSTALL) main.o $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) RTcmixMain.o $(DESTDIR)/$(LIBDIR)
++	$(INSTALL) RTsockfuncs.o $(DESTDIR)/$(LIBDIR)
+ ifeq ($(PERL_SUPPORT), TRUE)
+-	$(INSTALL) PMIX $(DESTDIR)/PCMIX
++	$(INSTALL) PMIX $(DESTDIR)/$(BINDIR)/PCMIX
++	$(INSTALL) pRTcmix.o $(DESTDIR)/$(LIBDIR)
+ endif
+ ifeq ($(PYTHON_SUPPORT), TRUE)
+-	$(INSTALL) PYMIX $(DESTDIR)/PYCMIX
++	$(INSTALL) PYMIX $(DESTDIR)/$(BINDIR)/PYCMIX
++	$(INSTALL) pyRTcmix.o $(DESTDIR)/$(LIBDIR)
+ endif
++	$(INSTALL) $(RTLIB) $(DESTDIR)/$(LIBDIR)
+ 
+ uninstall: standalone_uninstall
+-	$(RM) $(LIBDIR)/$(RTLIB)
+-	$(RM) $(LIBDIR)/main.o
+-	$(RM) $(LIBDIR)/RTcmixMain.o
+-	$(RM) $(LIBDIR)/RTsockfuncs.o
+-	$(RM) $(LIBDIR)/pRTcmix.o
+-	$(RM) $(LIBDIR)/pyRTcmix.o
++	$(RM) $(BLIBDIR)/$(RTLIB)
++	$(RM) $(BLIBDIR)/main.o
++	$(RM) $(BLIBDIR)/RTcmixMain.o
++	$(RM) $(BLIBDIR)/RTsockfuncs.o
++	$(RM) $(BLIBDIR)/pRTcmix.o
++	$(RM) $(BLIBDIR)/pyRTcmix.o
+ 
+ standalone_uninstall:
+-	$(RM) $(DESTDIR)/CMIX
+-	$(RM) $(DESTDIR)/PCMIX
+-	$(RM) $(DESTDIR)/PYCMIX
++	$(RM) $(DESTDIR)/$(BINDIR)/CMIX
++	$(RM) $(DESTDIR)/$(BINDIR)/PCMIX
++	$(RM) $(DESTDIR)/$(BINDIR)/PYCMIX
++	$(RM) $(DESTDIR)/$(LIBDIR)/$(RTLIB)
++	$(RM) $(DESTDIR)/$(LIBDIR)/main.o
++	$(RM) $(DESTDIR)/$(LIBDIR)/RTcmixMain.o
++	$(RM) $(DESTDIR)/$(LIBDIR)/RTsockfuncs.o
++	$(RM) $(DESTDIR)/$(LIBDIR)/pRTcmix.o
++	$(RM) $(DESTDIR)/$(LIBDIR)/pyRTcmix.o
+ 
+ clean:
+ 	(cd heap; $(MAKE) $(MFLAGS) clean;)
diff --git a/rtcmix/patches/patch-src_rtcmix_load__utils.c b/rtcmix/patches/patch-src_rtcmix_load__utils.c
new file mode 100644
index 0000000000..5103954250
--- /dev/null
+++ b/rtcmix/patches/patch-src_rtcmix_load__utils.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/rtcmix/load_utils.c.orig	2015-10-03 21:09:58.000000000 +0000
++++ src/rtcmix/load_utils.c
+@@ -9,7 +9,7 @@
+ 
+ #include "load_utils.h"
+ 
+-#if (defined(MACOSX) && !defined(JAGUAR)) || defined(LINUX)
++#if (defined(MACOSX) && !defined(JAGUAR)) || defined(LINUX) || defined(NETBSD)
+ 
+ #include <dlfcn.h>
+ 
diff --git a/rtcmix/patches/patch-utils_Makefile b/rtcmix/patches/patch-utils_Makefile
new file mode 100644
index 0000000000..bf9190e646
--- /dev/null
+++ b/rtcmix/patches/patch-utils_Makefile
@@ -0,0 +1,54 @@
+$NetBSD$
+
+--- utils/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ utils/Makefile
+@@ -13,8 +13,8 @@ OPTION_O = ../src/rtcmix/Option.o
+ LIBCONF = ../src/conf/libconf.a
+ 
+ # MIDI libraries for SETUP program
+-PTLIB = ../src/control/midi/portmidi/porttime/libporttime.a
+ ifeq ($(ARCH), LINUX)
++	PTLIB = ../src/control/midi/portmidi/porttime/libporttime.a
+ 	ifeq ($(AUDIODRIVER), ALSA)
+ 		PMLIB = ../src/control/midi/portmidi/pm_linux/libportmidi.a
+ 		MIDISYSLIB = -lasound -lpthread
+@@ -22,6 +22,7 @@ ifeq ($(ARCH), LINUX)
+ 	endif
+ endif
+ ifeq ($(ARCH), MACOSX)
++	PTLIB = ../src/control/midi/portmidi/porttime/libporttime.a
+ 	PMLIB = ../src/control/midi/portmidi/pm_mac/libportmidi.a
+ 	MIDISYSLIB = -framework CoreFoundation -framework CoreAudio -framework CoreMIDI
+ endif
+@@ -74,26 +75,26 @@ install: all
+ ifneq ($(strip $(PROGS)),)       # do only if PROGS is nonempty
+ 	@for PROG in $(PROGS); \
+ 	do \
+-	  ( $(INSTALL) $(CMIXDIR)/utils/$$PROG $(DESTDIR); ) \
++	  ( $(INSTALL) $(CMIXDIR)/utils/$$PROG $(DESTDIR)/$(BINDIR); ) \
+ 	done
+ endif
+-	@cd $(DESTDIR); if test -f $(PLAY); then ln -fs $(PLAY) play; fi
++#	@cd $(DESTDIR)/$(BINDIR); if test -f $(PLAY); then ln -fs $(PLAY) play; fi
+ 	@cd head; $(MAKE) $(MFLAGS) install
+ 	@cd resample; $(MAKE) $(MFLAGS) install
+ 
+ install_scripts::
+ 	@echo "installing scripts..."	
+-	@cd scripts; $(INSTALL) *[1,2]* $(DESTDIR)
++	@cd scripts; $(INSTALL) *[1,2]* $(DESTDIR)/$(BINDIR)
+ 
+ uninstall:
+ 	@echo "making uninstall..."	
+ ifneq ($(strip $(PROGS)),)       # do only if PROGS is nonempty
+ 	@for PROG in $(PROGS); \
+ 	do \
+-	  ( $(RM) $(DESTDIR)/$$PROG; ) \
++	  ( $(RM) $(DESTDIR)/$(BINDIR)/$$PROG; ) \
+ 	done
+ endif
+-	$(RM) $(DESTDIR)/play
++#	$(RM) $(DESTDIR)/$(BINDIR)/play
+ 	@cd head; $(MAKE) $(MFLAGS) uninstall
+ 	@cd resample; $(MAKE) $(MFLAGS) uninstall
+ 
diff --git a/rtcmix/patches/patch-utils_cmixplay.cpp b/rtcmix/patches/patch-utils_cmixplay.cpp
new file mode 100644
index 0000000000..aac9c182d7
--- /dev/null
+++ b/rtcmix/patches/patch-utils_cmixplay.cpp
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- utils/cmixplay.cpp.orig	2015-10-03 21:09:58.000000000 +0000
++++ utils/cmixplay.cpp
+@@ -8,7 +8,7 @@
+    rev'd again, for OSX support  -JGG, 12/01.
+    rev'd again, to work with Doug's AudioDevice class  -JGG, 6/04.
+ */
+-#if defined(LINUX) || defined(MACOSX)
++#if defined(LINUX) || defined(MACOSX) || defined(NETBSD)
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -26,13 +26,12 @@
+ #include <audio_devices.h>
+ #include "../src/rtcmix/Option.h"
+ 
+-
+ #define PROGNAME  "cmixplay"
+ 
+ #ifdef LINUX
+    #include <values.h>
+ #endif
+-#ifdef MACOSX
++#if defined(MACOSX) || defined(NETBSD)
+    #include <limits.h>
+ #endif
+ 
+@@ -1175,4 +1174,4 @@ main(int argc, char *argv[])
+    return EXIT_SUCCESS;
+ }
+ 
+-#endif /* #if defined(LINUX) || defined(MACOSX) */
++#endif /* #if defined(LINUX) || defined(MACOSX) || defined(NETBSD) */
diff --git a/rtcmix/patches/patch-utils_head_Makefile b/rtcmix/patches/patch-utils_head_Makefile
new file mode 100644
index 0000000000..575e875fac
--- /dev/null
+++ b/rtcmix/patches/patch-utils_head_Makefile
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- utils/head/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ utils/head/Makefile
+@@ -33,14 +33,14 @@ install: all
+ 	@echo "making install..."	
+ 	@for PGM in $(HEAD); \
+ 	do \
+-	   ( $(INSTALL) $(CMIXDIR)/utils/head/$$PGM $(DESTDIR); ) \
++	   ( $(INSTALL) $(CMIXDIR)/utils/head/$$PGM $(DESTDIR)/$(BINDIR); ) \
+ 	done
+ 
+ uninstall:
+ 	@echo "making uninstall..."	
+ 	@for PGM in $(HEAD); \
+ 	do \
+-	   ( $(RM) $(DESTDIR)/$$PGM; ) \
++	   ( $(RM) $(DESTDIR)/$(BINDIR)/$$PGM; ) \
+ 	done
+ 
+ clean:
diff --git a/rtcmix/patches/patch-utils_resample_Makefile b/rtcmix/patches/patch-utils_resample_Makefile
new file mode 100644
index 0000000000..d4327811c5
--- /dev/null
+++ b/rtcmix/patches/patch-utils_resample_Makefile
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- utils/resample/Makefile.orig	2015-10-03 21:09:58.000000000 +0000
++++ utils/resample/Makefile
+@@ -20,11 +20,11 @@ libfilterkit.a: $(HFILES) filterkit.o
+ 
+ install:
+ 	@echo "making install..."	
+-	@$(INSTALL) $(CMIXDIR)/utils/resample/$(PROG) $(DESTDIR)
++	@$(INSTALL) $(CMIXDIR)/utils/resample/$(PROG) $(DESTDIR)/$(BINDIR)
+ 
+ uninstall:
+ 	@echo "making uninstall..."	
+-	$(RM) $(DESTDIR)/resample
++	$(RM) $(DESTDIR)/$(BINDIR)/resample
+ 
+ clean:
+ 	$(RM) *.o libfilterkit.a $(PROG)


Home | Main Index | Thread Index | Old Index