aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/Maaate/files/patch-configure6
-rw-r--r--audio/aacgain/files/patch-faad2_libfaad_common.h8
-rw-r--r--audio/acoustid-fingerprinter/files/patch-decoder.h6
-rw-r--r--audio/aften/files/patch-libaften__cpu_caps.h10
-rw-r--r--audio/aften/files/patch-libaften_cpu__caps.h10
-rw-r--r--audio/alienwah/files/patch-aw.cpp40
-rw-r--r--audio/alsa-lib/files/patch-include__pcm.h16
-rw-r--r--audio/alsa-lib/files/patch-include_pcm.h16
-rw-r--r--audio/alsa-lib/files/patch-src__async.c28
-rw-r--r--audio/alsa-lib/files/patch-src__pcm__pcm_direct.c19
-rw-r--r--audio/alsa-lib/files/patch-src_async.c28
-rw-r--r--audio/alsa-lib/files/patch-src_pcm_pcm__direct.c19
-rw-r--r--audio/alsa-lib/files/patch-test_midifile.c2
-rw-r--r--audio/alsa-plugins/files/patch-arcam-av-arcam_av.c19
-rw-r--r--audio/alsa-plugins/files/patch-arcam-av_arcam__av.c19
-rw-r--r--audio/alsa-plugins/files/patch-configure8
-rw-r--r--audio/alsa-plugins/files/patch-oss-ctl_oss.c23
-rw-r--r--audio/alsa-plugins/files/patch-oss-pcm_oss.c29
-rw-r--r--audio/alsa-plugins/files/patch-oss_ctl__oss.c23
-rw-r--r--audio/alsa-plugins/files/patch-oss_pcm__oss.c32
-rw-r--r--audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c86
-rw-r--r--audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c86
-rw-r--r--audio/alsa-utils/files/patch-alsaloop__alsaloop.c14
-rw-r--r--audio/alsa-utils/files/patch-alsaloop_alsaloop.c14
-rw-r--r--audio/alsa-utils/files/patch-alsamixer__mixer_display.c12
-rw-r--r--audio/alsa-utils/files/patch-alsamixer__volume_mapping.c11
-rw-r--r--audio/alsa-utils/files/patch-alsamixer_mixer__display.c12
-rw-r--r--audio/alsa-utils/files/patch-alsamixer_volume__mapping.c11
-rw-r--r--audio/alsa-utils/files/patch-aplay__aplay.c23
-rw-r--r--audio/alsa-utils/files/patch-aplay__formats.h10
-rw-r--r--audio/alsa-utils/files/patch-aplay_aplay.c23
-rw-r--r--audio/alsa-utils/files/patch-aplay_formats.h10
-rw-r--r--audio/alure/files/patch-src__codec_fluidsynth.cpp10
-rw-r--r--audio/alure/files/patch-src_codec__fluidsynth.cpp10
-rw-r--r--audio/amarok-kde4/files/patch-src__core-impl__playlists__types__file__xspf__XSPFPlaylist.cpp19
-rw-r--r--audio/amarok-kde4/files/patch-src__musicbrainz__MusicDNSAudioDecoder.cpp19
-rw-r--r--audio/amarok-kde4/files/patch-src__playlist__proxymodels__SortScheme.cpp18
-rw-r--r--audio/amarok-kde4/files/patch-src_core-impl_playlists_types_file_xspf_XSPFPlaylist.cpp19
-rw-r--r--audio/amarok-kde4/files/patch-src_musicbrainz_MusicDNSAudioDecoder.cpp19
-rw-r--r--audio/amarok-kde4/files/patch-src_playlist_proxymodels_SortScheme.cpp18
-rw-r--r--audio/amp/files/patch-audio.c10
-rw-r--r--audio/amp/files/patch-audio.h12
-rw-r--r--audio/amp/files/patch-audioIO_Linux.c41
-rw-r--r--audio/amp/files/patch-audioIO__Linux.c41
-rw-r--r--audio/amp/files/patch-dump.c6
-rw-r--r--audio/amp/files/patch-formats.c6
-rw-r--r--audio/amp/files/patch-getbits.c10
-rw-r--r--audio/amp/files/patch-guicontrol.c6
-rw-r--r--audio/amp/files/patch-layer2.c6
-rw-r--r--audio/amp/files/patch-layer3.c8
-rw-r--r--audio/amp/files/patch-position.c8
-rw-r--r--audio/amp/files/patch-rtbuf.c6
-rw-r--r--audio/ample/files/patch-src__base64.c11
-rw-r--r--audio/ample/files/patch-src_base64.c11
-rw-r--r--audio/aqualung/files/patch-ffmpeg34
-rw-r--r--audio/aqualung/files/patch-src_decoder_dec__mac.cpp (renamed from audio/aqualung/files/patch-src__decoder__dec_mac.cpp)0
-rw-r--r--audio/ario/files/patch-src_ario-avahi.c4
-rw-r--r--audio/ascd/files/patch-Imakefile6
-rw-r--r--audio/ascd/files/patch-faktory.c6
-rw-r--r--audio/ascd/files/patch-misc_config.h.default4
-rw-r--r--audio/ascd/files/patch-misc_dirs.h.default4
-rw-r--r--audio/asunder/files/patch-Makefile.in2
-rw-r--r--audio/audacity/files/patch-Makefile.am2
-rw-r--r--audio/audacity/files/patch-configure.ac2
-rw-r--r--audio/audacity/files/patch-include_Makefile.am2
-rw-r--r--audio/audacity/files/patch-lib-src_FileDialog_Makefile.am2
-rw-r--r--audio/audacity/files/patch-lib-src_FileDialog_gtk_Makefile.am2
-rw-r--r--audio/audacity/files/patch-lib-src_FileDialog_mac_Makefile.am2
-rw-r--r--audio/audacity/files/patch-lib-src_FileDialog_win_Makefile.am2
-rw-r--r--audio/audacity/files/patch-lib-src__libnyquist__nyquist__nyqstk__include__FileRead.h10
-rw-r--r--audio/audacity/files/patch-lib-src__soundtouch__source__SoundTouch__Makefile.am11
-rw-r--r--audio/audacity/files/patch-lib-src_libnyquist_Makefile.am2
-rw-r--r--audio/audacity/files/patch-lib-src_libnyquist_nyquist_cmt_cext.h2
-rw-r--r--audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h2
-rw-r--r--audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqstk_include_FileRead.h10
-rw-r--r--audio/audacity/files/patch-lib-src_libnyquist_nyquist_xlisp_xlisp.h2
-rw-r--r--audio/audacity/files/patch-lib-src_lv2_configure7
-rw-r--r--audio/audacity/files/patch-lib-src_portmixer_include_portmixer.h2
-rw-r--r--audio/audacity/files/patch-lib-src_portmixer_src_px__linux__alsa.c2
-rw-r--r--audio/audacity/files/patch-lib-src_soundtouch_source_SoundTouch_Makefile.am11
-rw-r--r--audio/audacity/files/patch-src_AudioIO.h2
-rw-r--r--audio/audacity/files/patch-src_BatchCommands.cpp2
-rw-r--r--audio/audacity/files/patch-src_DeviceManager.cpp2
-rw-r--r--audio/audacity/files/patch-src_FFmpeg.h2
-rw-r--r--audio/audacity/files/patch-src_Makefile.am2
-rw-r--r--audio/audacity/files/patch-src_effects_VST_VSTEffect.cpp4
-rw-r--r--audio/audacity/files/patch-src_effects_vamp_LoadVamp.cpp2
-rw-r--r--audio/audacity/files/patch-src_import_ImportFLAC.cpp2
-rw-r--r--audio/audacity/files/patch-src_prefs_DevicePrefs.cpp2
-rw-r--r--audio/audiere/files/patch-src-debug.cpp14
-rw-r--r--audio/audiere/files/patch-src-speexfile-speexfile.cpp11
-rw-r--r--audio/audiere/files/patch-src-utility.h10
-rw-r--r--audio/audiere/files/patch-src_debug.cpp14
-rw-r--r--audio/audiere/files/patch-src_speexfile_speexfile.cpp11
-rw-r--r--audio/audiere/files/patch-src_utility.h10
-rw-r--r--audio/aureal-kmod/files/patch-10_Makefile4
-rw-r--r--audio/aureal-kmod/files/patch-20_Makefile4
-rw-r--r--audio/aureal-kmod/files/patch-30_Makefile4
-rw-r--r--audio/aureal-kmod/files/patch-Makefile4
-rw-r--r--audio/aureal-kmod/files/patch-Makefile.inc4
-rw-r--r--audio/aureal-kmod/files/patch-au88x0.c27
-rw-r--r--audio/autozen/files/patch-autozen.c16
-rw-r--r--audio/beast/files/patch-birnet_birnetcpu.c11
-rw-r--r--audio/beast/files/patch-birnet_birnetcpu.cc11
-rw-r--r--audio/beast/files/patch-tools_bseloopfuncs.cc8
-rw-r--r--audio/beep/files/patch-Makefile4
-rw-r--r--audio/blop/files/patch-configure6
-rw-r--r--audio/boodler/files/patch-configure.py10
-rw-r--r--audio/bristol/files/patch-bin_startBristol.in8
-rw-r--r--audio/bristol/files/patch-bristol-bristol.c14
-rw-r--r--audio/bristol/files/patch-bristol_bristol.c14
-rw-r--r--audio/bristol/files/patch-libbristolaudio-audioEngine.c13
-rw-r--r--audio/bristol/files/patch-libbristolaudio-audioGUIOSS.c12
-rw-r--r--audio/bristol/files/patch-libbristolaudio_audioEngine.c13
-rw-r--r--audio/bristol/files/patch-libbristolaudio_audioGUIOSS.c12
-rw-r--r--audio/calf/files/patch-src_Makefile.am (renamed from audio/calf/files/patch-src-Makefile.am)0
-rw-r--r--audio/calf/files/patch-src_calf_audio__fx.h (renamed from audio/calf/files/patch-src__calf__audio_fx.h)0
-rw-r--r--audio/calf/files/patch-src_calf_osctl.h (renamed from audio/calf/files/patch-src__calf__osctl.h)0
-rw-r--r--audio/calf/files/patch-src_giface.cpp (renamed from audio/calf/files/patch-src-giface.cpp)0
-rw-r--r--audio/calf/files/patch-src_monosynth.cpp (renamed from audio/calf/files/patch-src-monosynth.cpp)0
-rw-r--r--audio/cam/files/patch-cam.c6
-rw-r--r--audio/cam/files/patch-sounds.c7
-rw-r--r--audio/cd-console/files/patch-Makefile4
-rw-r--r--audio/cd-console/files/patch-cd-console.cpp4
-rw-r--r--audio/cd-console/files/patch-cd__ll__bsd.cpp13
-rw-r--r--audio/cd-console/files/patch-cd_ll_bsd.cpp13
-rw-r--r--audio/cd-discid/files/patch-Makefile6
-rw-r--r--audio/cdparanoia/files/patch-Makefile.in10
-rw-r--r--audio/cdparanoia/files/patch-configure7
-rw-r--r--audio/cdparanoia/files/patch-interface-Makefile.in57
-rw-r--r--audio/cdparanoia/files/patch-interface-cdda_interface.h50
-rw-r--r--audio/cdparanoia/files/patch-interface-common_interface.c71
-rw-r--r--audio/cdparanoia/files/patch-interface-cooked_interface.c180
-rw-r--r--audio/cdparanoia/files/patch-interface-interface.c27
-rw-r--r--audio/cdparanoia/files/patch-interface-low_interface.h55
-rw-r--r--audio/cdparanoia/files/patch-interface-scan_devices.c242
-rw-r--r--audio/cdparanoia/files/patch-interface-scsi_interface.c313
-rw-r--r--audio/cdparanoia/files/patch-interface-utils.h18
-rw-r--r--audio/cdparanoia/files/patch-interface_Makefile.in56
-rw-r--r--audio/cdparanoia/files/patch-interface_cdda__interface.h50
-rw-r--r--audio/cdparanoia/files/patch-interface_common__interface.c70
-rw-r--r--audio/cdparanoia/files/patch-interface_cooked__interface.c180
-rw-r--r--audio/cdparanoia/files/patch-interface_interface.c27
-rw-r--r--audio/cdparanoia/files/patch-interface_low__interface.h54
-rw-r--r--audio/cdparanoia/files/patch-interface_scan__devices.c242
-rw-r--r--audio/cdparanoia/files/patch-interface_scsi__interface.c313
-rw-r--r--audio/cdparanoia/files/patch-interface_utils.h17
-rw-r--r--audio/cdparanoia/files/patch-paranoia-Makefile.in25
-rw-r--r--audio/cdparanoia/files/patch-paranoia-cdda_paranoia.h17
-rw-r--r--audio/cdparanoia/files/patch-paranoia_Makefile.in25
-rw-r--r--audio/cdparanoia/files/patch-paranoia_cdda__paranoia.h16
-rw-r--r--audio/cdparanoia/files/patch-utils.h5
-rw-r--r--audio/cdparanoia/files/patch-version.h5
-rw-r--r--audio/cdplay/Makefile2
-rw-r--r--audio/cdplay/files/patch-cd.c16
-rw-r--r--audio/cdplay/files/patch-cdplay.111
-rw-r--r--audio/cdplay/files/patch-cdplay.h8
-rw-r--r--audio/cdplay/files/patch-main.c22
-rw-r--r--audio/chordpack/files/patch-chordpack6
-rw-r--r--audio/clunk/files/patch-CMakeLists.txt6
-rw-r--r--audio/clunk/files/patch-clunk__mdct_context.h11
-rw-r--r--audio/clunk/files/patch-clunk_mdct__context.h11
-rw-r--r--audio/cmp3/files/patch-cmp3.h2
-rw-r--r--audio/cmp3/files/patch-cmp3listfiles.c6
-rw-r--r--audio/cmp3/files/patch-cmp3main.c6
-rw-r--r--audio/cmp3/files/patch-cmp3volume.c4
-rw-r--r--audio/cmp3/files/patch-nevlib_Makefile.in4
-rw-r--r--audio/cmp3/files/patch-rnmp3.c6
-rw-r--r--audio/cmus/files/patch-Makefile8
-rw-r--r--audio/cmus/files/patch-scripts_checks.sh (renamed from audio/cmus/files/patch-scripts-checks.sh)0
-rw-r--r--audio/cpige/files/patch-gui_Makefile.in10
-rw-r--r--audio/cpige/files/patch-gui__Makefile.in10
-rw-r--r--audio/cpige/files/patch-gui__configure20
-rw-r--r--audio/cpige/files/patch-gui_configure20
-rw-r--r--audio/cpige/files/patch-mynet.c8
-rw-r--r--audio/creox/files/patch-creox__effects_dsp__distortionprocessor.cpp32
-rw-r--r--audio/creox/files/patch-creox__effects_dsp__echoprocessor.cpp11
-rw-r--r--audio/creox/files/patch-creox__effects_dsp__phaserprocessor.cpp22
-rw-r--r--audio/creox/files/patch-creox__effects_dsp__tremoloprocessor.cpp13
-rw-r--r--audio/creox/files/patch-creox_effects__dsp_distortionprocessor.cpp32
-rw-r--r--audio/creox/files/patch-creox_effects__dsp_echoprocessor.cpp11
-rw-r--r--audio/creox/files/patch-creox_effects__dsp_phaserprocessor.cpp22
-rw-r--r--audio/creox/files/patch-creox_effects__dsp_tremoloprocessor.cpp13
-rw-r--r--audio/csound/files/patch-InOut-rtalsa.c12
-rw-r--r--audio/csound/files/patch-InOut_rtalsa.c12
-rw-r--r--audio/csound/files/patch-Opcodes-urandom.c10
-rw-r--r--audio/csound/files/patch-Opcodes_urandom.c10
-rw-r--r--audio/csound/files/patch-SConstruct6
-rw-r--r--audio/csound/files/patch-Top-csound.c64
-rw-r--r--audio/csound/files/patch-Top_csound.c64
-rw-r--r--audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp14
-rw-r--r--audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp14
-rw-r--r--audio/csound6/files/patch-H__remote.h14
-rw-r--r--audio/csound6/files/patch-H_remote.h14
-rw-r--r--audio/csound6/files/patch-InOut-rtalsa.c27
-rw-r--r--audio/csound6/files/patch-InOut_rtalsa.c27
-rw-r--r--audio/csound6/files/patch-Top-csound.c55
-rw-r--r--audio/csound6/files/patch-Top_csound.c55
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp19
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp37
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp89
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp13
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp19
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp37
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp89
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp13
-rw-r--r--audio/ctronome/files/patch-Makefile5
-rw-r--r--audio/cutmp3/files/patch-Makefile6
-rw-r--r--audio/dagrab/files/patch-Makefile4
-rw-r--r--audio/dagrab/files/patch-dagrab.c28
-rw-r--r--audio/deadbeef/files/patch-fft.c2
-rw-r--r--audio/deadbeef/files/patch-junklib.c2
-rw-r--r--audio/deadbeef/files/patch-plugins-ffmpeg-Makefile.in18
-rw-r--r--audio/deadbeef/files/patch-plugins-ffmpeg-ffmpeg.c50
-rw-r--r--audio/deadbeef/files/patch-plugins_ffmpeg_Makefile.in18
-rw-r--r--audio/deadbeef/files/patch-plugins_ffmpeg_ffmpeg.c50
-rw-r--r--audio/deadbeef/files/patch-plugins_gtkui_Makefile.in4
-rw-r--r--audio/decibel-audio-player/files/patch-Makefile10
-rw-r--r--audio/decibel-audio-player/files/patch-src__modules__Covers.py20
-rw-r--r--audio/decibel-audio-player/files/patch-src_modules_Covers.py20
-rw-r--r--audio/dekagen/files/patch-dekagen6
-rw-r--r--audio/dream/files/patch-src_linux_pa__shm__ringbuffer.c (renamed from audio/dream/files/patch-src__linux__pa_shm_ringbuffer.c)0
-rw-r--r--audio/dream/files/patch-src_matlib_MatlibStdToolbox.cpp2
-rw-r--r--audio/dream/files/patch-src_sound_pa__ringbuffer.c (renamed from audio/dream/files/patch-src__sound__pa_ringbuffer.c)0
-rw-r--r--audio/dtmfdial/files/patch-dial.c6
-rw-r--r--audio/dumb/files/patch-Makefile14
-rw-r--r--audio/ecasound/files/patch-ecasound_eca-curses.cpp2
-rw-r--r--audio/epos-devel/files/patch-configure4
-rw-r--r--audio/epos-devel/files/patch-src__nnet__map.h11
-rw-r--r--audio/epos-devel/files/patch-src__nnet__neural_parse.yy20
-rw-r--r--audio/epos-devel/files/patch-src_epos.h2
-rw-r--r--audio/epos-devel/files/patch-src_nnet_map.h11
-rw-r--r--audio/epos-devel/files/patch-src_nnet_neural__parse.yy20
-rw-r--r--audio/esound/files/patch-audio__oss.c (renamed from audio/esound/files/patch-audio_oss.c)0
-rw-r--r--audio/espeak/files/patch-src_Makefile (renamed from audio/espeak/files/patch-src__Makefile)0
-rw-r--r--audio/espeak/files/patch-src__speech.h11
-rw-r--r--audio/espeak/files/patch-src_speech.h11
-rw-r--r--audio/extace/files/patch-src__color_win.c32
-rw-r--r--audio/extace/files/patch-src_color__win.c32
-rw-r--r--audio/faac/files/patch-configure.in4
-rw-r--r--audio/faac/files/patch-frontend_Makefile.am4
-rw-r--r--audio/faad/files/patch-frontend_main.c26
-rw-r--r--audio/faad/files/patch-libfaad_cfft.c4
-rw-r--r--audio/fapg/files/patch-fapg.c42
-rw-r--r--audio/fcplay/files/patch-AudioDriver.h4
-rw-r--r--audio/fcplay/files/patch-Dump.h4
-rw-r--r--audio/fcplay/files/patch-Main.cpp10
-rw-r--r--audio/fcplay/files/patch-POINTER4
-rw-r--r--audio/fcplay/files/patch-SmartPtr.h6
-rw-r--r--audio/fcplay/files/patch-configure8
-rw-r--r--audio/festalon/files/patch-src__cputest.c48
-rw-r--r--audio/festalon/files/patch-src__filter.h11
-rw-r--r--audio/festalon/files/patch-src_cputest.c48
-rw-r--r--audio/festalon/files/patch-src_filter.h11
-rw-r--r--audio/festdoc/files/patch-festival_info_festival.info4
-rw-r--r--audio/festlex-czech/files/patch-Makefile6
-rw-r--r--audio/festlex-czech/files/patch-czech-lexicon.out14
-rw-r--r--audio/festlex-czech/files/patch-czech-lexicon.scm4
-rw-r--r--audio/festlex-czech/files/patch-czech.scm11
-rw-r--r--audio/festlex-czech/files/patch-czech.scm.in11
-rw-r--r--audio/festvox-czech/files/patch-Makefile6
-rw-r--r--audio/festvox-czech/files/patch-czech_ph.scm.in16
-rw-r--r--audio/festvox-czech/files/patch-festvox_czech__ph.scm.in16
-rw-r--r--audio/firefly/files/patch-contrib_mt-daapd.conf.templ (renamed from audio/firefly/files/patch-mt-daapd.conf.templ)0
-rw-r--r--audio/firefly/files/patch-src_plugins_out-daap.c (renamed from audio/firefly/files/patch-plugins_out-daap.c)0
-rw-r--r--audio/flacon/files/patch-CMakeLists.txt4
-rw-r--r--audio/fluidsynth-dssi/files/patch-src-Makefile.in21
-rw-r--r--audio/fluidsynth-dssi/files/patch-src_Makefile.in21
-rw-r--r--audio/fluidsynth/files/patch-src__bindings__fluid_rtkit.c39
-rw-r--r--audio/fluidsynth/files/patch-src__drivers__fluid_alsa.c17
-rw-r--r--audio/fluidsynth/files/patch-src__drivers__fluid_oss.c15
-rw-r--r--audio/fluidsynth/files/patch-src_bindings_fluid__rtkit.c39
-rw-r--r--audio/fluidsynth/files/patch-src_drivers_fluid__alsa.c20
-rw-r--r--audio/fluidsynth/files/patch-src_drivers_fluid__oss.c15
-rw-r--r--audio/fmit/files/patch-libs_CppAddons_CMakeLists.txt9
-rw-r--r--audio/fmit/files/patch-libs_Music_CMakeLists.txt12
-rw-r--r--audio/fmit/files/patch-libs_Music_Music.h11
-rw-r--r--audio/fmit/files/patch-libs__CppAddons__CMakeLists.txt9
-rw-r--r--audio/fmit/files/patch-libs__Music__CMakeLists.txt12
-rw-r--r--audio/fmit/files/patch-libs__Music__Music.h11
-rw-r--r--audio/fmit/files/patch-src_CMakeLists.txt23
-rw-r--r--audio/fmit/files/patch-src__CMakeLists.txt23
-rw-r--r--audio/fmit/files/patch-src__modules__CMakeLists.txt10
-rw-r--r--audio/fmit/files/patch-src_modules_CMakeLists.txt10
-rw-r--r--audio/fpc-a52/files/patch-packages_a52_fpmake.pp2
-rw-r--r--audio/fpc-mad/files/patch-packages_mad_fpmake.pp2
-rw-r--r--audio/fpc-modplug/files/patch-packages_modplug_fpmake.pp2
-rw-r--r--audio/fpc-oggvorbis/files/patch-packages_oggvorbis_fpmake.pp4
-rw-r--r--audio/fpc-openal/files/patch-packages_openal_fpmake.pp4
-rw-r--r--audio/fplib/files/patch-CMakeLists.txt2
-rw-r--r--audio/freealut/files/patch-src_alutInit.c6
-rw-r--r--audio/freealut/files/patch-src_alutInternal.h6
-rw-r--r--audio/freealut/files/patch-src_alutLoader.c6
-rw-r--r--audio/freealut/files/patch-src_alutUtil.c4
-rw-r--r--audio/ghostess/files/patch-configure6
-rw-r--r--audio/ghostess/files/patch-src-Makefile.in12
-rw-r--r--audio/ghostess/files/patch-src-ghostess.c10
-rw-r--r--audio/ghostess/files/patch-src_Makefile.in12
-rw-r--r--audio/ghostess/files/patch-src_ghostess.c10
-rw-r--r--audio/gkrellmms2/files/patch-Makefile11
-rw-r--r--audio/gkrellmvolume2/files/patch-Makefile15
-rw-r--r--audio/gkrellmvolume2/files/patch-oss__mixer.c21
-rw-r--r--audio/gkrellmvolume2/files/patch-oss_mixer.c21
-rw-r--r--audio/glame/files/patch-Makefile.in6
-rw-r--r--audio/glame/files/patch-src__plugins__audio_io_oss.c14
-rw-r--r--audio/glame/files/patch-src_glmid_glconfig.c4
-rw-r--r--audio/glame/files/patch-src_glmid_glscript.h4
-rw-r--r--audio/glame/files/patch-src_glmid_glscript__swapfile.c30
-rw-r--r--audio/glame/files/patch-src_glmid_glscript_swapfile.c30
-rw-r--r--audio/glame/files/patch-src_gui_glame__console.c11
-rw-r--r--audio/glame/files/patch-src_gui_glame_console.c11
-rw-r--r--audio/glame/files/patch-src_include_glame__guile__compat.h61
-rw-r--r--audio/glame/files/patch-src_include_glame_guile_compat.h61
-rw-r--r--audio/glame/files/patch-src_plugins_audio__io__oss.c14
-rw-r--r--audio/glame/files/patch-src_swapfile_swapfile__fs.c16
-rw-r--r--audio/glame/files/patch-swapfile.c16
-rw-r--r--audio/gmixer/files/patch-Makefile4
-rw-r--r--audio/gmixer/files/patch-gmixer.c8
-rw-r--r--audio/gnaural/files/patch-Makefile.in6
-rw-r--r--audio/gnaural/files/patch-configure6
-rw-r--r--audio/gnomoradio/files/patch-gnomoradio_browser-link.cc6
-rw-r--r--audio/gnomoradio/files/patch-rainbow__license.cc11
-rw-r--r--audio/gnomoradio/files/patch-rainbow__rdf-resource.cc55
-rw-r--r--audio/gnomoradio/files/patch-rainbow_license.cc11
-rw-r--r--audio/gnomoradio/files/patch-rainbow_rdf-resource.cc55
-rw-r--r--audio/gnomoradio/files/patch-rainbow_sha1.h6
-rw-r--r--audio/gnomoradio/files/patch-roboradio-audio_prober.cc58
-rw-r--r--audio/gnomoradio/files/patch-roboradio_audio_ogg.cc4
-rw-r--r--audio/gnomoradio/files/patch-roboradio_audio_prober.cc58
-rw-r--r--audio/gnormalize/files/patch-Makefile6
-rw-r--r--audio/gnuitar/files/patch-src_main.c8
-rw-r--r--audio/gqmpeg/files/patch-configure10
-rw-r--r--audio/gqmpeg/files/patch-src_ui__pixbuf__save.c4
-rw-r--r--audio/grip/files/patch-src-gripcfg.c11
-rw-r--r--audio/grip/files/patch-src__main.c11
-rw-r--r--audio/grip/files/patch-src_gripcfg.c11
-rw-r--r--audio/grip/files/patch-src_main.c11
-rw-r--r--audio/grip/files/patch-src_tray.c4
-rw-r--r--audio/gsm/files/patch-Makefile24
-rw-r--r--audio/gsm/files/patch-inc_config.h4
-rw-r--r--audio/gstreamer-plugins-moodbar/files/patch-analyzer_main.c11
-rw-r--r--audio/gstreamer-plugins-moodbar/files/patch-main.c20
-rw-r--r--audio/gtkguitune/files/patch-lcdview.cc2
-rw-r--r--audio/gvolwheel/files/patch-Makefile.in6
-rw-r--r--audio/gvolwheel/files/patch-src_oss.c6
-rw-r--r--audio/gxmms2/files/patch-Makefile6
-rw-r--r--audio/harp/files/patch-shuffle.c8
-rw-r--r--audio/herrie/files/patch-libxspf10
-rw-r--r--audio/hydrogen-devel/files/patch-CMakeLists.txt2
-rw-r--r--audio/hydrogen-devel/files/patch-src_cli_CMakeLists.txt (renamed from audio/hydrogen-devel/files/patch-src__cli__CMakeLists.txt)0
-rw-r--r--audio/hydrogen-devel/files/patch-src_core_CMakeLists.txt (renamed from audio/hydrogen-devel/files/patch-src__core__CMakeLists.txt)0
-rw-r--r--audio/hydrogen-devel/files/patch-src_core_include_hydrogen_LashClient.h (renamed from audio/hydrogen-devel/files/patch-src__core__include__hydrogen__LashClient.h)0
-rw-r--r--audio/hydrogen-devel/files/patch-src_gui_CMakeLists.txt (renamed from audio/hydrogen-devel/files/patch-src__gui__CMakeLists.txt)0
-rw-r--r--audio/hydrogen-devel/files/patch-src_player_CMakeLists.txt (renamed from audio/hydrogen-devel/files/patch-src__player__CMakeLists.txt)0
-rw-r--r--audio/hydrogen-devel/files/patch-src_synth_CMakeLists.txt (renamed from audio/hydrogen-devel/files/patch-src__synth__CMakeLists.txt)0
-rw-r--r--audio/hydrogen/files/patch-cmake_FindHelper.cmake (renamed from audio/hydrogen/files/patch-cmake__FindHelper.cmake)0
-rw-r--r--audio/hydrogen/files/patch-src_cli_CMakeLists.txt (renamed from audio/hydrogen/files/patch-src__cli__CMakeLists.txt)0
-rw-r--r--audio/hydrogen/files/patch-src_gui_CMakeLists.txt (renamed from audio/hydrogen/files/patch-src__gui__CMakeLists.txt)0
-rw-r--r--audio/hydrogen/files/patch-src_player_CMakeLists.txt (renamed from audio/hydrogen/files/patch-src__player__CMakeLists.txt)0
-rw-r--r--audio/hydrogen/files/patch-src_synth_CMakeLists.txt (renamed from audio/hydrogen/files/patch-src__synth__CMakeLists.txt)0
-rw-r--r--audio/icecast-kh/files/patch-Makefile.in12
-rw-r--r--audio/icecast-kh/files/patch-conf_Makefile.in12
-rw-r--r--audio/icecast-kh/files/patch-configure10
-rw-r--r--audio/icecast2/files/patch-conf-Makefile.in12
-rw-r--r--audio/icecast2/files/patch-conf_Makefile.in12
-rw-r--r--audio/id3ren/files/patch-Makefile4
-rw-r--r--audio/id3ren/files/patch-man_Makefile12
-rw-r--r--audio/id3ren/files/patch-man__Makefile12
-rw-r--r--audio/id3ren/files/patch-src_Makefile6
-rw-r--r--audio/id3ren/files/patch-src_id3tag.c6
-rw-r--r--audio/id3v2/files/patch-Makefile6
-rw-r--r--audio/jack-rack/files/patch-fix_with_gtk-2.126
-rw-r--r--audio/jack-rack/files/patch-src_plugin__slot__callbacks.c18
-rw-r--r--audio/jack-rack/files/patch-src_plugin_slot_callbacks.c18
-rw-r--r--audio/jack/files/patch-drivers_dummy_dummy__driver.c (renamed from audio/jack/files/patch-drivers-dummy-dummy_driver.c)0
-rw-r--r--audio/jack/files/patch-drivers_dummy_dummy__driver.h (renamed from audio/jack/files/patch-drivers-dummy-dummy_driver.h)0
-rw-r--r--audio/jack/files/patch-drivers_oss_oss__driver.c (renamed from audio/jack/files/patch-drivers-oss-oss_driver.c)0
-rw-r--r--audio/jack/files/patch-libjack_client.c (renamed from audio/jack/files/patch-libjack-client.c)0
-rw-r--r--audio/juke/files/patch-src_conf.c6
-rw-r--r--audio/juke/files/patch-src_conf.h4
-rw-r--r--audio/kexis/files/patch-Makefile4
-rw-r--r--audio/kid3-kde4/files/patch-CMakeLists.txt8
-rw-r--r--audio/kio-audiocd/files/patch-audiocd.cpp8
-rw-r--r--audio/kmix/files/extrapatch-no_alsa20
-rw-r--r--audio/kmix/files/patch-backends_mixer__oss.cpp (renamed from audio/kmix/files/patch-mixer_oss)0
-rw-r--r--audio/kscd/files/extrapatch-no_alsa8
-rw-r--r--audio/ladspa/files/patch-applyplugin.c11
-rw-r--r--audio/ladspa/files/patch-src_applyplugin.c11
-rw-r--r--audio/lame/files/patch-configure54
-rw-r--r--audio/lash/files/patch-lashd-client_event.c20
-rw-r--r--audio/lash/files/patch-lashd-conn_mgr.c15
-rw-r--r--audio/lash/files/patch-lashd-store.c34
-rw-r--r--audio/lash/files/patch-lashd_client__event.c20
-rw-r--r--audio/lash/files/patch-lashd_conn__mgr.c15
-rw-r--r--audio/lash/files/patch-lashd_store.c34
-rw-r--r--audio/lash/files/patch-liblash-lash.c11
-rw-r--r--audio/lash/files/patch-liblash_lash.c11
-rw-r--r--audio/last.fm/files/patch-LastFM.pro6
-rw-r--r--audio/last.fm/files/patch-src-AudioController.cpp16
-rw-r--r--audio/last.fm/files/patch-src-libFingerprint-fplib-src-FloatingAverage.h12
-rw-r--r--audio/last.fm/files/patch-src-libUnicorn-Settings.h11
-rw-r--r--audio/last.fm/files/patch-src-output-alsa-playback-alsaaudio.cpp11
-rw-r--r--audio/last.fm/files/patch-src-output-alsa-playback-xconvert.c10
-rw-r--r--audio/last.fm/files/patch-src-updatewizard.h11
-rw-r--r--audio/last.fm/files/patch-src-wizardselectupdatespage.h11
-rw-r--r--audio/last.fm/files/patch-src_AudioController.cpp16
-rw-r--r--audio/last.fm/files/patch-src__lastfmapplication.cpp13
-rw-r--r--audio/last.fm/files/patch-src__libUnicorn__TrackInfo.h11
-rw-r--r--audio/last.fm/files/patch-src__libUnicorn__UnicornCommon.cpp13
-rw-r--r--audio/last.fm/files/patch-src__playerlistener.cpp13
-rw-r--r--audio/last.fm/files/patch-src_lastfmapplication.cpp13
-rw-r--r--audio/last.fm/files/patch-src_libFingerprint_fplib_src_FloatingAverage.h10
-rw-r--r--audio/last.fm/files/patch-src_libUnicorn_Settings.h11
-rw-r--r--audio/last.fm/files/patch-src_libUnicorn_TrackInfo.h11
-rw-r--r--audio/last.fm/files/patch-src_libUnicorn_UnicornCommon.cpp13
-rw-r--r--audio/last.fm/files/patch-src_output_RtAudio_RtAudio.pro13
-rw-r--r--audio/last.fm/files/patch-src_output_RtAudio_rtaudio_RtAudio.cpp2
-rw-r--r--audio/last.fm/files/patch-src_output_RtAudio_rtaudioplayback.cpp20
-rw-r--r--audio/last.fm/files/patch-src_output_alsa-playback_alsaaudio.cpp11
-rw-r--r--audio/last.fm/files/patch-src_output_alsa-playback_xconvert.c10
-rw-r--r--audio/last.fm/files/patch-src_playerlistener.cpp13
-rw-r--r--audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.cpp20
-rw-r--r--audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.pro13
-rw-r--r--audio/last.fm/files/patch-src_updatewizard.h11
-rw-r--r--audio/last.fm/files/patch-src_wizardselectupdatespage.h11
-rw-r--r--audio/lastfm-desktop/files/patch-app_client_Services_RadioService_RadioService.cpp2
-rw-r--r--audio/libaacplus/files/patch-configure.ac10
-rw-r--r--audio/libaacplus/files/patch-include-aacplus.h11
-rw-r--r--audio/libaacplus/files/patch-include_aacplus.h11
-rw-r--r--audio/libaacplus/files/patch-src_Makefile.am6
-rw-r--r--audio/libaiff/files/patch-Makefile.in8
-rw-r--r--audio/libaiff/files/patch-configure6
-rw-r--r--audio/libao/files/patch-configure12
-rw-r--r--audio/libao/files/patch-doc_Makefile.in4
-rw-r--r--audio/libao/files/patch-src_plugins_Makefile.in4
-rw-r--r--audio/libao/files/patch-src_plugins_pulse_Makefile.in4
-rw-r--r--audio/libcanberra/files/patch-src_oss.c6
-rw-r--r--audio/libcdaudio/files/patch-CVE-2008-5030.2005-070616
-rw-r--r--audio/libcddb/files/patch-include-cddb-cddb_log.h11
-rw-r--r--audio/libcddb/files/patch-include-cddb-cddb_log_ni.h11
-rw-r--r--audio/libcddb/files/patch-include_cddb_cddb__log.h11
-rw-r--r--audio/libcddb/files/patch-include_cddb_cddb__log__ni.h11
-rw-r--r--audio/libconvolve/files/patch-Makefile6
-rw-r--r--audio/libconvolve/files/patch-convolution__init.c74
-rw-r--r--audio/libconvolve/files/patch-convolution__process.c11
-rw-r--r--audio/libconvolve/files/patch-convolution_init.c74
-rw-r--r--audio/libconvolve/files/patch-convolution_process.c11
-rw-r--r--audio/libechonest/files/patch-CMakeLists.txt10
-rw-r--r--audio/libid3tag/files/patch-id3tag.pc.in4
-rw-r--r--audio/liblo/files/patch-src-lo_types_internal.h18
-rw-r--r--audio/liblo/files/patch-src-messages.c13
-rw-r--r--audio/liblo/files/patch-src_lo__types__internal.h18
-rw-r--r--audio/liblo/files/patch-src_message.c13
-rw-r--r--audio/libmad/files/patch-configure6
-rw-r--r--audio/libmp3-archive-perl/files/patch-Makefile.PL2
-rw-r--r--audio/libmp3splt/files/patch-configure4
-rw-r--r--audio/libmp3splt/files/patch-src-oformat_parser.c11
-rw-r--r--audio/libmp3splt/files/patch-src_oformat__parser.c11
-rw-r--r--audio/libmusicbrainz5/files/patch-src_CMakeLists.txt2
-rw-r--r--audio/libnoise/files/patch-src_Makefile6
-rw-r--r--audio/libofa/files/patch-configure6
-rw-r--r--audio/libofa/files/patch-examples__example.cpp11
-rw-r--r--audio/libofa/files/patch-examples__protocol.cpp15
-rw-r--r--audio/libofa/files/patch-examples_example.cpp11
-rw-r--r--audio/libofa/files/patch-examples_protocol.cpp15
-rw-r--r--audio/libofa/files/patch-examples_uselame.cpp4
-rw-r--r--audio/libofa/files/patch-examples_wavefile.cpp4
-rw-r--r--audio/libofa/files/patch-lib_JAMA_tnt__math__utils.h33
-rw-r--r--audio/libofa/files/patch-lib__JAMA__tnt_math_utils.h33
-rw-r--r--audio/libofa/files/patch-lib__signal_op.cpp10
-rw-r--r--audio/libofa/files/patch-lib_signal__op.cpp10
-rw-r--r--audio/libogg/files/patch-configure8
-rw-r--r--audio/libsamplerate/files/patch-src_samplerate.h6
-rw-r--r--audio/libshairport/files/patch-configure.in8
-rw-r--r--audio/libshairport/files/patch-src-Makefile.am12
-rw-r--r--audio/libshairport/files/patch-src-alac.c47
-rw-r--r--audio/libshairport/files/patch-src-ao.h161
-rw-r--r--audio/libshairport/files/patch-src-hairtunes.c233
-rw-r--r--audio/libshairport/files/patch-src-hairtunes.h11
-rw-r--r--audio/libshairport/files/patch-src-shairport.c691
-rw-r--r--audio/libshairport/files/patch-src-shairport.h51
-rw-r--r--audio/libshairport/files/patch-src-socketlib.c58
-rw-r--r--audio/libshairport/files/patch-src_Makefile.am12
-rw-r--r--audio/libshairport/files/patch-src_alac.c47
-rw-r--r--audio/libshairport/files/patch-src_ao.h161
-rw-r--r--audio/libshairport/files/patch-src_hairtunes.c233
-rw-r--r--audio/libshairport/files/patch-src_hairtunes.h11
-rw-r--r--audio/libshairport/files/patch-src_shairport.c691
-rw-r--r--audio/libshairport/files/patch-src_shairport.h51
-rw-r--r--audio/libshairport/files/patch-src_socketlib.c58
-rw-r--r--audio/libsidplay2/files/patch-libsidplay__include__sidplay__SmartPtr.h26
-rw-r--r--audio/libsidplay2/files/patch-libsidplay_include_sidplay_SmartPtr.h26
-rw-r--r--audio/libsidplay2/files/patch-libsidutils_include_sidplay_utils_SidUsage.h6
-rw-r--r--audio/libsidplayfp/files/patch-Makefile.in4
-rw-r--r--audio/libworkman/files/patch-Imakefile10
-rw-r--r--audio/libworkman/files/patch-plat__freebsd.c10
-rw-r--r--audio/libworkman/files/patch-plat_freebsd.c10
-rw-r--r--audio/libworkman/files/patch-wm__helpers.c11
-rw-r--r--audio/libworkman/files/patch-wm_helpers.c11
-rw-r--r--audio/libxmp/files/patch-Makefile.in2
-rw-r--r--audio/lingot/files/patch-Makefile.in6
-rw-r--r--audio/linux-c6-pulseaudio-libs/files/patch-etc__pulse__client.conf11
-rw-r--r--audio/linux-c6-pulseaudio-libs/files/patch-etc_pulse_client.conf11
-rw-r--r--audio/linux-f10-pulseaudio-libs/Makefile2
-rw-r--r--audio/linux-f10-pulseaudio-libs/files/patch-etc_pulse_client.conf.sample4
-rw-r--r--audio/linuxsampler/files/patch-src-common-Mutex.cpp10
-rw-r--r--audio/linuxsampler/files/patch-src-common-atomic.h11
-rw-r--r--audio/linuxsampler/files/patch-src-drivers-audio-AudioChannel.cpp11
-rw-r--r--audio/linuxsampler/files/patch-src__common__Pool.h11
-rw-r--r--audio/linuxsampler/files/patch-src_common_Mutex.cpp10
-rw-r--r--audio/linuxsampler/files/patch-src_common_Pool.h11
-rw-r--r--audio/linuxsampler/files/patch-src_common_atomic.h11
-rw-r--r--audio/linuxsampler/files/patch-src_drivers_audio_AudioChannel.cpp11
-rw-r--r--audio/lmms/files/patch-CMakeLists.txt2
-rw-r--r--audio/lmms/files/patch-include_lmms__math.h2
-rw-r--r--audio/lmms/files/patch-plugins_organic_organic.cpp8
-rw-r--r--audio/lmms/files/patch-plugins_sf2__player_sf2__player.cpp13
-rw-r--r--audio/lmms/files/patch-plugins_sf2_player_sf2_player.cpp13
-rw-r--r--audio/maplay/files/patch-Makefile74
-rw-r--r--audio/maplay/files/patch-all.h30
-rw-r--r--audio/maplay/files/patch-configuration.sh57
-rw-r--r--audio/maplay/files/patch-crc.cc6
-rw-r--r--audio/maplay/files/patch-header.cc10
-rw-r--r--audio/maplay/files/patch-header.h97
-rw-r--r--audio/maplay/files/patch-ibitstream.cc18
-rw-r--r--audio/maplay/files/patch-ibitstream.h40
-rw-r--r--audio/maplay/files/patch-maplay.cc28
-rw-r--r--audio/maplay/files/patch-obuffer.cc56
-rw-r--r--audio/maplay/files/patch-obuffer.h8
-rw-r--r--audio/maplay/files/patch-subband.h34
-rw-r--r--audio/maplay/files/patch-subband__layer__1.cc127
-rw-r--r--audio/maplay/files/patch-subband__layer__1.h38
-rw-r--r--audio/maplay/files/patch-subband__layer__2.cc54
-rw-r--r--audio/maplay/files/patch-subband__layer__2.h47
-rw-r--r--audio/maplay/files/patch-subband_layer_1.cc127
-rw-r--r--audio/maplay/files/patch-subband_layer_1.h65
-rw-r--r--audio/maplay/files/patch-subband_layer_2.cc97
-rw-r--r--audio/maplay/files/patch-subband_layer_2.h82
-rw-r--r--audio/maplay/files/patch-synthesis__filter.h11
-rw-r--r--audio/maplay/files/patch-synthesis_filter.h11
-rw-r--r--audio/mcplay/files/patch-Makefile14
-rw-r--r--audio/mcplay/files/patch-config.h4
-rw-r--r--audio/mcplay/files/patch-mixer.c4
-rw-r--r--audio/mcplay/files/patch-screen.c6
-rw-r--r--audio/milkytracker/files/patch-src__tracker__TrackerStartUp.cpp20
-rw-r--r--audio/milkytracker/files/patch-src_tracker_TrackerStartUp.cpp20
-rw-r--r--audio/minitunes/files/patch-src-collectionscanner.h13
-rw-r--r--audio/minitunes/files/patch-src_collectionscanner.h13
-rw-r--r--audio/minitunes/files/patch-src_qtsingleapplication_qtlocalpeer.cpp2
-rw-r--r--audio/mixer.app/files/patch-Mixer.cc4
-rw-r--r--audio/mixmos/files/patch-src__mixer.h11
-rw-r--r--audio/mixmos/files/patch-src__prefs.h11
-rw-r--r--audio/mixmos/files/patch-src_mixer.h11
-rw-r--r--audio/mixmos/files/patch-src_prefs.h11
-rw-r--r--audio/mixxx/files/patch-build__depends.py113
-rw-r--r--audio/mixxx/files/patch-build__features.py55
-rw-r--r--audio/mixxx/files/patch-build__qt4.py13
-rw-r--r--audio/mixxx/files/patch-build_depends.py113
-rw-r--r--audio/mixxx/files/patch-build_features.py55
-rw-r--r--audio/mixxx/files/patch-build_qt4.py13
-rw-r--r--audio/mixxx/files/patch-lib__hidapi-0.8.0-pre__linux__hid-libusb.c42
-rw-r--r--audio/mixxx/files/patch-lib_hidapi-0.8.0-pre_linux_hid-libusb.c42
-rw-r--r--audio/mixxx/files/patch-src__controllers__controllermanager.cpp23
-rw-r--r--audio/mixxx/files/patch-src__defs.h17
-rw-r--r--audio/mixxx/files/patch-src__recording__encodermp3.cpp20
-rw-r--r--audio/mixxx/files/patch-src__sounddeviceportaudio.cpp15
-rw-r--r--audio/mixxx/files/patch-src__soundmanager.cpp23
-rw-r--r--audio/mixxx/files/patch-src__soundmanagerconfig.cpp11
-rw-r--r--audio/mixxx/files/patch-src__soundsourceoggvorbis.cpp18
-rw-r--r--audio/mixxx/files/patch-src__soundsourceproxy.cpp11
-rw-r--r--audio/mixxx/files/patch-src_controllers_controllermanager.cpp23
-rw-r--r--audio/mixxx/files/patch-src_defs.h17
-rw-r--r--audio/mixxx/files/patch-src_recording_encodermp3.cpp20
-rw-r--r--audio/mixxx/files/patch-src_sounddeviceportaudio.cpp15
-rw-r--r--audio/mixxx/files/patch-src_soundmanager.cpp23
-rw-r--r--audio/mixxx/files/patch-src_soundmanagerconfig.cpp11
-rw-r--r--audio/mixxx/files/patch-src_soundsourceoggvorbis.cpp18
-rw-r--r--audio/mixxx/files/patch-src_soundsourceproxy.cpp11
-rw-r--r--audio/modplugplay/files/patch-modplugplay.c20
-rw-r--r--audio/mous/files/patch-contrib_ffmpeg-strip-wma_common.h (renamed from audio/mous/files/patch-contrib__ffmpeg-strip-wma__common.h)0
-rw-r--r--audio/mp-player/files/patch-mp.c4
-rw-r--r--audio/mp32ogg/files/patch-mp32ogg6
-rw-r--r--audio/mp3_check/files/patch-Makefile2
-rw-r--r--audio/mp3_check/files/patch-mp3__check.c10
-rw-r--r--audio/mp3_check/files/patch-mp3__check__misc.c20
-rw-r--r--audio/mp3_check/files/patch-mp3_check.c10
-rw-r--r--audio/mp3_check/files/patch-mp3_check_misc.c20
-rw-r--r--audio/mp3asm/files/patch-src_utils.c10
-rw-r--r--audio/mp3asm/files/patch-utils.c10
-rw-r--r--audio/mp3blaster/files/patch-src__main.cc6
-rw-r--r--audio/mp3info/files/patch-Makefile7
-rw-r--r--audio/mp3lint/files/patch-Makefile.PL2
-rw-r--r--audio/mp3plot/files/patch-src__macros.h11
-rw-r--r--audio/mp3plot/files/patch-src_macros.h11
-rw-r--r--audio/mp3stat/files/patch-base.cpp2
-rw-r--r--audio/mp3stat/files/patch-input__vorbis__oggstat.cpp7
-rw-r--r--audio/mp3stat/files/patch-input_mp3_mp3stat.cpp4
-rw-r--r--audio/mp3stat/files/patch-input_vorbis_oggstat.cpp7
-rw-r--r--audio/mp3stat/files/patch-input_vorbis_oggstat.h4
-rw-r--r--audio/mp3stat/files/patch-ui.cpp4
-rw-r--r--audio/mp3stat/files/patch-ui__console__cli.cpp9
-rw-r--r--audio/mp3stat/files/patch-ui_console_cli.cpp9
-rw-r--r--audio/mp3stat/files/patch-ui_gtk_gtk2-ui.cpp11
-rw-r--r--audio/mp3stat/files/patch-ui_gtk_gtk2__ui.cpp11
-rw-r--r--audio/mp3wrap/files/patch-crc.c4
-rw-r--r--audio/mpdbrowser/files/patch-setup.py6
-rw-r--r--audio/mpg321/files/patch-ao.c4
-rw-r--r--audio/mpg321/files/patch-mpg321.c24
-rw-r--r--audio/mpg321/files/patch-network.c4
-rw-r--r--audio/mpiosh/files/patch-Makefile.am4
-rw-r--r--audio/mpiosh/files/patch-configure.in6
-rw-r--r--audio/mpiosh/files/patch-libmpio-debug.h11
-rw-r--r--audio/mpiosh/files/patch-libmpio_Makefile.am4
-rw-r--r--audio/mpiosh/files/patch-libmpio_debug.h11
-rw-r--r--audio/mpiosh/files/patch-mpiosh-callback.c17
-rw-r--r--audio/mpiosh/files/patch-mpiosh-mpiosh.c21
-rw-r--r--audio/mpiosh/files/patch-mpiosh-readline.c11
-rw-r--r--audio/mpiosh/files/patch-mpiosh_Makefile.am8
-rw-r--r--audio/mpiosh/files/patch-mpiosh_callback.c18
-rw-r--r--audio/mpiosh/files/patch-mpiosh_mpiosh.c21
-rw-r--r--audio/mpiosh/files/patch-mpiosh_readline.c11
-rw-r--r--audio/mumble/files/patch-compiler.pri6
-rw-r--r--audio/mumble/files/patch-overlay-overlay.h29
-rw-r--r--audio/mumble/files/patch-overlay_gl-overlay.c6
-rw-r--r--audio/mumble/files/patch-overlay_overlay.h28
-rw-r--r--audio/mumble/files/patch-plugins-plugins.pri6
-rw-r--r--audio/mumble/files/patch-src-Net.cpp8
-rw-r--r--audio/mumble/files/patch-src-mumble-CELTCodec.cpp7
-rw-r--r--audio/mumble/files/patch-src-mumble-OSS.cpp30
-rw-r--r--audio/mumble/files/patch-src-mumble-ServerHandler.cpp8
-rw-r--r--audio/mumble/files/patch-src-mumble-mumble.pro6
-rw-r--r--audio/mumble/files/patch-src__mumble__OSS.cpp35
-rw-r--r--audio/murmur/files/patch-compiler.pri6
-rw-r--r--audio/murmur/files/patch-initialize-SSL8
-rw-r--r--audio/muse/files/patch-Makefile.in6
-rw-r--r--audio/muse/files/patch-configure14
-rw-r--r--audio/muse/files/patch-src_Makefile.in10
-rw-r--r--audio/muse/files/patch-src__Makefile.in10
-rw-r--r--audio/muse/files/patch-src__jmixer.cpp40
-rw-r--r--audio/muse/files/patch-src__libmpeg__mpegtoraw.cc22
-rw-r--r--audio/muse/files/patch-src__outchannels.cpp15
-rw-r--r--audio/muse/files/patch-src__pipe.cpp14
-rw-r--r--audio/muse/files/patch-src__shout__sock.c14
-rw-r--r--audio/muse/files/patch-src_jmixer.cpp40
-rw-r--r--audio/muse/files/patch-src_libmpeg_mpegtoraw.cc22
-rw-r--r--audio/muse/files/patch-src_linklist.h6
-rw-r--r--audio/muse/files/patch-src_outchannels.cpp15
-rw-r--r--audio/muse/files/patch-src_pipe.cpp14
-rw-r--r--audio/muse/files/patch-src_shout_sock.c14
-rw-r--r--audio/musepack/files/patch-configure.in6
-rw-r--r--audio/musescore/files/patch-CMakeLists.txt2
-rw-r--r--audio/musescore/files/patch-mscore-CMakeLists.txt20
-rw-r--r--audio/musescore/files/patch-mscore_CMakeLists.txt20
-rw-r--r--audio/musescore/files/patch-thirdparty__qzip__qzip.cpp12
-rw-r--r--audio/musescore/files/patch-thirdparty_qzip_qzip.cpp12
-rw-r--r--audio/napster/files/patch-doc_Makefile.in11
-rw-r--r--audio/napster/files/patch-doc__Makefile.in11
-rw-r--r--audio/nas/files/patch-clients_audio_audemo_audemo.c24
-rw-r--r--audio/nas/files/patch-clients_audio_auedit_Graph.c19
-rw-r--r--audio/nas/files/patch-clients_audio_auedit_auedit.c24
-rw-r--r--audio/nas/files/patch-clients_audio_aupanel_aupanel.c10
-rw-r--r--audio/nas/files/patch-clients_audio_auphone_auphone.c16
-rw-r--r--audio/nas/files/patch-clients_audio_autool_audiotool.c18
-rw-r--r--audio/nas/files/patch-clients_audio_auwave_auwave.c20
-rw-r--r--audio/nas/files/patch-config_NetAudio.def7
-rw-r--r--audio/nas/files/patch-server_dda_voxware_auvoxware.c14
-rw-r--r--audio/nas/files/patch-server_dda_voxware_config.c24
-rw-r--r--audio/nas/files/patch-server_dia_gram.y6
-rw-r--r--audio/nas/files/patch-server_dia_lex.l33
-rw-r--r--audio/nas/files/patch-tmpl8
-rw-r--r--audio/nas/files/patch-useXt6
-rw-r--r--audio/ncmpcpp/files/patch-src_browser.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_configuration.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_helpers.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_media__library.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_mpdpp.cpp8
-rw-r--r--audio/ncmpcpp/files/patch-src_mpdpp.h2
-rw-r--r--audio/ncmpcpp/files/patch-src_playlist.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_playlist__editor.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_search__engine.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_status.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_tag__editor.cpp2
-rw-r--r--audio/ncmpcpp/files/patch-src_window.h2
-rw-r--r--audio/nosefart/files/patch-Makefile4
-rw-r--r--audio/nosefart/files/patch-src-sndhrdw-nes_apu.c25
-rw-r--r--audio/nosefart/files/patch-src_sndhrdw_nes__apu.c25
-rw-r--r--audio/nspmod/files/patch-Makefile34
-rw-r--r--audio/nspmod/files/patch-dacio-linux.c18
-rw-r--r--audio/nspmod/files/patch-dacio.h22
-rw-r--r--audio/nspmod/files/patch-nspmod.c85
-rw-r--r--audio/nspmod/files/patch-nspmod.h22
-rw-r--r--audio/ocp/files/patch-Makefile.in6
-rw-r--r--audio/ocp/files/patch-configure6
-rw-r--r--audio/ocp/files/patch-doc-texi-Makefile.in13
-rw-r--r--audio/ocp/files/patch-doc_texi_Makefile13
-rw-r--r--audio/ogg2mp3/files/patch-ogg2mp36
-rw-r--r--audio/openal-soft/files/patch-CMakeLists.txt8
-rw-r--r--audio/openal-soft/files/patch-OpenAL32_alBuffer.c2
-rw-r--r--audio/openal/files/patch-common__include__AL__alc.h20
-rw-r--r--audio/openal/files/patch-common_include_AL_alc.h20
-rw-r--r--audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm10
-rw-r--r--audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm10
-rw-r--r--audio/openal/files/patch-src-arch-i386-x86_floatmul.c39
-rw-r--r--audio/openal/files/patch-src-backends-alc_backend_bsd.c75
-rw-r--r--audio/openal/files/patch-src-backends-alc_backend_esd.c10
-rw-r--r--audio/openal/files/patch-src_arch_i386_memcpy__mmx__prk.nasm10
-rw-r--r--audio/openal/files/patch-src_arch_i386_x86__cpu__caps__detect__prk.nasm10
-rw-r--r--audio/openal/files/patch-src_arch_i386_x86__floatmul.c39
-rw-r--r--audio/openal/files/patch-src_backends_alc__backend__bsd.c75
-rw-r--r--audio/openal/files/patch-src_backends_alc__backend__esd.c10
-rw-r--r--audio/opus/files/patch-configure4
-rw-r--r--audio/osalp/files/patch-aflib_aflibConverter.cc6
-rw-r--r--audio/osalp/files/patch-aflib_aflibConverter.h6
-rw-r--r--audio/osalp/files/patch-aflib_aflibMemCache.cc4
-rw-r--r--audio/osalp/files/patch-formatlib-audiofile-0.2.0-libaudiofile_aiffwrite.c10
-rw-r--r--audio/osalp/files/patch-formatlib_audiofile-0.2.0_libaudiofile_aiffwrite.c10
-rw-r--r--audio/osd-lyrics/files/patch-lib__chardetect__src__entry__impl.cpp13
-rw-r--r--audio/osd-lyrics/files/patch-lib__chardetect__src__prmem.h12
-rw-r--r--audio/osd-lyrics/files/patch-lib_chardetect_src_entry_impl.cpp13
-rw-r--r--audio/osd-lyrics/files/patch-lib_chardetect_src_prmem.h12
-rw-r--r--audio/oss/files/patch-configure6
-rw-r--r--audio/oss/files/patch-os__cmd_FreeBSD_.config7
-rw-r--r--audio/oss/files/patch-os__cmd_FreeBSD_ossdetect_ossdetect.c34
-rw-r--r--audio/oss/files/patch-os_cmd-FreeBSD-.config7
-rw-r--r--audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c34
-rw-r--r--audio/oss/files/patch-setup-FreeBSD-build.sh38
-rw-r--r--audio/oss/files/patch-setup-FreeBSD-make.local14
-rw-r--r--audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh33
-rw-r--r--audio/oss/files/patch-setup-FreeBSD-sbin-soundoff30
-rw-r--r--audio/oss/files/patch-setup-FreeBSD-sbin-soundon66
-rw-r--r--audio/oss/files/patch-setup-srcconf.c20
-rw-r--r--audio/oss/files/patch-setup_FreeBSD_build.sh38
-rw-r--r--audio/oss/files/patch-setup_FreeBSD_make.local14
-rw-r--r--audio/oss/files/patch-setup_FreeBSD_oss_build_install.sh33
-rw-r--r--audio/oss/files/patch-setup_FreeBSD_sbin_soundoff30
-rw-r--r--audio/oss/files/patch-setup_FreeBSD_sbin_soundon66
-rw-r--r--audio/oss/files/patch-setup_srcconf.c20
-rw-r--r--audio/p5-Audio-Ecasound/files/patch-Makefile.PL6
-rw-r--r--audio/p5-Net-FreeDB/files/patch-Makefile.PL4
-rw-r--r--audio/p5-Ogg-Vorbis-Header/files/patch-Header.pm6
-rw-r--r--audio/p5-libvorbis/files/patch-Makefile.PL6
-rw-r--r--audio/patchage/files/patch-src-Patchage.cpp14
-rw-r--r--audio/patchage/files/patch-src_Patchage.cpp14
-rw-r--r--audio/pd/files/patch-extra_pd_pd.c10
-rw-r--r--audio/pd/files/patch-extra_pd~_pd~.c10
-rw-r--r--audio/pd/files/patch-src_s__audio__alsa.c2
-rw-r--r--audio/pianobar/files/patch-Makefile9
-rw-r--r--audio/pithos/files/patch-setup.py8
-rw-r--r--audio/play/files/patch-encode__riff.c54
-rw-r--r--audio/play/files/patch-encode_riff.c54
-rw-r--r--audio/play/files/patch-play.c22
-rw-r--r--audio/playgsf/files/patch-VBA_GBA.cpp17
-rw-r--r--audio/playgsf/files/patch-VBA_Util.cpp6
-rw-r--r--audio/playgsf/files/patch-VBA__GBA.cpp17
-rw-r--r--audio/playgsf/files/patch-libresample-0.1.3_Makefile.in13
-rw-r--r--audio/playgsf/files/patch-libresample-0.1.3__Makefile.in13
-rw-r--r--audio/playmidi/files/patch-Configure6
-rw-r--r--audio/playmidi/files/patch-Makefile53
-rw-r--r--audio/playmidi/files/patch-emumidi.h4
-rw-r--r--audio/playmidi/files/patch-patchload.c6
-rw-r--r--audio/playmidi/files/patch-playmidi.h-dist17
-rw-r--r--audio/playmidi/files/patch-playmidi_h-dist17
-rw-r--r--audio/pm3umpdl/files/patch-pm3umpdl-1.0.08
-rw-r--r--audio/pms/files/patch-Makefile.in25
-rw-r--r--audio/pms/files/patch-src_message.h4
-rw-r--r--audio/pms/files/patch-src_pms.cpp2
-rw-r--r--audio/praat/files/patch-external_portaudio_Makefile2
-rw-r--r--audio/praat/files/patch-sys_melder.h2
-rw-r--r--audio/praat/files/patch-sys_melder__alloc.cpp2
-rw-r--r--audio/praat/files/patch-sys_melder__files.cpp2
-rw-r--r--audio/praat/files/patch-sys_melder__strings.cpp2
-rw-r--r--audio/pragha/files/patch-configure4
-rw-r--r--audio/pragha/files/patch-plugins_Makefile.in8
-rw-r--r--audio/pulseaudio/files/patch-src_Makefile.in6
-rw-r--r--audio/pulseaudio/files/patch-src_daemon_default.pa.in2
-rw-r--r--audio/pulseaudio/files/patch-src_modules_module-detect.c10
-rw-r--r--audio/pulseaudio/files/patch-src_modules_oss_module-oss.c6
-rw-r--r--audio/pulseaudio/files/patch-src_modules_oss_oss-util.c6
-rw-r--r--audio/pulseaudio/files/patch-src_pulse_introspect.c10
-rw-r--r--audio/pulseaudio/files/patch-src_pulse_util.c13
-rw-r--r--audio/pulseaudio/files/patch-src_pulsecore_atomic.h6
-rw-r--r--audio/pulseaudio/files/patch-src_pulsecore_shm.c6
-rw-r--r--audio/py-ao/files/patch-src_aomodule.c4
-rw-r--r--audio/py-ao/files/patch-src_aomodule.h4
-rw-r--r--audio/py-karaoke/files/patch-setup.cfg6
-rw-r--r--audio/py-karaoke/files/patch-setup.py6
-rw-r--r--audio/py-mutagen/files/patch-setup.py8
-rw-r--r--audio/py-openal/files/patch-py__openal.c45
-rw-r--r--audio/py-openal/files/patch-py_openal.c45
-rw-r--r--audio/py-openal/files/patch-setup.py6
-rw-r--r--audio/py-pyaudio/files/patch-setup.py2
-rw-r--r--audio/py-pyliblo/files/patch-setup.py14
-rw-r--r--audio/py-tagpy/files/patch-aksetup__helper.py11
-rw-r--r--audio/py-tagpy/files/patch-aksetup_helper.py11
-rw-r--r--audio/py-tagpy/files/patch-src__wrapper__common.hpp14
-rw-r--r--audio/py-tagpy/files/patch-src_wrapper_common.hpp14
-rw-r--r--audio/qjackctl/files/patch-src-qjackctlSetup.cpp11
-rw-r--r--audio/qjackctl/files/patch-src_qjackctl.cpp4
-rw-r--r--audio/qjackctl/files/patch-src_qjackctlInterfaceComboBox.cpp4
-rw-r--r--audio/qjackctl/files/patch-src_qjackctlSetup.cpp11
-rw-r--r--audio/qsynth/files/patch-Makefile.in2
-rw-r--r--audio/qsynth/files/patch-src-qsynthOptions.cpp25
-rw-r--r--audio/qsynth/files/patch-src_qsynthOptions.cpp25
-rw-r--r--audio/quimup/files/patch-src__qm-config.cpp14
-rw-r--r--audio/quimup/files/patch-src__qm-mpdcom.cpp22
-rw-r--r--audio/quimup/files/patch-src__qm_itemlist.h11
-rw-r--r--audio/quimup/files/patch-src_qm__config.cpp14
-rw-r--r--audio/quimup/files/patch-src_qm__itemlist.h11
-rw-r--r--audio/quimup/files/patch-src_qm__mpdcom.cpp22
-rw-r--r--audio/raop_play/files/patch-Makefile14
-rw-r--r--audio/raop_play/files/patch-Makefile.in14
-rw-r--r--audio/raop_play/files/patch-aexcl-Makefile.in38
-rw-r--r--audio/raop_play/files/patch-aexcl-aexcl_play.c12
-rw-r--r--audio/raop_play/files/patch-aexcl_Makefile.in38
-rw-r--r--audio/raop_play/files/patch-aexcl_aexcl__play.cxx12
-rw-r--r--audio/raop_play/files/patch-raop__play_Makefile.in29
-rw-r--r--audio/raop_play/files/patch-raop__play_aac__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop__play_aexcl__lib.h27
-rw-r--r--audio/raop_play/files/patch-raop__play_audio__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop__play_audio__stream.h16
-rw-r--r--audio/raop_play/files/patch-raop__play_flac__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop__play_m4a__stream.c10
-rw-r--r--audio/raop_play/files/patch-raop__play_mp3__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop__play_ogg__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop__play_pcm__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop__play_pls__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop__play_raop__client.c29
-rw-r--r--audio/raop_play/files/patch-raop__play_wav__stream.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-Makefile.in29
-rw-r--r--audio/raop_play/files/patch-raop_play-aac_stream.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-aexcl_lib.h27
-rw-r--r--audio/raop_play/files/patch-raop_play-audio_stream.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-audio_stream.h16
-rw-r--r--audio/raop_play/files/patch-raop_play-flac_streams.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-m4a_stream.c10
-rw-r--r--audio/raop_play/files/patch-raop_play-mp3_stream.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-ogg_stream.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-pcm_streams.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-pls_stream.c11
-rw-r--r--audio/raop_play/files/patch-raop_play-raop_client.c29
-rw-r--r--audio/raop_play/files/patch-raop_play-wav_stream.c11
-rw-r--r--audio/raop_play/files/patch-rendezvous-Client.c13
-rw-r--r--audio/raop_play/files/patch-rendezvous-Makefile.in30
-rw-r--r--audio/raop_play/files/patch-rendezvous-mDNS.c11
-rw-r--r--audio/raop_play/files/patch-rendezvous_Client.c13
-rw-r--r--audio/raop_play/files/patch-rendezvous_Makefile.in30
-rw-r--r--audio/raop_play/files/patch-rendezvous_mDNS.c11
-rw-r--r--audio/rawrec/files/patch-main.c6
-rw-r--r--audio/rawrec/files/patch-play.c14
-rw-r--r--audio/rawrec/files/patch-record.c12
-rw-r--r--audio/rawrec/files/patch-sleep__on__option.c11
-rw-r--r--audio/rawrec/files/patch-sleep_on_motion.c11
-rw-r--r--audio/re/files/patch-mk-re.mk12
-rw-r--r--audio/re/files/patch-mk_re.mk12
-rw-r--r--audio/rhythmbox/files/patch-configure6
-rw-r--r--audio/rio500/files/patch-include-libfon.h12
-rw-r--r--audio/rio500/files/patch-include_libfon.h12
-rw-r--r--audio/rio500/files/patch-src_rio__add__song.c8
-rw-r--r--audio/rioutil/files/patch-configure.ac6
-rw-r--r--audio/ripperx/files/patch-plugins-ripperX_plugin-oggenc.c30
-rw-r--r--audio/ripperx/files/patch-plugins_ripperX__plugin-oggenc.c30
-rw-r--r--audio/ripperx/files/patch-src-config_rw.c14
-rw-r--r--audio/ripperx/files/patch-src-ripper_encoder_manipulation.c28
-rw-r--r--audio/ripperx/files/patch-src_config__rw.c14
-rw-r--r--audio/ripperx/files/patch-src_ripper__encoder__manipulation.c28
-rw-r--r--audio/rplay/Makefile2
-rw-r--r--audio/rplay/files/extra-patch-ao75
-rw-r--r--audio/rplay/files/patch-Makefile.config.in6
-rw-r--r--audio/rplay/files/patch-doc_Makefile.in10
-rw-r--r--audio/rplay/files/patch-doc_RPLAY.texi4
-rw-r--r--audio/rplay/files/patch-doc_RPTP.texi4
-rw-r--r--audio/rplay/files/patch-doc_librplay.texi4
-rw-r--r--audio/rplay/files/patch-doc_rplayd.810
-rw-r--r--audio/rplay/files/patch-doc_rplayd.texi12
-rw-r--r--audio/rplay/files/patch-librplay_Makefile.in10
-rw-r--r--audio/rplay/files/patch-rplayd_Makefile.in6
-rw-r--r--audio/rplay/files/patch-rplayd__audio__audio_FreeBSD.c8
-rw-r--r--audio/rplay/files/patch-rplayd__rplayd.c6
-rw-r--r--audio/rplay/files/patch-rplayd_rplayd.h6
-rw-r--r--audio/rplay/files/patch-rplayd_sound.h6
-rw-r--r--audio/rplay/files/patch-rplayd_spool.c6
-rw-r--r--audio/rplay/files/patch-rx_Makefile.in6
-rw-r--r--audio/rsynth/files/patch-configure.in2
-rw-r--r--audio/rsynth/files/patch-naplay.c16
-rw-r--r--audio/rubberband/files/patch-Makefile11
-rw-r--r--audio/rubberband/files/patch-Makefile.in11
-rw-r--r--audio/rubberband/files/patch-StrecherProcess.cpp12
-rw-r--r--audio/rubberband/files/patch-StretcherImpl.cpp11
-rw-r--r--audio/rubberband/files/patch-src_StretcherImpl.cpp11
-rw-r--r--audio/rubberband/files/patch-src_StretcherProcess.cpp12
-rw-r--r--audio/rubberband/files/patch-src_system_sysutils.h12
-rw-r--r--audio/rubberband/files/patch-system-sysutils.h12
-rw-r--r--audio/ruby-audiofile/files/patch-audiofile.c14
-rw-r--r--audio/rubygem-ruby-shout/files/patch-ext-shout_ext.c11
-rw-r--r--audio/rubygem-ruby-shout/files/patch-ext_shout__ext.c11
-rw-r--r--audio/s3mod/Makefile2
-rw-r--r--audio/s3mod/files/patch-Makefile14
-rw-r--r--audio/s3mod/files/patch-config.h4
-rw-r--r--audio/s3mod/files/patch-dsp.c4
-rw-r--r--audio/s3mod/files/patch-dsp.h4
-rw-r--r--audio/s3mod/files/patch-gus.c4
-rw-r--r--audio/s3mod/files/patch-gus.h6
-rw-r--r--audio/s3mod/files/patch-main.c14
-rw-r--r--audio/s3mod/files/patch-main.h6
-rw-r--r--audio/s3mod/files/patch-mod.c6
-rw-r--r--audio/s3mod/files/patch-play.c4
-rw-r--r--audio/s3mod/files/patch-tables.h4
-rw-r--r--audio/schism/files/patch-modplug__snd_gm.c17
-rw-r--r--audio/schism/files/patch-modplug_snd__gm.c17
-rw-r--r--audio/scrobbler/files/patch-Makefile.in24
-rw-r--r--audio/scrobbler/files/patch-config.h.in4
-rw-r--r--audio/scrobbler/files/patch-configure8
-rw-r--r--audio/scrobbler/files/patch-scrobbler.c6
-rw-r--r--audio/scrobbler/files/patch-tags__include__tags.h26
-rw-r--r--audio/scrobbler/files/patch-tags__tags.c58
-rw-r--r--audio/scrobbler/files/patch-tags_include_tags.h26
-rw-r--r--audio/scrobbler/files/patch-tags_tags.c58
-rw-r--r--audio/sdl_mixer/files/patch-SDL__mixer.h11
-rw-r--r--audio/sdl_mixer/files/patch-SDL_mixer.h11
-rw-r--r--audio/sdl_mixer/files/patch-mixer.c13
-rw-r--r--audio/sdl_mixer/files/patch-timidity-config.h11
-rw-r--r--audio/sdl_mixer/files/patch-timidity_config.h11
-rw-r--r--audio/shairport/files/patch-shairport.pl8
-rw-r--r--audio/shout/files/patch-configure6
-rw-r--r--audio/shout/files/patch-shout.c8
-rw-r--r--audio/shout/files/patch-sock.c4
-rw-r--r--audio/shout/files/patch-util.c4
-rw-r--r--audio/sidplay/files/patch-audio_oss_audiodrv.h4
-rw-r--r--audio/sidplay/files/patch-configure6
-rw-r--r--audio/sidplay/files/patch-sid2wav.cpp2
-rw-r--r--audio/sidplay/files/patch-sidcon.cpp2
-rw-r--r--audio/sidplay/files/patch-sidplay.cpp2
-rw-r--r--audio/sidplay2/files/patch-src_audio_oss_audiodrv.h4
-rw-r--r--audio/smasher/files/patch-src__replace.cpp8
-rw-r--r--audio/smasher/files/patch-src_replace.cpp9
-rw-r--r--audio/snack/Makefile3
-rw-r--r--audio/snack/files/patch-configure11
-rw-r--r--audio/snack/files/patch-generic-jkFormatMP3.c18
-rw-r--r--audio/snack/files/patch-generic_jkFormatMP3.c18
-rw-r--r--audio/snack/files/patch-unix_configure11
-rw-r--r--audio/sonata/files/patch-setup.py10
-rw-r--r--audio/sonata/files/patch-sonata.py6
-rw-r--r--audio/sonata/files/patch-sonata_main.py8
-rw-r--r--audio/sooperlooper/files/patch-libs-pbd-ftw.cc11
-rw-r--r--audio/sooperlooper/files/patch-libs__pbd__pathscanner.cpp10
-rw-r--r--audio/sooperlooper/files/patch-libs_pbd_ftw.cc11
-rw-r--r--audio/sooperlooper/files/patch-libs_pbd_pathscanner.cc10
-rw-r--r--audio/sound-juicer/files/patch-libjuicer_sj-metadata-musicbrainz5.c6
-rw-r--r--audio/soundtracker/files/patch-app_Makefile.in15
-rw-r--r--audio/soundtracker/files/patch-app__Makefile.in15
-rw-r--r--audio/soundtracker/files/patch-app__sample-editor.c21
-rw-r--r--audio/soundtracker/files/patch-app__tracer.c41
-rw-r--r--audio/soundtracker/files/patch-app__track-editor.c29
-rw-r--r--audio/soundtracker/files/patch-app_sample-editor.c21
-rw-r--r--audio/soundtracker/files/patch-app_tracer.c41
-rw-r--r--audio/soundtracker/files/patch-app_track-editor.c29
-rw-r--r--audio/soundtracker/files/patch-po__ja.po65
-rw-r--r--audio/soundtracker/files/patch-po_ja.po65
-rw-r--r--audio/specimen/files/patch-configure6
-rw-r--r--audio/specimen/files/patch-src-Makefile.in29
-rw-r--r--audio/specimen/files/patch-src-driver.c12
-rw-r--r--audio/specimen/files/patch-src-jackdriver.c20
-rw-r--r--audio/specimen/files/patch-src-specimen.c18
-rw-r--r--audio/specimen/files/patch-src_Makefile.in29
-rw-r--r--audio/specimen/files/patch-src_driver.c12
-rw-r--r--audio/specimen/files/patch-src_jackdriver.c20
-rw-r--r--audio/specimen/files/patch-src_specimen.c18
-rw-r--r--audio/speexdsp/files/patch-include_speex_speexdsp__config__types.h.in (renamed from audio/speexdsp/files/patch-include-speex-speexdsp_config_types.h.in)0
-rw-r--r--audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c2
-rw-r--r--audio/sphinx3/files/patch-src_libs3decoder_libsearch_vithist.c4
-rw-r--r--audio/spiralloops/files/patch-GUI_OutputGUI.C (renamed from audio/spiralloops/files/patch-GUI-OutputGUI.C)0
-rw-r--r--audio/spiralloops/files/patch-GUI_ScopeGUI.C (renamed from audio/spiralloops/files/patch-GUI-ScopeGUI.C)0
-rw-r--r--audio/spiralloops/files/patch-GUI_Widgets_Fl__Knob.cxx (renamed from audio/spiralloops/files/patch-GUI-Widgets-Fl_Knob.cxx)0
-rw-r--r--audio/spiralloops/files/patch-GUI_Widgets_Fl__Loop.C (renamed from audio/spiralloops/files/patch-GUI-Widgets-Fl_Loop.C)0
-rw-r--r--audio/spiralloops/files/patch-GUI_Widgets_Fl__Loop.h (renamed from audio/spiralloops/files/patch-GUI-Widgets-Fl_Loop.h)0
-rw-r--r--audio/spiralloops/files/patch-GUI_Widgets_Fl__Trigger.C (renamed from audio/spiralloops/files/patch-GUI-Widgets-Fl_Trigger.C)0
-rw-r--r--audio/spiralloops/files/patch-SpiralSound_Output.C (renamed from audio/spiralloops/files/patch-SpiralSound-Output.C)0
-rw-r--r--audio/spiralloops/files/patch-SpiralSound_RiffWav.C (renamed from audio/spiralloops/files/patch-SpiralSound-RiffWav.C)0
-rw-r--r--audio/spiralloops/files/patch-SpiralSound_Sample.C (renamed from audio/spiralloops/files/patch-SpiralSound-Sample.C)0
-rw-r--r--audio/spiralloops/files/patch-SpiralSound_Sample.h (renamed from audio/spiralloops/files/patch-SpiralSound-Sample.h)0
-rw-r--r--audio/spiralloops/files/patch-SpiralSound_SpiralInfo.C (renamed from audio/spiralloops/files/patch-SpiralSound-SpiralInfo.C)0
-rw-r--r--audio/spiralloops/files/patch-SpiralSound_SpiralInfo.h (renamed from audio/spiralloops/files/patch-SpiralSound-SpiralInfo.h)0
-rw-r--r--audio/spiralsynth/files/patch-SpiralSound_RiffWav.C (renamed from audio/spiralsynth/files/patch-SpiralSound-RiffWav.C)0
-rw-r--r--audio/spiralsynth/files/patch-SpiralSound_Sequencer.h (renamed from audio/spiralsynth/files/patch-SpiralSound-Sequencer.h)0
-rw-r--r--audio/spiralsynthmodular/files/patch-SpiralSound-PluginManager.C29
-rw-r--r--audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-LADSPAPlugin-LADSPAInfo.h11
-rw-r--r--audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-OutputPlugin-OutputPlugin.C19
-rw-r--r--audio/spiralsynthmodular/files/patch-SpiralSound_PluginManager.C29
-rw-r--r--audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_LADSPAPlugin_LADSPAInfo.h11
-rw-r--r--audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_OutputPlugin_OutputPlugin.C19
-rw-r--r--audio/spiralsynthmodular/files/patch-gcc466
-rw-r--r--audio/splay/files/patch-apps_Makefile.in11
-rw-r--r--audio/splay/files/patch-apps_Makefile_in11
-rw-r--r--audio/splay/files/patch-apps_splay.cc4
-rw-r--r--audio/splay/files/patch-apps_xsplay.cc4
-rw-r--r--audio/splay/files/patch-configure6
-rw-r--r--audio/splay/files/patch-libs_fileplayer.cc4
-rw-r--r--audio/splay/files/patch-libs_mpegtoraw.cc6
-rw-r--r--audio/splaytk/files/patch-splay-tk.tcl26
-rw-r--r--audio/squash/files/patch-FIXLOCK-src_global_squash.c6
-rw-r--r--audio/squash/files/patch-include__global.h11
-rw-r--r--audio/squash/files/patch-include__play_flac.h28
-rw-r--r--audio/squash/files/patch-include_global.h11
-rw-r--r--audio/squash/files/patch-include_play__flac.h28
-rw-r--r--audio/squash/files/patch-src__display.c34
-rw-r--r--audio/squash/files/patch-src__play_flac.c228
-rw-r--r--audio/squash/files/patch-src__player.c10
-rw-r--r--audio/squash/files/patch-src_display.c34
-rw-r--r--audio/squash/files/patch-src_play__flac.c228
-rw-r--r--audio/squash/files/patch-src_player.c10
-rw-r--r--audio/squeezeboxserver/files/patch-Slim-Utils-Log.pm20
-rw-r--r--audio/squeezeboxserver/files/patch-Slim_Utils_Log.pm20
-rw-r--r--audio/squeezeboxserver/files/patch-convert.conf22
-rw-r--r--audio/squeezeboxserver/files/patch-dbix-class-bug.diff16
-rw-r--r--audio/squeezeboxserver/files/patch-modules.conf2
-rw-r--r--audio/streamtranscoder/files/patch-src-commandline.cpp11
-rw-r--r--audio/streamtranscoder/files/patch-src_commandline.cpp11
-rw-r--r--audio/stymulator/files/patch-Makefile6
-rw-r--r--audio/stymulator/files/patch-sound.cpp4
-rw-r--r--audio/stymulator/files/patch-sound.h4
-rw-r--r--audio/stymulator/files/patch-stsoundlib_Makefile38
-rw-r--r--audio/stymulator/files/patch-stsoundlib_YmMusic.cpp54
-rw-r--r--audio/stymulator/files/patch-stsoundlib_YmMusic.h38
-rw-r--r--audio/stymulator/files/patch-stsoundlib_YmTypes.h84
-rw-r--r--audio/stymulator/files/patch-stsoundlib_Ymload.cpp647
-rw-r--r--audio/stymulator/files/patch-stsoundlib__Makefile38
-rw-r--r--audio/stymulator/files/patch-stsoundlib__YmMusic.cpp54
-rw-r--r--audio/stymulator/files/patch-stsoundlib__YmMusic.h38
-rw-r--r--audio/stymulator/files/patch-stsoundlib__YmTypes.h84
-rw-r--r--audio/stymulator/files/patch-stsoundlib__Ymload.cpp647
-rw-r--r--audio/stymulator/files/patch-stsoundlib__digidrum.cpp28
-rw-r--r--audio/stymulator/files/patch-stsoundlib__digidrum.h11
-rw-r--r--audio/stymulator/files/patch-stsoundlib__lzh__Makefile20
-rw-r--r--audio/stymulator/files/patch-stsoundlib__lzh__lzhlib.cpp15
-rw-r--r--audio/stymulator/files/patch-stsoundlib_digidrum.cpp28
-rw-r--r--audio/stymulator/files/patch-stsoundlib_digidrum.h11
-rw-r--r--audio/stymulator/files/patch-stsoundlib_lzh_Makefile20
-rw-r--r--audio/stymulator/files/patch-stsoundlib_lzh_lzhlib.cpp15
-rw-r--r--audio/stymulator/files/patch-ui.c4
-rw-r--r--audio/stymulator/files/patch-ui.h4
-rw-r--r--audio/stymulator/files/patch-ym2wav.cpp6
-rw-r--r--audio/stymulator/files/patch-ymplayer.cpp16
-rw-r--r--audio/taglib-extras/files/patch-svn_14443338
-rw-r--r--audio/taglib/files/extrapatch-rcc101
-rw-r--r--audio/taglookup/files/patch-command__line.cpp11
-rw-r--r--audio/taglookup/files/patch-command_line.cpp11
-rw-r--r--audio/taglookup/files/patch-tag.cpp4
-rw-r--r--audio/tagtool/files/patch-configure2
-rw-r--r--audio/tagtool/files/patch-src_Makefile.in2
-rw-r--r--audio/tagtool/files/patch-src_main.c (renamed from audio/tagtool/files/patch-src__main.c)0
-rw-r--r--audio/tcd/files/patch-cddb.c15
-rw-r--r--audio/tcd/files/patch-cddb.h11
-rw-r--r--audio/tcd/files/patch-src_cddb.c15
-rw-r--r--audio/tcd/files/patch-src_cddb.h11
-rw-r--r--audio/tcd/files/patch-src_tcd.c156
-rw-r--r--audio/tcd/files/patch-src_user-interface.c15
-rw-r--r--audio/tcd/files/patch-tcd.c156
-rw-r--r--audio/tcd/files/patch-user-interface.c15
-rw-r--r--audio/tclmidi/files/patch-Makefile.ins62
-rw-r--r--audio/tclmidi/files/patch-TclmIntp.cxx4
-rw-r--r--audio/tclmidi/files/patch-TclmIntp.h6
-rw-r--r--audio/tclmidi/files/patch-configure8
-rw-r--r--audio/tclmidi/files/patch-smf_Makefile.in31
-rw-r--r--audio/tclmidi/files/patch-smf_SMFHead.cxx6
-rw-r--r--audio/tclmidi/files/patch-smf_SMFHead.h4
-rw-r--r--audio/tclmidi/files/patch-smf_SMFTrack.cxx6
-rw-r--r--audio/tclmidi/files/patch-smf__Makefile.in30
-rw-r--r--audio/tclmidi/files/patch-song_Makefile.in30
-rw-r--r--audio/tclmidi/files/patch-song__Makefile.in30
-rw-r--r--audio/tclmidi/files/patch-tclmUtil.cxx6
-rw-r--r--audio/tempest_for_eliza/files/patch-configure6
-rw-r--r--audio/terminatorx/files/patch-configure.in10
-rw-r--r--audio/terminatorx/files/patch-src_main.cc4
-rw-r--r--audio/terminatorx/files/patch-src_tX__dial.c11
-rw-r--r--audio/terminatorx/files/patch-src_tX__dialog.cc14
-rw-r--r--audio/terminatorx/files/patch-src_tX__global.c11
-rw-r--r--audio/terminatorx/files/patch-src_tX__ladspa.cc13
-rw-r--r--audio/terminatorx/files/patch-src_tX__mastergui.cc20
-rw-r--r--audio/terminatorx/files/patch-src_tX__mouse.cc12
-rw-r--r--audio/terminatorx/files/patch-src_tX__mouse.h11
-rw-r--r--audio/terminatorx/files/patch-src_tX_dial.c11
-rw-r--r--audio/terminatorx/files/patch-src_tX_dialog.cc14
-rw-r--r--audio/terminatorx/files/patch-src_tX_global.c11
-rw-r--r--audio/terminatorx/files/patch-src_tX_ladspa.cc13
-rw-r--r--audio/terminatorx/files/patch-src_tX_mastergui.cc20
-rw-r--r--audio/terminatorx/files/patch-src_tX_mouse.cc12
-rw-r--r--audio/terminatorx/files/patch-src_tX_mouse.h11
-rw-r--r--audio/timidity++/files/patch-Makefile.in6
-rw-r--r--audio/timidity++/files/patch-configure2
-rw-r--r--audio/timidity++/files/patch-interface_Makefile.in10
-rw-r--r--audio/timidity++/files/patch-interface__Makefile.in10
-rw-r--r--audio/timidity++/files/patch-interface__tk_c.c11
-rw-r--r--audio/timidity++/files/patch-interface_tk__c.c11
-rw-r--r--audio/timidity++/files/patch-timidity_Makefile.in88
-rw-r--r--audio/timidity++/files/patch-timidity__Makefile.in88
-rw-r--r--audio/timidity/files/patch-common.c4
-rw-r--r--audio/timidity/files/patch-config.h4
-rw-r--r--audio/timidity/files/patch-dumb__c.c16
-rw-r--r--audio/timidity/files/patch-dumb_c.c16
-rw-r--r--audio/timidity/files/patch-instrum.c4
-rw-r--r--audio/timidity/files/patch-linux__a.c139
-rw-r--r--audio/timidity/files/patch-linux_a.c139
-rw-r--r--audio/timidity/files/patch-mix.c4
-rw-r--r--audio/timidity/files/patch-playmidi.c4
-rw-r--r--audio/timidity/files/patch-raw__a.c10
-rw-r--r--audio/timidity/files/patch-raw_a.c10
-rw-r--r--audio/timidity/files/patch-readmidi.c4
-rw-r--r--audio/timidity/files/patch-resample.c4
-rw-r--r--audio/timidity/files/patch-timidity.c4
-rw-r--r--audio/timidity/files/patch-timidity.cfg6
-rw-r--r--audio/timidity/files/patch-wav2pat.c4
-rw-r--r--audio/timidity/files/patch-wave__a.c10
-rw-r--r--audio/timidity/files/patch-wave_a.c10
-rw-r--r--audio/tomahawk/files/patch-src__libtomahawk__sip__PeerInfo.cpp11
-rw-r--r--audio/tomahawk/files/patch-src__libtomahawk__utils__Closure.h13
-rw-r--r--audio/tomahawk/files/patch-src_libtomahawk_sip_PeerInfo.cpp11
-rw-r--r--audio/tomahawk/files/patch-src_libtomahawk_utils_Closure.h13
-rw-r--r--audio/tomahawk/files/patch-src_libtomahawk_utils_TomahawkUtils.cpp2
-rw-r--r--audio/toolame/files/patch-psycho_3.c51
-rw-r--r--audio/toolame/files/patch-psycho_4.c22
-rw-r--r--audio/toolame/files/patch-psycho__3.c51
-rw-r--r--audio/toolame/files/patch-psycho__4.c22
-rw-r--r--audio/tosha/files/patch-Makefile2
-rw-r--r--audio/tosha/files/patch-pcmplay.c6
-rw-r--r--audio/tosha/files/patch-tosha.c121
-rw-r--r--audio/tosha/files/patch-utils.c8
-rw-r--r--audio/tosha/files/patch-utils.h8
-rw-r--r--audio/trommler/files/patch-gui.c6
-rw-r--r--audio/tse3/files/patch-OSS.cpp83
-rw-r--r--audio/tse3/files/patch-src__examples__recording__recording.cpp10
-rw-r--r--audio/tse3/files/patch-src__tse3__MidiFile.cpp10
-rw-r--r--audio/tse3/files/patch-src__tse3__Serializable.h10
-rw-r--r--audio/tse3/files/patch-src__tse3__TSE2MDL.cpp10
-rw-r--r--audio/tse3/files/patch-src__tse3__cmd__Phrase.h10
-rw-r--r--audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp9
-rw-r--r--audio/tse3/files/patch-src__tse3__file__XML.cpp9
-rw-r--r--audio/tse3/files/patch-src__tse3__file__XML.h9
-rw-r--r--audio/tse3/files/patch-src__tse3play__tse3play.cpp10
-rw-r--r--audio/tse3/files/patch-src_examples_recording_recording.cpp10
-rw-r--r--audio/tse3/files/patch-src_tse3_MidiFile.cpp10
-rw-r--r--audio/tse3/files/patch-src_tse3_Serializable.h10
-rw-r--r--audio/tse3/files/patch-src_tse3_TSE2MDL.cpp10
-rw-r--r--audio/tse3/files/patch-src_tse3_cmd_Phrase.h10
-rw-r--r--audio/tse3/files/patch-src_tse3_file_MidiFilter.cpp11
-rw-r--r--audio/tse3/files/patch-src_tse3_file_XML.cpp11
-rw-r--r--audio/tse3/files/patch-src_tse3_file_XML.h11
-rw-r--r--audio/tse3/files/patch-src_tse3_plt_OSS.cpp57
-rw-r--r--audio/tse3/files/patch-src_tse3play_tse3play.cpp10
-rw-r--r--audio/tuneradio/files/patch-tuneradio.c4
-rw-r--r--audio/tuxguitar/files/patch-build.properties12
-rw-r--r--audio/uade/files/patch-src_Makefile.in11
-rw-r--r--audio/uade/files/patch-src__Makefile.in11
-rw-r--r--audio/uade/files/patch-src__frontends__audacious__Makefile.in11
-rw-r--r--audio/uade/files/patch-src__frontends__uade123__Makefile.in11
-rw-r--r--audio/uade/files/patch-src__frontends__xmms__Makefile.in11
-rw-r--r--audio/uade/files/patch-src_frontends_audacious_Makefile.in11
-rw-r--r--audio/uade/files/patch-src_frontends_uade123_Makefile.in11
-rw-r--r--audio/uade/files/patch-src_frontends_xmms_Makefile.in11
-rw-r--r--audio/umix/files/patch-src_driver__oss.c (renamed from audio/umix/files/patch-src__driver_oss.c)0
-rw-r--r--audio/umix/files/patch-src_error.c2
-rw-r--r--audio/umix/files/patch-src_error.h2
-rw-r--r--audio/umodplayer/files/patch-coresound.c4
-rw-r--r--audio/umurmur/files/patch-configure.ac10
-rw-r--r--audio/umurmur/files/patch-src-conf.c30
-rw-r--r--audio/umurmur/files/patch-src_conf.c30
-rw-r--r--audio/vamp-plugin-sdk/files/patch-Makefile.in6
-rw-r--r--audio/voipong/files/patch-Makefile.bsd4
-rw-r--r--audio/volumeicon/files/patch-src_oss__backend.c4
-rw-r--r--audio/vorbis-tools/files/patch-configure8
-rw-r--r--audio/vorbis-tools/files/patch-ogg123_Makefile.in8
-rw-r--r--audio/vorbis-tools/files/patch-ogg123_vorbis__comments.c11
-rw-r--r--audio/vorbis-tools/files/patch-ogg123_vorbis_comments.c11
-rw-r--r--audio/vorbis-tools/files/patch-oggenc_lyrics.c4
-rw-r--r--audio/vorbisgain/files/patch-configure8
-rw-r--r--audio/vsound/files/patch-configure10
-rw-r--r--audio/vsound/files/patch-vsound.c8
-rw-r--r--audio/waon/files/patch-ao-wrapper.c4
-rw-r--r--audio/wavbreaker/files/patch-src_toc.c4
-rw-r--r--audio/wavegain/files/patch-audio.c4
-rw-r--r--audio/wavegain/files/patch-wavegain.c12
-rw-r--r--audio/waveplay/files/patch-waveplay.c39
-rw-r--r--audio/wavpack/files/patch-src__wavpack_local.h22
-rw-r--r--audio/wavpack/files/patch-src_wavpack__local.h22
-rw-r--r--audio/wavplay/files/patch-Makefile22
-rw-r--r--audio/wavplay/files/patch-client.c52
-rw-r--r--audio/wavplay/files/patch-file.c52
-rw-r--r--audio/wavplay/files/patch-main.c98
-rw-r--r--audio/wavplay/files/patch-msg.c52
-rw-r--r--audio/wavplay/files/patch-recplay.c8
-rw-r--r--audio/wavplay/files/patch-server.c52
-rw-r--r--audio/wavplay/files/patch-wavplay.h6
-rw-r--r--audio/wavplay/files/patch-xltwavplay.c26
-rw-r--r--audio/whysynth/files/patch-src-Makefile.in20
-rw-r--r--audio/whysynth/files/patch-src_Makefile.in20
-rw-r--r--audio/wmix/files/patch-mixer-oss.c14
-rw-r--r--audio/wmix/files/patch-wmix.c6
-rw-r--r--audio/wmrecord/files/patch-wmrecord.c56
-rw-r--r--audio/wmsmixer/files/patch-Imakefile21
-rw-r--r--audio/wmsmixer/files/patch-mixctl.h4
-rw-r--r--audio/wmsmixer/files/patch-wmsmixer.cc6
-rw-r--r--audio/workman/files/patch-Imakefile4
-rw-r--r--audio/workman/files/patch-cdrom.c6
-rw-r--r--audio/workman/files/patch-plat__freebsd.c69
-rw-r--r--audio/workman/files/patch-plat_freebsd.c69
-rw-r--r--audio/workman/files/patch-workman.man82
-rw-r--r--audio/workman/files/patch-workman__stubs.c12
-rw-r--r--audio/workman/files/patch-workman_stubs.c12
-rw-r--r--audio/xanalyser/files/patch-src-pcm-wav.cc19
-rw-r--r--audio/xanalyser/files/patch-src_Makefile.in8
-rw-r--r--audio/xanalyser/files/patch-src_pcm-cdr.cc4
-rw-r--r--audio/xanalyser/files/patch-src_pcm-wav.cc19
-rw-r--r--audio/xanalyser/files/patch-src_pcm.cc4
-rw-r--r--audio/xanalyser/files/patch-xanalyser.spec.in6
-rw-r--r--audio/xcd/files/patch-Makefile6
-rw-r--r--audio/xcd/files/patch-cdplayer.cc8
-rw-r--r--audio/xcdplayer/files/patch-Imakefile6
-rw-r--r--audio/xcdplayer/files/patch-XCdplayer.ad14
-rw-r--r--audio/xcdplayer/files/patch-button__setup.c12
-rw-r--r--audio/xcdplayer/files/patch-cdrom__callb.c6
-rw-r--r--audio/xcdplayer/files/patch-cdrom__globs.h6
-rw-r--r--audio/xcdplayer/files/patch-debug.c4
-rw-r--r--audio/xcdplayer/files/patch-internals.c40
-rw-r--r--audio/xcdplayer/files/patch-logo__setup.c14
-rw-r--r--audio/xcdplayer/files/patch-main.c6
-rw-r--r--audio/xcdplayer/files/patch-program.c14
-rw-r--r--audio/xcdplayer/files/patch-shuffle.c6
-rw-r--r--audio/xcdplayer/files/patch-top__setup.c10
-rw-r--r--audio/xfce4-mixer/files/patch-configure6
-rw-r--r--audio/ximp3/files/patch-lib_L3.h28
-rw-r--r--audio/ximp3/files/patch-lib__L3.h28
-rw-r--r--audio/xmcd/files/patch-Imakefile6
-rw-r--r--audio/xmcd/files/patch-cda__d_Imakefile28
-rw-r--r--audio/xmcd/files/patch-cda_d__Imakefile28
-rw-r--r--audio/xmcd/files/patch-cdda__d_Imakefile15
-rw-r--r--audio/xmcd/files/patch-cdda__d_if__flac.c519
-rw-r--r--audio/xmcd/files/patch-cdda__d_pthr.c26
-rw-r--r--audio/xmcd/files/patch-cdda_d__Imakefile15
-rw-r--r--audio/xmcd/files/patch-cdda_d__if_flac.c519
-rw-r--r--audio/xmcd/files/patch-cdda_d__pthr.c26
-rw-r--r--audio/xmcd/files/patch-cddb__d_Imakefile11
-rw-r--r--audio/xmcd/files/patch-cddb_d__Imakefile11
-rw-r--r--audio/xmcd/files/patch-install.sh2
-rw-r--r--audio/xmcd/files/patch-libdi__d_config.sh11
-rw-r--r--audio/xmcd/files/patch-libdi_d__config.sh11
-rw-r--r--audio/xmcd/files/patch-util__d_Imakefile11
-rw-r--r--audio/xmcd/files/patch-util_d__Imakefile19
-rw-r--r--audio/xmcd/files/patch-xmcd__d_Imakefile28
-rw-r--r--audio/xmcd/files/patch-xmcd_d__Imakefile28
-rw-r--r--audio/xmix/files/patch-Imakefile6
-rw-r--r--audio/xmix/files/patch-xmix.c6
-rw-r--r--audio/xmixer/files/patch-Xw_Base.c13
-rw-r--r--audio/xmixer/files/patch-Xw__Base.c13
-rw-r--r--audio/xmixer/files/patch-scf.c6
-rw-r--r--audio/xmixer/files/patch-xmixer.man4
-rw-r--r--audio/xmmix/files/patch-Imakefile4
-rw-r--r--audio/xmmix/files/patch-XMmix.ad4
-rw-r--r--audio/xmmix/files/patch-main.c10
-rw-r--r--audio/xmmix/files/patch-mixer.c6
-rw-r--r--audio/xmms-faad/files/patch-mp4__utils.c (renamed from audio/xmms-faad/files/patch-mp4_utils.c)0
-rw-r--r--audio/xmms-flac/files/patch-src_plugin__xmms_Makefile.in8
-rw-r--r--audio/xmms-ladspa/files/patch-Makefile8
-rw-r--r--audio/xmms-nas/files/patch-Makefile.in6
-rw-r--r--audio/xmms-nas/files/patch-configure8
-rw-r--r--audio/xmms-nas/files/patch-nas.h4
-rw-r--r--audio/xmms-nsf/files/patch-src__nes__audiosys.c34
-rw-r--r--audio/xmms-nsf/files/patch-src__nes__audiosys.h11
-rw-r--r--audio/xmms-nsf/files/patch-src__nes__handler.c26
-rw-r--r--audio/xmms-nsf/files/patch-src__nes__km6502__km6502cd.h417
-rw-r--r--audio/xmms-nsf/files/patch-src__nes__km6502__km6502ot.h51
-rw-r--r--audio/xmms-nsf/files/patch-src__xmms__callbacks.c20
-rw-r--r--audio/xmms-nsf/files/patch-src__xmms__interface.c11
-rw-r--r--audio/xmms-nsf/files/patch-src__xmms__nsf.c85
-rw-r--r--audio/xmms-nsf/files/patch-src__xmms__nsf.h11
-rw-r--r--audio/xmms-nsf/files/patch-src__xmms__nsflib.h15
-rw-r--r--audio/xmms-nsf/files/patch-src_nes_audiosys.c34
-rw-r--r--audio/xmms-nsf/files/patch-src_nes_audiosys.h11
-rw-r--r--audio/xmms-nsf/files/patch-src_nes_handler.c26
-rw-r--r--audio/xmms-nsf/files/patch-src_nes_km6502_km6502cd.h417
-rw-r--r--audio/xmms-nsf/files/patch-src_nes_km6502_km6502ot.h51
-rw-r--r--audio/xmms-nsf/files/patch-src_xmms_callbacks.c20
-rw-r--r--audio/xmms-nsf/files/patch-src_xmms_interface.c11
-rw-r--r--audio/xmms-nsf/files/patch-src_xmms_nsf.c85
-rw-r--r--audio/xmms-nsf/files/patch-src_xmms_nsf.h11
-rw-r--r--audio/xmms-nsf/files/patch-src_xmms_nsflib.h15
-rw-r--r--audio/xmms-openspc/files/patch-src_id666.c6
-rw-r--r--audio/xmms-sapplug/files/patch-Makefile6
-rw-r--r--audio/xmms-timidity/files/patch-xmms-timidity.cpp6
-rw-r--r--audio/xmms-wavpack/files/patch-configure4
-rw-r--r--audio/xmms-wavpack/files/patch-src_libwavpack.cpp4
-rw-r--r--audio/xmms-wavpack/files/patch-src_ui.cpp4
-rw-r--r--audio/xmms-xf86audio/files/patch-xf86audio.c16
-rw-r--r--audio/xmms2/files/patch-src_clients_lib_xmmsclient-glib_wscript (renamed from audio/xmms2/files/patch-src-clients-lib-xmmsclient-glib-wscript)0
-rw-r--r--audio/xmms2/files/patch-src_clients_lib_xmmsclient_wscript (renamed from audio/xmms2/files/patch-src-clients-lib-xmmsclient-wscript)0
-rw-r--r--audio/xmms2/files/patch-src_include_wscript (renamed from audio/xmms2/files/patch-src-include-wscript)0
-rw-r--r--audio/xmms2/files/patch-src_include_xmmsclient_xmmsclient++_coll.h (renamed from audio/xmms2/files/patch-src-include-xmmsclient-xmmsclient++-coll.h)0
-rw-r--r--audio/xmms2/files/patch-src_plugins_airplay_wscript (renamed from audio/xmms2/files/patch-src-plugins-airplay-wscript)0
-rw-r--r--audio/xmms2/files/patch-src_plugins_cdda_cdda.c (renamed from audio/xmms2/files/patch-src__plugins__cdda__cdda.c)0
-rw-r--r--audio/xmms2/files/patch-src_plugins_file_wscript (renamed from audio/xmms2/files/patch-src-plugins-file-wscript)0
-rw-r--r--audio/xmms2/files/patch-src_plugins_modplug_modplug.c (renamed from audio/xmms2/files/patch-src-plugins-modplug-modplug.c)0
-rw-r--r--audio/xmmsctrl/files/patch-Makefile9
-rw-r--r--audio/xmmsctrl/files/patch-removefile.c8
-rw-r--r--audio/xmradio/files/patch-Imakefile6
-rw-r--r--audio/xmradio/files/patch-analyzer.c4
-rw-r--r--audio/xmradio/files/patch-radio.c4
-rw-r--r--audio/xmradio/files/patch-sample.c4
-rw-r--r--audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.am11
-rw-r--r--audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.in13
-rw-r--r--audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.am11
-rw-r--r--audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.in13
-rw-r--r--audio/xoscope/files/patch-ser__unix.c74
-rw-r--r--audio/xoscope/files/patch-ser_unix.c74
-rw-r--r--audio/xsynth-dssi/files/patch-configure6
-rw-r--r--audio/xwave/files/patch-FWF_Imakefile6
-rw-r--r--audio/xwave/files/patch-FWF_src_Imakefile6
-rw-r--r--audio/xwave/files/patch-config.site4
-rw-r--r--audio/xwave/files/patch-src_XWave4
-rw-r--r--audio/xwave/files/patch-src__record_dialog.c11
-rw-r--r--audio/xwave/files/patch-src_aifc.c4
-rw-r--r--audio/xwave/files/patch-src_au.c4
-rw-r--r--audio/xwave/files/patch-src_audio.c48
-rw-r--r--audio/xwave/files/patch-src_button.c6
-rw-r--r--audio/xwave/files/patch-src_edit.c8
-rw-r--r--audio/xwave/files/patch-src_effects.c8
-rw-r--r--audio/xwave/files/patch-src_endian.c11
-rw-r--r--audio/xwave/files/patch-src_endian.h11
-rw-r--r--audio/xwave/files/patch-src_graphics.c8
-rw-r--r--audio/xwave/files/patch-src_record__dialog.c11
-rw-r--r--audio/xwave/files/patch-src_riff.c4
-rw-r--r--audio/xwave/files/patch-src_types.h4
-rw-r--r--audio/yell/files/patch-yell.c4
-rw-r--r--audio/zinf/files/patch-base-Makefile.in11
-rw-r--r--audio/zinf/files/patch-base-include-event.h13
-rw-r--r--audio/zinf/files/patch-base-include-facontext.h13
-rw-r--r--audio/zinf/files/patch-base-include-preferences.h13
-rw-r--r--audio/zinf/files/patch-base-include-queue.h10
-rw-r--r--audio/zinf/files/patch-base-include-swab.h13
-rw-r--r--audio/zinf/files/patch-base-include-thread.h13
-rw-r--r--audio/zinf/files/patch-base-src-properties.cpp12
-rw-r--r--audio/zinf/files/patch-base-src-registrar.cpp29
-rw-r--r--audio/zinf/files/patch-base-src-utility.cpp29
-rw-r--r--audio/zinf/files/patch-base-unix-include-win32impl.h13
-rw-r--r--audio/zinf/files/patch-base_Makefile.in11
-rw-r--r--audio/zinf/files/patch-base_include_event.h13
-rw-r--r--audio/zinf/files/patch-base_include_facontext.h13
-rw-r--r--audio/zinf/files/patch-base_include_preferences.h13
-rw-r--r--audio/zinf/files/patch-base_include_queue.h10
-rw-r--r--audio/zinf/files/patch-base_include_swab.h13
-rw-r--r--audio/zinf/files/patch-base_include_thread.h13
-rw-r--r--audio/zinf/files/patch-base_src_properties.cpp12
-rw-r--r--audio/zinf/files/patch-base_src_registrar.cpp29
-rw-r--r--audio/zinf/files/patch-base_src_utility.cpp29
-rw-r--r--audio/zinf/files/patch-base_unix_include_win32impl.h13
-rw-r--r--audio/zinf/files/patch-configure10
-rw-r--r--audio/zinf/files/patch-ftc-kjofol-kjofol.cpp10
-rw-r--r--audio/zinf/files/patch-ftc_kjofol_kjofol.cpp10
-rw-r--r--audio/zinf/files/patch-io-obs-obsinput.cpp18
-rw-r--r--audio/zinf/files/patch-io-src-pullbuffer.cpp13
-rw-r--r--audio/zinf/files/patch-io-wavout-src-wavoutpmo.cpp10
-rw-r--r--audio/zinf/files/patch-io_obs_obsinput.cpp18
-rw-r--r--audio/zinf/files/patch-io_src_pullbuffer.cpp13
-rw-r--r--audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp10
-rw-r--r--audio/zinf/files/patch-lib-http-src-Http.cpp10
-rw-r--r--audio/zinf/files/patch-lib-xml-include-Parse.h13
-rw-r--r--audio/zinf/files/patch-lib_http_src_Http.cpp10
-rw-r--r--audio/zinf/files/patch-lib_xml_include_Parse.h13
-rw-r--r--audio/zinf/files/patch-plm-metadata-vorbis-vorbis.cpp10
-rw-r--r--audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp10
-rw-r--r--audio/zinf/files/patch-ui-zinf-include-DialControl.h12
-rw-r--r--audio/zinf/files/patch-ui-zinf-include-PixFontControl.h13
-rw-r--r--audio/zinf/files/patch-ui-zinf-src-ThemeZip.cpp16
-rw-r--r--audio/zinf/files/patch-ui-zinf-tools-Makefile.in11
-rw-r--r--audio/zinf/files/patch-ui-zinf-unix-src-GTKFileSelector.cpp12
-rw-r--r--audio/zinf/files/patch-ui_zinf_include_DialControl.h12
-rw-r--r--audio/zinf/files/patch-ui_zinf_include_PixFontControl.h13
-rw-r--r--audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp16
-rw-r--r--audio/zinf/files/patch-ui_zinf_tools_Makefile.in11
-rw-r--r--audio/zinf/files/patch-ui_zinf_unix_src_GTKFileSelector.cpp12
-rw-r--r--audio/zynaddsubfx/files/patch-src_CMakeLists.txt30
-rw-r--r--audio/zynaddsubfx/files/patch-src_Misc_Config.cpp26
-rw-r--r--audio/zynaddsubfx/files/patch-src_Misc_Master.h11
-rw-r--r--audio/zynaddsubfx/files/patch-src_Misc_Part.h10
-rw-r--r--audio/zynaddsubfx/files/patch-src_Nio_SafeQueue.h10
-rw-r--r--audio/zynaddsubfx/files/patch-src_UI_CMakeLists.txt17
-rw-r--r--audio/zynaddsubfx/files/patch-src__CMakeLists.txt30
-rw-r--r--audio/zynaddsubfx/files/patch-src__Misc__Config.cpp26
-rw-r--r--audio/zynaddsubfx/files/patch-src__Misc__Master.h11
-rw-r--r--audio/zynaddsubfx/files/patch-src__Misc__Part.h10
-rw-r--r--audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h10
-rw-r--r--audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt17
1389 files changed, 14308 insertions, 14620 deletions
diff --git a/audio/Maaate/files/patch-configure b/audio/Maaate/files/patch-configure
index 26f22fadc73a..0820e50a1fb7 100644
--- a/audio/Maaate/files/patch-configure
+++ b/audio/Maaate/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2002-10-09 03:30:34.000000000 +0200
-+++ configure 2013-12-18 12:38:19.000000000 +0100
-@@ -5699,7 +5699,6 @@
+--- configure.orig 2002-10-09 01:30:34 UTC
++++ configure
+@@ -5699,7 +5699,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo
diff --git a/audio/aacgain/files/patch-faad2_libfaad_common.h b/audio/aacgain/files/patch-faad2_libfaad_common.h
index dfa709b503f8..dfb19b59e344 100644
--- a/audio/aacgain/files/patch-faad2_libfaad_common.h
+++ b/audio/aacgain/files/patch-faad2_libfaad_common.h
@@ -1,6 +1,6 @@
---- faad2/libfaad/common.h.orig Sun May 28 19:33:36 2006
-+++ faad2/libfaad/common.h Sun May 28 19:35:11 2006
-@@ -302,6 +302,7 @@
+--- faad2/libfaad/common.h.orig 2004-09-08 09:43:12 UTC
++++ faad2/libfaad/common.h
+@@ -302,6 +302,7 @@ char *strchr(), *strrchr();
return i;
}
#elif (defined(__i386__) && defined(__GNUC__))
@@ -8,7 +8,7 @@
#define HAS_LRINTF
// from http://www.stereopsis.com/FPU.html
static INLINE int lrintf(float f)
-@@ -315,7 +316,7 @@
+@@ -315,7 +316,7 @@ char *strchr(), *strrchr();
return i;
}
#endif
diff --git a/audio/acoustid-fingerprinter/files/patch-decoder.h b/audio/acoustid-fingerprinter/files/patch-decoder.h
index e1d52b050f75..6c3df3f3285b 100644
--- a/audio/acoustid-fingerprinter/files/patch-decoder.h
+++ b/audio/acoustid-fingerprinter/files/patch-decoder.h
@@ -1,6 +1,6 @@
---- decoder.h.orig 2013-10-21 12:47:16.077685162 -0200
-+++ decoder.h 2013-10-21 12:47:47.588683149 -0200
-@@ -35,6 +35,10 @@
+--- decoder.h.orig 2012-09-05 18:43:51 UTC
++++ decoder.h
+@@ -35,6 +35,10 @@ extern "C" {
}
#include "fingerprintcalculator.h"
diff --git a/audio/aften/files/patch-libaften__cpu_caps.h b/audio/aften/files/patch-libaften__cpu_caps.h
deleted file mode 100644
index df018924efc2..000000000000
--- a/audio/aften/files/patch-libaften__cpu_caps.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./libaften/cpu_caps.h.orig 2007-08-11 18:13:25.000000000 +0200
-+++ ./libaften/cpu_caps.h 2010-04-03 00:31:40.000000000 +0200
-@@ -26,6 +26,7 @@
- #include "ppc_cpu_caps.h"
- #else
- static inline void cpu_caps_detect(void){}
-+static inline void apply_simd_restrictions(__unused AftenSimdInstructions *simd_instructions){}
- #endif
-
- #endif /* CPU_CAPS_H */
diff --git a/audio/aften/files/patch-libaften_cpu__caps.h b/audio/aften/files/patch-libaften_cpu__caps.h
new file mode 100644
index 000000000000..b4b196655367
--- /dev/null
+++ b/audio/aften/files/patch-libaften_cpu__caps.h
@@ -0,0 +1,10 @@
+--- libaften/cpu_caps.h.orig 2007-08-11 16:13:25 UTC
++++ libaften/cpu_caps.h
+@@ -26,6 +26,7 @@
+ #include "ppc_cpu_caps.h"
+ #else
+ static inline void cpu_caps_detect(void){}
++static inline void apply_simd_restrictions(__unused AftenSimdInstructions *simd_instructions){}
+ #endif
+
+ #endif /* CPU_CAPS_H */
diff --git a/audio/alienwah/files/patch-aw.cpp b/audio/alienwah/files/patch-aw.cpp
index 29267cc30a31..fe62555116fb 100644
--- a/audio/alienwah/files/patch-aw.cpp
+++ b/audio/alienwah/files/patch-aw.cpp
@@ -1,6 +1,6 @@
---- aw.cpp.orig 2002-01-26 02:51:03.000000000 +0900
-+++ aw.cpp 2013-12-04 04:50:18.000000000 +0900
-@@ -62,11 +62,11 @@
+--- aw.cpp.orig 2002-01-25 17:51:03 UTC
++++ aw.cpp
+@@ -62,11 +62,11 @@ The output of this effect is the real pa
/*****************************************************************************/
@@ -17,7 +17,7 @@
/*****************************************************************************/
-@@ -85,6 +85,8 @@
+@@ -85,6 +85,8 @@ The output of this effect is the real pa
#define AW_INPUT2 6
#define AW_OUTPUT2 7
@@ -26,7 +26,7 @@
/*****************************************************************************/
/* Make number of samples represented by 'delay' proportional to
* the sample rate, such that delay=1 is 1 sample buffer at
-@@ -118,10 +120,10 @@
+@@ -118,10 +120,10 @@ unsigned long t; //??
unsigned long t2; //??
unsigned long k; // index for delaybuf
unsigned long k2; // index for delaybuf2
@@ -41,7 +41,7 @@
float freq;
float startphase;
float feedback;
-@@ -135,25 +137,61 @@
+@@ -135,25 +137,61 @@ AW(const long lSampleRate) :
samplerate(lSampleRate),
t(0), t2(0),
k(0), k2(0),
@@ -86,10 +86,10 @@
+ delaybuf[i] = std::complex<float>(0,0);
+ }
+}
-
-+};
+
++};
+
+
+/*
+ * simply calls the constructor
+ */
@@ -111,7 +111,7 @@
switch (port) {
case AW_FREQ:
((AW *)instance)->lfreq = *datalocation;
-@@ -182,41 +220,19 @@
+@@ -182,41 +220,19 @@ friend void connectPortToAW(LADSPA_Handl
* connect_port may be called before of after here, so we
* cannot rely upon port data for initialization
*/
@@ -158,7 +158,7 @@
float lfoskip = me->freq * 2 * PI / me->samplerate;
if (! me->inited) me->initState(1);
-@@ -224,7 +240,7 @@
+@@ -224,7 +240,7 @@ friend void runAW_Mono(LADSPA_Handle ins
for(unsigned int i=0; i<samplecount; ++i) {
if ((me->t++ % LFO_SKIPSAMPLES) == 0) {
lfo = 1 + cos(me->t * lfoskip + me->startphase);
@@ -167,7 +167,7 @@
sin(lfo) * me->feedback);
}
outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) *
-@@ -238,10 +254,11 @@
+@@ -238,10 +254,11 @@ friend void runAW_Mono(LADSPA_Handle ins
/*
* Stereo effect?
*/
@@ -181,7 +181,7 @@
float lfoskip = me->freq * 2 * PI / me->samplerate;
if (! me->inited) me->initState(2);
-@@ -249,7 +266,7 @@
+@@ -249,7 +266,7 @@ friend void runAW_Stereo(LADSPA_Handle i
for(unsigned int i=0; i<samplecount; ++i) {
if ((me->t++ % LFO_SKIPSAMPLES) == 0) {
lfo = 1 + cos(me->t * lfoskip + me->startphase);
@@ -190,7 +190,7 @@
sin(lfo) * me->feedback);
}
outc = me->c * me->delaybuf[me->k] + (1 - me->feedback) *
-@@ -262,7 +279,7 @@
+@@ -262,7 +279,7 @@ friend void runAW_Stereo(LADSPA_Handle i
for(unsigned int i=0; i<samplecount; ++i) {
if ((me->t2++ % LFO_SKIPSAMPLES) == 0) {
lfo = 1 + cos(me->t2 * lfoskip);
@@ -199,7 +199,7 @@
sin(lfo) * me->feedback);
}
outc = me->c2 * me->delaybuf2[me->k2] + (1 - me->feedback) *
-@@ -273,13 +290,11 @@
+@@ -273,13 +290,11 @@ friend void runAW_Stereo(LADSPA_Handle i
}
}
@@ -216,7 +216,7 @@
/*****************************************************************************/
typedef char * char_ptr;
-@@ -342,7 +357,7 @@
+@@ -342,7 +357,7 @@ StartupShutdownHandler() {
desc[plug]->PortCount
= 6;
portdesc
@@ -225,7 +225,7 @@
desc[plug]->PortDescriptors
= (const LADSPA_PortDescriptor *)portdesc;
portdesc[AW_FREQ]
-@@ -358,7 +373,7 @@
+@@ -358,7 +373,7 @@ StartupShutdownHandler() {
portdesc[AW_OUTPUT1]
= LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
pnames
@@ -234,7 +234,7 @@
desc[plug]->PortNames
= (const char **)pnames;
pnames[AW_FREQ]
-@@ -376,7 +391,7 @@
+@@ -376,7 +391,7 @@ StartupShutdownHandler() {
/* range hints */
rangehints
@@ -243,7 +243,7 @@
desc[plug]->PortRangeHints
= (const LADSPA_PortRangeHint *)rangehints;
-@@ -417,7 +432,7 @@
+@@ -417,7 +432,7 @@ StartupShutdownHandler() {
desc[plug]->PortCount
= 8;
portdesc
@@ -252,7 +252,7 @@
desc[plug]->PortDescriptors
= (const LADSPA_PortDescriptor *)portdesc;
portdesc[AW_FREQ]
-@@ -437,7 +452,7 @@
+@@ -437,7 +452,7 @@ StartupShutdownHandler() {
portdesc[AW_OUTPUT1]
= LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
pnames
@@ -261,7 +261,7 @@
desc[plug]->PortNames
= (const char **)pnames;
pnames[AW_FREQ]
-@@ -459,7 +474,7 @@
+@@ -459,7 +474,7 @@ StartupShutdownHandler() {
/* range hints */
rangehints
diff --git a/audio/alsa-lib/files/patch-include__pcm.h b/audio/alsa-lib/files/patch-include__pcm.h
deleted file mode 100644
index ab9f6709a3dd..000000000000
--- a/audio/alsa-lib/files/patch-include__pcm.h
+++ /dev/null
@@ -1,16 +0,0 @@
---- include/pcm.h~
-+++ include/pcm.h
-@@ -29,6 +29,13 @@
- #ifndef __ALSA_PCM_H
- #define __ALSA_PCM_H
-
-+#ifndef ESTRPIPE
-+#define ESTRPIPE EPIPE
-+#endif
-+#ifndef EBADFD
-+#define EBADFD EBADF
-+#endif
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
diff --git a/audio/alsa-lib/files/patch-include_pcm.h b/audio/alsa-lib/files/patch-include_pcm.h
new file mode 100644
index 000000000000..6dd552dd0db4
--- /dev/null
+++ b/audio/alsa-lib/files/patch-include_pcm.h
@@ -0,0 +1,16 @@
+--- include/pcm.h.orig 2016-03-31 13:10:39 UTC
++++ include/pcm.h
+@@ -29,6 +29,13 @@
+ #ifndef __ALSA_PCM_H
+ #define __ALSA_PCM_H
+
++#ifndef ESTRPIPE
++#define ESTRPIPE EPIPE
++#endif
++#ifndef EBADFD
++#define EBADFD EBADF
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/audio/alsa-lib/files/patch-src__async.c b/audio/alsa-lib/files/patch-src__async.c
deleted file mode 100644
index 09d019004c13..000000000000
--- a/audio/alsa-lib/files/patch-src__async.c
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
-
---- src/async.c~
-+++ src/async.c
-@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
-
- static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
- {
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+ /* XXX XXX XXX */
-+ struct list_head *i;
-+ list_for_each(i, &snd_async_handlers) {
-+ snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
-+ if (h->callback)
-+ h->callback(h);
-+ }
-+#else
- int fd;
- struct list_head *i;
- //assert(siginfo->si_code == SI_SIGIO);
-@@ -60,6 +69,7 @@ static void snd_async_handler(int signo
- if (h->fd == fd && h->callback)
- h->callback(h);
- }
-+#endif
- }
-
- /**
diff --git a/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c b/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c
deleted file mode 100644
index ba2ee2b2e6af..000000000000
--- a/audio/alsa-lib/files/patch-src__pcm__pcm_direct.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/pcm/pcm_direct.c~
-+++ src/pcm/pcm_direct.c
-@@ -44,12 +44,16 @@
- *
- */
-
-+#if defined(__NetBSD__)
-+typedef __semun semun;
-+#elif !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
- union semun {
- int val; /* Value for SETVAL */
- struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
- unsigned short *array; /* Array for GETALL, SETALL */
- struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */
- };
-+#endif
-
- /*
- * FIXME:
diff --git a/audio/alsa-lib/files/patch-src_async.c b/audio/alsa-lib/files/patch-src_async.c
new file mode 100644
index 000000000000..2502546a94cf
--- /dev/null
+++ b/audio/alsa-lib/files/patch-src_async.c
@@ -0,0 +1,28 @@
+$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
+
+--- src/async.c.orig 2016-03-31 13:10:39 UTC
++++ src/async.c
+@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
+
+ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
+ {
++#if defined(__DragonFly__) || defined(__FreeBSD__)
++ /* XXX XXX XXX */
++ struct list_head *i;
++ list_for_each(i, &snd_async_handlers) {
++ snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
++ if (h->callback)
++ h->callback(h);
++ }
++#else
+ int fd;
+ struct list_head *i;
+ //assert(siginfo->si_code == SI_SIGIO);
+@@ -60,6 +69,7 @@ static void snd_async_handler(int signo
+ if (h->fd == fd && h->callback)
+ h->callback(h);
+ }
++#endif
+ }
+
+ /**
diff --git a/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c b/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c
new file mode 100644
index 000000000000..02e5d5e4ade6
--- /dev/null
+++ b/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c
@@ -0,0 +1,19 @@
+--- src/pcm/pcm_direct.c.orig 2016-03-31 13:10:39 UTC
++++ src/pcm/pcm_direct.c
+@@ -44,12 +44,16 @@
+ *
+ */
+
++#if defined(__NetBSD__)
++typedef __semun semun;
++#elif !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+ union semun {
+ int val; /* Value for SETVAL */
+ struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
+ unsigned short *array; /* Array for GETALL, SETALL */
+ struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */
+ };
++#endif
+
+ /*
+ * FIXME:
diff --git a/audio/alsa-lib/files/patch-test_midifile.c b/audio/alsa-lib/files/patch-test_midifile.c
index 7a176a056abd..7c970b7548af 100644
--- a/audio/alsa-lib/files/patch-test_midifile.c
+++ b/audio/alsa-lib/files/patch-test_midifile.c
@@ -1,4 +1,4 @@
---- test/midifile.c.orig 2015-02-26 12:34:52 UTC
+--- test/midifile.c.orig 2016-03-31 13:10:39 UTC
+++ test/midifile.c
@@ -71,7 +71,7 @@
#endif
diff --git a/audio/alsa-plugins/files/patch-arcam-av-arcam_av.c b/audio/alsa-plugins/files/patch-arcam-av-arcam_av.c
deleted file mode 100644
index 2826201f10a5..000000000000
--- a/audio/alsa-plugins/files/patch-arcam-av-arcam_av.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- arcam-av/arcam_av.c.orig
-+++ arcam-av/arcam_av.c
-@@ -27,6 +27,7 @@
- #include <signal.h>
- #include <stddef.h>
- #include <stdio.h>
-+#include <string.h>
- #include <termios.h>
- #include <unistd.h>
-
-@@ -37,6 +38,8 @@
- #include <sys/socket.h>
- #include <sys/un.h>
-
-+#define AF_FILE AF_UNIX
-+
- #define MIN(a, b) ((a) < (b) ? (a) : (b))
- #define MAX(a, b) ((a) > (b) ? (a) : (b))
-
diff --git a/audio/alsa-plugins/files/patch-arcam-av_arcam__av.c b/audio/alsa-plugins/files/patch-arcam-av_arcam__av.c
new file mode 100644
index 000000000000..814076306326
--- /dev/null
+++ b/audio/alsa-plugins/files/patch-arcam-av_arcam__av.c
@@ -0,0 +1,19 @@
+--- arcam-av/arcam_av.c.orig 2016-03-31 13:11:29 UTC
++++ arcam-av/arcam_av.c
+@@ -27,6 +27,7 @@
+ #include <signal.h>
+ #include <stddef.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <termios.h>
+ #include <unistd.h>
+
+@@ -38,6 +39,8 @@
+ #include <sys/socket.h>
+ #include <sys/un.h>
+
++#define AF_FILE AF_UNIX
++
+ #define MIN(a, b) ((a) < (b) ? (a) : (b))
+ #define MAX(a, b) ((a) > (b) ? (a) : (b))
+
diff --git a/audio/alsa-plugins/files/patch-configure b/audio/alsa-plugins/files/patch-configure
index a0da753a0c6d..a44bae152692 100644
--- a/audio/alsa-plugins/files/patch-configure
+++ b/audio/alsa-plugins/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2010-04-16 13:18:56.000000000 +0200
-+++ configure 2010-05-11 00:08:29.000000000 +0200
-@@ -19608,14 +19608,6 @@ else
+--- configure.orig 2016-03-31 13:14:07 UTC
++++ configure
+@@ -12402,14 +12402,6 @@ else
$as_echo "yes" >&6; }
HAVE_SPEEXDSP="yes"
fi
@@ -15,7 +15,7 @@
# Check whether --with-speex was given.
-@@ -19626,6 +19618,15 @@ else
+@@ -12420,6 +12412,15 @@ else
fi
diff --git a/audio/alsa-plugins/files/patch-oss-ctl_oss.c b/audio/alsa-plugins/files/patch-oss-ctl_oss.c
deleted file mode 100644
index e7e38139f7d9..000000000000
--- a/audio/alsa-plugins/files/patch-oss-ctl_oss.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- oss/ctl_oss.c.orig 2008-10-29 08:42:13.000000000 -0400
-+++ oss/ctl_oss.c
-@@ -26,7 +26,11 @@
- #include <sys/ioctl.h>
- #include <alsa/asoundlib.h>
- #include <alsa/control_external.h>
-+#ifdef __linux__
- #include <linux/soundcard.h>
-+#else
-+#include <sys/soundcard.h>
-+#endif
-
- typedef struct snd_ctl_oss {
- snd_ctl_ext_t ext;
-@@ -52,7 +56,7 @@ static const char *const vol_devices[SOU
- [SOUND_MIXER_CD] = "CD Playback Volume",
- [SOUND_MIXER_IMIX] = "Monitor Mix Playback Volume",
- [SOUND_MIXER_ALTPCM] = "Headphone Playback Volume",
-- [SOUND_MIXER_RECLEV] = "Capture Volume",
-+ [SOUND_MIXER_RECLEV] = "Master Capture Volume",
- [SOUND_MIXER_IGAIN] = "Capture Volume",
- [SOUND_MIXER_OGAIN] = "Playback Volume",
- [SOUND_MIXER_LINE1] = "Aux Playback Volume",
diff --git a/audio/alsa-plugins/files/patch-oss-pcm_oss.c b/audio/alsa-plugins/files/patch-oss-pcm_oss.c
deleted file mode 100644
index 98de34bb8d74..000000000000
--- a/audio/alsa-plugins/files/patch-oss-pcm_oss.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- oss/pcm_oss.c.orig 2008-10-29 08:42:13.000000000 -0400
-+++ oss/pcm_oss.c
-@@ -22,4 +22,8 @@
- #include <sys/ioctl.h>
- #include <alsa/asoundlib.h>
- #include <alsa/pcm_external.h>
-+#ifdef __linux__
- #include <linux/soundcard.h>
-+#else
-+#include <sys/soundcard.h>
-+#endif
-@@ -116,7 +120,7 @@ static int oss_drain(snd_pcm_ioplug_t *i
- snd_pcm_oss_t *oss = io->private_data;
-
- if (io->stream == SND_PCM_STREAM_PLAYBACK)
-- ioctl(oss->fd, SNDCTL_DSP_SYNC);
-+ ioctl(oss->fd, SNDCTL_DSP_SYNC, NULL);
- return 0;
- }
-
-@@ -125,7 +129,7 @@ static int oss_prepare(snd_pcm_ioplug_t
- snd_pcm_oss_t *oss = io->private_data;
- int tmp;
-
-- ioctl(oss->fd, SNDCTL_DSP_RESET);
-+ ioctl(oss->fd, SNDCTL_DSP_RESET, NULL);
-
- tmp = io->channels;
- if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
diff --git a/audio/alsa-plugins/files/patch-oss_ctl__oss.c b/audio/alsa-plugins/files/patch-oss_ctl__oss.c
new file mode 100644
index 000000000000..0e103a7fa1d8
--- /dev/null
+++ b/audio/alsa-plugins/files/patch-oss_ctl__oss.c
@@ -0,0 +1,23 @@
+--- oss/ctl_oss.c.orig 2016-07-26 13:27:23 UTC
++++ oss/ctl_oss.c
+@@ -26,7 +26,11 @@
+ #include <sys/ioctl.h>
+ #include <alsa/asoundlib.h>
+ #include <alsa/control_external.h>
++#ifdef __linux__
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+
+ typedef struct snd_ctl_oss {
+ snd_ctl_ext_t ext;
+@@ -52,7 +56,7 @@ static const char *const vol_devices[SOU
+ [SOUND_MIXER_CD] = "CD Playback Volume",
+ [SOUND_MIXER_IMIX] = "Monitor Mix Playback Volume",
+ [SOUND_MIXER_ALTPCM] = "Headphone Playback Volume",
+- [SOUND_MIXER_RECLEV] = "Capture Volume",
++ [SOUND_MIXER_RECLEV] = "Master Capture Volume",
+ [SOUND_MIXER_IGAIN] = "Capture Volume",
+ [SOUND_MIXER_OGAIN] = "Playback Volume",
+ [SOUND_MIXER_LINE1] = "Aux Playback Volume",
diff --git a/audio/alsa-plugins/files/patch-oss_pcm__oss.c b/audio/alsa-plugins/files/patch-oss_pcm__oss.c
new file mode 100644
index 000000000000..79966ae29fb8
--- /dev/null
+++ b/audio/alsa-plugins/files/patch-oss_pcm__oss.c
@@ -0,0 +1,32 @@
+--- oss/pcm_oss.c.orig 2016-07-26 13:27:23 UTC
++++ oss/pcm_oss.c
+@@ -22,7 +22,11 @@
+ #include <sys/ioctl.h>
+ #include <alsa/asoundlib.h>
+ #include <alsa/pcm_external.h>
++#ifdef __linux__
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+
+ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
+
+@@ -258,7 +262,7 @@ static int oss_drain(snd_pcm_ioplug_t *i
+ #endif
+
+ if (io->stream == SND_PCM_STREAM_PLAYBACK)
+- ioctl(oss->fd, SNDCTL_DSP_SYNC);
++ ioctl(oss->fd, SNDCTL_DSP_SYNC, NULL);
+ return 0;
+ }
+
+@@ -272,7 +276,7 @@ static int oss_prepare(snd_pcm_ioplug_t
+ fprintf(stderr, "%s()\n", __func__);
+ #endif
+
+- ioctl(oss->fd, SNDCTL_DSP_RESET);
++ ioctl(oss->fd, SNDCTL_DSP_RESET, NULL);
+
+ tmp = io->channels;
+ if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
diff --git a/audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c b/audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c
new file mode 100644
index 000000000000..89923343718c
--- /dev/null
+++ b/audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c
@@ -0,0 +1,86 @@
+based on https://github.com/dankamongmen/libdank/blob/master/libdank/compat-FreeBSD.c
+
+--- usb_stream/pcm_usb_stream.c.orig 2016-03-31 13:11:29 UTC
++++ usb_stream/pcm_usb_stream.c
+@@ -79,6 +79,69 @@ typedef struct {
+ static struct user_usb_stream *uus;
+ static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER;
+
++#ifndef __linux__
++/*
++ * Copyright (c) 2000-2011, Nick Black et al
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions are met:
++ * * Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * * Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * * Neither the name of Nick Black nor the names of other contributors may
++ * be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
++ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
++ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <copyright
++ * holder> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
++ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGE.
++ */
++
++// This is suitable really only for use with libdank's mremap_and_ftruncate(),
++// due to assumptions it makes about the flags to pass to mmap(2). The only
++// mremap(2) use case addressed is that of MREMAP_MAYMOVE. oldaddr must be a
++// valid previous return from mmap(); NULL is not acceptable (ala Linux's
++// mremap(2)), resulting in undefined behavior, despite realloc(3) semantics.
++// Similarly, oldlen and newlen must be non-zero (and page-aligned).
++void *mremap_compat(int fd,void *oldaddr,size_t oldlen,
++ size_t newlen,int prot,int flags){
++ void *ret;
++
++ // From mmap(2) on freebsd 6.3: A successful FIXED mmap deletes any
++ // previous mapping in the allocated address range. This means:
++ // remapping over a current map will blow it away (unless FIXED isn't
++ // provided, in which case it can't overlap an old mapping. See bug
++ // 733 for extensive discussion of this issue for Linux and FreeBSD).
++ if((ret = mmap((char *)oldaddr + oldlen,newlen - oldlen,prot,flags,fd,oldlen)) == MAP_FAILED){
++ // We couldn't get the memory whatsoever (or we were a fresh
++ // allocation that succeeded). Return the immediate result...
++ return ret;
++ } // ret != MAP_FAILED. Did we squash?
++ if(ret != (char *)oldaddr + oldlen){
++ // We got the memory, but not where we wanted it. Copy over the
++ // old map, and then free it up...
++ munmap(ret,newlen - oldlen);
++ if((ret = mmap(NULL,newlen,prot,flags,fd,0)) == MAP_FAILED){
++ return ret;
++ }
++ memcpy(ret,oldaddr,oldlen);
++ munmap(oldaddr,oldlen); // Free the old mapping
++ return ret;
++ } // We successfully squashed. Return a pointer to the first buf.
++ return oldaddr;
++}
++#endif
++
+ static struct user_usb_stream *get_uus(const char *card)
+ {
+ pthread_mutex_lock(&uus_mutex);
+@@ -219,7 +282,11 @@ static int snd_pcm_us_prepare(snd_pcm_io
+ }
+
+
++#ifdef __linux__
+ uus->s = mremap(uus->s, sizeof(struct usb_stream), uus->s->read_size, MREMAP_MAYMOVE);
++#else
++ uus->s = mremap_compat(us->pfd.fd, uus->s, sizeof(struct usb_stream), uus->s->read_size, PROT_READ, MAP_SHARED);
++#endif
+ if (MAP_FAILED == uus->s) {
+ perror("ALSA/USX2Y: mmap");
+ return -EPERM;
diff --git a/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c b/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c
deleted file mode 100644
index 5dd11f5555ce..000000000000
--- a/audio/alsa-plugins/files/patch-usb_stream-pcm_usb_stream.c
+++ /dev/null
@@ -1,86 +0,0 @@
-based on https://github.com/dankamongmen/libdank/blob/master/libdank/compat-FreeBSD.c
-
---- usb_stream/pcm_usb_stream.c.orig
-+++ usb_stream/pcm_usb_stream.c
-@@ -79,6 +81,69 @@ typedef struct {
- static struct user_usb_stream *uus;
- static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-+#ifndef __linux__
-+/*
-+ * Copyright (c) 2000-2011, Nick Black et al
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ * * Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * * Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * * Neither the name of Nick Black nor the names of other contributors may
-+ * be used to endorse or promote products derived from this software
-+ * without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <copyright
-+ * holder> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-+ * POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+// This is suitable really only for use with libdank's mremap_and_ftruncate(),
-+// due to assumptions it makes about the flags to pass to mmap(2). The only
-+// mremap(2) use case addressed is that of MREMAP_MAYMOVE. oldaddr must be a
-+// valid previous return from mmap(); NULL is not acceptable (ala Linux's
-+// mremap(2)), resulting in undefined behavior, despite realloc(3) semantics.
-+// Similarly, oldlen and newlen must be non-zero (and page-aligned).
-+void *mremap_compat(int fd,void *oldaddr,size_t oldlen,
-+ size_t newlen,int prot,int flags){
-+ void *ret;
-+
-+ // From mmap(2) on freebsd 6.3: A successful FIXED mmap deletes any
-+ // previous mapping in the allocated address range. This means:
-+ // remapping over a current map will blow it away (unless FIXED isn't
-+ // provided, in which case it can't overlap an old mapping. See bug
-+ // 733 for extensive discussion of this issue for Linux and FreeBSD).
-+ if((ret = mmap((char *)oldaddr + oldlen,newlen - oldlen,prot,flags,fd,oldlen)) == MAP_FAILED){
-+ // We couldn't get the memory whatsoever (or we were a fresh
-+ // allocation that succeeded). Return the immediate result...
-+ return ret;
-+ } // ret != MAP_FAILED. Did we squash?
-+ if(ret != (char *)oldaddr + oldlen){
-+ // We got the memory, but not where we wanted it. Copy over the
-+ // old map, and then free it up...
-+ munmap(ret,newlen - oldlen);
-+ if((ret = mmap(NULL,newlen,prot,flags,fd,0)) == MAP_FAILED){
-+ return ret;
-+ }
-+ memcpy(ret,oldaddr,oldlen);
-+ munmap(oldaddr,oldlen); // Free the old mapping
-+ return ret;
-+ } // We successfully squashed. Return a pointer to the first buf.
-+ return oldaddr;
-+}
-+#endif
-+
- static struct user_usb_stream *get_uus(const char *card)
- {
- pthread_mutex_lock(&uus_mutex);
-@@ -219,7 +284,11 @@ static int snd_pcm_us_prepare(snd_pcm_io
- }
-
-
-+#ifdef __linux__
- uus->s = mremap(uus->s, sizeof(struct usb_stream), uus->s->read_size, MREMAP_MAYMOVE);
-+#else
-+ uus->s = mremap_compat(us->pfd.fd, uus->s, sizeof(struct usb_stream), uus->s->read_size, PROT_READ, MAP_SHARED);
-+#endif
- if (MAP_FAILED == uus->s) {
- perror("ALSA/USX2Y: mmap");
- return -EPERM;
diff --git a/audio/alsa-utils/files/patch-alsaloop__alsaloop.c b/audio/alsa-utils/files/patch-alsaloop__alsaloop.c
deleted file mode 100644
index 22b0102aecb5..000000000000
--- a/audio/alsa-utils/files/patch-alsaloop__alsaloop.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- alsaloop/alsaloop.c~
-+++ alsaloop/alsaloop.c
-@@ -760,7 +761,11 @@ static void thread_job1(void *_data)
- snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
- }
- if (err < 0) {
-+#ifdef ERESTART
- if (err == -EINTR || err == -ERESTART)
-+#else
-+ if (err == -EINTR)
-+#endif
- continue;
- logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
- my_exit(thread, EXIT_FAILURE);
diff --git a/audio/alsa-utils/files/patch-alsaloop_alsaloop.c b/audio/alsa-utils/files/patch-alsaloop_alsaloop.c
new file mode 100644
index 000000000000..f3a9c4d7e908
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsaloop_alsaloop.c
@@ -0,0 +1,14 @@
+--- alsaloop/alsaloop.c.orig 2016-03-31 14:37:02 UTC
++++ alsaloop/alsaloop.c
+@@ -760,7 +760,11 @@ static void thread_job1(void *_data)
+ snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
+ }
+ if (err < 0) {
++#ifdef ERESTART
+ if (err == -EINTR || err == -ERESTART)
++#else
++ if (err == -EINTR)
++#endif
+ continue;
+ logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
+ my_exit(thread, EXIT_FAILURE);
diff --git a/audio/alsa-utils/files/patch-alsamixer__mixer_display.c b/audio/alsa-utils/files/patch-alsamixer__mixer_display.c
deleted file mode 100644
index f3c645dcbf90..000000000000
--- a/audio/alsa-utils/files/patch-alsamixer__mixer_display.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- alsamixer/mixer_display.c~
-+++ alsamixer/mixer_display.c
-@@ -17,7 +17,9 @@
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#ifdef __GLIBC__
- #define _C99_SOURCE /* lrint() */
-+#endif
- #include "aconfig.h"
- #include <stdlib.h>
- #include <string.h>
diff --git a/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c b/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c
deleted file mode 100644
index ba1dd03ad509..000000000000
--- a/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- alsamixer/volume_mapping.c~
-+++ alsamixer/volume_mapping.c
-@@ -37,7 +37,7 @@
- #include <stdbool.h>
- #include "volume_mapping.h"
-
--#ifdef __UCLIBC__
-+#ifndef __GLIBC__
- /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
- #define exp10(x) (exp((x) * log(10)))
- #endif /* __UCLIBC__ */
diff --git a/audio/alsa-utils/files/patch-alsamixer_mixer__display.c b/audio/alsa-utils/files/patch-alsamixer_mixer__display.c
new file mode 100644
index 000000000000..328182419f96
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsamixer_mixer__display.c
@@ -0,0 +1,12 @@
+--- alsamixer/mixer_display.c.orig 2016-03-31 14:37:02 UTC
++++ alsamixer/mixer_display.c
+@@ -17,7 +17,9 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#ifdef __GLIBC__
+ #define _C99_SOURCE /* lrint() */
++#endif
+ #include "aconfig.h"
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/audio/alsa-utils/files/patch-alsamixer_volume__mapping.c b/audio/alsa-utils/files/patch-alsamixer_volume__mapping.c
new file mode 100644
index 000000000000..34cc3e0973a2
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsamixer_volume__mapping.c
@@ -0,0 +1,11 @@
+--- alsamixer/volume_mapping.c.orig 2016-03-31 14:37:02 UTC
++++ alsamixer/volume_mapping.c
+@@ -37,7 +37,7 @@
+ #include <stdbool.h>
+ #include "volume_mapping.h"
+
+-#ifdef __UCLIBC__
++#ifndef __GLIBC__
+ /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
+ #define exp10(x) (exp((x) * log(10)))
+ #endif /* __UCLIBC__ */
diff --git a/audio/alsa-utils/files/patch-aplay__aplay.c b/audio/alsa-utils/files/patch-aplay__aplay.c
deleted file mode 100644
index 3cccaaa39c45..000000000000
--- a/audio/alsa-utils/files/patch-aplay__aplay.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- aplay/aplay.c~
-+++ aplay/aplay.c
-@@ -48,7 +48,6 @@
- #include <sys/time.h>
- #include <sys/stat.h>
- #include <sys/types.h>
--#include <endian.h>
- #include "aconfig.h"
- #include "gettext.h"
- #include "formats.h"
-@@ -70,6 +69,12 @@
- #define be32toh(x) __be32_to_cpu(x)
- #endif
-
-+#ifndef _LARGEFILE64_SOURCE
-+/* assume modern system */
-+typedef off_t off64_t;
-+#define lseek64 lseek
-+#endif
-+
- #define DEFAULT_FORMAT SND_PCM_FORMAT_U8
- #define DEFAULT_SPEED 8000
-
diff --git a/audio/alsa-utils/files/patch-aplay__formats.h b/audio/alsa-utils/files/patch-aplay__formats.h
deleted file mode 100644
index 56309d22103f..000000000000
--- a/audio/alsa-utils/files/patch-aplay__formats.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- aplay/formats.h~
-+++ aplay/formats.h
-@@ -1,7 +1,6 @@
- #ifndef FORMATS_H
- #define FORMATS_H 1
-
--#include <endian.h>
- #include <byteswap.h>
-
- /* Definitions for .VOC files */
diff --git a/audio/alsa-utils/files/patch-aplay_aplay.c b/audio/alsa-utils/files/patch-aplay_aplay.c
new file mode 100644
index 000000000000..f50a227535d9
--- /dev/null
+++ b/audio/alsa-utils/files/patch-aplay_aplay.c
@@ -0,0 +1,23 @@
+--- aplay/aplay.c.orig 2016-03-31 14:37:02 UTC
++++ aplay/aplay.c
+@@ -48,7 +48,6 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <endian.h>
+ #include "aconfig.h"
+ #include "gettext.h"
+ #include "formats.h"
+@@ -70,6 +69,12 @@
+ #define be32toh(x) __be32_to_cpu(x)
+ #endif
+
++#ifndef _LARGEFILE64_SOURCE
++/* assume modern system */
++typedef off_t off64_t;
++#define lseek64 lseek
++#endif
++
+ #define DEFAULT_FORMAT SND_PCM_FORMAT_U8
+ #define DEFAULT_SPEED 8000
+
diff --git a/audio/alsa-utils/files/patch-aplay_formats.h b/audio/alsa-utils/files/patch-aplay_formats.h
new file mode 100644
index 000000000000..fa232b58bf42
--- /dev/null
+++ b/audio/alsa-utils/files/patch-aplay_formats.h
@@ -0,0 +1,10 @@
+--- aplay/formats.h.orig 2016-03-31 14:37:02 UTC
++++ aplay/formats.h
+@@ -1,7 +1,6 @@
+ #ifndef FORMATS_H
+ #define FORMATS_H 1
+
+-#include <endian.h>
+ #include <byteswap.h>
+
+ /* Definitions for .VOC files */
diff --git a/audio/alure/files/patch-src__codec_fluidsynth.cpp b/audio/alure/files/patch-src__codec_fluidsynth.cpp
deleted file mode 100644
index 145415b2781a..000000000000
--- a/audio/alure/files/patch-src__codec_fluidsynth.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./src/codec_fluidsynth.cpp.orig 2011-07-29 10:37:48.000000000 +0200
-+++ ./src/codec_fluidsynth.cpp 2014-01-22 01:32:03.000000000 +0100
-@@ -27,6 +27,7 @@
-
- #include <string.h>
- #include <assert.h>
-+#include <unistd.h>
- #ifdef _WIN32
- #include <io.h>
- #endif
diff --git a/audio/alure/files/patch-src_codec__fluidsynth.cpp b/audio/alure/files/patch-src_codec__fluidsynth.cpp
new file mode 100644
index 000000000000..c1002f6bd646
--- /dev/null
+++ b/audio/alure/files/patch-src_codec__fluidsynth.cpp
@@ -0,0 +1,10 @@
+--- src/codec_fluidsynth.cpp.orig 2011-07-29 08:37:48 UTC
++++ src/codec_fluidsynth.cpp
+@@ -27,6 +27,7 @@
+
+ #include <string.h>
+ #include <assert.h>
++#include <unistd.h>
+ #ifdef _WIN32
+ #include <io.h>
+ #endif
diff --git a/audio/amarok-kde4/files/patch-src__core-impl__playlists__types__file__xspf__XSPFPlaylist.cpp b/audio/amarok-kde4/files/patch-src__core-impl__playlists__types__file__xspf__XSPFPlaylist.cpp
deleted file mode 100644
index b3164aab531b..000000000000
--- a/audio/amarok-kde4/files/patch-src__core-impl__playlists__types__file__xspf__XSPFPlaylist.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp.orig 2014-07-27 18:29:25.000000000 +0200
-+++ src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp 2014-07-27 18:29:43.000000000 +0200
-@@ -27,6 +27,7 @@
- #include "playlist/PlaylistController.h"
- #include "playlist/PlaylistModelStack.h"
-
-+using Playlist::ModelStack;
- using namespace Playlists;
-
- XSPFPlaylist::XSPFPlaylist( const KUrl &url, Playlists::PlaylistProvider *provider, OnLoadAction onLoad )
-@@ -101,7 +102,7 @@
- //FIXME: this needs to be moved to whatever is creating the XSPFPlaylist
- if( m_autoAppendAfterLoad )
- The::playlistController()->insertPlaylist(
-- ::Playlist::ModelStack::instance()->bottom()->rowCount(),
-+ ModelStack::instance()->bottom()->rowCount(),
- Playlists::PlaylistPtr( this )
- );
- }
diff --git a/audio/amarok-kde4/files/patch-src__musicbrainz__MusicDNSAudioDecoder.cpp b/audio/amarok-kde4/files/patch-src__musicbrainz__MusicDNSAudioDecoder.cpp
deleted file mode 100644
index 047cf89654cd..000000000000
--- a/audio/amarok-kde4/files/patch-src__musicbrainz__MusicDNSAudioDecoder.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-If this is not defined, libavutil/common.h fails because of this check:
-
-#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) && !defined(UINT64_C)
-#error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS
-#endif
-
-Not submitted upstream, as newer releases build with -std=c++0x, which always
-sets __STD_CONSTANT_MACROS by default.
---- src/musicbrainz/MusicDNSAudioDecoder.cpp.orig 2014-07-21 16:48:11.000000000 +0300
-+++ src/musicbrainz/MusicDNSAudioDecoder.cpp 2014-07-21 16:49:04.000000000 +0300
-@@ -14,6 +14,8 @@
- * this program. If not, see <http://www.gnu.org/licenses/>. *
- ****************************************************************************************/
-
-+#define __STDC_CONSTANT_MACROS
-+
- #define DEBUG_PREFIX "MusicDNSAudioDecoder"
-
- #include "MusicDNSAudioDecoder.h"
diff --git a/audio/amarok-kde4/files/patch-src__playlist__proxymodels__SortScheme.cpp b/audio/amarok-kde4/files/patch-src__playlist__proxymodels__SortScheme.cpp
deleted file mode 100644
index 282afce2f120..000000000000
--- a/audio/amarok-kde4/files/patch-src__playlist__proxymodels__SortScheme.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/playlist/proxymodels/SortScheme.cpp.orig 2014-07-27 18:27:06.000000000 +0200
-+++ src/playlist/proxymodels/SortScheme.cpp 2014-07-27 18:27:44.000000000 +0200
-@@ -123,13 +123,13 @@
- SortScheme::const_iterator
- SortScheme::begin() const
- {
-- return QStack::begin();
-+ return QStack<SortLevel>::begin();
- }
-
- SortScheme::const_iterator
- SortScheme::end() const
- {
-- return QStack::end();
-+ return QStack<SortLevel>::end();
- }
-
- } //namespace Playlist
diff --git a/audio/amarok-kde4/files/patch-src_core-impl_playlists_types_file_xspf_XSPFPlaylist.cpp b/audio/amarok-kde4/files/patch-src_core-impl_playlists_types_file_xspf_XSPFPlaylist.cpp
new file mode 100644
index 000000000000..e0cf9d2a7cab
--- /dev/null
+++ b/audio/amarok-kde4/files/patch-src_core-impl_playlists_types_file_xspf_XSPFPlaylist.cpp
@@ -0,0 +1,19 @@
+--- src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp.orig 2013-08-14 20:22:52 UTC
++++ src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp
+@@ -27,6 +27,7 @@
+ #include "playlist/PlaylistController.h"
+ #include "playlist/PlaylistModelStack.h"
+
++using Playlist::ModelStack;
+ using namespace Playlists;
+
+ XSPFPlaylist::XSPFPlaylist( const KUrl &url, Playlists::PlaylistProvider *provider, OnLoadAction onLoad )
+@@ -101,7 +102,7 @@ XSPFPlaylist::load()
+ //FIXME: this needs to be moved to whatever is creating the XSPFPlaylist
+ if( m_autoAppendAfterLoad )
+ The::playlistController()->insertPlaylist(
+- ::Playlist::ModelStack::instance()->bottom()->rowCount(),
++ ModelStack::instance()->bottom()->rowCount(),
+ Playlists::PlaylistPtr( this )
+ );
+ }
diff --git a/audio/amarok-kde4/files/patch-src_musicbrainz_MusicDNSAudioDecoder.cpp b/audio/amarok-kde4/files/patch-src_musicbrainz_MusicDNSAudioDecoder.cpp
new file mode 100644
index 000000000000..7e84d1dcce0b
--- /dev/null
+++ b/audio/amarok-kde4/files/patch-src_musicbrainz_MusicDNSAudioDecoder.cpp
@@ -0,0 +1,19 @@
+If this is not defined, libavutil/common.h fails because of this check:
+
+#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) && !defined(UINT64_C)
+#error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS
+#endif
+
+Not submitted upstream, as newer releases build with -std=c++0x, which always
+sets __STD_CONSTANT_MACROS by default.
+--- src/musicbrainz/MusicDNSAudioDecoder.cpp.orig 2013-08-14 20:22:52 UTC
++++ src/musicbrainz/MusicDNSAudioDecoder.cpp
+@@ -14,6 +14,8 @@
+ * this program. If not, see <http://www.gnu.org/licenses/>. *
+ ****************************************************************************************/
+
++#define __STDC_CONSTANT_MACROS
++
+ #define DEBUG_PREFIX "MusicDNSAudioDecoder"
+
+ #include "MusicDNSAudioDecoder.h"
diff --git a/audio/amarok-kde4/files/patch-src_playlist_proxymodels_SortScheme.cpp b/audio/amarok-kde4/files/patch-src_playlist_proxymodels_SortScheme.cpp
new file mode 100644
index 000000000000..31611edd4b3a
--- /dev/null
+++ b/audio/amarok-kde4/files/patch-src_playlist_proxymodels_SortScheme.cpp
@@ -0,0 +1,18 @@
+--- src/playlist/proxymodels/SortScheme.cpp.orig 2013-08-14 20:22:52 UTC
++++ src/playlist/proxymodels/SortScheme.cpp
+@@ -123,13 +123,13 @@ SortScheme::trimToLevel( int lastLevel )
+ SortScheme::const_iterator
+ SortScheme::begin() const
+ {
+- return QStack::begin();
++ return QStack<SortLevel>::begin();
+ }
+
+ SortScheme::const_iterator
+ SortScheme::end() const
+ {
+- return QStack::end();
++ return QStack<SortLevel>::end();
+ }
+
+ } //namespace Playlist
diff --git a/audio/amp/files/patch-audio.c b/audio/amp/files/patch-audio.c
index ba8aed625001..660fc47bcb3c 100644
--- a/audio/amp/files/patch-audio.c
+++ b/audio/amp/files/patch-audio.c
@@ -1,6 +1,6 @@
---- audio.c Sat Aug 23 08:30:21 1997
-+++ audio.c Wed Apr 13 00:22:25 2005
-@@ -56,7 +56,7 @@
+--- audio.c.orig 1997-08-23 11:30:21 UTC
++++ audio.c
+@@ -56,7 +56,7 @@ void statusDisplay(struct AUDIO_HEADER *
msg("{ %d } ",frameNo);
}
if (A_SHOW_TIME && !(frameNo%10)) {
@@ -9,7 +9,7 @@
minutes=seconds/60;
seconds=seconds % 60;
msg("[%d:%02d]",minutes,seconds);
-@@ -245,10 +245,6 @@
+@@ -245,10 +245,6 @@ void report_header_error(int err)
switch (err) {
case GETHDR_ERR: die("error reading mpeg bitstream. exiting.\n");
break;
@@ -20,7 +20,7 @@
case GETHDR_FL1: warn("ISO/MPEG layer 1 is not supported by amp (yet).\n");
break;
case GETHDR_FF : warn("free format bitstreams are not supported. sorry.\n");
-@@ -268,10 +264,10 @@
+@@ -268,10 +264,10 @@ int setup_audio(struct AUDIO_HEADER *hea
{
if (A_AUDIO_PLAY)
if (AUDIO_BUFFER_SIZE==0)
diff --git a/audio/amp/files/patch-audio.h b/audio/amp/files/patch-audio.h
index 88940fd95be2..e21d86cdf946 100644
--- a/audio/amp/files/patch-audio.h
+++ b/audio/amp/files/patch-audio.h
@@ -1,5 +1,5 @@
---- audio.h Thu Aug 21 10:00:18 1997
-+++ audio.h Wed Apr 13 00:21:47 2005
+--- audio.h.orig 1997-08-21 13:00:18 UTC
++++ audio.h
@@ -9,6 +9,7 @@
#include <stdio.h>
@@ -8,7 +8,7 @@
int ID;
int layer;
int protection_bit;
-@@ -55,8 +56,8 @@
+@@ -55,8 +56,8 @@ extern void report_header_error(int err)
extern int scalefac_l[2][2][22];
extern int scalefac_s[2][2][13][3];
@@ -19,7 +19,7 @@
extern short t_bitrate[2][3][15];
extern int is[2][578];
-@@ -64,7 +65,7 @@
+@@ -64,7 +65,7 @@ extern float xr[2][32][18];
extern int *t_l,*t_s;
extern int nch;
@@ -28,7 +28,7 @@
extern int A_QUIET,A_SHOW_CNT,A_FORMAT_WAVE,A_DUMP_BINARY;
extern int A_WRITE_TO_AUDIO,A_WRITE_TO_FILE;
-@@ -106,9 +107,14 @@
+@@ -106,9 +107,14 @@ float xr[2][32][18];
int *t_l,*t_s;
int nch;
@@ -46,7 +46,7 @@
};
/* GUI control stuff */
-@@ -143,28 +149,47 @@
+@@ -143,28 +149,47 @@ short t_bitrate[2][3][15] = {{
/* the last sfb is given implicitly on pg.28. of the standard. scalefactors
* for that one are 0, pretab also
*/
diff --git a/audio/amp/files/patch-audioIO_Linux.c b/audio/amp/files/patch-audioIO_Linux.c
deleted file mode 100644
index b5d69bf22062..000000000000
--- a/audio/amp/files/patch-audioIO_Linux.c
+++ /dev/null
@@ -1,41 +0,0 @@
---- audioIO_Linux.c.orig Sat May 31 10:47:58 1997
-+++ audioIO_Linux.c Fri Aug 23 14:46:27 2002
-@@ -21,12 +21,14 @@
- #ifdef HAVE_MACHINE_SOUNDCARD_H
- #include <machine/soundcard.h>
- #else
--#include <linux/soundcard.h>
-+#include <sys/soundcard.h>
- #endif
-
- /* optimal fragment size */
-
-+#ifndef OS_BSD
- int AUSIZ = 0;
-+#endif
-
- /* declare these static to effectively isolate the audio device */
-
-@@ -42,6 +44,9 @@
- void
- audioOpen(int frequency, int stereo, int volume)
- {
-+#ifdef OS_BSD
-+ int temp;
-+#endif
- int supportedMixers, play_format=AFMT_S16_LE;
-
- if ((audio_fd = open ("/dev/dsp", O_WRONLY, 0)) == -1)
-@@ -78,7 +83,12 @@
- if (volume != -1)
- audioSetVolume(volume);
-
-+#ifdef OS_BSD
-+ temp = AUSIZ;
-+ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &temp) == -1)
-+#else
- if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &AUSIZ) == -1)
-+#endif
- die("Unable to get fragment size\n");
- }
-
diff --git a/audio/amp/files/patch-audioIO__Linux.c b/audio/amp/files/patch-audioIO__Linux.c
new file mode 100644
index 000000000000..a11446effe43
--- /dev/null
+++ b/audio/amp/files/patch-audioIO__Linux.c
@@ -0,0 +1,41 @@
+--- audioIO_Linux.c.orig 1997-05-31 17:47:58 UTC
++++ audioIO_Linux.c
+@@ -21,12 +21,14 @@
+ #ifdef HAVE_MACHINE_SOUNDCARD_H
+ #include <machine/soundcard.h>
+ #else
+-#include <linux/soundcard.h>
++#include <sys/soundcard.h>
+ #endif
+
+ /* optimal fragment size */
+
++#ifndef OS_BSD
+ int AUSIZ = 0;
++#endif
+
+ /* declare these static to effectively isolate the audio device */
+
+@@ -42,6 +44,9 @@ static int volumeIoctl;
+ void
+ audioOpen(int frequency, int stereo, int volume)
+ {
++#ifdef OS_BSD
++ int temp;
++#endif
+ int supportedMixers, play_format=AFMT_S16_LE;
+
+ if ((audio_fd = open ("/dev/dsp", O_WRONLY, 0)) == -1)
+@@ -78,7 +83,12 @@ audioOpen(int frequency, int stereo, int
+ if (volume != -1)
+ audioSetVolume(volume);
+
++#ifdef OS_BSD
++ temp = AUSIZ;
++ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &temp) == -1)
++#else
+ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &AUSIZ) == -1)
++#endif
+ die("Unable to get fragment size\n");
+ }
+
diff --git a/audio/amp/files/patch-dump.c b/audio/amp/files/patch-dump.c
index efefaa8c74be..2cb924ef1944 100644
--- a/audio/amp/files/patch-dump.c
+++ b/audio/amp/files/patch-dump.c
@@ -1,6 +1,6 @@
---- dump.c Sat May 31 17:19:38 1997
-+++ dump.c Wed Apr 13 00:21:47 2005
-@@ -46,19 +46,21 @@
+--- dump.c.orig 1997-05-31 20:19:38 UTC
++++ dump.c
+@@ -46,19 +46,21 @@ int _data,space=0;
void show_header(struct AUDIO_HEADER *header)
{
int bitrate=t_bitrate[header->ID][3-header->layer][header->bitrate_index];
diff --git a/audio/amp/files/patch-formats.c b/audio/amp/files/patch-formats.c
index 24028dceee75..57f6ddb0a4cc 100644
--- a/audio/amp/files/patch-formats.c
+++ b/audio/amp/files/patch-formats.c
@@ -1,6 +1,6 @@
---- formats.c Sat May 31 14:47:58 1997
-+++ formats.c Wed Apr 13 00:21:47 2005
-@@ -27,7 +27,7 @@
+--- formats.c.orig 1997-05-31 17:47:58 UTC
++++ formats.c
+@@ -27,7 +27,7 @@ unsigned char iza[8]={0x64 ,0x61 ,0x74 ,
int len,fs,i;
len=ftell(out_file)-44;
diff --git a/audio/amp/files/patch-getbits.c b/audio/amp/files/patch-getbits.c
index 65a78b07e73b..f1e28c2e0853 100644
--- a/audio/amp/files/patch-getbits.c
+++ b/audio/amp/files/patch-getbits.c
@@ -1,6 +1,6 @@
---- getbits.c Wed Aug 20 10:30:21 1997
-+++ getbits.c Wed Apr 13 00:21:47 2005
-@@ -91,6 +91,7 @@
+--- getbits.c.orig 1997-08-20 13:30:21 UTC
++++ getbits.c
+@@ -91,6 +91,7 @@ unsigned int getbits(int n)
*/
static inline void parse_header(struct AUDIO_HEADER *header)
{
@@ -8,7 +8,7 @@
header->ID=_getbits(1);
header->layer=_getbits(2);
header->protection_bit=_getbits(1);
-@@ -112,11 +113,17 @@
+@@ -112,11 +113,17 @@ static inline int header_sanity_check(st
header->bitrate_index==15 ||
header->sampling_frequency==3) return -1;
@@ -26,7 +26,7 @@
return 0;
}
-@@ -132,11 +139,7 @@
+@@ -132,11 +139,7 @@ struct AUDIO_HEADER tmp;
if ((retval=_fillbfr(4))!=0) return retval;
for(;;) {
diff --git a/audio/amp/files/patch-guicontrol.c b/audio/amp/files/patch-guicontrol.c
index c493c4297ca1..b32c284fb929 100644
--- a/audio/amp/files/patch-guicontrol.c
+++ b/audio/amp/files/patch-guicontrol.c
@@ -1,6 +1,6 @@
---- guicontrol.c.orig Fri Aug 6 17:54:38 2004
-+++ guicontrol.c Fri Aug 6 17:55:44 2004
-@@ -375,7 +375,8 @@
+--- guicontrol.c.orig 1997-08-23 11:30:51 UTC
++++ guicontrol.c
+@@ -375,7 +375,8 @@ int decodeMPEG_2(int inFilefd)
break;
case GETHDR_SYN: warn("oops, we're out of sync.\n");
break;
diff --git a/audio/amp/files/patch-layer2.c b/audio/amp/files/patch-layer2.c
index 98d27660e6f2..a127aaf76529 100644
--- a/audio/amp/files/patch-layer2.c
+++ b/audio/amp/files/patch-layer2.c
@@ -1,6 +1,6 @@
---- layer2.c Mon Jun 16 14:53:15 1997
-+++ layer2.c Wed Apr 13 00:21:47 2005
-@@ -34,7 +34,7 @@
+--- layer2.c.orig 1997-06-16 17:53:15 UTC
++++ layer2.c
+@@ -34,7 +34,7 @@ int hsize,fs,mean_frame_size;
if (header->protection_bit==0) hsize+=2;
bitrate=t_bitrate[header->ID][3-header->layer][header->bitrate_index];
diff --git a/audio/amp/files/patch-layer3.c b/audio/amp/files/patch-layer3.c
index 29291ac4f8c0..e00700b24df4 100644
--- a/audio/amp/files/patch-layer3.c
+++ b/audio/amp/files/patch-layer3.c
@@ -1,6 +1,6 @@
---- layer3.c Mon Aug 18 09:42:17 1997
-+++ layer3.c Wed Apr 13 00:21:47 2005
-@@ -61,7 +61,7 @@
+--- layer3.c.orig 1997-08-18 12:42:17 UTC
++++ layer3.c
+@@ -61,7 +61,7 @@ int mean_frame_size,bitrate,fs,hsize,ssi
/* MPEG2 only has one granule
*/
bitrate=t_bitrate[header->ID][3-header->layer][header->bitrate_index];
@@ -9,7 +9,7 @@
if (header->ID) mean_frame_size=144000*bitrate/fs;
else mean_frame_size=72000*bitrate/fs;
-@@ -96,8 +96,8 @@
+@@ -96,8 +96,8 @@ int mean_frame_size,bitrate,fs,hsize,ssi
/* these two should go away
*/
diff --git a/audio/amp/files/patch-position.c b/audio/amp/files/patch-position.c
index 2d6a169401fc..8c446f7e38ff 100644
--- a/audio/amp/files/patch-position.c
+++ b/audio/amp/files/patch-position.c
@@ -1,6 +1,6 @@
---- position.c Sat May 31 14:47:58 1997
-+++ position.c Wed Apr 13 00:21:47 2005
-@@ -40,7 +40,7 @@
+--- position.c.orig 1997-05-31 17:47:58 UTC
++++ position.c
+@@ -40,7 +40,7 @@ struct AUDIO_HEADER tmp;
}
bitrate=t_bitrate[tmp.ID][3-tmp.layer][tmp.bitrate_index];
@@ -9,7 +9,7 @@
if (tmp.ID) mean_frame_size=144000*bitrate/fs;
else mean_frame_size=72000*bitrate/fs;
fillbfr(mean_frame_size + tmp.padding_bit - hsize);
-@@ -73,7 +73,7 @@
+@@ -73,7 +73,7 @@ struct AUDIO_HEADER tmp;
* so we have to go back one frame + 4 bytes + 1 byte (in case padding was used).
*/
bitrate=t_bitrate[tmp.ID][3-tmp.layer][tmp.bitrate_index];
diff --git a/audio/amp/files/patch-rtbuf.c b/audio/amp/files/patch-rtbuf.c
index b9285dbb42c4..2700b2f62feb 100644
--- a/audio/amp/files/patch-rtbuf.c
+++ b/audio/amp/files/patch-rtbuf.c
@@ -1,6 +1,6 @@
---- rtbuf.c Sat Aug 23 07:16:40 1997
-+++ rtbuf.c Wed Apr 13 00:21:47 2005
-@@ -337,15 +337,15 @@
+--- rtbuf.c.orig 1997-08-23 10:16:40 UTC
++++ rtbuf.c
+@@ -337,15 +337,15 @@ int apar;
(mpegheader->mode != 3) ? "stereo" : "mono");
return -1;
}
diff --git a/audio/ample/files/patch-src__base64.c b/audio/ample/files/patch-src__base64.c
deleted file mode 100644
index 23e6d10f7f2b..000000000000
--- a/audio/ample/files/patch-src__base64.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/base64.c.orig Tue Nov 25 18:28:56 2003
-+++ src/base64.c Sat Jul 3 22:38:53 2004
-@@ -18,6 +18,8 @@
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-+#include <config.h>
-+
- #include <stdlib.h>
- #include <string.h>
- #ifdef HAVE_SYS_TYPES_H
diff --git a/audio/ample/files/patch-src_base64.c b/audio/ample/files/patch-src_base64.c
new file mode 100644
index 000000000000..ede078f12584
--- /dev/null
+++ b/audio/ample/files/patch-src_base64.c
@@ -0,0 +1,11 @@
+--- src/base64.c.orig 2003-11-25 09:28:56 UTC
++++ src/base64.c
+@@ -18,6 +18,8 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include <config.h>
++
+ #include <stdlib.h>
+ #include <string.h>
+ #ifdef HAVE_SYS_TYPES_H
diff --git a/audio/aqualung/files/patch-ffmpeg3 b/audio/aqualung/files/patch-ffmpeg3
index f734c21d5b9b..225b6e2e5841 100644
--- a/audio/aqualung/files/patch-ffmpeg3
+++ b/audio/aqualung/files/patch-ffmpeg3
@@ -7,9 +7,9 @@ With FFmpeg 1.0 and libav 10, AVCodecContext.{get,release}_buffer()
were deprecated; the new default AVCodecContext.get_buffer2()
implementation works fine for us.
---- src/decoder/dec_lavc.c.orig
+--- src/decoder/dec_lavc.c.orig 2015-04-19 12:49:49 UTC
+++ src/decoder/dec_lavc.c
-@@ -280,10 +280,12 @@ lavc_decoder_open(decoder_t * dec, char * filename) {
+@@ -280,10 +280,12 @@ lavc_decoder_open(decoder_t * dec, char
return DECODER_OPEN_BADLIB;
pd->avCodecCtx = pd->avFormatCtx->streams[pd->audioStream]->codec;
diff --git a/audio/aqualung/files/patch-src__decoder__dec_mac.cpp b/audio/aqualung/files/patch-src_decoder_dec__mac.cpp
index a47ed4abc8fa..a47ed4abc8fa 100644
--- a/audio/aqualung/files/patch-src__decoder__dec_mac.cpp
+++ b/audio/aqualung/files/patch-src_decoder_dec__mac.cpp
diff --git a/audio/ario/files/patch-src_ario-avahi.c b/audio/ario/files/patch-src_ario-avahi.c
index 7e72c30dd214..d1619e199685 100644
--- a/audio/ario/files/patch-src_ario-avahi.c
+++ b/audio/ario/files/patch-src_ario-avahi.c
@@ -1,5 +1,5 @@
---- src/ario-avahi.c.orig 2011-07-18 20:05:50.915461042 +0200
-+++ src/ario-avahi.c 2011-07-18 20:08:56.334574365 +0200
+--- src/ario-avahi.c.orig 2011-02-27 15:07:31 UTC
++++ src/ario-avahi.c
@@ -34,6 +34,11 @@
#include <avahi-common/simple-watch.h>
#include "ario-debug.h"
diff --git a/audio/ascd/files/patch-Imakefile b/audio/ascd/files/patch-Imakefile
index 697bbe83009c..81b8b951c023 100644
--- a/audio/ascd/files/patch-Imakefile
+++ b/audio/ascd/files/patch-Imakefile
@@ -1,6 +1,6 @@
---- Imakefile.orig Sun Sep 5 08:24:23 1999
-+++ Imakefile Wed Aug 2 04:41:16 2000
-@@ -5,11 +5,10 @@
+--- Imakefile.orig 1999-09-04 23:24:23 UTC
++++ Imakefile
+@@ -5,11 +5,10 @@ NAME = ascd
BINDIR = CBINDIR
MANDIR = CMANDIR
THEMESDIR = CTHDIR
diff --git a/audio/ascd/files/patch-faktory.c b/audio/ascd/files/patch-faktory.c
index 5ced3c75f1ba..a6802228bc89 100644
--- a/audio/ascd/files/patch-faktory.c
+++ b/audio/ascd/files/patch-faktory.c
@@ -1,6 +1,6 @@
---- /usr/ports/audio/ascd/work/ascd-0.13.2/faktory.c Mon Jul 5 20:52:38 1999
-+++ faktory.c Sat Sep 2 17:26:31 2000
-@@ -58,9 +58,9 @@
+--- faktory.c.orig 1999-07-05 16:52:38 UTC
++++ faktory.c
+@@ -58,9 +58,9 @@ int fak_parse_line(char *ligne, char *ke
unsigned int pos = 0;
if ((strlen(ligne) > 0) && (ligne[0] != '#')) {
diff --git a/audio/ascd/files/patch-misc_config.h.default b/audio/ascd/files/patch-misc_config.h.default
index 1825012fba10..da20f0e9aca2 100644
--- a/audio/ascd/files/patch-misc_config.h.default
+++ b/audio/ascd/files/patch-misc_config.h.default
@@ -1,5 +1,5 @@
---- misc/config.h.default.orig Sun Aug 8 21:23:05 1999
-+++ misc/config.h.default Sun Aug 8 21:23:38 1999
+--- misc/config.h.default.orig 1999-04-19 17:25:01 UTC
++++ misc/config.h.default
@@ -1,5 +1,5 @@
#define PACKAGE "ascd"
#define DEFAULT_COLOR "#2FAFAF"
diff --git a/audio/ascd/files/patch-misc_dirs.h.default b/audio/ascd/files/patch-misc_dirs.h.default
index 9b950f0f898b..3906609f8d32 100644
--- a/audio/ascd/files/patch-misc_dirs.h.default
+++ b/audio/ascd/files/patch-misc_dirs.h.default
@@ -1,5 +1,5 @@
---- misc/dirs.h.default.orig Sun Aug 8 21:23:13 1999
-+++ misc/dirs.h.default Sun Aug 8 21:23:56 1999
+--- misc/dirs.h.default.orig 1999-04-19 17:24:12 UTC
++++ misc/dirs.h.default
@@ -1,3 +1,3 @@
-#define CBINDIR /usr/local/bin
-#define CMANDIR /usr/local/man/man1
diff --git a/audio/asunder/files/patch-Makefile.in b/audio/asunder/files/patch-Makefile.in
index 434d994f3c40..b1e6df5f809b 100644
--- a/audio/asunder/files/patch-Makefile.in
+++ b/audio/asunder/files/patch-Makefile.in
@@ -1,4 +1,4 @@
---- Makefile.in.orig 2015-01-25 20:25:32 UTC
+--- Makefile.in.orig 2015-10-03 03:58:31 UTC
+++ Makefile.in
@@ -345,7 +345,7 @@ top_srcdir = @top_srcdir@
SUBDIRS = src po
diff --git a/audio/audacity/files/patch-Makefile.am b/audio/audacity/files/patch-Makefile.am
index 1d553f2f247e..0951bda793ab 100644
--- a/audio/audacity/files/patch-Makefile.am
+++ b/audio/audacity/files/patch-Makefile.am
@@ -1,4 +1,4 @@
---- Makefile.am.orig 2016-01-08 22:05:48 UTC
+--- Makefile.am.orig 2016-07-26 13:34:06 UTC
+++ Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = help images lib-src po src tests
diff --git a/audio/audacity/files/patch-configure.ac b/audio/audacity/files/patch-configure.ac
index 5e6a139c605e..0cb6765baa6a 100644
--- a/audio/audacity/files/patch-configure.ac
+++ b/audio/audacity/files/patch-configure.ac
@@ -8,7 +8,7 @@
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])
-@@ -690,6 +690,7 @@ AC_CONFIG_FILES([
+@@ -690,6 +691,7 @@ AC_CONFIG_FILES([
Makefile
help/Makefile
images/Makefile
diff --git a/audio/audacity/files/patch-include_Makefile.am b/audio/audacity/files/patch-include_Makefile.am
index c92306752c82..55f3706b13d9 100644
--- a/audio/audacity/files/patch-include_Makefile.am
+++ b/audio/audacity/files/patch-include_Makefile.am
@@ -1,4 +1,4 @@
---- include/Makefile.am.orig 1970-01-01 00:00:00 UTC
+--- include/Makefile.am.orig 2016-07-26 13:34:07 UTC
+++ include/Makefile.am
@@ -0,0 +1,21 @@
+ACLOCAL_AMFLAGS= -I m4
diff --git a/audio/audacity/files/patch-lib-src_FileDialog_Makefile.am b/audio/audacity/files/patch-lib-src_FileDialog_Makefile.am
index 8452d4495d89..da4d87cdd8b1 100644
--- a/audio/audacity/files/patch-lib-src_FileDialog_Makefile.am
+++ b/audio/audacity/files/patch-lib-src_FileDialog_Makefile.am
@@ -1,4 +1,4 @@
---- lib-src/FileDialog/Makefile.am.orig 2016-01-08 22:05:48 UTC
+--- lib-src/FileDialog/Makefile.am.orig 2016-07-26 13:34:06 UTC
+++ lib-src/FileDialog/Makefile.am
@@ -1,5 +1,7 @@
ACLOCAL_AMFLAGS = -I m4
diff --git a/audio/audacity/files/patch-lib-src_FileDialog_gtk_Makefile.am b/audio/audacity/files/patch-lib-src_FileDialog_gtk_Makefile.am
index 54040c9fa7b6..261808af58a3 100644
--- a/audio/audacity/files/patch-lib-src_FileDialog_gtk_Makefile.am
+++ b/audio/audacity/files/patch-lib-src_FileDialog_gtk_Makefile.am
@@ -1,4 +1,4 @@
---- lib-src/FileDialog/gtk/Makefile.am.orig 1970-01-01 00:00:00 UTC
+--- lib-src/FileDialog/gtk/Makefile.am.orig 2016-07-26 13:34:07 UTC
+++ lib-src/FileDialog/gtk/Makefile.am
@@ -0,0 +1,12 @@
+ACLOCAL_AMFLAGS= -I m4
diff --git a/audio/audacity/files/patch-lib-src_FileDialog_mac_Makefile.am b/audio/audacity/files/patch-lib-src_FileDialog_mac_Makefile.am
index 712c78c23a0b..614725768b87 100644
--- a/audio/audacity/files/patch-lib-src_FileDialog_mac_Makefile.am
+++ b/audio/audacity/files/patch-lib-src_FileDialog_mac_Makefile.am
@@ -1,4 +1,4 @@
---- lib-src/FileDialog/mac/Makefile.am.orig 1970-01-01 00:00:00 UTC
+--- lib-src/FileDialog/mac/Makefile.am.orig 2016-07-26 13:34:07 UTC
+++ lib-src/FileDialog/mac/Makefile.am
@@ -0,0 +1,10 @@
+ACLOCAL_AMFLAGS= -I m4
diff --git a/audio/audacity/files/patch-lib-src_FileDialog_win_Makefile.am b/audio/audacity/files/patch-lib-src_FileDialog_win_Makefile.am
index c9757b902435..e32b8b741c66 100644
--- a/audio/audacity/files/patch-lib-src_FileDialog_win_Makefile.am
+++ b/audio/audacity/files/patch-lib-src_FileDialog_win_Makefile.am
@@ -1,4 +1,4 @@
---- lib-src/FileDialog/win/Makefile.am.orig 1970-01-01 00:00:00 UTC
+--- lib-src/FileDialog/win/Makefile.am.orig 2016-07-26 13:34:07 UTC
+++ lib-src/FileDialog/win/Makefile.am
@@ -0,0 +1,10 @@
+ACLOCAL_AMFLAGS= -I m4
diff --git a/audio/audacity/files/patch-lib-src__libnyquist__nyquist__nyqstk__include__FileRead.h b/audio/audacity/files/patch-lib-src__libnyquist__nyquist__nyqstk__include__FileRead.h
deleted file mode 100644
index a706d562532e..000000000000
--- a/audio/audacity/files/patch-lib-src__libnyquist__nyquist__nyqstk__include__FileRead.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib-src/libnyquist/nyquist/nyqstk/include/FileRead.h.orig 2015-07-11 10:02:22 UTC
-+++ lib-src/libnyquist/nyquist/nyqstk/include/FileRead.h
-@@ -33,6 +33,7 @@
- #define STK_FILEREAD_H
-
- #include "Stk.h"
-+#include <stdio.h>
-
- namespace Nyq
- {
diff --git a/audio/audacity/files/patch-lib-src__soundtouch__source__SoundTouch__Makefile.am b/audio/audacity/files/patch-lib-src__soundtouch__source__SoundTouch__Makefile.am
deleted file mode 100644
index c974f74c389c..000000000000
--- a/audio/audacity/files/patch-lib-src__soundtouch__source__SoundTouch__Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib-src/soundtouch/source/SoundTouch/Makefile.am.orig 2015-07-11 10:02:22 UTC
-+++ lib-src/soundtouch/source/SoundTouch/Makefile.am
-@@ -32,7 +32,7 @@ libSoundTouch_la_SOURCES=AAFilter.cpp FI
-
-
- # Compiler flags
--AM_CXXFLAGS=-O3 -fcheck-new -I../../include
-+AM_CXXFLAGS=-O3 -I../../include
-
- # Compile the files that need MMX and SSE individually.
- libSoundTouch_la_LIBADD=libSoundTouchMMX.la libSoundTouchSSE.la
diff --git a/audio/audacity/files/patch-lib-src_libnyquist_Makefile.am b/audio/audacity/files/patch-lib-src_libnyquist_Makefile.am
index 2e9e996a0e4b..82409cb37fbb 100644
--- a/audio/audacity/files/patch-lib-src_libnyquist_Makefile.am
+++ b/audio/audacity/files/patch-lib-src_libnyquist_Makefile.am
@@ -1,4 +1,4 @@
---- lib-src/libnyquist/Makefile.am.orig 2016-01-08 22:05:48 UTC
+--- lib-src/libnyquist/Makefile.am.orig 2016-07-26 13:34:06 UTC
+++ lib-src/libnyquist/Makefile.am
@@ -3,7 +3,7 @@
# Written by Richard Ash following Gary Vaughan's Autobook
diff --git a/audio/audacity/files/patch-lib-src_libnyquist_nyquist_cmt_cext.h b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_cmt_cext.h
index 9456e1a74263..ff74e0d6f488 100644
--- a/audio/audacity/files/patch-lib-src_libnyquist_nyquist_cmt_cext.h
+++ b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_cmt_cext.h
@@ -1,4 +1,4 @@
---- lib-src/libnyquist/nyquist/cmt/cext.h.orig 2015-07-11 10:02:22 UTC
+--- lib-src/libnyquist/nyquist/cmt/cext.h.orig 2016-07-26 13:34:07 UTC
+++ lib-src/libnyquist/nyquist/cmt/cext.h
@@ -58,7 +58,7 @@ EXIT(n) -- calls exit(n) after shutting
#include <malloc.h>
diff --git a/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h
index ea13f2a06b99..ee47829b6d86 100644
--- a/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h
+++ b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqsrc_sound.h
@@ -1,4 +1,4 @@
---- lib-src/libnyquist/nyquist/nyqsrc/sound.h.orig 2016-01-08 22:05:48 UTC
+--- lib-src/libnyquist/nyquist/nyqsrc/sound.h.orig 2016-07-26 13:34:06 UTC
+++ lib-src/libnyquist/nyquist/nyqsrc/sound.h
@@ -459,7 +459,7 @@ double step_to_hz(double);
diff --git a/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqstk_include_FileRead.h b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqstk_include_FileRead.h
new file mode 100644
index 000000000000..fb9932cd3c0c
--- /dev/null
+++ b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_nyqstk_include_FileRead.h
@@ -0,0 +1,10 @@
+--- lib-src/libnyquist/nyquist/nyqstk/include/FileRead.h.orig 2016-07-26 13:34:06 UTC
++++ lib-src/libnyquist/nyquist/nyqstk/include/FileRead.h
+@@ -33,6 +33,7 @@
+ #define STK_FILEREAD_H
+
+ #include "Stk.h"
++#include <stdio.h>
+
+ namespace Nyq
+ {
diff --git a/audio/audacity/files/patch-lib-src_libnyquist_nyquist_xlisp_xlisp.h b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_xlisp_xlisp.h
index 50b6e3109398..0330f64279e1 100644
--- a/audio/audacity/files/patch-lib-src_libnyquist_nyquist_xlisp_xlisp.h
+++ b/audio/audacity/files/patch-lib-src_libnyquist_nyquist_xlisp_xlisp.h
@@ -1,4 +1,4 @@
---- lib-src/libnyquist/nyquist/xlisp/xlisp.h.orig 2015-07-11 10:02:22 UTC
+--- lib-src/libnyquist/nyquist/xlisp/xlisp.h.orig 2016-07-26 13:34:06 UTC
+++ lib-src/libnyquist/nyquist/xlisp/xlisp.h
@@ -153,6 +153,15 @@ extern long ptrtoabs();
#endif
diff --git a/audio/audacity/files/patch-lib-src_lv2_configure b/audio/audacity/files/patch-lib-src_lv2_configure
index 899f8c49567f..39849fe28084 100644
--- a/audio/audacity/files/patch-lib-src_lv2_configure
+++ b/audio/audacity/files/patch-lib-src_lv2_configure
@@ -1,6 +1,6 @@
---- lib-src/lv2/configure 2016-01-08 14:05:48.000000000 -0800
-+++ lib-src/lv2/configure 2016-01-27 17:18:31.280753000 -0800
-@@ -54,7 +54,7 @@
+--- lib-src/lv2/configure.orig 2016-01-08 22:05:48 UTC
++++ lib-src/lv2/configure
+@@ -54,7 +54,7 @@ includedir=.
Name: ${pkg}
Version: ${version}
Description: Temporary fake config file
@@ -8,3 +8,4 @@
+Libs: -L\${libdir} ${lib} -lm
Cflags: -I\${includedir}/${pkg}${major}
EOF
+
diff --git a/audio/audacity/files/patch-lib-src_portmixer_include_portmixer.h b/audio/audacity/files/patch-lib-src_portmixer_include_portmixer.h
index cccb5444d099..67c7882fe2f5 100644
--- a/audio/audacity/files/patch-lib-src_portmixer_include_portmixer.h
+++ b/audio/audacity/files/patch-lib-src_portmixer_include_portmixer.h
@@ -1,4 +1,4 @@
---- lib-src/portmixer/include/portmixer.h.orig 2015-07-11 10:02:22 UTC
+--- lib-src/portmixer/include/portmixer.h.orig 2016-07-26 13:34:07 UTC
+++ lib-src/portmixer/include/portmixer.h
@@ -45,7 +45,7 @@ extern "C"
*
diff --git a/audio/audacity/files/patch-lib-src_portmixer_src_px__linux__alsa.c b/audio/audacity/files/patch-lib-src_portmixer_src_px__linux__alsa.c
index cf697fc92b87..4328601d6fda 100644
--- a/audio/audacity/files/patch-lib-src_portmixer_src_px__linux__alsa.c
+++ b/audio/audacity/files/patch-lib-src_portmixer_src_px__linux__alsa.c
@@ -1,4 +1,4 @@
---- lib-src/portmixer/src/px_linux_alsa.c.orig 2016-01-08 22:05:48 UTC
+--- lib-src/portmixer/src/px_linux_alsa.c.orig 2016-07-26 13:34:06 UTC
+++ lib-src/portmixer/src/px_linux_alsa.c
@@ -42,6 +42,7 @@
diff --git a/audio/audacity/files/patch-lib-src_soundtouch_source_SoundTouch_Makefile.am b/audio/audacity/files/patch-lib-src_soundtouch_source_SoundTouch_Makefile.am
new file mode 100644
index 000000000000..db608ea460bb
--- /dev/null
+++ b/audio/audacity/files/patch-lib-src_soundtouch_source_SoundTouch_Makefile.am
@@ -0,0 +1,11 @@
+--- lib-src/soundtouch/source/SoundTouch/Makefile.am.orig 2016-07-26 13:34:06 UTC
++++ lib-src/soundtouch/source/SoundTouch/Makefile.am
+@@ -32,7 +32,7 @@ libSoundTouch_la_SOURCES=AAFilter.cpp FI
+
+
+ # Compiler flags
+-AM_CXXFLAGS=-O3 -fcheck-new -I../../include
++AM_CXXFLAGS=-O3 -I../../include
+
+ # Compile the files that need MMX and SSE individually.
+ libSoundTouch_la_LIBADD=libSoundTouchMMX.la libSoundTouchSSE.la
diff --git a/audio/audacity/files/patch-src_AudioIO.h b/audio/audacity/files/patch-src_AudioIO.h
index ed42adc80636..9defe48870e4 100644
--- a/audio/audacity/files/patch-src_AudioIO.h
+++ b/audio/audacity/files/patch-src_AudioIO.h
@@ -1,4 +1,4 @@
---- src/AudioIO.h.orig 2015-07-11 10:02:22 UTC
+--- src/AudioIO.h.orig 2016-07-26 13:34:06 UTC
+++ src/AudioIO.h
@@ -13,7 +13,7 @@
#ifndef __AUDACITY_AUDIO_IO__
diff --git a/audio/audacity/files/patch-src_BatchCommands.cpp b/audio/audacity/files/patch-src_BatchCommands.cpp
index b83a400a9937..c8488f59ba69 100644
--- a/audio/audacity/files/patch-src_BatchCommands.cpp
+++ b/audio/audacity/files/patch-src_BatchCommands.cpp
@@ -1,4 +1,4 @@
---- src/BatchCommands.cpp.orig 2016-01-08 22:05:48 UTC
+--- src/BatchCommands.cpp.orig 2016-07-26 13:34:06 UTC
+++ src/BatchCommands.cpp
@@ -151,7 +151,7 @@ bool BatchCommands::ReadChain(const wxSt
else if (cmd == wxT("ExportWav"))
diff --git a/audio/audacity/files/patch-src_DeviceManager.cpp b/audio/audacity/files/patch-src_DeviceManager.cpp
index dd5c7462bdc1..dc85c4ceeaa8 100644
--- a/audio/audacity/files/patch-src_DeviceManager.cpp
+++ b/audio/audacity/files/patch-src_DeviceManager.cpp
@@ -1,4 +1,4 @@
---- src/DeviceManager.cpp.orig 2015-07-11 10:02:22 UTC
+--- src/DeviceManager.cpp.orig 2016-07-26 13:34:06 UTC
+++ src/DeviceManager.cpp
@@ -6,7 +6,7 @@
diff --git a/audio/audacity/files/patch-src_FFmpeg.h b/audio/audacity/files/patch-src_FFmpeg.h
index 88bc2afb320c..80856b49ddb2 100644
--- a/audio/audacity/files/patch-src_FFmpeg.h
+++ b/audio/audacity/files/patch-src_FFmpeg.h
@@ -1,4 +1,4 @@
---- src/FFmpeg.h.orig 2015-07-11 10:02:22 UTC
+--- src/FFmpeg.h.orig 2016-07-26 13:34:06 UTC
+++ src/FFmpeg.h
@@ -689,7 +689,7 @@ extern "C" {
FFMPEG_FUNCTION_WITH_RETURN(
diff --git a/audio/audacity/files/patch-src_Makefile.am b/audio/audacity/files/patch-src_Makefile.am
index d7c1c957124c..5db97e87aa98 100644
--- a/audio/audacity/files/patch-src_Makefile.am
+++ b/audio/audacity/files/patch-src_Makefile.am
@@ -1,4 +1,4 @@
---- src/Makefile.am.orig 2016-01-08 22:05:48 UTC
+--- src/Makefile.am.orig 2016-07-26 13:34:06 UTC
+++ src/Makefile.am
@@ -75,8 +75,7 @@ audacity_CPPFLAGS = \
# /usr/local/include/wx-2.8/wx/buffer.h:289:9: note: in expansion of macro 'wxCHECK_RET'
diff --git a/audio/audacity/files/patch-src_effects_VST_VSTEffect.cpp b/audio/audacity/files/patch-src_effects_VST_VSTEffect.cpp
index 8968344cf839..033d6e597f37 100644
--- a/audio/audacity/files/patch-src_effects_VST_VSTEffect.cpp
+++ b/audio/audacity/files/patch-src_effects_VST_VSTEffect.cpp
@@ -1,6 +1,6 @@
---- src/effects/VST/VSTEffect.cpp.orig 2015-07-11 10:02:22 UTC
+--- src/effects/VST/VSTEffect.cpp.orig 2016-07-26 13:34:06 UTC
+++ src/effects/VST/VSTEffect.cpp
-@@ -2576,7 +2576,7 @@ bool VSTEffect::Load()
+@@ -2129,7 +2129,7 @@ bool VSTEffect::Load()
// symbols.
//
// Once we define a proper external API, the flags can be removed.
diff --git a/audio/audacity/files/patch-src_effects_vamp_LoadVamp.cpp b/audio/audacity/files/patch-src_effects_vamp_LoadVamp.cpp
index ed0c5d124687..8cfdf476f077 100644
--- a/audio/audacity/files/patch-src_effects_vamp_LoadVamp.cpp
+++ b/audio/audacity/files/patch-src_effects_vamp_LoadVamp.cpp
@@ -1,4 +1,4 @@
---- src/effects/vamp/LoadVamp.cpp.orig 2016-01-08 22:05:48 UTC
+--- src/effects/vamp/LoadVamp.cpp.orig 2016-07-26 13:34:06 UTC
+++ src/effects/vamp/LoadVamp.cpp
@@ -266,7 +266,7 @@ Plugin *VampEffectsModule::FindPlugin(co
Plugin *vp = PluginLoader::getInstance()->loadPlugin(key, 48000); // rate doesn't matter here
diff --git a/audio/audacity/files/patch-src_import_ImportFLAC.cpp b/audio/audacity/files/patch-src_import_ImportFLAC.cpp
index 0673e1e61f54..53454436f169 100644
--- a/audio/audacity/files/patch-src_import_ImportFLAC.cpp
+++ b/audio/audacity/files/patch-src_import_ImportFLAC.cpp
@@ -1,4 +1,4 @@
---- src/import/ImportFLAC.cpp.orig 2016-01-08 22:05:48 UTC
+--- src/import/ImportFLAC.cpp.orig 2016-07-26 13:34:06 UTC
+++ src/import/ImportFLAC.cpp
@@ -296,7 +296,7 @@ ImportFileHandle *FLACImportPlugin::Open
int cnt;
diff --git a/audio/audacity/files/patch-src_prefs_DevicePrefs.cpp b/audio/audacity/files/patch-src_prefs_DevicePrefs.cpp
index 261245610b7d..a83688f3cf4f 100644
--- a/audio/audacity/files/patch-src_prefs_DevicePrefs.cpp
+++ b/audio/audacity/files/patch-src_prefs_DevicePrefs.cpp
@@ -1,4 +1,4 @@
---- src/prefs/DevicePrefs.cpp.orig 2015-07-11 10:02:22 UTC
+--- src/prefs/DevicePrefs.cpp.orig 2016-07-26 13:34:06 UTC
+++ src/prefs/DevicePrefs.cpp
@@ -30,7 +30,7 @@ other settings.
#include <wx/intl.h>
diff --git a/audio/audiere/files/patch-src-debug.cpp b/audio/audiere/files/patch-src-debug.cpp
deleted file mode 100644
index f12c4106b2cc..000000000000
--- a/audio/audiere/files/patch-src-debug.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/debug.cpp.orig 2006-02-14 07:57:01.000000000 +0300
-+++ src/debug.cpp 2013-09-14 06:53:30.679226734 +0400
-@@ -1,8 +1,11 @@
- #ifdef WIN32
- #include <windows.h>
-+#else
-+ #include "unistd.h"
- #endif
-
- #include "debug.h"
-+#include <cstdlib>
-
-
- namespace audiere {
diff --git a/audio/audiere/files/patch-src-speexfile-speexfile.cpp b/audio/audiere/files/patch-src-speexfile-speexfile.cpp
deleted file mode 100644
index 0f6fa13d1895..000000000000
--- a/audio/audiere/files/patch-src-speexfile-speexfile.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/speexfile/speexfile.cpp.orig 2006-02-14 07:57:01.000000000 +0300
-+++ src/speexfile/speexfile.cpp 2008-06-16 04:56:31.000000000 +0400
-@@ -871,7 +871,7 @@
- void *speexfile::header_to_decoder ( SpeexHeader *header, int enh_enabled, int *frame_size, int *rate, int *nframes, int forceMode, int *channels, SpeexStereoState *stereo )
- {
- void *st;
-- SpeexMode *mode;
-+ const SpeexMode *mode;
- SpeexCallback callback;
- int modeID;
-
diff --git a/audio/audiere/files/patch-src-utility.h b/audio/audiere/files/patch-src-utility.h
deleted file mode 100644
index c04f37443a4f..000000000000
--- a/audio/audiere/files/patch-src-utility.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/utility.h.orig 2006-02-14 07:57:01.000000000 +0300
-+++ src/utility.h 2013-09-12 07:09:46.054424472 +0400
-@@ -10,6 +10,7 @@
- #include <map>
- #include <string>
- #include <utility>
-+#include <cstdlib>
- #include "audiere.h"
- #include "types.h"
-
diff --git a/audio/audiere/files/patch-src_debug.cpp b/audio/audiere/files/patch-src_debug.cpp
new file mode 100644
index 000000000000..de4181f3a32a
--- /dev/null
+++ b/audio/audiere/files/patch-src_debug.cpp
@@ -0,0 +1,14 @@
+--- src/debug.cpp.orig 2006-02-14 04:57:01 UTC
++++ src/debug.cpp
+@@ -1,8 +1,11 @@
+ #ifdef WIN32
+ #include <windows.h>
++#else
++ #include "unistd.h"
+ #endif
+
+ #include "debug.h"
++#include <cstdlib>
+
+
+ namespace audiere {
diff --git a/audio/audiere/files/patch-src_speexfile_speexfile.cpp b/audio/audiere/files/patch-src_speexfile_speexfile.cpp
new file mode 100644
index 000000000000..d1868e05ad9e
--- /dev/null
+++ b/audio/audiere/files/patch-src_speexfile_speexfile.cpp
@@ -0,0 +1,11 @@
+--- src/speexfile/speexfile.cpp.orig 2006-02-14 04:57:01 UTC
++++ src/speexfile/speexfile.cpp
+@@ -871,7 +871,7 @@ int speexfile::initfile ()
+ void *speexfile::header_to_decoder ( SpeexHeader *header, int enh_enabled, int *frame_size, int *rate, int *nframes, int forceMode, int *channels, SpeexStereoState *stereo )
+ {
+ void *st;
+- SpeexMode *mode;
++ const SpeexMode *mode;
+ SpeexCallback callback;
+ int modeID;
+
diff --git a/audio/audiere/files/patch-src_utility.h b/audio/audiere/files/patch-src_utility.h
new file mode 100644
index 000000000000..e8c704a24a45
--- /dev/null
+++ b/audio/audiere/files/patch-src_utility.h
@@ -0,0 +1,10 @@
+--- src/utility.h.orig 2006-02-14 04:57:01 UTC
++++ src/utility.h
+@@ -10,6 +10,7 @@
+ #include <map>
+ #include <string>
+ #include <utility>
++#include <cstdlib>
+ #include "audiere.h"
+ #include "types.h"
+
diff --git a/audio/aureal-kmod/files/patch-10_Makefile b/audio/aureal-kmod/files/patch-10_Makefile
index 7cdc13c17fa2..6f9a898d3553 100644
--- a/audio/aureal-kmod/files/patch-10_Makefile
+++ b/audio/aureal-kmod/files/patch-10_Makefile
@@ -1,5 +1,5 @@
---- 10/Makefile.orig Tue Jan 16 15:45:02 2001
-+++ 10/Makefile Tue Jan 16 15:47:38 2001
+--- 10/Makefile.orig 2016-07-26 13:37:02 UTC
++++ 10/Makefile
@@ -0,0 +1,3 @@
+MODEL = 10
+
diff --git a/audio/aureal-kmod/files/patch-20_Makefile b/audio/aureal-kmod/files/patch-20_Makefile
index bfa633a24928..6725bb1654a1 100644
--- a/audio/aureal-kmod/files/patch-20_Makefile
+++ b/audio/aureal-kmod/files/patch-20_Makefile
@@ -1,5 +1,5 @@
---- 20/Makefile.orig Tue Jan 16 15:45:02 2001
-+++ 20/Makefile Tue Jan 16 15:47:46 2001
+--- 20/Makefile.orig 2016-07-26 13:37:02 UTC
++++ 20/Makefile
@@ -0,0 +1,3 @@
+MODEL = 20
+
diff --git a/audio/aureal-kmod/files/patch-30_Makefile b/audio/aureal-kmod/files/patch-30_Makefile
index 399c4f137611..6db2037ad3b1 100644
--- a/audio/aureal-kmod/files/patch-30_Makefile
+++ b/audio/aureal-kmod/files/patch-30_Makefile
@@ -1,5 +1,5 @@
---- 30/Makefile.orig Tue Jan 16 15:45:03 2001
-+++ 30/Makefile Tue Jan 16 15:47:53 2001
+--- 30/Makefile.orig 2016-07-26 13:37:02 UTC
++++ 30/Makefile
@@ -0,0 +1,3 @@
+MODEL = 30
+
diff --git a/audio/aureal-kmod/files/patch-Makefile b/audio/aureal-kmod/files/patch-Makefile
index dce6932cd9a0..d215c4e716c4 100644
--- a/audio/aureal-kmod/files/patch-Makefile
+++ b/audio/aureal-kmod/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Mon Jan 15 18:44:49 2001
-+++ Makefile Mon Jan 15 18:44:49 2001
+--- Makefile.orig 2016-07-26 13:37:02 UTC
++++ Makefile
@@ -0,0 +1,3 @@
+SUBDIR = 10 20 30
+
diff --git a/audio/aureal-kmod/files/patch-Makefile.inc b/audio/aureal-kmod/files/patch-Makefile.inc
index a11b52d92863..f41228e69643 100644
--- a/audio/aureal-kmod/files/patch-Makefile.inc
+++ b/audio/aureal-kmod/files/patch-Makefile.inc
@@ -1,5 +1,5 @@
---- Makefile.inc.orig Thu Jun 21 22:34:06 2001
-+++ Makefile.inc Thu Jun 21 22:37:50 2001
+--- Makefile.inc.orig 2016-07-26 13:37:02 UTC
++++ Makefile.inc
@@ -0,0 +1,14 @@
+.PATH: /sys/dev/sound/pci ${WRKSRC}
+
diff --git a/audio/aureal-kmod/files/patch-au88x0.c b/audio/aureal-kmod/files/patch-au88x0.c
index 93f3af4fda64..f0f17b4b9a63 100644
--- a/audio/aureal-kmod/files/patch-au88x0.c
+++ b/audio/aureal-kmod/files/patch-au88x0.c
@@ -1,6 +1,7 @@
---- au88x0.c.orig 2002-05-10 09:32:55.000000000 +0800
-+++ au88x0.c 2009-02-21 16:14:41.000000000 +0800
-@@ -30,8 +30,9 @@
+--- au88x0.c.orig 2016-07-26 13:37:02 UTC
++++ au88x0.c
+@@ -33,10 +33,11 @@
+ */
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/pci/au88x0.h>
@@ -13,7 +14,9 @@
+#include <dev/pci/pcivar.h>
#include <sys/queue.h>
-@@ -574,5 +575,9 @@
+ SND_DECLARE_FILE("$FreeBSD$");
+@@ -577,7 +578,11 @@ auchan_init(kobj_t obj, void *devinfo, s
+ ch->channel = c;
ch->buffer = b;
ch->run = 0;
- if (sndbuf_alloc(ch->buffer, au->parent_dmat, AU_BUFFSIZE) == -1) {
@@ -24,21 +27,27 @@
+ AU_BUFFSIZE) != 0) {
printf("sndbuf_alloc failed\n");
return NULL;
-@@ -769,5 +774,5 @@
+ }
+@@ -769,7 +774,7 @@ au_pci_probe(device_t dev)
+ }
if (s) device_set_desc(dev, s);
- return s ? 0 : ENXIO;
+ return s ? BUS_PROBE_DEFAULT : ENXIO;
}
-@@ -803,5 +808,5 @@
+ static int
+@@ -803,7 +808,7 @@ au_pci_attach(device_t dev)
+ data = pci_read_config(dev, PCIR_COMMAND, 2);
for (i = 0; i < 3; i++) {
- au->regid[i] = PCIR_MAPS + i*4;
+ au->regid[i] = PCIR_BAR(i);
au->regtype[i] = SYS_RES_MEMORY;
au->reg[i] = bus_alloc_resource(dev, au->regtype[i], &au->regid[i], 0, ~0, 1, RF_ACTIVE);
-@@ -853,5 +858,7 @@
+ if (!au->reg[i]) {
+@@ -853,7 +858,9 @@ au_pci_attach(device_t dev)
+ /*highaddr*/BUS_SPACE_MAXADDR,
/*filter*/NULL, /*filterarg*/NULL,
/*maxsize*/AU_BUFFSIZE, /*nsegments*/1, /*maxsegz*/0x3ffff,
- /*flags*/0, &au->parent_dmat) != 0) {
@@ -47,7 +56,9 @@
+ &au->parent_dmat) != 0) {
device_printf(dev, "unable to create dma tag\n");
goto bad;
-@@ -943,5 +950,5 @@
+ }
+@@ -943,6 +950,6 @@ static driver_t au_driver = {
+
DRIVER_MODULE(snd_au88x0, pci, au_driver, pcm_devclass, 0, 0);
-MODULE_DEPEND(snd_au88x0, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER);
diff --git a/audio/autozen/files/patch-autozen.c b/audio/autozen/files/patch-autozen.c
index e0b581671658..3e6654800476 100644
--- a/audio/autozen/files/patch-autozen.c
+++ b/audio/autozen/files/patch-autozen.c
@@ -1,5 +1,5 @@
---- ./autozen.c.orig 2001-09-16 04:09:04.000000000 +0200
-+++ ./autozen.c 2012-08-24 12:22:50.546913397 +0200
+--- autozen.c.orig 2001-09-16 02:09:04 UTC
++++ autozen.c
@@ -27,7 +27,7 @@
/* "The nice thing about standards..." */
@@ -9,7 +9,7 @@
#else
#if defined (__NetBSD__) || defined (__OpenBSD__)
#include <soundcard.h> /* OSS emulation */
-@@ -113,7 +113,7 @@
+@@ -113,7 +113,7 @@ char bQuit=0;
//
/////////////////////////////////
@@ -18,7 +18,7 @@
#define MAX_HARMONICS 10
#define DEFAULT_HARMONICS 3
-@@ -253,7 +253,7 @@
+@@ -253,7 +253,7 @@ void Play (GtkWidget *widget, gpointer d
}
@@ -27,7 +27,7 @@
{
char *token;
int tmp;
-@@ -672,7 +672,7 @@
+@@ -672,7 +672,7 @@ void *SoundThread(void *v)
} // end while
@@ -36,7 +36,7 @@
}
gint volTimeOut(gpointer data) {
-@@ -729,6 +729,11 @@
+@@ -729,6 +729,11 @@ GtkWidget *create_HelpWindow (const char
GtkWidget *help_text;
GtkWidget *HelpQuit;
@@ -48,7 +48,7 @@
HelpWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_object_set_data (GTK_OBJECT (HelpWindow), "HelpWindow", HelpWindow);
gtk_window_set_title (GTK_WINDOW (HelpWindow), "AutoZen Help");
-@@ -740,9 +745,16 @@
+@@ -740,9 +745,16 @@ GtkWidget *create_HelpWindow (const char
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (HelpWindow), vbox1);
@@ -65,7 +65,7 @@
gtk_object_set_data (GTK_OBJECT (HelpWindow), "help_text", help_text);
-@@ -751,7 +763,11 @@
+@@ -751,7 +763,11 @@ GtkWidget *create_HelpWindow (const char
// gtk_widget_set_sensitive (help_text, FALSE);
GTK_WIDGET_UNSET_FLAGS (help_text, GTK_CAN_FOCUS);
gtk_widget_realize (help_text);
diff --git a/audio/beast/files/patch-birnet_birnetcpu.c b/audio/beast/files/patch-birnet_birnetcpu.c
deleted file mode 100644
index 1895b2adbea5..000000000000
--- a/audio/beast/files/patch-birnet_birnetcpu.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- birnet/birnetcpu.cc.orig 2008-02-26 23:19:28.000000000 +0100
-+++ birnet/birnetcpu.cc 2008-02-26 23:25:30.000000000 +0100
-@@ -201,7 +201,7 @@
- struct sigaction action, old_action;
- action.sa_handler = cpu_info_sigill_handler;
- sigemptyset (&action.sa_mask);
-- action.sa_flags = SA_NOMASK;
-+ action.sa_flags = SA_NODEFER;
- sigaction (SIGILL, &action, &old_action);
- if (setjmp (cpu_info_jmp_buf) == 0)
- {
diff --git a/audio/beast/files/patch-birnet_birnetcpu.cc b/audio/beast/files/patch-birnet_birnetcpu.cc
new file mode 100644
index 000000000000..2a6c1652c056
--- /dev/null
+++ b/audio/beast/files/patch-birnet_birnetcpu.cc
@@ -0,0 +1,11 @@
+--- birnet/birnetcpu.cc.orig 2013-01-19 00:23:42 UTC
++++ birnet/birnetcpu.cc
+@@ -174,7 +174,7 @@ get_x86_cpu_features (CPUInfo *ci,
+ struct sigaction action, old_action;
+ action.sa_handler = cpu_info_sigill_handler;
+ sigemptyset (&action.sa_mask);
+- action.sa_flags = SA_NOMASK;
++ action.sa_flags = SA_NODEFER;
+ sigaction (SIGILL, &action, &old_action);
+ if (setjmp (cpu_info_jmp_buf) == 0)
+ {
diff --git a/audio/beast/files/patch-tools_bseloopfuncs.cc b/audio/beast/files/patch-tools_bseloopfuncs.cc
index b7915f62ad3a..ce3167c37cc2 100644
--- a/audio/beast/files/patch-tools_bseloopfuncs.cc
+++ b/audio/beast/files/patch-tools_bseloopfuncs.cc
@@ -1,6 +1,6 @@
---- tools/bseloopfuncs.cc.orig 2010-02-14 00:47:12.000000000 +0000
-+++ tools/bseloopfuncs.cc 2010-09-15 12:05:05.000000000 +0000
-@@ -526,7 +526,7 @@
+--- tools/bseloopfuncs.cc.orig 2013-01-19 00:23:42 UTC
++++ tools/bseloopfuncs.cc
+@@ -469,7 +469,7 @@ gsl_data_find_loop2 (GslDataHandle *
ep = sp + minll;
{
gdouble score = score_headloop (dhandle, sp, ep - sp, config->block_length / 2, G_MAXDOUBLE);
@@ -9,7 +9,7 @@
continue;
if (score <= config->score)
{
-@@ -555,7 +555,7 @@
+@@ -496,7 +496,7 @@ gsl_data_find_loop2 (GslDataHandle *
for (ep = sp + minll; ep < cstart; ep++)
{
gdouble score = score_headloop (dhandle, sp, ep - sp, config->block_length / 2, config->score);
diff --git a/audio/beep/files/patch-Makefile b/audio/beep/files/patch-Makefile
index 7dda1f794ec1..dafc18050252 100644
--- a/audio/beep/files/patch-Makefile
+++ b/audio/beep/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2015-06-04 12:54:31.348048000 -0500
-+++ Makefile 2015-06-04 12:54:49.272840000 -0500
+--- Makefile.orig 2002-06-09 13:26:27 UTC
++++ Makefile
@@ -1,5 +1,10 @@
# $Id: Makefile,v 1.1.1.1 2002/06/09 13:26:27 andrew Exp $
diff --git a/audio/blop/files/patch-configure b/audio/blop/files/patch-configure
index e5268056df16..ab225367b2f0 100644
--- a/audio/blop/files/patch-configure
+++ b/audio/blop/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Tue Jun 15 18:11:25 2004
-+++ configure Mon Aug 30 03:37:21 2004
-@@ -4533,8 +4533,7 @@
+--- configure.orig 2004-06-15 09:11:25 UTC
++++ configure
+@@ -4533,8 +4533,7 @@ if test "${enable_debug+set}" = set; the
enableval="$enable_debug"
CFLAGS="-pipe -Wall -O0 -g"
else
diff --git a/audio/boodler/files/patch-configure.py b/audio/boodler/files/patch-configure.py
index acfd88e13f7f..9bbcd0408438 100644
--- a/audio/boodler/files/patch-configure.py
+++ b/audio/boodler/files/patch-configure.py
@@ -1,6 +1,6 @@
---- configure.py.orig Sat Jan 24 18:44:11 2004
-+++ configure.py Sat Jan 24 18:46:37 2004
-@@ -7,7 +7,7 @@
+--- configure.py.orig 2002-05-01 03:59:28 UTC
++++ configure.py
+@@ -7,7 +7,7 @@ import string
import getopt
usagemessage = 'usage: ' + sys.argv[0] + ' [-d NAME] [-i] [-I /dir/path] [-L /dir/path] [-l]'
@@ -9,7 +9,7 @@
helpmessage = 'Boodler configuration script\n\n' + usagemessage + '''
-@@ -68,8 +68,8 @@
+@@ -68,8 +68,8 @@ loop, but does not eliminate them entire
'''
try:
@@ -20,7 +20,7 @@
except getopt.error, ex:
print (sys.argv[0] + ':'), str(ex)
print usagemessage
-@@ -101,6 +101,8 @@
+@@ -101,6 +101,8 @@ for (opname, opval) in opts:
extraheaders.append(opval)
if (opname == '--lib' or opname == '-L'):
extralibs.append(opval)
diff --git a/audio/bristol/files/patch-bin_startBristol.in b/audio/bristol/files/patch-bin_startBristol.in
index 2ef201ac8607..d845f2e16374 100644
--- a/audio/bristol/files/patch-bin_startBristol.in
+++ b/audio/bristol/files/patch-bin_startBristol.in
@@ -1,6 +1,6 @@
---- bin/startBristol.in.orig 2012-04-27 13:07:18.000000000 +0200
-+++ bin/startBristol.in 2012-09-24 13:30:26.589848964 +0200
-@@ -39,14 +39,19 @@
+--- bin/startBristol.in.orig 2012-04-27 11:07:18 UTC
++++ bin/startBristol.in
+@@ -39,14 +39,19 @@ FREQ=0
#PORT=5028
# Randomise the port numbers, can be overridden by -port which would be a
# requirement for multitimbral
@@ -27,7 +27,7 @@
fi
valgrind=0
-@@ -497,12 +502,12 @@
+@@ -497,12 +502,12 @@ if [ $engine = 1 ]; then
fi
else
echo checking availability of TCP port $PORT
diff --git a/audio/bristol/files/patch-bristol-bristol.c b/audio/bristol/files/patch-bristol-bristol.c
deleted file mode 100644
index e98e58d1f7a3..000000000000
--- a/audio/bristol/files/patch-bristol-bristol.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- bristol/bristol.c.orig 2012-04-27 13:04:28.000000000 +0200
-+++ bristol/bristol.c 2012-09-24 15:43:08.299853839 +0200
-@@ -27,7 +27,11 @@
- #include <unistd.h>
- #include <pthread.h>
- #include <sys/types.h>
-+#ifdef __FreeBSD__
-+#include <sys/wait.h>
-+#else
- #include <wait.h>
-+#endif
-
- #if defined(linux)
- #include <sched.h>
diff --git a/audio/bristol/files/patch-bristol_bristol.c b/audio/bristol/files/patch-bristol_bristol.c
new file mode 100644
index 000000000000..e53e31dea611
--- /dev/null
+++ b/audio/bristol/files/patch-bristol_bristol.c
@@ -0,0 +1,14 @@
+--- bristol/bristol.c.orig 2012-04-27 11:04:28 UTC
++++ bristol/bristol.c
+@@ -27,7 +27,11 @@
+ #include <unistd.h>
+ #include <pthread.h>
+ #include <sys/types.h>
++#ifdef __FreeBSD__
++#include <sys/wait.h>
++#else
+ #include <wait.h>
++#endif
+
+ #if defined(linux)
+ #include <sched.h>
diff --git a/audio/bristol/files/patch-libbristolaudio-audioEngine.c b/audio/bristol/files/patch-libbristolaudio-audioEngine.c
deleted file mode 100644
index c8802e81d6cf..000000000000
--- a/audio/bristol/files/patch-libbristolaudio-audioEngine.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- libbristolaudio/audioEngine.c.orig 2012-04-27 13:04:29.000000000 +0200
-+++ libbristolaudio/audioEngine.c 2012-09-24 15:41:49.609845763 +0200
-@@ -59,8 +59,10 @@
- #include <fcntl.h>
- #ifdef SUBFRAGMENT
- #include <stdlib.h>
-+#ifndef __FreeBSD__
- #include <malloc.h>
- #endif
-+#endif
-
- #include <sys/ioctl.h>
-
diff --git a/audio/bristol/files/patch-libbristolaudio-audioGUIOSS.c b/audio/bristol/files/patch-libbristolaudio-audioGUIOSS.c
deleted file mode 100644
index cc07057ab980..000000000000
--- a/audio/bristol/files/patch-libbristolaudio-audioGUIOSS.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- libbristolaudio/audioGUIOSS.c.orig 2012-04-27 13:04:29.000000000 +0200
-+++ libbristolaudio/audioGUIOSS.c 2012-09-24 15:42:10.570849586 +0200
-@@ -50,7 +50,9 @@
- #include <unistd.h>
- #include <fcntl.h>
- #include <stdlib.h>
-+#ifndef __FreeBSD__
- #include <malloc.h>
-+#endif
-
- static int setAudioOSS(int, duplexDev *, int, int, int);
-
diff --git a/audio/bristol/files/patch-libbristolaudio_audioEngine.c b/audio/bristol/files/patch-libbristolaudio_audioEngine.c
new file mode 100644
index 000000000000..bf2b7c5d2a7c
--- /dev/null
+++ b/audio/bristol/files/patch-libbristolaudio_audioEngine.c
@@ -0,0 +1,13 @@
+--- libbristolaudio/audioEngine.c.orig 2012-04-27 11:04:29 UTC
++++ libbristolaudio/audioEngine.c
+@@ -59,8 +59,10 @@ extern int alsaDevAudioStart(duplexDev *
+ #include <fcntl.h>
+ #ifdef SUBFRAGMENT
+ #include <stdlib.h>
++#ifndef __FreeBSD__
+ #include <malloc.h>
+ #endif
++#endif
+
+ #include <sys/ioctl.h>
+
diff --git a/audio/bristol/files/patch-libbristolaudio_audioGUIOSS.c b/audio/bristol/files/patch-libbristolaudio_audioGUIOSS.c
new file mode 100644
index 000000000000..06d1592d19c6
--- /dev/null
+++ b/audio/bristol/files/patch-libbristolaudio_audioGUIOSS.c
@@ -0,0 +1,12 @@
+--- libbristolaudio/audioGUIOSS.c.orig 2012-04-27 11:04:29 UTC
++++ libbristolaudio/audioGUIOSS.c
+@@ -50,7 +50,9 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#ifndef __FreeBSD__
+ #include <malloc.h>
++#endif
+
+ static int setAudioOSS(int, duplexDev *, int, int, int);
+
diff --git a/audio/calf/files/patch-src-Makefile.am b/audio/calf/files/patch-src_Makefile.am
index 963bdf37efdb..963bdf37efdb 100644
--- a/audio/calf/files/patch-src-Makefile.am
+++ b/audio/calf/files/patch-src_Makefile.am
diff --git a/audio/calf/files/patch-src__calf__audio_fx.h b/audio/calf/files/patch-src_calf_audio__fx.h
index 0b1334427311..0b1334427311 100644
--- a/audio/calf/files/patch-src__calf__audio_fx.h
+++ b/audio/calf/files/patch-src_calf_audio__fx.h
diff --git a/audio/calf/files/patch-src__calf__osctl.h b/audio/calf/files/patch-src_calf_osctl.h
index 4d1fe7be00ca..4d1fe7be00ca 100644
--- a/audio/calf/files/patch-src__calf__osctl.h
+++ b/audio/calf/files/patch-src_calf_osctl.h
diff --git a/audio/calf/files/patch-src-giface.cpp b/audio/calf/files/patch-src_giface.cpp
index eecf206026f8..eecf206026f8 100644
--- a/audio/calf/files/patch-src-giface.cpp
+++ b/audio/calf/files/patch-src_giface.cpp
diff --git a/audio/calf/files/patch-src-monosynth.cpp b/audio/calf/files/patch-src_monosynth.cpp
index 1c949a8fbef1..1c949a8fbef1 100644
--- a/audio/calf/files/patch-src-monosynth.cpp
+++ b/audio/calf/files/patch-src_monosynth.cpp
diff --git a/audio/cam/files/patch-cam.c b/audio/cam/files/patch-cam.c
index ded3a0148ba1..65518f18c2d7 100644
--- a/audio/cam/files/patch-cam.c
+++ b/audio/cam/files/patch-cam.c
@@ -1,5 +1,5 @@
---- cam.c.orig 2012-09-03 00:31:15.000000000 +0200
-+++ cam.c 2012-09-03 00:31:42.000000000 +0200
+--- cam.c.orig 1996-04-09 18:17:57 UTC
++++ cam.c
@@ -24,9 +24,10 @@
@@ -11,4 +11,4 @@
+int main(int argc, char *argv[])
{
if (argc == 1)
- {
+ {
diff --git a/audio/cam/files/patch-sounds.c b/audio/cam/files/patch-sounds.c
index 5c19493a2743..2325924fd7e4 100644
--- a/audio/cam/files/patch-sounds.c
+++ b/audio/cam/files/patch-sounds.c
@@ -1,6 +1,5 @@
-diff -ru ../cam-1.02-virgin/sounds.c ./sounds.c
---- ../cam-1.02-virgin/sounds.c Mon Oct 21 13:33:55 1996
-+++ ./sounds.c Sun Nov 10 12:20:22 1996
+--- sounds.c.orig 1996-10-21 18:33:55 UTC
++++ sounds.c
@@ -36,7 +36,7 @@
@@ -10,7 +9,7 @@ diff -ru ../cam-1.02-virgin/sounds.c ./sounds.c
char *mixer_dev = "/dev/mixer";
struct devices
{
-@@ -287,7 +287,7 @@
+@@ -287,7 +287,7 @@ void init_sliders(void)
else
dev_vol[dev_count].vol_right = dev_vol[dev_count].vol_left;
diff --git a/audio/cd-console/files/patch-Makefile b/audio/cd-console/files/patch-Makefile
index 43fada8853d9..69e3d88e18ef 100644
--- a/audio/cd-console/files/patch-Makefile
+++ b/audio/cd-console/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sat Aug 25 11:09:00 2001
-+++ Makefile Mon Jun 3 19:55:53 2002
+--- Makefile.orig 2001-08-25 18:09:00 UTC
++++ Makefile
@@ -5,43 +5,46 @@
# very welcome).
diff --git a/audio/cd-console/files/patch-cd-console.cpp b/audio/cd-console/files/patch-cd-console.cpp
index a3f1bb1fe3b3..b46674dadcc3 100644
--- a/audio/cd-console/files/patch-cd-console.cpp
+++ b/audio/cd-console/files/patch-cd-console.cpp
@@ -1,5 +1,5 @@
---- cd-console.cpp.orig Mon Jun 3 19:46:12 2002
-+++ cd-console.cpp Mon Jun 3 19:46:01 2002
+--- cd-console.cpp.orig 2001-08-25 18:09:00 UTC
++++ cd-console.cpp
@@ -1,4 +1,5 @@
#include <stdlib.h>
+#include <string.h>
diff --git a/audio/cd-console/files/patch-cd__ll__bsd.cpp b/audio/cd-console/files/patch-cd__ll__bsd.cpp
new file mode 100644
index 000000000000..1f97601cc42a
--- /dev/null
+++ b/audio/cd-console/files/patch-cd__ll__bsd.cpp
@@ -0,0 +1,13 @@
+--- cd_ll_bsd.cpp.orig 2001-08-25 18:09:00 UTC
++++ cd_ll_bsd.cpp
+@@ -10,7 +10,9 @@
+ #include "cd_ll_bsd.h"
+
+ // the cd-rom device file
+-#define DEVICE "/dev/acd0c"
++#ifndef DEVICE
++#define DEVICE "/dev/cdrom"
++#endif
+
+ cd_ll_bsd::cd_ll_bsd()
+ : m_fd(-1)
diff --git a/audio/cd-console/files/patch-cd_ll_bsd.cpp b/audio/cd-console/files/patch-cd_ll_bsd.cpp
deleted file mode 100644
index 4e6a557db5ab..000000000000
--- a/audio/cd-console/files/patch-cd_ll_bsd.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- cd_ll_bsd.cpp.orig Sat Aug 25 14:09:00 2001
-+++ cd_ll_bsd.cpp Sat Oct 26 21:16:54 2002
-@@ -10,7 +10,9 @@
- #include "cd_ll_bsd.h"
-
- // the cd-rom device file
--#define DEVICE "/dev/acd0c"
-+#ifndef DEVICE
-+#define DEVICE "/dev/cdrom"
-+#endif
-
- cd_ll_bsd::cd_ll_bsd()
- : m_fd(-1)
diff --git a/audio/cd-discid/files/patch-Makefile b/audio/cd-discid/files/patch-Makefile
index 3d8f87cc5f70..980c21996cbc 100644
--- a/audio/cd-discid/files/patch-Makefile
+++ b/audio/cd-discid/files/patch-Makefile
@@ -1,7 +1,7 @@
---- Makefile.orig Wed Oct 22 16:40:23 2003
-+++ Makefile Wed Oct 22 16:40:34 2003
+--- Makefile.orig 2003-01-05 20:18:07 UTC
++++ Makefile
@@ -1,6 +1,6 @@
- VERSION = 0.9
+ VERSION = 0.8
-CC = gcc
-CFLAGS = -g -O2
+CC ?= cc
diff --git a/audio/cdparanoia/files/patch-Makefile.in b/audio/cdparanoia/files/patch-Makefile.in
index 1cf4eb97e407..4137b02ec1aa 100644
--- a/audio/cdparanoia/files/patch-Makefile.in
+++ b/audio/cdparanoia/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2001-03-28 00:46:58.000000000 +0200
-+++ Makefile.in 2014-02-09 13:21:39.449603274 +0100
-@@ -8,7 +8,7 @@
+--- Makefile.in.orig 2001-03-27 22:46:58 UTC
++++ Makefile.in
+@@ -8,7 +8,7 @@ VPATH=@srcdir@
srcdir=@srcdir@
@SET_MAKE@
@@ -9,7 +9,7 @@
OPT=@OPT@ $(FLAGS)
DEBUG=@DEBUG@ $(FLAGS)
CC=@CC@
-@@ -32,7 +32,7 @@
+@@ -32,7 +32,7 @@ export VERSION
ifeq ($(STATIC),TRUE)
LIBS = interface/libcdda_interface.a paranoia/libcdda_paranoia.a \
@@ -18,7 +18,7 @@
LIBDEP = interface/libcdda_interface.a paranoia/libcdda_paranoia.a
else
LIBS = -lcdda_interface -lcdda_paranoia -lm
-@@ -64,28 +64,27 @@
+@@ -64,28 +64,27 @@ slib:
cd paranoia && $(MAKE) slib
install:
diff --git a/audio/cdparanoia/files/patch-configure b/audio/cdparanoia/files/patch-configure
index 5b35c542df07..8bbd2f313ccf 100644
--- a/audio/cdparanoia/files/patch-configure
+++ b/audio/cdparanoia/files/patch-configure
@@ -3,10 +3,9 @@ Index: configure
RCS file: /home/cvs/cdparanoia/configure,v
retrieving revision 1.1.1.1
retrieving revision 1.2
-diff -u -r1.1.1.1 -r1.2
---- configure 2003/01/05 09:46:26 1.1.1.1
-+++ configure 2003/01/05 12:41:47 1.2
-@@ -1084,7 +1084,6 @@
+--- configure.orig 2000-04-15 15:13:01 UTC
++++ configure
+@@ -1084,7 +1084,6 @@ EOF
fi
diff --git a/audio/cdparanoia/files/patch-interface-Makefile.in b/audio/cdparanoia/files/patch-interface-Makefile.in
deleted file mode 100644
index ba4aee123c93..000000000000
--- a/audio/cdparanoia/files/patch-interface-Makefile.in
+++ /dev/null
@@ -1,57 +0,0 @@
-Index: interface/Makefile.in
-===================================================================
-RCS file: /home/cvs/cdparanoia/interface/Makefile.in,v
-retrieving revision 1.1.1.1
-retrieving revision 1.3
-diff -u -r1.1.1.1 -r1.3
---- interface/Makefile.in 2003/01/05 09:46:26 1.1.1.1
-+++ interface/Makefile.in 2003/01/05 12:03:46 1.3
-@@ -9,13 +9,13 @@
- @SET_MAKE@
- FLAGS=@SBPCD_H@ @UCDROM_H@ @TYPESIZES@ @CFLAGS@
- OPT=@OPT@ $(FLAGS)
--DEBUG=@DEBUG@ $(FLAGS) -DCDDA_TEST
-+DEBUG=@DEBUG@ $(FLAGS)
- CC=@CC@
- LD=@CC@
- LDFLAGS=@LDFLAGS@ $(FLAGS)
- AR=@AR@
- RANLIB=@RANLIB@
--LIBS = -lm
-+LIBS = -lm -lcam
- CPPFLAGS+=-D_REENTRANT
-
- OFILES = scan_devices.o common_interface.o cooked_interface.o interface.o\
-@@ -23,19 +23,15 @@
-
- export VERSION
-
--all: lib slib
--
--debug:
-- $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
--
--lib:
-+all:
- $(MAKE) libcdda_interface.a CFLAGS="$(OPT)"
--
--slib:
- $(MAKE) lessmessy
- $(MAKE) libcdda_interface.so CFLAGS="$(OPT) -fpic"
- [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so libcdda_interface.so.0
-
-+debug:
-+ $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
-+
- test:
- $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
- $(CC) $(DEBUG) -c test.c
-@@ -46,7 +42,7 @@
- $(RANLIB) libcdda_interface.a
-
- libcdda_interface.so: $(OFILES)
-- $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES)
-+ $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES) ${LIBS}
- [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so.0
- [ -e libcdda_interface.so ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so
-
diff --git a/audio/cdparanoia/files/patch-interface-cdda_interface.h b/audio/cdparanoia/files/patch-interface-cdda_interface.h
deleted file mode 100644
index cf44b717b52d..000000000000
--- a/audio/cdparanoia/files/patch-interface-cdda_interface.h
+++ /dev/null
@@ -1,50 +0,0 @@
---- interface/cdda_interface.h.orig Sat Mar 24 02:15:46 2001
-+++ interface/cdda_interface.h Thu Jan 5 22:27:11 2006
-@@ -21,6 +21,11 @@
- #include <sys/types.h>
- #include <signal.h>
-
-+#ifdef __FreeBSD__
-+#include <stdio.h>
-+#include <camlib.h>
-+#endif
-+
- #define MAXTRK 100
-
- typedef struct TOC { /* structure of table of contents */
-@@ -47,13 +52,19 @@
- int opened; /* This struct may just represent a candidate for opening */
-
- char *cdda_device_name;
-+#ifdef Linux
- char *ioctl_device_name;
-
- int cdda_fd;
-- int ioctl_fd;
-
-- char *drive_model;
- int drive_type;
-+#elif defined(__FreeBSD__)
-+ struct cam_device *dev;
-+ union ccb *ccb;
-+#endif
-+
-+ int ioctl_fd;
-+ char *drive_model;
- int interface;
- int bigendianp;
- int nsectors;
-@@ -83,9 +94,13 @@
- int is_mmc;
-
- /* SCSI command buffer and offset pointers */
-+#ifdef Linux
- unsigned char *sg;
- unsigned char *sg_buffer;
- unsigned char inqbytes[4];
-+#elif defined(__FreeBSD__)
-+ unsigned char *sg_buffer;
-+#endif
-
- /* Scsi parameters and state */
- unsigned char density;
diff --git a/audio/cdparanoia/files/patch-interface-common_interface.c b/audio/cdparanoia/files/patch-interface-common_interface.c
deleted file mode 100644
index 1248487506dc..000000000000
--- a/audio/cdparanoia/files/patch-interface-common_interface.c
+++ /dev/null
@@ -1,71 +0,0 @@
-Index: interface/common_interface.c
-===================================================================
-RCS file: /home/cvs/cdparanoia/interface/common_interface.c,v
-retrieving revision 1.1.1.1
-retrieving revision 1.5
-diff -u -r1.1.1.1 -r1.5
---- interface/common_interface.c 2003/01/05 09:46:26 1.1.1.1
-+++ interface/common_interface.c 2003/01/06 21:39:53 1.5
-@@ -13,12 +13,19 @@
- #include "utils.h"
- #include "smallft.h"
-
-+#ifdef Linux
- #include <linux/hdreg.h>
-+#endif
-
- /* Test for presence of a cdrom by pinging with the 'CDROMVOLREAD' ioctl() */
- int ioctl_ping_cdrom(int fd){
-+#ifdef Linux
- struct cdrom_volctrl volctl;
- if (ioctl(fd, CDROMVOLREAD, &volctl))
-+#elif defined(__FreeBSD__)
-+ struct ioc_vol volctl;
-+ if (ioctl(fd, CDIOCGETVOL, &volctl))
-+#endif
- return(1); /* failure */
-
- return(0);
-@@ -26,6 +33,7 @@
- }
-
-
-+#ifdef Linux
- /* Use the ioctl thingy above ping the cdrom; this will get model info */
- char *atapi_drive_info(int fd){
- /* Work around the fact that the struct grew without warning in
-@@ -46,6 +54,7 @@
- free(id);
- return(ret);
- }
-+#endif
-
- int data_bigendianp(cdrom_drive *d){
- float lsb_votes=0;
-@@ -171,7 +180,9 @@
- knows the leasoud/leadin size. */
-
- int FixupTOC(cdrom_drive *d,int tracks){
-+#ifdef Linux
- struct cdrom_multisession ms_str;
-+#endif
- int j;
-
- /* First off, make sure the 'starting sector' is >=0 */
-@@ -208,6 +219,8 @@
- /* For a scsi device, the ioctl must go to the specialized SCSI
- CDROM device, not the generic device. */
-
-+ /* XXX */
-+#ifdef Linux
- if (d->ioctl_fd != -1) {
- int result;
-
-@@ -231,6 +244,7 @@
- return 1;
- }
- }
-+#endif
- return 0;
- }
-
diff --git a/audio/cdparanoia/files/patch-interface-cooked_interface.c b/audio/cdparanoia/files/patch-interface-cooked_interface.c
deleted file mode 100644
index cc067fdce434..000000000000
--- a/audio/cdparanoia/files/patch-interface-cooked_interface.c
+++ /dev/null
@@ -1,180 +0,0 @@
---- interface/cooked_interface.c.orig Wed Apr 19 15:41:04 2000
-+++ interface/cooked_interface.c Fri Nov 7 17:16:03 2003
-@@ -1,6 +1,8 @@
- /******************************************************************
- * CopyPolicy: GNU Public License 2 applies
- * Copyright (C) Monty xiphmont@mit.edu
-+ * FreeBSD porting (c) 2003
-+ * Simon 'corecode' Schubert <corecode@corecode.ath.cx>
- *
- * CDROM code specific to the cooked ioctl interface
- *
-@@ -10,6 +12,7 @@
- #include "common_interface.h"
- #include "utils.h"
-
-+#ifdef Linux
- static int cooked_readtoc (cdrom_drive *d){
- int i;
- int tracks;
-@@ -129,6 +132,142 @@
- return(sectors);
- }
-
-+#elif defined(__FreeBSD__)
-+static int
-+cooked_readtoc(cdrom_drive *d)
-+{
-+ int i;
-+ struct ioc_toc_header hdr;
-+ struct ioc_read_toc_single_entry entry;
-+
-+ if (ioctl(d->ioctl_fd, CDIOREADTOCHEADER, &hdr) == -1) {
-+ int ret;
-+
-+ if (errno == EPERM) {
-+ ret = -102;
-+ cderror(d, "102: ");
-+ } else {
-+ ret = -4;
-+ cderror(d, "004: Unable to read table of contents header: ");
-+ }
-+ cderror(d, strerror(errno));
-+ cderror(d, "\n");
-+ return ret;
-+ }
-+
-+ entry.address_format = CD_LBA_FORMAT;
-+ for (i = hdr.starting_track; i <= hdr.ending_track; ++i) {
-+ entry.track = i;
-+
-+ if (ioctl(d->ioctl_fd, CDIOREADTOCENTRY, &entry) == -1) {
-+ cderror(d, "005: Unable to read table of contents entry\n");
-+ return -5;
-+ }
-+
-+ d->disc_toc[i - hdr.starting_track].bFlags = entry.entry.control;
-+ d->disc_toc[i - hdr.starting_track].bTrack = entry.entry.track;
-+ d->disc_toc[i - hdr.starting_track].dwStartSector = be32_to_cpu(entry.entry.addr.lba);
-+ }
-+
-+ entry.track = 0xaa; /* leadout */
-+
-+ if (ioctl(d->ioctl_fd, CDIOREADTOCENTRY, &entry) == -1) {
-+ cderror(d, "005: Unable to read table of contents entry\n");
-+ return -5;
-+ }
-+
-+ d->disc_toc[i - hdr.starting_track].bFlags = entry.entry.control;
-+ d->disc_toc[i - hdr.starting_track].bTrack = entry.entry.track;
-+ d->disc_toc[i - hdr.starting_track].dwStartSector = be32_to_cpu(entry.entry.addr.lba);
-+
-+ d->cd_extra = FixupTOC(d, hdr.ending_track - hdr.starting_track + 2); /* with TOC */
-+
-+ return hdr.ending_track - hdr.starting_track + 1;
-+}
-+
-+static int
-+cooked_setspeed(cdrom_drive *d, int speed)
-+{
-+#ifdef CDRIOCREADSPEED
-+ speed *= 177;
-+ return ioctl(d->ioctl_fd, CDRIOCREADSPEED, &speed);
-+#else
-+ return -1;
-+#endif
-+}
-+
-+
-+static long
-+cooked_read(cdrom_drive *d, void *p, long begin, long sectors)
-+{
-+ int retry_count = 0;
-+/* CDIOCREADAUDIO has been removed in FreeBSD 5.1-CURRENT */
-+#if __FreeBSD_version >= 501106
-+ int bsize = CD_FRAMESIZE_RAW;
-+#else
-+ struct ioc_read_audio arg;
-+
-+ if (sectors > d->nsectors)
-+ sectors = d->nsectors;
-+
-+ arg.address_format = CD_LBA_FORMAT;
-+ arg.address.lba = begin;
-+ arg.buffer = p;
-+#endif
-+
-+#if __FreeBSD_version >= 501106
-+ if (ioctl(d->ioctl_fd, CDRIOCSETBLOCKSIZE, &bsize) == -1)
-+ return -7;
-+#endif
-+ for (;;) {
-+/* CDIOCREADAUDIO has been removed in FreeBSD 5.1-CURRENT */
-+#if __FreeBSD_version >= 501106
-+ if (pread(d->ioctl_fd, p, sectors*bsize, begin*bsize) != sectors*bsize) {
-+#else
-+ arg.nframes = sectors;
-+ if (ioctl(d->ioctl_fd, CDIOCREADAUDIO, &arg) == -1) {
-+#endif
-+ if (!d->error_retry)
-+ return -7;
-+
-+ switch (errno) {
-+ case ENOMEM:
-+ if (sectors == 1) {
-+ cderror(d, "300: Kernel memory error\n");
-+ return -300;
-+ }
-+ /* FALLTHROUGH */
-+ default:
-+ if (sectors == 1) {
-+ if (retry_count > MAX_RETRIES - 1) {
-+ char b[256];
-+ snprintf(b, sizeof(b),
-+ "010: Unable to access sector %ld; "
-+ "skipping...\n", begin);
-+ cderror(d, b);
-+ return -10;
-+ }
-+ break;
-+ }
-+ }
-+
-+ if (retry_count > 4 && sectors > 1)
-+ sectors = sectors * 3 / 4;
-+
-+ ++retry_count;
-+
-+ if (retry_count > MAX_RETRIES) {
-+ cderror(d, "007: Unknown, unrecoverable error reading data\n");
-+ return -7;
-+ }
-+ } else
-+ break;
-+ }
-+
-+ return sectors;
-+}
-+#endif
-+
- /* hook */
- static int Dummy (cdrom_drive *d,int Switch){
- return(0);
-@@ -193,6 +332,7 @@
- int cooked_init_drive (cdrom_drive *d){
- int ret;
-
-+#ifdef Linux
- switch(d->drive_type){
- case MATSUSHITA_CDROM_MAJOR: /* sbpcd 1 */
- case MATSUSHITA_CDROM2_MAJOR: /* sbpcd 2 */
-@@ -243,6 +383,9 @@
- default:
- d->nsectors=40;
- }
-+#elif defined(__FreeBSD__)
-+ d->nsectors = 26; /* FreeBSD only support 64K I/O transfer size */
-+#endif
- d->enable_cdda = Dummy;
- d->read_audio = cooked_read;
- d->set_speed = cooked_setspeed;
diff --git a/audio/cdparanoia/files/patch-interface-interface.c b/audio/cdparanoia/files/patch-interface-interface.c
deleted file mode 100644
index 99e7372081e7..000000000000
--- a/audio/cdparanoia/files/patch-interface-interface.c
+++ /dev/null
@@ -1,27 +0,0 @@
---- interface/interface.c.orig Thu Apr 20 00:41:04 2000
-+++ interface/interface.c Sat Jan 7 14:31:19 2006
-@@ -30,11 +30,24 @@
-
- _clean_messages(d);
- if(d->cdda_device_name)free(d->cdda_device_name);
-+#ifdef Linux
- if(d->ioctl_device_name)free(d->ioctl_device_name);
- if(d->drive_model)free(d->drive_model);
- if(d->cdda_fd!=-1)close(d->cdda_fd);
- if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
- if(d->sg)free(d->sg);
-+#elif defined(__FreeBSD__)
-+ if (d->drive_model)
-+ free(d->drive_model);
-+ if (d->ccb)
-+ cam_freeccb(d->ccb);
-+ if (d->dev)
-+ cam_close_device(d->dev);
-+ if (d->sg_buffer)
-+ free(d->sg_buffer);
-+ if (d->ioctl_fd != -1)
-+ close(d->ioctl_fd);
-+#endif
-
- free(d);
- }
diff --git a/audio/cdparanoia/files/patch-interface-low_interface.h b/audio/cdparanoia/files/patch-interface-low_interface.h
deleted file mode 100644
index 1ad09f12b69b..000000000000
--- a/audio/cdparanoia/files/patch-interface-low_interface.h
+++ /dev/null
@@ -1,55 +0,0 @@
-Index: interface/low_interface.h
-===================================================================
-RCS file: /home/cvs/cdparanoia/interface/low_interface.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.3
-diff -u -r1.1.1.1 -r1.3
---- interface/low_interface.h 2003/01/05 09:46:26 1.1.1.1
-+++ interface/low_interface.h 2003/01/06 21:26:23 1.3
-@@ -25,6 +25,8 @@
- #include <sys/time.h>
- #include <sys/types.h>
-
-+#ifdef Linux
-+
- #include <linux/major.h>
- #include <linux/version.h>
-
-@@ -48,12 +50,27 @@
- #include <linux/cdrom.h>
- #include <linux/major.h>
-
-+#elif defined(__FreeBSD__)
-+
-+#include <sys/cdio.h>
-+#include <sys/cdrio.h>
-+
-+#include <cam/scsi/scsi_message.h>
-+#include <camlib.h>
-+
-+#endif
-+
- #include "cdda_interface.h"
-
- #define MAX_RETRIES 8
- #define MAX_BIG_BUFF_SIZE 65536
- #define MIN_BIG_BUFF_SIZE 4096
-+
-+#ifdef Linux
- #define SG_OFF sizeof(struct sg_header)
-+#else
-+#define SG_OFF (0)
-+#endif
-
- #ifndef SG_EMULATED_HOST
- /* old kernel version; the check for the ioctl is still runtime, this
-@@ -64,7 +81,9 @@
- #endif
-
- extern int cooked_init_drive (cdrom_drive *d);
-+#ifdef Linux
- extern unsigned char *scsi_inquiry (cdrom_drive *d);
-+#endif
- extern int scsi_init_drive (cdrom_drive *d);
- #ifdef CDDA_TEST
- extern int test_init_drive (cdrom_drive *d);
diff --git a/audio/cdparanoia/files/patch-interface-scan_devices.c b/audio/cdparanoia/files/patch-interface-scan_devices.c
deleted file mode 100644
index 7cc9b3b7b5be..000000000000
--- a/audio/cdparanoia/files/patch-interface-scan_devices.c
+++ /dev/null
@@ -1,242 +0,0 @@
---- interface/scan_devices.c.orig Mon Mar 26 07:44:01 2001
-+++ interface/scan_devices.c Thu Jan 5 22:27:44 2006
-@@ -1,6 +1,8 @@
- /******************************************************************
- * CopyPolicy: GNU Public License 2 applies
- * Copyright (C) 1998 Monty xiphmont@mit.edu
-+ * FreeBSD porting (c) 2003
-+ * Simon 'corecode' Schubert <corecode@corecode.ath.cx>
- *
- * Autoscan for or verify presence of a cdrom device
- *
-@@ -21,6 +23,8 @@
-
- #define MAX_DEV_LEN 20 /* Safe because strings only come from below */
- /* must be absolute paths! */
-+
-+#ifdef Linux
- static char *scsi_cdrom_prefixes[]={
- "/dev/scd",
- "/dev/sr",
-@@ -49,6 +53,17 @@
- "/dev/cm206cd",
- "/dev/gscd",
- "/dev/optcd",NULL};
-+#elif defined(__FreeBSD__)
-+static char *cdrom_devices[] = {
-+ "/dev/cd?",
-+ "/dev/acd?",
-+ "/dev/wcd?",
-+ "/dev/mcd?",
-+ "/dev/cd?c",
-+ "/dev/acd?c",
-+ "/dev/wcd?c",
-+ "/dev/mcd?c", NULL};
-+#endif
-
- /* Functions here look for a cdrom drive; full init of a drive type
- happens in interface.c */
-@@ -75,10 +90,12 @@
- if((d=cdda_identify(buffer,messagedest,messages)))
- return(d);
- idmessage(messagedest,messages,"",NULL);
-+#ifdef Linux
- buffer[pos-(cdrom_devices[i])]=j+97;
- if((d=cdda_identify(buffer,messagedest,messages)))
- return(d);
- idmessage(messagedest,messages,"",NULL);
-+#endif
- }
- }else{
- /* Name. Go for it. */
-@@ -117,8 +134,14 @@
- }
- #endif
-
-+#ifdef Linux /* is order of checks important? */
- d=cdda_identify_cooked(device,messagedest,messages);
- if(!d)d=cdda_identify_scsi(device,NULL,messagedest,messages);
-+#elif defined(__FreeBSD__)
-+ d = cdda_identify_scsi(device, NULL, messagedest, messages);
-+ if (d == NULL)
-+ d = cdda_identify_cooked(device, messagedest, messages);
-+#endif
-
- #ifdef CDDA_TEST
- if(!d)d=cdda_identify_test(device,messagedest,messages);
-@@ -143,6 +166,7 @@
-
- }
-
-+#ifdef Linux
- cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
- char **messages){
-
-@@ -275,6 +299,61 @@
- return(d);
- }
-
-+#elif defined(__FreeBSD__)
-+cdrom_drive *
-+cdda_identify_cooked(const char *dev, int messagedest, char **messages)
-+{
-+ cdrom_drive *d;
-+ struct stat st;
-+
-+ if (stat(dev, &st)) {
-+ idperror(messagedest, messages, "\t\tCould not stat %s", dev);
-+ return NULL;
-+ }
-+
-+ if (!S_ISCHR(st.st_mode)) {
-+ idmessage(messagedest, messages, "\t\t%s is no block device", dev);
-+ return NULL;
-+ }
-+
-+ if ((d = calloc(1, sizeof(*d))) == NULL) {
-+ idperror(messagedest, messages, "\t\tCould not allocate memory", NULL);
-+ return NULL;
-+ }
-+ d->ioctl_fd = -1;
-+
-+ if ((d->ioctl_fd = open(dev, O_RDONLY)) == -1) {
-+ idperror(messagedest, messages, "\t\tCould not open %s", dev);
-+ goto cdda_identify_cooked_fail;
-+ }
-+
-+ if (ioctl_ping_cdrom(d->ioctl_fd)) {
-+ idmessage(messagedest, messages, "\t\tDevice %s is not a CDROM", dev);
-+ goto cdda_identify_cooked_fail;
-+ }
-+
-+ d->cdda_device_name = copystring(dev);
-+ d->drive_model = copystring("Generic cooked ioctl CDROM");
-+ d->interface = COOKED_IOCTL;
-+ d->bigendianp = -1;
-+ d->nsectors = -1;
-+
-+ idmessage(messagedest, messages, "\t\tCDROM sensed: %s\n", d->drive_model);
-+
-+ return d;
-+
-+cdda_identify_cooked_fail:
-+ if (d != NULL) {
-+ if (d->ioctl_fd != -1)
-+ close(d->ioctl_fd);
-+ free(d);
-+ }
-+ return NULL;
-+}
-+#endif
-+
-+
-+#ifdef Linux
- struct sg_id {
- long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */
- long l2; /* Unique id */
-@@ -390,6 +469,7 @@
- if(dev!=-1)close(dev);
- return(NULL);
- }
-+#endif
-
- void strscat(char *a,char *b,int n){
- int i;
-@@ -401,6 +481,7 @@
- strcat(a," ");
- }
-
-+#ifdef Linux
- /* At this point, we're going to punt compatability before SG2, and
- allow only SG2 and SG3 */
- static int verify_SG_version(cdrom_drive *d,int messagedest,
-@@ -653,6 +734,89 @@
- if(g_fd!=-1)close(g_fd);
- return(NULL);
- }
-+#elif defined(__FreeBSD__)
-+
-+cdrom_drive *cdda_identify_scsi(const char *device,
-+ const char *dummy,
-+ int messagedest,
-+ char **messages)
-+{
-+ char *devname;
-+ cdrom_drive *d = NULL;
-+
-+ if (device == NULL) {
-+ idperror(messagedest, messages, "\t\tNo device specified", NULL);
-+ return NULL;
-+ }
-+
-+ if ((devname = test_resolve_symlink(device, messagedest, messages)) == NULL)
-+ return NULL;
-+
-+ if ((d = calloc(1, sizeof(*d))) == NULL) {
-+ idperror(messagedest, messages, "\t\tCould not allocate memory", NULL);
-+ free(devname);
-+ return NULL;
-+ }
-+
-+ if ((d->dev = cam_open_device(devname, O_RDWR)) == NULL) {
-+ idperror(messagedest, messages, "\t\tCould not open SCSI device: %s", cam_errbuf);
-+ goto cdda_identify_scsi_fail;
-+ }
-+
-+ if ((d->ccb = cam_getccb(d->dev)) == NULL) {
-+ idperror(messagedest, messages, "\t\tCould not allocate ccb", NULL);
-+ goto cdda_identify_scsi_fail;
-+ }
-+
-+ if (strncmp(d->dev->inq_data.vendor, "TOSHIBA", 7) == 0 &&
-+ strncmp(d->dev->inq_data.product, "CD_ROM", 6) == 0 &&
-+ SID_TYPE(&d->dev->inq_data) == T_DIRECT) {
-+ d->dev->inq_data.device = T_CDROM;
-+ d->dev->inq_data.dev_qual2 |= 0x80;
-+ }
-+
-+ if (SID_TYPE(&d->dev->inq_data) != T_CDROM &&
-+ SID_TYPE(&d->dev->inq_data) != T_WORM) {
-+ idmessage(messagedest, messages,
-+ "\t\tDevice is neither a CDROM nor a WORM device\n", NULL);
-+ goto cdda_identify_scsi_fail;
-+ }
-+
-+ d->cdda_device_name = copystring(devname);
-+ d->ioctl_fd = -1;
-+ d->bigendianp = -1;
-+ d->nsectors = -1;
-+ d->lun = d->dev->target_lun;
-+ d->interface = GENERIC_SCSI;
-+
-+ if ((d->sg_buffer = malloc(MAX_BIG_BUFF_SIZE)) == NULL) {
-+ idperror(messagedest, messages, "Could not allocate buffer memory", NULL);
-+ goto cdda_identify_scsi_fail;
-+ }
-+
-+ if ((d->drive_model = calloc(36,1)) == NULL) {
-+ }
-+
-+ strscat(d->drive_model, d->dev->inq_data.vendor, SID_VENDOR_SIZE);
-+ strscat(d->drive_model, d->dev->inq_data.product, SID_PRODUCT_SIZE);
-+ strscat(d->drive_model, d->dev->inq_data.revision, SID_REVISION_SIZE);
-+
-+ idmessage(messagedest, messages, "\nCDROM model sensed: %s", d->drive_model);
-+
-+ return d;
-+
-+cdda_identify_scsi_fail:
-+ free(devname);
-+ if (d) {
-+ if (d->ccb)
-+ cam_freeccb(d->ccb);
-+ if (d->dev)
-+ cam_close_device(d->dev);
-+ free(d);
-+ }
-+ return NULL;
-+}
-+#endif
-
- #ifdef CDDA_TEST
-
diff --git a/audio/cdparanoia/files/patch-interface-scsi_interface.c b/audio/cdparanoia/files/patch-interface-scsi_interface.c
deleted file mode 100644
index b482169b4dfd..000000000000
--- a/audio/cdparanoia/files/patch-interface-scsi_interface.c
+++ /dev/null
@@ -1,313 +0,0 @@
---- interface/scsi_interface.c.orig 2001-03-23 17:15:46.000000000 -0800
-+++ interface/scsi_interface.c 2011-10-17 21:33:00.000000000 -0700
-@@ -3,6 +3,8 @@
- * Original interface.c Copyright (C) 1994-1997
- * Eissfeldt heiko@colossus.escape.de
- * Current blenderization Copyright (C) 1998-1999 Monty xiphmont@mit.edu
-+ * FreeBSD porting (c) 2003
-+ * Simon 'corecode' Schubert <corecode@corecode.ath.cx>
- *
- * Generic SCSI interface specific code.
- *
-@@ -23,6 +25,7 @@
- int table,reserved;
- char buffer[256];
-
-+#ifdef Linux
- /* maximum transfer size? */
- if(ioctl(d->cdda_fd,SG_GET_RESERVED_SIZE,&reserved)){
- /* Up, guess not. */
-@@ -59,8 +62,17 @@
- cdmessage(d,"\tCouldn't disable command queue! Continuing anyway...\n");
- }
-
-+#elif defined(__FreeBSD__)
-+ d->nsectors = 26; /* FreeBSD only supports 64K I/O transfer size */
-+ d->bigbuff = d->nsectors * CD_FRAMESIZE_RAW;
-+
-+ sprintf(buffer,"\tSetting default read size to %d sectors (%d bytes).\n\n",
-+ d->nsectors,d->nsectors*CD_FRAMESIZE_RAW);
-+ cdmessage(d,buffer);
-+#endif
- }
-
-+#ifdef Linux
- static void reset_scsi(cdrom_drive *d){
- int arg;
- d->enable_cdda(d,0);
-@@ -74,6 +86,30 @@
- d->enable_cdda(d,1);
- }
-
-+#elif defined(__FreeBSD__)
-+static void reset_scsi(cdrom_drive *d) {
-+ d->enable_cdda(d,0);
-+
-+ d->ccb->ccb_h.func_code = XPT_RESET_DEV;
-+ d->ccb->ccb_h.timeout = 5000;
-+
-+ cdmessage(d, "sending SCSI reset... ");
-+ if (cam_send_ccb(d->dev, d->ccb)) {
-+ cdmessage(d, "error sending XPT_RESET_DEV CCB");
-+ } else {
-+
-+ if (((d->ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) ||
-+ ((d->ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_BDR_SENT))
-+ cdmessage(d,"OK\n");
-+ else
-+ cdmessage(d,"FAILED\n");
-+ }
-+
-+ d->enable_cdda(d,1);
-+}
-+#endif
-+
-+#ifdef Linux
- static void clear_garbage(cdrom_drive *d){
- fd_set fdset;
- struct timeval tv;
-@@ -104,8 +140,10 @@
- flag=1;
- }
- }
-+#endif
-
- /* process a complete scsi command. */
-+#ifdef Linux
- static int handle_scsi_cmd(cdrom_drive *d,
- unsigned int cmd_len,
- unsigned int in_size,
-@@ -284,6 +322,95 @@
- return(0);
- }
-
-+#elif defined(__FreeBSD__)
-+static int handle_scsi_cmd(cdrom_drive *d,
-+ unsigned int cmd_len,
-+ unsigned int out_size,
-+ unsigned int in_size,
-+ unsigned char bytefill,
-+ int bytecheck) {
-+ int result;
-+ int error_code, sense_key, asc, ascq;
-+
-+ bzero(&d->ccb->csio, sizeof(d->ccb->csio));
-+
-+ memcpy(d->ccb->csio.cdb_io.cdb_bytes, d->sg_buffer, cmd_len);
-+
-+ if (bytecheck && out_size == 0)
-+ memset(d->sg_buffer, bytefill, in_size);
-+
-+ cam_fill_csio(&d->ccb->csio,
-+ /* retries */ 0,
-+ /* cbfcnp */ NULL,
-+ /* flags */ CAM_DEV_QFRZDIS | (out_size ? CAM_DIR_OUT : CAM_DIR_IN),
-+ /* tag_action */ MSG_SIMPLE_Q_TAG,
-+ /* data_ptr */ out_size ? d->sg_buffer + cmd_len : d->sg_buffer,
-+ /* dxfer_len */ out_size ? out_size : in_size,
-+ /* sense_len */ SSD_FULL_SIZE,
-+ /* cdb_len */ cmd_len,
-+ /* timeout */ 60000); /* XXX */
-+
-+ if ((result = cam_send_ccb(d->dev, d->ccb)) < 0 ||
-+ (d->ccb->ccb_h.status & CAM_STATUS_MASK) == 0 /* hack? */)
-+ return TR_EREAD;
-+
-+ if ((d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP &&
-+ (d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR) {
-+ fprintf (stderr, "\t\terror returned from SCSI command:\n"
-+ "\t\tccb->ccb_h.status == %d\n", d->ccb->ccb_h.status);
-+ errno = EIO;
-+ return TR_UNKNOWN;
-+ }
-+
-+ if (d->ccb->csio.dxfer_len != in_size) {
-+ errno = EIO;
-+ return TR_EREAD;
-+ }
-+
-+ scsi_extract_sense(&d->ccb->csio.sense_data, &error_code, &sense_key,
-+ &asc, &ascq);
-+
-+ switch (error_code) {
-+ case SSD_CURRENT_ERROR:
-+ case SSD_DEFERRED_ERROR:
-+#if (CAM_VERSION > 0x15)
-+ case SSD_DESC_CURRENT_ERROR:
-+ case SSD_DESC_DEFERRED_ERROR:
-+#endif
-+ switch (sense_key) {
-+ case SSD_KEY_NO_SENSE:
-+ errno = EIO;
-+ return TR_UNKNOWN;
-+ case SSD_KEY_RECOVERED_ERROR:
-+ break;
-+ case SSD_KEY_NOT_READY:
-+ errno = EBUSY;
-+ return TR_BUSY;
-+ case SSD_KEY_MEDIUM_ERROR:
-+ errno = EIO;
-+ if ((asc == 0x0c) && (ascq == 0x09))
-+ return TR_STREAMING;
-+ else
-+ return TR_MEDIUM;
-+ case SSD_KEY_HARDWARE_ERROR:
-+ errno = EIO;
-+ return TR_FAULT;
-+ case SSD_KEY_ILLEGAL_REQUEST:
-+ errno = EINVAL;
-+ return TR_ILLEGAL;
-+ default:
-+ errno = EIO;
-+ return TR_UNKNOWN;
-+ }
-+ default:
-+ break;
-+ }
-+
-+ return 0;
-+}
-+#endif
-+
-+
- /* Group 1 (10b) command */
-
- static int mode_sense_atapi(cdrom_drive *d,int size,int page){
-@@ -833,30 +960,37 @@
- while(1) {
- if((err=map(d,(p?buffer:NULL),begin,sectors))){
- if(d->report_all){
-+#ifdef Linux
- struct sg_header *sg_hd=(struct sg_header *)d->sg;
-+#elif defined(__FreeBSD__)
-+ int error_code, sense_key, asc, ascq;
-+#endif
- char b[256];
-
- sprintf(b,"scsi_read error: sector=%ld length=%ld retry=%d\n",
- begin,sectors,retry_count);
-+ fputs(b, stderr);
- cdmessage(d,b);
-+#if defined(__FreeBSD__)
-+ scsi_extract_sense(&d->ccb->csio.sense_data, &error_code, &sense_key,
-+ &asc, &ascq);
-+#endif
- sprintf(b," Sense key: %x ASC: %x ASCQ: %x\n",
-+#ifdef Linux
- (int)(sg_hd->sense_buffer[2]&0xf),
- (int)(sg_hd->sense_buffer[12]),
- (int)(sg_hd->sense_buffer[13]));
-+#elif defined(__FreeBSD__)
-+ sense_key, asc, ascq);
-+#endif
-+ fputs(b, stderr);
- cdmessage(d,b);
- sprintf(b," Transport error: %s\n",strerror_tr[err]);
-+ fputs(b, stderr);
- cdmessage(d,b);
- sprintf(b," System error: %s\n",strerror(errno));
-+ fputs(b, stderr);
- cdmessage(d,b);
--
-- fprintf(stderr,"scsi_read error: sector=%ld length=%ld retry=%d\n",
-- begin,sectors,retry_count);
-- fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n",
-- (int)(sg_hd->sense_buffer[2]&0xf),
-- (int)(sg_hd->sense_buffer[12]),
-- (int)(sg_hd->sense_buffer[13]));
-- fprintf(stderr," Transport error: %s\n",strerror_tr[err]);
-- fprintf(stderr," System error: %s\n",strerror(errno));
- }
-
- if(!d->error_retry)return(-7);
-@@ -1307,6 +1441,7 @@
- return;
- }
-
-+#ifdef Linux
- static int check_atapi(cdrom_drive *d){
- int atapiret=-1;
- int fd = d->cdda_fd; /* this is the correct fd (not ioctl_fd), as the
-@@ -1333,6 +1468,53 @@
- }
- }
-
-+#elif defined(__FreeBSD__)
-+static int
-+check_atapi(cdrom_drive *d)
-+{
-+ bzero(&(&d->ccb->ccb_h)[1], sizeof(d->ccb->cpi) - sizeof(d->ccb->ccb_h));
-+
-+ d->ccb->ccb_h.func_code = XPT_PATH_INQ;
-+
-+ cdmessage(d, "\nChecking for ATAPICAM...\n");
-+
-+ if (cam_send_ccb(d->dev, d->ccb) < 0) {
-+ cderror(d, "\terror sending XPT_PATH_INQ CCB: ");
-+ cderror(d, cam_errbuf);
-+ cderror(d, "\n");
-+ return -1;
-+ }
-+
-+ if ((d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
-+ cderror(d, "\tXPT_PATH_INQ CCB failed: ");
-+ cderror(d, cam_errbuf);
-+ cderror(d, "\n");
-+ return -1;
-+ }
-+
-+ /*
-+ * if the bus device name is `ata', we're (obviously)
-+ * running ATAPICAM.
-+ * same for the new ahci(4) and siis(4) drivers and future others
-+ * which use SATA transport too...
-+ */
-+
-+ if (strncmp(d->ccb->cpi.dev_name, "ata", 3) == 0 ||
-+#if __FreeBSD_version >= 800102
-+ d->ccb->cpi.transport == XPORT_SATA ||
-+#endif
-+ d->ccb->cpi.transport == XPORT_ATA) {
-+ cdmessage(d, "\tDrive is ATAPI (using ATAPICAM or direct CAM (S)ATA transport)\n");
-+ d->is_atapi = 1;
-+ } else {
-+ cdmessage(d, "\tDrive is SCSI\n");
-+ d->is_atapi = 0;
-+ }
-+
-+ return d->is_atapi;
-+}
-+#endif
-+
- static int check_mmc(cdrom_drive *d){
- char *b;
- cdmessage(d,"\nChecking for MMC style command set...\n");
-@@ -1379,6 +1561,7 @@
- }
- }
-
-+#ifdef Linux
- /* request vendor brand and model */
- unsigned char *scsi_inquiry(cdrom_drive *d){
- memcpy(d->sg_buffer,(char[]){ 0x12,0,0,0,56,0},6);
-@@ -1389,6 +1572,7 @@
- }
- return (d->sg_buffer);
- }
-+#endif
-
-
- int scsi_init_drive(cdrom_drive *d){
-@@ -1458,8 +1642,12 @@
- check_fua_bit(d);
-
- d->error_retry=1;
-+#ifdef Linux
- d->sg=realloc(d->sg,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
- d->sg_buffer=d->sg+SG_OFF;
-+#elif defined(__FreeBSD__)
-+ d->sg_buffer = realloc(d->sg_buffer, d->nsectors * CD_FRAMESIZE_RAW);
-+#endif
- d->report_all=1;
- return(0);
- }
diff --git a/audio/cdparanoia/files/patch-interface-utils.h b/audio/cdparanoia/files/patch-interface-utils.h
deleted file mode 100644
index 49b0b57289c4..000000000000
--- a/audio/cdparanoia/files/patch-interface-utils.h
+++ /dev/null
@@ -1,18 +0,0 @@
-Index: interface/utils.h
-===================================================================
-RCS file: /home/cvs/cdparanoia/interface/utils.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.3
-diff -u -r1.1.1.1 -r1.3
---- interface/utils.h 2003/01/05 09:46:26 1.1.1.1
-+++ interface/utils.h 2003/01/06 23:34:21 1.3
-@@ -1,4 +1,9 @@
-+#ifdef LINUX
- #include <endian.h>
-+#elif defined(__FreeBSD__)
-+#include <machine/endian.h>
-+#endif
-+
- #include <stdio.h>
- #include <errno.h>
- #include <string.h>
diff --git a/audio/cdparanoia/files/patch-interface_Makefile.in b/audio/cdparanoia/files/patch-interface_Makefile.in
new file mode 100644
index 000000000000..fc54350e5acd
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_Makefile.in
@@ -0,0 +1,56 @@
+Index: interface/Makefile.in
+===================================================================
+RCS file: /home/cvs/cdparanoia/interface/Makefile.in,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+--- interface/Makefile.in.orig 1999-12-14 04:27:59 UTC
++++ interface/Makefile.in
+@@ -9,13 +9,13 @@ srcdir=@srcdir@
+ @SET_MAKE@
+ FLAGS=@SBPCD_H@ @UCDROM_H@ @TYPESIZES@ @CFLAGS@
+ OPT=@OPT@ $(FLAGS)
+-DEBUG=@DEBUG@ $(FLAGS) -DCDDA_TEST
++DEBUG=@DEBUG@ $(FLAGS)
+ CC=@CC@
+ LD=@CC@
+ LDFLAGS=@LDFLAGS@ $(FLAGS)
+ AR=@AR@
+ RANLIB=@RANLIB@
+-LIBS = -lm
++LIBS = -lm -lcam
+ CPPFLAGS+=-D_REENTRANT
+
+ OFILES = scan_devices.o common_interface.o cooked_interface.o interface.o\
+@@ -23,19 +23,15 @@ OFILES = scan_devices.o common_interface
+
+ export VERSION
+
+-all: lib slib
+-
+-debug:
+- $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
+-
+-lib:
++all:
+ $(MAKE) libcdda_interface.a CFLAGS="$(OPT)"
+-
+-slib:
+ $(MAKE) lessmessy
+ $(MAKE) libcdda_interface.so CFLAGS="$(OPT) -fpic"
+ [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so libcdda_interface.so.0
+
++debug:
++ $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
++
+ test:
+ $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
+ $(CC) $(DEBUG) -c test.c
+@@ -46,7 +42,7 @@ libcdda_interface.a: $(OFILES)
+ $(RANLIB) libcdda_interface.a
+
+ libcdda_interface.so: $(OFILES)
+- $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES)
++ $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES) ${LIBS}
+ [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so.0
+ [ -e libcdda_interface.so ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so
+
diff --git a/audio/cdparanoia/files/patch-interface_cdda__interface.h b/audio/cdparanoia/files/patch-interface_cdda__interface.h
new file mode 100644
index 000000000000..5a1e76b22cfa
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_cdda__interface.h
@@ -0,0 +1,50 @@
+--- interface/cdda_interface.h.orig 2001-03-24 01:15:46 UTC
++++ interface/cdda_interface.h
+@@ -21,6 +21,11 @@
+ #include <sys/types.h>
+ #include <signal.h>
+
++#ifdef __FreeBSD__
++#include <stdio.h>
++#include <camlib.h>
++#endif
++
+ #define MAXTRK 100
+
+ typedef struct TOC { /* structure of table of contents */
+@@ -47,13 +52,19 @@ typedef struct cdrom_drive{
+ int opened; /* This struct may just represent a candidate for opening */
+
+ char *cdda_device_name;
++#ifdef Linux
+ char *ioctl_device_name;
+
+ int cdda_fd;
+- int ioctl_fd;
+
+- char *drive_model;
+ int drive_type;
++#elif defined(__FreeBSD__)
++ struct cam_device *dev;
++ union ccb *ccb;
++#endif
++
++ int ioctl_fd;
++ char *drive_model;
+ int interface;
+ int bigendianp;
+ int nsectors;
+@@ -83,9 +94,13 @@ typedef struct cdrom_drive{
+ int is_mmc;
+
+ /* SCSI command buffer and offset pointers */
++#ifdef Linux
+ unsigned char *sg;
+ unsigned char *sg_buffer;
+ unsigned char inqbytes[4];
++#elif defined(__FreeBSD__)
++ unsigned char *sg_buffer;
++#endif
+
+ /* Scsi parameters and state */
+ unsigned char density;
diff --git a/audio/cdparanoia/files/patch-interface_common__interface.c b/audio/cdparanoia/files/patch-interface_common__interface.c
new file mode 100644
index 000000000000..f631f86bae78
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_common__interface.c
@@ -0,0 +1,70 @@
+Index: interface/common_interface.c
+===================================================================
+RCS file: /home/cvs/cdparanoia/interface/common_interface.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.5
+--- interface/common_interface.c.orig 2000-04-19 22:41:04 UTC
++++ interface/common_interface.c
+@@ -13,12 +13,19 @@
+ #include "utils.h"
+ #include "smallft.h"
+
++#ifdef Linux
+ #include <linux/hdreg.h>
++#endif
+
+ /* Test for presence of a cdrom by pinging with the 'CDROMVOLREAD' ioctl() */
+ int ioctl_ping_cdrom(int fd){
++#ifdef Linux
+ struct cdrom_volctrl volctl;
+ if (ioctl(fd, CDROMVOLREAD, &volctl))
++#elif defined(__FreeBSD__)
++ struct ioc_vol volctl;
++ if (ioctl(fd, CDIOCGETVOL, &volctl))
++#endif
+ return(1); /* failure */
+
+ return(0);
+@@ -26,6 +33,7 @@ int ioctl_ping_cdrom(int fd){
+ }
+
+
++#ifdef Linux
+ /* Use the ioctl thingy above ping the cdrom; this will get model info */
+ char *atapi_drive_info(int fd){
+ /* Work around the fact that the struct grew without warning in
+@@ -46,6 +54,7 @@ char *atapi_drive_info(int fd){
+ free(id);
+ return(ret);
+ }
++#endif
+
+ int data_bigendianp(cdrom_drive *d){
+ float lsb_votes=0;
+@@ -171,7 +180,9 @@ int data_bigendianp(cdrom_drive *d){
+ knows the leasoud/leadin size. */
+
+ int FixupTOC(cdrom_drive *d,int tracks){
++#ifdef Linux
+ struct cdrom_multisession ms_str;
++#endif
+ int j;
+
+ /* First off, make sure the 'starting sector' is >=0 */
+@@ -208,6 +219,8 @@ int FixupTOC(cdrom_drive *d,int tracks){
+ /* For a scsi device, the ioctl must go to the specialized SCSI
+ CDROM device, not the generic device. */
+
++ /* XXX */
++#ifdef Linux
+ if (d->ioctl_fd != -1) {
+ int result;
+
+@@ -231,6 +244,7 @@ int FixupTOC(cdrom_drive *d,int tracks){
+ return 1;
+ }
+ }
++#endif
+ return 0;
+ }
+
diff --git a/audio/cdparanoia/files/patch-interface_cooked__interface.c b/audio/cdparanoia/files/patch-interface_cooked__interface.c
new file mode 100644
index 000000000000..8d739c3f6ad1
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_cooked__interface.c
@@ -0,0 +1,180 @@
+--- interface/cooked_interface.c.orig 2000-04-19 22:41:04 UTC
++++ interface/cooked_interface.c
+@@ -1,6 +1,8 @@
+ /******************************************************************
+ * CopyPolicy: GNU Public License 2 applies
+ * Copyright (C) Monty xiphmont@mit.edu
++ * FreeBSD porting (c) 2003
++ * Simon 'corecode' Schubert <corecode@corecode.ath.cx>
+ *
+ * CDROM code specific to the cooked ioctl interface
+ *
+@@ -10,6 +12,7 @@
+ #include "common_interface.h"
+ #include "utils.h"
+
++#ifdef Linux
+ static int cooked_readtoc (cdrom_drive *d){
+ int i;
+ int tracks;
+@@ -129,6 +132,142 @@ static long cooked_read (cdrom_drive *d,
+ return(sectors);
+ }
+
++#elif defined(__FreeBSD__)
++static int
++cooked_readtoc(cdrom_drive *d)
++{
++ int i;
++ struct ioc_toc_header hdr;
++ struct ioc_read_toc_single_entry entry;
++
++ if (ioctl(d->ioctl_fd, CDIOREADTOCHEADER, &hdr) == -1) {
++ int ret;
++
++ if (errno == EPERM) {
++ ret = -102;
++ cderror(d, "102: ");
++ } else {
++ ret = -4;
++ cderror(d, "004: Unable to read table of contents header: ");
++ }
++ cderror(d, strerror(errno));
++ cderror(d, "\n");
++ return ret;
++ }
++
++ entry.address_format = CD_LBA_FORMAT;
++ for (i = hdr.starting_track; i <= hdr.ending_track; ++i) {
++ entry.track = i;
++
++ if (ioctl(d->ioctl_fd, CDIOREADTOCENTRY, &entry) == -1) {
++ cderror(d, "005: Unable to read table of contents entry\n");
++ return -5;
++ }
++
++ d->disc_toc[i - hdr.starting_track].bFlags = entry.entry.control;
++ d->disc_toc[i - hdr.starting_track].bTrack = entry.entry.track;
++ d->disc_toc[i - hdr.starting_track].dwStartSector = be32_to_cpu(entry.entry.addr.lba);
++ }
++
++ entry.track = 0xaa; /* leadout */
++
++ if (ioctl(d->ioctl_fd, CDIOREADTOCENTRY, &entry) == -1) {
++ cderror(d, "005: Unable to read table of contents entry\n");
++ return -5;
++ }
++
++ d->disc_toc[i - hdr.starting_track].bFlags = entry.entry.control;
++ d->disc_toc[i - hdr.starting_track].bTrack = entry.entry.track;
++ d->disc_toc[i - hdr.starting_track].dwStartSector = be32_to_cpu(entry.entry.addr.lba);
++
++ d->cd_extra = FixupTOC(d, hdr.ending_track - hdr.starting_track + 2); /* with TOC */
++
++ return hdr.ending_track - hdr.starting_track + 1;
++}
++
++static int
++cooked_setspeed(cdrom_drive *d, int speed)
++{
++#ifdef CDRIOCREADSPEED
++ speed *= 177;
++ return ioctl(d->ioctl_fd, CDRIOCREADSPEED, &speed);
++#else
++ return -1;
++#endif
++}
++
++
++static long
++cooked_read(cdrom_drive *d, void *p, long begin, long sectors)
++{
++ int retry_count = 0;
++/* CDIOCREADAUDIO has been removed in FreeBSD 5.1-CURRENT */
++#if __FreeBSD_version >= 501106
++ int bsize = CD_FRAMESIZE_RAW;
++#else
++ struct ioc_read_audio arg;
++
++ if (sectors > d->nsectors)
++ sectors = d->nsectors;
++
++ arg.address_format = CD_LBA_FORMAT;
++ arg.address.lba = begin;
++ arg.buffer = p;
++#endif
++
++#if __FreeBSD_version >= 501106
++ if (ioctl(d->ioctl_fd, CDRIOCSETBLOCKSIZE, &bsize) == -1)
++ return -7;
++#endif
++ for (;;) {
++/* CDIOCREADAUDIO has been removed in FreeBSD 5.1-CURRENT */
++#if __FreeBSD_version >= 501106
++ if (pread(d->ioctl_fd, p, sectors*bsize, begin*bsize) != sectors*bsize) {
++#else
++ arg.nframes = sectors;
++ if (ioctl(d->ioctl_fd, CDIOCREADAUDIO, &arg) == -1) {
++#endif
++ if (!d->error_retry)
++ return -7;
++
++ switch (errno) {
++ case ENOMEM:
++ if (sectors == 1) {
++ cderror(d, "300: Kernel memory error\n");
++ return -300;
++ }
++ /* FALLTHROUGH */
++ default:
++ if (sectors == 1) {
++ if (retry_count > MAX_RETRIES - 1) {
++ char b[256];
++ snprintf(b, sizeof(b),
++ "010: Unable to access sector %ld; "
++ "skipping...\n", begin);
++ cderror(d, b);
++ return -10;
++ }
++ break;
++ }
++ }
++
++ if (retry_count > 4 && sectors > 1)
++ sectors = sectors * 3 / 4;
++
++ ++retry_count;
++
++ if (retry_count > MAX_RETRIES) {
++ cderror(d, "007: Unknown, unrecoverable error reading data\n");
++ return -7;
++ }
++ } else
++ break;
++ }
++
++ return sectors;
++}
++#endif
++
+ /* hook */
+ static int Dummy (cdrom_drive *d,int Switch){
+ return(0);
+@@ -193,6 +332,7 @@ static void check_exceptions(cdrom_drive
+ int cooked_init_drive (cdrom_drive *d){
+ int ret;
+
++#ifdef Linux
+ switch(d->drive_type){
+ case MATSUSHITA_CDROM_MAJOR: /* sbpcd 1 */
+ case MATSUSHITA_CDROM2_MAJOR: /* sbpcd 2 */
+@@ -243,6 +383,9 @@ int cooked_init_drive (cdrom_drive *d){
+ default:
+ d->nsectors=40;
+ }
++#elif defined(__FreeBSD__)
++ d->nsectors = 26; /* FreeBSD only support 64K I/O transfer size */
++#endif
+ d->enable_cdda = Dummy;
+ d->read_audio = cooked_read;
+ d->set_speed = cooked_setspeed;
diff --git a/audio/cdparanoia/files/patch-interface_interface.c b/audio/cdparanoia/files/patch-interface_interface.c
new file mode 100644
index 000000000000..3b8a43d48496
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_interface.c
@@ -0,0 +1,27 @@
+--- interface/interface.c.orig 2000-04-19 22:41:04 UTC
++++ interface/interface.c
+@@ -30,11 +30,24 @@ int cdda_close(cdrom_drive *d){
+
+ _clean_messages(d);
+ if(d->cdda_device_name)free(d->cdda_device_name);
++#ifdef Linux
+ if(d->ioctl_device_name)free(d->ioctl_device_name);
+ if(d->drive_model)free(d->drive_model);
+ if(d->cdda_fd!=-1)close(d->cdda_fd);
+ if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
+ if(d->sg)free(d->sg);
++#elif defined(__FreeBSD__)
++ if (d->drive_model)
++ free(d->drive_model);
++ if (d->ccb)
++ cam_freeccb(d->ccb);
++ if (d->dev)
++ cam_close_device(d->dev);
++ if (d->sg_buffer)
++ free(d->sg_buffer);
++ if (d->ioctl_fd != -1)
++ close(d->ioctl_fd);
++#endif
+
+ free(d);
+ }
diff --git a/audio/cdparanoia/files/patch-interface_low__interface.h b/audio/cdparanoia/files/patch-interface_low__interface.h
new file mode 100644
index 000000000000..4d8f491e4455
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_low__interface.h
@@ -0,0 +1,54 @@
+Index: interface/low_interface.h
+===================================================================
+RCS file: /home/cvs/cdparanoia/interface/low_interface.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+--- interface/low_interface.h.orig 2001-03-26 06:12:11 UTC
++++ interface/low_interface.h
+@@ -25,6 +25,8 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+
++#ifdef Linux
++
+ #include <linux/major.h>
+ #include <linux/version.h>
+
+@@ -48,12 +50,27 @@
+ #include <linux/cdrom.h>
+ #include <linux/major.h>
+
++#elif defined(__FreeBSD__)
++
++#include <sys/cdio.h>
++#include <sys/cdrio.h>
++
++#include <cam/scsi/scsi_message.h>
++#include <camlib.h>
++
++#endif
++
+ #include "cdda_interface.h"
+
+ #define MAX_RETRIES 8
+ #define MAX_BIG_BUFF_SIZE 65536
+ #define MIN_BIG_BUFF_SIZE 4096
++
++#ifdef Linux
+ #define SG_OFF sizeof(struct sg_header)
++#else
++#define SG_OFF (0)
++#endif
+
+ #ifndef SG_EMULATED_HOST
+ /* old kernel version; the check for the ioctl is still runtime, this
+@@ -64,7 +81,9 @@
+ #endif
+
+ extern int cooked_init_drive (cdrom_drive *d);
++#ifdef Linux
+ extern unsigned char *scsi_inquiry (cdrom_drive *d);
++#endif
+ extern int scsi_init_drive (cdrom_drive *d);
+ #ifdef CDDA_TEST
+ extern int test_init_drive (cdrom_drive *d);
diff --git a/audio/cdparanoia/files/patch-interface_scan__devices.c b/audio/cdparanoia/files/patch-interface_scan__devices.c
new file mode 100644
index 000000000000..ce83179151b5
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_scan__devices.c
@@ -0,0 +1,242 @@
+--- interface/scan_devices.c.orig 2001-03-26 05:44:01 UTC
++++ interface/scan_devices.c
+@@ -1,6 +1,8 @@
+ /******************************************************************
+ * CopyPolicy: GNU Public License 2 applies
+ * Copyright (C) 1998 Monty xiphmont@mit.edu
++ * FreeBSD porting (c) 2003
++ * Simon 'corecode' Schubert <corecode@corecode.ath.cx>
+ *
+ * Autoscan for or verify presence of a cdrom device
+ *
+@@ -21,6 +23,8 @@
+
+ #define MAX_DEV_LEN 20 /* Safe because strings only come from below */
+ /* must be absolute paths! */
++
++#ifdef Linux
+ static char *scsi_cdrom_prefixes[]={
+ "/dev/scd",
+ "/dev/sr",
+@@ -49,6 +53,17 @@ static char *cdrom_devices[]={
+ "/dev/cm206cd",
+ "/dev/gscd",
+ "/dev/optcd",NULL};
++#elif defined(__FreeBSD__)
++static char *cdrom_devices[] = {
++ "/dev/cd?",
++ "/dev/acd?",
++ "/dev/wcd?",
++ "/dev/mcd?",
++ "/dev/cd?c",
++ "/dev/acd?c",
++ "/dev/wcd?c",
++ "/dev/mcd?c", NULL};
++#endif
+
+ /* Functions here look for a cdrom drive; full init of a drive type
+ happens in interface.c */
+@@ -75,10 +90,12 @@ cdrom_drive *cdda_find_a_cdrom(int messa
+ if((d=cdda_identify(buffer,messagedest,messages)))
+ return(d);
+ idmessage(messagedest,messages,"",NULL);
++#ifdef Linux
+ buffer[pos-(cdrom_devices[i])]=j+97;
+ if((d=cdda_identify(buffer,messagedest,messages)))
+ return(d);
+ idmessage(messagedest,messages,"",NULL);
++#endif
+ }
+ }else{
+ /* Name. Go for it. */
+@@ -117,8 +134,14 @@ cdrom_drive *cdda_identify(const char *d
+ }
+ #endif
+
++#ifdef Linux /* is order of checks important? */
+ d=cdda_identify_cooked(device,messagedest,messages);
+ if(!d)d=cdda_identify_scsi(device,NULL,messagedest,messages);
++#elif defined(__FreeBSD__)
++ d = cdda_identify_scsi(device, NULL, messagedest, messages);
++ if (d == NULL)
++ d = cdda_identify_cooked(device, messagedest, messages);
++#endif
+
+ #ifdef CDDA_TEST
+ if(!d)d=cdda_identify_test(device,messagedest,messages);
+@@ -143,6 +166,7 @@ char *test_resolve_symlink(const char *f
+
+ }
+
++#ifdef Linux
+ cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
+ char **messages){
+
+@@ -275,6 +299,61 @@ cdrom_drive *cdda_identify_cooked(const
+ return(d);
+ }
+
++#elif defined(__FreeBSD__)
++cdrom_drive *
++cdda_identify_cooked(const char *dev, int messagedest, char **messages)
++{
++ cdrom_drive *d;
++ struct stat st;
++
++ if (stat(dev, &st)) {
++ idperror(messagedest, messages, "\t\tCould not stat %s", dev);
++ return NULL;
++ }
++
++ if (!S_ISCHR(st.st_mode)) {
++ idmessage(messagedest, messages, "\t\t%s is no block device", dev);
++ return NULL;
++ }
++
++ if ((d = calloc(1, sizeof(*d))) == NULL) {
++ idperror(messagedest, messages, "\t\tCould not allocate memory", NULL);
++ return NULL;
++ }
++ d->ioctl_fd = -1;
++
++ if ((d->ioctl_fd = open(dev, O_RDONLY)) == -1) {
++ idperror(messagedest, messages, "\t\tCould not open %s", dev);
++ goto cdda_identify_cooked_fail;
++ }
++
++ if (ioctl_ping_cdrom(d->ioctl_fd)) {
++ idmessage(messagedest, messages, "\t\tDevice %s is not a CDROM", dev);
++ goto cdda_identify_cooked_fail;
++ }
++
++ d->cdda_device_name = copystring(dev);
++ d->drive_model = copystring("Generic cooked ioctl CDROM");
++ d->interface = COOKED_IOCTL;
++ d->bigendianp = -1;
++ d->nsectors = -1;
++
++ idmessage(messagedest, messages, "\t\tCDROM sensed: %s\n", d->drive_model);
++
++ return d;
++
++cdda_identify_cooked_fail:
++ if (d != NULL) {
++ if (d->ioctl_fd != -1)
++ close(d->ioctl_fd);
++ free(d);
++ }
++ return NULL;
++}
++#endif
++
++
++#ifdef Linux
+ struct sg_id {
+ long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */
+ long l2; /* Unique id */
+@@ -390,6 +469,7 @@ matchfail:
+ if(dev!=-1)close(dev);
+ return(NULL);
+ }
++#endif
+
+ void strscat(char *a,char *b,int n){
+ int i;
+@@ -401,6 +481,7 @@ void strscat(char *a,char *b,int n){
+ strcat(a," ");
+ }
+
++#ifdef Linux
+ /* At this point, we're going to punt compatability before SG2, and
+ allow only SG2 and SG3 */
+ static int verify_SG_version(cdrom_drive *d,int messagedest,
+@@ -653,6 +734,89 @@ cdda_identify_scsi_fail:
+ if(g_fd!=-1)close(g_fd);
+ return(NULL);
+ }
++#elif defined(__FreeBSD__)
++
++cdrom_drive *cdda_identify_scsi(const char *device,
++ const char *dummy,
++ int messagedest,
++ char **messages)
++{
++ char *devname;
++ cdrom_drive *d = NULL;
++
++ if (device == NULL) {
++ idperror(messagedest, messages, "\t\tNo device specified", NULL);
++ return NULL;
++ }
++
++ if ((devname = test_resolve_symlink(device, messagedest, messages)) == NULL)
++ return NULL;
++
++ if ((d = calloc(1, sizeof(*d))) == NULL) {
++ idperror(messagedest, messages, "\t\tCould not allocate memory", NULL);
++ free(devname);
++ return NULL;
++ }
++
++ if ((d->dev = cam_open_device(devname, O_RDWR)) == NULL) {
++ idperror(messagedest, messages, "\t\tCould not open SCSI device: %s", cam_errbuf);
++ goto cdda_identify_scsi_fail;
++ }
++
++ if ((d->ccb = cam_getccb(d->dev)) == NULL) {
++ idperror(messagedest, messages, "\t\tCould not allocate ccb", NULL);
++ goto cdda_identify_scsi_fail;
++ }
++
++ if (strncmp(d->dev->inq_data.vendor, "TOSHIBA", 7) == 0 &&
++ strncmp(d->dev->inq_data.product, "CD_ROM", 6) == 0 &&
++ SID_TYPE(&d->dev->inq_data) == T_DIRECT) {
++ d->dev->inq_data.device = T_CDROM;
++ d->dev->inq_data.dev_qual2 |= 0x80;
++ }
++
++ if (SID_TYPE(&d->dev->inq_data) != T_CDROM &&
++ SID_TYPE(&d->dev->inq_data) != T_WORM) {
++ idmessage(messagedest, messages,
++ "\t\tDevice is neither a CDROM nor a WORM device\n", NULL);
++ goto cdda_identify_scsi_fail;
++ }
++
++ d->cdda_device_name = copystring(devname);
++ d->ioctl_fd = -1;
++ d->bigendianp = -1;
++ d->nsectors = -1;
++ d->lun = d->dev->target_lun;
++ d->interface = GENERIC_SCSI;
++
++ if ((d->sg_buffer = malloc(MAX_BIG_BUFF_SIZE)) == NULL) {
++ idperror(messagedest, messages, "Could not allocate buffer memory", NULL);
++ goto cdda_identify_scsi_fail;
++ }
++
++ if ((d->drive_model = calloc(36,1)) == NULL) {
++ }
++
++ strscat(d->drive_model, d->dev->inq_data.vendor, SID_VENDOR_SIZE);
++ strscat(d->drive_model, d->dev->inq_data.product, SID_PRODUCT_SIZE);
++ strscat(d->drive_model, d->dev->inq_data.revision, SID_REVISION_SIZE);
++
++ idmessage(messagedest, messages, "\nCDROM model sensed: %s", d->drive_model);
++
++ return d;
++
++cdda_identify_scsi_fail:
++ free(devname);
++ if (d) {
++ if (d->ccb)
++ cam_freeccb(d->ccb);
++ if (d->dev)
++ cam_close_device(d->dev);
++ free(d);
++ }
++ return NULL;
++}
++#endif
+
+ #ifdef CDDA_TEST
+
diff --git a/audio/cdparanoia/files/patch-interface_scsi__interface.c b/audio/cdparanoia/files/patch-interface_scsi__interface.c
new file mode 100644
index 000000000000..15fe0300e0d7
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_scsi__interface.c
@@ -0,0 +1,313 @@
+--- interface/scsi_interface.c.orig 2001-03-24 01:15:46 UTC
++++ interface/scsi_interface.c
+@@ -3,6 +3,8 @@
+ * Original interface.c Copyright (C) 1994-1997
+ * Eissfeldt heiko@colossus.escape.de
+ * Current blenderization Copyright (C) 1998-1999 Monty xiphmont@mit.edu
++ * FreeBSD porting (c) 2003
++ * Simon 'corecode' Schubert <corecode@corecode.ath.cx>
+ *
+ * Generic SCSI interface specific code.
+ *
+@@ -23,6 +25,7 @@ static void tweak_SG_buffer(cdrom_drive
+ int table,reserved;
+ char buffer[256];
+
++#ifdef Linux
+ /* maximum transfer size? */
+ if(ioctl(d->cdda_fd,SG_GET_RESERVED_SIZE,&reserved)){
+ /* Up, guess not. */
+@@ -59,8 +62,17 @@ static void tweak_SG_buffer(cdrom_drive
+ cdmessage(d,"\tCouldn't disable command queue! Continuing anyway...\n");
+ }
+
++#elif defined(__FreeBSD__)
++ d->nsectors = 26; /* FreeBSD only supports 64K I/O transfer size */
++ d->bigbuff = d->nsectors * CD_FRAMESIZE_RAW;
++
++ sprintf(buffer,"\tSetting default read size to %d sectors (%d bytes).\n\n",
++ d->nsectors,d->nsectors*CD_FRAMESIZE_RAW);
++ cdmessage(d,buffer);
++#endif
+ }
+
++#ifdef Linux
+ static void reset_scsi(cdrom_drive *d){
+ int arg;
+ d->enable_cdda(d,0);
+@@ -74,6 +86,30 @@ static void reset_scsi(cdrom_drive *d){
+ d->enable_cdda(d,1);
+ }
+
++#elif defined(__FreeBSD__)
++static void reset_scsi(cdrom_drive *d) {
++ d->enable_cdda(d,0);
++
++ d->ccb->ccb_h.func_code = XPT_RESET_DEV;
++ d->ccb->ccb_h.timeout = 5000;
++
++ cdmessage(d, "sending SCSI reset... ");
++ if (cam_send_ccb(d->dev, d->ccb)) {
++ cdmessage(d, "error sending XPT_RESET_DEV CCB");
++ } else {
++
++ if (((d->ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) ||
++ ((d->ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_BDR_SENT))
++ cdmessage(d,"OK\n");
++ else
++ cdmessage(d,"FAILED\n");
++ }
++
++ d->enable_cdda(d,1);
++}
++#endif
++
++#ifdef Linux
+ static void clear_garbage(cdrom_drive *d){
+ fd_set fdset;
+ struct timeval tv;
+@@ -104,8 +140,10 @@ static void clear_garbage(cdrom_drive *d
+ flag=1;
+ }
+ }
++#endif
+
+ /* process a complete scsi command. */
++#ifdef Linux
+ static int handle_scsi_cmd(cdrom_drive *d,
+ unsigned int cmd_len,
+ unsigned int in_size,
+@@ -284,6 +322,95 @@ static int handle_scsi_cmd(cdrom_drive *
+ return(0);
+ }
+
++#elif defined(__FreeBSD__)
++static int handle_scsi_cmd(cdrom_drive *d,
++ unsigned int cmd_len,
++ unsigned int out_size,
++ unsigned int in_size,
++ unsigned char bytefill,
++ int bytecheck) {
++ int result;
++ int error_code, sense_key, asc, ascq;
++
++ bzero(&d->ccb->csio, sizeof(d->ccb->csio));
++
++ memcpy(d->ccb->csio.cdb_io.cdb_bytes, d->sg_buffer, cmd_len);
++
++ if (bytecheck && out_size == 0)
++ memset(d->sg_buffer, bytefill, in_size);
++
++ cam_fill_csio(&d->ccb->csio,
++ /* retries */ 0,
++ /* cbfcnp */ NULL,
++ /* flags */ CAM_DEV_QFRZDIS | (out_size ? CAM_DIR_OUT : CAM_DIR_IN),
++ /* tag_action */ MSG_SIMPLE_Q_TAG,
++ /* data_ptr */ out_size ? d->sg_buffer + cmd_len : d->sg_buffer,
++ /* dxfer_len */ out_size ? out_size : in_size,
++ /* sense_len */ SSD_FULL_SIZE,
++ /* cdb_len */ cmd_len,
++ /* timeout */ 60000); /* XXX */
++
++ if ((result = cam_send_ccb(d->dev, d->ccb)) < 0 ||
++ (d->ccb->ccb_h.status & CAM_STATUS_MASK) == 0 /* hack? */)
++ return TR_EREAD;
++
++ if ((d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP &&
++ (d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR) {
++ fprintf (stderr, "\t\terror returned from SCSI command:\n"
++ "\t\tccb->ccb_h.status == %d\n", d->ccb->ccb_h.status);
++ errno = EIO;
++ return TR_UNKNOWN;
++ }
++
++ if (d->ccb->csio.dxfer_len != in_size) {
++ errno = EIO;
++ return TR_EREAD;
++ }
++
++ scsi_extract_sense(&d->ccb->csio.sense_data, &error_code, &sense_key,
++ &asc, &ascq);
++
++ switch (error_code) {
++ case SSD_CURRENT_ERROR:
++ case SSD_DEFERRED_ERROR:
++#if (CAM_VERSION > 0x15)
++ case SSD_DESC_CURRENT_ERROR:
++ case SSD_DESC_DEFERRED_ERROR:
++#endif
++ switch (sense_key) {
++ case SSD_KEY_NO_SENSE:
++ errno = EIO;
++ return TR_UNKNOWN;
++ case SSD_KEY_RECOVERED_ERROR:
++ break;
++ case SSD_KEY_NOT_READY:
++ errno = EBUSY;
++ return TR_BUSY;
++ case SSD_KEY_MEDIUM_ERROR:
++ errno = EIO;
++ if ((asc == 0x0c) && (ascq == 0x09))
++ return TR_STREAMING;
++ else
++ return TR_MEDIUM;
++ case SSD_KEY_HARDWARE_ERROR:
++ errno = EIO;
++ return TR_FAULT;
++ case SSD_KEY_ILLEGAL_REQUEST:
++ errno = EINVAL;
++ return TR_ILLEGAL;
++ default:
++ errno = EIO;
++ return TR_UNKNOWN;
++ }
++ default:
++ break;
++ }
++
++ return 0;
++}
++#endif
++
++
+ /* Group 1 (10b) command */
+
+ static int mode_sense_atapi(cdrom_drive *d,int size,int page){
+@@ -833,30 +960,37 @@ static long scsi_read_map (cdrom_drive *
+ while(1) {
+ if((err=map(d,(p?buffer:NULL),begin,sectors))){
+ if(d->report_all){
++#ifdef Linux
+ struct sg_header *sg_hd=(struct sg_header *)d->sg;
++#elif defined(__FreeBSD__)
++ int error_code, sense_key, asc, ascq;
++#endif
+ char b[256];
+
+ sprintf(b,"scsi_read error: sector=%ld length=%ld retry=%d\n",
+ begin,sectors,retry_count);
++ fputs(b, stderr);
+ cdmessage(d,b);
++#if defined(__FreeBSD__)
++ scsi_extract_sense(&d->ccb->csio.sense_data, &error_code, &sense_key,
++ &asc, &ascq);
++#endif
+ sprintf(b," Sense key: %x ASC: %x ASCQ: %x\n",
++#ifdef Linux
+ (int)(sg_hd->sense_buffer[2]&0xf),
+ (int)(sg_hd->sense_buffer[12]),
+ (int)(sg_hd->sense_buffer[13]));
++#elif defined(__FreeBSD__)
++ sense_key, asc, ascq);
++#endif
++ fputs(b, stderr);
+ cdmessage(d,b);
+ sprintf(b," Transport error: %s\n",strerror_tr[err]);
++ fputs(b, stderr);
+ cdmessage(d,b);
+ sprintf(b," System error: %s\n",strerror(errno));
++ fputs(b, stderr);
+ cdmessage(d,b);
+-
+- fprintf(stderr,"scsi_read error: sector=%ld length=%ld retry=%d\n",
+- begin,sectors,retry_count);
+- fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n",
+- (int)(sg_hd->sense_buffer[2]&0xf),
+- (int)(sg_hd->sense_buffer[12]),
+- (int)(sg_hd->sense_buffer[13]));
+- fprintf(stderr," Transport error: %s\n",strerror_tr[err]);
+- fprintf(stderr," System error: %s\n",strerror(errno));
+ }
+
+ if(!d->error_retry)return(-7);
+@@ -1307,6 +1441,7 @@ static void check_fua_bit(cdrom_drive *d
+ return;
+ }
+
++#ifdef Linux
+ static int check_atapi(cdrom_drive *d){
+ int atapiret=-1;
+ int fd = d->cdda_fd; /* this is the correct fd (not ioctl_fd), as the
+@@ -1333,6 +1468,53 @@ static int check_atapi(cdrom_drive *d){
+ }
+ }
+
++#elif defined(__FreeBSD__)
++static int
++check_atapi(cdrom_drive *d)
++{
++ bzero(&(&d->ccb->ccb_h)[1], sizeof(d->ccb->cpi) - sizeof(d->ccb->ccb_h));
++
++ d->ccb->ccb_h.func_code = XPT_PATH_INQ;
++
++ cdmessage(d, "\nChecking for ATAPICAM...\n");
++
++ if (cam_send_ccb(d->dev, d->ccb) < 0) {
++ cderror(d, "\terror sending XPT_PATH_INQ CCB: ");
++ cderror(d, cam_errbuf);
++ cderror(d, "\n");
++ return -1;
++ }
++
++ if ((d->ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
++ cderror(d, "\tXPT_PATH_INQ CCB failed: ");
++ cderror(d, cam_errbuf);
++ cderror(d, "\n");
++ return -1;
++ }
++
++ /*
++ * if the bus device name is `ata', we're (obviously)
++ * running ATAPICAM.
++ * same for the new ahci(4) and siis(4) drivers and future others
++ * which use SATA transport too...
++ */
++
++ if (strncmp(d->ccb->cpi.dev_name, "ata", 3) == 0 ||
++#if __FreeBSD_version >= 800102
++ d->ccb->cpi.transport == XPORT_SATA ||
++#endif
++ d->ccb->cpi.transport == XPORT_ATA) {
++ cdmessage(d, "\tDrive is ATAPI (using ATAPICAM or direct CAM (S)ATA transport)\n");
++ d->is_atapi = 1;
++ } else {
++ cdmessage(d, "\tDrive is SCSI\n");
++ d->is_atapi = 0;
++ }
++
++ return d->is_atapi;
++}
++#endif
++
+ static int check_mmc(cdrom_drive *d){
+ char *b;
+ cdmessage(d,"\nChecking for MMC style command set...\n");
+@@ -1379,6 +1561,7 @@ static void check_exceptions(cdrom_drive
+ }
+ }
+
++#ifdef Linux
+ /* request vendor brand and model */
+ unsigned char *scsi_inquiry(cdrom_drive *d){
+ memcpy(d->sg_buffer,(char[]){ 0x12,0,0,0,56,0},6);
+@@ -1389,6 +1572,7 @@ unsigned char *scsi_inquiry(cdrom_drive
+ }
+ return (d->sg_buffer);
+ }
++#endif
+
+
+ int scsi_init_drive(cdrom_drive *d){
+@@ -1458,8 +1642,12 @@ int scsi_init_drive(cdrom_drive *d){
+ check_fua_bit(d);
+
+ d->error_retry=1;
++#ifdef Linux
+ d->sg=realloc(d->sg,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
+ d->sg_buffer=d->sg+SG_OFF;
++#elif defined(__FreeBSD__)
++ d->sg_buffer = realloc(d->sg_buffer, d->nsectors * CD_FRAMESIZE_RAW);
++#endif
+ d->report_all=1;
+ return(0);
+ }
diff --git a/audio/cdparanoia/files/patch-interface_utils.h b/audio/cdparanoia/files/patch-interface_utils.h
new file mode 100644
index 000000000000..f89e36217135
--- /dev/null
+++ b/audio/cdparanoia/files/patch-interface_utils.h
@@ -0,0 +1,17 @@
+Index: interface/utils.h
+===================================================================
+RCS file: /home/cvs/cdparanoia/interface/utils.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+--- interface/utils.h.orig 2000-04-19 22:41:04 UTC
++++ interface/utils.h
+@@ -1,4 +1,9 @@
++#ifdef LINUX
+ #include <endian.h>
++#elif defined(__FreeBSD__)
++#include <machine/endian.h>
++#endif
++
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
diff --git a/audio/cdparanoia/files/patch-paranoia-Makefile.in b/audio/cdparanoia/files/patch-paranoia-Makefile.in
deleted file mode 100644
index 32d7c25fc532..000000000000
--- a/audio/cdparanoia/files/patch-paranoia-Makefile.in
+++ /dev/null
@@ -1,25 +0,0 @@
---- paranoia/Makefile.in.orig
-+++ paranoia/Makefile.in
-@@ -24,18 +24,14 @@
- LIBS = ../interface/libcdda_interface.a -lm
- export VERSION
-
--all: lib slib
--
--debug:
-- $(MAKE) libcdda_paranoia.a CFLAGS="$(DEBUG)"
--
--lib:
-+all:
- $(MAKE) libcdda_paranoia.a CFLAGS="$(OPT)"
--
--slib:
- $(MAKE) lessmessy
- $(MAKE) libcdda_paranoia.so CFLAGS="$(OPT) -fpic"
-
-+debug:
-+ $(MAKE) libcdda_paranoia.a CFLAGS="$(DEBUG)"
-+
- #test: $(TFILES)
- #
-
diff --git a/audio/cdparanoia/files/patch-paranoia-cdda_paranoia.h b/audio/cdparanoia/files/patch-paranoia-cdda_paranoia.h
deleted file mode 100644
index 3d32c9f6982d..000000000000
--- a/audio/cdparanoia/files/patch-paranoia-cdda_paranoia.h
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: paranoia/cdda_paranoia.h
-===================================================================
-RCS file: /home/cvs/cdparanoia/paranoia/cdda_paranoia.h,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -u -r1.1.1.1 -r1.2
---- paranoia/cdda_paranoia.h 2003/01/05 09:46:26 1.1.1.1
-+++ paranoia/cdda_paranoia.h 2003/01/05 12:55:20 1.2
-@@ -34,6 +34,8 @@
- #define PARANOIA_MODE_NEVERSKIP 32
-
- #ifndef CDP_COMPILE
-+#include <cdda_interface.h>
-+
- typedef void cdrom_paranoia;
- #endif
-
diff --git a/audio/cdparanoia/files/patch-paranoia_Makefile.in b/audio/cdparanoia/files/patch-paranoia_Makefile.in
new file mode 100644
index 000000000000..f08e7c035cb2
--- /dev/null
+++ b/audio/cdparanoia/files/patch-paranoia_Makefile.in
@@ -0,0 +1,25 @@
+--- paranoia/Makefile.in.orig 1999-12-14 04:28:04 UTC
++++ paranoia/Makefile.in
+@@ -24,18 +24,14 @@ OFILES = paranoia.o p_block.o overlap.o
+ LIBS = ../interface/libcdda_interface.a -lm
+ export VERSION
+
+-all: lib slib
+-
+-debug:
+- $(MAKE) libcdda_paranoia.a CFLAGS="$(DEBUG)"
+-
+-lib:
++all:
+ $(MAKE) libcdda_paranoia.a CFLAGS="$(OPT)"
+-
+-slib:
+ $(MAKE) lessmessy
+ $(MAKE) libcdda_paranoia.so CFLAGS="$(OPT) -fpic"
+
++debug:
++ $(MAKE) libcdda_paranoia.a CFLAGS="$(DEBUG)"
++
+ #test: $(TFILES)
+ #
+
diff --git a/audio/cdparanoia/files/patch-paranoia_cdda__paranoia.h b/audio/cdparanoia/files/patch-paranoia_cdda__paranoia.h
new file mode 100644
index 000000000000..f49133c7992a
--- /dev/null
+++ b/audio/cdparanoia/files/patch-paranoia_cdda__paranoia.h
@@ -0,0 +1,16 @@
+Index: paranoia/cdda_paranoia.h
+===================================================================
+RCS file: /home/cvs/cdparanoia/paranoia/cdda_paranoia.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+--- paranoia/cdda_paranoia.h.orig 2001-03-24 01:15:47 UTC
++++ paranoia/cdda_paranoia.h
+@@ -34,6 +34,8 @@
+ #define PARANOIA_MODE_NEVERSKIP 32
+
+ #ifndef CDP_COMPILE
++#include <cdda_interface.h>
++
+ typedef void cdrom_paranoia;
+ #endif
+
diff --git a/audio/cdparanoia/files/patch-utils.h b/audio/cdparanoia/files/patch-utils.h
index 3a1f6796814b..bca77cd1c0ba 100644
--- a/audio/cdparanoia/files/patch-utils.h
+++ b/audio/cdparanoia/files/patch-utils.h
@@ -3,9 +3,8 @@ Index: utils.h
RCS file: /home/cvs/cdparanoia/utils.h,v
retrieving revision 1.1.1.1
retrieving revision 1.3
-diff -u -r1.1.1.1 -r1.3
---- utils.h 2003/01/05 09:46:26 1.1.1.1
-+++ utils.h 2003/01/06 23:34:21 1.3
+--- utils.h.orig 2000-04-19 22:41:04 UTC
++++ utils.h
@@ -1,5 +1,9 @@
#include <stdlib.h>
+#ifdef Linux
diff --git a/audio/cdparanoia/files/patch-version.h b/audio/cdparanoia/files/patch-version.h
index 179759417811..ef314df2e976 100644
--- a/audio/cdparanoia/files/patch-version.h
+++ b/audio/cdparanoia/files/patch-version.h
@@ -3,9 +3,8 @@ Index: version.h
RCS file: /home/cvs/cdparanoia/version.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
-diff -u -r1.1.1.1 -r1.2
---- version.h 2003/01/05 09:46:26 1.1.1.1
-+++ version.h 2003/01/07 00:49:01 1.2
+--- version.h.orig 2001-03-24 01:15:45 UTC
++++ version.h
@@ -8,6 +8,8 @@
diff --git a/audio/cdplay/Makefile b/audio/cdplay/Makefile
index 0129a5099dba..58d09c944902 100644
--- a/audio/cdplay/Makefile
+++ b/audio/cdplay/Makefile
@@ -26,7 +26,7 @@ post-patch:
-e 's/^OPTIMISE=.*$$/OPTIMISE=/'\
${WRKSRC}/Makefile
-pre-patch:
+post-extract:
@${GUNZIP_CMD} ${WRKSRC}/cdplay.1.gz
do-install:
diff --git a/audio/cdplay/files/patch-cd.c b/audio/cdplay/files/patch-cd.c
index e70d3ce1094f..18fb70325166 100644
--- a/audio/cdplay/files/patch-cd.c
+++ b/audio/cdplay/files/patch-cd.c
@@ -1,6 +1,6 @@
---- cd.c.orig Mon May 19 15:44:40 2003
-+++ cd.c Mon May 19 15:53:44 2003
-@@ -98,8 +98,16 @@
+--- cd.c.orig 1997-10-24 15:38:25 UTC
++++ cd.c
+@@ -98,8 +98,16 @@ void play_track(int track)
cd_play.end_s=cdinfo.s_sec[cdinfo.l_track-1];
cd_play.end_f=cdinfo.s_frame[cdinfo.l_track-1];
@@ -19,7 +19,7 @@
}
/* Skips one track forward */
-@@ -111,7 +119,7 @@
+@@ -111,7 +119,7 @@ void next(void)
/* Quess */
void prev(void)
{
@@ -28,7 +28,7 @@
play_track(cdinfo.c_track-1);
else play_track(cdinfo.c_track);
}
-@@ -141,17 +149,59 @@
+@@ -141,17 +149,59 @@ void cdpause(void)
}
}
@@ -92,7 +92,7 @@
cd_play.start_m=cdinfo.c_seca/60;
}
cd_play.start_f=1;
-@@ -160,19 +210,25 @@
+@@ -160,19 +210,25 @@ void ff(void)
cd_play.end_f=cdinfo.s_frame[cdinfo.l_track-1];
if(ioctl(cd_fd,CDIOCPLAYMSF,(char *) &cd_play)<0) per();
@@ -122,7 +122,7 @@
cd_play.start_m=cdinfo.c_seca/60;
}
cd_play.start_f=1;
-@@ -181,6 +237,7 @@
+@@ -181,6 +237,7 @@ void rew(void)
cd_play.end_f=cdinfo.s_frame[cdinfo.l_track-1];
if(ioctl(cd_fd,CDIOCPLAYMSF,(char *) &cd_play)<0) per();
@@ -130,7 +130,7 @@
}
/* Spit cd out */
-@@ -192,6 +249,7 @@
+@@ -192,6 +249,7 @@ void eject(void)
per();
close(cd_fd);
cdinfo.eject=1;
diff --git a/audio/cdplay/files/patch-cdplay.1 b/audio/cdplay/files/patch-cdplay.1
index 4f08b88aa716..c35918430495 100644
--- a/audio/cdplay/files/patch-cdplay.1
+++ b/audio/cdplay/files/patch-cdplay.1
@@ -1,7 +1,6 @@
-diff -ur ../cdplay-0.92.orig/cdplay.1 ./cdplay.1
---- ../cdplay-0.92.orig/cdplay.1 Fri Nov 7 20:13:21 1997
-+++ ./cdplay.1 Sat Jun 27 00:29:34 1998
-@@ -35,15 +35,14 @@
+--- cdplay.1.orig 1997-11-08 01:13:21 UTC
++++ cdplay.1
+@@ -35,15 +35,14 @@ cdplay \- play CD's with nice interface
]
.SH DESCRIPTION
.B cdplay
@@ -20,7 +19,7 @@ diff -ur ../cdplay-0.92.orig/cdplay.1 ./cdplay.1
.TP
.BR -h
Display a brief help message.
-@@ -59,6 +58,9 @@
+@@ -59,6 +58,9 @@ Stop. Stops cd and sets current track to
Space
Pause. If cd is already on pause continues.
.TP
@@ -30,7 +29,7 @@ diff -ur ../cdplay-0.92.orig/cdplay.1 ./cdplay.1
\'e\'
Eject. Spits the disc out of your drive.
.TP
-@@ -79,14 +81,18 @@
+@@ -79,14 +81,18 @@ Skip to track [num]. NOTE! works only fo
.TP
\'q\'
Quit. Exit the program.
diff --git a/audio/cdplay/files/patch-cdplay.h b/audio/cdplay/files/patch-cdplay.h
index c8b3b8b3859f..abccf6bc0899 100644
--- a/audio/cdplay/files/patch-cdplay.h
+++ b/audio/cdplay/files/patch-cdplay.h
@@ -1,6 +1,6 @@
---- ./cdplay.h.orig Mon May 19 15:44:41 2003
-+++ ./cdplay.h Mon May 19 15:55:12 2003
-@@ -71,8 +71,9 @@
+--- cdplay.h.orig 1997-11-17 07:21:55 UTC
++++ cdplay.h
+@@ -71,8 +71,9 @@ void next(void);
void prev(void);
void stop(void);
void cdpause(void);
@@ -12,7 +12,7 @@
void eject(void);
/* Terminal related functions */
-@@ -90,6 +91,7 @@
+@@ -90,6 +91,7 @@ void hs_cont(void);
void hs_winch(void);
void do_exit(int);
void do_stop(void);
diff --git a/audio/cdplay/files/patch-main.c b/audio/cdplay/files/patch-main.c
index b37036c209f9..f9bb8d845181 100644
--- a/audio/cdplay/files/patch-main.c
+++ b/audio/cdplay/files/patch-main.c
@@ -1,6 +1,6 @@
---- ./main.c.orig Mon May 19 15:44:41 2003
-+++ ./main.c Mon May 19 15:55:24 2003
-@@ -35,11 +35,14 @@
+--- main.c.orig 1997-11-17 09:26:26 UTC
++++ main.c
+@@ -35,11 +35,14 @@ extern struct termios old_ttyattr;
int main(int argc, char **argv)
{
char cmd[1];
@@ -16,7 +16,7 @@
if(argc>1 && !strcmp(argv[1],"-d"))
cd_device=argv[2];
else if(argc>1)
-@@ -68,19 +71,20 @@
+@@ -68,19 +71,20 @@ int main(int argc, char **argv)
while(1){
if(select(1,&rset,(fd_set *) 0,(fd_set *) 0,&stime)>0) {
@@ -43,12 +43,10 @@
}
update_cdinfo();
move_up(5);
-@@ -90,6 +94,36 @@
- }
-
+@@ -92,6 +96,36 @@ int main(int argc, char **argv)
exit(0);
-+}
-+
+ }
+
+void getcommand(char *command, int *repetivity)
+{
+ static char stored_command;
@@ -77,6 +75,8 @@
+ }
+ stored_command='\0';
+ return;
- }
-
++}
++
void hs_cont(void)
+ {
+ init_term();
diff --git a/audio/chordpack/files/patch-chordpack b/audio/chordpack/files/patch-chordpack
index 700b6c45dbbe..6c265f7b218c 100644
--- a/audio/chordpack/files/patch-chordpack
+++ b/audio/chordpack/files/patch-chordpack
@@ -1,6 +1,6 @@
---- chordpack.orig Sun Jul 8 01:09:29 2001
-+++ chordpack Sun Jul 8 01:09:32 2001
-@@ -1590,7 +1590,7 @@
+--- chordpack.orig 2001-07-23 13:47:11 UTC
++++ chordpack
+@@ -1598,7 +1598,7 @@ if ($task eq "ascii") {
# {{{ Comment (programmer's kind of)
if (/^\x23/) { # \x23 is hash
diff --git a/audio/clunk/files/patch-CMakeLists.txt b/audio/clunk/files/patch-CMakeLists.txt
index 6f69ed5535e9..5905d70bfffc 100644
--- a/audio/clunk/files/patch-CMakeLists.txt
+++ b/audio/clunk/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig 2014-09-29 10:48:48.000000000 +0400
-+++ CMakeLists.txt 2015-01-23 14:17:02.000000000 +0300
-@@ -77,7 +77,7 @@
+--- CMakeLists.txt.orig 2014-09-29 06:48:48 UTC
++++ CMakeLists.txt
+@@ -77,7 +77,7 @@ set(PUBLIC_HEADERS
clunk/v3.h
clunk/clunk_c.h
clunk/window_function.h
diff --git a/audio/clunk/files/patch-clunk__mdct_context.h b/audio/clunk/files/patch-clunk__mdct_context.h
deleted file mode 100644
index a66c079fdded..000000000000
--- a/audio/clunk/files/patch-clunk__mdct_context.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- clunk/mdct_context.h.orig 2014-09-29 10:48:48.000000000 +0400
-+++ clunk/mdct_context.h 2015-01-23 14:14:23.000000000 +0300
-@@ -61,7 +61,7 @@
-
- T data[N];
-
-- mdct_context() : sqrt_N((T)sqrt((T)N)), data() {
-+ mdct_context() : window_func(), sqrt_N((T)sqrt((T)N)), data() {
- for(unsigned t = 0; t < N4; ++t) {
- angle_cache[t] = std::polar<T>(1, 2 * T(M_PI) * (t + T(0.125)) / N);
- }
diff --git a/audio/clunk/files/patch-clunk_mdct__context.h b/audio/clunk/files/patch-clunk_mdct__context.h
new file mode 100644
index 000000000000..1d694ef4a1ce
--- /dev/null
+++ b/audio/clunk/files/patch-clunk_mdct__context.h
@@ -0,0 +1,11 @@
+--- clunk/mdct_context.h.orig 2014-09-29 06:48:48 UTC
++++ clunk/mdct_context.h
+@@ -61,7 +61,7 @@ public:
+
+ T data[N];
+
+- mdct_context() : sqrt_N((T)sqrt((T)N)), data() {
++ mdct_context() : window_func(), sqrt_N((T)sqrt((T)N)), data() {
+ for(unsigned t = 0; t < N4; ++t) {
+ angle_cache[t] = std::polar<T>(1, 2 * T(M_PI) * (t + T(0.125)) / N);
+ }
diff --git a/audio/cmp3/files/patch-cmp3.h b/audio/cmp3/files/patch-cmp3.h
index 4e752f1dc522..8ee9d208c44f 100644
--- a/audio/cmp3/files/patch-cmp3.h
+++ b/audio/cmp3/files/patch-cmp3.h
@@ -1,4 +1,4 @@
---- cmp3.h.orig 2001-07-01 06:38:08.000000000 +0200
+--- cmp3.h.orig 2001-07-01 04:38:08 UTC
+++ cmp3.h
@@ -1,7 +1,7 @@
#ifndef _CMP3_H
diff --git a/audio/cmp3/files/patch-cmp3listfiles.c b/audio/cmp3/files/patch-cmp3listfiles.c
index 332b51152e1c..291a3a2d3f67 100644
--- a/audio/cmp3/files/patch-cmp3listfiles.c
+++ b/audio/cmp3/files/patch-cmp3listfiles.c
@@ -1,6 +1,6 @@
---- cmp3listfiles.c.orig Fri Jul 18 17:55:33 2003
-+++ cmp3listfiles.c Fri Jul 18 17:56:23 2003
-@@ -270,13 +270,13 @@
+--- cmp3listfiles.c.orig 2001-06-13 20:13:16 UTC
++++ cmp3listfiles.c
+@@ -270,13 +270,13 @@ void writelist(char *filepath)
/* XXX - alert person */
return;
fprintf(outfile,
diff --git a/audio/cmp3/files/patch-cmp3main.c b/audio/cmp3/files/patch-cmp3main.c
index dc0f0748a58d..bd2ad501d9f5 100644
--- a/audio/cmp3/files/patch-cmp3main.c
+++ b/audio/cmp3/files/patch-cmp3main.c
@@ -1,6 +1,6 @@
---- cmp3main.c.orig 2001-07-07 16:17:23.000000000 -0300
-+++ cmp3main.c 2009-09-20 11:11:06.000000000 -0300
-@@ -33,13 +33,18 @@
+--- cmp3main.c.orig 2001-07-07 19:17:23 UTC
++++ cmp3main.c
+@@ -33,13 +33,18 @@ int main(int argc, char **argv)
int lastleftline = 0;
int lastrightline = 0;
char *init_dir = NULL;
diff --git a/audio/cmp3/files/patch-cmp3volume.c b/audio/cmp3/files/patch-cmp3volume.c
index 7bc9af0d5967..b082de7b2379 100644
--- a/audio/cmp3/files/patch-cmp3volume.c
+++ b/audio/cmp3/files/patch-cmp3volume.c
@@ -1,5 +1,5 @@
---- cmp3volume.c.orig Sun Jul 1 13:38:08 2001
-+++ cmp3volume.c Sat Mar 20 00:23:51 2004
+--- cmp3volume.c.orig 2001-07-01 04:38:08 UTC
++++ cmp3volume.c
@@ -3,11 +3,7 @@
*/
diff --git a/audio/cmp3/files/patch-nevlib_Makefile.in b/audio/cmp3/files/patch-nevlib_Makefile.in
index 599ba777cad7..22432bcca089 100644
--- a/audio/cmp3/files/patch-nevlib_Makefile.in
+++ b/audio/cmp3/files/patch-nevlib_Makefile.in
@@ -1,5 +1,5 @@
---- nevlib/Makefile.in.orig 2001-07-29 02:09:13.000000000 -0300
-+++ nevlib/Makefile.in 2009-09-20 11:11:06.000000000 -0300
+--- nevlib/Makefile.in.orig 2001-07-29 05:09:13 UTC
++++ nevlib/Makefile.in
@@ -1,6 +1,6 @@
CC = @CC@
diff --git a/audio/cmp3/files/patch-rnmp3.c b/audio/cmp3/files/patch-rnmp3.c
index 4c5d0805f25d..17d87ddcffc1 100644
--- a/audio/cmp3/files/patch-rnmp3.c
+++ b/audio/cmp3/files/patch-rnmp3.c
@@ -1,6 +1,6 @@
---- rnmp3.c.orig Fri Jul 18 18:00:43 2003
-+++ rnmp3.c Fri Jul 18 18:02:36 2003
-@@ -256,25 +256,21 @@
+--- rnmp3.c.orig 2001-06-13 20:13:19 UTC
++++ rnmp3.c
+@@ -256,25 +256,21 @@ int main(int argc, char **argv)
void usage()
{
diff --git a/audio/cmus/files/patch-Makefile b/audio/cmus/files/patch-Makefile
index c988b9658a0b..33e64edfb043 100644
--- a/audio/cmus/files/patch-Makefile
+++ b/audio/cmus/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig 2012-11-11 17:40:55.000000000 +0100
-+++ Makefile 2012-11-11 17:42:25.000000000 +0100
-@@ -105,7 +105,7 @@
+--- Makefile.orig 2014-08-11 07:48:28 UTC
++++ Makefile
+@@ -111,7 +111,7 @@ $(opus-objs): CFLAGS += $(OPUS_CFLAGS)
$(wavpack-objs): CFLAGS += $(WAVPACK_CFLAGS)
$(mp4-objs): CFLAGS += $(MP4_CFLAGS)
$(aac-objs): CFLAGS += $(AAC_CFLAGS)
@@ -9,7 +9,7 @@
$(cue-objs): CFLAGS += $(CUE_CFLAGS)
cdio.so: $(cdio-objs) $(libcmus-y)
-@@ -216,10 +216,10 @@
+@@ -231,10 +231,10 @@ $(man7): Doc/ttman
$(call cmd,ttman)
Doc/ttman.o: Doc/ttman.c
diff --git a/audio/cmus/files/patch-scripts-checks.sh b/audio/cmus/files/patch-scripts_checks.sh
index 15b27cba2112..15b27cba2112 100644
--- a/audio/cmus/files/patch-scripts-checks.sh
+++ b/audio/cmus/files/patch-scripts_checks.sh
diff --git a/audio/cpige/files/patch-gui_Makefile.in b/audio/cpige/files/patch-gui_Makefile.in
new file mode 100644
index 000000000000..3259cf4e73b1
--- /dev/null
+++ b/audio/cpige/files/patch-gui_Makefile.in
@@ -0,0 +1,10 @@
+--- gui/Makefile.in.orig 2006-08-20 14:51:17 UTC
++++ gui/Makefile.in
+@@ -1,6 +1,6 @@
+ CFLAGS += @CFLAGS@ -I..
+ CLIBS += @CLIBS@
+-CC := gcc
++CC ?= gcc
+
+ all: configurator
+
diff --git a/audio/cpige/files/patch-gui__Makefile.in b/audio/cpige/files/patch-gui__Makefile.in
deleted file mode 100644
index 5aa1aac913ca..000000000000
--- a/audio/cpige/files/patch-gui__Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./gui/Makefile.in.orig 2008-05-01 11:15:47.000000000 +0300
-+++ ./gui/Makefile.in 2008-05-01 11:16:16.000000000 +0300
-@@ -1,6 +1,6 @@
- CFLAGS += @CFLAGS@ -I..
- CLIBS += @CLIBS@
--CC := gcc
-+CC ?= gcc
-
- all: configurator
-
diff --git a/audio/cpige/files/patch-gui__configure b/audio/cpige/files/patch-gui__configure
deleted file mode 100644
index 63e86cad1675..000000000000
--- a/audio/cpige/files/patch-gui__configure
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./gui/configure.orig 2006-08-20 17:51:17.000000000 +0300
-+++ ./gui/configure 2008-05-01 11:15:42.000000000 +0300
-@@ -3,8 +3,6 @@
- PKG_CONFIG=`which pkg-config`
-
- libs="gdk-2.0 glib-2.0 gtk+-2.0 gobject-2.0"
--CLIBS=""
--CFLAGS=""
-
- if [ ! -x "$PKG_CONFIG" ]; then
- echo "cPige GUI requires pkg-config to build."
-@@ -12,7 +10,7 @@
- fi
-
- for lib in $libs; do
-- echo -ne "Checking $lib... "
-+ echo -n "Checking $lib... "
- $PKG_CONFIG --exists $lib >/dev/null 2>&1
- if [ "$?" = "0" ]; then
- echo "yes"
diff --git a/audio/cpige/files/patch-gui_configure b/audio/cpige/files/patch-gui_configure
new file mode 100644
index 000000000000..e19adcc597b4
--- /dev/null
+++ b/audio/cpige/files/patch-gui_configure
@@ -0,0 +1,20 @@
+--- gui/configure.orig 2006-08-20 14:51:17 UTC
++++ gui/configure
+@@ -3,8 +3,6 @@
+ PKG_CONFIG=`which pkg-config`
+
+ libs="gdk-2.0 glib-2.0 gtk+-2.0 gobject-2.0"
+-CLIBS=""
+-CFLAGS=""
+
+ if [ ! -x "$PKG_CONFIG" ]; then
+ echo "cPige GUI requires pkg-config to build."
+@@ -12,7 +10,7 @@ if [ ! -x "$PKG_CONFIG" ]; then
+ fi
+
+ for lib in $libs; do
+- echo -ne "Checking $lib... "
++ echo -n "Checking $lib... "
+ $PKG_CONFIG --exists $lib >/dev/null 2>&1
+ if [ "$?" = "0" ]; then
+ echo "yes"
diff --git a/audio/cpige/files/patch-mynet.c b/audio/cpige/files/patch-mynet.c
index d7a8b6f8a952..0fd801d9fe0d 100644
--- a/audio/cpige/files/patch-mynet.c
+++ b/audio/cpige/files/patch-mynet.c
@@ -1,6 +1,6 @@
---- ./mynet.c.orig 2006-08-20 17:51:17.000000000 +0300
-+++ ./mynet.c 2012-08-12 12:29:05.000000000 +0300
-@@ -86,7 +86,7 @@
+--- mynet.c.orig 2006-08-20 14:51:17 UTC
++++ mynet.c
+@@ -86,7 +86,7 @@ int server_connect (char *servername, in
{
struct sockaddr_in serverSockAddr;
struct hostent *serverHostEnt;
@@ -9,7 +9,7 @@
#if WIN32
int res;
-@@ -105,7 +105,7 @@
+@@ -105,7 +105,7 @@ int server_connect (char *servername, in
hostAddr = inet_addr(servername);
/* If it is an ip address */
diff --git a/audio/creox/files/patch-creox__effects_dsp__distortionprocessor.cpp b/audio/creox/files/patch-creox__effects_dsp__distortionprocessor.cpp
deleted file mode 100644
index b75af1a1f190..000000000000
--- a/audio/creox/files/patch-creox__effects_dsp__distortionprocessor.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
---- creox/effects_dsp/distortionprocessor.cpp.orig
-+++ creox/effects_dsp/distortionprocessor.cpp
-@@ -423,7 +424,8 @@
- {
- const float omega = 2.0f*float(M_PI)*centerFrequency/m_samplerate_f;
- float sn,cs;
-- sincosf(omega, &sn, &cs);
-+ sn = sinf(omega);
-+ cs = cosf(omega);
- const float alpha = sn*sinhf(float(M_LN2/2.0)*bandwidth*(omega/sn));
- const float a0 = 1.0f/(1.0f + alpha); //a0 = 1/a0
-
-@@ -462,7 +464,8 @@
- const float A = powf(10., gain/40.0f);
- const float omega = 2.0f*float(M_PI)*frequency/m_samplerate_f;
- float sn,cs;
-- sincosf(omega, &sn, &cs);
-+ sn = sinf(omega);
-+ cs = cosf(omega);
- register const float beta = sn * sqrtf( (A*A + 1.0f)/slope - powf(A-1.0f, 2.0f) );
-
- register const float AplusOne = A + 1.0f;
-@@ -500,7 +503,8 @@
- {
- const float omega = 2.0f*float(M_PI)*cutoffFrequency/m_samplerate_f;
- float sn,cs;
-- sincosf(omega, &sn, &cs);
-+ sn = sinf(omega);
-+ cs = cosf(omega);
- const float alpha = sn/(2.0f * Q);
- const float a0 = 1.0f/(1.0f + alpha); //a0 = 1/a0
-
diff --git a/audio/creox/files/patch-creox__effects_dsp__echoprocessor.cpp b/audio/creox/files/patch-creox__effects_dsp__echoprocessor.cpp
deleted file mode 100644
index cc9bbedc391f..000000000000
--- a/audio/creox/files/patch-creox__effects_dsp__echoprocessor.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- creox/effects_dsp/echoprocessor.cpp.orig 2011-06-22 06:27:40.000000000 +0900
-+++ creox/effects_dsp/echoprocessor.cpp 2013-02-18 21:05:56.000000000 +0900
-@@ -221,7 +221,7 @@
- parallelEchoes += parEcho * m_parallelEchoParam[count].decay_f;
- #ifdef FP_FAST_FMAF
- *(m_parallelEchoChain[count].buffer + m_parallelEchoChain[count].offset) =
-- std::fmaf(parEcho, m_parallelEchoParam[count].feedback_f, inputSample);
-+ fmaf(parEcho, m_parallelEchoParam[count].feedback_f, inputSample);
- #else
- *(m_parallelEchoChain[count].buffer + m_parallelEchoChain[count].offset) =
- inputSample + (parEcho * m_parallelEchoParam[count].feedback_f);
diff --git a/audio/creox/files/patch-creox__effects_dsp__phaserprocessor.cpp b/audio/creox/files/patch-creox__effects_dsp__phaserprocessor.cpp
deleted file mode 100644
index 65df72e5c5c7..000000000000
--- a/audio/creox/files/patch-creox__effects_dsp__phaserprocessor.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
---- creox/effects_dsp/phaserprocessor.cpp.orig
-+++ creox/effects_dsp/phaserprocessor.cpp
-@@ -156,7 +157,8 @@
- {
- const float omega = 2.0f * float(M_PI) * m_stepFrequency / m_samplerate_d;
- float sn, cs;
-- sincosf(omega, &sn, &cs);
-+ sn = sinf(omega);
-+ cs = cosf(omega);
- *(m_coefBuffPrelim++) = cs; // cs
- *(m_coefBuffPrelim++) = sn / m_resonance; // alpha (m_resonance = 2.0*resonance)
- m_stepFrequency *= m_expStep;
-@@ -231,7 +233,8 @@
- }
-
- float sn, cs;
-- sincosf(omega, &sn, &cs);
-+ sn = sinf(omega);
-+ cs = cosf(omega);
- register const float alpha = sn / m_resonance; // alpha (m_resonance = 2.0 * resonance)
-
- // perform filter
diff --git a/audio/creox/files/patch-creox__effects_dsp__tremoloprocessor.cpp b/audio/creox/files/patch-creox__effects_dsp__tremoloprocessor.cpp
deleted file mode 100644
index 082fba08db29..000000000000
--- a/audio/creox/files/patch-creox__effects_dsp__tremoloprocessor.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- creox/effects_dsp/tremoloprocessor.cpp.orig 2011-06-22 06:27:40.000000000 +0900
-+++ creox/effects_dsp/tremoloprocessor.cpp 2013-02-18 21:04:20.000000000 +0900
-@@ -182,8 +182,8 @@
- register const float inputSample = *(inputBuffer++) * m_inputGain_f;
- #ifdef FP_FAST_FMAF
- *(outputBuffer++) = (inputSample * m_dry_f)
-- + (inputSample * m_wet_f * std::fmaf(amplitudeModulation,
-- m_modulationMulti, m_modulationShift);
-+ + (inputSample * m_wet_f * fmaf(amplitudeModulation,
-+ m_modulationMulti, m_modulationShift));
- #else
- *(outputBuffer++) = (inputSample * m_dry_f)
- + (inputSample * m_wet_f * ((amplitudeModulation * m_modulationMulti)
diff --git a/audio/creox/files/patch-creox_effects__dsp_distortionprocessor.cpp b/audio/creox/files/patch-creox_effects__dsp_distortionprocessor.cpp
new file mode 100644
index 000000000000..2361e4233b47
--- /dev/null
+++ b/audio/creox/files/patch-creox_effects__dsp_distortionprocessor.cpp
@@ -0,0 +1,32 @@
+--- creox/effects_dsp/distortionprocessor.cpp.orig 2011-06-21 21:27:40 UTC
++++ creox/effects_dsp/distortionprocessor.cpp
+@@ -424,7 +424,8 @@ void DistortionProcessor::computeBPFCoef
+ {
+ const float omega = 2.0f*float(M_PI)*centerFrequency/m_samplerate_f;
+ float sn,cs;
+- sincosf(omega, &sn, &cs);
++ sn = sinf(omega);
++ cs = cosf(omega);
+ const float alpha = sn*sinhf(float(M_LN2/2.0)*bandwidth*(omega/sn));
+ const float a0 = 1.0f/(1.0f + alpha); //a0 = 1/a0
+
+@@ -463,7 +464,8 @@ void DistortionProcessor::computeLowShel
+ const float A = exp10f(gain/40.0f);
+ const float omega = 2.0f*float(M_PI)*frequency/m_samplerate_f;
+ float sn,cs;
+- sincosf(omega, &sn, &cs);
++ sn = sinf(omega);
++ cs = cosf(omega);
+ register const float beta = sn * sqrtf( (A*A + 1.0f)/slope - powf(A-1.0f, 2.0f) );
+
+ register const float AplusOne = A + 1.0f;
+@@ -501,7 +503,8 @@ void DistortionProcessor::computeLowPass
+ {
+ const float omega = 2.0f*float(M_PI)*cutoffFrequency/m_samplerate_f;
+ float sn,cs;
+- sincosf(omega, &sn, &cs);
++ sn = sinf(omega);
++ cs = cosf(omega);
+ const float alpha = sn/(2.0f * Q);
+ const float a0 = 1.0f/(1.0f + alpha); //a0 = 1/a0
+
diff --git a/audio/creox/files/patch-creox_effects__dsp_echoprocessor.cpp b/audio/creox/files/patch-creox_effects__dsp_echoprocessor.cpp
new file mode 100644
index 000000000000..a012ba414873
--- /dev/null
+++ b/audio/creox/files/patch-creox_effects__dsp_echoprocessor.cpp
@@ -0,0 +1,11 @@
+--- creox/effects_dsp/echoprocessor.cpp.orig 2011-06-21 21:27:40 UTC
++++ creox/effects_dsp/echoprocessor.cpp
+@@ -221,7 +221,7 @@ void EchoProcessor::signalFlow_run(const
+ parallelEchoes += parEcho * m_parallelEchoParam[count].decay_f;
+ #ifdef FP_FAST_FMAF
+ *(m_parallelEchoChain[count].buffer + m_parallelEchoChain[count].offset) =
+- std::fmaf(parEcho, m_parallelEchoParam[count].feedback_f, inputSample);
++ fmaf(parEcho, m_parallelEchoParam[count].feedback_f, inputSample);
+ #else
+ *(m_parallelEchoChain[count].buffer + m_parallelEchoChain[count].offset) =
+ inputSample + (parEcho * m_parallelEchoParam[count].feedback_f);
diff --git a/audio/creox/files/patch-creox_effects__dsp_phaserprocessor.cpp b/audio/creox/files/patch-creox_effects__dsp_phaserprocessor.cpp
new file mode 100644
index 000000000000..6a4940906f99
--- /dev/null
+++ b/audio/creox/files/patch-creox_effects__dsp_phaserprocessor.cpp
@@ -0,0 +1,22 @@
+--- creox/effects_dsp/phaserprocessor.cpp.orig 2011-06-21 21:27:40 UTC
++++ creox/effects_dsp/phaserprocessor.cpp
+@@ -157,7 +157,8 @@ void PhaserProcessor::signalFlow_run(con
+ {
+ const float omega = 2.0f * float(M_PI) * m_stepFrequency / m_samplerate_d;
+ float sn, cs;
+- sincosf(omega, &sn, &cs);
++ sn = sinf(omega);
++ cs = cosf(omega);
+ *(m_coefBuffPrelim++) = cs; // cs
+ *(m_coefBuffPrelim++) = sn / m_resonance; // alpha (m_resonance = 2.0*resonance)
+ m_stepFrequency *= m_expStep;
+@@ -232,7 +233,8 @@ void PhaserProcessor::signalFlow_run(con
+ }
+
+ float sn, cs;
+- sincosf(omega, &sn, &cs);
++ sn = sinf(omega);
++ cs = cosf(omega);
+ register const float alpha = sn / m_resonance; // alpha (m_resonance = 2.0 * resonance)
+
+ // perform filter
diff --git a/audio/creox/files/patch-creox_effects__dsp_tremoloprocessor.cpp b/audio/creox/files/patch-creox_effects__dsp_tremoloprocessor.cpp
new file mode 100644
index 000000000000..966768bb3463
--- /dev/null
+++ b/audio/creox/files/patch-creox_effects__dsp_tremoloprocessor.cpp
@@ -0,0 +1,13 @@
+--- creox/effects_dsp/tremoloprocessor.cpp.orig 2011-06-21 21:27:40 UTC
++++ creox/effects_dsp/tremoloprocessor.cpp
+@@ -182,8 +182,8 @@ void TremoloProcessor::signalFlow_run(co
+ register const float inputSample = *(inputBuffer++) * m_inputGain_f;
+ #ifdef FP_FAST_FMAF
+ *(outputBuffer++) = (inputSample * m_dry_f)
+- + (inputSample * m_wet_f * std::fmaf(amplitudeModulation,
+- m_modulationMulti, m_modulationShift);
++ + (inputSample * m_wet_f * fmaf(amplitudeModulation,
++ m_modulationMulti, m_modulationShift));
+ #else
+ *(outputBuffer++) = (inputSample * m_dry_f)
+ + (inputSample * m_wet_f * ((amplitudeModulation * m_modulationMulti)
diff --git a/audio/csound/files/patch-InOut-rtalsa.c b/audio/csound/files/patch-InOut-rtalsa.c
deleted file mode 100644
index cc4c4635a1e0..000000000000
--- a/audio/csound/files/patch-InOut-rtalsa.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- InOut/rtalsa.c.orig 2011-12-22 19:41:53.000000000 +0900
-+++ InOut/rtalsa.c 2011-12-27 23:53:00.000000000 +0900
-@@ -35,9 +35,6 @@
- /* #ifndef _BSD_SOURCE */
- /* #define _BSD_SOURCE 1 */
- /* #endif */
--#include <alloca.h>
--#include <termios.h>
--#include <unistd.h>
-
- #include "csdl.h"
-
diff --git a/audio/csound/files/patch-InOut_rtalsa.c b/audio/csound/files/patch-InOut_rtalsa.c
new file mode 100644
index 000000000000..df863ed7a06a
--- /dev/null
+++ b/audio/csound/files/patch-InOut_rtalsa.c
@@ -0,0 +1,12 @@
+--- InOut/rtalsa.c.orig 2013-01-07 12:49:34 UTC
++++ InOut/rtalsa.c
+@@ -35,9 +35,6 @@
+ /* #ifndef _BSD_SOURCE */
+ /* #define _BSD_SOURCE 1 */
+ /* #endif */
+-#include <alloca.h>
+-#include <termios.h>
+-#include <unistd.h>
+
+ #include "csdl.h"
+
diff --git a/audio/csound/files/patch-Opcodes-urandom.c b/audio/csound/files/patch-Opcodes-urandom.c
deleted file mode 100644
index 7d19cb045fdd..000000000000
--- a/audio/csound/files/patch-Opcodes-urandom.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- Opcodes/urandom.c.old 2011-01-30 02:14:59.000000000 -0600
-+++ Opcodes/urandom.c 2011-01-30 02:15:08.000000000 -0600
-@@ -22,7 +22,6 @@
- */
-
- #include "csdl.h"
--#include <ieee754.h>
-
- typedef struct {
- OPDS h;
diff --git a/audio/csound/files/patch-Opcodes_urandom.c b/audio/csound/files/patch-Opcodes_urandom.c
new file mode 100644
index 000000000000..3cf8554709da
--- /dev/null
+++ b/audio/csound/files/patch-Opcodes_urandom.c
@@ -0,0 +1,10 @@
+--- Opcodes/urandom.c.orig 2013-01-07 12:49:34 UTC
++++ Opcodes/urandom.c
+@@ -22,7 +22,6 @@
+ */
+
+ #include "csdl.h"
+-#include <ieee754.h>
+
+ typedef struct {
+ OPDS h;
diff --git a/audio/csound/files/patch-SConstruct b/audio/csound/files/patch-SConstruct
index da73267d75e3..c7ee4b0b96b2 100644
--- a/audio/csound/files/patch-SConstruct
+++ b/audio/csound/files/patch-SConstruct
@@ -1,6 +1,6 @@
---- SConstruct.orig 2013-01-07 16:49:34.000000000 +0400
-+++ SConstruct 2014-08-22 15:37:51.000000000 +0400
-@@ -2057,7 +2057,7 @@
+--- SConstruct.orig 2013-01-07 12:49:34 UTC
++++ SConstruct
+@@ -2057,7 +2057,7 @@ else:
# DSSI HOST OPCODES
diff --git a/audio/csound/files/patch-Top-csound.c b/audio/csound/files/patch-Top-csound.c
deleted file mode 100644
index fdeab7833a8f..000000000000
--- a/audio/csound/files/patch-Top-csound.c
+++ /dev/null
@@ -1,64 +0,0 @@
---- Top/csound.c.orig 2011-10-16 22:59:03.000000000 +0900
-+++ Top/csound.c 2011-12-07 01:15:33.000000000 +0900
-@@ -70,11 +70,14 @@
- **** MAJOR PROBLEM: PTHREAD_SPINLOCK_INITIALIZER is not defined in
- Linux or Haiku */
-
--#if defined(linux) || defined(__HAIKU__)
-+#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__)
- #define PTHREAD_SPINLOCK_INITIALIZER 0
- #endif
- #endif /* PARCS */
-
-+#if defined(__FreeBSD__)
-+#include <sys/sysctl.h>
-+#endif
- #if defined(USE_OPENMP)
- #include <omp.h>
- #endif /* USE_OPENMP */
-@@ -430,7 +433,7 @@
- NULL, /* csRandState */
- 0, /* randSeed1 */
- 0, /* randSeed2 */
--#if defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
-+#if defined(__GNUC__) && defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
- PTHREAD_SPINLOCK_INITIALIZER, /* memlock */
- #else
- 0, /* memlock */
-@@ -2914,7 +2917,7 @@
- /* ------------------------------------ */
-
- #if defined(HAVE_RDTSC)
--#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
-+#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(LINUX) && defined(__i386__))
- #undef HAVE_RDTSC
- #endif
- #endif
-@@ -2927,6 +2930,12 @@
- static int getTimeResolution(void)
- {
- #if defined(HAVE_RDTSC)
-+#if defined(__FreeBSD__)
-+ size_t size;
-+ int timeResolutionSeconds;
-+ size = sizeof timeResolutionSeconds;
-+ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
-+#else
- FILE *f;
- char buf[256];
-
-@@ -2967,9 +2976,14 @@
- }
- }
- fclose(f);
-+#endif /* __FreeBSD__ */
- if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
- fprintf(stderr, Str("No valid CPU frequency entry "
-+#if defined(__FreeBSD__)
-+ "was found.\n"));
-+#else
- "was found in /proc/cpuinfo.\n"));
-+#endif /* __FreeBSD__ */
- return -1;
- }
- /* MHz -> seconds */
diff --git a/audio/csound/files/patch-Top_csound.c b/audio/csound/files/patch-Top_csound.c
new file mode 100644
index 000000000000..2c612f114dfb
--- /dev/null
+++ b/audio/csound/files/patch-Top_csound.c
@@ -0,0 +1,64 @@
+--- Top/csound.c.orig 2013-01-07 12:49:34 UTC
++++ Top/csound.c
+@@ -70,11 +70,14 @@ extern "C" {
+ **** MAJOR PROBLEM: PTHREAD_SPINLOCK_INITIALIZER is not defined in
+ Linux or Haiku */
+
+-#if defined(linux) || defined(__HAIKU__)
++#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__)
+ #define PTHREAD_SPINLOCK_INITIALIZER 0
+ #endif
+ #endif /* PARCS */
+
++#if defined(__FreeBSD__)
++#include <sys/sysctl.h>
++#endif
+ #if defined(USE_OPENMP)
+ #include <omp.h>
+ #endif /* USE_OPENMP */
+@@ -430,7 +433,7 @@ extern "C" {
+ NULL, /* csRandState */
+ 0, /* randSeed1 */
+ 0, /* randSeed2 */
+-#if defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
++#if defined(__GNUC__) && defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
+ PTHREAD_SPINLOCK_INITIALIZER, /* memlock */
+ #else
+ 0, /* memlock */
+@@ -2914,7 +2917,7 @@ void csoundNotifyFileOpened(CSOUND *csou
+ /* ------------------------------------ */
+
+ #if defined(HAVE_RDTSC)
+-#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
++#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(LINUX) && defined(__i386__))
+ #undef HAVE_RDTSC
+ #endif
+ #endif
+@@ -2927,6 +2930,12 @@ static double timeResolutionSeconds = -1
+ static int getTimeResolution(void)
+ {
+ #if defined(HAVE_RDTSC)
++#if defined(__FreeBSD__)
++ size_t size;
++ int timeResolutionSeconds;
++ size = sizeof timeResolutionSeconds;
++ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
++#else
+ FILE *f;
+ char buf[256];
+
+@@ -2967,9 +2976,14 @@ static int getTimeResolution(void)
+ }
+ }
+ fclose(f);
++#endif /* __FreeBSD__ */
+ if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
+ fprintf(stderr, Str("No valid CPU frequency entry "
++#if defined(__FreeBSD__)
++ "was found.\n"));
++#else
+ "was found in /proc/cpuinfo.\n"));
++#endif /* __FreeBSD__ */
+ return -1;
+ }
+ /* MHz -> seconds */
diff --git a/audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp b/audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp
new file mode 100644
index 000000000000..865c2c9898f9
--- /dev/null
+++ b/audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp
@@ -0,0 +1,14 @@
+--- frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp.orig 2013-01-07 12:49:35 UTC
++++ frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp
+@@ -4,9 +4,11 @@
+ #endif
+
+ //CS5GUI_EXPERIMENTAL device query section left out for Windows and Mac while the problem is found
++#ifndef __FreeBSD__
+ #ifdef LINUX
+ #define CS5GUI_EXPERIMENTAL
+ #endif
++#endif
+
+
+ #include "csound.hpp"
diff --git a/audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp b/audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp
deleted file mode 100644
index fea6dd48a2f4..000000000000
--- a/audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp.orig 2012-08-31 15:40:35.000000000 +0200
-+++ frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp 2012-10-01 23:21:42.734591150 +0200
-@@ -4,9 +4,11 @@
- #endif
-
- //CS5GUI_EXPERIMENTAL device query section left out for Windows and Mac while the problem is found
-+#ifndef __FreeBSD__
- #ifdef LINUX
- #define CS5GUI_EXPERIMENTAL
- #endif
-+#endif
-
-
- #include "csound.hpp"
diff --git a/audio/csound6/files/patch-H__remote.h b/audio/csound6/files/patch-H__remote.h
deleted file mode 100644
index 300d735180c6..000000000000
--- a/audio/csound6/files/patch-H__remote.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- H/remote.h.orig 2015-04-25 19:06:22 UTC
-+++ H/remote.h
-@@ -42,7 +42,10 @@
- #ifdef MACOSX
- #include <net/if.h>
- #endif
-- #ifdef LINUX
-+ #ifdef __FreeBSD__
-+ #include <net/if.h>
-+ #endif
-+ #ifdef linux
- #include <linux/if.h>
- #endif
- #include <arpa/inet.h>
diff --git a/audio/csound6/files/patch-H_remote.h b/audio/csound6/files/patch-H_remote.h
new file mode 100644
index 000000000000..d83fa52cd1f1
--- /dev/null
+++ b/audio/csound6/files/patch-H_remote.h
@@ -0,0 +1,14 @@
+--- H/remote.h.orig 2015-09-29 11:13:27 UTC
++++ H/remote.h
+@@ -42,7 +42,10 @@
+ #ifdef MACOSX
+ #include <net/if.h>
+ #endif
+- #ifdef LINUX
++ #ifdef __FreeBSD__
++ #include <net/if.h>
++ #endif
++ #ifdef linux
+ #include <linux/if.h>
+ #endif
+ #include <arpa/inet.h>
diff --git a/audio/csound6/files/patch-InOut-rtalsa.c b/audio/csound6/files/patch-InOut-rtalsa.c
deleted file mode 100644
index 933b53e5f83f..000000000000
--- a/audio/csound6/files/patch-InOut-rtalsa.c
+++ /dev/null
@@ -1,27 +0,0 @@
---- InOut/rtalsa.c.orig 2015-04-25 19:06:22 UTC
-+++ InOut/rtalsa.c
-@@ -23,6 +23,7 @@
- 02111-1307 USA
- */
-
-+/*
- #ifndef _ISOC99_SOURCE
- #define _ISOC99_SOURCE 1
- #endif
-@@ -32,6 +33,7 @@
- #ifndef _BSD_SOURCE
- #define _BSD_SOURCE 1
- #endif
-+*/
-
- #include "csdl.h"
-
-@@ -50,6 +52,8 @@
- #include <signal.h>
- #include <sys/mman.h>
- #include <sys/resource.h>
-+#include <stdlib.h>
-+#include <sys/fcntl.h>
-
-
- #include "soundio.h"
diff --git a/audio/csound6/files/patch-InOut_rtalsa.c b/audio/csound6/files/patch-InOut_rtalsa.c
new file mode 100644
index 000000000000..7b13e67f0a43
--- /dev/null
+++ b/audio/csound6/files/patch-InOut_rtalsa.c
@@ -0,0 +1,27 @@
+--- InOut/rtalsa.c.orig 2015-09-29 11:13:27 UTC
++++ InOut/rtalsa.c
+@@ -23,6 +23,7 @@
+ 02111-1307 USA
+ */
+
++/*
+ #ifndef _ISOC99_SOURCE
+ #define _ISOC99_SOURCE 1
+ #endif
+@@ -32,6 +33,7 @@
+ #ifndef _BSD_SOURCE
+ #define _BSD_SOURCE 1
+ #endif
++*/
+
+ #include "csdl.h"
+
+@@ -50,6 +52,8 @@
+ #include <signal.h>
+ #include <sys/mman.h>
+ #include <sys/resource.h>
++#include <stdlib.h>
++#include <sys/fcntl.h>
+
+
+ #include "soundio.h"
diff --git a/audio/csound6/files/patch-Top-csound.c b/audio/csound6/files/patch-Top-csound.c
deleted file mode 100644
index 25e11ee4875a..000000000000
--- a/audio/csound6/files/patch-Top-csound.c
+++ /dev/null
@@ -1,55 +0,0 @@
---- Top/csound.c.orig 2015-04-25 19:06:23 UTC
-+++ Top/csound.c
-@@ -60,10 +60,13 @@
- #include "cs_par_dispatch.h"
- #include "csound_orc_semantics.h"
-
--#if defined(linux) || defined(__HAIKU__) || defined(__EMSCRIPTEN__)
-+#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__)
- #define PTHREAD_SPINLOCK_INITIALIZER 0
- #endif
-
-+#if defined(__FreeBSD__)
-+#include <sys/sysctl.h>
-+#endif
- #if defined(USE_OPENMP)
- #include <omp.h>
- #endif /* USE_OPENMP */
-@@ -3495,7 +3498,7 @@ void csoundNotifyFileOpened(CSOUND* csou
- /* ------------------------------------ */
-
- #if defined(HAVE_RDTSC)
--#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
-+#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(__FreeBSD__) && defined(__i386__))
- #undef HAVE_RDTSC
- #endif
- #endif
-@@ -3508,6 +3511,13 @@ static double timeResolutionSeconds = -1
- static int getTimeResolution(void)
- {
- #if defined(HAVE_RDTSC)
-+#if defined(__FreeBSD__)
-+ size_t size;
-+ int timeResolutionSeconds;
-+ size = sizeof timeResolutionSeconds;
-+ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
-+
-+#else
- FILE *f;
- char buf[256];
-
-@@ -3543,9 +3553,14 @@ static int getTimeResolution(void)
- }
- }
- fclose(f);
-+#endif /* __FreeBSD__ */
- if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
- fprintf(stderr, Str("No valid CPU frequency entry "
-+#if defined(__FreeBSD__)
-+ "was found.\n"));
-+#else
- "was found in /proc/cpuinfo.\n"));
-+#endif /* __FreeBSD__ */
- return -1;
- }
- /* MHz -> seconds */
diff --git a/audio/csound6/files/patch-Top_csound.c b/audio/csound6/files/patch-Top_csound.c
new file mode 100644
index 000000000000..3d417d6ace46
--- /dev/null
+++ b/audio/csound6/files/patch-Top_csound.c
@@ -0,0 +1,55 @@
+--- Top/csound.c.orig 2015-09-29 11:13:27 UTC
++++ Top/csound.c
+@@ -60,10 +60,13 @@
+ #include "cs_par_dispatch.h"
+ #include "csound_orc_semantics.h"
+
+-#if defined(linux) || defined(__HAIKU__) || defined(__EMSCRIPTEN__)
++#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__)
+ #define PTHREAD_SPINLOCK_INITIALIZER 0
+ #endif
+
++#if defined(__FreeBSD__)
++#include <sys/sysctl.h>
++#endif
+ #if defined(USE_OPENMP)
+ #include <omp.h>
+ #endif /* USE_OPENMP */
+@@ -3510,7 +3513,7 @@ void csoundNotifyFileOpened(CSOUND* csou
+ /* ------------------------------------ */
+
+ #if defined(HAVE_RDTSC)
+-#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
++#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(__FreeBSD__) && defined(__i386__))
+ #undef HAVE_RDTSC
+ #endif
+ #endif
+@@ -3523,6 +3526,13 @@ static double timeResolutionSeconds = -1
+ static int getTimeResolution(void)
+ {
+ #if defined(HAVE_RDTSC)
++#if defined(__FreeBSD__)
++ size_t size;
++ int timeResolutionSeconds;
++ size = sizeof timeResolutionSeconds;
++ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
++
++#else
+ FILE *f;
+ char buf[256];
+
+@@ -3558,9 +3568,14 @@ static int getTimeResolution(void)
+ }
+ }
+ fclose(f);
++#endif /* __FreeBSD__ */
+ if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
+ fprintf(stderr, Str("No valid CPU frequency entry "
++#if defined(__FreeBSD__)
++ "was found.\n"));
++#else
+ "was found in /proc/cpuinfo.\n"));
++#endif /* __FreeBSD__ */
+ return -1;
+ }
+ /* MHz -> seconds */
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp b/audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp
new file mode 100644
index 000000000000..0471a156f344
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp
@@ -0,0 +1,19 @@
+--- frontends/CsoundAC/ChordSpace.hpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/ChordSpace.hpp
+@@ -29,6 +29,7 @@
+ #include <climits>
+ #include <cmath>
+ #include <cstdarg>
++#include <cstdio>
+ #include <eigen3/Eigen/Dense>
+ #include "Event.hpp"
+ #include <iostream>
+@@ -554,7 +555,7 @@ public:
+ char buffer[0x1000];
+ std::stringstream stream;
+ for (size_t voice = 0; voice < voices(); ++voice) {
+- std::snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
++ snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
+ if (voice > 0) {
+ stream << " ";
+ }
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp b/audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp
new file mode 100644
index 000000000000..fa72c72c0d05
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp
@@ -0,0 +1,37 @@
+--- frontends/CsoundAC/Composition.cpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/Composition.cpp
+@@ -22,6 +22,7 @@
+ #endif
+ #include "Composition.hpp"
+ #include "System.hpp"
++#include <cstdio>
+ #include <cstdlib>
+ #include <map>
+
+@@ -289,7 +290,7 @@ namespace csound
+ int Composition::normalizeOutputSoundfile(double levelDb)
+ {
+ char buffer[0x100];
+- std::snprintf(buffer,
++ snprintf(buffer,
+ 0x100,
+ "sox %s -V3 -b 32 -e floating-point %s gain -n %f\n",
+ getOutputSoundfileName().c_str(),
+@@ -307,7 +308,7 @@ namespace csound
+ int Composition::translateToCdAudio(double levelDb)
+ {
+ char buffer[0x100];
+- std::snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
++ snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
+ getOutputSoundfileName().c_str(),
+ getCdSoundfileName().c_str(),
+ levelDb);
+@@ -323,7 +324,7 @@ namespace csound
+ int Composition::translateToMp3(double bitrate, double levelDb)
+ {
+ char buffer[0x100];
+- std::snprintf(buffer,
++ snprintf(buffer,
+ 0x100,
+ "lame --verbose --disptime 2 --nohist --preset cd --tt %s --ta %s --tl %s --tc %s %s %s\n",
+ getTitle().c_str(),
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp
new file mode 100644
index 000000000000..46802038c0f3
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp
@@ -0,0 +1,89 @@
+--- frontends/CsoundAC/Counterpoint.cpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/Counterpoint.cpp
+@@ -217,8 +217,8 @@ void Counterpoint::toCsoundScore(std::st
+ delete uniform_real_generator;
+ }
+ int Counterpoint::ABS(int i) {if (i < 0) return(-i); else return(i);}
+- int Counterpoint::MIN(int a, int b) {if (a < b) return(a); else return(b);}
+- int Counterpoint::MAX(int a, int b) {if (a > b) return(a); else return(b);}
++ int Counterpoint::IMIN(int a, int b) {if (a < b) return(a); else return(b);}
++ int Counterpoint::IMAX(int a, int b) {if (a > b) return(a); else return(b);}
+ void Counterpoint::ARRBLT(int *dest, int *source, int num) {int i; for (i=0;i<num;i++) dest[i]=source[i];} /* SAIL p51 */
+
+ int Counterpoint::InMode(int Pitch, int Mode)
+@@ -294,8 +294,8 @@ void Counterpoint::toCsoundScore(std::st
+ for (i=1;i<Cn;i++)
+ {
+ pit=Us(i,v);
+- Minp=MIN(Minp,pit);
+- Maxp=MAX(Maxp,pit);
++ Minp=IMIN(Minp,pit);
++ Maxp=IMAX(Maxp,pit);
+ }
+ return(Maxp-Minp);
+ }
+@@ -316,7 +316,7 @@ void Counterpoint::toCsoundScore(std::st
+ {
+ int j,LowestPitch;
+ LowestPitch=Cantus(Cn,v);
+- for (j=1;j<v;j++) LowestPitch=MIN(LowestPitch,Other(Cn,v,j));
++ for (j=1;j<v;j++) LowestPitch=IMIN(LowestPitch,Other(Cn,v,j));
+ return(LowestPitch);
+ }
+
+@@ -993,7 +993,7 @@ void Counterpoint::toCsoundScore(std::st
+ /* slightly frown upon leap back in the opposite direction */
+ if ((Cn>2) && ((ASkip(MelInt)) && ((ASkip(LastMelInt)) && (!(SameDir)))))
+ {
+- Val += (MAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
++ Val += (IMAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
+ if ((Cn>3) && (ASkip(LastCp2-LastCp3))) Val += ThreeSkipsPenalty;
+ }
+
+@@ -1009,7 +1009,7 @@ void Counterpoint::toCsoundScore(std::st
+ if ((Us(k,v)-Cantus(k,v))*(Us(k-1,v)-Cantus(k-1,v)) < 0) Cross++;
+ }
+ }
+- if (Cross > 0) Val += (MAX(0,((Cross-2)*3)));
++ if (Cross > 0) Val += (IMAX(0,((Cross-2)*3)));
+
+ /* don't repeat note on upbeat */
+ if (UpBeat(Cn,v) && (MelInt == Unison)) Val += RepetitionOnUpbeatPenalty;
+@@ -1107,7 +1107,7 @@ void Counterpoint::toCsoundScore(std::st
+ }
+ }
+ BestFitPenalty=CurrentPenalty+Penalty;
+- MaxPenalty=MIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
++ MaxPenalty=IMIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
+ /* AllDone=1; */
+ Fits[2]=Fits[1]; Fits[1]=Fits[0]; Fits[0]=BestFitPenalty;
+ for (v=1;v<=v1;v++)
+@@ -1164,7 +1164,7 @@ void Counterpoint::toCsoundScore(std::st
+ {
+ for (i=1;i<=NumParts;i++) Pens[x-i]=Is[i];
+ }
+- else NewLim=MIN(NewLim,penalty);
++ else NewLim=IMIN(NewLim,penalty);
+ }
+ }
+ }
+@@ -1196,7 +1196,7 @@ void Counterpoint::toCsoundScore(std::st
+ for (i=0;i<=NumParts;i++)
+ {
+ OurTime=Onset(VIndex(CurTime,i)+1,i);
+- if (OurTime != 0) NextTime=MIN(NextTime,OurTime);
++ if (OurTime != 0) NextTime=IMIN(NextTime,OurTime);
+ }
+ for (i=1;i<=NumParts;i++)
+ {
+@@ -1289,8 +1289,8 @@ void Counterpoint::toCsoundScore(std::st
+ {
+ int i;
+ i=(int)(RANDOM(10.0));
+- if (CurRhy(i) > CurRhy(MAX(1,(i-1)))) return(MAX(1,(i-1)));
+- if (CurRhy(i) <= CurRhy(MIN(9,(i+1)))) return(MIN(9,(i+1)));
++ if (CurRhy(i) > CurRhy(IMAX(1,(i-1)))) return(IMAX(1,(i-1)));
++ if (CurRhy(i) <= CurRhy(IMIN(9,(i+1)))) return(IMIN(9,(i+1)));
+ return(i);
+ }
+
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp
new file mode 100644
index 000000000000..6a4dda8f0477
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp
@@ -0,0 +1,13 @@
+--- frontends/CsoundAC/Counterpoint.hpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/Counterpoint.hpp
+@@ -102,8 +102,8 @@ public:
+ Counterpoint();
+ virtual ~Counterpoint();
+ int ABS(int i);
+- int MIN(int a, int b);
+- int MAX(int a, int b);
++ int IMIN(int a, int b);
++ int IMAX(int a, int b);
+ void ARRBLT(int *dest, int *source, int num);
+ enum
+ {
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp b/audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp
deleted file mode 100644
index d67972d5fd85..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp
+++ /dev/null
@@ -1,19 +0,0 @@
---- frontends/CsoundAC/ChordSpace.hpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/ChordSpace.hpp
-@@ -29,6 +29,7 @@
- #include <climits>
- #include <cmath>
- #include <cstdarg>
-+#include <cstdio>
- #include <eigen3/Eigen/Dense>
- #include "Event.hpp"
- #include <iostream>
-@@ -554,7 +555,7 @@ public:
- char buffer[0x1000];
- std::stringstream stream;
- for (size_t voice = 0; voice < voices(); ++voice) {
-- std::snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
-+ snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
- if (voice > 0) {
- stream << " ";
- }
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp b/audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp
deleted file mode 100644
index f33a5e684d6a..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
---- frontends/CsoundAC/Composition.cpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/Composition.cpp
-@@ -22,6 +22,7 @@
- #endif
- #include "Composition.hpp"
- #include "System.hpp"
-+#include <cstdio>
- #include <cstdlib>
- #include <map>
-
-@@ -289,7 +290,7 @@ namespace csound
- int Composition::normalizeOutputSoundfile(double levelDb)
- {
- char buffer[0x100];
-- std::snprintf(buffer,
-+ snprintf(buffer,
- 0x100,
- "sox %s -V3 -b 32 -e floating-point %s gain -n %f\n",
- getOutputSoundfileName().c_str(),
-@@ -307,7 +308,7 @@ namespace csound
- int Composition::translateToCdAudio(double levelDb)
- {
- char buffer[0x100];
-- std::snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
-+ snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
- getOutputSoundfileName().c_str(),
- getCdSoundfileName().c_str(),
- levelDb);
-@@ -323,7 +324,7 @@ namespace csound
- int Composition::translateToMp3(double bitrate, double levelDb)
- {
- char buffer[0x100];
-- std::snprintf(buffer,
-+ snprintf(buffer,
- 0x100,
- "lame --verbose --disptime 2 --nohist --preset cd --tt %s --ta %s --tl %s --tc %s %s %s\n",
- getTitle().c_str(),
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp b/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp
deleted file mode 100644
index abc845af7255..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
---- frontends/CsoundAC/Counterpoint.cpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/Counterpoint.cpp
-@@ -217,8 +217,8 @@ void Counterpoint::toCsoundScore(std::st
- delete uniform_real_generator;
- }
- int Counterpoint::ABS(int i) {if (i < 0) return(-i); else return(i);}
-- int Counterpoint::MIN(int a, int b) {if (a < b) return(a); else return(b);}
-- int Counterpoint::MAX(int a, int b) {if (a > b) return(a); else return(b);}
-+ int Counterpoint::IMIN(int a, int b) {if (a < b) return(a); else return(b);}
-+ int Counterpoint::IMAX(int a, int b) {if (a > b) return(a); else return(b);}
- void Counterpoint::ARRBLT(int *dest, int *source, int num) {int i; for (i=0;i<num;i++) dest[i]=source[i];} /* SAIL p51 */
-
- int Counterpoint::InMode(int Pitch, int Mode)
-@@ -294,8 +294,8 @@ void Counterpoint::toCsoundScore(std::st
- for (i=1;i<Cn;i++)
- {
- pit=Us(i,v);
-- Minp=MIN(Minp,pit);
-- Maxp=MAX(Maxp,pit);
-+ Minp=IMIN(Minp,pit);
-+ Maxp=IMAX(Maxp,pit);
- }
- return(Maxp-Minp);
- }
-@@ -316,7 +316,7 @@ void Counterpoint::toCsoundScore(std::st
- {
- int j,LowestPitch;
- LowestPitch=Cantus(Cn,v);
-- for (j=1;j<v;j++) LowestPitch=MIN(LowestPitch,Other(Cn,v,j));
-+ for (j=1;j<v;j++) LowestPitch=IMIN(LowestPitch,Other(Cn,v,j));
- return(LowestPitch);
- }
-
-@@ -993,7 +993,7 @@ void Counterpoint::toCsoundScore(std::st
- /* slightly frown upon leap back in the opposite direction */
- if ((Cn>2) && ((ASkip(MelInt)) && ((ASkip(LastMelInt)) && (!(SameDir)))))
- {
-- Val += (MAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
-+ Val += (IMAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
- if ((Cn>3) && (ASkip(LastCp2-LastCp3))) Val += ThreeSkipsPenalty;
- }
-
-@@ -1009,7 +1009,7 @@ void Counterpoint::toCsoundScore(std::st
- if ((Us(k,v)-Cantus(k,v))*(Us(k-1,v)-Cantus(k-1,v)) < 0) Cross++;
- }
- }
-- if (Cross > 0) Val += (MAX(0,((Cross-2)*3)));
-+ if (Cross > 0) Val += (IMAX(0,((Cross-2)*3)));
-
- /* don't repeat note on upbeat */
- if (UpBeat(Cn,v) && (MelInt == Unison)) Val += RepetitionOnUpbeatPenalty;
-@@ -1107,7 +1107,7 @@ void Counterpoint::toCsoundScore(std::st
- }
- }
- BestFitPenalty=CurrentPenalty+Penalty;
-- MaxPenalty=MIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
-+ MaxPenalty=IMIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
- /* AllDone=1; */
- Fits[2]=Fits[1]; Fits[1]=Fits[0]; Fits[0]=BestFitPenalty;
- for (v=1;v<=v1;v++)
-@@ -1164,7 +1164,7 @@ void Counterpoint::toCsoundScore(std::st
- {
- for (i=1;i<=NumParts;i++) Pens[x-i]=Is[i];
- }
-- else NewLim=MIN(NewLim,penalty);
-+ else NewLim=IMIN(NewLim,penalty);
- }
- }
- }
-@@ -1196,7 +1196,7 @@ void Counterpoint::toCsoundScore(std::st
- for (i=0;i<=NumParts;i++)
- {
- OurTime=Onset(VIndex(CurTime,i)+1,i);
-- if (OurTime != 0) NextTime=MIN(NextTime,OurTime);
-+ if (OurTime != 0) NextTime=IMIN(NextTime,OurTime);
- }
- for (i=1;i<=NumParts;i++)
- {
-@@ -1289,8 +1289,8 @@ void Counterpoint::toCsoundScore(std::st
- {
- int i;
- i=(int)(RANDOM(10.0));
-- if (CurRhy(i) > CurRhy(MAX(1,(i-1)))) return(MAX(1,(i-1)));
-- if (CurRhy(i) <= CurRhy(MIN(9,(i+1)))) return(MIN(9,(i+1)));
-+ if (CurRhy(i) > CurRhy(IMAX(1,(i-1)))) return(IMAX(1,(i-1)));
-+ if (CurRhy(i) <= CurRhy(IMIN(9,(i+1)))) return(IMIN(9,(i+1)));
- return(i);
- }
-
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp b/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp
deleted file mode 100644
index 196e5f670006..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- frontends/CsoundAC/Counterpoint.hpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/Counterpoint.hpp
-@@ -102,8 +102,8 @@ public:
- Counterpoint();
- virtual ~Counterpoint();
- int ABS(int i);
-- int MIN(int a, int b);
-- int MAX(int a, int b);
-+ int IMIN(int a, int b);
-+ int IMAX(int a, int b);
- void ARRBLT(int *dest, int *source, int num);
- enum
- {
diff --git a/audio/ctronome/files/patch-Makefile b/audio/ctronome/files/patch-Makefile
index 1c8cad9ad2ac..58bc85c96239 100644
--- a/audio/ctronome/files/patch-Makefile
+++ b/audio/ctronome/files/patch-Makefile
@@ -1,7 +1,8 @@
exit--- Makefile.orig 2008-12-18 13:49:32.000000000 +0300
-+++ Makefile 2010-08-18 21:47:01.000000000 +0400
+--- Makefile.orig 2014-09-29 18:48:56 UTC
++++ Makefile
@@ -1,11 +1,11 @@
- VERSION = 0.5.3
+ VERSION = 0.5.5
-CC = gcc
+CC ?= gcc
OBJS = ctronome.o dsp.o routines.o
diff --git a/audio/cutmp3/files/patch-Makefile b/audio/cutmp3/files/patch-Makefile
index 8fb860c58088..01b95c0bda38 100644
--- a/audio/cutmp3/files/patch-Makefile
+++ b/audio/cutmp3/files/patch-Makefile
@@ -1,8 +1,8 @@
---- ./Makefile.orig 2011-05-07 16:02:38.000000000 +0200
-+++ ./Makefile 2014-02-13 13:02:59.627899989 +0100
+--- Makefile.orig 2015-07-13 10:22:29 UTC
++++ Makefile
@@ -1,42 +1,37 @@
NAME=cutmp3
- VERSION=2.0.3
+ VERSION=3.0.1
-PREFIX=/usr
+PREFIX?=/usr/local
BINDIR=${PREFIX}/bin
diff --git a/audio/dagrab/files/patch-Makefile b/audio/dagrab/files/patch-Makefile
index 57b9babe4113..e13d83efb98c 100644
--- a/audio/dagrab/files/patch-Makefile
+++ b/audio/dagrab/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sat Feb 19 15:41:30 2000
-+++ Makefile Fri Apr 21 17:12:20 2000
+--- Makefile.orig 2000-02-19 15:41:30 UTC
++++ Makefile
@@ -1,8 +1,8 @@
-CC=gcc
+#CC=gcc
diff --git a/audio/dagrab/files/patch-dagrab.c b/audio/dagrab/files/patch-dagrab.c
index e61d60eca151..63dabf6cc624 100644
--- a/audio/dagrab/files/patch-dagrab.c
+++ b/audio/dagrab/files/patch-dagrab.c
@@ -1,5 +1,5 @@
---- dagrab.c.orig Sat Feb 19 17:32:46 2000
-+++ dagrab.c Tue Nov 18 00:05:29 2003
+--- dagrab.c.orig 2000-02-19 16:32:46 UTC
++++ dagrab.c
@@ -94,26 +94,21 @@
#include <string.h>
#include <errno.h>
@@ -51,7 +51,7 @@
#define KW_TRACK 0
#define KW_FULLD 1
#define KW_AUTHOR 2
-@@ -206,16 +207,20 @@
+@@ -206,16 +207,20 @@ struct kword kwords[]={
struct Wavefile cd_newave(unsigned size)
{
@@ -82,7 +82,7 @@
return dummy;
}
-@@ -226,16 +231,16 @@
+@@ -226,16 +231,16 @@ char *resttime(int sec)
return buf;
}
@@ -105,7 +105,7 @@
}
void cd_read_audio(int lba,int num,char *buf)
-@@ -244,16 +249,27 @@
+@@ -244,16 +249,27 @@ void cd_read_audio(int lba,int num,char
/*NOTE: if num>CDROM_NBLOCKS_BUFFER as defined in ide_cd.c (8 in linux 2.0.32)
jitter correction may be required inside the block. */
{
@@ -139,7 +139,7 @@
exit(1);
}
}
-@@ -471,7 +487,7 @@
+@@ -471,7 +487,7 @@ int cddb_main(struct cd_trk_list *tl)
DIR *d;
struct dirent *e;
char *id2,*p,*cddb,*loc;
@@ -148,7 +148,7 @@
char id[12];
char *path;
char path2[500];
-@@ -645,10 +661,10 @@
+@@ -645,10 +661,10 @@ void ExpandTempl (char *templ,char *out,
int cd_getinfo(char *cd_dev,struct cd_trk_list *tl)
{
int i;
@@ -162,7 +162,7 @@
fprintf(stderr,"%s: error opening device %s\n",progname,cd_dev);
exit(1);
}
-@@ -656,7 +672,7 @@
+@@ -656,7 +672,7 @@ int cd_getinfo(char *cd_dev,struct cd_tr
fprintf(stderr,"%s: read TOC ioctl failed: %s\n",progname,strerror(errno));
exit(1);
}
@@ -171,7 +171,7 @@
if((tl->starts=(int *)malloc((tl->max-tl->min+2)*sizeof(int)))==NULL){
fprintf(stderr,"%s: list data allocation failed\n",progname);
exit(1);
-@@ -668,21 +684,21 @@
+@@ -668,21 +684,21 @@ int cd_getinfo(char *cd_dev,struct cd_tr
for (i=tl->min;i<=tl->max;i++)
{
@@ -199,7 +199,7 @@
i=cddb_main(tl);
if(i==-1) {
-@@ -796,6 +812,7 @@
+@@ -796,6 +812,7 @@ int cd_read_track(char *basename,int tn,
struct Wavefile header;
int fd,bytes,i,n,q,space;
int bcount, sc, missing, speed = 0, ldp, now;
@@ -207,7 +207,7 @@
if(tn<tl->min || tn>tl->max) return (-1);
space = ((tl->starts[tn-tl->min+1]-tl->starts[tn-tl->min]) *
-@@ -879,8 +896,10 @@
+@@ -879,8 +896,10 @@ int cd_read_track(char *basename,int tn,
d = p1[c];
buf3[c] = ((short)(d&65535) + (short)(d>>16)) >> 1;
}
@@ -220,7 +220,7 @@
fprintf(stderr,"%s: error writing wave file %s: %s\n",
progname,nam,strerror(errno));
exit(1);
-@@ -896,7 +915,17 @@
+@@ -896,7 +915,17 @@ int cd_read_track(char *basename,int tn,
/* dump last bytes */
if (bytes<(tl->starts[tn+1]-tl->starts[tn])*CD_FRAMESIZE_RAW){
n=(tl->starts[tn+1]-tl->starts[tn])*CD_FRAMESIZE_RAW-bytes;
@@ -239,7 +239,7 @@
fprintf(stderr,"%s: error writing wave file %s: %s\n",progname,nam,strerror(errno));
exit(1);
};
-@@ -961,7 +990,7 @@
+@@ -961,7 +990,7 @@ void usage(void)
int main(int ac,char **av)
{
int i,l,disp_TOC=0;
@@ -248,7 +248,7 @@
int all_tracks=0;
struct cd_trk_list tl;
char cd_dev[BLEN+1]=CDDEVICE;
-@@ -969,10 +998,8 @@
+@@ -969,10 +998,8 @@ int main(int ac,char **av)
char filter[BLEN+1] = "";
char path[500];
FILE *f;
diff --git a/audio/deadbeef/files/patch-fft.c b/audio/deadbeef/files/patch-fft.c
index 4f3695ba65f5..f74519cbaed2 100644
--- a/audio/deadbeef/files/patch-fft.c
+++ b/audio/deadbeef/files/patch-fft.c
@@ -1,4 +1,4 @@
---- fft.c.orig 2014-07-12 20:30:07 UTC
+--- fft.c.orig 2016-04-24 21:38:13 UTC
+++ fft.c
@@ -27,6 +27,10 @@
#include <math.h>
diff --git a/audio/deadbeef/files/patch-junklib.c b/audio/deadbeef/files/patch-junklib.c
index 449e212988d9..8a22e41e61b9 100644
--- a/audio/deadbeef/files/patch-junklib.c
+++ b/audio/deadbeef/files/patch-junklib.c
@@ -1,4 +1,4 @@
---- junklib.c.orig 2016-01-02 20:27:39 UTC
+--- junklib.c.orig 2016-04-24 21:38:13 UTC
+++ junklib.c
@@ -33,7 +33,6 @@
#include <string.h>
diff --git a/audio/deadbeef/files/patch-plugins-ffmpeg-Makefile.in b/audio/deadbeef/files/patch-plugins-ffmpeg-Makefile.in
deleted file mode 100644
index 9cc668b14eb6..000000000000
--- a/audio/deadbeef/files/patch-plugins-ffmpeg-Makefile.in
+++ /dev/null
@@ -1,18 +0,0 @@
---- plugins/ffmpeg/Makefile.in.orig 2016-01-31 20:21:50 UTC
-+++ plugins/ffmpeg/Makefile.in
-@@ -166,11 +166,11 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top
- depcomp = $(SHELL) $(top_srcdir)/depcomp
- am__depfiles_maybe = depfiles
- am__mv = mv -f
--COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-+COMPILE = $(CC) $(DEFS) $(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
--LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-+ --mode=compile $(CC) $(DEFS) \
-+ $(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
- AM_V_CC = $(am__v_CC_@AM_V@)
- am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
diff --git a/audio/deadbeef/files/patch-plugins-ffmpeg-ffmpeg.c b/audio/deadbeef/files/patch-plugins-ffmpeg-ffmpeg.c
deleted file mode 100644
index 1faff98b9367..000000000000
--- a/audio/deadbeef/files/patch-plugins-ffmpeg-ffmpeg.c
+++ /dev/null
@@ -1,50 +0,0 @@
---- plugins/ffmpeg/ffmpeg.c.orig 2016-01-24 17:49:33 UTC
-+++ plugins/ffmpeg/ffmpeg.c
-@@ -26,20 +26,11 @@
- #include "../../deadbeef.h"
- #include "../../strdupa.h"
-
--#if !FFMPEG_OLD
--
- #include <libavformat/avformat.h>
- #include <libavcodec/avcodec.h>
- #include <libavutil/avutil.h>
- #include <libavutil/avstring.h>
-
--#else
--
--#include <ffmpeg/avformat.h>
--#include <ffmpeg/avcodec.h>
--#include <ffmpeg/avutil.h>
--#include <ffmpeg/avstring.h>
--
- #define AVERROR_EOF AVERROR(EPIPE)
-
- #if LIBAVFORMAT_VERSION_MAJOR < 53
-@@ -50,8 +41,6 @@
- #define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
- #endif
-
--#endif
--
- #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 6, 0)
- #define av_find_stream_info(ctx) avformat_find_stream_info(ctx,NULL)
- #define avcodec_open(ctx,codec) avcodec_open2(ctx,codec,NULL)
-@@ -254,7 +243,7 @@ ffmpeg_init (DB_fileinfo_t *_info, DB_pl
- _info->fmt.bps = bps;
- _info->fmt.channels = info->ctx->channels;
- _info->fmt.samplerate = samplerate;
-- if (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT || info->ctx->sample_fmt == AV_SAMPLE_FMT_FLTP) {
-+ if (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT) {
- _info->fmt.is_float = 1;
- }
-
-@@ -326,7 +315,7 @@ ffmpeg_read (DB_fileinfo_t *_info, char
- _info->fmt.channels = info->ctx->channels;
- _info->fmt.samplerate = info->ctx->sample_rate;
- _info->fmt.bps = av_get_bits_per_sample_format (info->ctx->sample_fmt);
-- _info->fmt.is_float = (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT || info->ctx->sample_fmt == AV_SAMPLE_FMT_FLTP);
-+ _info->fmt.is_float = (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT);
-
- int samplesize = _info->fmt.channels * _info->fmt.bps / 8;
-
diff --git a/audio/deadbeef/files/patch-plugins_ffmpeg_Makefile.in b/audio/deadbeef/files/patch-plugins_ffmpeg_Makefile.in
new file mode 100644
index 000000000000..3ed8a7896c66
--- /dev/null
+++ b/audio/deadbeef/files/patch-plugins_ffmpeg_Makefile.in
@@ -0,0 +1,18 @@
+--- plugins/ffmpeg/Makefile.in.orig 2016-04-24 21:45:48 UTC
++++ plugins/ffmpeg/Makefile.in
+@@ -109,11 +109,11 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
++COMPILE = $(CC) $(DEFS) $(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
++LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=compile $(CC) $(DEFS) \
++ $(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+ AM_V_CC = $(am__v_CC_@AM_V@)
+ am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
diff --git a/audio/deadbeef/files/patch-plugins_ffmpeg_ffmpeg.c b/audio/deadbeef/files/patch-plugins_ffmpeg_ffmpeg.c
new file mode 100644
index 000000000000..003a3c18b211
--- /dev/null
+++ b/audio/deadbeef/files/patch-plugins_ffmpeg_ffmpeg.c
@@ -0,0 +1,50 @@
+--- plugins/ffmpeg/ffmpeg.c.orig 2016-04-24 21:38:13 UTC
++++ plugins/ffmpeg/ffmpeg.c
+@@ -26,20 +26,11 @@
+ #include "../../deadbeef.h"
+ #include "../../strdupa.h"
+
+-#if !FFMPEG_OLD
+-
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/avutil.h>
+ #include <libavutil/avstring.h>
+
+-#else
+-
+-#include <ffmpeg/avformat.h>
+-#include <ffmpeg/avcodec.h>
+-#include <ffmpeg/avutil.h>
+-#include <ffmpeg/avstring.h>
+-
+ #define AVERROR_EOF AVERROR(EPIPE)
+
+ #if LIBAVFORMAT_VERSION_MAJOR < 53
+@@ -50,8 +41,6 @@
+ #define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
+ #endif
+
+-#endif
+-
+ #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 6, 0)
+ #define av_find_stream_info(ctx) avformat_find_stream_info(ctx,NULL)
+ #define avcodec_open(ctx,codec) avcodec_open2(ctx,codec,NULL)
+@@ -260,7 +249,7 @@ ffmpeg_init (DB_fileinfo_t *_info, DB_pl
+ _info->fmt.bps = bps;
+ _info->fmt.channels = info->ctx->channels;
+ _info->fmt.samplerate = samplerate;
+- if (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT || info->ctx->sample_fmt == AV_SAMPLE_FMT_FLTP) {
++ if (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT) {
+ _info->fmt.is_float = 1;
+ }
+
+@@ -332,7 +321,7 @@ ffmpeg_read (DB_fileinfo_t *_info, char
+ _info->fmt.channels = info->ctx->channels;
+ _info->fmt.samplerate = info->ctx->sample_rate;
+ _info->fmt.bps = av_get_bits_per_sample_format (info->ctx->sample_fmt);
+- _info->fmt.is_float = (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT || info->ctx->sample_fmt == AV_SAMPLE_FMT_FLTP);
++ _info->fmt.is_float = (info->ctx->sample_fmt == AV_SAMPLE_FMT_FLT);
+
+ int samplesize = _info->fmt.channels * _info->fmt.bps / 8;
+
diff --git a/audio/deadbeef/files/patch-plugins_gtkui_Makefile.in b/audio/deadbeef/files/patch-plugins_gtkui_Makefile.in
index 1f0f90ad5a70..3e418218fe1e 100644
--- a/audio/deadbeef/files/patch-plugins_gtkui_Makefile.in
+++ b/audio/deadbeef/files/patch-plugins_gtkui_Makefile.in
@@ -1,6 +1,6 @@
---- plugins/gtkui/Makefile.in.orig 2016-03-02 16:53:16 UTC
+--- plugins/gtkui/Makefile.in.orig 2016-04-24 21:45:49 UTC
+++ plugins/gtkui/Makefile.in
-@@ -305,7 +305,7 @@ am__objects_5 = ddb_gui_GTK3_la-gtkui.lo
+@@ -260,7 +260,7 @@ am__objects_5 = ddb_gui_GTK3_la-gtkui.lo
@HAVE_GTK3_TRUE@am_ddb_gui_GTK3_la_OBJECTS = $(am__objects_7)
ddb_gui_GTK3_la_OBJECTS = $(am_ddb_gui_GTK3_la_OBJECTS)
ddb_gui_GTK3_la_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
diff --git a/audio/decibel-audio-player/files/patch-Makefile b/audio/decibel-audio-player/files/patch-Makefile
index 4fb56f7d7208..c1e38c2df937 100644
--- a/audio/decibel-audio-player/files/patch-Makefile
+++ b/audio/decibel-audio-player/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig 2010-06-27 11:29:12.000000000 +0200
-+++ Makefile 2010-09-17 20:28:10.000000000 +0200
-@@ -8,7 +8,7 @@
+--- Makefile.orig 2011-09-19 10:09:26 UTC
++++ Makefile
+@@ -8,7 +8,7 @@ prefix ?= /usr/local
PREFIX = $(DESTDIR)$(prefix)
BINDIR = $(PREFIX)/bin
@@ -9,9 +9,9 @@
DATADIR = $(PREFIX)/share/decibel-audio-player
SRCDIR = $(DATADIR)/src
PIXDIR = $(DATADIR)/pix
-@@ -20,7 +20,7 @@
+@@ -20,7 +20,7 @@ LOCALEDIR = $(PREFIX)/share/locale
- CONFIGURE_IN = sed -e 's!prefix!$(prefix)!g'
+ CONFIGURE_IN = sed -e 's!prefix!$(PREFIX)!g'
-LANGUAGES = `find locale/ -maxdepth 1 -mindepth 1 -type d -printf "%f "`
+LANGUAGES = `cd locale/ && find . -maxdepth 1 -mindepth 1 -type d | tr -d ./`
diff --git a/audio/decibel-audio-player/files/patch-src__modules__Covers.py b/audio/decibel-audio-player/files/patch-src__modules__Covers.py
deleted file mode 100644
index f0f7a137e3fd..000000000000
--- a/audio/decibel-audio-player/files/patch-src__modules__Covers.py
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/modules/Covers.py.orig 2014-10-07 12:26:08 UTC
-+++ src/modules/Covers.py
-@@ -124,7 +124,7 @@
-
- def generateFullSizeCover(self, inFile, outFile, format):
- """ Resize inFile if needed, and write it to outFile (outFile and inFile may be equal) """
-- import Image
-+ from PIL import Image
-
- try:
- # Open the image
-@@ -144,7 +144,7 @@
-
- def generateThumbnail(self, inFile, outFile, format):
- """ Generate a thumbnail from inFile (e.g., resize it) and write it to outFile (outFile and inFile may be equal) """
-- import Image
-+ from PIL import Image
-
- try:
- # Open the image
diff --git a/audio/decibel-audio-player/files/patch-src_modules_Covers.py b/audio/decibel-audio-player/files/patch-src_modules_Covers.py
new file mode 100644
index 000000000000..47ae9ce907eb
--- /dev/null
+++ b/audio/decibel-audio-player/files/patch-src_modules_Covers.py
@@ -0,0 +1,20 @@
+--- src/modules/Covers.py.orig 2011-09-19 10:09:25 UTC
++++ src/modules/Covers.py
+@@ -124,7 +124,7 @@ class Covers(modules.ThreadedModule):
+
+ def generateFullSizeCover(self, inFile, outFile, format):
+ """ Resize inFile if needed, and write it to outFile (outFile and inFile may be equal) """
+- import Image
++ from PIL import Image
+
+ try:
+ # Open the image
+@@ -144,7 +144,7 @@ class Covers(modules.ThreadedModule):
+
+ def generateThumbnail(self, inFile, outFile, format):
+ """ Generate a thumbnail from inFile (e.g., resize it) and write it to outFile (outFile and inFile may be equal) """
+- import Image
++ from PIL import Image
+
+ try:
+ # Open the image
diff --git a/audio/dekagen/files/patch-dekagen b/audio/dekagen/files/patch-dekagen
index 1c9c6638521d..00daee4cc803 100644
--- a/audio/dekagen/files/patch-dekagen
+++ b/audio/dekagen/files/patch-dekagen
@@ -1,6 +1,6 @@
---- dekagen.orig Sat Jul 19 13:00:19 2003
-+++ dekagen Tue Aug 12 23:02:30 2003
-@@ -42,7 +42,8 @@
+--- dekagen.orig 2004-06-15 21:58:54 UTC
++++ dekagen
+@@ -42,7 +42,8 @@ ID3TOOL='built-in' # ID3 tagging tool (
BITRATE='128' # MP3/Ogg nominal encoding bitrate (KBits)
METHOD='manual' # 'manual' or 'cddb'
XMCDLIB='' # $XMCD_LIBDIR
diff --git a/audio/dream/files/patch-src__linux__pa_shm_ringbuffer.c b/audio/dream/files/patch-src_linux_pa__shm__ringbuffer.c
index c2d2496dbeb6..c2d2496dbeb6 100644
--- a/audio/dream/files/patch-src__linux__pa_shm_ringbuffer.c
+++ b/audio/dream/files/patch-src_linux_pa__shm__ringbuffer.c
diff --git a/audio/dream/files/patch-src_matlib_MatlibStdToolbox.cpp b/audio/dream/files/patch-src_matlib_MatlibStdToolbox.cpp
index 54051f487325..92901770436e 100644
--- a/audio/dream/files/patch-src_matlib_MatlibStdToolbox.cpp
+++ b/audio/dream/files/patch-src_matlib_MatlibStdToolbox.cpp
@@ -1,4 +1,4 @@
---- src/matlib/MatlibStdToolbox.cpp.orig 2016-02-26 02:12:16 UTC
+--- src/matlib/MatlibStdToolbox.cpp.orig 2013-11-11 16:33:40 UTC
+++ src/matlib/MatlibStdToolbox.cpp
@@ -28,11 +28,11 @@
#include "MatlibStdToolbox.h"
diff --git a/audio/dream/files/patch-src__sound__pa_ringbuffer.c b/audio/dream/files/patch-src_sound_pa__ringbuffer.c
index 00debdd6be24..00debdd6be24 100644
--- a/audio/dream/files/patch-src__sound__pa_ringbuffer.c
+++ b/audio/dream/files/patch-src_sound_pa__ringbuffer.c
diff --git a/audio/dtmfdial/files/patch-dial.c b/audio/dtmfdial/files/patch-dial.c
index 4530d6a3327c..7342f45da13c 100644
--- a/audio/dtmfdial/files/patch-dial.c
+++ b/audio/dtmfdial/files/patch-dial.c
@@ -1,5 +1,5 @@
---- dial.c.orig Fri Mar 31 04:44:07 2006
-+++ dial.c Fri Mar 31 04:44:23 2006
+--- dial.c.orig 1998-03-20 16:13:44 UTC
++++ dial.c
@@ -7,10 +7,10 @@
#include <math.h>
#include <stdio.h>
@@ -13,7 +13,7 @@
#define DEBUG(x)
-@@ -130,7 +130,7 @@
+@@ -130,7 +130,7 @@ getvalue(int *arg, int *index, int argc,
++*index;
}
diff --git a/audio/dumb/files/patch-Makefile b/audio/dumb/files/patch-Makefile
index ef6504759578..9a351d03ccac 100644
--- a/audio/dumb/files/patch-Makefile
+++ b/audio/dumb/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2005-08-08 04:18:41.000000000 +0400
-+++ Makefile 2008-06-12 06:27:26.000000000 +0400
+--- Makefile.orig 2005-08-08 00:18:41 UTC
++++ Makefile
@@ -22,7 +22,7 @@
# (Note that this is unable to delete the dumbask
# executable if the configuration is absent.)
@@ -9,7 +9,7 @@
.PHONY: all install uninstall clean veryclean distclean config config-if-necessary make-outdirs
-@@ -36,12 +36,12 @@
+@@ -36,12 +36,12 @@ PHONY_TARGETS := core allegro core-examp
COMMA := ,
ifdef USE_ICC
@@ -25,7 +25,7 @@
endif
endif
AR := ar
-@@ -215,24 +215,21 @@
+@@ -215,24 +215,21 @@ make-outdirs:
ifdef USE_ICC
WFLAGS := -Wall -DDUMB_DECLARE_DEPRECATED
WFLAGS_ALLEGRO :=
@@ -55,7 +55,7 @@
LDFLAGS := -s
-@@ -251,8 +248,8 @@
+@@ -251,8 +248,8 @@ CORE_LIB_FILE_DEBUG := $(LIBDIR)/libdumb
ALLEGRO_LIB_FILE_DEBUG := $(LIBDIR)/libaldmd.a
@@ -66,7 +66,7 @@
core-examples: $(CORE_EXAMPLES_EXE)
allegro-examples: $(ALLEGRO_EXAMPLES_EXE)
-@@ -263,11 +260,9 @@
+@@ -263,11 +260,9 @@ allegro-headers:
install-core: core
$(call COPY,$(CORE_LIB_FILE_RELEASE),$(LIB_INSTALL_PATH))
@@ -78,7 +78,7 @@
ifeq "$(COMSPEC)" ""
install-core-examples: core-examples
-@@ -321,12 +316,6 @@
+@@ -321,12 +316,6 @@ CORE_LIB_FILE := $(LIBDIR)/libdumb.a
ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmb.a
include make/Makefile.inc
diff --git a/audio/ecasound/files/patch-ecasound_eca-curses.cpp b/audio/ecasound/files/patch-ecasound_eca-curses.cpp
index 00befbf3a6ea..325eb2addb01 100644
--- a/audio/ecasound/files/patch-ecasound_eca-curses.cpp
+++ b/audio/ecasound/files/patch-ecasound_eca-curses.cpp
@@ -1,4 +1,4 @@
---- ecasound/eca-curses.cpp.orig 2009-04-11 09:44:06.000000000 +0000
+--- ecasound/eca-curses.cpp.orig 2009-04-11 09:44:06 UTC
+++ ecasound/eca-curses.cpp
@@ -27,6 +27,7 @@
#include <cstdlib>
diff --git a/audio/epos-devel/files/patch-configure b/audio/epos-devel/files/patch-configure
index 9698d407bee8..50fba6a53b5a 100644
--- a/audio/epos-devel/files/patch-configure
+++ b/audio/epos-devel/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig
+--- configure.orig 2006-03-24 00:05:11 UTC
+++ configure
-@@ -14021,9 +14021,9 @@
+@@ -14021,9 +14021,9 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_SOCKET_H
diff --git a/audio/epos-devel/files/patch-src__nnet__map.h b/audio/epos-devel/files/patch-src__nnet__map.h
deleted file mode 100644
index 17fb6bdf7d8b..000000000000
--- a/audio/epos-devel/files/patch-src__nnet__map.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/nnet/map.h.orig
-+++ src/nnet/map.h
-@@ -25,7 +25,7 @@
- else {
- TData x;
- x.first() = key;
-- return insert (x)->second();
-+ return this->insert (x)->second();
- }
- }
-
diff --git a/audio/epos-devel/files/patch-src__nnet__neural_parse.yy b/audio/epos-devel/files/patch-src__nnet__neural_parse.yy
deleted file mode 100644
index 6aa31356965e..000000000000
--- a/audio/epos-devel/files/patch-src__nnet__neural_parse.yy
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/nnet/neural_parse.yy.orig
-+++ src/nnet/neural_parse.yy
-@@ -104,7 +104,7 @@ make_tree (TTypedValue val = TTypedValue
- /* SYMBOLS */
- /* * * * * * * * * * * * * * * * * * * * * * * * * * */
-
--%token_table
-+//%token_table -- unsupported by the base yacc(1) on some FreeBSD versions
- //%raw bison nefunguje s raw! (aspon yylex ne)
-
- %union {
-@@ -255,7 +255,7 @@ unit_level: string_exp
-
- int yyerror (char *s)
- {
-- shriek (812, fmt ("BISON:yyerror:bison_nnet parser: bison_row %i (not counting empty rows) '%s' is erroneous. %s\n", row_num, bison_row_buf, s));
-+ shriek (812, fmt ("BISON:yyerror:bison_nnet parser: bison_row %i (not counting empty rows) '%s' is erroneous. %s\n", row_num, bison_row_buf.c_str(), s));
- return -1;
- }
-
diff --git a/audio/epos-devel/files/patch-src_epos.h b/audio/epos-devel/files/patch-src_epos.h
index 0e2e909242e0..bab867bd93aa 100644
--- a/audio/epos-devel/files/patch-src_epos.h
+++ b/audio/epos-devel/files/patch-src_epos.h
@@ -1,4 +1,4 @@
---- src/epos.h.orig
+--- src/epos.h.orig 2005-04-15 00:26:11 UTC
+++ src/epos.h
@@ -43,6 +43,7 @@
#include <rx.h>
diff --git a/audio/epos-devel/files/patch-src_nnet_map.h b/audio/epos-devel/files/patch-src_nnet_map.h
new file mode 100644
index 000000000000..f63601c4ff6c
--- /dev/null
+++ b/audio/epos-devel/files/patch-src_nnet_map.h
@@ -0,0 +1,11 @@
+--- src/nnet/map.h.orig 2004-08-30 22:32:41 UTC
++++ src/nnet/map.h
+@@ -25,7 +25,7 @@ T2 & TMap<T1,T2>::operator [] (const T1
+ else {
+ TData x;
+ x.first() = key;
+- return insert (x)->second();
++ return this->insert (x)->second();
+ }
+ }
+
diff --git a/audio/epos-devel/files/patch-src_nnet_neural__parse.yy b/audio/epos-devel/files/patch-src_nnet_neural__parse.yy
new file mode 100644
index 000000000000..11f20eb0a72c
--- /dev/null
+++ b/audio/epos-devel/files/patch-src_nnet_neural__parse.yy
@@ -0,0 +1,20 @@
+--- src/nnet/neural_parse.yy.orig 2004-02-15 18:19:09 UTC
++++ src/nnet/neural_parse.yy
+@@ -104,7 +104,7 @@ make_tree (TTypedValue val = TTypedValue
+ /* SYMBOLS */
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+-%token_table
++//%token_table -- unsupported by the base yacc(1) on some FreeBSD versions
+ //%raw bison nefunguje s raw! (aspon yylex ne)
+
+ %union {
+@@ -255,7 +255,7 @@ unit_level: string_exp
+
+ int yyerror (char *s)
+ {
+- shriek (812, fmt ("BISON:yyerror:bison_nnet parser: bison_row %i (not counting empty rows) '%s' is erroneous. %s\n", row_num, bison_row_buf, s));
++ shriek (812, fmt ("BISON:yyerror:bison_nnet parser: bison_row %i (not counting empty rows) '%s' is erroneous. %s\n", row_num, bison_row_buf.c_str(), s));
+ return -1;
+ }
+
diff --git a/audio/esound/files/patch-audio_oss.c b/audio/esound/files/patch-audio__oss.c
index ba70a323ca36..ba70a323ca36 100644
--- a/audio/esound/files/patch-audio_oss.c
+++ b/audio/esound/files/patch-audio__oss.c
diff --git a/audio/espeak/files/patch-src__Makefile b/audio/espeak/files/patch-src_Makefile
index 48f99b1acd64..48f99b1acd64 100644
--- a/audio/espeak/files/patch-src__Makefile
+++ b/audio/espeak/files/patch-src_Makefile
diff --git a/audio/espeak/files/patch-src__speech.h b/audio/espeak/files/patch-src__speech.h
deleted file mode 100644
index 8949bfc66fef..000000000000
--- a/audio/espeak/files/patch-src__speech.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/speech.h.orig 2011-03-15 15:01:33.000000000 +0100
-+++ ./src/speech.h 2011-03-18 10:12:28.000000000 +0100
-@@ -57,7 +57,7 @@
-
- // will look for espeak_data directory here, and also in user's home directory
- #ifndef PATH_ESPEAK_DATA
-- #define PATH_ESPEAK_DATA "/usr/share/espeak-data"
-+ #define PATH_ESPEAK_DATA "%%DATADIR%%/espeak-data"
- #endif
-
- typedef unsigned short USHORT;
diff --git a/audio/espeak/files/patch-src_speech.h b/audio/espeak/files/patch-src_speech.h
new file mode 100644
index 000000000000..94c588871169
--- /dev/null
+++ b/audio/espeak/files/patch-src_speech.h
@@ -0,0 +1,11 @@
+--- src/speech.h.orig 2014-03-04 16:47:15 UTC
++++ src/speech.h
+@@ -58,7 +58,7 @@
+
+ // will look for espeak_data directory here, and also in user's home directory
+ #ifndef PATH_ESPEAK_DATA
+- #define PATH_ESPEAK_DATA "/usr/share/espeak-data"
++ #define PATH_ESPEAK_DATA "%%DATADIR%%/espeak-data"
+ #endif
+
+ typedef unsigned short USHORT;
diff --git a/audio/extace/files/patch-src__color_win.c b/audio/extace/files/patch-src__color_win.c
deleted file mode 100644
index b6b743ad250e..000000000000
--- a/audio/extace/files/patch-src__color_win.c
+++ /dev/null
@@ -1,32 +0,0 @@
---- src/color_win.c.orig Wed Feb 26 01:22:19 2003
-+++ src/color_win.c Fri May 23 18:26:18 2003
-@@ -579,12 +579,12 @@
- button = gtk_button_new_with_label("Set Color");
- gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
-- (GtkSignalFunc)color_button, (gpointer)SET_COLOR);
-+ (GtkSignalFunc)color_button, (gint)SET_COLOR);
-
- button = gtk_button_new_with_label("Close");
- gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
-- (GtkSignalFunc)color_button, (gpointer)CLOSE);
-+ (GtkSignalFunc)color_button, (gint)CLOSE);
-
- hbox = gtk_hbox_new(TRUE,0);
- gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
-@@ -592,12 +592,12 @@
- button = gtk_button_new_with_label("Save");
- gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
-- (GtkSignalFunc)color_button, (gpointer)SAVE);
-+ (GtkSignalFunc)color_button, (gint)SAVE);
-
- button = gtk_button_new_with_label("Load");
- gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
-- (GtkSignalFunc)color_button, (gpointer)LOAD);
-+ (GtkSignalFunc)color_button, (gint)LOAD);
-
- gtk_widget_show_all(grad_win);
- }
diff --git a/audio/extace/files/patch-src_color__win.c b/audio/extace/files/patch-src_color__win.c
new file mode 100644
index 000000000000..a35cc40ba8d2
--- /dev/null
+++ b/audio/extace/files/patch-src_color__win.c
@@ -0,0 +1,32 @@
+--- src/color_win.c.orig 2008-01-22 23:59:52 UTC
++++ src/color_win.c
+@@ -620,12 +620,12 @@ void grad_win_create()
+ button = gtk_button_new_with_label("Set Color");
+ gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+- (GtkSignalFunc)color_button, (gpointer)SET_COLOR);
++ (GtkSignalFunc)color_button, (gint)SET_COLOR);
+
+ button = gtk_button_new_with_label("Close");
+ gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+- (GtkSignalFunc)color_button, (gpointer)CLOSE);
++ (GtkSignalFunc)color_button, (gint)CLOSE);
+
+ hbox = gtk_hbox_new(TRUE,0);
+ gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
+@@ -633,12 +633,12 @@ void grad_win_create()
+ button = gtk_button_new_with_label("Save");
+ gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+- (GtkSignalFunc)color_button, (gpointer)SAVE);
++ (GtkSignalFunc)color_button, (gint)SAVE);
+
+ button = gtk_button_new_with_label("Load");
+ gtk_box_pack_start(GTK_BOX(hbox),button,TRUE,TRUE,0);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+- (GtkSignalFunc)color_button, (gpointer)LOAD);
++ (GtkSignalFunc)color_button, (gint)LOAD);
+
+ gtk_widget_show_all(grad_win);
+ }
diff --git a/audio/faac/files/patch-configure.in b/audio/faac/files/patch-configure.in
index 84197eadf8ee..4bcd4d66738e 100644
--- a/audio/faac/files/patch-configure.in
+++ b/audio/faac/files/patch-configure.in
@@ -1,5 +1,5 @@
---- configure.in.orig 2010-08-18 15:41:30.584845747 +0300
-+++ configure.in 2010-08-18 15:42:51.184443581 +0300
+--- configure.in.orig 2009-02-05 00:55:38 UTC
++++ configure.in
@@ -1,7 +1,7 @@
AC_PREREQ(2.50)
AC_INIT(FAAC, 1.28, faac-dev@lists.sourceforge.net)
diff --git a/audio/faac/files/patch-frontend_Makefile.am b/audio/faac/files/patch-frontend_Makefile.am
index 56fe905cd48d..c49d149144fa 100644
--- a/audio/faac/files/patch-frontend_Makefile.am
+++ b/audio/faac/files/patch-frontend_Makefile.am
@@ -1,5 +1,5 @@
---- frontend/Makefile.am.orig 2010-08-18 15:43:04.246728673 +0300
-+++ frontend/Makefile.am 2010-08-18 15:45:44.922966543 +0300
+--- frontend/Makefile.am.orig 2008-12-16 00:56:00 UTC
++++ frontend/Makefile.am
@@ -7,6 +7,11 @@ if WITH_MP4V2
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4v2
LDADD = $(top_builddir)/libfaac/libfaac.la $(top_srcdir)/common/mp4v2/libmp4v2.a -lm -lstdc++
diff --git a/audio/faad/files/patch-frontend_main.c b/audio/faad/files/patch-frontend_main.c
index 3f06e3d08a97..6050cc55ad73 100644
--- a/audio/faad/files/patch-frontend_main.c
+++ b/audio/faad/files/patch-frontend_main.c
@@ -1,6 +1,6 @@
---- frontend/main.c.orig
+--- frontend/main.c.orig 2008-09-22 17:55:09 UTC
+++ frontend/main.c
-@@ -137,6 +137,31 @@
+@@ -137,6 +137,31 @@ static void advance_buffer(aac_buffer *b
b->bytes_into_buffer = 0;
}
@@ -32,7 +32,7 @@
static int adts_sample_rates[] = {96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000,7350,0,0,0};
static int adts_parse(aac_buffer *b, int *bitrate, float *length)
-@@ -424,6 +449,8 @@
+@@ -424,6 +449,8 @@ static int decodeAACfile(char *aacfile,
float length = 0;
int first_time = 1;
@@ -41,7 +41,7 @@
aac_buffer b;
-@@ -439,17 +466,39 @@
+@@ -439,17 +466,39 @@ static int decodeAACfile(char *aacfile,
}
}
@@ -89,7 +89,7 @@
if (!(b.buffer = (unsigned char*)malloc(FAAD_MIN_STREAMSIZE*MAX_CHANNELS)))
{
-@@ -494,19 +543,39 @@
+@@ -494,19 +543,39 @@ static int decodeAACfile(char *aacfile,
/* get AAC infos for printing */
header_type = 0;
@@ -139,7 +139,7 @@
header_type = 1;
} else if (memcmp(b.buffer, "ADIF", 4) == 0) {
-@@ -538,7 +607,8 @@
+@@ -538,7 +607,8 @@ static int decodeAACfile(char *aacfile,
if (b.buffer)
free(b.buffer);
NeAACDecClose(hDecoder);
@@ -149,7 +149,7 @@
return 1;
}
advance_buffer(&b, bread);
-@@ -564,7 +634,8 @@
+@@ -564,7 +634,8 @@ static int decodeAACfile(char *aacfile,
if (infoOnly)
{
NeAACDecClose(hDecoder);
@@ -159,7 +159,7 @@
if (b.buffer)
free(b.buffer);
return 0;
-@@ -621,7 +692,8 @@
+@@ -621,7 +692,8 @@ static int decodeAACfile(char *aacfile,
if (b.buffer)
free(b.buffer);
NeAACDecClose(hDecoder);
@@ -169,7 +169,7 @@
return 0;
}
} else {
-@@ -662,7 +734,8 @@
+@@ -662,7 +734,8 @@ static int decodeAACfile(char *aacfile,
fclose(adtsFile);
}
@@ -179,7 +179,7 @@
if (!first_time && !adts_out)
close_audio_file(aufile);
-@@ -750,6 +823,11 @@
+@@ -750,6 +823,11 @@ static int decodeMP4file(char *mp4file,
/* initialise the callback structure */
mp4ff_callback_t *mp4cb = malloc(sizeof(mp4ff_callback_t));
@@ -191,7 +191,7 @@
mp4File = fopen(mp4file, "rb");
mp4cb->read = read_callback;
mp4cb->seek = seek_callback;
-@@ -1016,6 +1094,7 @@
+@@ -1016,6 +1094,7 @@ int main(int argc, char *argv[])
int result;
int infoOnly = 0;
int writeToStdio = 0;
@@ -199,7 +199,7 @@
int object_type = LC;
int def_srate = 0;
int downMatrix = 0;
-@@ -1229,15 +1308,30 @@
+@@ -1229,15 +1308,30 @@ int main(int argc, char *argv[])
}
/* check for mp4 file */
@@ -237,7 +237,7 @@
if (header[4] == 'f' && header[5] == 't' && header[6] == 'y' && header[7] == 'p')
mp4file = 1;
-@@ -1246,6 +1340,18 @@
+@@ -1246,6 +1340,18 @@ int main(int argc, char *argv[])
result = decodeMP4file(aacFileName, audioFileName, adtsFileName, writeToStdio,
outputFormat, format, downMatrix, noGapless, infoOnly, adts_out, &length);
} else {
diff --git a/audio/faad/files/patch-libfaad_cfft.c b/audio/faad/files/patch-libfaad_cfft.c
index 378efde77805..59c50990578f 100644
--- a/audio/faad/files/patch-libfaad_cfft.c
+++ b/audio/faad/files/patch-libfaad_cfft.c
@@ -1,5 +1,5 @@
---- libfaad/cfft.c.orig 2009-03-24 23:36:45.000000000 -0400
-+++ libfaad/cfft.c 2009-03-24 23:37:25.000000000 -0400
+--- libfaad/cfft.c.orig 2007-11-01 12:33:29 UTC
++++ libfaad/cfft.c
@@ -60,8 +60,8 @@ static void passf4neg(const uint16_t ido
static void passf5(const uint16_t ido, const uint16_t l1, const complex_t *cc, complex_t *ch,
const complex_t *wa1, const complex_t *wa2, const complex_t *wa3,
diff --git a/audio/fapg/files/patch-fapg.c b/audio/fapg/files/patch-fapg.c
index f2489153136d..037c2601855f 100644
--- a/audio/fapg/files/patch-fapg.c
+++ b/audio/fapg/files/patch-fapg.c
@@ -1,5 +1,5 @@
---- fapg.c 2015-02-02 13:27:58.000000000 -0500
-+++ fapg.c 2015-02-03 09:47:00.000000000 -0500
+--- fapg.c.orig 2015-02-02 18:27:58 UTC
++++ fapg.c
@@ -57,27 +57,27 @@
int debug = 0;
@@ -40,7 +40,7 @@
int duration;
#define MP2ENC 1
#define MP3ENC 2
-@@ -87,7 +87,7 @@
+@@ -87,7 +87,7 @@ int duration;
#define WAVENC 6
#define WMAENC 7
@@ -49,7 +49,7 @@
"audio/mpeg", "audio/mpeg",
"audio/mpeg", "audio/mpeg",
"audio/ogg-vorbis", "audio/x-wav",
-@@ -95,7 +95,7 @@
+@@ -95,7 +95,7 @@ char *magic[] = { NULL,
NULL
};
@@ -58,7 +58,7 @@
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 70, 35, 36, 37, 38, 39, 40, 41, 82, 43, 44, 45, 46, 47,
-@@ -126,7 +126,7 @@
+@@ -126,7 +126,7 @@ unsigned char unix2dos[] =
unsigned char *basemap;
unsigned char *winorunix;
@@ -67,7 +67,7 @@
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
-@@ -160,7 +160,7 @@
+@@ -160,7 +160,7 @@ unsigned char one2one[] =
248, 249, 250, 251, 252, 253, 254, 255
}; /* identical mapping */
@@ -76,7 +76,7 @@
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
-@@ -194,7 +194,7 @@
+@@ -194,7 +194,7 @@ unsigned char noand[256] =
248, 249, 250, 251, 252, 253, 254, 255
}; /* only '&' is mapped to '+' */
@@ -85,7 +85,7 @@
"%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07",
"%08", "%09", "%0a", "%0b", "%0c", "%0d", "%0e", "%0f",
"%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17",
-@@ -308,7 +308,7 @@
+@@ -308,7 +308,7 @@ void txxputnameoffset(const char *c)
int pos = 0;
int cnt = 0;
char b;
@@ -94,7 +94,7 @@
prefx = prefix;
-@@ -344,7 +344,7 @@
+@@ -344,7 +344,7 @@ void txxputstr(const char *c)
{
int cnt = 0;
int pos;
@@ -103,7 +103,7 @@
txxputnameoffset(c);
-@@ -669,7 +669,7 @@
+@@ -669,7 +669,7 @@ void parse_options(int argc, char **argv
}
}
@@ -112,7 +112,7 @@
{
int bitrates[2][3][15] =
{ {{0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384,
-@@ -683,7 +683,7 @@
+@@ -683,7 +683,7 @@ void parse_mp3(unsigned char *file)
{0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160}}
};
FILE *fic;
@@ -121,7 +121,7 @@
int lus;
genre = 0;
-@@ -773,7 +773,7 @@
+@@ -773,7 +773,7 @@ void parse_mp3(unsigned char *file)
}
while(c < buffer + lus - 10) {
@@ -130,7 +130,7 @@
int version;
int lay;
int bitrate_index;
-@@ -823,10 +823,10 @@
+@@ -823,10 +823,10 @@ void parse_mp3(unsigned char *file)
fclose(fic);
}
@@ -143,7 +143,7 @@
int lus;
int sample_rate;
int samples;
-@@ -911,10 +911,10 @@
+@@ -911,10 +911,10 @@ void parse_ogg(unsigned char *file)
fclose(fic);
}
@@ -156,7 +156,7 @@
int lus;
int sample_rates[4] = { 44100, 48000, 37800, 32000 };
int frame_count;
-@@ -1253,9 +1253,9 @@
+@@ -1253,9 +1253,9 @@ char * xml_escape_malloc(const char * in
}
#endif
@@ -168,7 +168,7 @@
int j, encoding = 0;
for(j = 0; j < 5; j++)
-@@ -1457,11 +1457,11 @@
+@@ -1457,11 +1457,11 @@ void parse_file(unsigned char *newpath,
}
}
@@ -182,7 +182,7 @@
struct stat infos;
if(debug)
-@@ -1520,8 +1520,7 @@
+@@ -1520,8 +1520,7 @@ int main(int argc, char **argv)
break;
case FORMAT_HTML:
printf
@@ -192,7 +192,7 @@
"</title>%s<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />%s<style type=\"text/css\">%s<!--%s%sbody,td,tr {%s font-family: Verdana, Arial, Helvetica, sans-serif;%s font-size: 12px;%s color: #000000;%s}%s%sbody {%s background: #ffffff;%s}%s%sth {%s text-align: center;%s background: #ffcccc;%s padding-left: 15px;%s padding-right: 15px;%s border: 1px #dd8888 solid;%s}%s%std {%s text-align: center;%s background: #eeeeee;%s padding-left: 15px;%s padding-right: 15px;%s border: 1px #cccccc solid;%s}%s%sh1 {%s font-size: 25px;%s}%s%sp {%s font-size: 10px;%s}%s%sa {%s color: #993333;%s text-decoration: none;%s}%s%sa:hover {%s text-decoration: underline;%s}%s%s-->%s</style>%s</head>%s%s<body>%s%s<h1>Playlist</h1>%s%s<table>%s<tr><th>Entry</th><th>Artist</th><th>Title</th><th>Length</th></tr>%s",
eol, eol, eol, eol, eol, eol, eol, eol, eol, eol, eol, eol,
eol, eol, eol, eol, eol, eol, eol, eol, eol, eol, eol, eol,
-@@ -1538,10 +1537,8 @@
+@@ -1538,10 +1537,8 @@ int main(int argc, char **argv)
strftime(timebuffer, 255, "%a %d %b %Y %T %z",
localtime(&zeit));
printf
@@ -205,7 +205,7 @@
"</generator>%s\t<image>%s\t\t<url>%s/podcast.jpg</url>%s\t\t<title>Server Logo</title>%s\t\t<link>%s</link>%s\t\t<description>Feed provided by FAPG. Click to visit.</description>%s\t</image>%s\t<itunes:owner>%s\t\t<itunes:name>Admin %s</itunes:name>%s\t\t<itunes:email>podcast@%s</itunes:email>%s\t</itunes:owner>%s\t<category>Various</category>%s\t<itunes:subtitle>Directory Tree %s</itunes:subtitle>%s\t<itunes:author>%s</itunes:author>%s\t<copyright>unknown</copyright>%s\t<language>%s</language>%s\t<itunes:explicit>No</itunes:explicit>%s\t<ttl>1800</ttl>%s",
eol, eol, eol, eol, hostname, dir, argv[optind], eol,
prefix, eol, base, eol, prefix, eol, timebuffer, eol, eol,
-@@ -1566,7 +1563,7 @@
+@@ -1566,7 +1563,7 @@ int main(int argc, char **argv)
#ifdef HAVE_LIBURIPARSER
case FORMAT_XSPF:
printf("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
@@ -214,7 +214,7 @@
"<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\">\n"
"<trackList>\n");
break;
-@@ -1581,7 +1578,7 @@
+@@ -1581,7 +1578,7 @@ int main(int argc, char **argv)
sprintf(pwd, "%s/", pwd_source);
if(fromstdin) {
@@ -223,7 +223,7 @@
int i;
while(fgets(path, PATH_MAX, stdin)) {
for(i = 0; i < PATH_MAX; i++)
-@@ -1621,7 +1618,7 @@
+@@ -1621,7 +1618,7 @@ int main(int argc, char **argv)
case FORMAT_HTML:
printf
("</table>%s%s<p>Playlist generated by <a href=\"http://royale.zerezo.com/fapg/\">FAPG "
diff --git a/audio/fcplay/files/patch-AudioDriver.h b/audio/fcplay/files/patch-AudioDriver.h
index 9c9bc3f692d5..afc0c009d9c7 100644
--- a/audio/fcplay/files/patch-AudioDriver.h
+++ b/audio/fcplay/files/patch-AudioDriver.h
@@ -1,5 +1,5 @@
---- AudioDriver.h.orig Mon Mar 3 21:47:00 1997
-+++ AudioDriver.h Sun May 18 11:12:48 2003
+--- AudioDriver.h.orig 1997-03-03 21:47:00 UTC
++++ AudioDriver.h
@@ -7,14 +7,15 @@
#include <string.h>
#include <sys/ioctl.h>
diff --git a/audio/fcplay/files/patch-Dump.h b/audio/fcplay/files/patch-Dump.h
index 743838a73bcd..c440a1442bf9 100644
--- a/audio/fcplay/files/patch-Dump.h
+++ b/audio/fcplay/files/patch-Dump.h
@@ -1,5 +1,5 @@
---- Dump.h.orig Mon Mar 3 22:47:00 1997
-+++ Dump.h Tue Jun 6 20:05:48 2006
+--- Dump.h.orig 1997-03-03 21:47:00 UTC
++++ Dump.h
@@ -2,8 +2,9 @@
#define DUMP_H
diff --git a/audio/fcplay/files/patch-Main.cpp b/audio/fcplay/files/patch-Main.cpp
index 81e7437579ca..05fd9ccda137 100644
--- a/audio/fcplay/files/patch-Main.cpp
+++ b/audio/fcplay/files/patch-Main.cpp
@@ -1,5 +1,5 @@
---- Main.cpp.orig Mon Mar 3 22:47:00 1997
-+++ Main.cpp Tue Jun 6 21:05:07 2006
+--- Main.cpp.orig 1997-03-03 21:47:00 UTC
++++ Main.cpp
@@ -1,8 +1,11 @@
-#include <fstream.h>
+#include <fstream>
@@ -14,7 +14,7 @@
#include "FC.h"
#include "MyTypes.h"
-@@ -95,11 +98,7 @@
+@@ -95,11 +98,7 @@ int main(int argc, char *argv[])
streampos fileLen = 0;
// open binary input file stream at end of file
@@ -27,7 +27,7 @@
// As a replacement for !is_open(), bad() and the NOT-operator don't seem
// to work on all systems.
#if defined(DONT_HAVE_IS_OPEN)
-@@ -119,20 +118,20 @@
+@@ -119,20 +118,20 @@ int main(int argc, char *argv[])
fileLen = (udword)myIn.tellg();
#endif
fileLen = myIn.tellg();
@@ -51,7 +51,7 @@
cout << "." << flush;
}
cout << endl << flush;
-@@ -147,7 +146,7 @@
+@@ -147,7 +146,7 @@ int main(int argc, char *argv[])
extern udword pcmFreq;
pcmFreq = 44100;
diff --git a/audio/fcplay/files/patch-POINTER b/audio/fcplay/files/patch-POINTER
index ff78b8fb0f9e..425ba30527c0 100644
--- a/audio/fcplay/files/patch-POINTER
+++ b/audio/fcplay/files/patch-POINTER
@@ -1,5 +1,5 @@
---- POINTER.old Sun Sep 17 22:27:38 2000
-+++ POINTER Sun Sep 17 22:27:45 2000
+--- POINTER.orig 1997-03-03 21:47:00 UTC
++++ POINTER
@@ -1,3 +1,3 @@
http://www.geocities.com/SiliconValley/Lakes/5147/mod/
diff --git a/audio/fcplay/files/patch-SmartPtr.h b/audio/fcplay/files/patch-SmartPtr.h
index adc6549afc34..c21b728763ed 100644
--- a/audio/fcplay/files/patch-SmartPtr.h
+++ b/audio/fcplay/files/patch-SmartPtr.h
@@ -1,6 +1,6 @@
---- SmartPtr.h.orig Tue Jun 6 20:00:27 2006
-+++ SmartPtr.h Tue Jun 6 20:00:38 2006
-@@ -207,16 +207,16 @@
+--- SmartPtr.h.orig 1998-11-30 19:10:00 UTC
++++ SmartPtr.h
+@@ -207,16 +207,16 @@ class smartPtr : public smartPtrBase<T>
{
if ( bufferLen >= 1 )
{
diff --git a/audio/fcplay/files/patch-configure b/audio/fcplay/files/patch-configure
index 4f5069de86c4..f9edfc16f53f 100644
--- a/audio/fcplay/files/patch-configure
+++ b/audio/fcplay/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Thu May 28 04:08:00 1998
-+++ configure Tue Dec 12 02:51:01 2000
-@@ -1631,41 +1631,6 @@
+--- configure.orig 1998-05-27 19:08:00 UTC
++++ configure
+@@ -1631,41 +1631,6 @@ fi
fi;
@@ -42,7 +42,7 @@
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-@@ -2297,4 +2262,3 @@
+@@ -2297,4 +2262,3 @@ rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
diff --git a/audio/festalon/files/patch-src__cputest.c b/audio/festalon/files/patch-src__cputest.c
deleted file mode 100644
index 313a06a7d842..000000000000
--- a/audio/festalon/files/patch-src__cputest.c
+++ /dev/null
@@ -1,48 +0,0 @@
---- ./src/cputest.c.orig 2005-02-28 01:26:01.000000000 +0100
-+++ ./src/cputest.c 2010-09-28 11:21:52.000000000 +0200
-@@ -31,18 +31,33 @@
- {
- #ifdef ARCH_X86
- int rval;
-+#ifdef __x86_64__
-+ int64_t eax, ebx, ecx, edx;
-+#else
- int eax, ebx, ecx, edx;
-+#endif
- char vendor[13] = "UnknownVndr";
-
- __asm__ __volatile__ (
- /* See if CPUID instruction is supported ... */
- /* ... Get copies of EFLAGS into eax and ecx */
-- "pushf\n\t"
- #ifdef __x86_64__
-+ "pushf\n\t"
-+ "pop %0\n\t"
-+ "mov %0, %1\n\t"
-+
-+ /* ... Toggle the ID bit in one copy and store */
-+ /* to the EFLAGS reg */
-+ "xor $0x200000, %0\n\t"
-+ "push %0\n\t"
-+ "popf\n\t"
-+
-+ /* ... Get the (hopefully modified) EFLAGS */
-+ "pushf\n\t"
- "pop %0\n\t"
- #else
-+ "pushf\n\t"
- "popl %0\n\t"
--#endif
- "movl %0, %1\n\t"
-
- /* ... Toggle the ID bit in one copy and store */
-@@ -53,9 +68,6 @@
-
- /* ... Get the (hopefully modified) EFLAGS */
- "pushf\n\t"
--#ifdef __x86_64__
-- "pop %0\n\t"
--#else
- "popl %0\n\t"
- #endif
- : "=a" (eax), "=c" (ecx)
diff --git a/audio/festalon/files/patch-src__filter.h b/audio/festalon/files/patch-src__filter.h
deleted file mode 100644
index d8796d68c072..000000000000
--- a/audio/festalon/files/patch-src__filter.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/filter.h.orig 2010-09-28 11:22:11.000000000 +0200
-+++ ./src/filter.h 2010-09-28 11:22:33.000000000 +0200
-@@ -20,6 +20,8 @@
-
- #ifdef ARCH_X86
- int16 coeffs_i16[NCOEFFS] __attribute__ ((aligned (8)));
-+ #elif __x86_64__
-+ int16 coeffs_i16[NCOEFFS] __attribute__ ((aligned (8)));
- #elif ARCH_POWERPC
- int16 coeffs_i16[NCOEFFS] __attribute__ ((aligned (16)));
- #endif
diff --git a/audio/festalon/files/patch-src_cputest.c b/audio/festalon/files/patch-src_cputest.c
new file mode 100644
index 000000000000..c124c1c9eae9
--- /dev/null
+++ b/audio/festalon/files/patch-src_cputest.c
@@ -0,0 +1,48 @@
+--- src/cputest.c.orig 2005-02-28 00:26:01 UTC
++++ src/cputest.c
+@@ -31,18 +31,33 @@ static int mm_support(void)
+ {
+ #ifdef ARCH_X86
+ int rval;
++#ifdef __x86_64__
++ int64_t eax, ebx, ecx, edx;
++#else
+ int eax, ebx, ecx, edx;
++#endif
+ char vendor[13] = "UnknownVndr";
+
+ __asm__ __volatile__ (
+ /* See if CPUID instruction is supported ... */
+ /* ... Get copies of EFLAGS into eax and ecx */
+- "pushf\n\t"
+ #ifdef __x86_64__
++ "pushf\n\t"
++ "pop %0\n\t"
++ "mov %0, %1\n\t"
++
++ /* ... Toggle the ID bit in one copy and store */
++ /* to the EFLAGS reg */
++ "xor $0x200000, %0\n\t"
++ "push %0\n\t"
++ "popf\n\t"
++
++ /* ... Get the (hopefully modified) EFLAGS */
++ "pushf\n\t"
+ "pop %0\n\t"
+ #else
++ "pushf\n\t"
+ "popl %0\n\t"
+-#endif
+ "movl %0, %1\n\t"
+
+ /* ... Toggle the ID bit in one copy and store */
+@@ -53,9 +68,6 @@ static int mm_support(void)
+
+ /* ... Get the (hopefully modified) EFLAGS */
+ "pushf\n\t"
+-#ifdef __x86_64__
+- "pop %0\n\t"
+-#else
+ "popl %0\n\t"
+ #endif
+ : "=a" (eax), "=c" (ecx)
diff --git a/audio/festalon/files/patch-src_filter.h b/audio/festalon/files/patch-src_filter.h
new file mode 100644
index 000000000000..4087949be93c
--- /dev/null
+++ b/audio/festalon/files/patch-src_filter.h
@@ -0,0 +1,11 @@
+--- src/filter.h.orig 2005-02-27 23:39:24 UTC
++++ src/filter.h
+@@ -20,6 +20,8 @@ typedef struct {
+
+ #ifdef ARCH_X86
+ int16 coeffs_i16[NCOEFFS] __attribute__ ((aligned (8)));
++ #elif __x86_64__
++ int16 coeffs_i16[NCOEFFS] __attribute__ ((aligned (8)));
+ #elif ARCH_POWERPC
+ int16 coeffs_i16[NCOEFFS] __attribute__ ((aligned (16)));
+ #endif
diff --git a/audio/festdoc/files/patch-festival_info_festival.info b/audio/festdoc/files/patch-festival_info_festival.info
index bcaeeaea3c3d..49b7133fa024 100644
--- a/audio/festdoc/files/patch-festival_info_festival.info
+++ b/audio/festdoc/files/patch-festival_info_festival.info
@@ -1,7 +1,7 @@
$NetBSD: patch-aa,v 1.1 2000/01/06 01:40:11 wiz Exp $
---- festival/info/festival.info.orig Sat Jun 19 17:08:03 1999
-+++ festival/info/festival.info Wed Jan 5 16:36:08 2000
+--- festival/info/festival.info.orig 1999-06-19 15:08:03 UTC
++++ festival/info/festival.info
@@ -1,6 +1,11 @@
This is Info file festival.info, produced by Makeinfo-1.63 from the
input file festival.texi.
diff --git a/audio/festlex-czech/files/patch-Makefile b/audio/festlex-czech/files/patch-Makefile
index b1c264ddac3f..04f6a23546f0 100644
--- a/audio/festlex-czech/files/patch-Makefile
+++ b/audio/festlex-czech/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig Wed Jun 21 09:32:07 2006
-+++ Makefile Wed Dec 26 16:42:28 2007
-@@ -36,10 +36,9 @@
+--- Makefile.orig 2006-06-21 07:32:07 UTC
++++ Makefile
+@@ -36,10 +36,9 @@ distfiles := *.scm *.out
all: czech-lexicon.out
%.out: %.scm
diff --git a/audio/festlex-czech/files/patch-czech-lexicon.out b/audio/festlex-czech/files/patch-czech-lexicon.out
index da80f6a04796..f7f38f141736 100644
--- a/audio/festlex-czech/files/patch-czech-lexicon.out
+++ b/audio/festlex-czech/files/patch-czech-lexicon.out
@@ -1,6 +1,6 @@
---- czech-lexicon.out.orig Wed Dec 26 17:22:12 2007
-+++ czech-lexicon.out Wed Dec 26 17:28:09 2007
-@@ -45,7 +45,9 @@
+--- czech-lexicon.out.orig 2006-06-21 07:32:07 UTC
++++ czech-lexicon.out
+@@ -45,7 +45,9 @@ MNCL
("a" nil (((a) 0)))
("a" sym (((a:) 0)))
("b" nil (((b e:) 0)))
@@ -10,7 +10,7 @@
("cca" nil (((c i r k a) 0)))
("ch" nil (((ch a:) 0)))
("Chocomy¹l" nil (((ch o c o m i s~ l) 0)))
-@@ -78,7 +80,16 @@
+@@ -78,7 +80,16 @@ MNCL
("copyrightùm" nil (((k o p i r a j t u: m) 0)))
("czech" nil (((c~ e k) 0)))
("d" nil (((d e:) 0)))
@@ -27,7 +27,7 @@
("Emacs" nil (((i: m e k s) 0)))
("Emacsech" nil (((i: m e k s e ch) 0)))
("Emacsem" nil (((i: m e k s e m) 0)))
-@@ -101,6 +112,7 @@
+@@ -101,6 +112,7 @@ MNCL
("Emacsùm" nil (((i: m e k s u: m) 0)))
("escape" nil (((i s k e j p) 0)))
("f" nil (((e f) 0)))
@@ -35,7 +35,7 @@
("foundation" nil (((f a u n d e j s~ n) 0)))
("freeware" nil (((f r i: v e: r e) 0)))
("freewarech" nil (((f r i: v e: r e ch) 0)))
-@@ -145,15 +157,45 @@
+@@ -145,15 +157,45 @@ MNCL
("hardwary" nil (((h a r d v e: r i) 0)))
("hardwarù" nil (((h a r d v e: r u:) 0)))
("hardwarùm" nil (((h a r d v e: r u: m) 0)))
@@ -81,7 +81,7 @@
("p" nil (((p e:) 0)))
("pst" nil (((p s t) 0)))
("q" nil (((k v e:) 0)))
-@@ -205,10 +247,16 @@
+@@ -205,10 +247,16 @@ MNCL
("softwarù" nil (((s o f t v e: r u:) 0)))
("softwarùm" nil (((s o f t v e: r u: m) 0)))
("t" nil (((t e:) 0)))
diff --git a/audio/festlex-czech/files/patch-czech-lexicon.scm b/audio/festlex-czech/files/patch-czech-lexicon.scm
index 21ca0a900a4c..2cb7f65bf780 100644
--- a/audio/festlex-czech/files/patch-czech-lexicon.scm
+++ b/audio/festlex-czech/files/patch-czech-lexicon.scm
@@ -1,5 +1,5 @@
---- czech-lexicon.scm.orig Wed Dec 26 17:22:02 2007
-+++ czech-lexicon.scm Wed Dec 26 17:28:09 2007
+--- czech-lexicon.scm.orig 2006-06-21 07:32:07 UTC
++++ czech-lexicon.scm
@@ -263,3 +263,51 @@
("softwary" nil (((s o f t v e: r i) 0)))
("softwarù" nil (((s o f t v e: r u:) 0)))
diff --git a/audio/festlex-czech/files/patch-czech.scm b/audio/festlex-czech/files/patch-czech.scm
new file mode 100644
index 000000000000..96390fdca044
--- /dev/null
+++ b/audio/festlex-czech/files/patch-czech.scm
@@ -0,0 +1,11 @@
+--- czech.scm.orig 2006-06-21 07:32:07 UTC
++++ czech.scm
+@@ -917,7 +917,7 @@
+ (lex.create "czech")
+ (lex.set.phoneset "czech")
+ (lex.select "czech")
+-(let ((dirs '("." "/usr/share/festival"))
++(let ((dirs '("@FESTIVAL_TARGET_DIR@"))
+ (lexfile nil))
+ (while dirs
+ (let ((file (path-append (car dirs) czech-lexicon-file)))
diff --git a/audio/festlex-czech/files/patch-czech.scm.in b/audio/festlex-czech/files/patch-czech.scm.in
deleted file mode 100644
index 21cd8d134235..000000000000
--- a/audio/festlex-czech/files/patch-czech.scm.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- czech.scm.orig Wed Jun 21 09:32:07 2006
-+++ czech.scm Sat Apr 28 23:28:07 2007
-@@ -917,7 +917,7 @@
- (lex.create "czech")
- (lex.set.phoneset "czech")
- (lex.select "czech")
--(let ((dirs '("." "/usr/share/festival"))
-+(let ((dirs '("@FESTIVAL_TARGET_DIR@"))
- (lexfile nil))
- (while dirs
- (let ((file (path-append (car dirs) czech-lexicon-file)))
diff --git a/audio/festvox-czech/files/patch-Makefile b/audio/festvox-czech/files/patch-Makefile
index 0fcba3fb14e9..47e902a66446 100644
--- a/audio/festvox-czech/files/patch-Makefile
+++ b/audio/festvox-czech/files/patch-Makefile
@@ -1,6 +1,6 @@
---- ./Makefile.orig 2005-10-05 13:30:55.000000000 +0200
-+++ ./Makefile 2014-04-06 19:24:31.351531891 +0200
-@@ -53,11 +53,11 @@
+--- Makefile.orig 2005-10-05 11:30:55 UTC
++++ Makefile
+@@ -53,11 +53,11 @@ distclean: clean
maintainer-clean: distclean
install: group/ph.group festvox/czech_ph.scm
diff --git a/audio/festvox-czech/files/patch-czech_ph.scm.in b/audio/festvox-czech/files/patch-czech_ph.scm.in
deleted file mode 100644
index e30316c4ed44..000000000000
--- a/audio/festvox-czech/files/patch-czech_ph.scm.in
+++ /dev/null
@@ -1,16 +0,0 @@
---- festvox/czech_ph.scm.in.orig Sun Apr 29 18:50:12 2007
-+++ festvox/czech_ph.scm.in Sun Apr 29 18:50:41 2007
-@@ -10,4 +10,13 @@
- (czech-unisyn-init 'czech_ph czech-ph-unisyn-index)
- (set! czech-int-simple-params* czech-ph-int-params))
-
-+(proclaim_voice
-+ 'czech_ph
-+ '((language czech)
-+ (gender male)
-+ (dialect czech)
-+ (description
-+ "Czech language voice by Free(b)soft")
-+ (coding ISO-8859-2)))
-+
- (provide 'czech_ph)
diff --git a/audio/festvox-czech/files/patch-festvox_czech__ph.scm.in b/audio/festvox-czech/files/patch-festvox_czech__ph.scm.in
new file mode 100644
index 000000000000..eb2bfb219c2c
--- /dev/null
+++ b/audio/festvox-czech/files/patch-festvox_czech__ph.scm.in
@@ -0,0 +1,16 @@
+--- festvox/czech_ph.scm.in.orig 2005-10-03 19:02:26 UTC
++++ festvox/czech_ph.scm.in
+@@ -10,4 +10,13 @@
+ (czech-unisyn-init 'czech_ph czech-ph-unisyn-index)
+ (set! czech-int-simple-params* czech-ph-int-params))
+
++(proclaim_voice
++ 'czech_ph
++ '((language czech)
++ (gender male)
++ (dialect czech)
++ (description
++ "Czech language voice by Free(b)soft")
++ (coding ISO-8859-2)))
++
+ (provide 'czech_ph)
diff --git a/audio/firefly/files/patch-mt-daapd.conf.templ b/audio/firefly/files/patch-contrib_mt-daapd.conf.templ
index 03a3e398dc88..03a3e398dc88 100644
--- a/audio/firefly/files/patch-mt-daapd.conf.templ
+++ b/audio/firefly/files/patch-contrib_mt-daapd.conf.templ
diff --git a/audio/firefly/files/patch-plugins_out-daap.c b/audio/firefly/files/patch-src_plugins_out-daap.c
index d248ae343add..d248ae343add 100644
--- a/audio/firefly/files/patch-plugins_out-daap.c
+++ b/audio/firefly/files/patch-src_plugins_out-daap.c
diff --git a/audio/flacon/files/patch-CMakeLists.txt b/audio/flacon/files/patch-CMakeLists.txt
index a0170c6a7cee..42a7eaec7eed 100644
--- a/audio/flacon/files/patch-CMakeLists.txt
+++ b/audio/flacon/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig 2015-09-04 19:04:20 UTC
+--- CMakeLists.txt.orig 2016-01-29 18:07:49 UTC
+++ CMakeLists.txt
-@@ -348,7 +348,7 @@ configure_file(
+@@ -324,7 +324,7 @@ configure_file(
add_custom_command(TARGET ${PROJECT_NAME}
COMMAND gzip -c ${CMAKE_CURRENT_BINARY_DIR}/flacon.1 > ${CMAKE_CURRENT_BINARY_DIR}/flacon.1.gz
)
diff --git a/audio/fluidsynth-dssi/files/patch-src-Makefile.in b/audio/fluidsynth-dssi/files/patch-src-Makefile.in
deleted file mode 100644
index 87dd25237c5b..000000000000
--- a/audio/fluidsynth-dssi/files/patch-src-Makefile.in
+++ /dev/null
@@ -1,21 +0,0 @@
---- src/Makefile.in.orig Tue Jan 23 21:35:02 2007
-+++ src/Makefile.in Tue Jan 23 21:35:52 2007
-@@ -697,12 +697,12 @@
-
- # create symlinks for the plugin to jack-dssi-host
- install-exec-hook:
-- if test -x $(DESTDIR)$(bindir)/jack-dssi-host$(EXEEXT) ; then \
-- cd $(DESTDIR)$(bindir) ; \
-- if ! test -x ./fluidsynth-dssi$(EXEEXT) ; then \
-- $(LN_S) jack-dssi-host$(EXEEXT) fluidsynth-dssi$(EXEEXT) ; \
-- fi ; \
-- fi
-+# if test -x $(DESTDIR)$(bindir)/jack-dssi-host$(EXEEXT) ; then \
-+# cd $(DESTDIR)$(bindir) ; \
-+# if ! test -x ./fluidsynth-dssi$(EXEEXT) ; then \
-+# $(LN_S) jack-dssi-host$(EXEEXT) fluidsynth-dssi$(EXEEXT) ; \
-+# fi ; \
-+# fi
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
- .NOEXPORT:
diff --git a/audio/fluidsynth-dssi/files/patch-src_Makefile.in b/audio/fluidsynth-dssi/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..7bb7cda13ee4
--- /dev/null
+++ b/audio/fluidsynth-dssi/files/patch-src_Makefile.in
@@ -0,0 +1,21 @@
+--- src/Makefile.in.orig 2009-01-04 23:43:52 UTC
++++ src/Makefile.in
+@@ -605,12 +605,12 @@ uninstall-am: uninstall-pluginLTLIBRARIE
+
+ # create symlinks for the plugin to jack-dssi-host
+ install-exec-hook:
+- if test -x $(DESTDIR)$(bindir)/jack-dssi-host$(EXEEXT) ; then \
+- cd $(DESTDIR)$(bindir) ; \
+- if ! test -x ./fluidsynth-dssi$(EXEEXT) ; then \
+- $(LN_S) jack-dssi-host$(EXEEXT) fluidsynth-dssi$(EXEEXT) ; \
+- fi ; \
+- fi
++# if test -x $(DESTDIR)$(bindir)/jack-dssi-host$(EXEEXT) ; then \
++# cd $(DESTDIR)$(bindir) ; \
++# if ! test -x ./fluidsynth-dssi$(EXEEXT) ; then \
++# $(LN_S) jack-dssi-host$(EXEEXT) fluidsynth-dssi$(EXEEXT) ; \
++# fi ; \
++# fi
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/audio/fluidsynth/files/patch-src__bindings__fluid_rtkit.c b/audio/fluidsynth/files/patch-src__bindings__fluid_rtkit.c
deleted file mode 100644
index 47478bd79733..000000000000
--- a/audio/fluidsynth/files/patch-src__bindings__fluid_rtkit.c
+++ /dev/null
@@ -1,39 +0,0 @@
---- src/bindings/fluid_rtkit.c.orig 2011-09-04 16:38:58.000000000 +0900
-+++ src/bindings/fluid_rtkit.c 2011-09-05 17:07:06.000000000 +0900
-@@ -34,7 +34,7 @@
- #include "fluid_rtkit.h"
-
-
--#if defined(__linux__) || defined(__APPLE__)
-+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
-
- #ifndef _GNU_SOURCE
- #define _GNU_SOURCE
-@@ -44,12 +44,27 @@
- #include <string.h>
- #include <unistd.h>
- #include <sys/types.h>
-+#include <sys/time.h>
- #include <sys/syscall.h>
- #include <sys/resource.h>
-+#include <sys/param.h>
-
-+#if defined(__FreeBSD__)
-+#include <pthread_np.h>
-+#endif
-
- static pid_t _gettid(void) {
-+#if defined(__FreeBSD__)
-+#if __FreeBSD__version > 900030
-+ return pthread_getthreadid_np();
-+#else
-+ long tid;
-+ syscall(SYS_thr_self, &tid);
-+ return tid;
-+#endif
-+#else
- return (pid_t) syscall(SYS_gettid);
-+#endif
- }
-
- static int translate_error(const char *name) {
diff --git a/audio/fluidsynth/files/patch-src__drivers__fluid_alsa.c b/audio/fluidsynth/files/patch-src__drivers__fluid_alsa.c
deleted file mode 100644
index 26d07b59f84a..000000000000
--- a/audio/fluidsynth/files/patch-src__drivers__fluid_alsa.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/drivers/fluid_alsa.c 2012-08-16 00:01:13.000000000 -0400
-+++ src/drivers/fluid_alsa.c 2014-12-20 12:59:44.000000000 -0500
-@@ -348,5 +348,4 @@
- snd_pcm_wait(pcm, 1);
- break;
-- case -EPIPE:
- case -EBADFD:
- if (snd_pcm_prepare(pcm) != 0) {
-@@ -355,5 +354,8 @@
- }
- break;
-+ case -EPIPE:
-+#if EPIPE != ESTRPIPE
- case -ESTRPIPE:
-+#endif
- if ((snd_pcm_resume(pcm) != 0) && (snd_pcm_prepare(pcm) != 0)) {
- FLUID_LOG(FLUID_ERR, "Failed to resume the audio device");
diff --git a/audio/fluidsynth/files/patch-src__drivers__fluid_oss.c b/audio/fluidsynth/files/patch-src__drivers__fluid_oss.c
deleted file mode 100644
index dea1fe2b54a9..000000000000
--- a/audio/fluidsynth/files/patch-src__drivers__fluid_oss.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/drivers/fluid_oss.c.orig 2012-08-16 13:01:13.000000000 +0900
-+++ src/drivers/fluid_oss.c 2012-08-18 04:12:09.000000000 +0900
-@@ -45,9 +45,9 @@
- #define BUFFER_LENGTH 512
-
- // Build issue on some systems (OSS 4.0)?
--#ifdef SNDCTL_DSP_CHANNELS
-- #define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
--#endif
-+// #ifdef SNDCTL_DSP_CHANNELS
-+// #define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
-+// #endif
-
- /** fluid_oss_audio_driver_t
- *
diff --git a/audio/fluidsynth/files/patch-src_bindings_fluid__rtkit.c b/audio/fluidsynth/files/patch-src_bindings_fluid__rtkit.c
new file mode 100644
index 000000000000..2a36fb3bd018
--- /dev/null
+++ b/audio/fluidsynth/files/patch-src_bindings_fluid__rtkit.c
@@ -0,0 +1,39 @@
+--- src/bindings/fluid_rtkit.c.orig 2012-08-16 04:01:13 UTC
++++ src/bindings/fluid_rtkit.c
+@@ -34,7 +34,7 @@
+ #include "fluid_rtkit.h"
+
+
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+@@ -44,12 +44,27 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/types.h>
++#include <sys/time.h>
+ #include <sys/syscall.h>
+ #include <sys/resource.h>
++#include <sys/param.h>
+
++#if defined(__FreeBSD__)
++#include <pthread_np.h>
++#endif
+
+ static pid_t _gettid(void) {
++#if defined(__FreeBSD__)
++#if __FreeBSD__version > 900030
++ return pthread_getthreadid_np();
++#else
++ long tid;
++ syscall(SYS_thr_self, &tid);
++ return tid;
++#endif
++#else
+ return (pid_t) syscall(SYS_gettid);
++#endif
+ }
+
+ static int translate_error(const char *name) {
diff --git a/audio/fluidsynth/files/patch-src_drivers_fluid__alsa.c b/audio/fluidsynth/files/patch-src_drivers_fluid__alsa.c
new file mode 100644
index 000000000000..bfa0dfb93968
--- /dev/null
+++ b/audio/fluidsynth/files/patch-src_drivers_fluid__alsa.c
@@ -0,0 +1,20 @@
+--- src/drivers/fluid_alsa.c.orig 2012-08-16 04:01:13 UTC
++++ src/drivers/fluid_alsa.c
+@@ -347,14 +347,16 @@ static int fluid_alsa_handle_write_error
+ case -EAGAIN:
+ snd_pcm_wait(pcm, 1);
+ break;
+- case -EPIPE:
+ case -EBADFD:
+ if (snd_pcm_prepare(pcm) != 0) {
+ FLUID_LOG(FLUID_ERR, "Failed to prepare the audio device");
+ return FLUID_FAILED;
+ }
+ break;
++ case -EPIPE:
++#if EPIPE != ESTRPIPE
+ case -ESTRPIPE:
++#endif
+ if ((snd_pcm_resume(pcm) != 0) && (snd_pcm_prepare(pcm) != 0)) {
+ FLUID_LOG(FLUID_ERR, "Failed to resume the audio device");
+ return FLUID_FAILED;
diff --git a/audio/fluidsynth/files/patch-src_drivers_fluid__oss.c b/audio/fluidsynth/files/patch-src_drivers_fluid__oss.c
new file mode 100644
index 000000000000..dc5089f4b636
--- /dev/null
+++ b/audio/fluidsynth/files/patch-src_drivers_fluid__oss.c
@@ -0,0 +1,15 @@
+--- src/drivers/fluid_oss.c.orig 2012-08-16 04:01:13 UTC
++++ src/drivers/fluid_oss.c
+@@ -45,9 +45,9 @@
+ #define BUFFER_LENGTH 512
+
+ // Build issue on some systems (OSS 4.0)?
+-#ifdef SNDCTL_DSP_CHANNELS
+- #define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
+-#endif
++// #ifdef SNDCTL_DSP_CHANNELS
++// #define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
++// #endif
+
+ /** fluid_oss_audio_driver_t
+ *
diff --git a/audio/fmit/files/patch-libs_CppAddons_CMakeLists.txt b/audio/fmit/files/patch-libs_CppAddons_CMakeLists.txt
new file mode 100644
index 000000000000..9a1d66e4cbed
--- /dev/null
+++ b/audio/fmit/files/patch-libs_CppAddons_CMakeLists.txt
@@ -0,0 +1,9 @@
+--- libs/CppAddons/CMakeLists.txt.orig 2012-06-23 20:03:59 UTC
++++ libs/CppAddons/CMakeLists.txt
+@@ -8,6 +8,4 @@ INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+-set(CMAKE_CXX_FLAGS "-Wall -ansi -pedantic")
+-
+ add_library(CppAddons STATIC ${libCppAddons_SRCS})
diff --git a/audio/fmit/files/patch-libs_Music_CMakeLists.txt b/audio/fmit/files/patch-libs_Music_CMakeLists.txt
new file mode 100644
index 000000000000..b436d6e3fedf
--- /dev/null
+++ b/audio/fmit/files/patch-libs_Music_CMakeLists.txt
@@ -0,0 +1,12 @@
+--- libs/Music/CMakeLists.txt.orig 2012-06-23 20:03:59 UTC
++++ libs/Music/CMakeLists.txt
+@@ -18,8 +18,7 @@ SET(libMusic_SRCS
+ INCLUDE_DIRECTORIES(
+ ../../libs
+ ${CMAKE_CURRENT_BINARY_DIR}
++ ${FFTW3_INCLUDES}
+ )
+
+-set(CMAKE_CXX_FLAGS "-Wall")
+-
+ add_library(Music STATIC ${libMusic_SRCS})
diff --git a/audio/fmit/files/patch-libs_Music_Music.h b/audio/fmit/files/patch-libs_Music_Music.h
new file mode 100644
index 000000000000..350320764adc
--- /dev/null
+++ b/audio/fmit/files/patch-libs_Music_Music.h
@@ -0,0 +1,11 @@
+--- libs/Music/Music.h.orig 2014-05-30 11:38:46 UTC
++++ libs/Music/Music.h
+@@ -285,7 +285,7 @@ namespace Music
+ // TODO cannot create a template so easily because the pow10 is not defined for all types
+ inline double invlp(double value)
+ {
+- return pow10(value/20.0);
++ return pow(10.0,value/20.0);
+ // return pow(TYPE(10), value/TYPE(20));
+ }
+
diff --git a/audio/fmit/files/patch-libs__CppAddons__CMakeLists.txt b/audio/fmit/files/patch-libs__CppAddons__CMakeLists.txt
deleted file mode 100644
index 65df2b6ee085..000000000000
--- a/audio/fmit/files/patch-libs__CppAddons__CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
---- libs/CppAddons/CMakeLists.txt.orig 2011-01-28 08:09:11.000000000 +0900
-+++ libs/CppAddons/CMakeLists.txt 2011-08-21 21:54:31.000000000 +0900
-@@ -8,6 +8,4 @@
- ${CMAKE_CURRENT_BINARY_DIR}
- )
-
--set(CMAKE_CXX_FLAGS "-Wall -ansi -pedantic")
--
- add_library(CppAddons STATIC ${libCppAddons_SRCS})
diff --git a/audio/fmit/files/patch-libs__Music__CMakeLists.txt b/audio/fmit/files/patch-libs__Music__CMakeLists.txt
deleted file mode 100644
index 012a67bb2c8e..000000000000
--- a/audio/fmit/files/patch-libs__Music__CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
---- libs/Music/CMakeLists.txt.orig 2011-01-28 08:09:11.000000000 +0900
-+++ libs/Music/CMakeLists.txt 2011-08-21 21:55:31.000000000 +0900
-@@ -18,8 +18,7 @@
- INCLUDE_DIRECTORIES(
- ../../libs
- ${CMAKE_CURRENT_BINARY_DIR}
-+ ${FFTW3_INCLUDES}
- )
-
--set(CMAKE_CXX_FLAGS "-Wall")
--
- add_library(Music STATIC ${libMusic_SRCS})
diff --git a/audio/fmit/files/patch-libs__Music__Music.h b/audio/fmit/files/patch-libs__Music__Music.h
deleted file mode 100644
index 0d69bd61f1d7..000000000000
--- a/audio/fmit/files/patch-libs__Music__Music.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- libs/Music/Music.h.orig 2011-01-28 08:09:11.000000000 +0900
-+++ libs/Music/Music.h 2011-08-21 21:51:54.000000000 +0900
-@@ -285,7 +285,7 @@
- // TODO cannot create a template so easily because the pow10 is not defined for all types
- inline double invlp(double value)
- {
-- return pow10(value/20.0);
-+ return pow(10.0,value/20.0);
- // return pow(TYPE(10), value/TYPE(20));
- }
-
diff --git a/audio/fmit/files/patch-src_CMakeLists.txt b/audio/fmit/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..70e4e18e0d48
--- /dev/null
+++ b/audio/fmit/files/patch-src_CMakeLists.txt
@@ -0,0 +1,23 @@
+--- src/CMakeLists.txt.orig 2012-06-23 20:03:58 UTC
++++ src/CMakeLists.txt
+@@ -35,10 +35,11 @@ SET (FILES_TO_TRANSLATE ${FILES_TO_TRANS
+ INCLUDE_DIRECTORIES(
+ ../libs
+ ${CMAKE_CURRENT_BINARY_DIR}
++ ${PORTAUDIO_INCLUDE_DIRS}
+ ${OSS_INCLUDE_DIR}
+ ${ALSA_INCLUDES}
+- ${PORTAUDIO_INCLUDE_DIRS}
+ ${JACK_INCLUDE_DIRS}
++ ${GLUT_INCLUDE_DIR} ${FFTW3_INCLUDES}
+ )
+
+ IF (UPDATE_TRANSLATIONS)
+@@ -53,6 +54,7 @@ ADD_EXECUTABLE(fmit ${fmit_UI_H} ${fmit_
+ TARGET_LINK_LIBRARIES(fmit
+ CppAddons Music
+ fmit_modules
++ ${PORTAUDIO2_LDFLAGS}
+ ${QT_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${FFTW3_LIBRARIES}
+ ${ALSA_LIBRARIES}
+ ${PORTAUDIO_LIBRARIES}
diff --git a/audio/fmit/files/patch-src__CMakeLists.txt b/audio/fmit/files/patch-src__CMakeLists.txt
deleted file mode 100644
index 74f15487a5b2..000000000000
--- a/audio/fmit/files/patch-src__CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/CMakeLists.txt.orig 2011-01-28 08:09:11.000000000 +0900
-+++ src/CMakeLists.txt 2011-09-06 15:56:58.000000000 +0900
-@@ -35,10 +35,11 @@
- INCLUDE_DIRECTORIES(
- ../libs
- ${CMAKE_CURRENT_BINARY_DIR}
-+ ${PORTAUDIO_INCLUDE_DIRS}
- ${OSS_INCLUDE_DIR}
- ${ALSA_INCLUDES}
-- ${PORTAUDIO_INCLUDE_DIRS}
- ${JACK_INCLUDE_DIRS}
-+ ${GLUT_INCLUDE_DIR} ${FFTW3_INCLUDES}
- )
-
- IF (UPDATE_TRANSLATIONS)
-@@ -53,6 +54,7 @@
- TARGET_LINK_LIBRARIES(fmit
- CppAddons Music
- fmit_modules
-+ ${PORTAUDIO2_LDFLAGS}
- ${QT_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${FFTW3_LIBRARIES}
- ${ALSA_LIBRARIES}
- ${PORTAUDIO_LIBRARIES}
diff --git a/audio/fmit/files/patch-src__modules__CMakeLists.txt b/audio/fmit/files/patch-src__modules__CMakeLists.txt
deleted file mode 100644
index 5c70ea6c8dd0..000000000000
--- a/audio/fmit/files/patch-src__modules__CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/modules/CMakeLists.txt.orig 2011-01-28 08:09:11.000000000 +0900
-+++ src/modules/CMakeLists.txt 2011-08-21 21:56:20.000000000 +0900
-@@ -29,6 +29,7 @@
- INCLUDE_DIRECTORIES(
- ../../libs
- ${CMAKE_CURRENT_BINARY_DIR}
-+ ${GLUT_INCLUDE_DIR}
- )
-
- ADD_LIBRARY(fmit_modules STATIC ${fmit_MODULE_SRCS_MOC} ${fmit_MODULE_SRCS})
diff --git a/audio/fmit/files/patch-src_modules_CMakeLists.txt b/audio/fmit/files/patch-src_modules_CMakeLists.txt
new file mode 100644
index 000000000000..5eef2d3f0b42
--- /dev/null
+++ b/audio/fmit/files/patch-src_modules_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- src/modules/CMakeLists.txt.orig 2012-06-23 20:03:58 UTC
++++ src/modules/CMakeLists.txt
+@@ -29,6 +29,7 @@ SET (FILES_TO_TRANSLATE ${FILES_TO_TRANS
+ INCLUDE_DIRECTORIES(
+ ../../libs
+ ${CMAKE_CURRENT_BINARY_DIR}
++ ${GLUT_INCLUDE_DIR}
+ )
+
+ ADD_LIBRARY(fmit_modules STATIC ${fmit_MODULE_SRCS_MOC} ${fmit_MODULE_SRCS})
diff --git a/audio/fpc-a52/files/patch-packages_a52_fpmake.pp b/audio/fpc-a52/files/patch-packages_a52_fpmake.pp
index 5a0b627cc1c0..de501c6d93b2 100644
--- a/audio/fpc-a52/files/patch-packages_a52_fpmake.pp
+++ b/audio/fpc-a52/files/patch-packages_a52_fpmake.pp
@@ -1,4 +1,4 @@
---- packages/a52/fpmake.pp.orig 2015-01-05 19:27:06 UTC
+--- packages/a52/fpmake.pp.orig 2015-11-13 21:15:29 UTC
+++ packages/a52/fpmake.pp
@@ -20,7 +20,7 @@ begin
P.Email := '';
diff --git a/audio/fpc-mad/files/patch-packages_mad_fpmake.pp b/audio/fpc-mad/files/patch-packages_mad_fpmake.pp
index 11910f3c1466..a9c63f2d4c2b 100644
--- a/audio/fpc-mad/files/patch-packages_mad_fpmake.pp
+++ b/audio/fpc-mad/files/patch-packages_mad_fpmake.pp
@@ -1,4 +1,4 @@
---- packages/mad/fpmake.pp.orig 2015-08-29 16:37:05 UTC
+--- packages/mad/fpmake.pp.orig 2015-11-13 21:15:29 UTC
+++ packages/mad/fpmake.pp
@@ -17,7 +17,7 @@ begin
P.Directory:=ADirectory;
diff --git a/audio/fpc-modplug/files/patch-packages_modplug_fpmake.pp b/audio/fpc-modplug/files/patch-packages_modplug_fpmake.pp
index 8de641e4636e..08157c0e8651 100644
--- a/audio/fpc-modplug/files/patch-packages_modplug_fpmake.pp
+++ b/audio/fpc-modplug/files/patch-packages_modplug_fpmake.pp
@@ -1,4 +1,4 @@
---- packages/modplug/fpmake.pp.orig 2015-08-07 13:22:31 UTC
+--- packages/modplug/fpmake.pp.orig 2015-11-13 21:15:29 UTC
+++ packages/modplug/fpmake.pp
@@ -17,7 +17,7 @@ begin
P.Directory:=ADirectory;
diff --git a/audio/fpc-oggvorbis/files/patch-packages_oggvorbis_fpmake.pp b/audio/fpc-oggvorbis/files/patch-packages_oggvorbis_fpmake.pp
index 8c21acf0a305..3cc105136938 100644
--- a/audio/fpc-oggvorbis/files/patch-packages_oggvorbis_fpmake.pp
+++ b/audio/fpc-oggvorbis/files/patch-packages_oggvorbis_fpmake.pp
@@ -1,8 +1,8 @@
---- packages/oggvorbis/fpmake.pp.orig 2015-01-05 19:27:06.000000000 +0000
+--- packages/oggvorbis/fpmake.pp.orig 2015-11-13 21:15:29 UTC
+++ packages/oggvorbis/fpmake.pp
@@ -19,7 +19,7 @@ begin
{$endif ALLPACKAGES}
- P.Version:='3.0.1';
+ P.Version:='3.0.0';
P.SourcePath.Add('src');
- P.OSes := [linux,win32,wince];
+ P.OSes := [linux,win32,wince,dragonfly,freebsd];
diff --git a/audio/fpc-openal/files/patch-packages_openal_fpmake.pp b/audio/fpc-openal/files/patch-packages_openal_fpmake.pp
index 791b5f77a045..3f5a1388a70e 100644
--- a/audio/fpc-openal/files/patch-packages_openal_fpmake.pp
+++ b/audio/fpc-openal/files/patch-packages_openal_fpmake.pp
@@ -1,8 +1,8 @@
---- packages/openal/fpmake.pp.orig 2015-01-05 19:27:06.000000000 +0000
+--- packages/openal/fpmake.pp.orig 2015-11-13 21:15:29 UTC
+++ packages/openal/fpmake.pp
@@ -19,9 +19,9 @@ begin
{$endif ALLPACKAGES}
- P.Version:='3.0.1';
+ P.Version:='3.0.0';
if Defaults.CPU = i386 then
- P.OSes := [linux,win32,darwin]
+ P.OSes := [linux,win32,darwin,dragonfly,freebsd]
diff --git a/audio/fplib/files/patch-CMakeLists.txt b/audio/fplib/files/patch-CMakeLists.txt
index 979c8c8540fa..637e4b0d5647 100644
--- a/audio/fplib/files/patch-CMakeLists.txt
+++ b/audio/fplib/files/patch-CMakeLists.txt
@@ -2,7 +2,7 @@ Link against an actual target name, not the generated library name.
If we link against the latter, there is no dependency between lastfm-fpclient
and fplib, which can break parallel builds starting with CMake 3.5.0.
---- CMakeLists.txt.orig 2016-03-16 09:53:03 UTC
+--- CMakeLists.txt.orig 2013-10-23 16:45:46 UTC
+++ CMakeLists.txt
@@ -139,7 +139,7 @@ ADD_EXECUTABLE(lastfm-fpclient
diff --git a/audio/freealut/files/patch-src_alutInit.c b/audio/freealut/files/patch-src_alutInit.c
index f19ac896b7f9..d111d24abf29 100644
--- a/audio/freealut/files/patch-src_alutInit.c
+++ b/audio/freealut/files/patch-src_alutInit.c
@@ -1,6 +1,6 @@
---- src/alutInit.c.orig Wed Mar 8 16:40:26 2006
-+++ src/alutInit.c Wed Mar 8 16:41:23 2006
-@@ -147,11 +147,7 @@
+--- src/alutInit.c.orig 2006-05-08 09:28:07 UTC
++++ src/alutInit.c
+@@ -147,11 +147,7 @@ alutExit (void)
return AL_FALSE;
}
diff --git a/audio/freealut/files/patch-src_alutInternal.h b/audio/freealut/files/patch-src_alutInternal.h
index 179705398090..afa799efeb7b 100644
--- a/audio/freealut/files/patch-src_alutInternal.h
+++ b/audio/freealut/files/patch-src_alutInternal.h
@@ -1,5 +1,5 @@
---- src/alutInternal.h.orig Fri Mar 31 06:15:08 2006
-+++ src/alutInternal.h Fri Mar 31 06:15:46 2006
+--- src/alutInternal.h.orig 2006-05-08 09:28:07 UTC
++++ src/alutInternal.h
@@ -13,23 +13,8 @@
#if HAVE_STDINT_H
@@ -24,4 +24,4 @@
+#include <inttypes.h>
#endif
- typedef uint16_t UInt16LittleEndian;
+ typedef int16_t Int16BigEndian;
diff --git a/audio/freealut/files/patch-src_alutLoader.c b/audio/freealut/files/patch-src_alutLoader.c
index d395cd9602dd..79aacab3d449 100644
--- a/audio/freealut/files/patch-src_alutLoader.c
+++ b/audio/freealut/files/patch-src_alutLoader.c
@@ -1,6 +1,6 @@
---- src/alutLoader.c.orig Sun Aug 6 19:00:08 2006
-+++ src/alutLoader.c Sun Aug 6 19:01:10 2006
-@@ -474,7 +474,7 @@
+--- src/alutLoader.c.orig 2006-05-08 09:28:07 UTC
++++ src/alutLoader.c
+@@ -474,7 +474,7 @@ alutLoadWAVMemory (ALbyte *buffer, ALenu
/* ToDo: Can we do something less insane than passing 0x7FFFFFFF? */
stream = _alutInputStreamConstructFromMemory (buffer, 0x7FFFFFFF);
diff --git a/audio/freealut/files/patch-src_alutUtil.c b/audio/freealut/files/patch-src_alutUtil.c
index d0977b4dabe0..26b4edd94037 100644
--- a/audio/freealut/files/patch-src_alutUtil.c
+++ b/audio/freealut/files/patch-src_alutUtil.c
@@ -1,5 +1,5 @@
---- src/alutUtil.c.orig Fri Mar 31 14:48:10 2006
-+++ src/alutUtil.c Fri Mar 31 14:48:22 2006
+--- src/alutUtil.c.orig 2006-05-08 09:28:07 UTC
++++ src/alutUtil.c
@@ -2,6 +2,7 @@
#if HAVE_NANOSLEEP && HAVE_TIME_H
diff --git a/audio/ghostess/files/patch-configure b/audio/ghostess/files/patch-configure
index 9c43c59d92c6..9260c230d7ca 100644
--- a/audio/ghostess/files/patch-configure
+++ b/audio/ghostess/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2010-09-24 02:36:53.000000000 +0900
-+++ configure 2011-03-14 08:06:46.000000000 +0900
-@@ -10932,10 +10932,10 @@
+--- configure.orig 2012-01-06 04:25:27 UTC
++++ configure
+@@ -11719,10 +11719,10 @@ rm -f core conftest.err conftest.$ac_obj
case "${host_os}" in
diff --git a/audio/ghostess/files/patch-src-Makefile.in b/audio/ghostess/files/patch-src-Makefile.in
deleted file mode 100644
index 32c554e3d5f4..000000000000
--- a/audio/ghostess/files/patch-src-Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/Makefile.in.orig Fri Jan 19 00:40:57 2007
-+++ src/Makefile.in Fri Jan 19 00:42:05 2007
-@@ -207,9 +207,7 @@
- @DARWIN_TRUE@@MIDI_JACK_TRUE@MIDI_SRCS = midi-jack.c
- @DARWIN_FALSE@DARWIN_LD_FLAGS =
- @DARWIN_TRUE@@MIDI_JACK_FALSE@DARWIN_LD_FLAGS = -framework CoreFoundation -framework CoreMIDI
--@DARWIN_TRUE@@MIDI_JACK_TRUE@DARWIN_LD_FLAGS = -framework CoreFoundation
- @DARWIN_FALSE@DARWIN_LD_ADD =
--@DARWIN_TRUE@DARWIN_LD_ADD = -lmx
- ghostess_SOURCES = \
- ghostess.c \
- ghostess.h \
diff --git a/audio/ghostess/files/patch-src-ghostess.c b/audio/ghostess/files/patch-src-ghostess.c
deleted file mode 100644
index d83cda53e2b4..000000000000
--- a/audio/ghostess/files/patch-src-ghostess.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/ghostess.c.orig 2006-11-28 06:39:41.000000000 +0100
-+++ src/ghostess.c 2008-07-23 01:33:28.000000000 +0200
-@@ -56,6 +56,7 @@
- #include <dirent.h>
- #include <pthread.h>
- #include <math.h>
-+#include <errno.h>
-
- #include <gtk/gtk.h>
-
diff --git a/audio/ghostess/files/patch-src_Makefile.in b/audio/ghostess/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..3a3bb3ef8de3
--- /dev/null
+++ b/audio/ghostess/files/patch-src_Makefile.in
@@ -0,0 +1,12 @@
+--- src/Makefile.in.orig 2012-01-06 04:25:25 UTC
++++ src/Makefile.in
+@@ -226,9 +226,7 @@ top_srcdir = @top_srcdir@
+ @DARWIN_TRUE@@MIDI_JACK_TRUE@MIDI_SRCS = midi-jack.c
+ @DARWIN_FALSE@DARWIN_LD_FLAGS =
+ @DARWIN_TRUE@@MIDI_JACK_FALSE@DARWIN_LD_FLAGS = -framework CoreFoundation -framework CoreMIDI
+-@DARWIN_TRUE@@MIDI_JACK_TRUE@DARWIN_LD_FLAGS = -framework CoreFoundation
+ @DARWIN_FALSE@DARWIN_LD_ADD =
+-@DARWIN_TRUE@DARWIN_LD_ADD = -lmx
+ ghostess_SOURCES = \
+ ghostess.c \
+ ghostess.h \
diff --git a/audio/ghostess/files/patch-src_ghostess.c b/audio/ghostess/files/patch-src_ghostess.c
new file mode 100644
index 000000000000..c7569e8691d5
--- /dev/null
+++ b/audio/ghostess/files/patch-src_ghostess.c
@@ -0,0 +1,10 @@
+--- src/ghostess.c.orig 2012-01-06 06:11:54 UTC
++++ src/ghostess.c
+@@ -57,6 +57,7 @@
+ #include <dirent.h>
+ #include <pthread.h>
+ #include <math.h>
++#include <errno.h>
+
+ #include <glib.h>
+ #include <gtk/gtk.h>
diff --git a/audio/gkrellmms2/files/patch-Makefile b/audio/gkrellmms2/files/patch-Makefile
index afb7091926e0..236bacfcd20f 100644
--- a/audio/gkrellmms2/files/patch-Makefile
+++ b/audio/gkrellmms2/files/patch-Makefile
@@ -1,7 +1,6 @@
Index: Makefile
-diff -u Makefile.orig Makefile
---- Makefile.orig Sat Jan 22 02:02:17 2005
-+++ Makefile Mon Feb 14 10:42:06 2005
+--- Makefile.orig 2005-01-21 17:02:17 UTC
++++ Makefile
@@ -3,8 +3,8 @@
# You may want to rename the binary-file.
BIN_FILENAME = gkrellmms
@@ -13,7 +12,7 @@ diff -u Makefile.orig Makefile
IMLIB_INCLUDE ?=
IMLIB_LIB ?=
-@@ -18,9 +18,9 @@
+@@ -18,9 +18,9 @@ endif
PLUGIN_DIR ?= /usr/local/lib/gkrellm2/plugins
@@ -25,7 +24,7 @@ diff -u Makefile.orig Makefile
ifdef USE_BMP
FLAGS += -DUSE_BMP
-@@ -35,8 +35,7 @@
+@@ -35,8 +35,7 @@ PACKAGE ?= gkrellmms
FLAGS += -DPACKAGE="\"$(PACKAGE)\""
export PACKAGE LOCALEDIR
@@ -35,7 +34,7 @@ diff -u Makefile.orig Makefile
INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL) -s
-@@ -47,7 +46,7 @@
+@@ -47,7 +46,7 @@ all: $(BIN_FILENAME).so
(cd po && ${MAKE} all )
$(BIN_FILENAME).so: $(OBJS)
diff --git a/audio/gkrellmvolume2/files/patch-Makefile b/audio/gkrellmvolume2/files/patch-Makefile
index fceb1bf7e3ae..e75bc5200c94 100644
--- a/audio/gkrellmvolume2/files/patch-Makefile
+++ b/audio/gkrellmvolume2/files/patch-Makefile
@@ -1,8 +1,7 @@
Index: Makefile
-diff -u Makefile.orig Makefile
---- Makefile.orig Thu Nov 7 01:50:59 2002
-+++ Makefile Thu Nov 7 04:49:05 2002
-@@ -3,12 +3,12 @@
+--- Makefile.orig 2004-08-19 20:07:27 UTC
++++ Makefile
+@@ -9,12 +9,12 @@ export PACKAGE LOCALEDIR
GTK_CONFIG = pkg-config gtk+-2.0
PLUGIN_DIR ?= /usr/local/lib/gkrellm2/plugins
@@ -17,16 +16,16 @@ diff -u Makefile.orig Makefile
LIBS = $(GTK_LIB)
LFLAGS = -shared
-@@ -22,8 +22,6 @@
- FLAGS += -DPACKAGE="\"$(PACKAGE)\""
- export PACKAGE LOCALEDIR
+@@ -31,8 +31,6 @@ ifeq ($(enable_nls),1)
+ export enable_nls
+ endif
-CC = gcc $(CFLAGS) $(FLAGS)
-
INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL) -s
-@@ -33,7 +31,7 @@
+@@ -40,7 +38,7 @@ all: volume.so
(cd po && ${MAKE} all )
volume.so: $(OBJS)
diff --git a/audio/gkrellmvolume2/files/patch-oss__mixer.c b/audio/gkrellmvolume2/files/patch-oss__mixer.c
new file mode 100644
index 000000000000..f6892f590977
--- /dev/null
+++ b/audio/gkrellmvolume2/files/patch-oss__mixer.c
@@ -0,0 +1,21 @@
+--- oss_mixer.c.orig 2004-08-19 20:07:27 UTC
++++ oss_mixer.c
+@@ -32,6 +32,9 @@
+ #else
+ #include <sys/soundcard.h>
+ #endif
++#if defined(SOUND_MIXER_INFO) && defined(__FreeBSD__)
++#undef SOUND_MIXER_INFO
++#endif
+
+ #include "mixer.h"
+ #include "oss_mixer.h"
+@@ -126,7 +129,7 @@ oss_mixer_device_get_volume(mixer_t *mix
+ long amount;
+ ioctl(OSSMIXER(mixer)->fd,MIXER_READ(OSSMIXER(mixer)->table[devid]),&amount);
+ *left = amount & 0xff;
+- *right = amount >> 8;
++ *right = (amount >> 8) & 0xff;
+ }
+
+ static void
diff --git a/audio/gkrellmvolume2/files/patch-oss_mixer.c b/audio/gkrellmvolume2/files/patch-oss_mixer.c
deleted file mode 100644
index c75de5ef7742..000000000000
--- a/audio/gkrellmvolume2/files/patch-oss_mixer.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- oss_mixer.c.orig 2004-08-20 00:07:27.000000000 +0400
-+++ oss_mixer.c 2015-02-01 20:21:32.000000000 +0300
-@@ -32,6 +32,9 @@
- #else
- #include <sys/soundcard.h>
- #endif
-+#if defined(SOUND_MIXER_INFO) && defined(__FreeBSD__)
-+#undef SOUND_MIXER_INFO
-+#endif
-
- #include "mixer.h"
- #include "oss_mixer.h"
-@@ -126,7 +129,7 @@
- long amount;
- ioctl(OSSMIXER(mixer)->fd,MIXER_READ(OSSMIXER(mixer)->table[devid]),&amount);
- *left = amount & 0xff;
-- *right = amount >> 8;
-+ *right = (amount >> 8) & 0xff;
- }
-
- static void
diff --git a/audio/glame/files/patch-Makefile.in b/audio/glame/files/patch-Makefile.in
index 9d41ec1c7600..a9cb91f93629 100644
--- a/audio/glame/files/patch-Makefile.in
+++ b/audio/glame/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig Fri Oct 29 03:53:30 2004
-+++ Makefile.in Fri Oct 29 21:29:55 2004
-@@ -280,7 +280,7 @@
+--- Makefile.in.orig 2005-03-28 17:11:43 UTC
++++ Makefile.in
+@@ -281,7 +281,7 @@ sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
diff --git a/audio/glame/files/patch-src__plugins__audio_io_oss.c b/audio/glame/files/patch-src__plugins__audio_io_oss.c
deleted file mode 100644
index 6b75c9278a75..000000000000
--- a/audio/glame/files/patch-src__plugins__audio_io_oss.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/plugins/audio_io_oss.c 2003/07/01 12:26:28 1.1
-+++ src/plugins/audio_io_oss.c 2003/07/01 12:26:41
-@@ -26,9 +26,9 @@
-
- #ifdef HAVE_OSS_LINUX
- #include <linux/soundcard.h>
--#elif HAVE_OSS_SYS
-+#elif defined(HAVE_OSS_SYS)
- #include <sys/soundcard.h>
--#elif HAVE_OSS_MACHINE
-+#elif defined(HAVE_OSS_MACHINE)
- #include <machine/soundcard.h>
- #else
- #error BUG in OSS configuration.
diff --git a/audio/glame/files/patch-src_glmid_glconfig.c b/audio/glame/files/patch-src_glmid_glconfig.c
index 0b3d3632407b..16a2ba1abcdc 100644
--- a/audio/glame/files/patch-src_glmid_glconfig.c
+++ b/audio/glame/files/patch-src_glmid_glconfig.c
@@ -1,5 +1,5 @@
---- src/glmid/glconfig.c.orig 2008-03-02 14:05:46.000000000 -0500
-+++ src/glmid/glconfig.c 2008-03-02 14:06:23.000000000 -0500
+--- src/glmid/glconfig.c.orig 2004-10-23 13:09:23 UTC
++++ src/glmid/glconfig.c
@@ -125,7 +125,8 @@ int glame_config_get_long(const char *ke
snprintf(cmd, 255, "(glame-config-get '%s)", key);
/* FIXME: execute with catch. */
diff --git a/audio/glame/files/patch-src_glmid_glscript.h b/audio/glame/files/patch-src_glmid_glscript.h
index fd2642f6f3b4..222a404ace69 100644
--- a/audio/glame/files/patch-src_glmid_glscript.h
+++ b/audio/glame/files/patch-src_glmid_glscript.h
@@ -1,5 +1,5 @@
---- src/glmid/glscript.h.orig 2008-03-02 14:07:01.000000000 -0500
-+++ src/glmid/glscript.h 2008-03-02 14:07:39.000000000 -0500
+--- src/glmid/glscript.h.orig 2004-10-23 13:09:23 UTC
++++ src/glmid/glscript.h
@@ -32,6 +32,12 @@
#include "gpsm.h"
#include "swapfile.h"
diff --git a/audio/glame/files/patch-src_glmid_glscript__swapfile.c b/audio/glame/files/patch-src_glmid_glscript__swapfile.c
new file mode 100644
index 000000000000..e52a4e845783
--- /dev/null
+++ b/audio/glame/files/patch-src_glmid_glscript__swapfile.c
@@ -0,0 +1,30 @@
+--- src/glmid/glscript_swapfile.c.orig 2004-10-23 13:09:23 UTC
++++ src/glmid/glscript_swapfile.c
+@@ -374,6 +374,7 @@ int glscript_init_swapfile()
+ glame_reg_export ("swfd?", 1, 0, 0, gls_is_swfd);
+ glame_reg_export ("swdir?", 1, 0, 0, gls_is_swdir);
+
++#if ! HAVE_GUILE18
+ glame_def_export ("O_CREAT", scm_long2num(O_CREAT));
+ glame_def_export ("O_EXCL", scm_long2num(O_EXCL));
+ glame_def_export ("O_TRUNC", scm_long2num(O_TRUNC));
+@@ -381,14 +382,15 @@ int glscript_init_swapfile()
+ glame_def_export ("O_RDONLY", scm_long2num(O_RDONLY));
+ glame_def_export ("O_WRONLY", scm_long2num(O_WRONLY));
+
++ glame_def_export ("SEEK_SET", scm_long2num(SEEK_SET));
++ glame_def_export ("SEEK_CUR", scm_long2num(SEEK_CUR));
++ glame_def_export ("SEEK_END", scm_long2num(SEEK_END));
++#endif
++
+ glame_def_export ("SWSENDFILE_INSERT",
+ scm_long2num(SWSENDFILE_INSERT));
+ glame_def_export ("SWSENDFILE_CUT", scm_long2num(SWSENDFILE_CUT));
+ glame_def_export ("SW_NOFILE", swfd2scm(SW_NOFILE));
+
+- glame_def_export ("SEEK_SET", scm_long2num(SEEK_SET));
+- glame_def_export ("SEEK_CUR", scm_long2num(SEEK_CUR));
+- glame_def_export ("SEEK_END", scm_long2num(SEEK_END));
+-
+ return 0;
+ }
diff --git a/audio/glame/files/patch-src_glmid_glscript_swapfile.c b/audio/glame/files/patch-src_glmid_glscript_swapfile.c
deleted file mode 100644
index 3f204dd49ea3..000000000000
--- a/audio/glame/files/patch-src_glmid_glscript_swapfile.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- src/glmid/glscript_swapfile.c.orig 2008-03-02 14:08:24.000000000 -0500
-+++ src/glmid/glscript_swapfile.c 2008-03-02 14:09:14.000000000 -0500
-@@ -374,6 +374,7 @@ int glscript_init_swapfile()
- glame_reg_export ("swfd?", 1, 0, 0, gls_is_swfd);
- glame_reg_export ("swdir?", 1, 0, 0, gls_is_swdir);
-
-+#if ! HAVE_GUILE18
- glame_def_export ("O_CREAT", scm_long2num(O_CREAT));
- glame_def_export ("O_EXCL", scm_long2num(O_EXCL));
- glame_def_export ("O_TRUNC", scm_long2num(O_TRUNC));
-@@ -381,14 +382,15 @@ int glscript_init_swapfile()
- glame_def_export ("O_RDONLY", scm_long2num(O_RDONLY));
- glame_def_export ("O_WRONLY", scm_long2num(O_WRONLY));
-
-+ glame_def_export ("SEEK_SET", scm_long2num(SEEK_SET));
-+ glame_def_export ("SEEK_CUR", scm_long2num(SEEK_CUR));
-+ glame_def_export ("SEEK_END", scm_long2num(SEEK_END));
-+#endif
-+
- glame_def_export ("SWSENDFILE_INSERT",
- scm_long2num(SWSENDFILE_INSERT));
- glame_def_export ("SWSENDFILE_CUT", scm_long2num(SWSENDFILE_CUT));
- glame_def_export ("SW_NOFILE", swfd2scm(SW_NOFILE));
-
-- glame_def_export ("SEEK_SET", scm_long2num(SEEK_SET));
-- glame_def_export ("SEEK_CUR", scm_long2num(SEEK_CUR));
-- glame_def_export ("SEEK_END", scm_long2num(SEEK_END));
--
- return 0;
- }
diff --git a/audio/glame/files/patch-src_gui_glame__console.c b/audio/glame/files/patch-src_gui_glame__console.c
new file mode 100644
index 000000000000..47b436cacc30
--- /dev/null
+++ b/audio/glame/files/patch-src_gui_glame__console.c
@@ -0,0 +1,11 @@
+--- src/gui/glame_console.c.orig 2004-10-23 13:09:24 UTC
++++ src/gui/glame_console.c
+@@ -60,7 +60,7 @@ static void port_register()
+ port = scm_make_port_type("glame-console", NULL, port_write);
+
+ /* Create new port - shamelessly copied from libguile/strports.c */
+- GLAME_NEWCELL(s_port);
++ SCM_NEWCELL(s_port);
+ SCM_DEFER_INTS;
+ pt = scm_add_to_port_table(s_port);
+ #ifdef SCM_SET_CELL_TYPE /* guile >= 1.4 */
diff --git a/audio/glame/files/patch-src_gui_glame_console.c b/audio/glame/files/patch-src_gui_glame_console.c
deleted file mode 100644
index 2e01702df7d0..000000000000
--- a/audio/glame/files/patch-src_gui_glame_console.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gui/glame_console.c.orig 2008-03-02 14:01:12.000000000 -0500
-+++ src/gui/glame_console.c 2008-03-02 14:01:34.000000000 -0500
-@@ -60,7 +60,7 @@ static void port_register()
- port = scm_make_port_type("glame-console", NULL, port_write);
-
- /* Create new port - shamelessly copied from libguile/strports.c */
-- GLAME_NEWCELL(s_port);
-+ SCM_NEWCELL(s_port);
- SCM_DEFER_INTS;
- pt = scm_add_to_port_table(s_port);
- #ifdef SCM_SET_CELL_TYPE /* guile >= 1.4 */
diff --git a/audio/glame/files/patch-src_include_glame__guile__compat.h b/audio/glame/files/patch-src_include_glame__guile__compat.h
new file mode 100644
index 000000000000..33cfd7454bcc
--- /dev/null
+++ b/audio/glame/files/patch-src_include_glame__guile__compat.h
@@ -0,0 +1,61 @@
+--- src/include/glame_guile_compat.h.orig 2004-10-23 13:09:27 UTC
++++ src/include/glame_guile_compat.h
+@@ -32,58 +32,10 @@
+
+ #include <libguile.h>
+
+-#ifdef SCM_MAJOR_VERSION
+-/* this works because Guile 1.4 doesn't define SCM_MAJOR_VERSION */
+-
+-#define NEW_GUILE 1
+-
+ /* Glame wrapper functions: */
+-#if (SCM_MINOR_VERSION < 7)
+-/* use GLAME_NEWCELL instead of SCM_NEWCELL */
+-#define GLAME_NEWCELL(z) SCM_NEWCELL(z)
+-#endif
+ #define glame_scm2newstr(obj, lenp) gh_scm2newstr (obj, lenp)
+ #define glame_scm2long(obj) scm_num2long (obj, SCM_ARG1, "somewhere")
+ #define glame_scm2double(obj) scm_num2dbl (obj, "somewhere")
+ #define scm_str2string(str) gh_str02scm (str)
+
+-#if (SCM_MINOR_VERSION == 7)
+-#define GLAME_NEWCELL(z) z = scm_cell (SCM_UNPACK(z), 0)
+-#endif
+-
+-#else /* Guile 1.4.x */
+-
+-#include <guile/gh.h>
+-
+-#define NEW_GUILE 0
+-#define SCM_MAJOR_VERSION 1
+-#define SCM_MINOR_VERSION 4
+-#define SCM_MICRO_VERSION 0
+-
+-/* Glame wrapper functions: */
+-#define GLAME_NEWCELL(z) SCM_NEWCELL(z)
+-#define glame_scm2newstr(obj, lenp) gh_scm2newstr (obj, lenp)
+-#define glame_scm2long(obj) gh_scm2long (obj)
+-#define glame_scm2double(obj) gh_scm2double (obj)
+-
+-/* 1.6 compat stuff: (make guile 1.4 use the 1.6 api) */
+-/* If a function cannot be easily defined in terms of a 1.4
+- function, then write a glame wrapper or reimplement the
+- version from Guile 1.6 using internal 1.4 stuff...
+- if stuff in here gets too large, maybe a glame_guile_compat.c
+- should be written
+-*/
+-
+-#define scm_c_define_gsubr(func_name, req, opt, rest, func) gh_new_procedure(func_name, func, req, opt, rest)
+-#define scm_c_export(sym, ...) /* nothing */
+-#define scm_c_define(sym, val) gh_define (sym, val)
+-#define scm_long2num(num) gh_long2scm (num)
+-#define scm_double2num(num) gh_double2scm (num)
+-#define scm_cons(a, b) gh_cons (a, b)
+-#define scm_makfrom0str(str) gh_str02scm (str)
+-#define scm_str2string(str) gh_str02scm (str)
+-
+-/* types */
+-#define scm_t_port scm_port
+-#endif /* defined SCM_MAJOR_VERSION */
+ #endif /* GLAME_GUILE_COMPAT_H */
diff --git a/audio/glame/files/patch-src_include_glame_guile_compat.h b/audio/glame/files/patch-src_include_glame_guile_compat.h
deleted file mode 100644
index 90492f2bf474..000000000000
--- a/audio/glame/files/patch-src_include_glame_guile_compat.h
+++ /dev/null
@@ -1,61 +0,0 @@
---- src/include/glame_guile_compat.h.orig 2008-03-02 13:59:02.000000000 -0500
-+++ src/include/glame_guile_compat.h 2008-03-02 13:59:41.000000000 -0500
-@@ -32,58 +32,10 @@
-
- #include <libguile.h>
-
--#ifdef SCM_MAJOR_VERSION
--/* this works because Guile 1.4 doesn't define SCM_MAJOR_VERSION */
--
--#define NEW_GUILE 1
--
- /* Glame wrapper functions: */
--#if (SCM_MINOR_VERSION < 7)
--/* use GLAME_NEWCELL instead of SCM_NEWCELL */
--#define GLAME_NEWCELL(z) SCM_NEWCELL(z)
--#endif
- #define glame_scm2newstr(obj, lenp) gh_scm2newstr (obj, lenp)
- #define glame_scm2long(obj) scm_num2long (obj, SCM_ARG1, "somewhere")
- #define glame_scm2double(obj) scm_num2dbl (obj, "somewhere")
- #define scm_str2string(str) gh_str02scm (str)
-
--#if (SCM_MINOR_VERSION == 7)
--#define GLAME_NEWCELL(z) z = scm_cell (SCM_UNPACK(z), 0)
--#endif
--
--#else /* Guile 1.4.x */
--
--#include <guile/gh.h>
--
--#define NEW_GUILE 0
--#define SCM_MAJOR_VERSION 1
--#define SCM_MINOR_VERSION 4
--#define SCM_MICRO_VERSION 0
--
--/* Glame wrapper functions: */
--#define GLAME_NEWCELL(z) SCM_NEWCELL(z)
--#define glame_scm2newstr(obj, lenp) gh_scm2newstr (obj, lenp)
--#define glame_scm2long(obj) gh_scm2long (obj)
--#define glame_scm2double(obj) gh_scm2double (obj)
--
--/* 1.6 compat stuff: (make guile 1.4 use the 1.6 api) */
--/* If a function cannot be easily defined in terms of a 1.4
-- function, then write a glame wrapper or reimplement the
-- version from Guile 1.6 using internal 1.4 stuff...
-- if stuff in here gets too large, maybe a glame_guile_compat.c
-- should be written
--*/
--
--#define scm_c_define_gsubr(func_name, req, opt, rest, func) gh_new_procedure(func_name, func, req, opt, rest)
--#define scm_c_export(sym, ...) /* nothing */
--#define scm_c_define(sym, val) gh_define (sym, val)
--#define scm_long2num(num) gh_long2scm (num)
--#define scm_double2num(num) gh_double2scm (num)
--#define scm_cons(a, b) gh_cons (a, b)
--#define scm_makfrom0str(str) gh_str02scm (str)
--#define scm_str2string(str) gh_str02scm (str)
--
--/* types */
--#define scm_t_port scm_port
--#endif /* defined SCM_MAJOR_VERSION */
- #endif /* GLAME_GUILE_COMPAT_H */
diff --git a/audio/glame/files/patch-src_plugins_audio__io__oss.c b/audio/glame/files/patch-src_plugins_audio__io__oss.c
new file mode 100644
index 000000000000..0a65a18ec266
--- /dev/null
+++ b/audio/glame/files/patch-src_plugins_audio__io__oss.c
@@ -0,0 +1,14 @@
+--- src/plugins/audio_io_oss.c.orig 2005-03-27 12:29:48 UTC
++++ src/plugins/audio_io_oss.c
+@@ -26,9 +26,9 @@
+
+ #ifdef HAVE_OSS_LINUX
+ #include <linux/soundcard.h>
+-#elif HAVE_OSS_SYS
++#elif defined(HAVE_OSS_SYS)
+ #include <sys/soundcard.h>
+-#elif HAVE_OSS_MACHINE
++#elif defined(HAVE_OSS_MACHINE)
+ #include <machine/soundcard.h>
+ #else
+ #error BUG in OSS configuration.
diff --git a/audio/glame/files/patch-src_swapfile_swapfile__fs.c b/audio/glame/files/patch-src_swapfile_swapfile__fs.c
new file mode 100644
index 000000000000..64443e04673e
--- /dev/null
+++ b/audio/glame/files/patch-src_swapfile_swapfile__fs.c
@@ -0,0 +1,16 @@
+--- src/swapfile/swapfile_fs.c.orig 2004-10-23 13:09:29 UTC
++++ src/swapfile/swapfile_fs.c
+@@ -44,8 +44,12 @@
+ #define DEBUG 1
+ #endif
+
+-#include <sys/stat.h>
++#if __FreeBSD__ >= 5
++#define __BSD_VISIBLE 1
++#endif
++
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <pthread.h>
+ #include <fcntl.h>
+ #include <dirent.h>
diff --git a/audio/glame/files/patch-swapfile.c b/audio/glame/files/patch-swapfile.c
deleted file mode 100644
index 412fee712593..000000000000
--- a/audio/glame/files/patch-swapfile.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- src/swapfile/swapfile_fs.c.orig Sat Oct 23 22:09:29 2004
-+++ src/swapfile/swapfile_fs.c Tue Mar 29 23:11:17 2005
-@@ -44,8 +44,12 @@
- #define DEBUG 1
- #endif
-
--#include <sys/stat.h>
-+#if __FreeBSD__ >= 5
-+#define __BSD_VISIBLE 1
-+#endif
-+
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <pthread.h>
- #include <fcntl.h>
- #include <dirent.h>
diff --git a/audio/gmixer/files/patch-Makefile b/audio/gmixer/files/patch-Makefile
index 688a6fc98822..20a85225a0c0 100644
--- a/audio/gmixer/files/patch-Makefile
+++ b/audio/gmixer/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sat Apr 3 13:33:52 1999
-+++ Makefile Sat Apr 3 13:33:54 1999
+--- Makefile.orig 1999-02-21 10:18:50 UTC
++++ Makefile
@@ -1,9 +1,9 @@
-CC = gcc
+CC ?= gcc
diff --git a/audio/gmixer/files/patch-gmixer.c b/audio/gmixer/files/patch-gmixer.c
index b1671cd76bc3..a340ea5879b4 100644
--- a/audio/gmixer/files/patch-gmixer.c
+++ b/audio/gmixer/files/patch-gmixer.c
@@ -1,5 +1,5 @@
---- gmixer.c.orig 1999-02-22 17:11:10.000000000 +0100
-+++ gmixer.c 2007-10-24 13:30:08.000000000 +0200
+--- gmixer.c.orig 1999-02-22 16:11:10 UTC
++++ gmixer.c
@@ -1,10 +1,11 @@
#include <stdio.h>
#include <stdlib.h>
@@ -13,7 +13,7 @@
#include <gtk/gtk.h>
#include "icons/gmixer.xpm"
#include "icons/mix_logo.xpm"
-@@ -378,6 +379,27 @@
+@@ -378,6 +379,27 @@ void usage(char *prog_name)
exit(0);
}
@@ -41,7 +41,7 @@
int main (int argc, char *argv[])
{
char *homedir;
-@@ -385,6 +407,7 @@
+@@ -385,6 +407,7 @@ int main (int argc, char *argv[])
char *default_dev = "/dev/mixer";
int i;
g_print ("gmixer 0.98 (22.2.1999)\nCopyleft (C) 1998,1999 - Sergey Kiselev <sergey@junior.technion.ac.il>\n");
diff --git a/audio/gnaural/files/patch-Makefile.in b/audio/gnaural/files/patch-Makefile.in
index 3f8ae3ef91b4..401b80db4dd0 100644
--- a/audio/gnaural/files/patch-Makefile.in
+++ b/audio/gnaural/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2011-05-26 00:38:21.000000000 +0200
-+++ Makefile.in 2012-01-18 07:12:38.767047961 +0100
-@@ -742,15 +742,16 @@
+--- Makefile.in.orig 2011-05-25 22:38:21 UTC
++++ Makefile.in
+@@ -742,15 +742,16 @@ uninstall-am:
install-data-local:
@$(NORMAL_INSTALL)
if test -d $(srcdir)/pixmaps; then \
diff --git a/audio/gnaural/files/patch-configure b/audio/gnaural/files/patch-configure
index 34ae4d62f1b1..1155c42400e6 100644
--- a/audio/gnaural/files/patch-configure
+++ b/audio/gnaural/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2011-05-26 00:38:21.000000000 +0200
-+++ configure 2013-10-31 06:32:24.000000000 +0100
-@@ -7642,7 +7642,7 @@
+--- configure.orig 2011-05-25 22:38:21 UTC
++++ configure
+@@ -7642,7 +7642,7 @@ case $host in
esac
#do pkgconfig stuff:
diff --git a/audio/gnomoradio/files/patch-gnomoradio_browser-link.cc b/audio/gnomoradio/files/patch-gnomoradio_browser-link.cc
index 978bdccea94e..e55afec0a3d5 100644
--- a/audio/gnomoradio/files/patch-gnomoradio_browser-link.cc
+++ b/audio/gnomoradio/files/patch-gnomoradio_browser-link.cc
@@ -1,6 +1,6 @@
---- gnomoradio/browser-link.cc.orig 2007-12-06 15:46:11.000000000 +0100
-+++ gnomoradio/browser-link.cc 2007-12-06 15:48:02.000000000 +0100
-@@ -32,7 +32,7 @@
+--- gnomoradio/browser-link.cc.orig 2004-10-17 01:41:23 UTC
++++ gnomoradio/browser-link.cc
+@@ -32,7 +32,7 @@ static void mozilla_fallback (const Glib
{
gchar *my_url = g_strdup(Glib::locale_from_utf8(url).c_str());
if (fork() == 0) {
diff --git a/audio/gnomoradio/files/patch-rainbow__license.cc b/audio/gnomoradio/files/patch-rainbow__license.cc
deleted file mode 100644
index 0a77cd7e3776..000000000000
--- a/audio/gnomoradio/files/patch-rainbow__license.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- rainbow/license.cc.orig Wed Dec 22 11:05:36 2004
-+++ rainbow/license.cc Wed Dec 22 11:06:49 2004
-@@ -54,7 +54,7 @@
- }
-
- if (done) {
-- signal<void,ref_ptr<License> > sig;
-+ sigc::signal<void,ref_ptr<License> > sig;
- sig.connect(slot);
- sig(license);
- } else {
diff --git a/audio/gnomoradio/files/patch-rainbow__rdf-resource.cc b/audio/gnomoradio/files/patch-rainbow__rdf-resource.cc
deleted file mode 100644
index 59e878ff7179..000000000000
--- a/audio/gnomoradio/files/patch-rainbow__rdf-resource.cc
+++ /dev/null
@@ -1,55 +0,0 @@
---- rainbow/rdf-resource.cc.orig Wed Dec 22 11:07:54 2004
-+++ rainbow/rdf-resource.cc Wed Dec 22 11:09:33 2004
-@@ -35,7 +35,7 @@
- resource = ref_ptr<RdfResource>(p->second);
- if (resource->downloaded) { // already downloaded
- map<Glib::ustring,xmlpp::Element*>::iterator el = resource->id_map.find(id);
-- signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
-+ sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
- sig.connect(slot);
- sig(el != resource->id_map.end() ? el->second : 0, resource);
- return;
-@@ -47,7 +47,7 @@
- Glib::ustring host, file;
- unsigned short port;
- if (!HttpClient::parse_url(uri, host, port, file)) {
-- signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
-+ sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
- sig.connect(slot);
- sig(0, resource);
- return;
-@@ -55,14 +55,14 @@
- }
-
- // connect mem_fun to appropriate signal
-- map<Glib::ustring,signal<void,xmlpp::Element*, ref_ptr<RdfResource> >*>::iterator sig;
-+ map<Glib::ustring,sigc::signal<void,xmlpp::Element*, ref_ptr<RdfResource> >*>::iterator sig;
- sig = resource->signal_map.find(id);
- if (sig != resource->signal_map.end()) {
- // found existing signal for id
- sig->second->connect(slot);
- } else {
- // need to create new signal to handle id
-- signal<void,xmlpp::Element*,ref_ptr<RdfResource> > *signal_ = new signal<void,xmlpp::Element*,ref_ptr<RdfResource> >;
-+ sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> > *signal_ = new sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> >;
- signal_->connect(slot);
- resource->signal_map.insert(make_pair(id, signal_));
- }
-@@ -190,7 +190,7 @@
-
- error:
- // call all signals
-- map<Glib::ustring,signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
-+ map<Glib::ustring,sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
- for (signal = signal_map.begin(); signal != signal_map.end(); ++signal) {
- map<Glib::ustring,xmlpp::Element*>::iterator el = id_map.find(signal->first);
- signal->second->emit(el != id_map.end() ? el->second : 0, ref_ptr<RdfResource>(this));
-@@ -204,7 +204,7 @@
-
- void Rainbow::RdfResource::clear_signal_map ()
- {
-- map<Glib::ustring,signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
-+ map<Glib::ustring,sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
- for (signal = signal_map.begin(); signal != signal_map.end(); ++signal)
- delete signal->second;
- signal_map.clear();
diff --git a/audio/gnomoradio/files/patch-rainbow_license.cc b/audio/gnomoradio/files/patch-rainbow_license.cc
new file mode 100644
index 000000000000..433a80a1edf6
--- /dev/null
+++ b/audio/gnomoradio/files/patch-rainbow_license.cc
@@ -0,0 +1,11 @@
+--- rainbow/license.cc.orig 2004-10-17 04:03:47 UTC
++++ rainbow/license.cc
+@@ -54,7 +54,7 @@ void Rainbow::License::get_and_do (const
+ }
+
+ if (done) {
+- signal<void,ref_ptr<License> > sig;
++ sigc::signal<void,ref_ptr<License> > sig;
+ sig.connect(slot);
+ sig(license);
+ } else {
diff --git a/audio/gnomoradio/files/patch-rainbow_rdf-resource.cc b/audio/gnomoradio/files/patch-rainbow_rdf-resource.cc
new file mode 100644
index 000000000000..ae4d864cb18a
--- /dev/null
+++ b/audio/gnomoradio/files/patch-rainbow_rdf-resource.cc
@@ -0,0 +1,55 @@
+--- rainbow/rdf-resource.cc.orig 2004-10-17 04:06:10 UTC
++++ rainbow/rdf-resource.cc
+@@ -35,7 +35,7 @@ void Rainbow::RdfResource::get_and_do (c
+ resource = ref_ptr<RdfResource>(p->second);
+ if (resource->downloaded) { // already downloaded
+ map<Glib::ustring,xmlpp::Element*>::iterator el = resource->id_map.find(id);
+- signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
++ sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
+ sig.connect(slot);
+ sig(el != resource->id_map.end() ? el->second : 0, resource);
+ return;
+@@ -47,7 +47,7 @@ void Rainbow::RdfResource::get_and_do (c
+ Glib::ustring host, file;
+ unsigned short port;
+ if (!HttpClient::parse_url(uri, host, port, file)) {
+- signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
++ sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> > sig;
+ sig.connect(slot);
+ sig(0, resource);
+ return;
+@@ -55,14 +55,14 @@ void Rainbow::RdfResource::get_and_do (c
+ }
+
+ // connect mem_fun to appropriate signal
+- map<Glib::ustring,signal<void,xmlpp::Element*, ref_ptr<RdfResource> >*>::iterator sig;
++ map<Glib::ustring,sigc::signal<void,xmlpp::Element*, ref_ptr<RdfResource> >*>::iterator sig;
+ sig = resource->signal_map.find(id);
+ if (sig != resource->signal_map.end()) {
+ // found existing signal for id
+ sig->second->connect(slot);
+ } else {
+ // need to create new signal to handle id
+- signal<void,xmlpp::Element*,ref_ptr<RdfResource> > *signal_ = new signal<void,xmlpp::Element*,ref_ptr<RdfResource> >;
++ sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> > *signal_ = new sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> >;
+ signal_->connect(slot);
+ resource->signal_map.insert(make_pair(id, signal_));
+ }
+@@ -190,7 +190,7 @@ void Rainbow::RdfResource::on_downloaded
+
+ error:
+ // call all signals
+- map<Glib::ustring,signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
++ map<Glib::ustring,sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
+ for (signal = signal_map.begin(); signal != signal_map.end(); ++signal) {
+ map<Glib::ustring,xmlpp::Element*>::iterator el = id_map.find(signal->first);
+ signal->second->emit(el != id_map.end() ? el->second : 0, ref_ptr<RdfResource>(this));
+@@ -204,7 +204,7 @@ void Rainbow::RdfResource::on_downloaded
+
+ void Rainbow::RdfResource::clear_signal_map ()
+ {
+- map<Glib::ustring,signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
++ map<Glib::ustring,sigc::signal<void,xmlpp::Element*,ref_ptr<RdfResource> >*>::iterator signal;
+ for (signal = signal_map.begin(); signal != signal_map.end(); ++signal)
+ delete signal->second;
+ signal_map.clear();
diff --git a/audio/gnomoradio/files/patch-rainbow_sha1.h b/audio/gnomoradio/files/patch-rainbow_sha1.h
index 293864ccaa8a..f5393dcada32 100644
--- a/audio/gnomoradio/files/patch-rainbow_sha1.h
+++ b/audio/gnomoradio/files/patch-rainbow_sha1.h
@@ -1,5 +1,5 @@
---- rainbow/sha1.h.orig Tue Aug 16 17:32:22 2005
-+++ rainbow/sha1.h Tue Aug 16 17:33:26 2005
+--- rainbow/sha1.h.orig 2004-10-17 01:26:13 UTC
++++ rainbow/sha1.h
@@ -22,7 +22,7 @@
#ifndef _SHA1_H_
#define _SHA1_H_
@@ -9,7 +9,7 @@
/*
* If you do not have the ISO standard stdint.h header file, then you
* must typdef the following:
-@@ -57,7 +57,7 @@
+@@ -57,7 +57,7 @@ typedef struct SHA1Context
uint32_t Length_High; /* Message length in bits */
/* Index into message block array */
diff --git a/audio/gnomoradio/files/patch-roboradio-audio_prober.cc b/audio/gnomoradio/files/patch-roboradio-audio_prober.cc
deleted file mode 100644
index d03d1e8c686b..000000000000
--- a/audio/gnomoradio/files/patch-roboradio-audio_prober.cc
+++ /dev/null
@@ -1,58 +0,0 @@
---- roboradio/audio/prober.cc.orig 2007-12-06 15:39:58.000000000 +0100
-+++ roboradio/audio/prober.cc 2007-12-06 15:40:19.000000000 +0100
-@@ -21,6 +21,30 @@
- #include "../mp3/esd-audio.h"
- }
-
-+namespace Roboradio
-+{
-+ namespace Audio
-+ {
-+ gboolean probe (gpointer s)
-+ {
-+ Prober *sng = static_cast<Prober*>(s);
-+ if (esdout_playing()) {
-+ int pos = sng->get_position();
-+ if (pos >= 0)
-+ sng->signal_position_changed(pos);
-+ return true;
-+ } else if (sng->get_position() >= 0) {
-+ return true;
-+ } else {
-+ sng->stop();
-+ sng->signal_done();
-+ sng->activated = false;
-+ return false;
-+ }
-+ }
-+ }
-+}
-+
- Roboradio::Audio::Prober::Prober ()
- : activated(false)
- {
-@@ -31,24 +55,6 @@
- stop_prober();
- }
-
--gboolean Roboradio::Audio::probe (gpointer s)
--{
-- Prober *sng = static_cast<Prober*>(s);
-- if (esdout_playing()) {
-- int pos = sng->get_position();
-- if (pos >= 0)
-- sng->signal_position_changed(pos);
-- return true;
-- } else if (sng->get_position() >= 0) {
-- return true;
-- } else {
-- sng->stop();
-- sng->signal_done();
-- sng->activated = false;
-- return false;
-- }
--}
--
- void Roboradio::Audio::Prober::start_prober ()
- {
- if (activated)
diff --git a/audio/gnomoradio/files/patch-roboradio_audio_ogg.cc b/audio/gnomoradio/files/patch-roboradio_audio_ogg.cc
index f6d6ebae9397..8e3de78994ed 100644
--- a/audio/gnomoradio/files/patch-roboradio_audio_ogg.cc
+++ b/audio/gnomoradio/files/patch-roboradio_audio_ogg.cc
@@ -1,6 +1,6 @@
---- roboradio/audio/ogg.cc.orig
+--- roboradio/audio/ogg.cc.orig 2004-11-06 21:55:32 UTC
+++ roboradio/audio/ogg.cc
-@@ -193,6 +193,7 @@
+@@ -193,6 +193,7 @@ void Roboradio::Audio::Ogg::thread_funct
int device_id = ao_default_driver_id();
ao_sample_format output_fmt;
diff --git a/audio/gnomoradio/files/patch-roboradio_audio_prober.cc b/audio/gnomoradio/files/patch-roboradio_audio_prober.cc
new file mode 100644
index 000000000000..707803cc2380
--- /dev/null
+++ b/audio/gnomoradio/files/patch-roboradio_audio_prober.cc
@@ -0,0 +1,58 @@
+--- roboradio/audio/prober.cc.orig 2004-10-17 01:40:36 UTC
++++ roboradio/audio/prober.cc
+@@ -21,6 +21,30 @@ extern "C" {
+ #include "../mp3/esd-audio.h"
+ }
+
++namespace Roboradio
++{
++ namespace Audio
++ {
++ gboolean probe (gpointer s)
++ {
++ Prober *sng = static_cast<Prober*>(s);
++ if (esdout_playing()) {
++ int pos = sng->get_position();
++ if (pos >= 0)
++ sng->signal_position_changed(pos);
++ return true;
++ } else if (sng->get_position() >= 0) {
++ return true;
++ } else {
++ sng->stop();
++ sng->signal_done();
++ sng->activated = false;
++ return false;
++ }
++ }
++ }
++}
++
+ Roboradio::Audio::Prober::Prober ()
+ : activated(false)
+ {
+@@ -31,24 +55,6 @@ Roboradio::Audio::Prober::~Prober ()
+ stop_prober();
+ }
+
+-gboolean Roboradio::Audio::probe (gpointer s)
+-{
+- Prober *sng = static_cast<Prober*>(s);
+- if (esdout_playing()) {
+- int pos = sng->get_position();
+- if (pos >= 0)
+- sng->signal_position_changed(pos);
+- return true;
+- } else if (sng->get_position() >= 0) {
+- return true;
+- } else {
+- sng->stop();
+- sng->signal_done();
+- sng->activated = false;
+- return false;
+- }
+-}
+-
+ void Roboradio::Audio::Prober::start_prober ()
+ {
+ if (activated)
diff --git a/audio/gnormalize/files/patch-Makefile b/audio/gnormalize/files/patch-Makefile
index 8843c6a86ad2..781f7571f942 100644
--- a/audio/gnormalize/files/patch-Makefile
+++ b/audio/gnormalize/files/patch-Makefile
@@ -1,5 +1,5 @@
---- ./Makefile.orig 2008-06-11 03:03:39.000000000 +0200
-+++ ./Makefile 2014-04-06 19:58:34.694394244 +0200
+--- Makefile.orig 2008-06-11 01:03:39 UTC
++++ Makefile
@@ -1,15 +1,18 @@
-PREFIX=/usr
+PREFIX=/usr/local
@@ -22,7 +22,7 @@
all:
clean:
-@@ -17,29 +20,30 @@
+@@ -17,29 +20,30 @@ distclean: clean
install: all
diff --git a/audio/gnuitar/files/patch-src_main.c b/audio/gnuitar/files/patch-src_main.c
index b611da00e228..cf61d1e7099f 100644
--- a/audio/gnuitar/files/patch-src_main.c
+++ b/audio/gnuitar/files/patch-src_main.c
@@ -1,5 +1,5 @@
---- src/main.c.orig Fri Apr 15 16:37:41 2005
-+++ src/main.c Thu Dec 14 21:41:20 2006
+--- src/main.c.orig 2005-04-15 14:37:41 UTC
++++ src/main.c
@@ -109,6 +109,9 @@
#include <fcntl.h>
#include <sys/types.h>
@@ -10,7 +10,7 @@
#ifdef DEMO
#define DEMO_MSG "\n\nThis is the demo version of the GNUitar program." \
"\nYou may download the full version as a source distribution" \
-@@ -953,9 +956,6 @@
+@@ -953,9 +956,6 @@ main(int argc, char **argv)
struct sched_param p;
@@ -20,7 +20,7 @@
max_priority = sched_get_priority_max(SCHED_FIFO);
p.sched_priority = max_priority;
-@@ -964,6 +964,12 @@
+@@ -964,6 +964,12 @@ main(int argc, char **argv)
("\nFailed to set scheduler priority. (Are you running as root?)");
printf("\nContinuing with default priority");
}
diff --git a/audio/gqmpeg/files/patch-configure b/audio/gqmpeg/files/patch-configure
index df69b2eeb60b..85ceb359e7ca 100644
--- a/audio/gqmpeg/files/patch-configure
+++ b/audio/gqmpeg/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2003-02-02 05:27:15.000000000 +0100
-+++ configure 2014-09-25 17:43:37.000000000 +0200
-@@ -4027,10 +4027,9 @@
+--- configure.orig 2003-02-02 04:27:15 UTC
++++ configure
+@@ -4027,10 +4027,9 @@ else
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
@@ -12,7 +12,7 @@
; return 0; }
EOF
if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-@@ -4416,7 +4415,6 @@
+@@ -4416,7 +4415,6 @@ else
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
@@ -20,7 +20,7 @@
extern
#ifdef __cplusplus
"C"
-@@ -4424,7 +4422,7 @@
+@@ -4424,7 +4422,7 @@ extern
const char *_nl_expand_alias ();
int main() {
bindtextdomain ("", "");
diff --git a/audio/gqmpeg/files/patch-src_ui__pixbuf__save.c b/audio/gqmpeg/files/patch-src_ui__pixbuf__save.c
index 784f894f2e71..9458997c3a4b 100644
--- a/audio/gqmpeg/files/patch-src_ui__pixbuf__save.c
+++ b/audio/gqmpeg/files/patch-src_ui__pixbuf__save.c
@@ -1,5 +1,5 @@
---- src/ui_pixbuf_save.c.orig 2002-03-09 20:00:13.000000000 +0100
-+++ src/ui_pixbuf_save.c 2014-12-23 23:54:56.105240001 +0100
+--- src/ui_pixbuf_save.c.orig 2002-03-09 19:00:13 UTC
++++ src/ui_pixbuf_save.c
@@ -86,7 +86,7 @@ gboolean pixbuf_to_file_as_png (GdkPixbu
return FALSE;
}
diff --git a/audio/grip/files/patch-src-gripcfg.c b/audio/grip/files/patch-src-gripcfg.c
deleted file mode 100644
index 37e138ce304d..000000000000
--- a/audio/grip/files/patch-src-gripcfg.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gripcfg.c.orig 2013-05-12 21:29:57.498271858 +0100
-+++ src/gripcfg.c 2013-05-12 21:30:09.109272899 +0100
-@@ -791,7 +791,7 @@
- };
-
- #ifdef CDPAR
-- if(ripcfg==0) return;
-+ if(ripcfg==0) return (0);
- #endif
-
- sprintf(buf,"%s/%s-%s",getenv("HOME"),ginfo->config_filename,
diff --git a/audio/grip/files/patch-src__main.c b/audio/grip/files/patch-src__main.c
deleted file mode 100644
index 7da04c7fd540..000000000000
--- a/audio/grip/files/patch-src__main.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/main.c.orig 2010-04-13 08:46:10.000000000 -0300
-+++ src/main.c 2010-04-13 08:46:45.000000000 -0300
-@@ -164,7 +164,7 @@
- GNOME_PARAM_POPT_TABLE,options,
- GNOME_PROGRAM_STANDARD_PROPERTIES,NULL);
-
-- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF8");
-+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- setenv("CHARSET","UTF-8",1);
-
- /* Session Management */
diff --git a/audio/grip/files/patch-src_gripcfg.c b/audio/grip/files/patch-src_gripcfg.c
new file mode 100644
index 000000000000..e143a856c8f8
--- /dev/null
+++ b/audio/grip/files/patch-src_gripcfg.c
@@ -0,0 +1,11 @@
+--- src/gripcfg.c.orig 2005-06-25 18:00:55 UTC
++++ src/gripcfg.c
+@@ -791,7 +791,7 @@ gboolean LoadRipperConfig(GripInfo *ginf
+ };
+
+ #ifdef CDPAR
+- if(ripcfg==0) return;
++ if(ripcfg==0) return (0);
+ #endif
+
+ sprintf(buf,"%s/%s-%s",getenv("HOME"),ginfo->config_filename,
diff --git a/audio/grip/files/patch-src_main.c b/audio/grip/files/patch-src_main.c
new file mode 100644
index 000000000000..b509371b68e8
--- /dev/null
+++ b/audio/grip/files/patch-src_main.c
@@ -0,0 +1,11 @@
+--- src/main.c.orig 2005-06-25 18:00:55 UTC
++++ src/main.c
+@@ -164,7 +164,7 @@ int Cmain(int argc, char* argv[])
+ GNOME_PARAM_POPT_TABLE,options,
+ GNOME_PROGRAM_STANDARD_PROPERTIES,NULL);
+
+- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF8");
++ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ setenv("CHARSET","UTF-8",1);
+
+ /* Session Management */
diff --git a/audio/grip/files/patch-src_tray.c b/audio/grip/files/patch-src_tray.c
index d3ec2c2a19b9..36a1b5786aed 100644
--- a/audio/grip/files/patch-src_tray.c
+++ b/audio/grip/files/patch-src_tray.c
@@ -1,5 +1,5 @@
---- src/tray.c.orig 2005-01-29 19:34:17.000000000 +0100
-+++ src/tray.c 2010-12-01 22:20:00.000000000 +0100
+--- src/tray.c.orig 2005-01-29 18:34:17 UTC
++++ src/tray.c
@@ -20,6 +20,7 @@
* USA
*/
diff --git a/audio/gsm/files/patch-Makefile b/audio/gsm/files/patch-Makefile
index 1de797d31ff4..d11b2443772a 100644
--- a/audio/gsm/files/patch-Makefile
+++ b/audio/gsm/files/patch-Makefile
@@ -1,6 +1,6 @@
---- ./Makefile.orig 2006-04-26 19:14:26.000000000 +0000
-+++ ./Makefile 2014-02-23 10:31:06.000000000 +0000
-@@ -43,8 +43,8 @@
+--- Makefile.orig 2006-04-26 19:14:26 UTC
++++ Makefile
+@@ -43,8 +43,8 @@ WAV49 = -DWAV49
# CC = /usr/lang/acc
# CCFLAGS = -c -O
@@ -11,7 +11,7 @@
LD = $(CC)
-@@ -59,11 +59,13 @@
+@@ -59,11 +59,13 @@ LD = $(CC)
######### Includes needed by $(CC)
# LDINC = -L/usr/gnu/lib/gcc-2.1/gcc-lib/sparc-sun-sunos4.1.2/2.1
@@ -25,7 +25,7 @@
# Where do you want to install libraries, binaries, a header file
# and the manual pages?
-@@ -71,7 +73,7 @@
+@@ -71,7 +73,7 @@ LD = $(CC)
# Leave INSTALL_ROOT empty (or just don't execute "make install") to
# not install gsm and toast outside of this directory.
@@ -34,7 +34,7 @@
# Where do you want to install the gsm library, header file, and manpages?
#
-@@ -80,7 +82,7 @@
+@@ -80,7 +82,7 @@ INSTALL_ROOT =
GSM_INSTALL_ROOT = $(INSTALL_ROOT)
GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
@@ -43,7 +43,7 @@
GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
-@@ -106,6 +108,7 @@
+@@ -106,6 +108,7 @@ COMPRESS = compress
COMPRESSFLAGS =
# RANLIB = true
RANLIB = ranlib
@@ -51,7 +51,7 @@
#
# You shouldn't have to configure below this line if you're porting.
-@@ -129,18 +132,19 @@
+@@ -129,18 +132,19 @@ INC = $(ROOT)/inc
# DEBUG = -DNDEBUG
######### Remove -DNDEBUG to enable assertions.
@@ -74,7 +74,7 @@
TOAST = $(BIN)/toast
UNTOAST = $(BIN)/untoast
TCAT = $(BIN)/tcat
-@@ -257,13 +261,15 @@
+@@ -257,13 +261,15 @@ STUFF = ChangeLog \
# Install targets
GSM_INSTALL_TARGETS = \
@@ -91,7 +91,7 @@
TOAST_INSTALL_TARGETS = \
$(TOAST_INSTALL_BIN)/toast \
$(TOAST_INSTALL_BIN)/tcat \
-@@ -277,9 +283,12 @@
+@@ -277,9 +283,12 @@ TOAST_INSTALL_TARGETS = \
$(CC) $(CFLAGS) $?
@-mv `$(BASENAME) $@` $@ > /dev/null 2>&1
@@ -105,7 +105,7 @@
@-echo $(ROOT): Done.
tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
-@@ -299,24 +308,28 @@
+@@ -299,24 +308,28 @@ install: toastinstall gsminstall
# The basic API: libgsm
@@ -144,7 +144,7 @@
# The local bin and lib directories
-@@ -342,62 +355,66 @@
+@@ -342,62 +355,66 @@ toastinstall:
gsmuninstall:
-if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
diff --git a/audio/gsm/files/patch-inc_config.h b/audio/gsm/files/patch-inc_config.h
index 196e0bba47ad..2cc75871d85b 100644
--- a/audio/gsm/files/patch-inc_config.h
+++ b/audio/gsm/files/patch-inc_config.h
@@ -1,5 +1,5 @@
---- inc/config.h.orig Wed Apr 26 12:14:26 2006
-+++ inc/config.h Fri Aug 11 13:44:23 2006
+--- inc/config.h.orig 2006-04-26 19:14:26 UTC
++++ inc/config.h
@@ -28,8 +28,8 @@
/*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */
diff --git a/audio/gstreamer-plugins-moodbar/files/patch-analyzer_main.c b/audio/gstreamer-plugins-moodbar/files/patch-analyzer_main.c
new file mode 100644
index 000000000000..e9f31d309736
--- /dev/null
+++ b/audio/gstreamer-plugins-moodbar/files/patch-analyzer_main.c
@@ -0,0 +1,11 @@
+--- analyzer/main.c.orig 2006-10-12 05:43:30 UTC
++++ analyzer/main.c
+@@ -261,7 +261,7 @@ main (gint argc, gchar *argv[])
+ };
+ GOptionContext *ctx;
+ GError *err = NULL;
+-
++ g_thread_init(NULL);
+ ctx = g_option_context_new ("[INFILE] - Run moodbar analyzer");
+ g_option_context_add_group (ctx, gst_init_get_option_group ());
+ g_option_context_add_main_entries (ctx, entries, NULL);
diff --git a/audio/gstreamer-plugins-moodbar/files/patch-main.c b/audio/gstreamer-plugins-moodbar/files/patch-main.c
deleted file mode 100644
index 945b9a961348..000000000000
--- a/audio/gstreamer-plugins-moodbar/files/patch-main.c
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -crB analyzer/main.c analyzer_patched/main.c
-*** analyzer/main.c 2006-10-12 07:43:30.000000000 +0200
---- analyzer_patched/main.c 2010-02-15 20:24:57.000000000 +0100
-***************
-*** 261,267 ****
- };
- GOptionContext *ctx;
- GError *err = NULL;
-!
- ctx = g_option_context_new ("[INFILE] - Run moodbar analyzer");
- g_option_context_add_group (ctx, gst_init_get_option_group ());
- g_option_context_add_main_entries (ctx, entries, NULL);
---- 261,267 ----
- };
- GOptionContext *ctx;
- GError *err = NULL;
-! g_thread_init(NULL);
- ctx = g_option_context_new ("[INFILE] - Run moodbar analyzer");
- g_option_context_add_group (ctx, gst_init_get_option_group ());
- g_option_context_add_main_entries (ctx, entries, NULL);
diff --git a/audio/gtkguitune/files/patch-lcdview.cc b/audio/gtkguitune/files/patch-lcdview.cc
index c6d63c58ac7c..230d96697dca 100644
--- a/audio/gtkguitune/files/patch-lcdview.cc
+++ b/audio/gtkguitune/files/patch-lcdview.cc
@@ -1,4 +1,4 @@
---- lcdview.cc.orig
+--- lcdview.cc.orig 2008-09-16 09:56:09 UTC
+++ lcdview.cc
@@ -23,11 +23,12 @@
diff --git a/audio/gvolwheel/files/patch-Makefile.in b/audio/gvolwheel/files/patch-Makefile.in
index 9db7ea06a7c0..e3e0f4a030e9 100644
--- a/audio/gvolwheel/files/patch-Makefile.in
+++ b/audio/gvolwheel/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2012-04-08 00:37:17.000000000 +0200
-+++ Makefile.in 2013-08-03 17:39:52.000000000 +0200
-@@ -315,14 +315,8 @@
+--- Makefile.in.orig 2012-04-07 22:37:17 UTC
++++ Makefile.in
+@@ -315,14 +315,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src po
diff --git a/audio/gvolwheel/files/patch-src_oss.c b/audio/gvolwheel/files/patch-src_oss.c
index f999b2617530..a2af139c85a6 100644
--- a/audio/gvolwheel/files/patch-src_oss.c
+++ b/audio/gvolwheel/files/patch-src_oss.c
@@ -1,5 +1,5 @@
---- src/oss.c.orig 2013-02-05 00:07:25.250545453 +0400
-+++ src/oss.c 2013-02-05 00:08:55.817607467 +0400
+--- src/oss.c.orig 2012-04-07 21:18:50 UTC
++++ src/oss.c
@@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
-@@ -51,4 +52,4 @@
+@@ -51,4 +52,4 @@ void vol_backend_set(int mixer, int valu
ioctl(mixer_fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &vol);
else if (mixer == 1)
ioctl(mixer_fd, MIXER_WRITE(SOUND_MIXER_PCM), &vol);
diff --git a/audio/gxmms2/files/patch-Makefile b/audio/gxmms2/files/patch-Makefile
index 1a3895ba4b3d..fc3f45c9b6f7 100644
--- a/audio/gxmms2/files/patch-Makefile
+++ b/audio/gxmms2/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2009-01-04 19:30:38.000000000 +0100
-+++ Makefile 2013-12-15 22:56:10.004889065 +0100
+--- Makefile.orig 2009-01-04 18:30:38 UTC
++++ Makefile
@@ -1,8 +1,6 @@
# Makefile for gxmms2 and gkrellxmms2
@@ -9,7 +9,7 @@
ALLFILES=gkrellxmms2/*.c gkrellxmms2/*.h gkrellxmms2/*.xpm gmedialib/*.c gmedialib/*.h gmedialib/*.xpm gtrackinfo/*.c gtrackinfo/*.h gxmms2src/*.c gxmms2src/*.h gxmms2src/*.xpm sdecode/*.c sdecode/*.h xmms2ctrl/*.c xmms2ctrl/*.h Makefile README COPYING CHANGELOG
-@@ -13,7 +11,7 @@
+@@ -13,7 +11,7 @@ XMMS2_LIB=$(shell pkg-config xmms2-clien
CFLAGS ?= -O2
CFLAGS := -Wall -fPIC $(GTK_CFLAGS) $(XMMS2_CFLAGS) -I. $(CFLAGS)
diff --git a/audio/harp/files/patch-shuffle.c b/audio/harp/files/patch-shuffle.c
index 4f5be5927fa9..9f25e81d1eb7 100644
--- a/audio/harp/files/patch-shuffle.c
+++ b/audio/harp/files/patch-shuffle.c
@@ -1,6 +1,6 @@
---- shuffle.c.orig 2015-07-30 06:53:22.145389293 +0800
-+++ shuffle.c 2015-07-30 06:54:51.465466007 +0800
-@@ -159,10 +159,7 @@
+--- shuffle.c.orig 2015-07-24 17:35:12 UTC
++++ shuffle.c
+@@ -159,10 +159,7 @@ struct zs_arg{
const unsigned int items;
const unsigned int group_items;
const unsigned int increment;
@@ -12,7 +12,7 @@
unsigned int count;
int slidemod;
char *query;
-@@ -260,7 +257,7 @@
+@@ -260,7 +257,7 @@ void zshuffle(unsigned int items){
struct candidate_data candlist;
srandom((unsigned int)time(NULL));
diff --git a/audio/herrie/files/patch-libxspf b/audio/herrie/files/patch-libxspf
index 00dc3057b205..026b737faa38 100644
--- a/audio/herrie/files/patch-libxspf
+++ b/audio/herrie/files/patch-libxspf
@@ -1,6 +1,6 @@
---- configure
+--- configure.orig 2008-10-14 16:20:58 UTC
+++ configure
-@@ -301,7 +301,7 @@ fi
+@@ -288,7 +288,7 @@ fi
if [ "$CFG_XSPF" != "" ]
then
CFLAGS="$CFLAGS -DBUILD_XSPF"
@@ -9,7 +9,7 @@
SRCS="$SRCS util vfs_xspf"
PLAYQ_DUMPFILE="autosave.xspf"
else
---- src/conftest.c
+--- src/conftest.c.orig 2008-10-14 16:20:58 UTC
+++ src/conftest.c
@@ -56,16 +56,10 @@
#include <vorbis/codec.h>
@@ -28,7 +28,7 @@
return (0);
}
---- src/vfs_xspf.c
+--- src/vfs_xspf.c.orig 2008-10-14 16:20:58 UTC
+++ src/vfs_xspf.c
@@ -30,7 +30,7 @@
@@ -39,7 +39,7 @@
#include "util.h"
#include "vfs.h"
-@@ -50,22 +50,22 @@ vfs_xspf_match(struct vfsent *ve, int isdir)
+@@ -50,22 +50,22 @@ vfs_xspf_match(struct vfsent *ve, int is
int
vfs_xspf_populate(struct vfsent *ve)
{
diff --git a/audio/hydrogen-devel/files/patch-CMakeLists.txt b/audio/hydrogen-devel/files/patch-CMakeLists.txt
index e43b6f3f9e35..007da737c55a 100644
--- a/audio/hydrogen-devel/files/patch-CMakeLists.txt
+++ b/audio/hydrogen-devel/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig 2015-09-07 03:44:01 UTC
+--- CMakeLists.txt.orig 2015-08-31 19:04:48 UTC
+++ CMakeLists.txt
@@ -107,12 +107,12 @@ ENDIF()
IF(APPLE)
diff --git a/audio/hydrogen-devel/files/patch-src__cli__CMakeLists.txt b/audio/hydrogen-devel/files/patch-src_cli_CMakeLists.txt
index 966e4943176d..966e4943176d 100644
--- a/audio/hydrogen-devel/files/patch-src__cli__CMakeLists.txt
+++ b/audio/hydrogen-devel/files/patch-src_cli_CMakeLists.txt
diff --git a/audio/hydrogen-devel/files/patch-src__core__CMakeLists.txt b/audio/hydrogen-devel/files/patch-src_core_CMakeLists.txt
index 7afab1095a02..7afab1095a02 100644
--- a/audio/hydrogen-devel/files/patch-src__core__CMakeLists.txt
+++ b/audio/hydrogen-devel/files/patch-src_core_CMakeLists.txt
diff --git a/audio/hydrogen-devel/files/patch-src__core__include__hydrogen__LashClient.h b/audio/hydrogen-devel/files/patch-src_core_include_hydrogen_LashClient.h
index a26683a14f04..a26683a14f04 100644
--- a/audio/hydrogen-devel/files/patch-src__core__include__hydrogen__LashClient.h
+++ b/audio/hydrogen-devel/files/patch-src_core_include_hydrogen_LashClient.h
diff --git a/audio/hydrogen-devel/files/patch-src__gui__CMakeLists.txt b/audio/hydrogen-devel/files/patch-src_gui_CMakeLists.txt
index 522d3e9c0066..522d3e9c0066 100644
--- a/audio/hydrogen-devel/files/patch-src__gui__CMakeLists.txt
+++ b/audio/hydrogen-devel/files/patch-src_gui_CMakeLists.txt
diff --git a/audio/hydrogen-devel/files/patch-src__player__CMakeLists.txt b/audio/hydrogen-devel/files/patch-src_player_CMakeLists.txt
index 6372500b97ce..6372500b97ce 100644
--- a/audio/hydrogen-devel/files/patch-src__player__CMakeLists.txt
+++ b/audio/hydrogen-devel/files/patch-src_player_CMakeLists.txt
diff --git a/audio/hydrogen-devel/files/patch-src__synth__CMakeLists.txt b/audio/hydrogen-devel/files/patch-src_synth_CMakeLists.txt
index 62e9a830ffbd..62e9a830ffbd 100644
--- a/audio/hydrogen-devel/files/patch-src__synth__CMakeLists.txt
+++ b/audio/hydrogen-devel/files/patch-src_synth_CMakeLists.txt
diff --git a/audio/hydrogen/files/patch-cmake__FindHelper.cmake b/audio/hydrogen/files/patch-cmake_FindHelper.cmake
index 23650b916640..23650b916640 100644
--- a/audio/hydrogen/files/patch-cmake__FindHelper.cmake
+++ b/audio/hydrogen/files/patch-cmake_FindHelper.cmake
diff --git a/audio/hydrogen/files/patch-src__cli__CMakeLists.txt b/audio/hydrogen/files/patch-src_cli_CMakeLists.txt
index 2cbd8a839274..2cbd8a839274 100644
--- a/audio/hydrogen/files/patch-src__cli__CMakeLists.txt
+++ b/audio/hydrogen/files/patch-src_cli_CMakeLists.txt
diff --git a/audio/hydrogen/files/patch-src__gui__CMakeLists.txt b/audio/hydrogen/files/patch-src_gui_CMakeLists.txt
index 2a37c7edf4d3..2a37c7edf4d3 100644
--- a/audio/hydrogen/files/patch-src__gui__CMakeLists.txt
+++ b/audio/hydrogen/files/patch-src_gui_CMakeLists.txt
diff --git a/audio/hydrogen/files/patch-src__player__CMakeLists.txt b/audio/hydrogen/files/patch-src_player_CMakeLists.txt
index 56514f792210..56514f792210 100644
--- a/audio/hydrogen/files/patch-src__player__CMakeLists.txt
+++ b/audio/hydrogen/files/patch-src_player_CMakeLists.txt
diff --git a/audio/hydrogen/files/patch-src__synth__CMakeLists.txt b/audio/hydrogen/files/patch-src_synth_CMakeLists.txt
index afd0598b62c7..afd0598b62c7 100644
--- a/audio/hydrogen/files/patch-src__synth__CMakeLists.txt
+++ b/audio/hydrogen/files/patch-src_synth_CMakeLists.txt
diff --git a/audio/icecast-kh/files/patch-Makefile.in b/audio/icecast-kh/files/patch-Makefile.in
deleted file mode 100644
index 763310470585..000000000000
--- a/audio/icecast-kh/files/patch-Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- conf/Makefile.in.orig 2008-05-30 08:58:57.000000000 +0900
-+++ conf/Makefile.in 2010-05-14 17:36:16.000000000 +0900
-@@ -407,8 +407,7 @@
-
- install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-- test -f $(DESTDIR)$(sysconfdir)/icecast.xml || \
-- $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml
-+ $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml.sample
-
- icecast.xml.dist: $(srcdir)/icecast.xml.in
- $(edit) $(srcdir)/icecast.xml.in > icecast.xml.dist
diff --git a/audio/icecast-kh/files/patch-conf_Makefile.in b/audio/icecast-kh/files/patch-conf_Makefile.in
new file mode 100644
index 000000000000..b91bcdfe5ec5
--- /dev/null
+++ b/audio/icecast-kh/files/patch-conf_Makefile.in
@@ -0,0 +1,12 @@
+--- conf/Makefile.in.orig 2014-02-18 01:46:17 UTC
++++ conf/Makefile.in
+@@ -459,8 +459,7 @@ uninstall-am: uninstall-docDATA
+
+ install-data-hook:
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+- test -f $(DESTDIR)$(sysconfdir)/icecast.xml || \
+- $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml
++ $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml.sample
+
+ uninstall-hook:
+ -rm -f $(DESTDIR)$(sysconfdir)/icecast.xml
diff --git a/audio/icecast-kh/files/patch-configure b/audio/icecast-kh/files/patch-configure
index c87d7b421805..32f5503671fc 100644
--- a/audio/icecast-kh/files/patch-configure
+++ b/audio/icecast-kh/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2012-09-12 09:17:21.000000000 +0700
-+++ configure 2013-02-24 02:48:14.000000000 +0700
-@@ -793,6 +793,7 @@
+--- configure.orig 2014-02-18 01:46:17 UTC
++++ configure
+@@ -793,6 +793,7 @@ with_theora
with_speex
with_curl
with_curl_config
@@ -8,7 +8,7 @@
enable_yp
with_openssl
'
-@@ -17610,6 +17611,16 @@
+@@ -17648,6 +17649,16 @@ $as_echo "$as_me: WARNING: Speex support
fi
@@ -25,7 +25,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kate_decode_init in -lkate" >&5
$as_echo_n "checking for kate_decode_init in -lkate... " >&6; }
-@@ -17707,6 +17718,7 @@
+@@ -17745,6 +17756,7 @@ $as_echo "#define HAVE_KATE 1" >>confdef
fi
#ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_kate.o"
diff --git a/audio/icecast2/files/patch-conf-Makefile.in b/audio/icecast2/files/patch-conf-Makefile.in
deleted file mode 100644
index 6549fe5eff62..000000000000
--- a/audio/icecast2/files/patch-conf-Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- conf/Makefile.in.orig 2008-05-29 23:58:57 UTC
-+++ conf/Makefile.in
-@@ -407,8 +407,7 @@
-
- install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
-- test -f $(DESTDIR)$(sysconfdir)/icecast.xml || \
-- $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml
-+ $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml.sample
-
- icecast.xml.dist: $(srcdir)/icecast.xml.in
- $(edit) $(srcdir)/icecast.xml.in > icecast.xml.dist
diff --git a/audio/icecast2/files/patch-conf_Makefile.in b/audio/icecast2/files/patch-conf_Makefile.in
new file mode 100644
index 000000000000..d515eed5ad6a
--- /dev/null
+++ b/audio/icecast2/files/patch-conf_Makefile.in
@@ -0,0 +1,12 @@
+--- conf/Makefile.in.orig 2016-01-04 21:07:07 UTC
++++ conf/Makefile.in
+@@ -539,8 +539,7 @@ uninstall-am: uninstall-docDATA
+
+ install-data-hook:
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+- test -f $(DESTDIR)$(sysconfdir)/icecast.xml || \
+- $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml
++ $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml.sample
+
+ icecast.xml.dist: $(srcdir)/icecast.xml.in
+ $(edit) $(srcdir)/icecast.xml.in > icecast.xml.dist
diff --git a/audio/id3ren/files/patch-Makefile b/audio/id3ren/files/patch-Makefile
index 951d41b7ace6..32610598805e 100644
--- a/audio/id3ren/files/patch-Makefile
+++ b/audio/id3ren/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Tue Mar 6 02:59:34 2001
-+++ Makefile Fri Jan 7 09:56:53 2005
+--- Makefile.orig 2012-05-15 20:31:03 UTC
++++ Makefile
@@ -1,12 +1,12 @@
all:
- make -C src all
diff --git a/audio/id3ren/files/patch-man_Makefile b/audio/id3ren/files/patch-man_Makefile
new file mode 100644
index 000000000000..70e46829965f
--- /dev/null
+++ b/audio/id3ren/files/patch-man_Makefile
@@ -0,0 +1,12 @@
+--- man/Makefile.orig 2012-05-15 20:31:03 UTC
++++ man/Makefile
+@@ -1,6 +1,6 @@
+-RM = rm -f
+-INSTALL = install -m 755
+-INSTALL_DIR = /usr/man/man1
++RM ?= rm -f
++INSTALL = ${BSD_INSTALL_DATA}
++INSTALL_DIR = ${PREFIX}/man/man1
+ INSTALL_NAME = id3ren.1.gz
+
+ all:
diff --git a/audio/id3ren/files/patch-man__Makefile b/audio/id3ren/files/patch-man__Makefile
deleted file mode 100644
index d004277400af..000000000000
--- a/audio/id3ren/files/patch-man__Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
---- man/Makefile.orig Fri Jan 7 09:53:38 2005
-+++ man/Makefile Fri Jan 7 09:53:54 2005
-@@ -1,6 +1,6 @@
--RM = rm -f
--INSTALL = install -m 755
--INSTALL_DIR = /usr/man/man1
-+RM ?= rm -f
-+INSTALL = ${BSD_INSTALL_DATA}
-+INSTALL_DIR = ${PREFIX}/man/man1
- INSTALL_NAME = id3ren.1.gz
-
- all:
diff --git a/audio/id3ren/files/patch-src_Makefile b/audio/id3ren/files/patch-src_Makefile
index 759ef05df597..4034c47a10d2 100644
--- a/audio/id3ren/files/patch-src_Makefile
+++ b/audio/id3ren/files/patch-src_Makefile
@@ -1,5 +1,5 @@
---- src/Makefile.orig Fri Jan 7 10:08:02 2005
-+++ src/Makefile Fri Jan 7 10:08:30 2005
+--- src/Makefile.orig 2012-05-15 20:31:03 UTC
++++ src/Makefile
@@ -1,9 +1,10 @@
CFLAGSDEBUG = -g -O2 -Wall -DDEBUG
-CFLAGS = -s -O2 -Wall
@@ -16,7 +16,7 @@
INSTALL_NAME = id3ren
SOURCES = id3ren.c id3tag.c id3file.c id3misc.c
-@@ -12,7 +13,7 @@
+@@ -12,7 +13,7 @@ INCLUDES = id3ren.h id3tag.h id3file.h i
all: ${INSTALL_NAME}
${INSTALL_NAME}: ${SOURCES} ${INCLUDES}
diff --git a/audio/id3ren/files/patch-src_id3tag.c b/audio/id3ren/files/patch-src_id3tag.c
index 961ae28dbda6..cbeab83878cc 100644
--- a/audio/id3ren/files/patch-src_id3tag.c
+++ b/audio/id3ren/files/patch-src_id3tag.c
@@ -1,6 +1,6 @@
---- src/id3tag.c.orig Fri Jan 7 09:32:59 2005
-+++ src/id3tag.c Fri Jan 7 09:33:14 2005
-@@ -369,6 +369,7 @@
+--- src/id3tag.c.orig 2012-05-15 20:31:03 UTC
++++ src/id3tag.c
+@@ -363,6 +363,7 @@ get_tag_string (int size, char *def_stri
return TRUE;
}
diff --git a/audio/id3v2/files/patch-Makefile b/audio/id3v2/files/patch-Makefile
index 28130bda2f46..e66f1f77ccae 100644
--- a/audio/id3v2/files/patch-Makefile
+++ b/audio/id3v2/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2010-03-27 07:28:34.000000000 +0800
-+++ Makefile 2010-05-15 02:52:55.000000000 +0800
+--- Makefile.orig 2010-03-26 23:28:34 UTC
++++ Makefile
@@ -1,20 +1,21 @@
-all: id3v2
+all: clean id3v2
@@ -30,7 +30,7 @@
clean:
rm -f id3v2 create_map core *.o
-@@ -25,4 +26,5 @@
+@@ -25,4 +26,5 @@ tarball:
--exclude=id3v2-${VERSION}/id3v2-${VERSION} \
id3v2-${VERSION}
rm id3v2-${VERSION}
diff --git a/audio/jack-rack/files/patch-fix_with_gtk-2.12 b/audio/jack-rack/files/patch-fix_with_gtk-2.12
index b615e96d10e7..2638a859f318 100644
--- a/audio/jack-rack/files/patch-fix_with_gtk-2.12
+++ b/audio/jack-rack/files/patch-fix_with_gtk-2.12
@@ -1,6 +1,6 @@
---- src/Makefile.in.orig 2007-10-25 11:55:32.000000000 -0500
-+++ src/Makefile.in 2007-10-25 11:55:48.000000000 -0500
-@@ -265,12 +265,7 @@
+--- src/Makefile.in.orig 2007-11-26 22:24:06 UTC
++++ src/Makefile.in
+@@ -261,12 +261,7 @@ jack_rack_CFLAGS = \
$(XML_CFLAGS) \
-DPKGDATADIR=\"$(pkgdatadir)\" \
-DPIXMAPDIR=\"$(pixmapdir)\" \
diff --git a/audio/jack-rack/files/patch-src_plugin__slot__callbacks.c b/audio/jack-rack/files/patch-src_plugin__slot__callbacks.c
new file mode 100644
index 000000000000..f88164d0a52c
--- /dev/null
+++ b/audio/jack-rack/files/patch-src_plugin__slot__callbacks.c
@@ -0,0 +1,18 @@
+--- src/plugin_slot_callbacks.c.orig 2007-11-18 13:13:49 UTC
++++ src/plugin_slot_callbacks.c
+@@ -109,6 +109,7 @@ slot_ablise_cb (GtkWidget * button, GdkE
+
+ ui = plugin_slot->jack_rack->ui;
+
++#ifdef HAVE_ALSA
+ g_object_set_data (G_OBJECT (ui->midi_menu_item),
+ "jack-rack-ctrl-type",
+ GINT_TO_POINTER(2/*PLUGIN_ENABLE_CONTROL*/));
+@@ -117,6 +118,7 @@ slot_ablise_cb (GtkWidget * button, GdkE
+ plugin_slot);
+ gtk_menu_popup (GTK_MENU (ui->midi_menu), NULL, NULL, NULL, NULL, event->button, event->time);
+
++#endif
+ return TRUE;
+ }
+ }
diff --git a/audio/jack-rack/files/patch-src_plugin_slot_callbacks.c b/audio/jack-rack/files/patch-src_plugin_slot_callbacks.c
deleted file mode 100644
index 868da64d3097..000000000000
--- a/audio/jack-rack/files/patch-src_plugin_slot_callbacks.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/plugin_slot_callbacks.c.orig 2008-08-27 16:45:43.000000000 +0200
-+++ src/plugin_slot_callbacks.c 2008-08-27 16:49:19.000000000 +0200
-@@ -109,6 +109,7 @@
-
- ui = plugin_slot->jack_rack->ui;
-
-+#ifdef HAVE_ALSA
- g_object_set_data (G_OBJECT (ui->midi_menu_item),
- "jack-rack-ctrl-type",
- GINT_TO_POINTER(2/*PLUGIN_ENABLE_CONTROL*/));
-@@ -117,6 +118,7 @@
- plugin_slot);
- gtk_menu_popup (GTK_MENU (ui->midi_menu), NULL, NULL, NULL, NULL, event->button, event->time);
-
-+#endif
- return TRUE;
- }
- }
diff --git a/audio/jack/files/patch-drivers-dummy-dummy_driver.c b/audio/jack/files/patch-drivers_dummy_dummy__driver.c
index 6289ef2928e6..6289ef2928e6 100644
--- a/audio/jack/files/patch-drivers-dummy-dummy_driver.c
+++ b/audio/jack/files/patch-drivers_dummy_dummy__driver.c
diff --git a/audio/jack/files/patch-drivers-dummy-dummy_driver.h b/audio/jack/files/patch-drivers_dummy_dummy__driver.h
index 4dd31438c269..4dd31438c269 100644
--- a/audio/jack/files/patch-drivers-dummy-dummy_driver.h
+++ b/audio/jack/files/patch-drivers_dummy_dummy__driver.h
diff --git a/audio/jack/files/patch-drivers-oss-oss_driver.c b/audio/jack/files/patch-drivers_oss_oss__driver.c
index 0ae2d99a0842..0ae2d99a0842 100644
--- a/audio/jack/files/patch-drivers-oss-oss_driver.c
+++ b/audio/jack/files/patch-drivers_oss_oss__driver.c
diff --git a/audio/jack/files/patch-libjack-client.c b/audio/jack/files/patch-libjack_client.c
index b5e7fa9508b3..b5e7fa9508b3 100644
--- a/audio/jack/files/patch-libjack-client.c
+++ b/audio/jack/files/patch-libjack_client.c
diff --git a/audio/juke/files/patch-src_conf.c b/audio/juke/files/patch-src_conf.c
index 46bb6ec6ff3b..629a3c5ccf75 100644
--- a/audio/juke/files/patch-src_conf.c
+++ b/audio/juke/files/patch-src_conf.c
@@ -1,6 +1,6 @@
---- ../juke.orig/src/conf.c Thu Apr 15 21:44:53 1999
-+++ ./src/conf.c Sun May 2 12:18:07 1999
-@@ -207,11 +207,11 @@
+--- src/conf.c.orig 2000-03-06 20:43:13 UTC
++++ src/conf.c
+@@ -207,11 +207,11 @@ void config_load (struct CONFIG *cfg)
return;
}
}
diff --git a/audio/juke/files/patch-src_conf.h b/audio/juke/files/patch-src_conf.h
index 42913e34dfa1..2ea436b9ff8f 100644
--- a/audio/juke/files/patch-src_conf.h
+++ b/audio/juke/files/patch-src_conf.h
@@ -1,5 +1,5 @@
---- ../juke.orig/src/conf.h Thu Apr 15 21:44:53 1999
-+++ ./src/conf.h Sun May 2 12:16:58 1999
+--- src/conf.h.orig 1999-04-07 17:47:53 UTC
++++ src/conf.h
@@ -1,6 +1,11 @@
#define CFG_ARGS 10
#define CFG_STRLEN 100
diff --git a/audio/kexis/files/patch-Makefile b/audio/kexis/files/patch-Makefile
index 51df7bc2456c..189c8f892892 100644
--- a/audio/kexis/files/patch-Makefile
+++ b/audio/kexis/files/patch-Makefile
@@ -1,5 +1,5 @@
---- ./Makefile.orig Sat Jul 22 00:55:52 2006
-+++ ./Makefile Sat Jul 22 00:56:34 2006
+--- Makefile.orig 2000-09-22 20:12:48 UTC
++++ Makefile
@@ -1,7 +1,5 @@
-DESTDIR =
SOURCE=encode.c decode.c header.c predictor.c bits.c rice.c kexis.c
diff --git a/audio/kid3-kde4/files/patch-CMakeLists.txt b/audio/kid3-kde4/files/patch-CMakeLists.txt
index 732ed7f07bad..0fdca02e14d2 100644
--- a/audio/kid3-kde4/files/patch-CMakeLists.txt
+++ b/audio/kid3-kde4/files/patch-CMakeLists.txt
@@ -1,8 +1,8 @@
---- ./CMakeLists.txt.orig 2013-10-29 17:19:33.000000000 +0000
-+++ ./CMakeLists.txt 2013-11-12 15:45:23.799504953 +0000
-@@ -110,8 +110,8 @@
- set(WITH_TRANSLATIONSDIR_DEFAULT "share/kid3-qt/translations")
+--- CMakeLists.txt.orig 2015-09-30 06:40:08 UTC
++++ CMakeLists.txt
+@@ -137,8 +137,8 @@ else (APPLE)
endif (BUILD_KDE_APP OR BUILD_SHARED_LIBS)
+ set(WITH_QMLDIR_DEFAULT "share/kid3/qml")
set(WITH_BINDIR_DEFAULT "bin")
- set(WITH_LIBDIR_DEFAULT "lib${LIB_SUFFIX}/kid3")
- set(WITH_PLUGINSDIR_DEFAULT "${WITH_LIBDIR_DEFAULT}/plugins")
diff --git a/audio/kio-audiocd/files/patch-audiocd.cpp b/audio/kio-audiocd/files/patch-audiocd.cpp
index 30a560b26b72..7940aadd67c5 100644
--- a/audio/kio-audiocd/files/patch-audiocd.cpp
+++ b/audio/kio-audiocd/files/patch-audiocd.cpp
@@ -1,6 +1,6 @@
---- audiocd.cpp.orig 2010-06-06 08:15:20.000000000 -0400
-+++ audiocd.cpp 2010-06-06 08:18:01.000000000 -0400
-@@ -229,20 +229,21 @@
+--- audiocd.cpp.orig 2014-10-09 07:07:27 UTC
++++ audiocd.cpp
+@@ -228,20 +228,21 @@ static void setDeviceToCd(KCompactDisc *
// name associated with the device, which throws the rest of audiocd
// for a loop.
//
@@ -24,7 +24,7 @@
}
else
{
-@@ -250,13 +251,14 @@
+@@ -249,13 +250,14 @@ static void setDeviceToCd(KCompactDisc *
// circumstances, so build a representation from
// the unit number and SCSI device name.
//
diff --git a/audio/kmix/files/extrapatch-no_alsa b/audio/kmix/files/extrapatch-no_alsa
index ccf4476743fd..46157620bddf 100644
--- a/audio/kmix/files/extrapatch-no_alsa
+++ b/audio/kmix/files/extrapatch-no_alsa
@@ -1,17 +1,17 @@
---- CMakeLists.txt~ 2012-06-29 17:55:35.000000000 -0300
-+++ CMakeLists.txt 2012-06-29 17:56:25.000000000 -0300
-@@ -6,7 +6,7 @@
- include(KDE4Defaults)
- include(MacroLibrary)
+--- CMakeLists.txt.orig 2014-07-16 08:24:17 UTC
++++ CMakeLists.txt
+@@ -9,7 +9,7 @@ include(MacroLibrary)
+ # Do not yet REQUIRE Phonon. Hint: As long as we do not find_package(), ${KDE4_PHONON_LIBS} will be empty below, but that should not hurt.
+ #find_package(Phonon REQUIRED)
-find_package(Alsa)
+find_file(CONFIG_ALSA_H_CMAKE config-alsa.h.cmake ${CMAKE_MODULE_PATH})
- macro_optional_find_package(PulseAudio "0.9.12")
- macro_log_feature(PULSEAUDIO_FOUND "PulseAudio" "PulseAudio Audio Server" "http://www.pulseaudio.org/" FALSE "0.9.12" "libpulse is needed to let KMix control PulseAudio")
-@@ -14,7 +14,7 @@
- macro_optional_find_package(Canberra)
- macro_log_feature(CANBERRA_FOUND "libcanberra" "libcanberra audio library" "http://0pointer.de/lennart/projects/libcanberra/" FALSE "" "libcanberra is needed for kmix sound feedback")
+ set(PA_VER "0.9.16")
+ macro_optional_find_package(PulseAudio "${PA_VER}")
+@@ -20,7 +20,7 @@ macro_optional_find_package(Canberra)
+ macro_log_feature(CANBERRA_FOUND "libcanberra" "libcanberra audio library"
+ "http://0pointer.de/lennart/projects/libcanberra/" FALSE "" "libcanberra is needed for kmix sound feedback")
-alsa_configure_file(${CMAKE_BINARY_DIR}/config-alsa.h)
+configure_file(${CONFIG_ALSA_H_CMAKE} ${CMAKE_BINARY_DIR}/config-alsa.h)
diff --git a/audio/kmix/files/patch-mixer_oss b/audio/kmix/files/patch-backends_mixer__oss.cpp
index 1c46111d64e5..1c46111d64e5 100644
--- a/audio/kmix/files/patch-mixer_oss
+++ b/audio/kmix/files/patch-backends_mixer__oss.cpp
diff --git a/audio/kscd/files/extrapatch-no_alsa b/audio/kscd/files/extrapatch-no_alsa
index d3e61dcc5379..babc3c26609a 100644
--- a/audio/kscd/files/extrapatch-no_alsa
+++ b/audio/kscd/files/extrapatch-no_alsa
@@ -1,6 +1,6 @@
---- CMakeLists.txt~ 2012-06-29 17:23:16.000000000 -0300
-+++ CMakeLists.txt 2012-06-29 17:24:13.000000000 -0300
-@@ -8,8 +8,8 @@
+--- CMakeLists.txt.orig 2014-07-16 08:24:20 UTC
++++ CMakeLists.txt
+@@ -8,8 +8,8 @@ include(KDE4Defaults)
include(MacroLibrary)
include_directories(${QT_INCLUDES} ${KDE4_INCLUDES})
@@ -9,5 +9,5 @@
+find_file(CONFIG_ALSA_H_CMAKE config-alsa.h.cmake ${CMAKE_MODULE_PATH})
+configure_file(${CONFIG_ALSA_H_CMAKE} ${CMAKE_BINARY_DIR}/config-alsa.h)
+ find_package(MusicBrainz3 REQUIRED)
- # If these two fail, behavior falls back to pre-git-migration
diff --git a/audio/ladspa/files/patch-applyplugin.c b/audio/ladspa/files/patch-applyplugin.c
deleted file mode 100644
index 583387a2f40d..000000000000
--- a/audio/ladspa/files/patch-applyplugin.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/applyplugin.c.orig Sat May 11 23:31:00 2002
-+++ src/applyplugin.c Sat May 11 23:31:09 2002
-@@ -6,7 +6,7 @@
- /*****************************************************************************/
-
- #include <dlfcn.h>
--#include <endian.h>
-+#include <machine/endian.h>
- #include <errno.h>
- #include <math.h>
- #include <stdlib.h>
diff --git a/audio/ladspa/files/patch-src_applyplugin.c b/audio/ladspa/files/patch-src_applyplugin.c
new file mode 100644
index 000000000000..96274d17dda6
--- /dev/null
+++ b/audio/ladspa/files/patch-src_applyplugin.c
@@ -0,0 +1,11 @@
+--- src/applyplugin.c.orig 2007-11-06 10:52:56 UTC
++++ src/applyplugin.c
+@@ -6,7 +6,7 @@
+ /*****************************************************************************/
+
+ #include <dlfcn.h>
+-#include <endian.h>
++#include <machine/endian.h>
+ #include <errno.h>
+ #include <math.h>
+ #include <stdlib.h>
diff --git a/audio/lame/files/patch-configure b/audio/lame/files/patch-configure
index eeb10adabc92..80059d032995 100644
--- a/audio/lame/files/patch-configure
+++ b/audio/lame/files/patch-configure
@@ -1,29 +1,6 @@
---- configure.in.orig 2012-02-28 19:50:27.000000000 +0100
-+++ configure.in 2016-01-25 20:15:46.034842000 +0100
-@@ -96,9 +96,19 @@
- sys/soundcard.h \
- sys/time.h \
- unistd.h \
-- xmmintrin.h \
- linux/soundcard.h)
-
-+dnl Checks for actually working SSE intrinsics
-+AC_MSG_CHECKING(working SSE intrinsics)
-+AC_COMPILE_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [[#include <xmmintrin.h>]],
-+ [[_mm_sfence();]])],
-+ [AC_DEFINE([HAVE_XMMINTRIN_H], [1], [Define if SSE intrinsics work.])
-+ ac_cv_header_xmmintrin_h=yes],
-+ [ac_cv_header_xmmintrin_h=no])
-+AC_MSG_RESULT(${ac_cv_header_xmmintrin_h})
-+
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_C_INLINE
---- configure.orig 2012-02-28 19:54:37.000000000 +0100
-+++ configure 2016-01-25 20:16:07.429512000 +0100
-@@ -11922,7 +11918,6 @@
+--- configure.orig 2012-02-28 18:54:37 UTC
++++ configure
+@@ -11922,7 +11922,6 @@ for ac_header in \
sys/soundcard.h \
sys/time.h \
unistd.h \
@@ -31,7 +8,7 @@
linux/soundcard.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-@@ -11937,6 +11932,31 @@
+@@ -11937,6 +11936,31 @@ fi
done
@@ -63,3 +40,26 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if ${ac_cv_c_const+:} false; then :
+--- configure.in.orig 2012-02-28 18:50:27 UTC
++++ configure.in
+@@ -96,9 +96,19 @@ AC_CHECK_HEADERS( \
+ sys/soundcard.h \
+ sys/time.h \
+ unistd.h \
+- xmmintrin.h \
+ linux/soundcard.h)
+
++dnl Checks for actually working SSE intrinsics
++AC_MSG_CHECKING(working SSE intrinsics)
++AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <xmmintrin.h>]],
++ [[_mm_sfence();]])],
++ [AC_DEFINE([HAVE_XMMINTRIN_H], [1], [Define if SSE intrinsics work.])
++ ac_cv_header_xmmintrin_h=yes],
++ [ac_cv_header_xmmintrin_h=no])
++AC_MSG_RESULT(${ac_cv_header_xmmintrin_h})
++
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+ AC_C_INLINE
diff --git a/audio/lash/files/patch-lashd-client_event.c b/audio/lash/files/patch-lashd-client_event.c
deleted file mode 100644
index cc8e2854c728..000000000000
--- a/audio/lash/files/patch-lashd-client_event.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- lashd/client_event.c.orig 2007-09-17 19:10:14.000000000 +0200
-+++ lashd/client_event.c 2007-09-17 19:10:50.000000000 +0200
-@@ -185,6 +185,7 @@
- project_set_name(project, name);
- }
-
-+#if 0
- err = gethostname(server_name, MAXHOSTNAMELEN);
- if (err == -1) {
- fprintf(stderr,
-@@ -192,6 +193,9 @@
- __FUNCTION__, strerror(errno));
- strcpy(server_name, "localhost");
- }
-+#else
-+ strcpy(server_name, "localhost");
-+#endif
-
- server->projects = lash_list_append(server->projects, project);
-
diff --git a/audio/lash/files/patch-lashd-conn_mgr.c b/audio/lash/files/patch-lashd-conn_mgr.c
deleted file mode 100644
index 38042102d93e..000000000000
--- a/audio/lash/files/patch-lashd-conn_mgr.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- lashd/conn_mgr.c.orig 2008-01-02 20:26:00.000000000 +0100
-+++ lashd/conn_mgr.c 2008-01-02 20:27:11.000000000 +0100
-@@ -759,7 +759,11 @@
-
- fprintf(stderr, "%s: error calling select(): %s\n", __FUNCTION__,
- strerror(errno));
-- return NULL;
-+
-+ if (errno == EBADF)
-+ continue;
-+ else
-+ return NULL;
- }
-
- if (conn_mgr->quit)
diff --git a/audio/lash/files/patch-lashd-store.c b/audio/lash/files/patch-lashd-store.c
deleted file mode 100644
index 0558601dec7b..000000000000
--- a/audio/lash/files/patch-lashd-store.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- lashd/store.c.orig Sat Jan 13 15:45:09 2007
-+++ lashd/store.c Sat Jan 13 15:45:12 2007
-@@ -35,6 +35,31 @@
-
- #define STORE_INFO_FILE ".store_info"
-
-+ssize_t
-+getline (char **lineptr, size_t *n, FILE *stream)
-+{
-+ int linelen;
-+
-+ char *line=fgetln(stream, &linelen);
-+
-+ if (line==NULL) {
-+ *lineptr=NULL;
-+ return -1;
-+ }
-+
-+ if (linelen + 1 > *n ) {
-+ *lineptr=realloc(*lineptr, linelen + 1);
-+ *n=linelen + 1;
-+
-+ if (lineptr==NULL)
-+ return -1;
-+ }
-+
-+ strlcpy(*lineptr, line, linelen + 1);
-+
-+ return linelen;
-+}
-+
- void
- store_free(store_t * store)
- {
diff --git a/audio/lash/files/patch-lashd_client__event.c b/audio/lash/files/patch-lashd_client__event.c
new file mode 100644
index 000000000000..134f68655065
--- /dev/null
+++ b/audio/lash/files/patch-lashd_client__event.c
@@ -0,0 +1,20 @@
+--- lashd/client_event.c.orig 2007-01-13 22:05:54 UTC
++++ lashd/client_event.c
+@@ -185,6 +185,7 @@ server_lash_event_project_add(server_t *
+ project_set_name(project, name);
+ }
+
++#if 0
+ err = gethostname(server_name, MAXHOSTNAMELEN);
+ if (err == -1) {
+ fprintf(stderr,
+@@ -192,6 +193,9 @@ server_lash_event_project_add(server_t *
+ __FUNCTION__, strerror(errno));
+ strcpy(server_name, "localhost");
+ }
++#else
++ strcpy(server_name, "localhost");
++#endif
+
+ server->projects = lash_list_append(server->projects, project);
+
diff --git a/audio/lash/files/patch-lashd_conn__mgr.c b/audio/lash/files/patch-lashd_conn__mgr.c
new file mode 100644
index 000000000000..40bc4b620b12
--- /dev/null
+++ b/audio/lash/files/patch-lashd_conn__mgr.c
@@ -0,0 +1,15 @@
+--- lashd/conn_mgr.c.orig 2007-04-08 21:18:23 UTC
++++ lashd/conn_mgr.c
+@@ -759,7 +759,11 @@ conn_mgr_recv_run(void *data)
+
+ fprintf(stderr, "%s: error calling select(): %s\n", __FUNCTION__,
+ strerror(errno));
+- return NULL;
++
++ if (errno == EBADF)
++ continue;
++ else
++ return NULL;
+ }
+
+ if (conn_mgr->quit)
diff --git a/audio/lash/files/patch-lashd_store.c b/audio/lash/files/patch-lashd_store.c
new file mode 100644
index 000000000000..9baee6d80f76
--- /dev/null
+++ b/audio/lash/files/patch-lashd_store.c
@@ -0,0 +1,34 @@
+--- lashd/store.c.orig 2007-01-13 22:08:54 UTC
++++ lashd/store.c
+@@ -36,6 +36,31 @@
+
+ #define STORE_INFO_FILE ".store_info"
+
++ssize_t
++getline (char **lineptr, size_t *n, FILE *stream)
++{
++ int linelen;
++
++ char *line=fgetln(stream, &linelen);
++
++ if (line==NULL) {
++ *lineptr=NULL;
++ return -1;
++ }
++
++ if (linelen + 1 > *n ) {
++ *lineptr=realloc(*lineptr, linelen + 1);
++ *n=linelen + 1;
++
++ if (lineptr==NULL)
++ return -1;
++ }
++
++ strlcpy(*lineptr, line, linelen + 1);
++
++ return linelen;
++}
++
+ void
+ store_free(store_t * store)
+ {
diff --git a/audio/lash/files/patch-liblash-lash.c b/audio/lash/files/patch-liblash-lash.c
deleted file mode 100644
index 4fd55d545f19..000000000000
--- a/audio/lash/files/patch-liblash-lash.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- liblash/lash.c.orig Tue May 22 20:13:00 2007
-+++ liblash/lash.c Tue May 22 20:13:13 2007
-@@ -23,6 +23,8 @@
- #include <strings.h>
- #include <pthread.h>
- #include <sys/types.h>
-+#include <sys/time.h>
-+#include <sys/resource.h>
- #include <sys/wait.h>
- #include <sys/socket.h>
- #include <netdb.h>
diff --git a/audio/lash/files/patch-liblash_lash.c b/audio/lash/files/patch-liblash_lash.c
new file mode 100644
index 000000000000..d6d9279625fc
--- /dev/null
+++ b/audio/lash/files/patch-liblash_lash.c
@@ -0,0 +1,11 @@
+--- liblash/lash.c.orig 2007-03-09 15:34:40 UTC
++++ liblash/lash.c
+@@ -23,6 +23,8 @@
+ #include <strings.h>
+ #include <pthread.h>
+ #include <sys/types.h>
++#include <sys/time.h>
++#include <sys/resource.h>
+ #include <sys/wait.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
diff --git a/audio/last.fm/files/patch-LastFM.pro b/audio/last.fm/files/patch-LastFM.pro
index 519abaf586e0..dc3250bbb401 100644
--- a/audio/last.fm/files/patch-LastFM.pro
+++ b/audio/last.fm/files/patch-LastFM.pro
@@ -1,6 +1,6 @@
---- LastFM.pro.orig 2012-12-02 14:23:24.000000000 +0100
-+++ LastFM.pro 2012-12-02 14:23:37.000000000 +0100
-@@ -37,7 +37,7 @@
+--- LastFM.pro.orig 2010-09-20 10:43:11 UTC
++++ LastFM.pro
+@@ -37,7 +37,7 @@ mac {
SUBDIRS -= src/mediadevices/ipod
}
diff --git a/audio/last.fm/files/patch-src-AudioController.cpp b/audio/last.fm/files/patch-src-AudioController.cpp
deleted file mode 100644
index fa671556dec2..000000000000
--- a/audio/last.fm/files/patch-src-AudioController.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
---- src/AudioController.cpp.orig 2007-12-18 15:18:20.000000000 +0100
-+++ src/AudioController.cpp 2009-11-04 19:22:00.000000000 +0100
-@@ -168,13 +168,7 @@
-
- m_transcode->setBufferCapacity( kDecodedBufferMinSize );
-
-- #ifdef WIN32
- m_output = qobject_cast<OutputInterface*>( loadPlugin( "rtaudioplayback" ) );
-- #elif defined LINUX
-- m_output = qobject_cast<OutputInterface*>( loadPlugin( "output_alsa" ) );
-- #else
-- m_output = qobject_cast<OutputInterface*>( loadPlugin( "output_portaudio" ) );
-- #endif
-
- if ( m_output == 0 )
- return false;
diff --git a/audio/last.fm/files/patch-src-libFingerprint-fplib-src-FloatingAverage.h b/audio/last.fm/files/patch-src-libFingerprint-fplib-src-FloatingAverage.h
deleted file mode 100644
index 17ebdcdc5aa4..000000000000
--- a/audio/last.fm/files/patch-src-libFingerprint-fplib-src-FloatingAverage.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/libFingerprint/fplib/src/FloatingAverage.h.orig 2007-12-18 15:18:19.000000000 +0100
-+++ src/libFingerprint/fplib/src/FloatingAverage.h 2012-11-25 13:23:10.000000000 +0100
-@@ -78,6 +78,7 @@
- {
- T real_sum = 0;
- const T* pCircularBuffer = m_values.get_buffer();
-+ const int size = m_values.size();
- for ( int i = 0; i < size; ++i )
- real_sum += pCircularBuffer[i];
- return abs(real_sum - m_sum) / this->size();
-
-
diff --git a/audio/last.fm/files/patch-src-libUnicorn-Settings.h b/audio/last.fm/files/patch-src-libUnicorn-Settings.h
deleted file mode 100644
index 76717ae8d82f..000000000000
--- a/audio/last.fm/files/patch-src-libUnicorn-Settings.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/libUnicorn/Settings.h.orig 2011-08-28 17:30:32.000000000 +0200
-+++ src/libUnicorn/Settings.h 2011-08-28 17:31:03.000000000 +0200
-@@ -105,7 +105,7 @@
- public:
- MyQSettings( const UserSettings* const s )
- {
-- beginGroup( s->username() );
-+ T::beginGroup( s->username() );
- }
- };
-
diff --git a/audio/last.fm/files/patch-src-output-alsa-playback-alsaaudio.cpp b/audio/last.fm/files/patch-src-output-alsa-playback-alsaaudio.cpp
deleted file mode 100644
index 278496f231e1..000000000000
--- a/audio/last.fm/files/patch-src-output-alsa-playback-alsaaudio.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/output/alsa-playback/alsaaudio.cpp.orig 2014-08-15 14:23:25.000000000 +0200
-+++ src/output/alsa-playback/alsaaudio.cpp 2014-08-15 16:29:32.000000000 +0200
-@@ -798,8 +798,6 @@
- {
- case -EPIPE:
- return xrun_recover();
-- case -ESTRPIPE:
-- return suspend_recover();
- }
-
- return err;
diff --git a/audio/last.fm/files/patch-src-output-alsa-playback-xconvert.c b/audio/last.fm/files/patch-src-output-alsa-playback-xconvert.c
deleted file mode 100644
index 385a3b6a823c..000000000000
--- a/audio/last.fm/files/patch-src-output-alsa-playback-xconvert.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/output/alsa-playback/xconvert.c.orig 2012-12-02 14:30:50.000000000 +0100
-+++ src/output/alsa-playback/xconvert.c 2012-12-02 14:33:58.000000000 +0100
-@@ -57,6 +57,7 @@
-
- #endif
-
-+#define uint size_t
-
- struct buffer {
- void *buffer;
diff --git a/audio/last.fm/files/patch-src-updatewizard.h b/audio/last.fm/files/patch-src-updatewizard.h
deleted file mode 100644
index 91f6896c163c..000000000000
--- a/audio/last.fm/files/patch-src-updatewizard.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/updatewizard.h.orig 2012-12-02 14:01:31.000000000 +0100
-+++ src/updatewizard.h 2012-12-02 14:01:42.000000000 +0100
-@@ -50,7 +50,7 @@
- CAutoUpdater& updater,
- QWidget* parent = NULL);
-
-- UpdateWizard::UpdateWizard( CComponentInfo* );
-+ UpdateWizard( CComponentInfo* );
-
- bool shouldShow() const{ return m_showWizard; }
-
diff --git a/audio/last.fm/files/patch-src-wizardselectupdatespage.h b/audio/last.fm/files/patch-src-wizardselectupdatespage.h
deleted file mode 100644
index 630a18a8afb3..000000000000
--- a/audio/last.fm/files/patch-src-wizardselectupdatespage.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/wizardselectupdatespage.h.orig 2012-12-02 13:59:46.000000000 +0100
-+++ src/wizardselectupdatespage.h 2012-12-02 14:00:17.000000000 +0100
-@@ -58,7 +58,7 @@
- GetChecked(
- std::vector<CComponentInfo*>& vecChecked);
-
-- void WizardSelectUpdatesPage::GetMajorUpdateComponent( std::vector<CComponentInfo*>& vecToUpdate );
-+ void GetMajorUpdateComponent( std::vector<CComponentInfo*>& vecToUpdate );
-
- public slots:
-
diff --git a/audio/last.fm/files/patch-src_AudioController.cpp b/audio/last.fm/files/patch-src_AudioController.cpp
new file mode 100644
index 000000000000..052ad3dd70c5
--- /dev/null
+++ b/audio/last.fm/files/patch-src_AudioController.cpp
@@ -0,0 +1,16 @@
+--- src/AudioController.cpp.orig 2016-07-26 15:06:09 UTC
++++ src/AudioController.cpp
+@@ -168,13 +168,7 @@ AudioControllerThread::loadPlugins()
+
+ m_transcode->setBufferCapacity( kDecodedBufferMinSize );
+
+- #ifdef WIN32
+ m_output = qobject_cast<OutputInterface*>( loadPlugin( "rtaudioplayback" ) );
+- #elif defined LINUX
+- m_output = qobject_cast<OutputInterface*>( loadPlugin( "output_alsa" ) );
+- #else
+- m_output = qobject_cast<OutputInterface*>( loadPlugin( "output_portaudio" ) );
+- #endif
+
+ if ( m_output == 0 )
+ return false;
diff --git a/audio/last.fm/files/patch-src__lastfmapplication.cpp b/audio/last.fm/files/patch-src__lastfmapplication.cpp
deleted file mode 100644
index 036369437ed7..000000000000
--- a/audio/last.fm/files/patch-src__lastfmapplication.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/lastfmapplication.cpp.orig
-+++ src/lastfmapplication.cpp
-@@ -55,6 +55,10 @@
- #include <QTcpSocket>
- #include <QTimer>
-
-+#ifdef Q_OS_UNIX
-+ #include <unistd.h>
-+#endif
-+
- #ifdef WIN32
- #include <windows.h>
- #endif
diff --git a/audio/last.fm/files/patch-src__libUnicorn__TrackInfo.h b/audio/last.fm/files/patch-src__libUnicorn__TrackInfo.h
deleted file mode 100644
index 89a3f4e79dc9..000000000000
--- a/audio/last.fm/files/patch-src__libUnicorn__TrackInfo.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/libUnicorn/TrackInfo.h.orig
-+++ src/libUnicorn/TrackInfo.h
-@@ -33,6 +33,8 @@
- #include <QStringList>
- #include <QUrl>
-
-+#include <sys/time.h>
-+
-
- class UNICORN_DLLEXPORT TrackInfo
- {
diff --git a/audio/last.fm/files/patch-src__libUnicorn__UnicornCommon.cpp b/audio/last.fm/files/patch-src__libUnicorn__UnicornCommon.cpp
deleted file mode 100644
index eaa768aa63b3..000000000000
--- a/audio/last.fm/files/patch-src__libUnicorn__UnicornCommon.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/libUnicorn/UnicornCommon.cpp.orig
-+++ src/libUnicorn/UnicornCommon.cpp
-@@ -29,6 +29,10 @@
- #include <QCoreApplication>
- #include <QDir>
-
-+#ifdef Q_OS_UNIX
-+ #include <unistd.h>
-+#endif
-+
- #ifdef WIN32
- #include <windows.h>
- #include <shlobj.h>
diff --git a/audio/last.fm/files/patch-src__playerlistener.cpp b/audio/last.fm/files/patch-src__playerlistener.cpp
deleted file mode 100644
index b6a54e32e061..000000000000
--- a/audio/last.fm/files/patch-src__playerlistener.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/playerlistener.cpp.orig
-+++ src/playerlistener.cpp
-@@ -33,6 +33,10 @@
- #include <iostream>
- #include <algorithm>
-
-+#ifdef Q_OS_UNIX
-+#include <unistd.h>
-+#endif
-+
- using namespace std;
-
-
diff --git a/audio/last.fm/files/patch-src_lastfmapplication.cpp b/audio/last.fm/files/patch-src_lastfmapplication.cpp
new file mode 100644
index 000000000000..02cd05aade25
--- /dev/null
+++ b/audio/last.fm/files/patch-src_lastfmapplication.cpp
@@ -0,0 +1,13 @@
+--- src/lastfmapplication.cpp.orig 2016-07-26 15:06:09 UTC
++++ src/lastfmapplication.cpp
+@@ -55,6 +55,10 @@
+ #include <QTcpSocket>
+ #include <QTimer>
+
++#ifdef Q_OS_UNIX
++ #include <unistd.h>
++#endif
++
+ #ifdef WIN32
+ #include <windows.h>
+ #endif
diff --git a/audio/last.fm/files/patch-src_libFingerprint_fplib_src_FloatingAverage.h b/audio/last.fm/files/patch-src_libFingerprint_fplib_src_FloatingAverage.h
new file mode 100644
index 000000000000..cf9304065423
--- /dev/null
+++ b/audio/last.fm/files/patch-src_libFingerprint_fplib_src_FloatingAverage.h
@@ -0,0 +1,10 @@
+--- src/libFingerprint/fplib/src/FloatingAverage.h.orig 2016-07-26 15:06:09 UTC
++++ src/libFingerprint/fplib/src/FloatingAverage.h
+@@ -78,6 +78,7 @@ public:
+ {
+ T real_sum = 0;
+ const T* pCircularBuffer = m_values.get_buffer();
++ const int size = m_values.size();
+ for ( int i = 0; i < size; ++i )
+ real_sum += pCircularBuffer[i];
+ return abs(real_sum - m_sum) / this->size();
diff --git a/audio/last.fm/files/patch-src_libUnicorn_Settings.h b/audio/last.fm/files/patch-src_libUnicorn_Settings.h
new file mode 100644
index 000000000000..36d94e704d17
--- /dev/null
+++ b/audio/last.fm/files/patch-src_libUnicorn_Settings.h
@@ -0,0 +1,11 @@
+--- src/libUnicorn/Settings.h.orig 2016-07-26 15:06:09 UTC
++++ src/libUnicorn/Settings.h
+@@ -105,7 +105,7 @@ protected:
+ public:
+ MyQSettings( const UserSettings* const s )
+ {
+- beginGroup( s->username() );
++ T::beginGroup( s->username() );
+ }
+ };
+
diff --git a/audio/last.fm/files/patch-src_libUnicorn_TrackInfo.h b/audio/last.fm/files/patch-src_libUnicorn_TrackInfo.h
new file mode 100644
index 000000000000..1164608f704e
--- /dev/null
+++ b/audio/last.fm/files/patch-src_libUnicorn_TrackInfo.h
@@ -0,0 +1,11 @@
+--- src/libUnicorn/TrackInfo.h.orig 2016-07-26 15:06:09 UTC
++++ src/libUnicorn/TrackInfo.h
+@@ -33,6 +33,8 @@
+ #include <QStringList>
+ #include <QUrl>
+
++#include <sys/time.h>
++
+
+ class UNICORN_DLLEXPORT TrackInfo
+ {
diff --git a/audio/last.fm/files/patch-src_libUnicorn_UnicornCommon.cpp b/audio/last.fm/files/patch-src_libUnicorn_UnicornCommon.cpp
new file mode 100644
index 000000000000..fccf43d11f5a
--- /dev/null
+++ b/audio/last.fm/files/patch-src_libUnicorn_UnicornCommon.cpp
@@ -0,0 +1,13 @@
+--- src/libUnicorn/UnicornCommon.cpp.orig 2016-07-26 15:06:09 UTC
++++ src/libUnicorn/UnicornCommon.cpp
+@@ -29,6 +29,10 @@
+ #include <QCoreApplication>
+ #include <QDir>
+
++#ifdef Q_OS_UNIX
++ #include <unistd.h>
++#endif
++
+ #ifdef WIN32
+ #include <windows.h>
+ #include <shlobj.h>
diff --git a/audio/last.fm/files/patch-src_output_RtAudio_RtAudio.pro b/audio/last.fm/files/patch-src_output_RtAudio_RtAudio.pro
new file mode 100644
index 000000000000..e4ee11fb0ae8
--- /dev/null
+++ b/audio/last.fm/files/patch-src_output_RtAudio_RtAudio.pro
@@ -0,0 +1,13 @@
+--- src/output/RtAudio/RtAudio.pro.orig 2008-04-09 11:46:29 UTC
++++ src/output/RtAudio/RtAudio.pro
+@@ -8,10 +8,6 @@ include( ../../../definitions.pro.inc )
+ HEADERS = rtaudioplayback.h
+ SOURCES = rtaudioplayback.cpp rtaudio/RtAudio.cpp
+
+-unix:!mac {
+- LIBS += -lasound
+-}
+-
+ win32 {
+ LIBS += -lwinmm -Ldsound -ldsound -lole32 -lgdi32 -luser32
+ INCLUDEPATH += dsound
diff --git a/audio/last.fm/files/patch-src_output_RtAudio_rtaudio_RtAudio.cpp b/audio/last.fm/files/patch-src_output_RtAudio_rtaudio_RtAudio.cpp
index 9c6dd5a04867..7ef7e9bfbaf7 100644
--- a/audio/last.fm/files/patch-src_output_RtAudio_rtaudio_RtAudio.cpp
+++ b/audio/last.fm/files/patch-src_output_RtAudio_rtaudio_RtAudio.cpp
@@ -1,4 +1,4 @@
---- src/output/RtAudio/rtaudio/RtAudio.cpp.orig 2014-04-04 08:59:58.151014000 +0000
+--- src/output/RtAudio/rtaudio/RtAudio.cpp.orig 2016-07-26 15:06:09 UTC
+++ src/output/RtAudio/rtaudio/RtAudio.cpp
@@ -42,7 +42,7 @@
#include <QtGlobal>
diff --git a/audio/last.fm/files/patch-src_output_RtAudio_rtaudioplayback.cpp b/audio/last.fm/files/patch-src_output_RtAudio_rtaudioplayback.cpp
new file mode 100644
index 000000000000..793f3d4fdc07
--- /dev/null
+++ b/audio/last.fm/files/patch-src_output_RtAudio_rtaudioplayback.cpp
@@ -0,0 +1,20 @@
+--- src/output/RtAudio/rtaudioplayback.cpp.orig 2016-07-26 15:06:09 UTC
++++ src/output/RtAudio/rtaudioplayback.cpp
+@@ -158,7 +158,7 @@ RtAudioPlayback::soundSystems()
+ #endif
+
+ #ifdef Q_WS_X11
+- l << "Alsa";
++ l << "OSS";
+ #endif
+
+ #ifdef Q_WS_MAC
+@@ -284,7 +284,7 @@ RtAudioPlayback::initAudio(
+ int card = internalSoundCardID( m_deviceNum );
+
+ #ifdef Q_WS_X11
+- api = RtAudio::LINUX_ALSA;
++ api = RtAudio::LINUX_OSS;
+ #endif
+
+ RtAudioDeviceInfo info = m_audio->getDeviceInfo( card );
diff --git a/audio/last.fm/files/patch-src_output_alsa-playback_alsaaudio.cpp b/audio/last.fm/files/patch-src_output_alsa-playback_alsaaudio.cpp
new file mode 100644
index 000000000000..b74adacfe79b
--- /dev/null
+++ b/audio/last.fm/files/patch-src_output_alsa-playback_alsaaudio.cpp
@@ -0,0 +1,11 @@
+--- src/output/alsa-playback/alsaaudio.cpp.orig 2016-07-26 15:06:09 UTC
++++ src/output/alsa-playback/alsaaudio.cpp
+@@ -798,8 +798,6 @@ int AlsaAudio::alsa_handle_error( int er
+ {
+ case -EPIPE:
+ return xrun_recover();
+- case -ESTRPIPE:
+- return suspend_recover();
+ }
+
+ return err;
diff --git a/audio/last.fm/files/patch-src_output_alsa-playback_xconvert.c b/audio/last.fm/files/patch-src_output_alsa-playback_xconvert.c
new file mode 100644
index 000000000000..4435bb3f6bea
--- /dev/null
+++ b/audio/last.fm/files/patch-src_output_alsa-playback_xconvert.c
@@ -0,0 +1,10 @@
+--- src/output/alsa-playback/xconvert.c.orig 2007-02-01 12:59:50 UTC
++++ src/output/alsa-playback/xconvert.c
+@@ -57,6 +57,7 @@
+
+ #endif
+
++#define uint size_t
+
+ struct buffer {
+ void *buffer;
diff --git a/audio/last.fm/files/patch-src_playerlistener.cpp b/audio/last.fm/files/patch-src_playerlistener.cpp
new file mode 100644
index 000000000000..8d5d127cdd8d
--- /dev/null
+++ b/audio/last.fm/files/patch-src_playerlistener.cpp
@@ -0,0 +1,13 @@
+--- src/playerlistener.cpp.orig 2016-07-26 15:06:09 UTC
++++ src/playerlistener.cpp
+@@ -33,6 +33,10 @@
+ #include <iostream>
+ #include <algorithm>
+
++#ifdef Q_OS_UNIX
++#include <unistd.h>
++#endif
++
+ using namespace std;
+
+
diff --git a/audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.cpp b/audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.cpp
deleted file mode 100644
index 3244cdb4caeb..000000000000
--- a/audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/output/RtAudio/rtaudioplayback.cpp.orig 2007-09-13 13:46:07.000000000 +0200
-+++ src/output/RtAudio/rtaudioplayback.cpp 2007-09-14 20:54:41.000000000 +0200
-@@ -157,7 +157,7 @@
- #endif
-
- #ifdef Q_WS_X11
-- l << "Alsa";
-+ l << "OSS";
- #endif
-
- #ifdef Q_WS_MAC
-@@ -280,7 +280,7 @@
- int card = internalSoundCardID( The::settings().soundCard() );
-
- #ifdef Q_WS_X11
-- api = RtAudio::LINUX_ALSA;
-+ api = RtAudio::LINUX_OSS;
- #endif
-
- RtAudioDeviceInfo info = m_audio->getDeviceInfo( card );
diff --git a/audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.pro b/audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.pro
deleted file mode 100644
index 216db3b9fb50..000000000000
--- a/audio/last.fm/files/patch-src_rtaudioplayback-rtaudioplayback.pro
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/output/RtAudio/RtAudio.pro.orig Sat Jul 14 09:37:38 2007
-+++ src/output/RtAudio/RtAudio.pro Sat Jul 14 09:37:51 2007
-@@ -8,10 +8,6 @@
- HEADERS = rtaudioplayback.h
- SOURCES = rtaudioplayback.cpp rtaudio/RtAudio.cpp
-
--unix:!mac {
-- LIBS += -lasound
--}
--
- win32 {
- LIBS += -lwinmm -Ldsound -ldsound -lole32 -lgdi32 -luser32 -lshfolder
- INCLUDEPATH += dsound
diff --git a/audio/last.fm/files/patch-src_updatewizard.h b/audio/last.fm/files/patch-src_updatewizard.h
new file mode 100644
index 000000000000..c8a8868472df
--- /dev/null
+++ b/audio/last.fm/files/patch-src_updatewizard.h
@@ -0,0 +1,11 @@
+--- src/updatewizard.h.orig 2016-07-26 15:06:09 UTC
++++ src/updatewizard.h
+@@ -50,7 +50,7 @@ public:
+ CAutoUpdater& updater,
+ QWidget* parent = NULL);
+
+- UpdateWizard::UpdateWizard( CComponentInfo* );
++ UpdateWizard( CComponentInfo* );
+
+ bool shouldShow() const{ return m_showWizard; }
+
diff --git a/audio/last.fm/files/patch-src_wizardselectupdatespage.h b/audio/last.fm/files/patch-src_wizardselectupdatespage.h
new file mode 100644
index 000000000000..7a5aac7be511
--- /dev/null
+++ b/audio/last.fm/files/patch-src_wizardselectupdatespage.h
@@ -0,0 +1,11 @@
+--- src/wizardselectupdatespage.h.orig 2016-07-26 15:06:09 UTC
++++ src/wizardselectupdatespage.h
+@@ -58,7 +58,7 @@ public:
+ GetChecked(
+ std::vector<CComponentInfo*>& vecChecked);
+
+- void WizardSelectUpdatesPage::GetMajorUpdateComponent( std::vector<CComponentInfo*>& vecToUpdate );
++ void GetMajorUpdateComponent( std::vector<CComponentInfo*>& vecToUpdate );
+
+ public slots:
+
diff --git a/audio/lastfm-desktop/files/patch-app_client_Services_RadioService_RadioService.cpp b/audio/lastfm-desktop/files/patch-app_client_Services_RadioService_RadioService.cpp
index 1d2313f32af8..b6f16737d492 100644
--- a/audio/lastfm-desktop/files/patch-app_client_Services_RadioService_RadioService.cpp
+++ b/audio/lastfm-desktop/files/patch-app_client_Services_RadioService_RadioService.cpp
@@ -1,4 +1,4 @@
---- app/client/Services/RadioService/RadioService.cpp.orig 2016-06-16 20:32:08 UTC
+--- app/client/Services/RadioService/RadioService.cpp.orig 2013-09-03 12:19:10 UTC
+++ app/client/Services/RadioService/RadioService.cpp
@@ -307,7 +307,7 @@ RadioService::mute()
void
diff --git a/audio/libaacplus/files/patch-configure.ac b/audio/libaacplus/files/patch-configure.ac
index c9eece272255..2ae5b88a4d76 100644
--- a/audio/libaacplus/files/patch-configure.ac
+++ b/audio/libaacplus/files/patch-configure.ac
@@ -1,6 +1,6 @@
---- configure.ac.orig 2010-11-11 06:27:45.000000000 +0900
-+++ configure.ac 2012-01-26 17:47:39.000000000 +0900
-@@ -8,7 +8,7 @@
+--- configure.ac.orig 2010-11-10 21:27:45 UTC
++++ configure.ac
+@@ -8,7 +8,7 @@ AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
@@ -9,7 +9,7 @@
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_INSTALL
-@@ -16,10 +16,10 @@
+@@ -16,10 +16,10 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
@@ -24,7 +24,7 @@
AC_PATH_PROG([PATCH],[patch])
if test x"$PATCH" = x -a ! -f "aacenc.c" ; then
AC_MSG_ERROR([You need patch utility to prepare sources.])
-@@ -123,7 +123,7 @@
+@@ -123,7 +123,7 @@ AM_CONDITIONAL([HAVE_PKGCONFIG], [test "
AACPLUS_VERSION="$VERSION"
AACPLUS_CPPFLAGS="-I$aacplus_includedir $FFTW3_CPPFLAGS"
diff --git a/audio/libaacplus/files/patch-include-aacplus.h b/audio/libaacplus/files/patch-include-aacplus.h
deleted file mode 100644
index a2797f0e6453..000000000000
--- a/audio/libaacplus/files/patch-include-aacplus.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/aacplus.h.orig 2010-11-11 06:27:38.000000000 +0900
-+++ include/aacplus.h 2011-10-13 18:19:31.000000000 +0900
-@@ -12,7 +12,7 @@
-
- typedef enum {
- AACPLUS_INPUT_16BIT = 0,
-- AACPLUS_INPUT_FLOAT,
-+ AACPLUS_INPUT_FLOAT
- } aacplusInFormat;
-
-
diff --git a/audio/libaacplus/files/patch-include_aacplus.h b/audio/libaacplus/files/patch-include_aacplus.h
new file mode 100644
index 000000000000..f4164577ee7a
--- /dev/null
+++ b/audio/libaacplus/files/patch-include_aacplus.h
@@ -0,0 +1,11 @@
+--- include/aacplus.h.orig 2010-11-10 21:27:38 UTC
++++ include/aacplus.h
+@@ -12,7 +12,7 @@ typedef void *aacplusEncHandle;
+
+ typedef enum {
+ AACPLUS_INPUT_16BIT = 0,
+- AACPLUS_INPUT_FLOAT,
++ AACPLUS_INPUT_FLOAT
+ } aacplusInFormat;
+
+
diff --git a/audio/libaacplus/files/patch-src_Makefile.am b/audio/libaacplus/files/patch-src_Makefile.am
index c02265ed96af..78786b6e24f5 100644
--- a/audio/libaacplus/files/patch-src_Makefile.am
+++ b/audio/libaacplus/files/patch-src_Makefile.am
@@ -1,6 +1,6 @@
---- src/Makefile.am.orig 2010-11-11 06:27:41.000000000 +0900
-+++ src/Makefile.am 2014-05-22 07:32:03.000000000 +0900
-@@ -206,14 +206,14 @@
+--- src/Makefile.am.orig 2010-11-10 21:27:41 UTC
++++ src/Makefile.am
+@@ -206,14 +206,14 @@ $(library_sources_used):
$(MAKE) unpack_3gp_sources
$(srcdir)/FloatFR_aacPlusenc:
diff --git a/audio/libaiff/files/patch-Makefile.in b/audio/libaiff/files/patch-Makefile.in
index e9b3bcc6fb53..862ef199e47c 100644
--- a/audio/libaiff/files/patch-Makefile.in
+++ b/audio/libaiff/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2007-09-20 21:42:28.000000000 +0200
-+++ Makefile.in 2014-01-30 12:02:16.000000000 +0100
-@@ -6,7 +6,7 @@
+--- Makefile.in.orig 2007-09-20 19:42:28 UTC
++++ Makefile.in
+@@ -6,7 +6,7 @@ AR = ar
CFLAGS = @DEFS@ -I. -Ilibaiff -g -O2 -ansi -pedantic -Wall -Wfloat-equal -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wno-unreachable-code
# for GCC4. comment for GCC3
@@ -9,7 +9,7 @@
prefix = @prefix@
-@@ -15,14 +15,14 @@
+@@ -15,14 +15,14 @@ objs = iff.o aifx.o lpcm.o g711.o \
all: libaiff.a
diff --git a/audio/libaiff/files/patch-configure b/audio/libaiff/files/patch-configure
index ba1189b711dc..94557fe52935 100644
--- a/audio/libaiff/files/patch-configure
+++ b/audio/libaiff/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2014-01-30 12:04:02.000000000 +0100
-+++ configure 2014-01-30 12:04:11.000000000 +0100
-@@ -645,6 +645,7 @@
+--- configure.orig 2007-09-20 19:42:28 UTC
++++ configure
+@@ -645,6 +645,7 @@ libdir
localedir
mandir
DEFS
diff --git a/audio/libao/files/patch-configure b/audio/libao/files/patch-configure
index b0cdc3b03551..1e8c74b9d66f 100644
--- a/audio/libao/files/patch-configure
+++ b/audio/libao/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2011-06-08 21:32:18.000000000 +0200
-+++ configure 2011-06-08 21:32:18.000000000 +0200
-@@ -11059,7 +11059,7 @@ if test -z "$GCC"; then
+--- configure.orig 2014-01-27 17:10:36 UTC
++++ configure
+@@ -12054,7 +12054,7 @@ if test -z "$GCC"; then
*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
DEBUG="-g"
@@ -9,7 +9,7 @@
PROFILE="-g -p" ;;
esac
else
-@@ -11082,9 +11082,9 @@ else
+@@ -12077,9 +12077,9 @@ else
PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
@@ -22,7 +22,7 @@
esac
fi
CFLAGS="$CFLAGS $cflags_save -DAO_BUILDING_LIBAO"
-@@ -12978,7 +12978,7 @@ if test "${ac_cv_lib_audio_AuOpenServer+
+@@ -13897,7 +13897,7 @@ if ${ac_cv_lib_audio_AuOpenServer+:} fal
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -31,7 +31,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-@@ -13041,7 +13041,7 @@ fi
+@@ -13958,7 +13958,7 @@ fi
if test "x$have_nas" = xyes; then
NAS_CFLAGS="$X_CFLAGS"
diff --git a/audio/libao/files/patch-doc_Makefile.in b/audio/libao/files/patch-doc_Makefile.in
index 933cdbcd66c6..b72b6d3ca21a 100644
--- a/audio/libao/files/patch-doc_Makefile.in
+++ b/audio/libao/files/patch-doc_Makefile.in
@@ -1,6 +1,6 @@
---- doc/Makefile.in.orig
+--- doc/Makefile.in.orig 2014-01-27 23:57:41 UTC
+++ doc/Makefile.in
-@@ -161,7 +161,7 @@
+@@ -257,7 +257,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
diff --git a/audio/libao/files/patch-src_plugins_Makefile.in b/audio/libao/files/patch-src_plugins_Makefile.in
index 46544fb0962f..bc8b2a9ec210 100644
--- a/audio/libao/files/patch-src_plugins_Makefile.in
+++ b/audio/libao/files/patch-src_plugins_Makefile.in
@@ -1,5 +1,5 @@
---- src/plugins/Makefile.in.orig 2014-05-28 16:19:02.000000000 +0200
-+++ src/plugins/Makefile.in 2014-05-28 16:25:33.000000000 +0200
+--- src/plugins/Makefile.in.orig 2014-01-27 23:57:41 UTC
++++ src/plugins/Makefile.in
@@ -388,7 +388,7 @@ $(am__recursive_targets):
else \
local_target="$$target"; \
diff --git a/audio/libao/files/patch-src_plugins_pulse_Makefile.in b/audio/libao/files/patch-src_plugins_pulse_Makefile.in
index 4bb6c61f7a9d..89fc6f162163 100644
--- a/audio/libao/files/patch-src_plugins_pulse_Makefile.in
+++ b/audio/libao/files/patch-src_plugins_pulse_Makefile.in
@@ -1,5 +1,5 @@
---- src/plugins/pulse/Makefile.in.orig 2014-05-28 17:53:30.000000000 +0200
-+++ src/plugins/pulse/Makefile.in 2014-05-28 17:58:05.000000000 +0200
+--- src/plugins/pulse/Makefile.in.orig 2014-01-27 23:57:42 UTC
++++ src/plugins/pulse/Makefile.in
@@ -348,7 +348,7 @@ AUTOMAKE_OPTIONS = foreign
@HAVE_PULSE_TRUE@pulseltlibs = libpulse.la
@HAVE_PULSE_FALSE@pulsesources =
diff --git a/audio/libcanberra/files/patch-src_oss.c b/audio/libcanberra/files/patch-src_oss.c
index 098792d93125..dd9ea89e4b0e 100644
--- a/audio/libcanberra/files/patch-src_oss.c
+++ b/audio/libcanberra/files/patch-src_oss.c
@@ -1,6 +1,6 @@
---- src/oss.c.orig 2010-02-19 18:39:40.000000000 -0500
-+++ src/oss.c 2010-03-14 15:04:16.000000000 -0400
-@@ -262,7 +262,7 @@ static int open_oss(ca_context *c, struc
+--- src/oss.c.orig 2011-02-23 01:51:00 UTC
++++ src/oss.c
+@@ -259,7 +259,7 @@ static int open_oss(ca_context *c, struc
val = AFMT_S16_NE;
break;
case CA_SAMPLE_S16RE:
diff --git a/audio/libcdaudio/files/patch-CVE-2008-5030.2005-0706 b/audio/libcdaudio/files/patch-CVE-2008-5030.2005-0706
index 415b57ceb133..6ecdaa41091d 100644
--- a/audio/libcdaudio/files/patch-CVE-2008-5030.2005-0706
+++ b/audio/libcdaudio/files/patch-CVE-2008-5030.2005-0706
@@ -1,6 +1,6 @@
---- src/cddb.c.orig 2004-09-09 05:26:39.000000000 +0400
-+++ src/cddb.c 2008-11-21 17:33:50.000000000 +0300
-@@ -1052,7 +1052,8 @@
+--- src/cddb.c.orig 2004-09-09 01:26:39 UTC
++++ src/cddb.c
+@@ -1052,7 +1052,8 @@ cddb_query(int cd_desc, int sock,
}
query->query_matches = 0;
@@ -10,7 +10,7 @@
slashed = 0;
if(strchr(inbuffer, '/') != NULL && parse_disc_artist) {
index = 0;
-@@ -1601,7 +1602,7 @@
+@@ -1601,7 +1602,7 @@ cddb_read_disc_data(int cd_desc, struct
return -1;
}
@@ -19,9 +19,9 @@
free(root_dir);
free(file);
return -1;
---- src/coverart.c.orig 2008-11-21 17:36:39.000000000 +0300
-+++ src/coverart.c 2008-11-21 17:39:41.000000000 +0300
-@@ -131,7 +131,9 @@
+--- src/coverart.c.orig 2003-02-12 17:56:55 UTC
++++ src/coverart.c
+@@ -131,7 +131,9 @@ coverart_process_line(char *line, struct
}
} else if(strncmp(line, "Album", 5) == 0) {
long n = strtol((char *)line + 5, NULL, 10);
@@ -32,7 +32,7 @@
strtok(procbuffer, "/");
strncpy(query->query_list[n].list_artist, procbuffer,
(strlen(procbuffer) < 64) ? (strlen(procbuffer) - 1) : 64);
-@@ -143,7 +145,9 @@
+@@ -143,7 +145,9 @@ coverart_process_line(char *line, struct
}
} else if(strncmp(line, "Url", 3) == 0) {
long n = strtol((char *)line + 3, NULL, 10);
diff --git a/audio/libcddb/files/patch-include-cddb-cddb_log.h b/audio/libcddb/files/patch-include-cddb-cddb_log.h
deleted file mode 100644
index 0eea941fdb07..000000000000
--- a/audio/libcddb/files/patch-include-cddb-cddb_log.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/cddb/cddb_log.h.orig 2005-03-11 22:29:29.000000000 +0100
-+++ include/cddb/cddb_log.h 2014-03-20 16:00:15.000000000 +0100
-@@ -19,7 +19,7 @@
- Boston, MA 02111-1307, USA.
- */
-
--#ifndef CDDB_LOH_H
-+#ifndef CDDB_LOG_H
- #define CDDB_LOG_H
-
- #ifdef __cplusplus
diff --git a/audio/libcddb/files/patch-include-cddb-cddb_log_ni.h b/audio/libcddb/files/patch-include-cddb-cddb_log_ni.h
deleted file mode 100644
index f18bd7191b81..000000000000
--- a/audio/libcddb/files/patch-include-cddb-cddb_log_ni.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/cddb/cddb_log_ni.h.orig 2005-03-11 22:29:29.000000000 +0100
-+++ include/cddb/cddb_log_ni.h 2014-03-20 16:00:24.000000000 +0100
-@@ -19,7 +19,7 @@
- Boston, MA 02111-1307, USA.
- */
-
--#ifndef CDDB_LOH_NI_H
-+#ifndef CDDB_LOG_NI_H
- #define CDDB_LOG_NI_H
-
- #ifdef __cplusplus
diff --git a/audio/libcddb/files/patch-include_cddb_cddb__log.h b/audio/libcddb/files/patch-include_cddb_cddb__log.h
new file mode 100644
index 000000000000..329431416fdb
--- /dev/null
+++ b/audio/libcddb/files/patch-include_cddb_cddb__log.h
@@ -0,0 +1,11 @@
+--- include/cddb/cddb_log.h.orig 2005-03-11 21:29:29 UTC
++++ include/cddb/cddb_log.h
+@@ -19,7 +19,7 @@
+ Boston, MA 02111-1307, USA.
+ */
+
+-#ifndef CDDB_LOH_H
++#ifndef CDDB_LOG_H
+ #define CDDB_LOG_H
+
+ #ifdef __cplusplus
diff --git a/audio/libcddb/files/patch-include_cddb_cddb__log__ni.h b/audio/libcddb/files/patch-include_cddb_cddb__log__ni.h
new file mode 100644
index 000000000000..63a165f259c7
--- /dev/null
+++ b/audio/libcddb/files/patch-include_cddb_cddb__log__ni.h
@@ -0,0 +1,11 @@
+--- include/cddb/cddb_log_ni.h.orig 2005-03-11 21:29:29 UTC
++++ include/cddb/cddb_log_ni.h
+@@ -19,7 +19,7 @@
+ Boston, MA 02111-1307, USA.
+ */
+
+-#ifndef CDDB_LOH_NI_H
++#ifndef CDDB_LOG_NI_H
+ #define CDDB_LOG_NI_H
+
+ #ifdef __cplusplus
diff --git a/audio/libconvolve/files/patch-Makefile b/audio/libconvolve/files/patch-Makefile
index 1ab141eb90c3..22c193b3f084 100644
--- a/audio/libconvolve/files/patch-Makefile
+++ b/audio/libconvolve/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Mon Apr 2 09:20:41 2007
-+++ Makefile Mon Apr 2 09:20:55 2007
+--- Makefile.orig 2005-11-29 00:18:03 UTC
++++ Makefile
@@ -1,19 +1,18 @@
PREFIX=/usr/local
@@ -23,7 +23,7 @@
ST_TARGET = libconvolve.a
-@@ -53,5 +52,5 @@
+@@ -53,5 +52,5 @@ install: $(TARGET)
cp $(TARGET) $(PREFIX)/lib/
cp $(ST_TARGET) $(PREFIX)/lib/
cp convolve.h $(PREFIX)/include/
diff --git a/audio/libconvolve/files/patch-convolution__init.c b/audio/libconvolve/files/patch-convolution__init.c
new file mode 100644
index 000000000000..7fca9b6f5c4d
--- /dev/null
+++ b/audio/libconvolve/files/patch-convolution__init.c
@@ -0,0 +1,74 @@
+--- convolution_init.c.orig 2005-11-27 23:24:57 UTC
++++ convolution_init.c
+@@ -17,8 +17,19 @@
+ */
+
+ #include "convolve.h"
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <math.h>
++#include <errno.h>
++
++int my_posix_memalign(void **memptr, size_t alignment, size_t size)
++{
++ *memptr = malloc(size);
++
++ if (*memptr != NULL)
++ return 0;
++ else
++ return errno;
++}
+
+ int convolution_init (convolution_t *conv,
+ int number_of_responses,
+@@ -47,12 +58,12 @@ int convolution_init (convolution_t *con
+ // allocate FFT buffers
+ // as r2c stores only N/2+1 results, we don't need the padded size for this
+ // conv->fft_complex = (fftwf_complex*)malloc (sizeof(fftwf_complex) * (conv->chunk_length + 1));
+- posix_memalign(&conv->fft_complex, 16, sizeof(fftwf_complex) * (conv->chunk_length + 1));
++ my_posix_memalign(&conv->fft_complex, 16, sizeof(fftwf_complex) * (conv->chunk_length + 1));
+
+
+ // this one still needs to be 2 * chunk_length as we zero pad it
+ // conv->fft_real = (float*)malloc (sizeof(float) * 2 * conv->chunk_length);
+- posix_memalign(&conv->fft_real, 16, sizeof(float) * 2 * conv->chunk_length);
++ my_posix_memalign(&conv->fft_real, 16, sizeof(float) * 2 * conv->chunk_length);
+
+ // create fftw plans
+ conv->fft_plan_forward = fftwf_plan_dft_r2c_1d (2 * conv->chunk_length,
+@@ -100,7 +111,7 @@ int convolution_init (convolution_t *con
+ * (conv->chunk_length + 1)
+ * conv->fft_responses[index]->number_of_chunks);
+ */
+- posix_memalign(&conv->fft_responses[index]->channel_data[index2],
++ my_posix_memalign(&conv->fft_responses[index]->channel_data[index2],
+ 16,
+ sizeof(fftwf_complex)
+ * (conv->chunk_length + 1)
+@@ -169,7 +180,7 @@ int convolution_init (convolution_t *con
+
+ // need to divide (integer divide) the index by number_of_responses to get
+ // a valid index into the list of responses.
+- posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
++ my_posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
+ sizeof(fftwf_complex) * conv->fft_responses[index/conv->number_of_response_channels]->number_of_chunks
+ * (conv->chunk_length + 1));
+
+@@ -189,7 +200,7 @@ int convolution_init (convolution_t *con
+ = (fftwf_complex*)malloc (sizeof(fftwf_complex) * conv->fft_responses[index]->number_of_chunks
+ * (conv->chunk_length + 1));
+ */
+- posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
++ my_posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
+ sizeof(fftwf_complex) * conv->fft_responses[index]->number_of_chunks
+ * (conv->chunk_length + 1));
+
+@@ -222,7 +233,7 @@ int convolution_init (convolution_t *con
+ for (index = 0; index < conv->number_of_response_channels; ++index) {
+
+ // conv->overlap_buffers[index] = (float*)malloc (sizeof(float) * conv->chunk_length);
+- posix_memalign(&conv->overlap_buffers[index], 16, sizeof(float) * conv->chunk_length);
++ my_posix_memalign(&conv->overlap_buffers[index], 16, sizeof(float) * conv->chunk_length);
+
+ // zero out
+ for (index2 = 0; index2 < conv->chunk_length; ++index2) {
diff --git a/audio/libconvolve/files/patch-convolution__process.c b/audio/libconvolve/files/patch-convolution__process.c
new file mode 100644
index 000000000000..da28f547847b
--- /dev/null
+++ b/audio/libconvolve/files/patch-convolution__process.c
@@ -0,0 +1,11 @@
+--- convolution_process.c.orig 2005-11-27 23:23:16 UTC
++++ convolution_process.c
+@@ -23,7 +23,7 @@
+ #include <dsp/dspop.h>
+ #endif
+
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <math.h>
+
+
diff --git a/audio/libconvolve/files/patch-convolution_init.c b/audio/libconvolve/files/patch-convolution_init.c
deleted file mode 100644
index 6c5bebc4eb34..000000000000
--- a/audio/libconvolve/files/patch-convolution_init.c
+++ /dev/null
@@ -1,74 +0,0 @@
---- convolution_init.c.orig Mon Nov 28 00:24:57 2005
-+++ convolution_init.c Mon Apr 2 09:26:43 2007
-@@ -17,8 +17,19 @@
- */
-
- #include "convolve.h"
--#include <malloc.h>
-+#include <stdlib.h>
- #include <math.h>
-+#include <errno.h>
-+
-+int my_posix_memalign(void **memptr, size_t alignment, size_t size)
-+{
-+ *memptr = malloc(size);
-+
-+ if (*memptr != NULL)
-+ return 0;
-+ else
-+ return errno;
-+}
-
- int convolution_init (convolution_t *conv,
- int number_of_responses,
-@@ -47,12 +58,12 @@
- // allocate FFT buffers
- // as r2c stores only N/2+1 results, we don't need the padded size for this
- // conv->fft_complex = (fftwf_complex*)malloc (sizeof(fftwf_complex) * (conv->chunk_length + 1));
-- posix_memalign(&conv->fft_complex, 16, sizeof(fftwf_complex) * (conv->chunk_length + 1));
-+ my_posix_memalign(&conv->fft_complex, 16, sizeof(fftwf_complex) * (conv->chunk_length + 1));
-
-
- // this one still needs to be 2 * chunk_length as we zero pad it
- // conv->fft_real = (float*)malloc (sizeof(float) * 2 * conv->chunk_length);
-- posix_memalign(&conv->fft_real, 16, sizeof(float) * 2 * conv->chunk_length);
-+ my_posix_memalign(&conv->fft_real, 16, sizeof(float) * 2 * conv->chunk_length);
-
- // create fftw plans
- conv->fft_plan_forward = fftwf_plan_dft_r2c_1d (2 * conv->chunk_length,
-@@ -100,7 +111,7 @@
- * (conv->chunk_length + 1)
- * conv->fft_responses[index]->number_of_chunks);
- */
-- posix_memalign(&conv->fft_responses[index]->channel_data[index2],
-+ my_posix_memalign(&conv->fft_responses[index]->channel_data[index2],
- 16,
- sizeof(fftwf_complex)
- * (conv->chunk_length + 1)
-@@ -169,7 +180,7 @@
-
- // need to divide (integer divide) the index by number_of_responses to get
- // a valid index into the list of responses.
-- posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
-+ my_posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
- sizeof(fftwf_complex) * conv->fft_responses[index/conv->number_of_response_channels]->number_of_chunks
- * (conv->chunk_length + 1));
-
-@@ -189,7 +200,7 @@
- = (fftwf_complex*)malloc (sizeof(fftwf_complex) * conv->fft_responses[index]->number_of_chunks
- * (conv->chunk_length + 1));
- */
-- posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
-+ my_posix_memalign(&conv->input_chunk_ringbuffers[index], 16,
- sizeof(fftwf_complex) * conv->fft_responses[index]->number_of_chunks
- * (conv->chunk_length + 1));
-
-@@ -222,7 +233,7 @@
- for (index = 0; index < conv->number_of_response_channels; ++index) {
-
- // conv->overlap_buffers[index] = (float*)malloc (sizeof(float) * conv->chunk_length);
-- posix_memalign(&conv->overlap_buffers[index], 16, sizeof(float) * conv->chunk_length);
-+ my_posix_memalign(&conv->overlap_buffers[index], 16, sizeof(float) * conv->chunk_length);
-
- // zero out
- for (index2 = 0; index2 < conv->chunk_length; ++index2) {
diff --git a/audio/libconvolve/files/patch-convolution_process.c b/audio/libconvolve/files/patch-convolution_process.c
deleted file mode 100644
index a5582fb2a21e..000000000000
--- a/audio/libconvolve/files/patch-convolution_process.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- convolution_process.c.orig Mon Apr 2 09:22:07 2007
-+++ convolution_process.c Mon Apr 2 09:22:15 2007
-@@ -23,7 +23,7 @@
- #include <dsp/dspop.h>
- #endif
-
--#include <malloc.h>
-+#include <stdlib.h>
- #include <math.h>
-
-
diff --git a/audio/libechonest/files/patch-CMakeLists.txt b/audio/libechonest/files/patch-CMakeLists.txt
index 178257c835fe..f453f6c5d956 100644
--- a/audio/libechonest/files/patch-CMakeLists.txt
+++ b/audio/libechonest/files/patch-CMakeLists.txt
@@ -1,7 +1,7 @@
---- CMakeLists.txt.orig 2014-09-13 05:55:46.000000000 +0200
-+++ CMakeLists.txt 2014-11-29 22:23:13.000000000 +0100
-@@ -59,7 +59,7 @@
- set( ECHONEST_LIB_PATCH_VERSION "0" )
+--- CMakeLists.txt.orig 2015-02-07 19:56:50 UTC
++++ CMakeLists.txt
+@@ -59,7 +59,7 @@ set( ECHONEST_LIB_MINOR_VERSION "3" )
+ set( ECHONEST_LIB_PATCH_VERSION "1" )
set( ECHONEST_LIB_VERSION "${ECHONEST_LIB_MAJOR_VERSION}.${ECHONEST_LIB_MINOR_VERSION}.${ECHONEST_LIB_PATCH_VERSION}" )
-set( ECHONEST_LIB_VERSION_SONAME "${ECHONEST_LIB_MAJOR_VERSION}.${ECHONEST_LIB_MINOR_VERSION}")
@@ -9,7 +9,7 @@
if (CMAKE_COMPILER_IS_GNUCXX)
ADD_DEFINITIONS( -Wall -Wundef -Wcast-align -Wchar-subscripts -Wpointer-arith
-@@ -110,7 +110,7 @@
+@@ -110,7 +110,7 @@ IF (NOT WIN32)
${CMAKE_CURRENT_BINARY_DIR}/libechonest${ECHONEST_LIB_VERSION_SUFFIX}.pc
@ONLY)
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/libechonest${ECHONEST_LIB_VERSION_SUFFIX}.pc
diff --git a/audio/libid3tag/files/patch-id3tag.pc.in b/audio/libid3tag/files/patch-id3tag.pc.in
index 282ed2507a0f..f89fa4b7dfd0 100644
--- a/audio/libid3tag/files/patch-id3tag.pc.in
+++ b/audio/libid3tag/files/patch-id3tag.pc.in
@@ -1,5 +1,5 @@
---- id3tag.pc.in.orig 1970-01-01 09:00:00.000000000 +0900
-+++ id3tag.pc.in 2003-11-11 08:42:38.000000000 +0900
+--- id3tag.pc.in.orig 2016-07-26 15:08:54 UTC
++++ id3tag.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
diff --git a/audio/liblo/files/patch-src-lo_types_internal.h b/audio/liblo/files/patch-src-lo_types_internal.h
deleted file mode 100644
index 8ad55955f6f6..000000000000
--- a/audio/liblo/files/patch-src-lo_types_internal.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/lo_types_internal.h.orig 2013-05-22 18:34:31.000000000 +0200
-+++ src/lo_types_internal.h 2013-06-24 01:54:53.000000000 +0200
-@@ -20,6 +20,7 @@
- #else
- #define closesocket close
- #include <netdb.h>
-+#include <netinet/in.h>
- #include <arpa/inet.h>
- #endif
-
-@@ -33,6 +34,7 @@
-
- #ifdef ENABLE_THREADS
- #include <pthread.h>
-+#include <sys/socket.h>
- #endif
-
- #include "lo/lo_osc_types.h"
diff --git a/audio/liblo/files/patch-src-messages.c b/audio/liblo/files/patch-src-messages.c
deleted file mode 100644
index 0eb8820b8e97..000000000000
--- a/audio/liblo/files/patch-src-messages.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/message.c.orig 2014-01-20 12:49:42.000000000 +0100
-+++ src/message.c 2014-12-03 23:02:28.000000000 +0100
-@@ -996,8 +996,8 @@ void lo_message_pp(lo_message m)
- putchar('\n');
- if (d != end) {
- fprintf(stderr,
-- "liblo warning: type and data do not match (off by %d) in message %p\n",
-- abs((char *) d - (char *) end), m);
-+ "liblo warning: type and data do not match (off by %td) in message %p\n",
-+ d >= end ? (char *) d - (char *) end : (char *) end - (char *) d, m);
- }
- }
-
diff --git a/audio/liblo/files/patch-src_lo__types__internal.h b/audio/liblo/files/patch-src_lo__types__internal.h
new file mode 100644
index 000000000000..7ddcfa966359
--- /dev/null
+++ b/audio/liblo/files/patch-src_lo__types__internal.h
@@ -0,0 +1,18 @@
+--- src/lo_types_internal.h.orig 2013-07-25 10:14:32 UTC
++++ src/lo_types_internal.h
+@@ -20,6 +20,7 @@
+ #else
+ #define closesocket close
+ #include <netdb.h>
++#include <netinet/in.h>
+ #include <arpa/inet.h>
+ #endif
+
+@@ -33,6 +34,7 @@ typedef __int32 int32_t;
+
+ #ifdef ENABLE_THREADS
+ #include <pthread.h>
++#include <sys/socket.h>
+ #endif
+
+ #include "lo/lo_osc_types.h"
diff --git a/audio/liblo/files/patch-src_message.c b/audio/liblo/files/patch-src_message.c
new file mode 100644
index 000000000000..1d72a7025726
--- /dev/null
+++ b/audio/liblo/files/patch-src_message.c
@@ -0,0 +1,13 @@
+--- src/message.c.orig 2014-01-20 11:49:42 UTC
++++ src/message.c
+@@ -996,8 +996,8 @@ void lo_message_pp(lo_message m)
+ putchar('\n');
+ if (d != end) {
+ fprintf(stderr,
+- "liblo warning: type and data do not match (off by %d) in message %p\n",
+- abs((char *) d - (char *) end), m);
++ "liblo warning: type and data do not match (off by %td) in message %p\n",
++ d >= end ? (char *) d - (char *) end : (char *) end - (char *) d, m);
+ }
+ }
+
diff --git a/audio/libmad/files/patch-configure b/audio/libmad/files/patch-configure
index 998ffe2be26e..f4800b97ef3d 100644
--- a/audio/libmad/files/patch-configure
+++ b/audio/libmad/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2014-02-11 23:45:49.000000000 +0100
-+++ configure 2014-02-11 23:50:50.000000000 +0100
-@@ -19096,24 +19096,30 @@
+--- configure.orig 2004-02-05 09:34:07 UTC
++++ configure
+@@ -19096,24 +19096,30 @@ then
esac
fi
diff --git a/audio/libmp3-archive-perl/files/patch-Makefile.PL b/audio/libmp3-archive-perl/files/patch-Makefile.PL
index 4c6f7e243590..65c5009e167d 100644
--- a/audio/libmp3-archive-perl/files/patch-Makefile.PL
+++ b/audio/libmp3-archive-perl/files/patch-Makefile.PL
@@ -1,4 +1,4 @@
---- Makefile.PL.orig 2015-04-20 11:29:37 UTC
+--- Makefile.PL.orig 2003-11-16 07:09:00 UTC
+++ Makefile.PL
@@ -77,7 +77,7 @@ sub MY::install {
my $self = shift;
diff --git a/audio/libmp3splt/files/patch-configure b/audio/libmp3splt/files/patch-configure
index 29a81eceafe0..66278da3d019 100644
--- a/audio/libmp3splt/files/patch-configure
+++ b/audio/libmp3splt/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2013-07-25 15:33:15.000000000 +0000
+--- configure.orig 2014-11-09 16:48:20 UTC
+++ configure
-@@ -15422,7 +15422,7 @@ elif test "x$prefix" != "xNONE"; then
+@@ -15614,7 +15614,7 @@ elif test "x$prefix" != "xNONE"; then
ID3_LIBS="-L$prefix/lib"
fi
diff --git a/audio/libmp3splt/files/patch-src-oformat_parser.c b/audio/libmp3splt/files/patch-src-oformat_parser.c
deleted file mode 100644
index 6006dee820d2..000000000000
--- a/audio/libmp3splt/files/patch-src-oformat_parser.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/oformat_parser.c.orig 2011-11-11 22:14:03.000000000 +0100
-+++ src/oformat_parser.c 2012-04-11 09:45:52.000000000 +0200
-@@ -301,7 +301,7 @@
- }
-
- long minutes = total_time / 100 / 60;
-- int i = (int) (log10l((long double) minutes));
-+ int i = (int) (log10(minutes));
- char number_of_digits = (char) (i + '1');
- if (number_of_digits == '1')
- {
diff --git a/audio/libmp3splt/files/patch-src_oformat__parser.c b/audio/libmp3splt/files/patch-src_oformat__parser.c
new file mode 100644
index 000000000000..b4aad1e29ff9
--- /dev/null
+++ b/audio/libmp3splt/files/patch-src_oformat__parser.c
@@ -0,0 +1,11 @@
+--- src/oformat_parser.c.orig 2014-10-02 22:46:20 UTC
++++ src/oformat_parser.c
+@@ -336,7 +336,7 @@ char splt_of_get_number_of_digits_from_t
+ }
+
+ long minutes = total_time / 100 / 60;
+- int i = (int) (log10l((long double) minutes));
++ int i = (int) (log10(minutes));
+ char number_of_digits = (char) (i + '1');
+ if (number_of_digits == '1')
+ {
diff --git a/audio/libmusicbrainz5/files/patch-src_CMakeLists.txt b/audio/libmusicbrainz5/files/patch-src_CMakeLists.txt
index fb2d918d5151..4e0f96e395e3 100644
--- a/audio/libmusicbrainz5/files/patch-src_CMakeLists.txt
+++ b/audio/libmusicbrainz5/files/patch-src_CMakeLists.txt
@@ -1,4 +1,4 @@
---- src/CMakeLists.txt.orig 2015-06-16 13:01:35 UTC
+--- src/CMakeLists.txt.orig 2014-11-13 13:12:24 UTC
+++ src/CMakeLists.txt
@@ -5,6 +5,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../include
diff --git a/audio/libnoise/files/patch-src_Makefile b/audio/libnoise/files/patch-src_Makefile
index 5ab2fdcd73e3..7f2498167bac 100644
--- a/audio/libnoise/files/patch-src_Makefile
+++ b/audio/libnoise/files/patch-src_Makefile
@@ -1,6 +1,6 @@
---- src/Makefile.orig 2014-09-15 11:57:34 UTC
+--- src/Makefile.orig 2016-07-26 15:10:03 UTC
+++ src/Makefile
-@@ -11,7 +11,7 @@
+@@ -11,7 +11,7 @@ OBJECTS=$(SOURCES:.cpp=.o)
.PHONY: all clean cleandeps cleanobjs cleanlib libnoise libnoise.so libnoise.so.0
# hooks for future makefiles being able to make multiple SOs, or older SOs
@@ -9,7 +9,7 @@
libnoise.so: libnoise.so.0
libnoise.so.0: libnoise.so.0.3
-@@ -21,8 +21,8 @@
+@@ -21,8 +21,8 @@ libnoise.so.0.3: $(OBJECTS)
libnoise.a: $(OBJECTS)
$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $(OBJECTS)
diff --git a/audio/libofa/files/patch-configure b/audio/libofa/files/patch-configure
index 7f59fd800ddf..8b6506185ed6 100644
--- a/audio/libofa/files/patch-configure
+++ b/audio/libofa/files/patch-configure
@@ -1,6 +1,6 @@
---- ./configure.orig 2011-03-18 11:01:22.000000000 -0400
-+++ ./configure 2011-03-18 11:01:22.000000000 -0400
-@@ -20315,13 +20315,6 @@
+--- configure.orig 2016-07-26 15:10:24 UTC
++++ configure
+@@ -20315,13 +20315,6 @@ _ACEOF
diff --git a/audio/libofa/files/patch-examples__example.cpp b/audio/libofa/files/patch-examples__example.cpp
deleted file mode 100644
index 4a0eb68b177c..000000000000
--- a/audio/libofa/files/patch-examples__example.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./examples/example.cpp.orig 2011-03-18 11:01:22.000000000 -0400
-+++ ./examples/example.cpp 2011-03-18 11:01:22.000000000 -0400
-@@ -7,6 +7,8 @@
-
- -------------------------------------------------------------------*/
-
-+#include <stdio.h>
-+#include <string.h>
- #include "protocol.h"
-
- AudioData* loadWaveFile(char *file);
diff --git a/audio/libofa/files/patch-examples__protocol.cpp b/audio/libofa/files/patch-examples__protocol.cpp
deleted file mode 100644
index a8716757c050..000000000000
--- a/audio/libofa/files/patch-examples__protocol.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./examples/protocol.cpp.orig 2011-03-18 11:01:22.000000000 -0400
-+++ ./examples/protocol.cpp 2011-03-18 11:01:22.000000000 -0400
-@@ -8,11 +8,11 @@
- -------------------------------------------------------------------*/
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- #include <string>
- #include <map>
- #include <expat.h>
- #include <curl/curl.h>
--#include <curl/types.h>
- #include <curl/easy.h>
-
- using namespace std;
diff --git a/audio/libofa/files/patch-examples_example.cpp b/audio/libofa/files/patch-examples_example.cpp
new file mode 100644
index 000000000000..e7ffccaaafda
--- /dev/null
+++ b/audio/libofa/files/patch-examples_example.cpp
@@ -0,0 +1,11 @@
+--- examples/example.cpp.orig 2016-07-26 15:10:24 UTC
++++ examples/example.cpp
+@@ -7,6 +7,8 @@
+
+ -------------------------------------------------------------------*/
+
++#include <stdio.h>
++#include <string.h>
+ #include "protocol.h"
+
+ AudioData* loadWaveFile(char *file);
diff --git a/audio/libofa/files/patch-examples_protocol.cpp b/audio/libofa/files/patch-examples_protocol.cpp
new file mode 100644
index 000000000000..88359a716274
--- /dev/null
+++ b/audio/libofa/files/patch-examples_protocol.cpp
@@ -0,0 +1,15 @@
+--- examples/protocol.cpp.orig 2016-07-26 15:10:24 UTC
++++ examples/protocol.cpp
+@@ -8,11 +8,11 @@
+ -------------------------------------------------------------------*/
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <string>
+ #include <map>
+ #include <expat.h>
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ using namespace std;
diff --git a/audio/libofa/files/patch-examples_uselame.cpp b/audio/libofa/files/patch-examples_uselame.cpp
index 310a8ae75075..c23a5ef61237 100644
--- a/audio/libofa/files/patch-examples_uselame.cpp
+++ b/audio/libofa/files/patch-examples_uselame.cpp
@@ -1,5 +1,5 @@
---- examples/uselame.cpp.orig 2013-09-12 09:10:31.000000000 +0000
-+++ examples/uselame.cpp 2013-09-12 09:10:42.000000000 +0000
+--- examples/uselame.cpp.orig 2016-07-26 15:10:24 UTC
++++ examples/uselame.cpp
@@ -12,6 +12,7 @@
#else
#include <sys/wait.h>
diff --git a/audio/libofa/files/patch-examples_wavefile.cpp b/audio/libofa/files/patch-examples_wavefile.cpp
index 41f319082188..0dedb8067616 100644
--- a/audio/libofa/files/patch-examples_wavefile.cpp
+++ b/audio/libofa/files/patch-examples_wavefile.cpp
@@ -1,5 +1,5 @@
---- examples/wavefile.cpp.orig 2013-09-12 08:58:25.000000000 +0000
-+++ examples/wavefile.cpp 2013-09-12 08:58:31.000000000 +0000
+--- examples/wavefile.cpp.orig 2016-07-26 15:10:24 UTC
++++ examples/wavefile.cpp
@@ -11,6 +11,8 @@
#include "io.h"
#endif
diff --git a/audio/libofa/files/patch-lib_JAMA_tnt__math__utils.h b/audio/libofa/files/patch-lib_JAMA_tnt__math__utils.h
new file mode 100644
index 000000000000..db0d6997b6de
--- /dev/null
+++ b/audio/libofa/files/patch-lib_JAMA_tnt__math__utils.h
@@ -0,0 +1,33 @@
+--- lib/JAMA/tnt_math_utils.h.orig 2016-07-26 15:10:24 UTC
++++ lib/JAMA/tnt_math_utils.h
+@@ -20,6 +20,14 @@ inline const _Tp& max(const _Tp& __a, co
+ namespace TNT
+ {
+ /**
++ @returns the absolute value of a real (no-complex) scalar.
++*/
++template <class Real>
++Real abs(const Real &a)
++{
++ return (a > 0 ? a : -a);
++}
++/**
+ @returns hypotenuse of real (non-complex) scalars a and b by
+ avoiding underflow/overflow
+ using (a * sqrt( 1 + (b/a) * (b/a))), rather than
+@@ -56,15 +64,6 @@ Scalar max(const Scalar &a, const Scalar
+ }
+ */
+
+-/**
+- @returns the absolute value of a real (no-complex) scalar.
+-*/
+-template <class Real>
+-Real abs(const Real &a)
+-{
+- return (a > 0 ? a : -a);
+-}
+-
+ }
+ #endif
+ /* MATH_UTILS_H */
diff --git a/audio/libofa/files/patch-lib__JAMA__tnt_math_utils.h b/audio/libofa/files/patch-lib__JAMA__tnt_math_utils.h
deleted file mode 100644
index 10872bc74f97..000000000000
--- a/audio/libofa/files/patch-lib__JAMA__tnt_math_utils.h
+++ /dev/null
@@ -1,33 +0,0 @@
---- ./lib/JAMA/tnt_math_utils.h.orig 2011-03-16 10:47:10.000000000 -0400
-+++ ./lib/JAMA/tnt_math_utils.h 2011-03-16 10:51:40.000000000 -0400
-@@ -20,6 +20,14 @@
- namespace TNT
- {
- /**
-+ @returns the absolute value of a real (no-complex) scalar.
-+*/
-+template <class Real>
-+Real abs(const Real &a)
-+{
-+ return (a > 0 ? a : -a);
-+}
-+/**
- @returns hypotenuse of real (non-complex) scalars a and b by
- avoiding underflow/overflow
- using (a * sqrt( 1 + (b/a) * (b/a))), rather than
-@@ -56,15 +64,6 @@
- }
- */
-
--/**
-- @returns the absolute value of a real (no-complex) scalar.
--*/
--template <class Real>
--Real abs(const Real &a)
--{
-- return (a > 0 ? a : -a);
--}
--
- }
- #endif
- /* MATH_UTILS_H */
diff --git a/audio/libofa/files/patch-lib__signal_op.cpp b/audio/libofa/files/patch-lib__signal_op.cpp
deleted file mode 100644
index 54690666c4e6..000000000000
--- a/audio/libofa/files/patch-lib__signal_op.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./lib/signal_op.cpp.orig 2011-03-18 11:01:22.000000000 -0400
-+++ ./lib/signal_op.cpp 2011-03-18 11:01:39.000000000 -0400
-@@ -13,6 +13,7 @@
-
-
- #include <math.h>
-+#include <stdlib.h>
- #include "signal_op.h"
- #include "AFLIB/aflibConverter.h"
- #include "error_op.h"
diff --git a/audio/libofa/files/patch-lib_signal__op.cpp b/audio/libofa/files/patch-lib_signal__op.cpp
new file mode 100644
index 000000000000..dc6f53d552e3
--- /dev/null
+++ b/audio/libofa/files/patch-lib_signal__op.cpp
@@ -0,0 +1,10 @@
+--- lib/signal_op.cpp.orig 2016-07-26 15:10:24 UTC
++++ lib/signal_op.cpp
+@@ -13,6 +13,7 @@
+
+
+ #include <math.h>
++#include <stdlib.h>
+ #include "signal_op.h"
+ #include "AFLIB/aflibConverter.h"
+ #include "error_op.h"
diff --git a/audio/libogg/files/patch-configure b/audio/libogg/files/patch-configure
index 277d0dfd2016..231bebf5123c 100644
--- a/audio/libogg/files/patch-configure
+++ b/audio/libogg/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Mon Nov 17 17:34:08 2003
-+++ configure Mon Nov 24 18:26:28 2003
-@@ -7818,7 +7819,7 @@
+--- configure.orig 2014-05-27 19:52:46 UTC
++++ configure
+@@ -11719,7 +11719,7 @@ if test -z "$GCC"; then
;;
*)
DEBUG="-g"
@@ -9,7 +9,7 @@
PROFILE="-g -p"
;;
esac
-@@ -7841,8 +7842,8 @@
+@@ -11742,8 +11742,8 @@ else
;;
*)
DEBUG="-g -Wall -fsigned-char"
diff --git a/audio/libsamplerate/files/patch-src_samplerate.h b/audio/libsamplerate/files/patch-src_samplerate.h
index 171ecfee62bd..e316af6767e2 100644
--- a/audio/libsamplerate/files/patch-src_samplerate.h
+++ b/audio/libsamplerate/files/patch-src_samplerate.h
@@ -1,6 +1,6 @@
---- src/samplerate.h.orig 2013-11-23 23:36:11.000000000 +0100
-+++ src/samplerate.h 2013-11-23 23:36:25.000000000 +0100
-@@ -174,7 +174,7 @@
+--- src/samplerate.h.orig 2011-01-19 10:39:21 UTC
++++ src/samplerate.h
+@@ -174,7 +174,7 @@ enum
SRC_SINC_MEDIUM_QUALITY = 1,
SRC_SINC_FASTEST = 2,
SRC_ZERO_ORDER_HOLD = 3,
diff --git a/audio/libshairport/files/patch-configure.in b/audio/libshairport/files/patch-configure.in
index 1a51ff291521..3ac6b33f836b 100644
--- a/audio/libshairport/files/patch-configure.in
+++ b/audio/libshairport/files/patch-configure.in
@@ -1,6 +1,6 @@
---- configure.in.orig 2011-09-23 22:56:46.000000000 +0200
-+++ configure.in 2012-10-09 12:09:33.000000000 +0200
-@@ -11,8 +11,9 @@
+--- configure.in.orig 2011-09-23 20:56:46 UTC
++++ configure.in
+@@ -11,8 +11,9 @@ AC_PROG_LIBTOOL
# Checks for libraries.
#AC_CHECK_LIB([c], [main])
@@ -11,7 +11,7 @@
AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
OUTPUT_FILES="Makefile"
-@@ -21,4 +22,4 @@
+@@ -21,4 +22,4 @@ LIBDIR=$PREFIX
AC_CONFIG_FILES([${OUTPUT_FILES}])
AC_OUTPUT(Makefile src/Makefile)
diff --git a/audio/libshairport/files/patch-src-Makefile.am b/audio/libshairport/files/patch-src-Makefile.am
deleted file mode 100644
index 4f1d46973aee..000000000000
--- a/audio/libshairport/files/patch-src-Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/Makefile.am.orig 2011-09-23 23:14:39.000000000 +0200
-+++ src/Makefile.am 2012-10-09 12:09:33.000000000 +0200
-@@ -1,7 +1,7 @@
- lib_LTLIBRARIES=libshairport.la
-
--library_includedir=$(includedir)
--library_include_HEADERS = shairport.h
-+library_includedir=$(includedir)/shairport
-+library_include_HEADERS = shairport.h ao.h socketlib.h
-
- libshairport_la_SOURCES=shairport.c hairtunes.c socketlib.c alac.c
- libshairport_la_LDFLAGS=-dynamiclib
diff --git a/audio/libshairport/files/patch-src-alac.c b/audio/libshairport/files/patch-src-alac.c
deleted file mode 100644
index 8face193c68f..000000000000
--- a/audio/libshairport/files/patch-src-alac.c
+++ /dev/null
@@ -1,47 +0,0 @@
---- src/alac.c.orig 2011-08-21 00:06:21.000000000 +0200
-+++ src/alac.c 2012-10-09 12:09:33.000000000 +0200
-@@ -804,7 +804,7 @@
- }
- else
- {
-- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type);
-+ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type);
- /* i think the only other prediction type (or perhaps this is just a
- * boolean?) runs adaptive fir twice.. like:
- * predictor_decompress_fir_adapt(predictor_error, tempout, ...)
-@@ -885,7 +885,7 @@
- }
- case 20:
- case 32:
-- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
-+ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
- break;
- default:
- break;
-@@ -1004,7 +1004,7 @@
- }
- else
- { /* see mono case */
-- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_a);
-+ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_a);
- }
-
- /* channel 2 */
-@@ -1029,7 +1029,7 @@
- }
- else
- {
-- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_b);
-+ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_b);
- }
- }
- else
-@@ -1106,7 +1106,7 @@
- }
- case 20:
- case 32:
-- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
-+ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
- break;
- default:
- break;
diff --git a/audio/libshairport/files/patch-src-ao.h b/audio/libshairport/files/patch-src-ao.h
deleted file mode 100644
index 2e1ee3f78bcd..000000000000
--- a/audio/libshairport/files/patch-src-ao.h
+++ /dev/null
@@ -1,161 +0,0 @@
---- src/ao.h.orig 2012-10-09 12:33:01.000000000 +0200
-+++ src/ao.h 2012-10-09 12:09:33.000000000 +0200
-@@ -0,0 +1,158 @@
-+/*
-+ *
-+ * ao.h
-+ *
-+ * Original Copyright (C) Aaron Holtzman - May 1999
-+ * Modifications Copyright (C) Stan Seibert - July 2000, July 2001
-+ * More Modifications Copyright (C) Jack Moffitt - October 2000
-+ *
-+ * This file is part of libao, a cross-platform audio outputlibrary. See
-+ * README for a history of this source code.
-+ *
-+ * libao is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * libao is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with GNU Make; see the file COPYING. If not, write to
-+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ */
-+#ifndef __AO_H__
-+#define __AO_H__
-+
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#endif /* __cplusplus */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <errno.h>
-+
-+/* --- Constants ---*/
-+
-+#define AO_TYPE_LIVE 1
-+#define AO_TYPE_FILE 2
-+
-+
-+#define AO_ENODRIVER 1
-+#define AO_ENOTFILE 2
-+#define AO_ENOTLIVE 3
-+#define AO_EBADOPTION 4
-+#define AO_EOPENDEVICE 5
-+#define AO_EOPENFILE 6
-+#define AO_EFILEEXISTS 7
-+#define AO_EBADFORMAT 8
-+
-+#define AO_EFAIL 100
-+
-+
-+#define AO_FMT_LITTLE 1
-+#define AO_FMT_BIG 2
-+#define AO_FMT_NATIVE 4
-+
-+/* --- Structures --- */
-+
-+typedef struct ao_info {
-+ int type; /* live output or file output? */
-+ char *name; /* full name of driver */
-+ char *short_name; /* short name of driver */
-+ char *author; /* driver author */
-+ char *comment; /* driver comment */
-+ int preferred_byte_format;
-+ int priority;
-+ char **options;
-+ int option_count;
-+} ao_info;
-+
-+typedef struct ao_functions ao_functions;
-+typedef struct ao_device ao_device;
-+
-+typedef struct ao_sample_format {
-+ int bits; /* bits per sample */
-+ int rate; /* samples per second (in a single channel) */
-+ int channels; /* number of audio channels */
-+ int byte_format; /* Byte ordering in sample, see constants below */
-+ char *matrix; /* input channel location/ordering */
-+} ao_sample_format;
-+
-+typedef struct ao_option {
-+ char *key;
-+ char *value;
-+ struct ao_option *next;
-+} ao_option;
-+
-+#if defined(AO_BUILDING_LIBAO)
-+#include "ao_private.h"
-+#endif
-+
-+/* --- Functions --- */
-+
-+/* library setup/teardown */
-+void ao_initialize(void);
-+void ao_shutdown(void);
-+
-+/* device setup/playback/teardown */
-+int ao_append_global_option(const char *key,
-+ const char *value);
-+int ao_append_option(ao_option **options,
-+ const char *key,
-+ const char *value);
-+void ao_free_options(ao_option *options);
-+
-+char* ao_get_option(ao_option *options, const char* key);
-+
-+ao_device* ao_open_live(int driver_id,
-+ ao_sample_format *format,
-+ ao_option *option);
-+ao_device* ao_open_file(int driver_id,
-+ const char *filename,
-+ int overwrite,
-+ ao_sample_format *format,
-+ ao_option *option);
-+
-+int ao_play(ao_device *device,
-+ char *output_samples,
-+ uint32_t num_bytes);
-+int ao_close(ao_device *device);
-+
-+/* driver information */
-+int ao_driver_id(const char *short_name);
-+int ao_default_driver_id(void);
-+ao_info *ao_driver_info(int driver_id);
-+ao_info **ao_driver_info_list(int *driver_count);
-+char *ao_file_extension(int driver_id);
-+
-+/* miscellaneous */
-+int ao_is_big_endian(void);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif /* __cplusplus */
-+
-+#endif /* __AO_H__ */
-+
-+extern struct AudioOutput g_ao;
-+struct AudioOutput
-+ {
-+ void (*ao_initialize)(void);
-+ int (*ao_play)(ao_device *, char *, uint32_t);
-+ int (*ao_default_driver_id)(void);
-+ ao_device* (*ao_open_live)( int, ao_sample_format *, ao_option *);
-+ int (*ao_close)(ao_device *);
-+ /* -- Device Setup/Playback/Teardown -- */
-+ int (*ao_append_option)(ao_option **, const char *, const char *);
-+ void (*ao_free_options)(ao_option *);
-+ char* (*ao_get_option)(ao_option *, const char* );
-+ void (*ao_set_metadata)(const char *buffer, unsigned int size);
-+ void (*ao_set_metadata_coverart)(const char *buffer, unsigned int size);
-+ };
diff --git a/audio/libshairport/files/patch-src-hairtunes.c b/audio/libshairport/files/patch-src-hairtunes.c
deleted file mode 100644
index b00621d1ea45..000000000000
--- a/audio/libshairport/files/patch-src-hairtunes.c
+++ /dev/null
@@ -1,233 +0,0 @@
---- src/hairtunes.c.orig 2011-09-23 21:55:48.000000000 +0200
-+++ src/hairtunes.c 2012-10-09 12:09:33.000000000 +0200
-@@ -25,7 +25,7 @@
- */
-
- #define XBMC
--//#defined HAS_AO
-+#define HAS_AO
-
- #include <stdio.h>
- #include <stdlib.h>
-@@ -45,7 +45,7 @@
- #include <sys/signal.h>
- #include <fcntl.h>
- #ifdef HAS_AO
--#include <ao/ao.h>
-+#include "ao.h"
- #endif
-
- #ifdef FANCY_RESAMPLING
-@@ -89,7 +89,6 @@
- // maximal resampling shift - conservative
- #define OUTFRAME_BYTES (4*(frame_size+3))
-
--
- alac_file *decoder_info;
-
- #ifdef FANCY_RESAMPLING
-@@ -122,8 +121,8 @@
- pthread_cond_t ab_buffer_ready;
-
- static void die(char *why) {
-- fprintf(stderr, "FATAL: %s\n", why);
-- exit(1);
-+ xprintf("FATAL: %s\n", why);
-+ //exit(1);
- }
-
- static int hex2bin(unsigned char *buf, char *hex) {
-@@ -246,13 +245,13 @@
- continue;
- }
- if (!strcmp(line, "exit\n")) {
-- exit(0);
-+ ;//exit(0);
- }
- if (!strcmp(line, "flush\n")) {
- hairtunes_flush();
- }
- }
-- fprintf(stderr, "bye!\n");
-+ xprintf("bye!\n");
- fflush(stderr);
- #endif
-
-@@ -263,18 +262,28 @@
- {
- assert(f<=0);
- if (debug)
-- fprintf(stderr, "VOL: %lf\n", f);
-+ xprintf("VOL: %lf\n", f);
- volume = pow(10.0,0.05*f);
- fix_volume = 65536.0 * volume;
- }
-
-+void hairtunes_set_metadata(const char *buffer, unsigned int size)
-+{
-+ g_ao.ao_set_metadata(buffer, size);
-+}
-+
-+void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size)
-+{
-+ g_ao.ao_set_metadata_coverart(buffer, size);
-+}
-+
- void hairtunes_flush(void)
- {
- pthread_mutex_lock(&ab_mutex);
- ab_resync();
- pthread_mutex_unlock(&ab_mutex);
- if (debug)
-- fprintf(stderr, "FLUSH\n");
-+ xprintf("FLUSH\n");
- }
-
- #ifdef HAIRTUNES_STANDALONE
-@@ -424,7 +433,7 @@
- } else if (seq_order(ab_read, seqno)) { // late but not yet played
- abuf = audio_buffer + BUFIDX(seqno);
- } else { // too late.
-- fprintf(stderr, "\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write);
-+ xprintf("\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write);
- }
- buf_fill = ab_write - ab_read;
- pthread_mutex_unlock(&ab_mutex);
-@@ -521,7 +530,7 @@
- if (seq_order(last, first))
- return;
-
-- fprintf(stderr, "requesting resend on %d packets (port %d)\n", last-first+1, controlport);
-+ xprintf("requesting resend on %d packets (port %d)\n", last-first+1, controlport);
-
- char req[8]; // *not* a standard RTCP NACK
- req[0] = 0x80;
-@@ -605,8 +614,8 @@
- port += 3;
- }
-
-- printf("port: %d\n", port); // let our handler know where we end up listening
-- printf("cport: %d\n", port+1);
-+ xprintf("port: %d\n", port); // let our handler know where we end up listening
-+ xprintf("cport: %d\n", port+1);
-
- rtp_sockets[0] = sock;
- rtp_sockets[1] = csock;
-@@ -709,7 +718,7 @@
- bf_est_drift = biquad_filt(&bf_drift_lpf, CONTROL_B*(bf_est_err*CONTROL_A + err_deriv) + bf_est_drift);
-
- if (debug)
-- fprintf(stderr, "bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err);
-+ xprintf("bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err);
- bf_playback_rate = 1.0 + CONTROL_A*bf_est_err + bf_est_drift;
-
- bf_last_err = bf_est_err;
-@@ -725,7 +734,7 @@
- buf_fill = ab_write - ab_read;
- if (buf_fill < 1 || !ab_synced || ab_buffering) { // init or underrun. stop and wait
- if (ab_synced)
-- fprintf(stderr, "\nunderrun\n");
-+ xprintf("\nunderrun\n");
-
- ab_buffering = 1;
- pthread_cond_wait(&ab_buffer_ready, &ab_mutex);
-@@ -737,7 +746,7 @@
- return 0;
- }
- if (buf_fill >= BUFFER_FRAMES) { // overrunning! uh-oh. restart at a sane distance
-- fprintf(stderr, "\noverrun.\n");
-+ xprintf("\noverrun.\n");
- ab_read = ab_write - START_FILL;
- }
- read = ab_read;
-@@ -749,7 +758,7 @@
-
- volatile abuf_t *curframe = audio_buffer + BUFIDX(read);
- if (!curframe->ready) {
-- fprintf(stderr, "\nmissing frame.\n");
-+ xprintf("\nmissing frame.\n");
- memset(curframe->data, 0, FRAME_BYTES);
- }
- curframe->ready = 0;
-@@ -776,13 +785,13 @@
- if (stuff) {
- if (stuff==1) {
- if (debug)
-- fprintf(stderr, "+++++++++\n");
-+ xprintf("+++++++++\n");
- // interpolate one sample
- *outptr++ = dithered_vol(((long)inptr[-2] + (long)inptr[0]) >> 1);
- *outptr++ = dithered_vol(((long)inptr[-1] + (long)inptr[1]) >> 1);
- } else if (stuff==-1) {
- if (debug)
-- fprintf(stderr, "---------\n");
-+ xprintf("---------\n");
- inptr++;
- inptr++;
- }
-@@ -849,6 +858,11 @@
- inbuf = buffer_get_frame();
- } while (!inbuf && audio_running);
-
-+ if(!audio_running)
-+ {
-+ return 0; //don't access inbuf if audio stopped
-+ }
-+
- #ifdef FANCY_RESAMPLING
- if (fancy_resampling) {
- int i;
-@@ -881,7 +895,7 @@
- }
- #ifdef HAS_AO
- } else {
-- ao_play(dev, (char *)outbuf, play_samples*4);
-+ g_ao.ao_play(dev, (char *)outbuf, play_samples*4);
- #endif
- }
- }
-@@ -906,7 +920,7 @@
- ao_device *dev;
-
- void* init_ao() {
-- ao_initialize();
-+ g_ao.ao_initialize();
-
- int driver;
- #ifndef XBMC
-@@ -921,7 +935,7 @@
- #endif
- {
- // otherwise choose the default
-- driver = ao_default_driver_id();
-+ driver = g_ao.ao_default_driver_id();
- }
-
- ao_sample_format fmt;
-@@ -944,9 +958,9 @@
- }
- #endif
-
-- ao_append_option(&ao_opts, "name", "Streaming...");
-+ g_ao.ao_append_option(&ao_opts, "name", "Streaming...");
-
-- dev = ao_open_live(driver, &fmt, ao_opts);
-+ dev = g_ao.ao_open_live(driver, &fmt, ao_opts);
- if (dev == NULL) {
- die("Could not open ao device");
- }
-@@ -985,12 +999,13 @@
- audio_running = 0;
- pthread_join(audio_thread, NULL);
- #ifdef HAS_AO
-- ao_close(dev);
-+ g_ao.ao_close(dev);
- #endif
- }
-
- void hairtunes_cleanup(void)
- {
-+ pthread_cond_signal(&ab_buffer_ready);
- clean_output();
- clean_rtp();
- clean_buffer();
diff --git a/audio/libshairport/files/patch-src-hairtunes.h b/audio/libshairport/files/patch-src-hairtunes.h
deleted file mode 100644
index 0dfba09d6ff6..000000000000
--- a/audio/libshairport/files/patch-src-hairtunes.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/hairtunes.h.orig 2011-08-21 00:06:21.000000000 +0200
-+++ src/hairtunes.h 2012-10-09 12:09:33.000000000 +0200
-@@ -4,6 +4,8 @@
- int hairtunes_init(char *pAeskey, char *pAesiv, char *pFmtpstr, int pCtrlPort, int pTimingPort,
- int pDataPort, char *pRtpHost, char*pPipeName, char *pLibaoDriver, char *pLibaoDeviceName, char *pLibaoDeviceId);
- void hairtunes_setvolume(float vol);
-+void hairtunes_set_metadata(const char *buffer, unsigned int size);
-+void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size);
- void hairtunes_flush(void);
- void hairtunes_cleanup(void);
-
diff --git a/audio/libshairport/files/patch-src-shairport.c b/audio/libshairport/files/patch-src-shairport.c
deleted file mode 100644
index 00fd93c92d1c..000000000000
--- a/audio/libshairport/files/patch-src-shairport.c
+++ /dev/null
@@ -1,691 +0,0 @@
---- src/shairport.c.orig 2011-08-21 01:57:56.000000000 +0200
-+++ src/shairport.c 2012-10-09 12:09:33.000000000 +0200
-@@ -31,6 +31,27 @@
- #include "shairport.h"
- #include "hairtunes.h"
-
-+static struct printfPtr g_printf={NULL};
-+
-+int xprintf(const char *format, ...)
-+{
-+ char dbg[2048];
-+ va_list args;
-+ va_start(args, format);
-+ vsnprintf(dbg, sizeof(dbg), format, args);
-+ va_end(args);
-+ if(g_printf.extprintf)
-+ {
-+ g_printf.extprintf(dbg, sizeof(dbg));
-+ }
-+ else
-+ {
-+ printf(dbg);
-+ }
-+
-+ return 1;
-+}
-+
- #ifndef TRUE
- #define TRUE (-1)
- #endif
-@@ -92,13 +113,26 @@
- static char tPassword[56] = "";
- static char tHWID[HWID_SIZE] = {0,51,52,53,54,55};
-
-+#ifdef XBMC
-+struct AudioOutput g_ao;
-+void shairport_set_ao(struct AudioOutput *ao)
-+{
-+ g_ao=*ao;
-+}
-+
-+void shairport_set_printf(struct printfPtr *funcPtr)
-+{
-+ g_printf = *funcPtr;
-+}
-+#endif
-+
- #ifndef XBMC
- int main(int argc, char **argv)
- #else
- int shairport_main(int argc, char **argv)
- #endif
- {
-- printf("initializing shairport\n");
-+ xprintf("initializing shairport\n",NULL);
- char tHWID_Hex[HWID_SIZE * 2 + 1];
- char tKnownHwid[32];
-
-@@ -177,22 +211,22 @@
- }
- else if(!strcmp(arg, "-h") || !strcmp(arg, "--help"))
- {
-- slog(LOG_INFO, "ShairPort version 0.05 C port - Airport Express emulator\n");
-- slog(LOG_INFO, "Usage:\nshairport [OPTION...]\n\nOptions:\n");
-- slog(LOG_INFO, " -a, --apname=AirPort Sets Airport name\n");
-- slog(LOG_INFO, " -p, --password=secret Sets Password (not working)\n");
-- slog(LOG_INFO, " -o, --server_port=5000 Sets Port for Avahi/dns-sd\n");
-- slog(LOG_INFO, " -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n");
-- slog(LOG_INFO, " -d Daemon mode\n");
-- slog(LOG_INFO, " -q, --quiet Supresses all output.\n");
-- slog(LOG_INFO, " -v,-v2,-v3,-vv Various debugging levels\n");
-- slog(LOG_INFO, "\n");
-+ xprintf("ShairPort version 0.05 C port - Airport Express emulator\n");
-+ xprintf("Usage:\nshairport [OPTION...]\n\nOptions:\n");
-+ xprintf(" -a, --apname=AirPort Sets Airport name\n");
-+ xprintf(" -p, --password=secret Sets Password (not working)\n");
-+ xprintf(" -o, --server_port=5000 Sets Port for Avahi/dns-sd\n");
-+ xprintf(" -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n");
-+ xprintf(" -d Daemon mode\n");
-+ xprintf(" -q, --quiet Supresses all output.\n");
-+ xprintf(" -v,-v2,-v3,-vv Various debugging levels\n");
-+ xprintf("\n");
- return 0;
- }
- }
-
- if ( buffer_start_fill < 30 || buffer_start_fill > BUFFER_FRAMES ) {
-- fprintf(stderr, "buffer value must be > 30 and < %d\n", BUFFER_FRAMES);
-+ xprintf("buffer value must be > 30 and < %d\n", BUFFER_FRAMES);
- return(0);
- }
-
-@@ -201,11 +235,11 @@
- int tPid = fork();
- if(tPid < 0)
- {
-- exit(1); // Error on fork
-+ //exit(1); // Error on fork
- }
- else if(tPid > 0)
- {
-- exit(0);
-+ //exit(0);
- }
- else
- {
-@@ -246,10 +280,10 @@
- sscanf(tHWID_Hex, "%02X%02X%02X%02X%02X%02X", &tHWID[0], &tHWID[1], &tHWID[2], &tHWID[3], &tHWID[4], &tHWID[5]);
- }
-
-- slog(LOG_INFO, "LogLevel: %d\n", kCurrentLogLevel);
-- slog(LOG_INFO, "AirName: %s\n", tServerName);
-- slog(LOG_INFO, "HWID: %.*s\n", HWID_SIZE, tHWID+1);
-- slog(LOG_INFO, "HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex);
-+ xprintf("LogLevel: %d\n", kCurrentLogLevel);
-+ xprintf("AirName: %s\n", tServerName);
-+ xprintf("HWID: %.*s\n", HWID_SIZE, tHWID+1);
-+ xprintf("HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex);
-
- if(tSimLevel >= 1)
- {
-@@ -263,12 +297,12 @@
- #ifndef XBMC
- startAvahi(tHWID_Hex, tServerName, tPort);
- #endif
-- slog(LOG_DEBUG_V, "Starting connection server: specified server port: %d\n", tPort);
-+ xprintf("Starting connection server: specified server port: %d\n", tPort);
- tServerSock = setupListenServer(&tAddrInfo, tPort);
- if(tServerSock < 0)
- {
- freeaddrinfo(tAddrInfo);
-- slog(LOG_INFO, "Error setting up server socket on port %d, try specifying a different port\n", tPort);
-+ xprintf("Error setting up server socket on port %d, try specifying a different port\n", tPort);
- return 0;
- }
-
-@@ -295,7 +329,7 @@
-
- int readsock;
-
-- slog(LOG_DEBUG_V, "Waiting for clients to connect\n");
-+ xprintf("Waiting for clients to connect\n");
-
- while(m_running)
- {
-@@ -327,7 +361,7 @@
- {
- freeaddrinfo(tAddrInfo);
- tAddrInfo = NULL;
-- slog(LOG_DEBUG, "...Accepted Client Connection..\n");
-+ xprintf("...Accepted Client Connection..\n");
- close(tServerSock);
- handleClient(tClientSock, tPassword, tHWID);
- //close(tClientSock);
-@@ -335,11 +369,11 @@
- }
- else
- {
-- slog(LOG_DEBUG_VV, "Child now busy handling new client\n");
-+ xprintf("Child now busy handling new client\n");
- close(tClientSock);
- }
- #else
-- slog(LOG_DEBUG, "...Accepted Client Connection..\n");
-+ xprintf("...Accepted Client Connection..\n");
- handleClient(tClientSock, tPassword, tHWID);
- #endif
- }
-@@ -349,7 +383,7 @@
- }
- }
-
-- slog(LOG_DEBUG_VV, "Finished\n");
-+ xprintf("Finished\n");
- if(tAddrInfo != NULL)
- {
- freeaddrinfo(tAddrInfo);
-@@ -360,6 +394,7 @@
- void shairport_exit(void)
- {
- m_running = 0;
-+ close(tServerSock);
- }
-
- int shairport_is_running(void)
-@@ -407,7 +442,7 @@
-
- void handleClient(int pSock, char *pPassword, char *pHWADDR)
- {
-- slog(LOG_DEBUG_VV, "In Handle Client\n");
-+ xprintf("In Handle Client\n");
- fflush(stdout);
-
- socklen_t len;
-@@ -426,7 +461,7 @@
-
- // deal with both IPv4 and IPv6:
- if (addr.ss_family == AF_INET) {
-- slog(LOG_DEBUG_V, "Constructing ipv4 address\n");
-+ xprintf("Constructing ipv4 address\n");
- struct sockaddr_in *s = (struct sockaddr_in *)&addr;
- port = ntohs(s->sin_port);
- inet_ntop(AF_INET, &s->sin_addr, ipstr, sizeof ipstr);
-@@ -446,20 +481,20 @@
- if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\x00\x00\xff\xff", 12) == 0)
- {
- // its ipv4...
-- slog(LOG_DEBUG_V, "Constructing ipv4 from ipv6 address\n");
-+ xprintf("Constructing ipv4 from ipv6 address\n");
- memcpy(ipbin, &addr.bin[12], 4);
- ipbinlen = 4;
- }
- else
- {
-- slog(LOG_DEBUG_V, "Constructing ipv6 address\n");
-+ xprintf("Constructing ipv6 address\n");
- memcpy(ipbin, &s->sin6_addr, 16);
- ipbinlen = 16;
- }
- }
-
-- slog(LOG_DEBUG_V, "Peer IP address: %s\n", ipstr);
-- slog(LOG_DEBUG_V, "Peer port : %d\n", port);
-+ xprintf("Peer IP address: %s\n", ipstr);
-+ xprintf("Peer port : %d\n", port);
-
- int tMoreDataNeeded = 1;
- struct keyring tKeys;
-@@ -478,18 +513,19 @@
- while(1 == tMoreDataNeeded)
- {
- tError = readDataFromClient(pSock, &(tConn.recv));
-- if(!tError && strlen(tConn.recv.data) > 0)
-+ //if(!tError && strlen(tConn.recv.data) > 0)
-+ if(!tError && tConn.recv.current > 0)
- {
-- slog(LOG_DEBUG_VV, "Finished Reading some data from client\n");
-+ xprintf("Finished Reading some data from client\n");
- // parse client request
- tMoreDataNeeded = parseMessage(&tConn, ipbin, ipbinlen, pHWADDR);
- if(1 == tMoreDataNeeded)
- {
-- slog(LOG_DEBUG_VV, "\n\nNeed to read more data\n");
-+ xprintf("\n\nNeed to read more data\n");
- }
- else if(-1 == tMoreDataNeeded) // Forked process down below ended.
- {
-- slog(LOG_DEBUG_V, "Forked Process ended...cleaning up\n");
-+ xprintf("Forked Process ended...cleaning up\n");
- cleanup(&tConn);
- // pSock was already closed
- return;
-@@ -498,13 +534,13 @@
- }
- else
- {
-- slog(LOG_DEBUG, "Error reading from socket, closing client\n");
-+ xprintf("Error reading from socket, closing client\n");
- // Error reading data....quit.
- cleanup(&tConn);
- return;
- }
- }
-- slog(LOG_DEBUG_VV, "Writing: %d chars to socket\n", tConn.resp.current);
-+ xprintf("Writing: %d chars to socket\n", tConn.resp.current);
- //tConn->resp.data[tConn->resp.current-1] = '\0';
- writeDataToClient(pSock, &(tConn.resp));
- // Finished reading one message...
-@@ -517,9 +553,9 @@
-
- void writeDataToClient(int pSock, struct shairbuffer *pResponse)
- {
-- slog(LOG_DEBUG_VV, "\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data);
-+ xprintf("\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data);
- send(pSock, pResponse->data, pResponse->current,0);
-- slog(LOG_DEBUG_VV, "----Send Response Header----\n");
-+ xprintf("----Send Response Header----\n");
- }
-
- int readDataFromClient(int pSock, struct shairbuffer *pClientBuffer)
-@@ -532,7 +568,7 @@
- while(tRetval > 0 && tEnd < 0)
- {
- // Read from socket until \n\n, \r\n\r\n, or \r\r is found
-- slog(LOG_DEBUG_V, "Waiting To Read...\n");
-+ xprintf("Waiting To Read...\n");
- fflush(stdout);
- tRetval = read(pSock, tReadBuf, MAX_SIZE);
- // if new buffer contains the end of request string, only copy partial buffer?
-@@ -543,40 +579,40 @@
- {
- pClientBuffer->marker = tEnd+1; // Marks start of content
- }
-- slog(SOCKET_LOG_LEVEL, "Found end of http request at: %d\n", tEnd);
-+ xprintf("Found end of http request at: %d\n", tEnd);
- fflush(stdout);
- }
- else
- {
- tEnd = MAX_SIZE;
-- slog(SOCKET_LOG_LEVEL, "Read %d of data so far\n%s\n", tRetval, tReadBuf);
-+ xprintf("Read %d of data so far\n%s\n", tRetval, tReadBuf);
- fflush(stdout);
- }
- if(tRetval > 0)
- {
- // Copy read data into tReceive;
-- slog(SOCKET_LOG_LEVEL, "Read %d data, using %d of it\n", tRetval, tEnd);
-+ xprintf("Read %d data, using %d of it\n", tRetval, tEnd);
- addNToShairBuffer(pClientBuffer, tReadBuf, tRetval);
-- slog(LOG_DEBUG_VV, "Finished copying data\n");
-+ xprintf("Finished copying data\n");
- }
- else
- {
-- slog(LOG_DEBUG, "Error reading data from socket, got: %d bytes", tRetval);
-+ xprintf("Error reading data from socket, got: %d bytes", tRetval);
- return tRetval;
- }
- }
- if(tEnd + 1 != tRetval)
- {
-- slog(SOCKET_LOG_LEVEL, "Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1);
-+ xprintf("Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1);
- }
-- slog(SOCKET_LOG_LEVEL, "Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data);
-+ xprintf("Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data);
- fflush(stdout);
- return 0;
- }
-
- char *getFromBuffer(char *pBufferPtr, const char *pField, int pLenAfterField, int *pReturnSize, char *pDelims)
- {
-- slog(LOG_DEBUG_V, "GettingFromBuffer: %s\n", pField);
-+ xprintf("GettingFromBuffer: %s\n", pField);
- char* tFound = strstr(pBufferPtr, pField);
- int tSize = 0;
- if(tFound != NULL)
-@@ -597,7 +633,7 @@
- }
-
- tSize = (int) (tShortest - tFound);
-- slog(LOG_DEBUG_VV, "Found %.*s length: %d\n", tSize, tFound, tSize);
-+ xprintf("Found %s length: %d\n",tFound, tSize);
- if(pReturnSize != NULL)
- {
- *pReturnSize = tSize;
-@@ -605,7 +641,7 @@
- }
- else
- {
-- slog(LOG_DEBUG_V, "Not Found\n");
-+ xprintf("Not Found\n");
- }
- return tFound;
- }
-@@ -639,10 +675,10 @@
- {
- char tTrim[tFoundSize + 2];
- getTrimmed(tFound, tFoundSize, TRUE, TRUE, tTrim);
-- slog(LOG_DEBUG_VV, "HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize);
-+ xprintf("HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize);
- int tChallengeDecodeSize = 16;
- char *tChallenge = decode_base64((unsigned char *)tTrim, tFoundSize, &tChallengeDecodeSize);
-- slog(LOG_DEBUG_VV, "Challenge Decode size: %d expected 16\n", tChallengeDecodeSize);
-+ xprintf("Challenge Decode size: %d expected 16\n", tChallengeDecodeSize);
-
- int tCurSize = 0;
- unsigned char tChalResp[38];
-@@ -664,7 +700,7 @@
- }
-
- char *tTmp = encode_base64((unsigned char *)tChalResp, tCurSize);
-- slog(LOG_DEBUG_VV, "Full sig: %s\n", tTmp);
-+ xprintf("Full sig: %s\n", tTmp);
- free(tTmp);
-
- // RSA Encrypt
-@@ -709,15 +745,15 @@
- if(tContent != NULL)
- {
- int tContentSize = atoi(tContent);
-- if(pConn->recv.marker == 0 || strlen(pConn->recv.data+pConn->recv.marker) != tContentSize)
-+ if(pConn->recv.marker == 0 || pConn->recv.current-pConn->recv.marker != tContentSize)
- {
- if(isLogEnabledFor(HEADER_LOG_LEVEL))
- {
-- slog(HEADER_LOG_LEVEL, "Content-Length: %s value -> %d\n", tContent, tContentSize);
-+ xprintf("Content-Length: %s value -> %d\n", tContent, tContentSize);
- if(pConn->recv.marker != 0)
- {
-- slog(HEADER_LOG_LEVEL, "ContentPtr has %d, but needs %d\n",
-- strlen(pConn->recv.data+pConn->recv.marker), tContentSize);
-+ xprintf("ContentPtr has %d, but needs %d\n",
-+ (pConn->recv.current-pConn->recv.marker), tContentSize);
- }
- }
- // check if value in tContent > 2nd read from client.
-@@ -726,7 +762,7 @@
- }
- else
- {
-- slog(LOG_DEBUG_VV, "No content, header only\n");
-+ xprintf("No content, header only\n");
- }
-
- // "Creates" a new Response Header for our response message
-@@ -739,7 +775,7 @@
- {
- tLen = 20;
- }
-- slog(LOG_INFO, "********** RECV %.*s **********\n", tLen, pConn->recv.data);
-+ xprintf("********** RECV %.*s **********\n", tLen, pConn->recv.data);
- }
-
- if(pConn->password != NULL)
-@@ -749,7 +785,7 @@
-
- if(buildAppleResponse(pConn, pIpBin, pIpBinLen, pHWID)) // need to free sig
- {
-- slog(LOG_DEBUG_V, "Added AppleResponse to Apple-Challenge request\n");
-+ xprintf("Added AppleResponse to Apple-Challenge request\n");
- }
-
- // Find option, then based on option, do different actions.
-@@ -769,14 +805,14 @@
- int tKeySize = 0;
- char tEncodedAesIV[tSize + 2];
- getTrimmed(tHeaderVal, tSize, TRUE, TRUE, tEncodedAesIV);
-- slog(LOG_DEBUG_VV, "AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV));
-+ xprintf("AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV));
- char *tDecodedIV = decode_base64((unsigned char*) tEncodedAesIV, tSize, &tSize);
-
- // grab the key, copy it out of the receive buffer
- tHeaderVal = getFromContent(tContent, "a=rsaaeskey", &tKeySize);
- char tEncodedAesKey[tKeySize + 2]; // +1 for nl, +1 for \0
- getTrimmed(tHeaderVal, tKeySize, TRUE, TRUE, tEncodedAesKey);
-- slog(LOG_DEBUG_VV, "AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey));
-+ xprintf("AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey));
- // remove base64 coding from key
- char *tDecodedAesKey = decode_base64((unsigned char*) tEncodedAesKey,
- tKeySize, &tKeySize); // Need to free DecodedAesKey
-@@ -785,7 +821,7 @@
- int tFmtpSize = 0;
- char *tFmtp = getFromContent(tContent, "a=fmtp", &tFmtpSize); // Don't need to free
- tFmtp = getTrimmedMalloc(tFmtp, tFmtpSize, TRUE, FALSE); // will need to free
-- slog(LOG_DEBUG_VV, "Format: %s\n", tFmtp);
-+ xprintf("Format: %s\n", tFmtp);
-
- RSA *rsa = loadKey();
- // Decrypt the binary aes key
-@@ -794,11 +830,11 @@
- if(RSA_private_decrypt(tKeySize, (unsigned char *)tDecodedAesKey,
- (unsigned char*) tDecryptedKey, rsa, RSA_PKCS1_OAEP_PADDING) >= 0)
- {
-- slog(LOG_DEBUG, "Decrypted AES key from RSA Successfully\n");
-+ xprintf("Decrypted AES key from RSA Successfully\n");
- }
- else
- {
-- slog(LOG_INFO, "Error Decrypting AES key from RSA\n");
-+ xprintf("Error Decrypting AES key from RSA\n");
- }
- free(tDecodedAesKey);
- RSA_free(rsa);
-@@ -814,13 +850,13 @@
- // struct comms *tComms = pConn->hairtunes;
- // if (! (pipe(tComms->in) == 0 && pipe(tComms->out) == 0))
- // {
--// slog(LOG_INFO, "Error setting up hairtunes communications...some things probably wont work very well.\n");
-+// xprintf("Error setting up hairtunes communications...some things probably wont work very well.\n");
- // }
-
- // Setup fork
- char tPort[8] = "6000"; // get this from dup()'d stdout of child pid
-
-- printf("******** SETUP!!!!!\n");
-+ xprintf("******** SETUP!!!!!\n",NULL);
- #ifndef XBMC
- int tPid = fork();
- if(tPid == 0)
-@@ -836,11 +872,11 @@
- tFound = getFromSetup(pConn->recv.data, "timing_port", &tSize);
- getTrimmed(tFound, tSize, 1, 0, tTPortStr);
-
-- slog(LOG_DEBUG_VV, "converting %s and %s from str->int\n", tCPortStr, tTPortStr);
-+ xprintf("converting %s and %s from str->int\n", tCPortStr, tTPortStr);
- int tControlport = atoi(tCPortStr);
- int tTimingport = atoi(tTPortStr);
-
-- slog(LOG_DEBUG_V, "Got %d for CPort and %d for TPort\n", tControlport, tTimingport);
-+ xprintf("Got %d for CPort and %d for TPort\n", tControlport, tTimingport);
- char *tRtp = NULL;
- char *tPipe = NULL;
- char *tAoDriver = NULL;
-@@ -875,7 +911,7 @@
- tDataport, tRtp, tPipe, tAoDriver, tAoDeviceName, tAoDeviceId);
- #ifndef XBMC
- // Quit when finished.
-- slog(LOG_DEBUG, "Returned from hairtunes init....returning -1, should close out this whole side of the fork\n");
-+ xprintf("Returned from hairtunes init....returning -1, should close out this whole side of the fork\n");
- return -1;
- }
- else if(tPid >0)
-@@ -888,7 +924,7 @@
- int tRead = read(tComms->out[0], tFromHairtunes, 80);
- if(tRead <= 0)
- {
-- slog(LOG_INFO, "Error reading port from hairtunes function, assuming default port: %d\n", tPort);
-+ xprintf("Error reading port from hairtunes function, assuming default port: %d\n", tPort);
- }
- else
- {
-@@ -900,7 +936,7 @@
- }
- else
- {
-- slog(LOG_INFO, "Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes);
-+ xprintf("Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes);
- }
- }
-
-@@ -921,7 +957,7 @@
- }
- else
- {
-- slog(LOG_INFO, "Error forking process....dere' be errors round here.\n");
-+ xprintf("Error forking process....dere' be errors round here.\n");
- return -1;
- }
- #endif
-@@ -933,7 +969,7 @@
- propogateCSeq(pConn);
- #ifndef XBMC
- close(pConn->hairtunes->in[1]);
-- slog(LOG_DEBUG, "Tearing down connection, closing pipes\n");
-+ xprintf("Tearing down connection, closing pipes\n");
- #else
- hairtunes_cleanup();
- #endif
-@@ -954,21 +990,73 @@
- {
- propogateCSeq(pConn);
- int tSize = 0;
-+ char *buffer = NULL;
-+ char *contentType = getFromHeader(pConn->recv.data, "Content-Type", &tSize);
-+ char *tContent = getFromHeader(pConn->recv.data, "Content-Length", NULL);
-+ int iContentSize = 0;
-+ int isJpg = 0;
-+
-+ if(tContent != NULL)
-+ {
-+ iContentSize = atoi(tContent);
-+ }
-+
-+ if( tSize > 1 &&
-+ (strncmp(contentType, "application/x-dmap-tagged", tSize) == 0) ||
-+ (strncmp(contentType, "image/jpeg", tSize) == 0) )
-+ {
-+ if( (pConn->recv.current - pConn->recv.marker) == iContentSize && pConn->recv.marker != 0)
-+ {
-+ if(strncmp(contentType, "image/jpeg", tSize) == 0)
-+ {
-+ isJpg = 1;
-+ }
-+ buffer = (char *)malloc(iContentSize * sizeof(char));
-+ memcpy(buffer, pConn->recv.data + pConn->recv.marker, iContentSize);
-+ }
-+ else
-+ {
-+ iContentSize = 0;
-+ }
-+ }
-+ else
-+ {
-+ iContentSize = 0;
-+ }
- char *tVol = getFromHeader(pConn->recv.data, "volume", &tSize);
-- slog(LOG_DEBUG_VV, "About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
-+ if( tVol)
-+ {
-+ xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
-+ }
- // TBD VOLUME
- #ifndef XBMC
- write(pConn->hairtunes->in[1], "vol: ", 5);
- write(pConn->hairtunes->in[1], tVol, tSize);
- write(pConn->hairtunes->in[1], "\n", 1);
- #else
-- hairtunes_setvolume(atof(tVol));
-+ if(tVol)
-+ {
-+ hairtunes_setvolume(atof(tVol));
-+ }
-+
-+ if(iContentSize)
-+ {
-+ if(isJpg)
-+ {
-+ hairtunes_set_metadata_coverart(buffer, iContentSize);
-+ }
-+ else
-+ {
-+ hairtunes_set_metadata(buffer, iContentSize);
-+ }
-+ free(buffer);
-+ }
- #endif
-- slog(LOG_DEBUG_VV, "Finished writing data write data to hairtunes\n");
-+ xprintf("Finished writing data write data to hairtunes\n");
- }
- else
- {
-- slog(LOG_DEBUG, "\n\nUn-Handled recv: %s\n", pConn->recv.data);
-+ xprintf("\n\nUn-Handled recv: %s\n", pConn->recv.data);
- propogateCSeq(pConn);
- }
- addToShairBuffer(&(pConn->resp), "\r\n");
-@@ -1047,7 +1135,7 @@
- char tName[100 + HWID_SIZE + 3];
- if(strlen(pServerName) > tMaxServerName)
- {
-- slog(LOG_INFO,"Hey dog, we see you like long server names, "
-+ xprintf("Hey dog, we see you like long server names, "
- "so we put a strncat in our command so we don't buffer overflow, while you listen to your flow.\n"
- "We just used the first %d characters. Pick something shorter if you want\n", tMaxServerName);
- }
-@@ -1058,7 +1146,7 @@
- strcat(tName, pHWStr);
- strcat(tName, "@");
- strncat(tName, pServerName, tMaxServerName);
-- slog(AVAHI_LOG_LEVEL, "Avahi/DNS-SD Name: %s\n", tName);
-+ xprintf("Avahi/DNS-SD Name: %s\n", tName);
-
- execlp("avahi-publish-service", "avahi-publish-service", tName,
- "_raop._tcp", tPort, "tp=UDP","sm=false","sv=false","ek=1","et=0,1",
-@@ -1070,12 +1158,12 @@
- perror("error");
- }
-
-- slog(LOG_INFO, "Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n");
-- exit(1);
-+ xprintf("Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n");
-+ //exit(1);
- }
- else
- {
-- slog(LOG_DEBUG_VV, "Avahi/DNS-SD started on PID: %d\n", tPid);
-+ xprintf("Avahi/DNS-SD started on PID: %d\n", tPid);
- }
- return tPid;
- }
-@@ -1083,7 +1171,7 @@
-
- void printBufferInfo(struct shairbuffer *pBuf, int pLevel)
- {
-- slog(pLevel, "Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char));
-+ xprintf("Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char));
- }
-
- int getAvailChars(struct shairbuffer *pBuf)
-@@ -1164,7 +1252,8 @@
- {
- va_list argp;
- va_start(argp, pFormat);
-- vprintf(pFormat, argp);
-+ xprintf(pFormat, argp);
-+ //vprintf(pFormat, argp);
- va_end(argp);
- }
- //#endif
-@@ -1218,9 +1307,9 @@
- {
- if(pBuf->data != NULL)
- {
-- slog(LOG_DEBUG_VV, "Hrm, buffer wasn't cleaned up....trying to free\n");
-+ xprintf("Hrm, buffer wasn't cleaned up....trying to free\n");
- free(pBuf->data);
-- slog(LOG_DEBUG_VV, "Free didn't seem to seg fault....huzzah\n");
-+ xprintf("Free didn't seem to seg fault....huzzah\n");
- }
- pBuf->current = 0;
- pBuf->marker = 0;
-@@ -1278,6 +1367,6 @@
- BIO *tBio = BIO_new_mem_buf(AIRPORT_PRIVATE_KEY, -1);
- RSA *rsa = PEM_read_bio_RSAPrivateKey(tBio, NULL, NULL, NULL); //NULL, NULL, NULL);
- BIO_free(tBio);
-- slog(RSA_LOG_LEVEL, "RSA Key: %d\n", RSA_check_key(rsa));
-+ xprintf("RSA Key: %d\n", RSA_check_key(rsa));
- return rsa;
- }
diff --git a/audio/libshairport/files/patch-src-shairport.h b/audio/libshairport/files/patch-src-shairport.h
deleted file mode 100644
index 33337cee6792..000000000000
--- a/audio/libshairport/files/patch-src-shairport.h
+++ /dev/null
@@ -1,51 +0,0 @@
---- src/shairport.h.orig 2011-08-21 01:58:11.000000000 +0200
-+++ src/shairport.h 2012-10-09 12:09:33.000000000 +0200
-@@ -11,14 +11,22 @@
- #include <regex.h>
- #include <sys/types.h>
- #include <regex.h>
-+#include "ao.h"
-
-
- #define HWID_SIZE 6
- #define SHAIRPORT_LOG 1
--#define LOG_INFO 1
--#define LOG_DEBUG 5
--#define LOG_DEBUG_V 6
--#define LOG_DEBUG_VV 7
-+
-+#ifndef LOG_INFO
-+#define LOG_INFO 5
-+#endif
-+
-+#ifndef LOG_DEBUG
-+#define LOG_DEBUG 6
-+#endif
-+
-+#define LOG_DEBUG_V 7
-+#define LOG_DEBUG_VV 8
-
- struct shairbuffer
- {
-@@ -58,13 +66,21 @@
- {
- #endif /* __cplusplus */
-
-+struct printfPtr
-+{
-+ int (*extprintf)(const char* msg, size_t msgSize);
-+};
-+
- int shairport_main(int argc, char **argv);
- void shairport_exit(void);
- int shairport_loop(void);
- int shairport_is_running(void);
-+void shairport_set_ao(struct AudioOutput *ao);
-+void shairport_set_printf(struct printfPtr *funcPtr);
-
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
-
- #endif
-+
diff --git a/audio/libshairport/files/patch-src-socketlib.c b/audio/libshairport/files/patch-src-socketlib.c
deleted file mode 100644
index c2b3e6c14b81..000000000000
--- a/audio/libshairport/files/patch-src-socketlib.c
+++ /dev/null
@@ -1,58 +0,0 @@
---- src/socketlib.c.orig 2011-09-23 22:00:48.000000000 +0200
-+++ src/socketlib.c 2012-10-09 12:09:33.000000000 +0200
-@@ -48,7 +48,7 @@
- if((tSock==-1) && (pAddrInfo->ai_family == AF_INET6) && (errno == EAFNOSUPPORT))
- {
- //Fallback to ipv4
-- perror("Failed to create ipv6 socket. Trying ipv4");
-+ xprintf("Failed to create ipv6 socket. Trying ipv4");
- pAddrInfo->ai_family = AF_INET;
- tSock = socket(pAddrInfo->ai_family, pAddrInfo->ai_socktype, 0);
- }
-@@ -82,7 +82,7 @@
- delay(RETRY_DELAY, &tRes);
- }
- }
-- printf("%d Retry attempts exceeded\n", RETRY_COUNT);
-+ xprintf("%d Retry attempts exceeded\n", RETRY_COUNT);
- return ERROR;
- }
-
-@@ -102,7 +102,7 @@
- tError = getaddrinfo(pHostname, pService, &hints, pAddrInfo);
- if(tError != 0)
- {
-- printf("Error getting address info\n");
-+ xprintf("Error getting address info\n");
- }
- return tError;
- }
-@@ -158,8 +158,8 @@
- sprintf(tService, "%d", pPort); // copies port to string
- int tFamily = AF_INET;
- #ifdef AF_INET6
-- //printf("Listening on IPv6 Socket\n");
-- //tFamily = AF_INET6;
-+ xprintf("Listening on IPv6 Socket\n");
-+ tFamily = AF_INET6;
- #else
- //printf("Listening on IPv4 Socket");
- #endif
-@@ -200,7 +200,7 @@
- else
- {
- // Invalid encoded data, no other cases are possible.
-- printf("Unrecoverable error....base64 values are incorrectly encoded\n");
-+ xprintf("Unrecoverable error....base64 values are incorrectly encoded\n");
- return pSize;
- }
- }
-@@ -226,7 +226,7 @@
- memset(input, 0, length);
- memcpy(input, pInput, pLength);
- memset(input+pLength, '=', length-pLength);
-- printf("Fixed value: [%.*s]\n", length, input);
-+ xprintf("Fixed value: [%.*s]\n", length, input);
- }
- char *buffer = (char *)malloc(length);
- memset(buffer, 0, length);
diff --git a/audio/libshairport/files/patch-src_Makefile.am b/audio/libshairport/files/patch-src_Makefile.am
new file mode 100644
index 000000000000..2273cf45b9ce
--- /dev/null
+++ b/audio/libshairport/files/patch-src_Makefile.am
@@ -0,0 +1,12 @@
+--- src/Makefile.am.orig 2011-09-23 21:14:39 UTC
++++ src/Makefile.am
+@@ -1,7 +1,7 @@
+ lib_LTLIBRARIES=libshairport.la
+
+-library_includedir=$(includedir)
+-library_include_HEADERS = shairport.h
++library_includedir=$(includedir)/shairport
++library_include_HEADERS = shairport.h ao.h socketlib.h
+
+ libshairport_la_SOURCES=shairport.c hairtunes.c socketlib.c alac.c
+ libshairport_la_LDFLAGS=-dynamiclib
diff --git a/audio/libshairport/files/patch-src_alac.c b/audio/libshairport/files/patch-src_alac.c
new file mode 100644
index 000000000000..477b6f2f3a3b
--- /dev/null
+++ b/audio/libshairport/files/patch-src_alac.c
@@ -0,0 +1,47 @@
+--- src/alac.c.orig 2011-08-20 22:06:21 UTC
++++ src/alac.c
+@@ -804,7 +804,7 @@ void decode_frame(alac_file *alac,
+ }
+ else
+ {
+- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type);
++ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type);
+ /* i think the only other prediction type (or perhaps this is just a
+ * boolean?) runs adaptive fir twice.. like:
+ * predictor_decompress_fir_adapt(predictor_error, tempout, ...)
+@@ -885,7 +885,7 @@ void decode_frame(alac_file *alac,
+ }
+ case 20:
+ case 32:
+- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
++ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
+ break;
+ default:
+ break;
+@@ -1004,7 +1004,7 @@ void decode_frame(alac_file *alac,
+ }
+ else
+ { /* see mono case */
+- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_a);
++ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_a);
+ }
+
+ /* channel 2 */
+@@ -1029,7 +1029,7 @@ void decode_frame(alac_file *alac,
+ }
+ else
+ {
+- fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_b);
++ xprintf("FIXME: unhandled predicition type: %i\n", prediction_type_b);
+ }
+ }
+ else
+@@ -1106,7 +1106,7 @@ void decode_frame(alac_file *alac,
+ }
+ case 20:
+ case 32:
+- fprintf(stderr, "FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
++ xprintf("FIXME: unimplemented sample size %i\n", alac->setinfo_sample_size);
+ break;
+ default:
+ break;
diff --git a/audio/libshairport/files/patch-src_ao.h b/audio/libshairport/files/patch-src_ao.h
new file mode 100644
index 000000000000..fdb8a165dafd
--- /dev/null
+++ b/audio/libshairport/files/patch-src_ao.h
@@ -0,0 +1,161 @@
+--- src/ao.h.orig 2016-07-26 15:10:45 UTC
++++ src/ao.h
+@@ -0,0 +1,158 @@
++/*
++ *
++ * ao.h
++ *
++ * Original Copyright (C) Aaron Holtzman - May 1999
++ * Modifications Copyright (C) Stan Seibert - July 2000, July 2001
++ * More Modifications Copyright (C) Jack Moffitt - October 2000
++ *
++ * This file is part of libao, a cross-platform audio outputlibrary. See
++ * README for a history of this source code.
++ *
++ * libao is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * libao is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with GNU Make; see the file COPYING. If not, write to
++ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++#ifndef __AO_H__
++#define __AO_H__
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif /* __cplusplus */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <stdint.h>
++#include <errno.h>
++
++/* --- Constants ---*/
++
++#define AO_TYPE_LIVE 1
++#define AO_TYPE_FILE 2
++
++
++#define AO_ENODRIVER 1
++#define AO_ENOTFILE 2
++#define AO_ENOTLIVE 3
++#define AO_EBADOPTION 4
++#define AO_EOPENDEVICE 5
++#define AO_EOPENFILE 6
++#define AO_EFILEEXISTS 7
++#define AO_EBADFORMAT 8
++
++#define AO_EFAIL 100
++
++
++#define AO_FMT_LITTLE 1
++#define AO_FMT_BIG 2
++#define AO_FMT_NATIVE 4
++
++/* --- Structures --- */
++
++typedef struct ao_info {
++ int type; /* live output or file output? */
++ char *name; /* full name of driver */
++ char *short_name; /* short name of driver */
++ char *author; /* driver author */
++ char *comment; /* driver comment */
++ int preferred_byte_format;
++ int priority;
++ char **options;
++ int option_count;
++} ao_info;
++
++typedef struct ao_functions ao_functions;
++typedef struct ao_device ao_device;
++
++typedef struct ao_sample_format {
++ int bits; /* bits per sample */
++ int rate; /* samples per second (in a single channel) */
++ int channels; /* number of audio channels */
++ int byte_format; /* Byte ordering in sample, see constants below */
++ char *matrix; /* input channel location/ordering */
++} ao_sample_format;
++
++typedef struct ao_option {
++ char *key;
++ char *value;
++ struct ao_option *next;
++} ao_option;
++
++#if defined(AO_BUILDING_LIBAO)
++#include "ao_private.h"
++#endif
++
++/* --- Functions --- */
++
++/* library setup/teardown */
++void ao_initialize(void);
++void ao_shutdown(void);
++
++/* device setup/playback/teardown */
++int ao_append_global_option(const char *key,
++ const char *value);
++int ao_append_option(ao_option **options,
++ const char *key,
++ const char *value);
++void ao_free_options(ao_option *options);
++
++char* ao_get_option(ao_option *options, const char* key);
++
++ao_device* ao_open_live(int driver_id,
++ ao_sample_format *format,
++ ao_option *option);
++ao_device* ao_open_file(int driver_id,
++ const char *filename,
++ int overwrite,
++ ao_sample_format *format,
++ ao_option *option);
++
++int ao_play(ao_device *device,
++ char *output_samples,
++ uint32_t num_bytes);
++int ao_close(ao_device *device);
++
++/* driver information */
++int ao_driver_id(const char *short_name);
++int ao_default_driver_id(void);
++ao_info *ao_driver_info(int driver_id);
++ao_info **ao_driver_info_list(int *driver_count);
++char *ao_file_extension(int driver_id);
++
++/* miscellaneous */
++int ao_is_big_endian(void);
++
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++#endif /* __AO_H__ */
++
++extern struct AudioOutput g_ao;
++struct AudioOutput
++ {
++ void (*ao_initialize)(void);
++ int (*ao_play)(ao_device *, char *, uint32_t);
++ int (*ao_default_driver_id)(void);
++ ao_device* (*ao_open_live)( int, ao_sample_format *, ao_option *);
++ int (*ao_close)(ao_device *);
++ /* -- Device Setup/Playback/Teardown -- */
++ int (*ao_append_option)(ao_option **, const char *, const char *);
++ void (*ao_free_options)(ao_option *);
++ char* (*ao_get_option)(ao_option *, const char* );
++ void (*ao_set_metadata)(const char *buffer, unsigned int size);
++ void (*ao_set_metadata_coverart)(const char *buffer, unsigned int size);
++ };
diff --git a/audio/libshairport/files/patch-src_hairtunes.c b/audio/libshairport/files/patch-src_hairtunes.c
new file mode 100644
index 000000000000..c79446151e87
--- /dev/null
+++ b/audio/libshairport/files/patch-src_hairtunes.c
@@ -0,0 +1,233 @@
+--- src/hairtunes.c.orig 2011-09-23 19:55:48 UTC
++++ src/hairtunes.c
+@@ -25,7 +25,7 @@
+ */
+
+ #define XBMC
+-//#defined HAS_AO
++#define HAS_AO
+
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -45,7 +45,7 @@
+ #include <sys/signal.h>
+ #include <fcntl.h>
+ #ifdef HAS_AO
+-#include <ao/ao.h>
++#include "ao.h"
+ #endif
+
+ #ifdef FANCY_RESAMPLING
+@@ -89,7 +89,6 @@ int pipe_handle = -1;
+ // maximal resampling shift - conservative
+ #define OUTFRAME_BYTES (4*(frame_size+3))
+
+-
+ alac_file *decoder_info;
+
+ #ifdef FANCY_RESAMPLING
+@@ -122,8 +121,8 @@ pthread_mutex_t ab_mutex;
+ pthread_cond_t ab_buffer_ready;
+
+ static void die(char *why) {
+- fprintf(stderr, "FATAL: %s\n", why);
+- exit(1);
++ xprintf("FATAL: %s\n", why);
++ //exit(1);
+ }
+
+ static int hex2bin(unsigned char *buf, char *hex) {
+@@ -246,13 +245,13 @@ int hairtunes_init(char *pAeskey, char *
+ continue;
+ }
+ if (!strcmp(line, "exit\n")) {
+- exit(0);
++ ;//exit(0);
+ }
+ if (!strcmp(line, "flush\n")) {
+ hairtunes_flush();
+ }
+ }
+- fprintf(stderr, "bye!\n");
++ xprintf("bye!\n");
+ fflush(stderr);
+ #endif
+
+@@ -263,18 +262,28 @@ void hairtunes_setvolume(float f)
+ {
+ assert(f<=0);
+ if (debug)
+- fprintf(stderr, "VOL: %lf\n", f);
++ xprintf("VOL: %lf\n", f);
+ volume = pow(10.0,0.05*f);
+ fix_volume = 65536.0 * volume;
+ }
+
++void hairtunes_set_metadata(const char *buffer, unsigned int size)
++{
++ g_ao.ao_set_metadata(buffer, size);
++}
++
++void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size)
++{
++ g_ao.ao_set_metadata_coverart(buffer, size);
++}
++
+ void hairtunes_flush(void)
+ {
+ pthread_mutex_lock(&ab_mutex);
+ ab_resync();
+ pthread_mutex_unlock(&ab_mutex);
+ if (debug)
+- fprintf(stderr, "FLUSH\n");
++ xprintf("FLUSH\n");
+ }
+
+ #ifdef HAIRTUNES_STANDALONE
+@@ -424,7 +433,7 @@ static void buffer_put_packet(seq_t seqn
+ } else if (seq_order(ab_read, seqno)) { // late but not yet played
+ abuf = audio_buffer + BUFIDX(seqno);
+ } else { // too late.
+- fprintf(stderr, "\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write);
++ xprintf("\nlate packet %04X (%04X:%04X)\n", seqno, ab_read, ab_write);
+ }
+ buf_fill = ab_write - ab_read;
+ pthread_mutex_unlock(&ab_mutex);
+@@ -521,7 +530,7 @@ static void rtp_request_resend(seq_t fir
+ if (seq_order(last, first))
+ return;
+
+- fprintf(stderr, "requesting resend on %d packets (port %d)\n", last-first+1, controlport);
++ xprintf("requesting resend on %d packets (port %d)\n", last-first+1, controlport);
+
+ char req[8]; // *not* a standard RTCP NACK
+ req[0] = 0x80;
+@@ -605,8 +614,8 @@ static int init_rtp(void) {
+ port += 3;
+ }
+
+- printf("port: %d\n", port); // let our handler know where we end up listening
+- printf("cport: %d\n", port+1);
++ xprintf("port: %d\n", port); // let our handler know where we end up listening
++ xprintf("cport: %d\n", port+1);
+
+ rtp_sockets[0] = sock;
+ rtp_sockets[1] = csock;
+@@ -709,7 +718,7 @@ void bf_est_update(short fill) {
+ bf_est_drift = biquad_filt(&bf_drift_lpf, CONTROL_B*(bf_est_err*CONTROL_A + err_deriv) + bf_est_drift);
+
+ if (debug)
+- fprintf(stderr, "bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err);
++ xprintf("bf %d err %f drift %f desiring %f ed %f estd %f\r", fill, bf_est_err, bf_est_drift, desired_fill, err_deriv, err_deriv + CONTROL_A*bf_est_err);
+ bf_playback_rate = 1.0 + CONTROL_A*bf_est_err + bf_est_drift;
+
+ bf_last_err = bf_est_err;
+@@ -725,7 +734,7 @@ short *buffer_get_frame(void) {
+ buf_fill = ab_write - ab_read;
+ if (buf_fill < 1 || !ab_synced || ab_buffering) { // init or underrun. stop and wait
+ if (ab_synced)
+- fprintf(stderr, "\nunderrun\n");
++ xprintf("\nunderrun\n");
+
+ ab_buffering = 1;
+ pthread_cond_wait(&ab_buffer_ready, &ab_mutex);
+@@ -737,7 +746,7 @@ short *buffer_get_frame(void) {
+ return 0;
+ }
+ if (buf_fill >= BUFFER_FRAMES) { // overrunning! uh-oh. restart at a sane distance
+- fprintf(stderr, "\noverrun.\n");
++ xprintf("\noverrun.\n");
+ ab_read = ab_write - START_FILL;
+ }
+ read = ab_read;
+@@ -749,7 +758,7 @@ short *buffer_get_frame(void) {
+
+ volatile abuf_t *curframe = audio_buffer + BUFIDX(read);
+ if (!curframe->ready) {
+- fprintf(stderr, "\nmissing frame.\n");
++ xprintf("\nmissing frame.\n");
+ memset(curframe->data, 0, FRAME_BYTES);
+ }
+ curframe->ready = 0;
+@@ -776,13 +785,13 @@ int stuff_buffer(double playback_rate, s
+ if (stuff) {
+ if (stuff==1) {
+ if (debug)
+- fprintf(stderr, "+++++++++\n");
++ xprintf("+++++++++\n");
+ // interpolate one sample
+ *outptr++ = dithered_vol(((long)inptr[-2] + (long)inptr[0]) >> 1);
+ *outptr++ = dithered_vol(((long)inptr[-1] + (long)inptr[1]) >> 1);
+ } else if (stuff==-1) {
+ if (debug)
+- fprintf(stderr, "---------\n");
++ xprintf("---------\n");
+ inptr++;
+ inptr++;
+ }
+@@ -849,6 +858,11 @@ void *audio_thread_func(void *arg) {
+ inbuf = buffer_get_frame();
+ } while (!inbuf && audio_running);
+
++ if(!audio_running)
++ {
++ return 0; //don't access inbuf if audio stopped
++ }
++
+ #ifdef FANCY_RESAMPLING
+ if (fancy_resampling) {
+ int i;
+@@ -881,7 +895,7 @@ void *audio_thread_func(void *arg) {
+ }
+ #ifdef HAS_AO
+ } else {
+- ao_play(dev, (char *)outbuf, play_samples*4);
++ g_ao.ao_play(dev, (char *)outbuf, play_samples*4);
+ #endif
+ }
+ }
+@@ -906,7 +920,7 @@ void init_pipe(char* pipe) {
+ ao_device *dev;
+
+ void* init_ao() {
+- ao_initialize();
++ g_ao.ao_initialize();
+
+ int driver;
+ #ifndef XBMC
+@@ -921,7 +935,7 @@ void* init_ao() {
+ #endif
+ {
+ // otherwise choose the default
+- driver = ao_default_driver_id();
++ driver = g_ao.ao_default_driver_id();
+ }
+
+ ao_sample_format fmt;
+@@ -944,9 +958,9 @@ void* init_ao() {
+ }
+ #endif
+
+- ao_append_option(&ao_opts, "name", "Streaming...");
++ g_ao.ao_append_option(&ao_opts, "name", "Streaming...");
+
+- dev = ao_open_live(driver, &fmt, ao_opts);
++ dev = g_ao.ao_open_live(driver, &fmt, ao_opts);
+ if (dev == NULL) {
+ die("Could not open ao device");
+ }
+@@ -985,12 +999,13 @@ void clean_output(void)
+ audio_running = 0;
+ pthread_join(audio_thread, NULL);
+ #ifdef HAS_AO
+- ao_close(dev);
++ g_ao.ao_close(dev);
+ #endif
+ }
+
+ void hairtunes_cleanup(void)
+ {
++ pthread_cond_signal(&ab_buffer_ready);
+ clean_output();
+ clean_rtp();
+ clean_buffer();
diff --git a/audio/libshairport/files/patch-src_hairtunes.h b/audio/libshairport/files/patch-src_hairtunes.h
new file mode 100644
index 000000000000..13ccb776b5aa
--- /dev/null
+++ b/audio/libshairport/files/patch-src_hairtunes.h
@@ -0,0 +1,11 @@
+--- src/hairtunes.h.orig 2011-08-20 22:06:21 UTC
++++ src/hairtunes.h
+@@ -4,6 +4,8 @@
+ int hairtunes_init(char *pAeskey, char *pAesiv, char *pFmtpstr, int pCtrlPort, int pTimingPort,
+ int pDataPort, char *pRtpHost, char*pPipeName, char *pLibaoDriver, char *pLibaoDeviceName, char *pLibaoDeviceId);
+ void hairtunes_setvolume(float vol);
++void hairtunes_set_metadata(const char *buffer, unsigned int size);
++void hairtunes_set_metadata_coverart(const char *buffer, unsigned int size);
+ void hairtunes_flush(void);
+ void hairtunes_cleanup(void);
+
diff --git a/audio/libshairport/files/patch-src_shairport.c b/audio/libshairport/files/patch-src_shairport.c
new file mode 100644
index 000000000000..b26546624481
--- /dev/null
+++ b/audio/libshairport/files/patch-src_shairport.c
@@ -0,0 +1,691 @@
+--- src/shairport.c.orig 2011-08-20 23:57:56 UTC
++++ src/shairport.c
+@@ -31,6 +31,27 @@
+ #include "shairport.h"
+ #include "hairtunes.h"
+
++static struct printfPtr g_printf={NULL};
++
++int xprintf(const char *format, ...)
++{
++ char dbg[2048];
++ va_list args;
++ va_start(args, format);
++ vsnprintf(dbg, sizeof(dbg), format, args);
++ va_end(args);
++ if(g_printf.extprintf)
++ {
++ g_printf.extprintf(dbg, sizeof(dbg));
++ }
++ else
++ {
++ printf(dbg);
++ }
++
++ return 1;
++}
++
+ #ifndef TRUE
+ #define TRUE (-1)
+ #endif
+@@ -92,13 +113,26 @@ static struct addrinfo *tAddrInfo;
+ static char tPassword[56] = "";
+ static char tHWID[HWID_SIZE] = {0,51,52,53,54,55};
+
++#ifdef XBMC
++struct AudioOutput g_ao;
++void shairport_set_ao(struct AudioOutput *ao)
++{
++ g_ao=*ao;
++}
++
++void shairport_set_printf(struct printfPtr *funcPtr)
++{
++ g_printf = *funcPtr;
++}
++#endif
++
+ #ifndef XBMC
+ int main(int argc, char **argv)
+ #else
+ int shairport_main(int argc, char **argv)
+ #endif
+ {
+- printf("initializing shairport\n");
++ xprintf("initializing shairport\n",NULL);
+ char tHWID_Hex[HWID_SIZE * 2 + 1];
+ char tKnownHwid[32];
+
+@@ -177,22 +211,22 @@ int shairport_main(int argc, char **argv
+ }
+ else if(!strcmp(arg, "-h") || !strcmp(arg, "--help"))
+ {
+- slog(LOG_INFO, "ShairPort version 0.05 C port - Airport Express emulator\n");
+- slog(LOG_INFO, "Usage:\nshairport [OPTION...]\n\nOptions:\n");
+- slog(LOG_INFO, " -a, --apname=AirPort Sets Airport name\n");
+- slog(LOG_INFO, " -p, --password=secret Sets Password (not working)\n");
+- slog(LOG_INFO, " -o, --server_port=5000 Sets Port for Avahi/dns-sd\n");
+- slog(LOG_INFO, " -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n");
+- slog(LOG_INFO, " -d Daemon mode\n");
+- slog(LOG_INFO, " -q, --quiet Supresses all output.\n");
+- slog(LOG_INFO, " -v,-v2,-v3,-vv Various debugging levels\n");
+- slog(LOG_INFO, "\n");
++ xprintf("ShairPort version 0.05 C port - Airport Express emulator\n");
++ xprintf("Usage:\nshairport [OPTION...]\n\nOptions:\n");
++ xprintf(" -a, --apname=AirPort Sets Airport name\n");
++ xprintf(" -p, --password=secret Sets Password (not working)\n");
++ xprintf(" -o, --server_port=5000 Sets Port for Avahi/dns-sd\n");
++ xprintf(" -b, --buffer=282 Sets Number of frames to buffer before beginning playback\n");
++ xprintf(" -d Daemon mode\n");
++ xprintf(" -q, --quiet Supresses all output.\n");
++ xprintf(" -v,-v2,-v3,-vv Various debugging levels\n");
++ xprintf("\n");
+ return 0;
+ }
+ }
+
+ if ( buffer_start_fill < 30 || buffer_start_fill > BUFFER_FRAMES ) {
+- fprintf(stderr, "buffer value must be > 30 and < %d\n", BUFFER_FRAMES);
++ xprintf("buffer value must be > 30 and < %d\n", BUFFER_FRAMES);
+ return(0);
+ }
+
+@@ -201,11 +235,11 @@ int shairport_main(int argc, char **argv
+ int tPid = fork();
+ if(tPid < 0)
+ {
+- exit(1); // Error on fork
++ //exit(1); // Error on fork
+ }
+ else if(tPid > 0)
+ {
+- exit(0);
++ //exit(0);
+ }
+ else
+ {
+@@ -246,10 +280,10 @@ int shairport_main(int argc, char **argv
+ sscanf(tHWID_Hex, "%02X%02X%02X%02X%02X%02X", &tHWID[0], &tHWID[1], &tHWID[2], &tHWID[3], &tHWID[4], &tHWID[5]);
+ }
+
+- slog(LOG_INFO, "LogLevel: %d\n", kCurrentLogLevel);
+- slog(LOG_INFO, "AirName: %s\n", tServerName);
+- slog(LOG_INFO, "HWID: %.*s\n", HWID_SIZE, tHWID+1);
+- slog(LOG_INFO, "HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex);
++ xprintf("LogLevel: %d\n", kCurrentLogLevel);
++ xprintf("AirName: %s\n", tServerName);
++ xprintf("HWID: %.*s\n", HWID_SIZE, tHWID+1);
++ xprintf("HWID_Hex(%d): %s\n", strlen(tHWID_Hex), tHWID_Hex);
+
+ if(tSimLevel >= 1)
+ {
+@@ -263,12 +297,12 @@ int shairport_main(int argc, char **argv
+ #ifndef XBMC
+ startAvahi(tHWID_Hex, tServerName, tPort);
+ #endif
+- slog(LOG_DEBUG_V, "Starting connection server: specified server port: %d\n", tPort);
++ xprintf("Starting connection server: specified server port: %d\n", tPort);
+ tServerSock = setupListenServer(&tAddrInfo, tPort);
+ if(tServerSock < 0)
+ {
+ freeaddrinfo(tAddrInfo);
+- slog(LOG_INFO, "Error setting up server socket on port %d, try specifying a different port\n", tPort);
++ xprintf("Error setting up server socket on port %d, try specifying a different port\n", tPort);
+ return 0;
+ }
+
+@@ -295,7 +329,7 @@ int shairport_loop(void)
+
+ int readsock;
+
+- slog(LOG_DEBUG_V, "Waiting for clients to connect\n");
++ xprintf("Waiting for clients to connect\n");
+
+ while(m_running)
+ {
+@@ -327,7 +361,7 @@ int shairport_loop(void)
+ {
+ freeaddrinfo(tAddrInfo);
+ tAddrInfo = NULL;
+- slog(LOG_DEBUG, "...Accepted Client Connection..\n");
++ xprintf("...Accepted Client Connection..\n");
+ close(tServerSock);
+ handleClient(tClientSock, tPassword, tHWID);
+ //close(tClientSock);
+@@ -335,11 +369,11 @@ int shairport_loop(void)
+ }
+ else
+ {
+- slog(LOG_DEBUG_VV, "Child now busy handling new client\n");
++ xprintf("Child now busy handling new client\n");
+ close(tClientSock);
+ }
+ #else
+- slog(LOG_DEBUG, "...Accepted Client Connection..\n");
++ xprintf("...Accepted Client Connection..\n");
+ handleClient(tClientSock, tPassword, tHWID);
+ #endif
+ }
+@@ -349,7 +383,7 @@ int shairport_loop(void)
+ }
+ }
+
+- slog(LOG_DEBUG_VV, "Finished\n");
++ xprintf("Finished\n");
+ if(tAddrInfo != NULL)
+ {
+ freeaddrinfo(tAddrInfo);
+@@ -360,6 +394,7 @@ int shairport_loop(void)
+ void shairport_exit(void)
+ {
+ m_running = 0;
++ close(tServerSock);
+ }
+
+ int shairport_is_running(void)
+@@ -407,7 +442,7 @@ int findEnd(char *tReadBuf)
+
+ void handleClient(int pSock, char *pPassword, char *pHWADDR)
+ {
+- slog(LOG_DEBUG_VV, "In Handle Client\n");
++ xprintf("In Handle Client\n");
+ fflush(stdout);
+
+ socklen_t len;
+@@ -426,7 +461,7 @@ void handleClient(int pSock, char *pPass
+
+ // deal with both IPv4 and IPv6:
+ if (addr.ss_family == AF_INET) {
+- slog(LOG_DEBUG_V, "Constructing ipv4 address\n");
++ xprintf("Constructing ipv4 address\n");
+ struct sockaddr_in *s = (struct sockaddr_in *)&addr;
+ port = ntohs(s->sin_port);
+ inet_ntop(AF_INET, &s->sin_addr, ipstr, sizeof ipstr);
+@@ -446,20 +481,20 @@ void handleClient(int pSock, char *pPass
+ if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\x00\x00\xff\xff", 12) == 0)
+ {
+ // its ipv4...
+- slog(LOG_DEBUG_V, "Constructing ipv4 from ipv6 address\n");
++ xprintf("Constructing ipv4 from ipv6 address\n");
+ memcpy(ipbin, &addr.bin[12], 4);
+ ipbinlen = 4;
+ }
+ else
+ {
+- slog(LOG_DEBUG_V, "Constructing ipv6 address\n");
++ xprintf("Constructing ipv6 address\n");
+ memcpy(ipbin, &s->sin6_addr, 16);
+ ipbinlen = 16;
+ }
+ }
+
+- slog(LOG_DEBUG_V, "Peer IP address: %s\n", ipstr);
+- slog(LOG_DEBUG_V, "Peer port : %d\n", port);
++ xprintf("Peer IP address: %s\n", ipstr);
++ xprintf("Peer port : %d\n", port);
+
+ int tMoreDataNeeded = 1;
+ struct keyring tKeys;
+@@ -478,18 +513,19 @@ void handleClient(int pSock, char *pPass
+ while(1 == tMoreDataNeeded)
+ {
+ tError = readDataFromClient(pSock, &(tConn.recv));
+- if(!tError && strlen(tConn.recv.data) > 0)
++ //if(!tError && strlen(tConn.recv.data) > 0)
++ if(!tError && tConn.recv.current > 0)
+ {
+- slog(LOG_DEBUG_VV, "Finished Reading some data from client\n");
++ xprintf("Finished Reading some data from client\n");
+ // parse client request
+ tMoreDataNeeded = parseMessage(&tConn, ipbin, ipbinlen, pHWADDR);
+ if(1 == tMoreDataNeeded)
+ {
+- slog(LOG_DEBUG_VV, "\n\nNeed to read more data\n");
++ xprintf("\n\nNeed to read more data\n");
+ }
+ else if(-1 == tMoreDataNeeded) // Forked process down below ended.
+ {
+- slog(LOG_DEBUG_V, "Forked Process ended...cleaning up\n");
++ xprintf("Forked Process ended...cleaning up\n");
+ cleanup(&tConn);
+ // pSock was already closed
+ return;
+@@ -498,13 +534,13 @@ void handleClient(int pSock, char *pPass
+ }
+ else
+ {
+- slog(LOG_DEBUG, "Error reading from socket, closing client\n");
++ xprintf("Error reading from socket, closing client\n");
+ // Error reading data....quit.
+ cleanup(&tConn);
+ return;
+ }
+ }
+- slog(LOG_DEBUG_VV, "Writing: %d chars to socket\n", tConn.resp.current);
++ xprintf("Writing: %d chars to socket\n", tConn.resp.current);
+ //tConn->resp.data[tConn->resp.current-1] = '\0';
+ writeDataToClient(pSock, &(tConn.resp));
+ // Finished reading one message...
+@@ -517,9 +553,9 @@ void handleClient(int pSock, char *pPass
+
+ void writeDataToClient(int pSock, struct shairbuffer *pResponse)
+ {
+- slog(LOG_DEBUG_VV, "\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data);
++ xprintf("\n----Beg Send Response Header----\n%.*s\n", pResponse->current, pResponse->data);
+ send(pSock, pResponse->data, pResponse->current,0);
+- slog(LOG_DEBUG_VV, "----Send Response Header----\n");
++ xprintf("----Send Response Header----\n");
+ }
+
+ int readDataFromClient(int pSock, struct shairbuffer *pClientBuffer)
+@@ -532,7 +568,7 @@ int readDataFromClient(int pSock, struct
+ while(tRetval > 0 && tEnd < 0)
+ {
+ // Read from socket until \n\n, \r\n\r\n, or \r\r is found
+- slog(LOG_DEBUG_V, "Waiting To Read...\n");
++ xprintf("Waiting To Read...\n");
+ fflush(stdout);
+ tRetval = read(pSock, tReadBuf, MAX_SIZE);
+ // if new buffer contains the end of request string, only copy partial buffer?
+@@ -543,40 +579,40 @@ int readDataFromClient(int pSock, struct
+ {
+ pClientBuffer->marker = tEnd+1; // Marks start of content
+ }
+- slog(SOCKET_LOG_LEVEL, "Found end of http request at: %d\n", tEnd);
++ xprintf("Found end of http request at: %d\n", tEnd);
+ fflush(stdout);
+ }
+ else
+ {
+ tEnd = MAX_SIZE;
+- slog(SOCKET_LOG_LEVEL, "Read %d of data so far\n%s\n", tRetval, tReadBuf);
++ xprintf("Read %d of data so far\n%s\n", tRetval, tReadBuf);
+ fflush(stdout);
+ }
+ if(tRetval > 0)
+ {
+ // Copy read data into tReceive;
+- slog(SOCKET_LOG_LEVEL, "Read %d data, using %d of it\n", tRetval, tEnd);
++ xprintf("Read %d data, using %d of it\n", tRetval, tEnd);
+ addNToShairBuffer(pClientBuffer, tReadBuf, tRetval);
+- slog(LOG_DEBUG_VV, "Finished copying data\n");
++ xprintf("Finished copying data\n");
+ }
+ else
+ {
+- slog(LOG_DEBUG, "Error reading data from socket, got: %d bytes", tRetval);
++ xprintf("Error reading data from socket, got: %d bytes", tRetval);
+ return tRetval;
+ }
+ }
+ if(tEnd + 1 != tRetval)
+ {
+- slog(SOCKET_LOG_LEVEL, "Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1);
++ xprintf("Read more data after end of http request. %d instead of %d\n", tRetval, tEnd+1);
+ }
+- slog(SOCKET_LOG_LEVEL, "Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data);
++ xprintf("Finished Reading Data:\n%s\nEndOfData\n", pClientBuffer->data);
+ fflush(stdout);
+ return 0;
+ }
+
+ char *getFromBuffer(char *pBufferPtr, const char *pField, int pLenAfterField, int *pReturnSize, char *pDelims)
+ {
+- slog(LOG_DEBUG_V, "GettingFromBuffer: %s\n", pField);
++ xprintf("GettingFromBuffer: %s\n", pField);
+ char* tFound = strstr(pBufferPtr, pField);
+ int tSize = 0;
+ if(tFound != NULL)
+@@ -597,7 +633,7 @@ char *getFromBuffer(char *pBufferPtr, co
+ }
+
+ tSize = (int) (tShortest - tFound);
+- slog(LOG_DEBUG_VV, "Found %.*s length: %d\n", tSize, tFound, tSize);
++ xprintf("Found %s length: %d\n",tFound, tSize);
+ if(pReturnSize != NULL)
+ {
+ *pReturnSize = tSize;
+@@ -605,7 +641,7 @@ char *getFromBuffer(char *pBufferPtr, co
+ }
+ else
+ {
+- slog(LOG_DEBUG_V, "Not Found\n");
++ xprintf("Not Found\n");
+ }
+ return tFound;
+ }
+@@ -639,10 +675,10 @@ int buildAppleResponse(struct connection
+ {
+ char tTrim[tFoundSize + 2];
+ getTrimmed(tFound, tFoundSize, TRUE, TRUE, tTrim);
+- slog(LOG_DEBUG_VV, "HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize);
++ xprintf("HeaderChallenge: [%s] len: %d sizeFound: %d\n", tTrim, strlen(tTrim), tFoundSize);
+ int tChallengeDecodeSize = 16;
+ char *tChallenge = decode_base64((unsigned char *)tTrim, tFoundSize, &tChallengeDecodeSize);
+- slog(LOG_DEBUG_VV, "Challenge Decode size: %d expected 16\n", tChallengeDecodeSize);
++ xprintf("Challenge Decode size: %d expected 16\n", tChallengeDecodeSize);
+
+ int tCurSize = 0;
+ unsigned char tChalResp[38];
+@@ -664,7 +700,7 @@ int buildAppleResponse(struct connection
+ }
+
+ char *tTmp = encode_base64((unsigned char *)tChalResp, tCurSize);
+- slog(LOG_DEBUG_VV, "Full sig: %s\n", tTmp);
++ xprintf("Full sig: %s\n", tTmp);
+ free(tTmp);
+
+ // RSA Encrypt
+@@ -709,15 +745,15 @@ int parseMessage(struct connection *pCon
+ if(tContent != NULL)
+ {
+ int tContentSize = atoi(tContent);
+- if(pConn->recv.marker == 0 || strlen(pConn->recv.data+pConn->recv.marker) != tContentSize)
++ if(pConn->recv.marker == 0 || pConn->recv.current-pConn->recv.marker != tContentSize)
+ {
+ if(isLogEnabledFor(HEADER_LOG_LEVEL))
+ {
+- slog(HEADER_LOG_LEVEL, "Content-Length: %s value -> %d\n", tContent, tContentSize);
++ xprintf("Content-Length: %s value -> %d\n", tContent, tContentSize);
+ if(pConn->recv.marker != 0)
+ {
+- slog(HEADER_LOG_LEVEL, "ContentPtr has %d, but needs %d\n",
+- strlen(pConn->recv.data+pConn->recv.marker), tContentSize);
++ xprintf("ContentPtr has %d, but needs %d\n",
++ (pConn->recv.current-pConn->recv.marker), tContentSize);
+ }
+ }
+ // check if value in tContent > 2nd read from client.
+@@ -726,7 +762,7 @@ int parseMessage(struct connection *pCon
+ }
+ else
+ {
+- slog(LOG_DEBUG_VV, "No content, header only\n");
++ xprintf("No content, header only\n");
+ }
+
+ // "Creates" a new Response Header for our response message
+@@ -739,7 +775,7 @@ int parseMessage(struct connection *pCon
+ {
+ tLen = 20;
+ }
+- slog(LOG_INFO, "********** RECV %.*s **********\n", tLen, pConn->recv.data);
++ xprintf("********** RECV %.*s **********\n", tLen, pConn->recv.data);
+ }
+
+ if(pConn->password != NULL)
+@@ -749,7 +785,7 @@ int parseMessage(struct connection *pCon
+
+ if(buildAppleResponse(pConn, pIpBin, pIpBinLen, pHWID)) // need to free sig
+ {
+- slog(LOG_DEBUG_V, "Added AppleResponse to Apple-Challenge request\n");
++ xprintf("Added AppleResponse to Apple-Challenge request\n");
+ }
+
+ // Find option, then based on option, do different actions.
+@@ -769,14 +805,14 @@ int parseMessage(struct connection *pCon
+ int tKeySize = 0;
+ char tEncodedAesIV[tSize + 2];
+ getTrimmed(tHeaderVal, tSize, TRUE, TRUE, tEncodedAesIV);
+- slog(LOG_DEBUG_VV, "AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV));
++ xprintf("AESIV: [%.*s] Size: %d Strlen: %d\n", tSize, tEncodedAesIV, tSize, strlen(tEncodedAesIV));
+ char *tDecodedIV = decode_base64((unsigned char*) tEncodedAesIV, tSize, &tSize);
+
+ // grab the key, copy it out of the receive buffer
+ tHeaderVal = getFromContent(tContent, "a=rsaaeskey", &tKeySize);
+ char tEncodedAesKey[tKeySize + 2]; // +1 for nl, +1 for \0
+ getTrimmed(tHeaderVal, tKeySize, TRUE, TRUE, tEncodedAesKey);
+- slog(LOG_DEBUG_VV, "AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey));
++ xprintf("AES KEY: [%s] Size: %d Strlen: %d\n", tEncodedAesKey, tKeySize, strlen(tEncodedAesKey));
+ // remove base64 coding from key
+ char *tDecodedAesKey = decode_base64((unsigned char*) tEncodedAesKey,
+ tKeySize, &tKeySize); // Need to free DecodedAesKey
+@@ -785,7 +821,7 @@ int parseMessage(struct connection *pCon
+ int tFmtpSize = 0;
+ char *tFmtp = getFromContent(tContent, "a=fmtp", &tFmtpSize); // Don't need to free
+ tFmtp = getTrimmedMalloc(tFmtp, tFmtpSize, TRUE, FALSE); // will need to free
+- slog(LOG_DEBUG_VV, "Format: %s\n", tFmtp);
++ xprintf("Format: %s\n", tFmtp);
+
+ RSA *rsa = loadKey();
+ // Decrypt the binary aes key
+@@ -794,11 +830,11 @@ int parseMessage(struct connection *pCon
+ if(RSA_private_decrypt(tKeySize, (unsigned char *)tDecodedAesKey,
+ (unsigned char*) tDecryptedKey, rsa, RSA_PKCS1_OAEP_PADDING) >= 0)
+ {
+- slog(LOG_DEBUG, "Decrypted AES key from RSA Successfully\n");
++ xprintf("Decrypted AES key from RSA Successfully\n");
+ }
+ else
+ {
+- slog(LOG_INFO, "Error Decrypting AES key from RSA\n");
++ xprintf("Error Decrypting AES key from RSA\n");
+ }
+ free(tDecodedAesKey);
+ RSA_free(rsa);
+@@ -814,13 +850,13 @@ int parseMessage(struct connection *pCon
+ // struct comms *tComms = pConn->hairtunes;
+ // if (! (pipe(tComms->in) == 0 && pipe(tComms->out) == 0))
+ // {
+-// slog(LOG_INFO, "Error setting up hairtunes communications...some things probably wont work very well.\n");
++// xprintf("Error setting up hairtunes communications...some things probably wont work very well.\n");
+ // }
+
+ // Setup fork
+ char tPort[8] = "6000"; // get this from dup()'d stdout of child pid
+
+- printf("******** SETUP!!!!!\n");
++ xprintf("******** SETUP!!!!!\n",NULL);
+ #ifndef XBMC
+ int tPid = fork();
+ if(tPid == 0)
+@@ -836,11 +872,11 @@ int parseMessage(struct connection *pCon
+ tFound = getFromSetup(pConn->recv.data, "timing_port", &tSize);
+ getTrimmed(tFound, tSize, 1, 0, tTPortStr);
+
+- slog(LOG_DEBUG_VV, "converting %s and %s from str->int\n", tCPortStr, tTPortStr);
++ xprintf("converting %s and %s from str->int\n", tCPortStr, tTPortStr);
+ int tControlport = atoi(tCPortStr);
+ int tTimingport = atoi(tTPortStr);
+
+- slog(LOG_DEBUG_V, "Got %d for CPort and %d for TPort\n", tControlport, tTimingport);
++ xprintf("Got %d for CPort and %d for TPort\n", tControlport, tTimingport);
+ char *tRtp = NULL;
+ char *tPipe = NULL;
+ char *tAoDriver = NULL;
+@@ -875,7 +911,7 @@ int parseMessage(struct connection *pCon
+ tDataport, tRtp, tPipe, tAoDriver, tAoDeviceName, tAoDeviceId);
+ #ifndef XBMC
+ // Quit when finished.
+- slog(LOG_DEBUG, "Returned from hairtunes init....returning -1, should close out this whole side of the fork\n");
++ xprintf("Returned from hairtunes init....returning -1, should close out this whole side of the fork\n");
+ return -1;
+ }
+ else if(tPid >0)
+@@ -888,7 +924,7 @@ int parseMessage(struct connection *pCon
+ int tRead = read(tComms->out[0], tFromHairtunes, 80);
+ if(tRead <= 0)
+ {
+- slog(LOG_INFO, "Error reading port from hairtunes function, assuming default port: %d\n", tPort);
++ xprintf("Error reading port from hairtunes function, assuming default port: %d\n", tPort);
+ }
+ else
+ {
+@@ -900,7 +936,7 @@ int parseMessage(struct connection *pCon
+ }
+ else
+ {
+- slog(LOG_INFO, "Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes);
++ xprintf("Read %d bytes, Error translating %s into a port\n", tRead, tFromHairtunes);
+ }
+ }
+
+@@ -921,7 +957,7 @@ int parseMessage(struct connection *pCon
+ }
+ else
+ {
+- slog(LOG_INFO, "Error forking process....dere' be errors round here.\n");
++ xprintf("Error forking process....dere' be errors round here.\n");
+ return -1;
+ }
+ #endif
+@@ -933,7 +969,7 @@ int parseMessage(struct connection *pCon
+ propogateCSeq(pConn);
+ #ifndef XBMC
+ close(pConn->hairtunes->in[1]);
+- slog(LOG_DEBUG, "Tearing down connection, closing pipes\n");
++ xprintf("Tearing down connection, closing pipes\n");
+ #else
+ hairtunes_cleanup();
+ #endif
+@@ -954,21 +990,73 @@ int parseMessage(struct connection *pCon
+ {
+ propogateCSeq(pConn);
+ int tSize = 0;
++ char *buffer = NULL;
++ char *contentType = getFromHeader(pConn->recv.data, "Content-Type", &tSize);
++ char *tContent = getFromHeader(pConn->recv.data, "Content-Length", NULL);
++ int iContentSize = 0;
++ int isJpg = 0;
++
++ if(tContent != NULL)
++ {
++ iContentSize = atoi(tContent);
++ }
++
++ if( tSize > 1 &&
++ (strncmp(contentType, "application/x-dmap-tagged", tSize) == 0) ||
++ (strncmp(contentType, "image/jpeg", tSize) == 0) )
++ {
++ if( (pConn->recv.current - pConn->recv.marker) == iContentSize && pConn->recv.marker != 0)
++ {
++ if(strncmp(contentType, "image/jpeg", tSize) == 0)
++ {
++ isJpg = 1;
++ }
++ buffer = (char *)malloc(iContentSize * sizeof(char));
++ memcpy(buffer, pConn->recv.data + pConn->recv.marker, iContentSize);
++ }
++ else
++ {
++ iContentSize = 0;
++ }
++ }
++ else
++ {
++ iContentSize = 0;
++ }
+ char *tVol = getFromHeader(pConn->recv.data, "volume", &tSize);
+- slog(LOG_DEBUG_VV, "About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
++ if( tVol)
++ {
++ xprintf("About to write [vol: %.*s] data to hairtunes\n", tSize, tVol);
++ }
+ // TBD VOLUME
+ #ifndef XBMC
+ write(pConn->hairtunes->in[1], "vol: ", 5);
+ write(pConn->hairtunes->in[1], tVol, tSize);
+ write(pConn->hairtunes->in[1], "\n", 1);
+ #else
+- hairtunes_setvolume(atof(tVol));
++ if(tVol)
++ {
++ hairtunes_setvolume(atof(tVol));
++ }
++
++ if(iContentSize)
++ {
++ if(isJpg)
++ {
++ hairtunes_set_metadata_coverart(buffer, iContentSize);
++ }
++ else
++ {
++ hairtunes_set_metadata(buffer, iContentSize);
++ }
++ free(buffer);
++ }
+ #endif
+- slog(LOG_DEBUG_VV, "Finished writing data write data to hairtunes\n");
++ xprintf("Finished writing data write data to hairtunes\n");
+ }
+ else
+ {
+- slog(LOG_DEBUG, "\n\nUn-Handled recv: %s\n", pConn->recv.data);
++ xprintf("\n\nUn-Handled recv: %s\n", pConn->recv.data);
+ propogateCSeq(pConn);
+ }
+ addToShairBuffer(&(pConn->resp), "\r\n");
+@@ -1047,7 +1135,7 @@ int startAvahi(const char *pHWStr, const
+ char tName[100 + HWID_SIZE + 3];
+ if(strlen(pServerName) > tMaxServerName)
+ {
+- slog(LOG_INFO,"Hey dog, we see you like long server names, "
++ xprintf("Hey dog, we see you like long server names, "
+ "so we put a strncat in our command so we don't buffer overflow, while you listen to your flow.\n"
+ "We just used the first %d characters. Pick something shorter if you want\n", tMaxServerName);
+ }
+@@ -1058,7 +1146,7 @@ int startAvahi(const char *pHWStr, const
+ strcat(tName, pHWStr);
+ strcat(tName, "@");
+ strncat(tName, pServerName, tMaxServerName);
+- slog(AVAHI_LOG_LEVEL, "Avahi/DNS-SD Name: %s\n", tName);
++ xprintf("Avahi/DNS-SD Name: %s\n", tName);
+
+ execlp("avahi-publish-service", "avahi-publish-service", tName,
+ "_raop._tcp", tPort, "tp=UDP","sm=false","sv=false","ek=1","et=0,1",
+@@ -1070,12 +1158,12 @@ int startAvahi(const char *pHWStr, const
+ perror("error");
+ }
+
+- slog(LOG_INFO, "Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n");
+- exit(1);
++ xprintf("Bad error... couldn't find or failed to run: avahi-publish-service OR dns-sd\n");
++ //exit(1);
+ }
+ else
+ {
+- slog(LOG_DEBUG_VV, "Avahi/DNS-SD started on PID: %d\n", tPid);
++ xprintf("Avahi/DNS-SD started on PID: %d\n", tPid);
+ }
+ return tPid;
+ }
+@@ -1083,7 +1171,7 @@ int startAvahi(const char *pHWStr, const
+
+ void printBufferInfo(struct shairbuffer *pBuf, int pLevel)
+ {
+- slog(pLevel, "Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char));
++ xprintf("Buffer: [%s] size: %d maxchars:%d\n", pBuf->data, pBuf->current, pBuf->maxsize/sizeof(char));
+ }
+
+ int getAvailChars(struct shairbuffer *pBuf)
+@@ -1164,7 +1252,8 @@ void slog(int pLevel, char *pFormat, ...
+ {
+ va_list argp;
+ va_start(argp, pFormat);
+- vprintf(pFormat, argp);
++ xprintf(pFormat, argp);
++ //vprintf(pFormat, argp);
+ va_end(argp);
+ }
+ //#endif
+@@ -1218,9 +1307,9 @@ void initBuffer(struct shairbuffer *pBuf
+ {
+ if(pBuf->data != NULL)
+ {
+- slog(LOG_DEBUG_VV, "Hrm, buffer wasn't cleaned up....trying to free\n");
++ xprintf("Hrm, buffer wasn't cleaned up....trying to free\n");
+ free(pBuf->data);
+- slog(LOG_DEBUG_VV, "Free didn't seem to seg fault....huzzah\n");
++ xprintf("Free didn't seem to seg fault....huzzah\n");
+ }
+ pBuf->current = 0;
+ pBuf->marker = 0;
+@@ -1278,6 +1367,6 @@ RSA *loadKey()
+ BIO *tBio = BIO_new_mem_buf(AIRPORT_PRIVATE_KEY, -1);
+ RSA *rsa = PEM_read_bio_RSAPrivateKey(tBio, NULL, NULL, NULL); //NULL, NULL, NULL);
+ BIO_free(tBio);
+- slog(RSA_LOG_LEVEL, "RSA Key: %d\n", RSA_check_key(rsa));
++ xprintf("RSA Key: %d\n", RSA_check_key(rsa));
+ return rsa;
+ }
diff --git a/audio/libshairport/files/patch-src_shairport.h b/audio/libshairport/files/patch-src_shairport.h
new file mode 100644
index 000000000000..08af5df34f1e
--- /dev/null
+++ b/audio/libshairport/files/patch-src_shairport.h
@@ -0,0 +1,51 @@
+--- src/shairport.h.orig 2011-08-20 23:58:11 UTC
++++ src/shairport.h
+@@ -11,14 +11,22 @@
+ #include <regex.h>
+ #include <sys/types.h>
+ #include <regex.h>
++#include "ao.h"
+
+
+ #define HWID_SIZE 6
+ #define SHAIRPORT_LOG 1
+-#define LOG_INFO 1
+-#define LOG_DEBUG 5
+-#define LOG_DEBUG_V 6
+-#define LOG_DEBUG_VV 7
++
++#ifndef LOG_INFO
++#define LOG_INFO 5
++#endif
++
++#ifndef LOG_DEBUG
++#define LOG_DEBUG 6
++#endif
++
++#define LOG_DEBUG_V 7
++#define LOG_DEBUG_VV 8
+
+ struct shairbuffer
+ {
+@@ -58,13 +66,21 @@ extern "C"
+ {
+ #endif /* __cplusplus */
+
++struct printfPtr
++{
++ int (*extprintf)(const char* msg, size_t msgSize);
++};
++
+ int shairport_main(int argc, char **argv);
+ void shairport_exit(void);
+ int shairport_loop(void);
+ int shairport_is_running(void);
++void shairport_set_ao(struct AudioOutput *ao);
++void shairport_set_printf(struct printfPtr *funcPtr);
+
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+
+ #endif
++
diff --git a/audio/libshairport/files/patch-src_socketlib.c b/audio/libshairport/files/patch-src_socketlib.c
new file mode 100644
index 000000000000..e9bef80a6d37
--- /dev/null
+++ b/audio/libshairport/files/patch-src_socketlib.c
@@ -0,0 +1,58 @@
+--- src/socketlib.c.orig 2011-09-23 20:00:48 UTC
++++ src/socketlib.c
+@@ -48,7 +48,7 @@ int common_setup(struct addrinfo *pAddrI
+ if((tSock==-1) && (pAddrInfo->ai_family == AF_INET6) && (errno == EAFNOSUPPORT))
+ {
+ //Fallback to ipv4
+- perror("Failed to create ipv6 socket. Trying ipv4");
++ xprintf("Failed to create ipv6 socket. Trying ipv4");
+ pAddrInfo->ai_family = AF_INET;
+ tSock = socket(pAddrInfo->ai_family, pAddrInfo->ai_socktype, 0);
+ }
+@@ -82,7 +82,7 @@ int setup_client(struct addrinfo *server
+ delay(RETRY_DELAY, &tRes);
+ }
+ }
+- printf("%d Retry attempts exceeded\n", RETRY_COUNT);
++ xprintf("%d Retry attempts exceeded\n", RETRY_COUNT);
+ return ERROR;
+ }
+
+@@ -102,7 +102,7 @@ int getAddr(char *pHostname, char *pServ
+ tError = getaddrinfo(pHostname, pService, &hints, pAddrInfo);
+ if(tError != 0)
+ {
+- printf("Error getting address info\n");
++ xprintf("Error getting address info\n");
+ }
+ return tError;
+ }
+@@ -158,8 +158,8 @@ int setupListenServer(struct addrinfo **
+ sprintf(tService, "%d", pPort); // copies port to string
+ int tFamily = AF_INET;
+ #ifdef AF_INET6
+- //printf("Listening on IPv6 Socket\n");
+- //tFamily = AF_INET6;
++ xprintf("Listening on IPv6 Socket\n");
++ tFamily = AF_INET6;
+ #else
+ //printf("Listening on IPv4 Socket");
+ #endif
+@@ -200,7 +200,7 @@ static int getCorrectedEncodeSize(int pS
+ else
+ {
+ // Invalid encoded data, no other cases are possible.
+- printf("Unrecoverable error....base64 values are incorrectly encoded\n");
++ xprintf("Unrecoverable error....base64 values are incorrectly encoded\n");
+ return pSize;
+ }
+ }
+@@ -226,7 +226,7 @@ char *decode_base64(unsigned char *pInpu
+ memset(input, 0, length);
+ memcpy(input, pInput, pLength);
+ memset(input+pLength, '=', length-pLength);
+- printf("Fixed value: [%.*s]\n", length, input);
++ xprintf("Fixed value: [%.*s]\n", length, input);
+ }
+ char *buffer = (char *)malloc(length);
+ memset(buffer, 0, length);
diff --git a/audio/libsidplay2/files/patch-libsidplay__include__sidplay__SmartPtr.h b/audio/libsidplay2/files/patch-libsidplay__include__sidplay__SmartPtr.h
deleted file mode 100644
index df50ab655518..000000000000
--- a/audio/libsidplay2/files/patch-libsidplay__include__sidplay__SmartPtr.h
+++ /dev/null
@@ -1,26 +0,0 @@
---- libsidplay/include/sidplay/SmartPtr.h.orig Tue Jun 15 05:08:04 2004
-+++ libsidplay/include/sidplay/SmartPtr.h Wed Aug 18 00:47:50 2004
-@@ -211,16 +211,16 @@
- {
- if ( bufferLen >= 1 )
- {
-- pBufCurrent = ( bufBegin = buffer );
-- bufEnd = bufBegin + bufferLen;
-- bufLen = bufferLen;
-- status = true;
-+ this->pBufCurrent = ( this->bufBegin = buffer );
-+ this->bufEnd = this->bufBegin + bufferLen;
-+ this->bufLen = bufferLen;
-+ this->status = true;
- }
- else
- {
-- pBufCurrent = bufBegin = bufEnd = 0;
-- bufLen = 0;
-- status = false;
-+ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
-+ this->bufLen = 0;
-+ this->status = false;
- }
- }
- };
diff --git a/audio/libsidplay2/files/patch-libsidplay_include_sidplay_SmartPtr.h b/audio/libsidplay2/files/patch-libsidplay_include_sidplay_SmartPtr.h
new file mode 100644
index 000000000000..ead9dd02db64
--- /dev/null
+++ b/audio/libsidplay2/files/patch-libsidplay_include_sidplay_SmartPtr.h
@@ -0,0 +1,26 @@
+--- libsidplay/include/sidplay/SmartPtr.h.orig 2004-06-14 20:08:04 UTC
++++ libsidplay/include/sidplay/SmartPtr.h
+@@ -211,16 +211,16 @@ class SmartPtr_sidtt : public SmartPtrBa
+ {
+ if ( bufferLen >= 1 )
+ {
+- pBufCurrent = ( bufBegin = buffer );
+- bufEnd = bufBegin + bufferLen;
+- bufLen = bufferLen;
+- status = true;
++ this->pBufCurrent = ( this->bufBegin = buffer );
++ this->bufEnd = this->bufBegin + bufferLen;
++ this->bufLen = bufferLen;
++ this->status = true;
+ }
+ else
+ {
+- pBufCurrent = bufBegin = bufEnd = 0;
+- bufLen = 0;
+- status = false;
++ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
++ this->bufLen = 0;
++ this->status = false;
+ }
+ }
+ };
diff --git a/audio/libsidplay2/files/patch-libsidutils_include_sidplay_utils_SidUsage.h b/audio/libsidplay2/files/patch-libsidutils_include_sidplay_utils_SidUsage.h
index d4b172e5f743..7a93e3f13a5f 100644
--- a/audio/libsidplay2/files/patch-libsidutils_include_sidplay_utils_SidUsage.h
+++ b/audio/libsidplay2/files/patch-libsidutils_include_sidplay_utils_SidUsage.h
@@ -1,6 +1,6 @@
---- libsidutils/include/sidplay/utils/SidUsage.h.orig Sat Sep 30 19:49:52 2006
-+++ libsidutils/include/sidplay/utils/SidUsage.h Sat Sep 30 19:50:54 2006
-@@ -33,7 +33,7 @@
+--- libsidutils/include/sidplay/utils/SidUsage.h.orig 2004-06-14 20:08:08 UTC
++++ libsidutils/include/sidplay/utils/SidUsage.h
+@@ -33,7 +33,7 @@ struct sid2_usage_t: public sid_usage_t
uint_least16_t length; // usage scan length
// Copy common parts of basic usage to extended usage.
diff --git a/audio/libsidplayfp/files/patch-Makefile.in b/audio/libsidplayfp/files/patch-Makefile.in
index e58424cfc9a1..ac3d71f8b3cf 100644
--- a/audio/libsidplayfp/files/patch-Makefile.in
+++ b/audio/libsidplayfp/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2015-01-24 15:59:52 UTC
+--- Makefile.in.orig 2016-04-15 17:21:44 UTC
+++ Makefile.in
-@@ -2000,8 +2000,8 @@ uninstall-am: uninstall-builders_hardsid
+@@ -2003,8 +2003,8 @@ uninstall-am: uninstall-builders_hardsid
.a65.bin:
o65file=`echo $@ | sed 's/bin/o65/'`;\
diff --git a/audio/libworkman/files/patch-Imakefile b/audio/libworkman/files/patch-Imakefile
index 3d97d1abe26c..c505f5b51c50 100644
--- a/audio/libworkman/files/patch-Imakefile
+++ b/audio/libworkman/files/patch-Imakefile
@@ -1,6 +1,6 @@
---- Imakefile.orig 1999-05-30 00:48:17.000000000 +0900
-+++ Imakefile 2011-08-23 13:40:41.000000000 +0900
-@@ -31,7 +31,7 @@
+--- Imakefile.orig 1999-05-29 15:48:17 UTC
++++ Imakefile
+@@ -31,7 +31,7 @@ XCOMM
#include "include/wm_version.h"
@@ -9,7 +9,7 @@
SRCS = cddb.c cdrom.c cdinfo.c plat_freebsd.c plat_sun.c plat_hpux.c \
plat_ultrix.c plat_news.c plat_bsd386.c plat_osf1.c plat_linux.c \
-@@ -47,6 +47,7 @@
+@@ -47,6 +47,7 @@ OBJS = cddb.o cdrom.o cdinfo.o plat_free
HEADERS= \
include/wm_cdda.h \
@@ -17,7 +17,7 @@
include/wm_cdinfo.h \
include/wm_cdrom.h \
include/wm_config.h \
-@@ -65,7 +66,7 @@
+@@ -65,7 +66,7 @@ HEADERS= \
#ifdef SHARED_LIBWORKMAN
SharedLibraryTarget(workman,$(WM_LIBVER),$(OBJS),.,.)
diff --git a/audio/libworkman/files/patch-plat__freebsd.c b/audio/libworkman/files/patch-plat__freebsd.c
new file mode 100644
index 000000000000..64d87afa63a9
--- /dev/null
+++ b/audio/libworkman/files/patch-plat__freebsd.c
@@ -0,0 +1,10 @@
+--- plat_freebsd.c.orig 1999-03-07 08:36:40 UTC
++++ plat_freebsd.c
+@@ -49,7 +49,6 @@ static char freebsd_id[] = "$Id: plat_fr
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
+ #include <sys/cdio.h>
+-#include <sys/scsiio.h>
+
+ #if defined(__NetBSD__)
+ # define MSF_MINUTES 1
diff --git a/audio/libworkman/files/patch-plat_freebsd.c b/audio/libworkman/files/patch-plat_freebsd.c
deleted file mode 100644
index 05c1cf42c612..000000000000
--- a/audio/libworkman/files/patch-plat_freebsd.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- plat_freebsd.c.orig Thu Jan 27 12:17:46 2000
-+++ plat_freebsd.c Thu Jan 27 12:18:15 2000
-@@ -49,7 +49,6 @@
- #include <sys/time.h>
- #include <sys/ioctl.h>
- #include <sys/cdio.h>
--#include <sys/scsiio.h>
-
- #if defined(__NetBSD__)
- # define MSF_MINUTES 1
diff --git a/audio/libworkman/files/patch-wm__helpers.c b/audio/libworkman/files/patch-wm__helpers.c
new file mode 100644
index 000000000000..447cb97f2f05
--- /dev/null
+++ b/audio/libworkman/files/patch-wm__helpers.c
@@ -0,0 +1,11 @@
+--- wm_helpers.c.orig 1999-03-07 08:36:41 UTC
++++ wm_helpers.c
+@@ -30,7 +30,7 @@ static char wm_helpers_id[] = "$Id: wm_h
+
+ #include <stdio.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <errno.h>
+ #include <stdarg.h>
+ #include <sys/time.h>
diff --git a/audio/libworkman/files/patch-wm_helpers.c b/audio/libworkman/files/patch-wm_helpers.c
deleted file mode 100644
index 5741f350463f..000000000000
--- a/audio/libworkman/files/patch-wm_helpers.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- wm_helpers.c.orig Sun Aug 8 21:05:58 1999
-+++ wm_helpers.c Sun Aug 8 21:06:12 1999
-@@ -30,7 +30,7 @@
-
- #include <stdio.h>
- #include <string.h>
--#include <malloc.h>
-+#include <stdlib.h>
- #include <errno.h>
- #include <stdarg.h>
- #include <sys/time.h>
diff --git a/audio/libxmp/files/patch-Makefile.in b/audio/libxmp/files/patch-Makefile.in
index fa5b03c2376b..4947192cf865 100644
--- a/audio/libxmp/files/patch-Makefile.in
+++ b/audio/libxmp/files/patch-Makefile.in
@@ -1,4 +1,4 @@
---- Makefile.in.orig 2015-12-31 00:25:51 UTC
+--- Makefile.in.orig 2016-07-16 11:29:48 UTC
+++ Makefile.in
@@ -146,8 +146,8 @@ install: all
@echo "Installing xmp.h..."
diff --git a/audio/lingot/files/patch-Makefile.in b/audio/lingot/files/patch-Makefile.in
index a51ec2fa1fce..4ec7bc92b29c 100644
--- a/audio/lingot/files/patch-Makefile.in
+++ b/audio/lingot/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- ./Makefile.in.orig 2011-08-22 10:10:09.000000000 -0400
-+++ ./Makefile.in 2014-06-18 23:12:35.000000000 -0400
-@@ -291,21 +291,21 @@
+--- Makefile.in.orig 2011-08-22 14:10:09 UTC
++++ Makefile.in
+@@ -291,21 +291,21 @@ SUBDIRS = po src pixmaps
lingotdocdir = ${docdir}
lingotdoc_DATA = \
README\
diff --git a/audio/linux-c6-pulseaudio-libs/files/patch-etc__pulse__client.conf b/audio/linux-c6-pulseaudio-libs/files/patch-etc__pulse__client.conf
deleted file mode 100644
index 7b81a1b1376b..000000000000
--- a/audio/linux-c6-pulseaudio-libs/files/patch-etc__pulse__client.conf
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./etc/pulse/client.conf.orig 2014-08-23 02:17:24.474174232 +0200
-+++ ./etc/pulse/client.conf 2014-08-23 02:18:03.584171688 +0200
-@@ -29,5 +29,7 @@
-
- ; cookie-file =
-
--; enable-shm = yes
-+; SHM didn't seem to be supported through linuxulator at the time
-+enable-shm = no
-+
- ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
diff --git a/audio/linux-c6-pulseaudio-libs/files/patch-etc_pulse_client.conf b/audio/linux-c6-pulseaudio-libs/files/patch-etc_pulse_client.conf
new file mode 100644
index 000000000000..fc17a52913fd
--- /dev/null
+++ b/audio/linux-c6-pulseaudio-libs/files/patch-etc_pulse_client.conf
@@ -0,0 +1,11 @@
+--- etc/pulse/client.conf.orig 2016-02-03 11:05:51 UTC
++++ etc/pulse/client.conf
+@@ -29,5 +29,7 @@
+
+ ; cookie-file =
+
+-; enable-shm = yes
++; SHM didn't seem to be supported through linuxulator at the time
++enable-shm = no
++
+ ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
diff --git a/audio/linux-f10-pulseaudio-libs/Makefile b/audio/linux-f10-pulseaudio-libs/Makefile
index ca7d5a55e79c..512f1fb4f8ad 100644
--- a/audio/linux-f10-pulseaudio-libs/Makefile
+++ b/audio/linux-f10-pulseaudio-libs/Makefile
@@ -18,7 +18,7 @@ RPMVERSION= 4.fc10
SRC_DISTFILES= ${PORTNAME:S/-libs//}-${PORTVERSION}-${RPMVERSION}${SRC_SUFX}
USE_LDCONFIG= yes
-pre-patch:
+post-extract:
@(cd ${WRKSRC}/etc/pulse && ${MV} client.conf client.conf.sample)
post-patch:
diff --git a/audio/linux-f10-pulseaudio-libs/files/patch-etc_pulse_client.conf.sample b/audio/linux-f10-pulseaudio-libs/files/patch-etc_pulse_client.conf.sample
index 6271d209888e..faf9f1eed351 100644
--- a/audio/linux-f10-pulseaudio-libs/files/patch-etc_pulse_client.conf.sample
+++ b/audio/linux-f10-pulseaudio-libs/files/patch-etc_pulse_client.conf.sample
@@ -1,5 +1,5 @@
---- etc/pulse/client.conf.sample.orig 2011-04-01 15:42:58.548733177 +0300
-+++ etc/pulse/client.conf.sample 2011-04-01 15:53:03.306719164 +0300
+--- etc/pulse/client.conf.sample.orig 2011-04-26 07:29:20 UTC
++++ etc/pulse/client.conf.sample
@@ -23,11 +23,11 @@
; default-source =
; default-server =
diff --git a/audio/linuxsampler/files/patch-src-common-Mutex.cpp b/audio/linuxsampler/files/patch-src-common-Mutex.cpp
deleted file mode 100644
index 002d905521cc..000000000000
--- a/audio/linuxsampler/files/patch-src-common-Mutex.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/common/Mutex.cpp.orig Tue Mar 6 20:42:00 2007
-+++ src/common/Mutex.cpp Tue Mar 6 20:42:06 2007
-@@ -35,7 +35,6 @@
-
- #if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 500
- # undef _XOPEN_SOURCE
--# define _XOPEN_SOURCE 500 /* to define PTHREAD_MUTEX_ERRORCHECK */
- # warning "Seems you don't have a UNIX98 compatible system."
- # warning "Please run LinuxSampler's selftest to make sure this won't be a problem!"
- # warning "(compile tests with 'make tests', run them with 'src/testcases/linuxsamplertest')"
diff --git a/audio/linuxsampler/files/patch-src-common-atomic.h b/audio/linuxsampler/files/patch-src-common-atomic.h
deleted file mode 100644
index 8a17bb03058f..000000000000
--- a/audio/linuxsampler/files/patch-src-common-atomic.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/common/atomic.h.orig 2009-03-29 20:43:39.000000000 +0200
-+++ src/common/atomic.h 2009-08-22 11:21:38.000000000 +0200
-@@ -38,7 +38,7 @@
- #define CONFIG_SMP /* ... the macro the kernel headers use */
- #endif
-
--#if defined(__linux__) || defined(WIN32) || defined(__APPLE__)
-+#if defined(__linux__) || defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__)
- #ifdef _ARCH_PPC
-
- /*
diff --git a/audio/linuxsampler/files/patch-src-drivers-audio-AudioChannel.cpp b/audio/linuxsampler/files/patch-src-drivers-audio-AudioChannel.cpp
deleted file mode 100644
index 713c1a6f0410..000000000000
--- a/audio/linuxsampler/files/patch-src-drivers-audio-AudioChannel.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/drivers/audio/AudioChannel.cpp.orig 2007-11-15 00:42:05.000000000 +0100
-+++ src/drivers/audio/AudioChannel.cpp 2008-11-16 01:55:40.000000000 +0100
-@@ -26,7 +26,7 @@
- #include "../../common/global_private.h"
- #include "../../common/Thread.h" // needed for allocAlignedMem() and freeAlignedMem()
-
--#if defined(__APPLE__)
-+#if defined(__APPLE__) || defined(__FreeBSD__)
- # include <stdlib.h>
- #else
- # include <malloc.h>
diff --git a/audio/linuxsampler/files/patch-src__common__Pool.h b/audio/linuxsampler/files/patch-src__common__Pool.h
deleted file mode 100644
index 02daae02c393..000000000000
--- a/audio/linuxsampler/files/patch-src__common__Pool.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/common/Pool.h.orig 2008-12-07 09:18:04.000000000 +0900
-+++ src/common/Pool.h 2012-10-13 04:19:19.000000000 +0900
-@@ -393,7 +393,7 @@
- inline Iterator allocAppend() {
- if (pPool->poolIsEmpty()) return RTListBase<T>::begin();
- Iterator element = pPool->alloc();
-- append(element);
-+ this->append(element);
- #if CONFIG_DEVMODE
- element.list = this;
- #endif // CONFIG_DEVMODE
diff --git a/audio/linuxsampler/files/patch-src_common_Mutex.cpp b/audio/linuxsampler/files/patch-src_common_Mutex.cpp
new file mode 100644
index 000000000000..6ee360146153
--- /dev/null
+++ b/audio/linuxsampler/files/patch-src_common_Mutex.cpp
@@ -0,0 +1,10 @@
+--- src/common/Mutex.cpp.orig 2007-11-15 00:23:37 UTC
++++ src/common/Mutex.cpp
+@@ -36,7 +36,6 @@
+ #if !defined(WIN32)
+ #if !defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 500
+ # undef _XOPEN_SOURCE
+-# define _XOPEN_SOURCE 500 /* to define PTHREAD_MUTEX_ERRORCHECK */
+ # warning "Seems you don't have a UNIX98 compatible system."
+ # warning "Please run LinuxSampler's selftest to make sure this won't be a problem!"
+ # warning "(compile tests with 'make tests', run them with 'src/testcases/linuxsamplertest')"
diff --git a/audio/linuxsampler/files/patch-src_common_Pool.h b/audio/linuxsampler/files/patch-src_common_Pool.h
new file mode 100644
index 000000000000..d87e3dbaf10d
--- /dev/null
+++ b/audio/linuxsampler/files/patch-src_common_Pool.h
@@ -0,0 +1,11 @@
+--- src/common/Pool.h.orig 2008-12-07 00:18:04 UTC
++++ src/common/Pool.h
+@@ -393,7 +393,7 @@ class RTList : public RTListBase<T> {
+ inline Iterator allocAppend() {
+ if (pPool->poolIsEmpty()) return RTListBase<T>::begin();
+ Iterator element = pPool->alloc();
+- append(element);
++ this->append(element);
+ #if CONFIG_DEVMODE
+ element.list = this;
+ #endif // CONFIG_DEVMODE
diff --git a/audio/linuxsampler/files/patch-src_common_atomic.h b/audio/linuxsampler/files/patch-src_common_atomic.h
new file mode 100644
index 000000000000..7baa65962c08
--- /dev/null
+++ b/audio/linuxsampler/files/patch-src_common_atomic.h
@@ -0,0 +1,11 @@
+--- src/common/atomic.h.orig 2009-03-29 18:43:39 UTC
++++ src/common/atomic.h
+@@ -38,7 +38,7 @@
+ #define CONFIG_SMP /* ... the macro the kernel headers use */
+ #endif
+
+-#if defined(__linux__) || defined(WIN32) || defined(__APPLE__)
++#if defined(__linux__) || defined(WIN32) || defined(__APPLE__) || defined(__FreeBSD__)
+ #ifdef _ARCH_PPC
+
+ /*
diff --git a/audio/linuxsampler/files/patch-src_drivers_audio_AudioChannel.cpp b/audio/linuxsampler/files/patch-src_drivers_audio_AudioChannel.cpp
new file mode 100644
index 000000000000..c70ae51ebd2f
--- /dev/null
+++ b/audio/linuxsampler/files/patch-src_drivers_audio_AudioChannel.cpp
@@ -0,0 +1,11 @@
+--- src/drivers/audio/AudioChannel.cpp.orig 2009-07-04 12:13:58 UTC
++++ src/drivers/audio/AudioChannel.cpp
+@@ -26,7 +26,7 @@
+ #include "../../common/global_private.h"
+ #include "../../common/Thread.h" // needed for allocAlignedMem() and freeAlignedMem()
+
+-#if defined(__APPLE__)
++#if defined(__APPLE__) || defined(__FreeBSD__)
+ # include <stdlib.h>
+ #else
+ # include <malloc.h>
diff --git a/audio/lmms/files/patch-CMakeLists.txt b/audio/lmms/files/patch-CMakeLists.txt
index 07bbe10e4bd2..171163c1d05e 100644
--- a/audio/lmms/files/patch-CMakeLists.txt
+++ b/audio/lmms/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig 2016-04-24 11:28:57 UTC
+--- CMakeLists.txt.orig 2016-07-26 15:14:45 UTC
+++ CMakeLists.txt
@@ -325,6 +325,7 @@ ENDIF(LMMS_BUILD_WIN32)
diff --git a/audio/lmms/files/patch-include_lmms__math.h b/audio/lmms/files/patch-include_lmms__math.h
index 2e2ef85a9b9c..1e7b7dbbdf9d 100644
--- a/audio/lmms/files/patch-include_lmms__math.h
+++ b/audio/lmms/files/patch-include_lmms__math.h
@@ -1,4 +1,4 @@
---- include/lmms_math.h.orig 2016-05-05 22:56:00 UTC
+--- include/lmms_math.h.orig 2015-03-08 02:47:14 UTC
+++ include/lmms_math.h
@@ -26,15 +26,14 @@
#ifndef LMMS_MATH_H
diff --git a/audio/lmms/files/patch-plugins_organic_organic.cpp b/audio/lmms/files/patch-plugins_organic_organic.cpp
index cf24563f069e..056c3bc16cab 100644
--- a/audio/lmms/files/patch-plugins_organic_organic.cpp
+++ b/audio/lmms/files/patch-plugins_organic_organic.cpp
@@ -1,5 +1,5 @@
---- plugins/organic/organic.cpp 2011-07-02 13:14:01.000000000 +0000
-+++ plugins/organic/organic.cpp.new 2011-09-28 09:55:59.000000000 +0000
+--- plugins/organic/organic.cpp.orig 2015-03-08 02:47:14 UTC
++++ plugins/organic/organic.cpp
@@ -41,6 +41,9 @@
#include "embed.cpp"
@@ -8,5 +8,5 @@
+#define log2f(x) (logf(x) / logf(2))
+#endif
- extern "C"
- {
+
+
diff --git a/audio/lmms/files/patch-plugins_sf2__player_sf2__player.cpp b/audio/lmms/files/patch-plugins_sf2__player_sf2__player.cpp
new file mode 100644
index 000000000000..757cb2ddfeed
--- /dev/null
+++ b/audio/lmms/files/patch-plugins_sf2__player_sf2__player.cpp
@@ -0,0 +1,13 @@
+--- plugins/sf2_player/sf2_player.cpp.orig 2015-03-08 02:47:14 UTC
++++ plugins/sf2_player/sf2_player.cpp
+@@ -23,6 +23,10 @@
+ *
+ */
+
++#include <math.h>
++#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
++ #define log2(x) ( log (x) * (1./M_LN2) )
++#endif
+ #include <QtCore/QDebug>
+ #include <QtGui/QLayout>
+ #include <QtGui/QLabel>
diff --git a/audio/lmms/files/patch-plugins_sf2_player_sf2_player.cpp b/audio/lmms/files/patch-plugins_sf2_player_sf2_player.cpp
deleted file mode 100644
index 8ac4af5f8dab..000000000000
--- a/audio/lmms/files/patch-plugins_sf2_player_sf2_player.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- plugins/sf2_player/sf2_player.cpp.orig 2011-07-02 13:14:01.000000000 +0000
-+++ plugins/sf2_player/sf2_player.cpp 2011-09-29 12:18:02.000000000 +0000
-@@ -23,6 +23,10 @@
- *
- */
-
-+#include <math.h>
-+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
-+ #define log2(x) ( log (x) * (1./M_LN2) )
-+#endif
- #include <QtCore/QDebug>
- #include <QtCore/QTextStream>
- #include <QtGui/QLayout>
diff --git a/audio/maplay/files/patch-Makefile b/audio/maplay/files/patch-Makefile
index 2b8bd0fe7c96..7c121ece4f73 100644
--- a/audio/maplay/files/patch-Makefile
+++ b/audio/maplay/files/patch-Makefile
@@ -1,47 +1,27 @@
-*** Makefile.orig Thu Jun 23 21:14:46 1994
---- Makefile Thu Dec 9 06:09:27 1999
-***************
-*** 27,33 ****
- #
-
-
-! CFLAGS = $(COMPILERFLAGS)
- # debugging: -ggdb -DDEBUG
- # profiling: -pg (gprof) or -p (prof)
- # strip command has to be removed for debugging or profiling
---- 27,33 ----
- #
-
-
-! CFLAGS += $(COMPILERFLAGS)
- # debugging: -ggdb -DDEBUG
- # profiling: -pg (gprof) or -p (prof)
- # strip command has to be removed for debugging or profiling
-***************
-*** 39,52 ****
-
- .SUFFIXES: .cc
-
-! install:
- @./configuration.sh
-
-- all: maplay
--
- maplay: $(OBJS)
- $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm
-- -strip $@
-
- .cc.o:
- $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@
---- 39,49 ----
-
- .SUFFIXES: .cc
-
-! all:
- @./configuration.sh
-
- maplay: $(OBJS)
- $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm
-
- .cc.o:
- $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@
+--- Makefile.orig 1994-06-23 12:14:46 UTC
++++ Makefile
+@@ -27,7 +27,7 @@
+ #
+
+
+-CFLAGS = $(COMPILERFLAGS)
++CFLAGS += $(COMPILERFLAGS)
+ # debugging: -ggdb -DDEBUG
+ # profiling: -pg (gprof) or -p (prof)
+ # strip command has to be removed for debugging or profiling
+@@ -39,14 +39,11 @@ OBJS = maplay.o ibitstream.o header.o sc
+
+ .SUFFIXES: .cc
+
+-install:
++all:
+ @./configuration.sh
+
+-all: maplay
+-
+ maplay: $(OBJS)
+ $(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm
+- -strip $@
+
+ .cc.o:
+ $(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@
diff --git a/audio/maplay/files/patch-all.h b/audio/maplay/files/patch-all.h
index 05e126e58b21..65eb467c28e3 100644
--- a/audio/maplay/files/patch-all.h
+++ b/audio/maplay/files/patch-all.h
@@ -1,19 +1,11 @@
-*** all.h.orig Thu Jun 23 21:14:39 1994
---- all.h Thu Dec 9 05:32:18 1999
-***************
-*** 22,28 ****
- #define ALL_H
-
- typedef float real; // float should be enough
-! typedef short bool;
- typedef unsigned uint32; // 32 Bit unsigned integer
- // some compilers may need "typedef unsigned long uint32" instead
- typedef int int32; // 32 Bit signed integer
---- 22,28 ----
- #define ALL_H
-
- typedef float real; // float should be enough
-! typedef short boolean;
- typedef unsigned uint32; // 32 Bit unsigned integer
- // some compilers may need "typedef unsigned long uint32" instead
- typedef int int32; // 32 Bit signed integer
+--- all.h.orig 1994-06-23 12:14:39 UTC
++++ all.h
+@@ -22,7 +22,7 @@
+ #define ALL_H
+
+ typedef float real; // float should be enough
+-typedef short bool;
++typedef short boolean;
+ typedef unsigned uint32; // 32 Bit unsigned integer
+ // some compilers may need "typedef unsigned long uint32" instead
+ typedef int int32; // 32 Bit signed integer
diff --git a/audio/maplay/files/patch-configuration.sh b/audio/maplay/files/patch-configuration.sh
index c60df37ab9b4..413230ebe0b9 100644
--- a/audio/maplay/files/patch-configuration.sh
+++ b/audio/maplay/files/patch-configuration.sh
@@ -1,32 +1,25 @@
-*** configuration.sh.orig Thu Jun 23 21:14:46 1994
---- configuration.sh Thu Dec 9 05:21:02 1999
-***************
-*** 72,77 ****
---- 72,87 ----
- INCLUDEDIRS=
- LIBRARIES=
- AUDIO_INCLUDES='#include <sys/audioio.h>' ;;
-+ FreeBSD*)
-+ COMPILER='${CXX}'
-+ if [ ${ARCH} = "i386" ]; then
-+ COMPILERFLAGS='-DLINUX -DDAMN_INTEL_BYTE_ORDER'
-+ else
-+ COMPILERFLAGS='-DLINUX'
-+ fi
-+ INCLUDEDIRS=
-+ LIBRARIES=
-+ AUDIO_INCLUDES='#include <sys/soundcard.h>' ;;
- Linux*)
- COMPILER=g++
- COMPILERFLAGS='-O2 -m486 -funroll-loops -DLINUX -DDAMN_INTEL_BYTE_ORDER'
-***************
-*** 95,98 ****
- echo $AUDIO_INCLUDES >audio_includes.h
- fi
-
-! make all
---- 105,108 ----
- echo $AUDIO_INCLUDES >audio_includes.h
- fi
-
-! make maplay
+--- configuration.sh.orig 1994-06-23 12:14:46 UTC
++++ configuration.sh
+@@ -72,6 +72,16 @@ case `uname -sr` in
+ INCLUDEDIRS=
+ LIBRARIES=
+ AUDIO_INCLUDES='#include <sys/audioio.h>' ;;
++ FreeBSD*)
++ COMPILER='${CXX}'
++ if [ ${ARCH} = "i386" ]; then
++ COMPILERFLAGS='-DLINUX -DDAMN_INTEL_BYTE_ORDER'
++ else
++ COMPILERFLAGS='-DLINUX'
++ fi
++ INCLUDEDIRS=
++ LIBRARIES=
++ AUDIO_INCLUDES='#include <sys/soundcard.h>' ;;
+ Linux*)
+ COMPILER=g++
+ COMPILERFLAGS='-O2 -m486 -funroll-loops -DLINUX -DDAMN_INTEL_BYTE_ORDER'
+@@ -95,4 +105,4 @@ if [ ! -f audio_includes.h ]; then
+ echo $AUDIO_INCLUDES >audio_includes.h
+ fi
+
+-make all
++make maplay
diff --git a/audio/maplay/files/patch-crc.cc b/audio/maplay/files/patch-crc.cc
index 909f2e3255b0..a696e814000e 100644
--- a/audio/maplay/files/patch-crc.cc
+++ b/audio/maplay/files/patch-crc.cc
@@ -1,5 +1,5 @@
---- crc.cc.orig Thu Nov 21 16:44:18 2002
-+++ crc.cc Thu Nov 21 16:44:30 2002
+--- crc.cc.orig 1994-06-23 12:14:35 UTC
++++ crc.cc
@@ -18,7 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include "crc.h"
-@@ -32,7 +32,7 @@
+@@ -32,7 +32,7 @@ void Crc16::add_bits (uint32 bitstring,
#ifdef DEBUG
if (!length)
{
diff --git a/audio/maplay/files/patch-header.cc b/audio/maplay/files/patch-header.cc
index cf3ef91f6e41..2aa843b5a4fe 100644
--- a/audio/maplay/files/patch-header.cc
+++ b/audio/maplay/files/patch-header.cc
@@ -1,5 +1,5 @@
---- header.cc.orig Thu Jun 23 22:14:35 1994
-+++ header.cc Thu Nov 21 16:42:47 2002
+--- header.cc.orig 1994-06-23 12:14:35 UTC
++++ header.cc
@@ -20,15 +20,15 @@
/*
@@ -29,7 +29,7 @@
{
uint32 headerstring;
-@@ -45,41 +45,41 @@
+@@ -45,41 +45,41 @@ bool Header::read_header (Ibitstream *st
if ((headerstring & 0xFFF80000) != 0xFFF80000)
{
@@ -81,7 +81,7 @@
exit (1);
}
h_padding_bit = (headerstring >> 9) & 1;
-@@ -90,7 +90,7 @@
+@@ -90,7 +90,7 @@ bool Header::read_header (Ibitstream *st
h_mode != single_channel) ||
(h_bitrate_index >= 11 && h_mode == single_channel))
{
@@ -90,7 +90,7 @@
" mode: " << mode_string ()
<< "\n bitrate: " << bitrate_string () << '\n';
exit (1);
-@@ -161,7 +161,7 @@
+@@ -161,7 +161,7 @@ uint32 Header::calculate_framesize ()
static const int32 bitrates_layer_2[15] = {
0 /*free format*/, 32000, 48000, 56000, 64000, 80000, 96000,
112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000 };
diff --git a/audio/maplay/files/patch-header.h b/audio/maplay/files/patch-header.h
index 342deecaf589..be0a83a8c978 100644
--- a/audio/maplay/files/patch-header.h
+++ b/audio/maplay/files/patch-header.h
@@ -1,61 +1,36 @@
-*** header.h.orig Thu Jun 23 21:14:40 1994
---- header.h Thu Dec 9 05:45:44 1999
-***************
-*** 39,45 ****
- e_mode h_mode;
- e_sample_frequency h_sample_frequency;
- uint32 h_number_of_subbands, h_intensity_stereo_bound;
-! bool h_copyright, h_original;
- Crc16 *crc;
- uint16 checksum;
-
---- 39,45 ----
- e_mode h_mode;
- e_sample_frequency h_sample_frequency;
- uint32 h_number_of_subbands, h_intensity_stereo_bound;
-! boolean h_copyright, h_original;
- Crc16 *crc;
- uint16 checksum;
-
-***************
-*** 48,54 ****
- public:
- Header (void) { crc = (Crc16 *)0; }
- ~Header (void) { if (crc) delete crc; }
-! bool read_header (Ibitstream *, Crc16 **);
- // read a 32-bit header from the bitstream
-
- // functions to query header contents:
---- 48,54 ----
- public:
- Header (void) { crc = (Crc16 *)0; }
- ~Header (void) { if (crc) delete crc; }
-! boolean read_header (Ibitstream *, Crc16 **);
- // read a 32-bit header from the bitstream
-
- // functions to query header contents:
-***************
-*** 58,68 ****
- uint32 frequency (void) { return frequencies[h_sample_frequency]; }
- static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; }
- e_mode mode (void) { return h_mode; };
-! bool checksums (void) { return !h_protection_bit; }
-! bool copyright (void) { return h_copyright; }
-! bool original (void) { return h_original; }
-
-! bool checksum_ok (void) { return checksum == crc->checksum (); }
- // compares computed checksum with stream checksum
-
- // functions which return header informations as strings:
---- 58,68 ----
- uint32 frequency (void) { return frequencies[h_sample_frequency]; }
- static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; }
- e_mode mode (void) { return h_mode; };
-! boolean checksums (void) { return !h_protection_bit; }
-! boolean copyright (void) { return h_copyright; }
-! boolean original (void) { return h_original; }
-
-! boolean checksum_ok (void) { return checksum == crc->checksum (); }
- // compares computed checksum with stream checksum
-
- // functions which return header informations as strings:
+--- header.h.orig 1994-06-23 12:14:40 UTC
++++ header.h
+@@ -39,7 +39,7 @@ class Header
+ e_mode h_mode;
+ e_sample_frequency h_sample_frequency;
+ uint32 h_number_of_subbands, h_intensity_stereo_bound;
+- bool h_copyright, h_original;
++ boolean h_copyright, h_original;
+ Crc16 *crc;
+ uint16 checksum;
+
+@@ -48,7 +48,7 @@ class Header
+ public:
+ Header (void) { crc = (Crc16 *)0; }
+ ~Header (void) { if (crc) delete crc; }
+- bool read_header (Ibitstream *, Crc16 **);
++ boolean read_header (Ibitstream *, Crc16 **);
+ // read a 32-bit header from the bitstream
+
+ // functions to query header contents:
+@@ -58,11 +58,11 @@ public:
+ uint32 frequency (void) { return frequencies[h_sample_frequency]; }
+ static uint32 frequency (e_sample_frequency rate) { return frequencies[rate]; }
+ e_mode mode (void) { return h_mode; };
+- bool checksums (void) { return !h_protection_bit; }
+- bool copyright (void) { return h_copyright; }
+- bool original (void) { return h_original; }
++ boolean checksums (void) { return !h_protection_bit; }
++ boolean copyright (void) { return h_copyright; }
++ boolean original (void) { return h_original; }
+
+- bool checksum_ok (void) { return checksum == crc->checksum (); }
++ boolean checksum_ok (void) { return checksum == crc->checksum (); }
+ // compares computed checksum with stream checksum
+
+ // functions which return header informations as strings:
diff --git a/audio/maplay/files/patch-ibitstream.cc b/audio/maplay/files/patch-ibitstream.cc
index 39e9a19b65cf..b025c7d07328 100644
--- a/audio/maplay/files/patch-ibitstream.cc
+++ b/audio/maplay/files/patch-ibitstream.cc
@@ -1,5 +1,5 @@
---- ibitstream.cc.orig Thu Jun 23 22:14:35 1994
-+++ ibitstream.cc Thu Nov 21 16:41:11 2002
+--- ibitstream.cc.orig 1994-06-23 12:14:35 UTC
++++ ibitstream.cc
@@ -29,7 +29,7 @@
#include <unistd.h>
#include <errno.h>
@@ -9,7 +9,7 @@
#include "all.h"
#include "ibitstream.h"
-@@ -50,7 +50,7 @@
+@@ -50,7 +50,7 @@ Ibitstream::Ibitstream (const char *file
{
if ((fd = open (filename, O_RDONLY, 0)) < 0)
{
@@ -18,7 +18,7 @@
exit (1);
}
wordpointer = buffer;
-@@ -64,7 +64,7 @@
+@@ -64,7 +64,7 @@ Ibitstream::~Ibitstream (void) // des
}
@@ -27,7 +27,7 @@
{
int readvalue;
-@@ -102,13 +102,13 @@
+@@ -102,13 +102,13 @@ bool Ibitstream::get_header (uint32 *hea
}
@@ -43,7 +43,7 @@
exit (1);
}
-@@ -170,7 +170,7 @@
+@@ -170,7 +170,7 @@ uint32 Ibitstream::get_bits (uint32 numb
#ifdef DEBUG
if (number_of_bits < 1 || number_of_bits > 16)
{
@@ -52,7 +52,7 @@
exit (1);
}
#endif
-@@ -184,7 +184,7 @@
+@@ -184,7 +184,7 @@ uint32 Ibitstream::get_bits (uint32 numb
bitindex = 0;
if ((char *)++wordpointer > (char *)buffer + framesize)
{
@@ -61,7 +61,7 @@
exit (1);
}
}
-@@ -197,7 +197,7 @@
+@@ -197,7 +197,7 @@ uint32 Ibitstream::get_bits (uint32 numb
*(int16 *)&returnvalue = *((int16 *)wordpointer + 1);
if ((char *)++wordpointer > (char *)buffer + framesize)
{
@@ -70,7 +70,7 @@
exit (1);
}
*((int16 *)&returnvalue + 1) = *(int16 *)wordpointer;
-@@ -205,7 +205,7 @@
+@@ -205,7 +205,7 @@ uint32 Ibitstream::get_bits (uint32 numb
*((int16 *)&returnvalue + 1) = *(int16 *)wordpointer;
if ((char *)++wordpointer > (char *)buffer + framesize)
{
diff --git a/audio/maplay/files/patch-ibitstream.h b/audio/maplay/files/patch-ibitstream.h
index fb92627bd6e6..8da2fbf03bb9 100644
--- a/audio/maplay/files/patch-ibitstream.h
+++ b/audio/maplay/files/patch-ibitstream.h
@@ -1,25 +1,15 @@
-*** ibitstream.h.orig Thu Jun 23 21:14:40 1994
---- ibitstream.h Thu Dec 9 05:32:18 1999
-***************
-*** 43,52 ****
- ~Ibitstream (void);
- int filedescriptor (void) { return fd; };
-
-! bool get_header (uint32 *);
- // get next 32 bits from bitstream in an unsigned int,
- // returned value False => end of stream
-! bool read_frame (uint32 bytesize);
- // fill buffer with data from bitstream, returned value False => end of stream
- uint32 get_bits (uint32 number_of_bits);
- // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits
---- 43,52 ----
- ~Ibitstream (void);
- int filedescriptor (void) { return fd; };
-
-! boolean get_header (uint32 *);
- // get next 32 bits from bitstream in an unsigned int,
- // returned value False => end of stream
-! boolean read_frame (uint32 bytesize);
- // fill buffer with data from bitstream, returned value False => end of stream
- uint32 get_bits (uint32 number_of_bits);
- // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits
+--- ibitstream.h.orig 1994-06-23 12:14:40 UTC
++++ ibitstream.h
+@@ -43,10 +43,10 @@ public:
+ ~Ibitstream (void);
+ int filedescriptor (void) { return fd; };
+
+- bool get_header (uint32 *);
++ boolean get_header (uint32 *);
+ // get next 32 bits from bitstream in an unsigned int,
+ // returned value False => end of stream
+- bool read_frame (uint32 bytesize);
++ boolean read_frame (uint32 bytesize);
+ // fill buffer with data from bitstream, returned value False => end of stream
+ uint32 get_bits (uint32 number_of_bits);
+ // read bits (1 <= number_of_bits <= 16) from buffer into the lower bits
diff --git a/audio/maplay/files/patch-maplay.cc b/audio/maplay/files/patch-maplay.cc
index efc0b0d38535..e42a69af4179 100644
--- a/audio/maplay/files/patch-maplay.cc
+++ b/audio/maplay/files/patch-maplay.cc
@@ -1,5 +1,5 @@
---- maplay.cc.orig 1994-06-23 08:14:36.000000000 -0400
-+++ maplay.cc 2014-07-27 09:22:27.000000000 -0400
+--- maplay.cc.orig 1994-06-23 12:14:36 UTC
++++ maplay.cc
@@ -39,8 +39,8 @@
#include <stdlib.h>
#include <string.h>
@@ -34,7 +34,7 @@
static real scalefactor;
// data extracted from header of first frame:
-@@ -90,15 +89,15 @@
+@@ -90,15 +89,15 @@ static void Exit (int returncode)
}
@@ -53,7 +53,7 @@
<< " [-v] [-s] [-l] [-r] "
#ifdef SPARC
"[-us] [-uh] "
-@@ -146,6 +145,9 @@
+@@ -146,6 +145,9 @@ usage:
#ifdef Solaris
"SPARC Solaris 2.x"
#else
@@ -63,7 +63,7 @@
#ifdef LINUX
"Linux"
#else
-@@ -159,6 +161,7 @@
+@@ -159,6 +161,7 @@ usage:
#endif
#endif
#endif
@@ -71,7 +71,7 @@
" version)\n"
"@(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de)\n"
"@(#) Berlin University of Technology\n"
-@@ -216,7 +219,7 @@
+@@ -216,7 +219,7 @@ usage:
case 'f':
if (++i == argc)
{
@@ -80,7 +80,7 @@
exit (1);
}
use_own_scalefactor = True;
-@@ -243,7 +246,7 @@
+@@ -243,7 +246,7 @@ usage:
header = new Header;
if (!header->read_header (stream, &crc))
{
@@ -89,7 +89,7 @@
Exit (1);
}
-@@ -328,7 +331,7 @@
+@@ -328,7 +331,7 @@ usage:
// }
//#else
{
@@ -98,7 +98,7 @@
"Please use the stdout mode.\n";
Exit (0);
}
-@@ -345,22 +348,22 @@
+@@ -345,22 +348,22 @@ usage:
++name;
else
name = filename;
@@ -129,7 +129,7 @@
}
do
-@@ -371,20 +374,20 @@
+@@ -371,20 +374,20 @@ usage:
{
// layer switching is allowed
if (verbose_mode)
@@ -153,7 +153,7 @@
Exit (1);
}
-@@ -423,7 +426,7 @@
+@@ -423,7 +426,7 @@ usage:
}
else
{
@@ -162,7 +162,7 @@
Exit (0);
}
-@@ -463,7 +466,7 @@
+@@ -463,7 +466,7 @@ usage:
}
else
// Sh*t! Wrong crc checksum in frame!
@@ -171,7 +171,7 @@
for (i = 0; i < header->number_of_subbands (); ++i)
delete subbands[i];
-@@ -481,18 +484,18 @@
+@@ -481,18 +484,18 @@ usage:
// check whether (one of) the filter(s) produced values not in [-1.0, 1.0]:
if (range_violations)
{
@@ -197,7 +197,7 @@
}
}
if (verbose_mode)
-@@ -502,13 +505,13 @@
+@@ -502,13 +505,13 @@ usage:
uint32 minutes = (uint32)(playtime / 60.0);
uint32 seconds = (uint32)playtime - minutes * 60;
uint32 centiseconds = (uint32)((playtime - (real)(minutes * 60) - (real)seconds) * 100.0);
diff --git a/audio/maplay/files/patch-obuffer.cc b/audio/maplay/files/patch-obuffer.cc
index 84acbef6212f..e1beded33c34 100644
--- a/audio/maplay/files/patch-obuffer.cc
+++ b/audio/maplay/files/patch-obuffer.cc
@@ -1,5 +1,5 @@
---- obuffer.cc.orig Mon Jun 27 21:14:03 1994
-+++ obuffer.cc Thu Nov 21 16:45:14 2002
+--- obuffer.cc.orig 1994-06-27 11:14:03 UTC
++++ obuffer.cc
@@ -47,7 +47,7 @@
#include <unistd.h>
#include <fcntl.h>
@@ -9,7 +9,7 @@
#include "obuffer.h"
#include "header.h"
#ifdef ULAW
-@@ -65,14 +65,14 @@
+@@ -65,14 +65,14 @@ FileObuffer::FileObuffer (uint32 number_
#ifdef DEBUG
if (!number_of_channels || number_of_channels > MAXCHANNELS)
{
@@ -26,7 +26,7 @@
#endif
channels = number_of_channels;
for (int i = 0; i < number_of_channels; ++i)
-@@ -85,12 +85,12 @@
+@@ -85,12 +85,12 @@ void FileObuffer::append (uint32 channel
#ifdef DEBUG
if (channel >= channels)
{
@@ -41,7 +41,7 @@
exit (1);
}
#endif
-@@ -143,7 +143,7 @@
+@@ -143,7 +143,7 @@ IndigoObuffer::IndigoObuffer (uint32 num
#ifdef DEBUG
if (!number_of_channels || number_of_channels > MAXCHANNELS)
{
@@ -50,7 +50,7 @@
exit (1);
}
#endif
-@@ -155,7 +155,7 @@
+@@ -155,7 +155,7 @@ IndigoObuffer::IndigoObuffer (uint32 num
ALconfig config;
if (!(config = ALnewconfig ()))
{
@@ -59,7 +59,7 @@
exit (1);
}
ALsetwidth (config, AL_SAMPLE_16);
-@@ -165,7 +165,7 @@
+@@ -165,7 +165,7 @@ IndigoObuffer::IndigoObuffer (uint32 num
ALsetchannels (config, AL_STEREO);
if (!(port = ALopenport ("MPEG audio player", "w", config)))
{
@@ -68,7 +68,7 @@
exit (1);
}
-@@ -190,12 +190,12 @@
+@@ -190,12 +190,12 @@ void IndigoObuffer::append (uint32 chann
#ifdef DEBUG
if (channel >= channels)
{
@@ -83,7 +83,7 @@
exit (1);
}
#endif
-@@ -217,17 +217,17 @@
+@@ -217,17 +217,17 @@ void IndigoObuffer::write_buffer (int)
int SparcObuffer::audio_fd = -1;
#ifdef ULAW
@@ -104,7 +104,7 @@
exit (1);
}
#endif
-@@ -235,7 +235,7 @@
+@@ -235,7 +235,7 @@ SparcObuffer::SparcObuffer (uint32 numbe
if (audio_fd < 0)
{
@@ -113,7 +113,7 @@
"by SparcObuffer::class_suitable()!\n";
exit (1);
}
-@@ -296,7 +296,7 @@
+@@ -296,7 +296,7 @@ void SparcObuffer::append (uint32 channe
#ifdef DEBUG
if (bufferp - buffer >= OBUFFERSIZE >> 1)
{
@@ -122,7 +122,7 @@
exit (1);
}
#endif
-@@ -307,12 +307,12 @@
+@@ -307,12 +307,12 @@ void SparcObuffer::append (uint32 channe
#ifdef DEBUG
if (channel >= channels)
{
@@ -137,7 +137,7 @@
exit (1);
}
#endif
-@@ -351,7 +351,7 @@
+@@ -351,7 +351,7 @@ int SparcObuffer::open_audio_device (voi
if ((fd = open ("/dev/audio", O_WRONLY | O_NDELAY, 0)) < 0)
if (errno == EBUSY)
{
@@ -146,7 +146,7 @@
exit (1);
}
else
-@@ -398,7 +398,7 @@
+@@ -398,7 +398,7 @@ int SparcObuffer::get_device_type (int f
}
return devtype;
#else
@@ -155,7 +155,7 @@
return -1;
#endif
}
-@@ -406,15 +406,15 @@
+@@ -406,15 +406,15 @@ int SparcObuffer::get_device_type (int f
#ifdef ULAW
@@ -174,7 +174,7 @@
"Please use the option -l or -r for stereo streams.\n";
return False;
}
-@@ -436,7 +436,7 @@
+@@ -436,7 +436,7 @@ bool SparcObuffer::class_suitable (void)
return True;
else if (!strcmp (devtype.name, "SUNW,dbri"))
{
@@ -183,7 +183,7 @@
"but this binary was compiled for 8 kHz u-law ouput. (telephone quality)\n"
"Please recompile it without the ULAW define in COMPILERFLAGS.\n"
"(or use the -amd option to use this binary with low-quality output)\n";
-@@ -448,7 +448,7 @@
+@@ -448,7 +448,7 @@ bool SparcObuffer::class_suitable (void)
return True;
else if (!strcmp (devtype.name, "SUNW,am79c30"))
{
@@ -192,7 +192,7 @@
"but this binary was compiled for CD-quality output.\n"
"Please recompile it with ULAW defined in COMPILERFLAGS\n"
"or use it in stdout mode as an decoder only.\n";
-@@ -464,7 +464,7 @@
+@@ -464,7 +464,7 @@ bool SparcObuffer::class_suitable (void)
# ifdef ULAW
return True;
# else
@@ -201,7 +201,7 @@
"but this binary was compiled for CD-quality output.\n"
"Please recompile it with ULAW defined in COMPILERFLAGS\n"
"or use it in stdout mode as an decoder only.\n";
-@@ -479,7 +479,7 @@
+@@ -479,7 +479,7 @@ bool SparcObuffer::class_suitable (void)
return True;
else if (device_type == AUDIO_DEV_SPEAKERBOX)
{
@@ -210,7 +210,7 @@
"but this binary was compiled for 8 kHz u-law ouput. (telephone quality)\n"
"Please recompile it without the ULAW define in COMPILERFLAGS.\n"
"(or use the -amd option to use this binary with low-quality output)\n";
-@@ -491,7 +491,7 @@
+@@ -491,7 +491,7 @@ bool SparcObuffer::class_suitable (void)
return True;
else if (device_type == AUDIO_DEV_AMD)
{
@@ -219,7 +219,7 @@
"but this binary was compiled for CD-quality output.\n"
"Please recompile it with ULAW defined in COMPILERFLAGS\n"
"or use it in stdout mode as an decoder only.\n";
-@@ -504,7 +504,7 @@
+@@ -504,7 +504,7 @@ bool SparcObuffer::class_suitable (void)
#ifndef SunOS4_1_1
close (audio_fd);
@@ -228,7 +228,7 @@
# ifdef ULAW
"Please try the -amd option or use the stdout mode.\n";
# else
-@@ -527,7 +527,7 @@
+@@ -527,7 +527,7 @@ int LinuxObuffer::open_audio_device (voi
if ((fd = open ("/dev/dsp", O_WRONLY | O_NDELAY, 0)) < 0)
if (errno == EBUSY)
{
@@ -237,7 +237,7 @@
exit (1);
}
else
-@@ -537,6 +537,7 @@
+@@ -537,6 +537,7 @@ int LinuxObuffer::open_audio_device (voi
}
// turn NDELAY mode off:
@@ -245,7 +245,7 @@
int flags;
if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
{
-@@ -549,6 +550,7 @@
+@@ -549,6 +550,7 @@ int LinuxObuffer::open_audio_device (voi
perror ("fcntl F_SETFL on /dev/audio failed");
exit (1);
}
@@ -253,7 +253,7 @@
return fd;
}
-@@ -558,7 +560,7 @@
+@@ -558,7 +560,7 @@ LinuxObuffer::LinuxObuffer (uint32 numbe
#ifdef DEBUG
if (!number_of_channels || number_of_channels > MAXCHANNELS)
{
@@ -262,7 +262,7 @@
exit (1);
}
#endif
-@@ -568,7 +570,7 @@
+@@ -568,7 +570,7 @@ LinuxObuffer::LinuxObuffer (uint32 numbe
if (audio_fd < 0)
{
@@ -271,7 +271,7 @@
"by LinuxObuffer::class_suitable()!\n";
exit (1);
}
-@@ -602,12 +604,12 @@
+@@ -602,12 +604,12 @@ void LinuxObuffer::append (uint32 channe
#ifdef DEBUG
if (channel >= channels)
{
@@ -286,7 +286,7 @@
exit (1);
}
#endif
-@@ -629,7 +631,7 @@
+@@ -629,7 +631,7 @@ void LinuxObuffer::write_buffer (int)
}
diff --git a/audio/maplay/files/patch-obuffer.h b/audio/maplay/files/patch-obuffer.h
index 01a70fbd3c55..7362f7a22b40 100644
--- a/audio/maplay/files/patch-obuffer.h
+++ b/audio/maplay/files/patch-obuffer.h
@@ -1,5 +1,5 @@
---- obuffer.h.orig Thu Jun 23 22:14:40 1994
-+++ obuffer.h Thu Nov 21 16:35:11 2002
+--- obuffer.h.orig 1994-06-23 12:14:40 UTC
++++ obuffer.h
@@ -27,7 +27,7 @@
#ifndef OBUFFER_H
#define OBUFFER_H
@@ -9,7 +9,7 @@
#include <unistd.h>
#include <stdlib.h>
#include "all.h"
-@@ -123,20 +123,20 @@
+@@ -123,20 +123,20 @@ private:
public:
#ifdef ULAW
@@ -34,7 +34,7 @@
// returnvalue == False: no 16-bit output possible (class unsuitable)
#endif
};
-@@ -159,7 +159,7 @@
+@@ -159,7 +159,7 @@ public:
void append (uint32 channel, int16 value);
void write_buffer (int dummy);
diff --git a/audio/maplay/files/patch-subband.h b/audio/maplay/files/patch-subband.h
index cca6875c8c00..a54ee49a9ba4 100644
--- a/audio/maplay/files/patch-subband.h
+++ b/audio/maplay/files/patch-subband.h
@@ -1,21 +1,13 @@
-*** subband.h.orig Thu Jun 23 21:14:40 1994
---- subband.h Thu Dec 9 05:45:45 1999
-***************
-*** 35,42 ****
- public:
- virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0;
- virtual void read_scalefactor (Ibitstream *, Header *) = 0;
-! virtual bool read_sampledata (Ibitstream *) = 0;
-! virtual bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
- };
-
- #endif
---- 35,42 ----
- public:
- virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0;
- virtual void read_scalefactor (Ibitstream *, Header *) = 0;
-! virtual boolean read_sampledata (Ibitstream *) = 0;
-! virtual boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
- };
-
- #endif
+--- subband.h.orig 1994-06-23 12:14:40 UTC
++++ subband.h
+@@ -35,8 +35,8 @@ class Subband
+ public:
+ virtual void read_allocation (Ibitstream *, Header *, Crc16 *) = 0;
+ virtual void read_scalefactor (Ibitstream *, Header *) = 0;
+- virtual bool read_sampledata (Ibitstream *) = 0;
+- virtual bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
++ virtual boolean read_sampledata (Ibitstream *) = 0;
++ virtual boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *) = 0;
+ };
+
+ #endif
diff --git a/audio/maplay/files/patch-subband__layer__1.cc b/audio/maplay/files/patch-subband__layer__1.cc
new file mode 100644
index 000000000000..330b8fb14a98
--- /dev/null
+++ b/audio/maplay/files/patch-subband__layer__1.cc
@@ -0,0 +1,127 @@
+--- subband_layer_1.cc.orig 1994-06-23 12:14:36 UTC
++++ subband_layer_1.cc
+@@ -67,7 +67,7 @@ SubbandLayer1::SubbandLayer1 (uint32 sub
+ void SubbandLayer1::read_allocation (Ibitstream *stream, Header *, Crc16 *crc)
+ {
+ if ((allocation = stream->get_bits (4)) == 15)
+- cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
++ std::cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
+ if (crc)
+ crc->add_bits (allocation, 4);
+ if (allocation)
+@@ -86,14 +86,14 @@ void SubbandLayer1::read_scalefactor (Ib
+ }
+
+
+-bool SubbandLayer1::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer1::read_sampledata (Ibitstream *stream)
+ {
+ if (allocation)
+ {
+ sample = real (stream->get_bits (samplelength));
+ #ifdef DEBUG
+ if (sample == (1 << samplelength) - 1)
+- cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
++ std::cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
+ #endif
+ }
+ if (++samplenumber == 12)
+@@ -105,7 +105,7 @@ bool SubbandLayer1::read_sampledata (Ibi
+ }
+
+
+-bool SubbandLayer1::put_next_sample (e_channels channels,
++boolean SubbandLayer1::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *)
+ {
+ if (allocation && channels != right)
+@@ -113,7 +113,7 @@ bool SubbandLayer1::put_next_sample (e_c
+ register real scaled_sample = (sample * factor + offset) * scalefactor;
+ #ifdef DEBUG
+ if (scaled_sample < -1.0 || scaled_sample > 1.0)
+- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
++ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ // this should never occur
+ #endif
+ filter1->input_sample (scaled_sample, subbandnumber);
+@@ -142,7 +142,7 @@ void SubbandLayer1IntensityStereo::read_
+ }
+
+
+-bool SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
++boolean SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+ if (allocation)
+@@ -154,7 +154,7 @@ bool SubbandLayer1IntensityStereo::put_n
+ sample2 = sample * channel2_scalefactor;
+ #ifdef DEBUG
+ if (sample1 < -1.0 || sample1 > 1.0 || sample2 < -1.0 || sample2 > 1.0)
+- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
++ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ // this should never occur
+ #endif
+ filter1->input_sample (sample1, subbandnumber);
+@@ -165,7 +165,7 @@ bool SubbandLayer1IntensityStereo::put_n
+ register real sample1 = sample * scalefactor;
+ #ifdef DEBUG
+ if (sample1 < -1.0 || sample1 > 1.0)
+- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
++ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ // this should never occur
+ #endif
+ filter1->input_sample (sample1, subbandnumber);
+@@ -175,7 +175,7 @@ bool SubbandLayer1IntensityStereo::put_n
+ register real sample2 = sample * channel2_scalefactor;
+ #ifdef DEBUG
+ if (sample2 < -1.0 || sample2 > 1.0)
+- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
++ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ // this should never occur
+ #endif
+ filter1->input_sample (sample2, subbandnumber);
+@@ -206,7 +206,7 @@ void SubbandLayer1Stereo::read_allocatio
+ crc->add_bits (channel2_allocation, 4);
+ }
+ if (allocation == 15 || channel2_allocation == 15)
+- cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
++ std::cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
+ if (allocation)
+ {
+ samplelength = allocation + 1;
+@@ -231,22 +231,22 @@ void SubbandLayer1Stereo::read_scalefact
+ }
+
+
+-bool SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
+ {
+- bool returnvalue = SubbandLayer1::read_sampledata (stream);
++ boolean returnvalue = SubbandLayer1::read_sampledata (stream);
+ if (channel2_allocation)
+ {
+ channel2_sample = real (stream->get_bits (channel2_samplelength));
+ #ifdef DEBUG
+ if (channel2_sample == (1 << channel2_samplelength) - 1)
+- cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
++ std::cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
+ #endif
+ }
+ return returnvalue;
+ }
+
+
+-bool SubbandLayer1Stereo::put_next_sample (e_channels channels,
++boolean SubbandLayer1Stereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+ SubbandLayer1::put_next_sample (channels, filter1, filter2);
+@@ -256,7 +256,7 @@ bool SubbandLayer1Stereo::put_next_sampl
+ channel2_scalefactor;
+ #ifdef DEBUG
+ if (sample2 < -1.0 || sample2 > 1.0)
+- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
++ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
+ // this should never occur
+ #endif
+ if (channels == both)
diff --git a/audio/maplay/files/patch-subband__layer__1.h b/audio/maplay/files/patch-subband__layer__1.h
new file mode 100644
index 000000000000..81f58632fabf
--- /dev/null
+++ b/audio/maplay/files/patch-subband__layer__1.h
@@ -0,0 +1,38 @@
+--- subband_layer_1.h.orig 1994-06-23 12:14:40 UTC
++++ subband_layer_1.h
+@@ -42,8 +42,8 @@ public:
+ SubbandLayer1 (uint32 subbandnumber);
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+
+@@ -60,11 +60,11 @@ public:
+ SubbandLayer1::read_allocation (stream, header, crc);
+ }
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *stream)
++ boolean read_sampledata (Ibitstream *stream)
+ {
+ return SubbandLayer1::read_sampledata (stream);
+ }
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+
+@@ -82,8 +82,8 @@ public:
+ SubbandLayer1Stereo (uint32 subbandnumber);
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+ #endif
diff --git a/audio/maplay/files/patch-subband__layer__2.cc b/audio/maplay/files/patch-subband__layer__2.cc
new file mode 100644
index 000000000000..e0ad1297cde8
--- /dev/null
+++ b/audio/maplay/files/patch-subband__layer__2.cc
@@ -0,0 +1,54 @@
+--- subband_layer_2.cc.orig 1994-06-23 12:14:36 UTC
++++ subband_layer_2.cc
+@@ -591,7 +591,7 @@ void SubbandLayer2::read_scalefactor (Ib
+ }
+
+
+-bool SubbandLayer2::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer2::read_sampledata (Ibitstream *stream)
+ {
+ if (allocation)
+ if (groupingtable)
+@@ -633,7 +633,7 @@ bool SubbandLayer2::read_sampledata (Ibi
+ }
+
+
+-bool SubbandLayer2::put_next_sample (e_channels channels,
++boolean SubbandLayer2::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *)
+ {
+ #ifdef DEBUG
+@@ -726,7 +726,7 @@ void SubbandLayer2IntensityStereo::read_
+ }
+
+
+-bool SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
++boolean SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+ #ifdef DEBUG
+@@ -880,9 +880,9 @@ void SubbandLayer2Stereo::read_scalefact
+ }
+
+
+-bool SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
++boolean SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
+ {
+- bool returnvalue = SubbandLayer2::read_sampledata (stream);
++ boolean returnvalue = SubbandLayer2::read_sampledata (stream);
+
+ if (channel2_allocation)
+ if (channel2_groupingtable)
+@@ -919,10 +919,10 @@ bool SubbandLayer2Stereo::read_sampledat
+ }
+
+
+-bool SubbandLayer2Stereo::put_next_sample (e_channels channels,
++boolean SubbandLayer2Stereo::put_next_sample (e_channels channels,
+ SynthesisFilter *filter1, SynthesisFilter *filter2)
+ {
+- bool returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
++ boolean returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
+ if (channel2_allocation && channels != left)
+ {
+ register real sample = channel2_samples[samplenumber - 1];
diff --git a/audio/maplay/files/patch-subband__layer__2.h b/audio/maplay/files/patch-subband__layer__2.h
new file mode 100644
index 000000000000..b1ee79319de7
--- /dev/null
+++ b/audio/maplay/files/patch-subband__layer__2.h
@@ -0,0 +1,47 @@
+--- subband_layer_2.h.orig 1994-06-23 12:14:40 UTC
++++ subband_layer_2.h
+@@ -55,8 +55,8 @@ public:
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ virtual void read_scalefactor_selection (Ibitstream *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
+ };
+
+
+@@ -75,11 +75,11 @@ public:
+ }
+ void read_scalefactor_selection (Ibitstream *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *stream)
++ boolean read_sampledata (Ibitstream *stream)
+ {
+ return SubbandLayer2::read_sampledata (stream);
+ }
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+
+@@ -90,7 +90,7 @@ protected:
+ uint32 channel2_allocation;
+ uint32 channel2_scfsi;
+ real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
+- bool channel2_grouping;
++ boolean channel2_grouping;
+ uint32 channel2_codelength;
+ const real *channel2_groupingtable;
+ real channel2_factor;
+@@ -102,8 +102,8 @@ public:
+ void read_allocation (Ibitstream *, Header *, Crc16 *);
+ void read_scalefactor_selection (Ibitstream *, Crc16 *);
+ void read_scalefactor (Ibitstream *, Header *);
+- bool read_sampledata (Ibitstream *);
+- bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
++ boolean read_sampledata (Ibitstream *);
++ boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
+ };
+
+ #endif
diff --git a/audio/maplay/files/patch-subband_layer_1.cc b/audio/maplay/files/patch-subband_layer_1.cc
deleted file mode 100644
index aab7048c5e04..000000000000
--- a/audio/maplay/files/patch-subband_layer_1.cc
+++ /dev/null
@@ -1,127 +0,0 @@
---- subband_layer_1.cc.orig Thu Jun 23 22:14:36 1994
-+++ subband_layer_1.cc Thu Nov 21 16:43:38 2002
-@@ -67,7 +67,7 @@
- void SubbandLayer1::read_allocation (Ibitstream *stream, Header *, Crc16 *crc)
- {
- if ((allocation = stream->get_bits (4)) == 15)
-- cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
-+ std::cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
- if (crc)
- crc->add_bits (allocation, 4);
- if (allocation)
-@@ -86,14 +86,14 @@
- }
-
-
--bool SubbandLayer1::read_sampledata (Ibitstream *stream)
-+boolean SubbandLayer1::read_sampledata (Ibitstream *stream)
- {
- if (allocation)
- {
- sample = real (stream->get_bits (samplelength));
- #ifdef DEBUG
- if (sample == (1 << samplelength) - 1)
-- cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
-+ std::cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
- #endif
- }
- if (++samplenumber == 12)
-@@ -105,7 +105,7 @@
- }
-
-
--bool SubbandLayer1::put_next_sample (e_channels channels,
-+boolean SubbandLayer1::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *)
- {
- if (allocation && channels != right)
-@@ -113,7 +113,7 @@
- register real scaled_sample = (sample * factor + offset) * scalefactor;
- #ifdef DEBUG
- if (scaled_sample < -1.0 || scaled_sample > 1.0)
-- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
-+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
- // this should never occur
- #endif
- filter1->input_sample (scaled_sample, subbandnumber);
-@@ -142,7 +142,7 @@
- }
-
-
--bool SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
-+boolean SubbandLayer1IntensityStereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- if (allocation)
-@@ -154,7 +154,7 @@
- sample2 = sample * channel2_scalefactor;
- #ifdef DEBUG
- if (sample1 < -1.0 || sample1 > 1.0 || sample2 < -1.0 || sample2 > 1.0)
-- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
-+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
- // this should never occur
- #endif
- filter1->input_sample (sample1, subbandnumber);
-@@ -165,7 +165,7 @@
- register real sample1 = sample * scalefactor;
- #ifdef DEBUG
- if (sample1 < -1.0 || sample1 > 1.0)
-- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
-+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
- // this should never occur
- #endif
- filter1->input_sample (sample1, subbandnumber);
-@@ -175,7 +175,7 @@
- register real sample2 = sample * channel2_scalefactor;
- #ifdef DEBUG
- if (sample2 < -1.0 || sample2 > 1.0)
-- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
-+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
- // this should never occur
- #endif
- filter1->input_sample (sample2, subbandnumber);
-@@ -206,7 +206,7 @@
- crc->add_bits (channel2_allocation, 4);
- }
- if (allocation == 15 || channel2_allocation == 15)
-- cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
-+ std::cerr << "WARNING: stream contains an illegal allocation!\n"; // MPEG-stream is corrupted!
- if (allocation)
- {
- samplelength = allocation + 1;
-@@ -231,22 +231,22 @@
- }
-
-
--bool SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
-+boolean SubbandLayer1Stereo::read_sampledata (Ibitstream *stream)
- {
-- bool returnvalue = SubbandLayer1::read_sampledata (stream);
-+ boolean returnvalue = SubbandLayer1::read_sampledata (stream);
- if (channel2_allocation)
- {
- channel2_sample = real (stream->get_bits (channel2_samplelength));
- #ifdef DEBUG
- if (channel2_sample == (1 << channel2_samplelength) - 1)
-- cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
-+ std::cerr << "WARNING: stream contains an illegal subband sample!\n"; // MPEG-stream is corrupted!
- #endif
- }
- return returnvalue;
- }
-
-
--bool SubbandLayer1Stereo::put_next_sample (e_channels channels,
-+boolean SubbandLayer1Stereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- SubbandLayer1::put_next_sample (channels, filter1, filter2);
-@@ -256,7 +256,7 @@
- channel2_scalefactor;
- #ifdef DEBUG
- if (sample2 < -1.0 || sample2 > 1.0)
-- cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
-+ std::cerr << "WARNING: rescaled subband sample is not in [-1.0, 1.0]\n";
- // this should never occur
- #endif
- if (channels == both)
diff --git a/audio/maplay/files/patch-subband_layer_1.h b/audio/maplay/files/patch-subband_layer_1.h
deleted file mode 100644
index d92c2f421598..000000000000
--- a/audio/maplay/files/patch-subband_layer_1.h
+++ /dev/null
@@ -1,65 +0,0 @@
-*** subband_layer_1.h.orig Thu Jun 23 21:14:40 1994
---- subband_layer_1.h Thu Dec 9 05:32:19 1999
-***************
-*** 42,49 ****
- SubbandLayer1 (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
---- 42,49 ----
- SubbandLayer1 (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
-***************
-*** 60,70 ****
- SubbandLayer1::read_allocation (stream, header, crc);
- }
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer1::read_sampledata (stream);
- }
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
---- 60,70 ----
- SubbandLayer1::read_allocation (stream, header, crc);
- }
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer1::read_sampledata (stream);
- }
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
-***************
-*** 82,89 ****
- SubbandLayer1Stereo (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
---- 82,89 ----
- SubbandLayer1Stereo (uint32 subbandnumber);
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
diff --git a/audio/maplay/files/patch-subband_layer_2.cc b/audio/maplay/files/patch-subband_layer_2.cc
deleted file mode 100644
index b30d8ad479a6..000000000000
--- a/audio/maplay/files/patch-subband_layer_2.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-*** subband_layer_2.cc.orig Thu Jun 23 21:14:36 1994
---- subband_layer_2.cc Thu Dec 9 05:32:19 1999
-***************
-*** 591,597 ****
- }
-
-
-! bool SubbandLayer2::read_sampledata (Ibitstream *stream)
- {
- if (allocation)
- if (groupingtable)
---- 591,597 ----
- }
-
-
-! boolean SubbandLayer2::read_sampledata (Ibitstream *stream)
- {
- if (allocation)
- if (groupingtable)
-***************
-*** 633,639 ****
- }
-
-
-! bool SubbandLayer2::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *)
- {
- #ifdef DEBUG
---- 633,639 ----
- }
-
-
-! boolean SubbandLayer2::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *)
- {
- #ifdef DEBUG
-***************
-*** 726,732 ****
- }
-
-
-! bool SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- #ifdef DEBUG
---- 726,732 ----
- }
-
-
-! boolean SubbandLayer2IntensityStereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
- #ifdef DEBUG
-***************
-*** 880,888 ****
- }
-
-
-! bool SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
- {
-! bool returnvalue = SubbandLayer2::read_sampledata (stream);
-
- if (channel2_allocation)
- if (channel2_groupingtable)
---- 880,888 ----
- }
-
-
-! boolean SubbandLayer2Stereo::read_sampledata (Ibitstream *stream)
- {
-! boolean returnvalue = SubbandLayer2::read_sampledata (stream);
-
- if (channel2_allocation)
- if (channel2_groupingtable)
-***************
-*** 919,928 ****
- }
-
-
-! bool SubbandLayer2Stereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
-! bool returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
- if (channel2_allocation && channels != left)
- {
- register real sample = channel2_samples[samplenumber - 1];
---- 919,928 ----
- }
-
-
-! boolean SubbandLayer2Stereo::put_next_sample (e_channels channels,
- SynthesisFilter *filter1, SynthesisFilter *filter2)
- {
-! boolean returnvalue = SubbandLayer2::put_next_sample (channels, filter1, filter2);
- if (channel2_allocation && channels != left)
- {
- register real sample = channel2_samples[samplenumber - 1];
diff --git a/audio/maplay/files/patch-subband_layer_2.h b/audio/maplay/files/patch-subband_layer_2.h
deleted file mode 100644
index 313ab9b2c1fb..000000000000
--- a/audio/maplay/files/patch-subband_layer_2.h
+++ /dev/null
@@ -1,82 +0,0 @@
-*** subband_layer_2.h.orig Thu Jun 23 21:14:40 1994
---- subband_layer_2.h Thu Dec 9 05:32:19 1999
-***************
-*** 55,62 ****
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- virtual void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
- };
-
-
---- 55,62 ----
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- virtual void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter * = NULL);
- };
-
-
-***************
-*** 75,85 ****
- }
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer2::read_sampledata (stream);
- }
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
---- 75,85 ----
- }
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *stream)
- {
- return SubbandLayer2::read_sampledata (stream);
- }
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
-
-***************
-*** 90,96 ****
- uint32 channel2_allocation;
- uint32 channel2_scfsi;
- real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
-! bool channel2_grouping;
- uint32 channel2_codelength;
- const real *channel2_groupingtable;
- real channel2_factor;
---- 90,96 ----
- uint32 channel2_allocation;
- uint32 channel2_scfsi;
- real channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
-! boolean channel2_grouping;
- uint32 channel2_codelength;
- const real *channel2_groupingtable;
- real channel2_factor;
-***************
-*** 102,109 ****
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! bool read_sampledata (Ibitstream *);
-! bool put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
---- 102,109 ----
- void read_allocation (Ibitstream *, Header *, Crc16 *);
- void read_scalefactor_selection (Ibitstream *, Crc16 *);
- void read_scalefactor (Ibitstream *, Header *);
-! boolean read_sampledata (Ibitstream *);
-! boolean put_next_sample (e_channels, SynthesisFilter *, SynthesisFilter *);
- };
-
- #endif
diff --git a/audio/maplay/files/patch-synthesis__filter.h b/audio/maplay/files/patch-synthesis__filter.h
new file mode 100644
index 000000000000..652fe31d9165
--- /dev/null
+++ b/audio/maplay/files/patch-synthesis__filter.h
@@ -0,0 +1,11 @@
+--- synthesis_filter.h.orig 1994-06-23 12:14:40 UTC
++++ synthesis_filter.h
+@@ -21,7 +21,7 @@
+ #ifndef SYNTHESIS_FILTER_H
+ #define SYNTHESIS_FILTER_H
+
+-#include <iostream.h>
++#include <iostream>
+ #include "all.h"
+ #include "obuffer.h"
+
diff --git a/audio/maplay/files/patch-synthesis_filter.h b/audio/maplay/files/patch-synthesis_filter.h
deleted file mode 100644
index c1b8c8599468..000000000000
--- a/audio/maplay/files/patch-synthesis_filter.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- synthesis_filter.h.orig Thu Nov 21 16:36:03 2002
-+++ synthesis_filter.h Thu Nov 21 16:36:10 2002
-@@ -21,7 +21,7 @@
- #ifndef SYNTHESIS_FILTER_H
- #define SYNTHESIS_FILTER_H
-
--#include <iostream.h>
-+#include <iostream>
- #include "all.h"
- #include "obuffer.h"
-
diff --git a/audio/mcplay/files/patch-Makefile b/audio/mcplay/files/patch-Makefile
index dadec7782965..91961e4c703c 100644
--- a/audio/mcplay/files/patch-Makefile
+++ b/audio/mcplay/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig 2002-04-28 06:30:35.000000000 -0700
-+++ Makefile 2010-03-19 11:07:59.000000000 -0700
-@@ -13,7 +13,7 @@
+--- Makefile.orig 2002-04-28 13:30:35 UTC
++++ Makefile
+@@ -13,7 +13,7 @@ OGG_CFLAGS=-DHAVE_OGG123
SOX_CFLAGS=-DHAVE_SOX
#uncomment _one_ of these for midi support
@@ -9,7 +9,7 @@
#MID_CFLAGS=-DHAVE_PLAYMIDI
#uncomment these two lines if you have lirc
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,7 @@ MID_CFLAGS=-DHAVE_DRVMIDI
#LOG_CFLAGS=-DLOG_DIR_S=\"/tmp\"
#set install dirs here
@@ -18,7 +18,7 @@
BINDIR=$(INSTDIR)/bin
#####################################################################
-@@ -33,7 +33,7 @@
+@@ -33,7 +33,7 @@ BINDIR=$(INSTDIR)/bin
PROGNAME=mcplay
VERSION=0.3i
DISTDIR=$(PROGNAME)-$(VERSION)
@@ -27,7 +27,7 @@
TARGET=mcplay
OBJECTS=mcplay.o \
screen.o \
-@@ -48,7 +48,7 @@
+@@ -48,7 +48,7 @@ OBJECTS=mcplay.o \
DATA=Makefile COPYING
@@ -36,7 +36,7 @@
MY_LFLAGS=
PLAYER_CFLAGS=$(MPG_CFLAGS) $(OGG_CFLAGS) $(SOX_CFLAGS) $(MID_CFLAGS)
-@@ -60,7 +60,7 @@
+@@ -60,7 +60,7 @@ GLIB_LFLAGS=`glib-config --libs`
NCURSES_CFLAGS=
NCURSES_LFLAGS=-lncurses
diff --git a/audio/mcplay/files/patch-config.h b/audio/mcplay/files/patch-config.h
index 0998714164a8..ca194f078485 100644
--- a/audio/mcplay/files/patch-config.h
+++ b/audio/mcplay/files/patch-config.h
@@ -1,5 +1,5 @@
---- config.h.orig 2010-03-18 18:48:31.000000000 -0700
-+++ config.h 2010-03-18 18:50:27.000000000 -0700
+--- config.h.orig 2002-04-28 13:30:35 UTC
++++ config.h
@@ -26,7 +26,7 @@
#define LOGFILE_S LOGDIR_S""G_DIR_SEPARATOR_S""PROGNAME_S".log"
diff --git a/audio/mcplay/files/patch-mixer.c b/audio/mcplay/files/patch-mixer.c
index 11cf95d42422..30c695988f0c 100644
--- a/audio/mcplay/files/patch-mixer.c
+++ b/audio/mcplay/files/patch-mixer.c
@@ -1,5 +1,5 @@
---- mixer.c.orig 2010-03-18 18:58:51.000000000 -0700
-+++ mixer.c 2010-03-18 18:59:10.000000000 -0700
+--- mixer.c.orig 2002-04-28 13:30:35 UTC
++++ mixer.c
@@ -7,7 +7,7 @@
#include <fcntl.h>
#include <unistd.h>
diff --git a/audio/mcplay/files/patch-screen.c b/audio/mcplay/files/patch-screen.c
index 1f2b07a71c6a..9b84f4a9cbd7 100644
--- a/audio/mcplay/files/patch-screen.c
+++ b/audio/mcplay/files/patch-screen.c
@@ -1,6 +1,6 @@
---- screen.c.orig 2010-03-18 19:50:01.000000000 -0700
-+++ screen.c 2010-03-18 19:54:07.000000000 -0700
-@@ -275,9 +275,13 @@
+--- screen.c.orig 2002-04-28 13:30:35 UTC
++++ screen.c
+@@ -275,9 +275,13 @@ void screen_message( ScreenData *data, g
gchar *tmp, *str;
va_start(az, fmt);
diff --git a/audio/milkytracker/files/patch-src__tracker__TrackerStartUp.cpp b/audio/milkytracker/files/patch-src__tracker__TrackerStartUp.cpp
deleted file mode 100644
index 2bc37e7da334..000000000000
--- a/audio/milkytracker/files/patch-src__tracker__TrackerStartUp.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/tracker/TrackerStartUp.cpp.orig 2013-11-09 01:12:01.000000000 +0100
-+++ src/tracker/TrackerStartUp.cpp 2016-04-03 21:14:18.976681000 +0200
-@@ -126,7 +126,7 @@ void Tracker::showSplash()
- screen->paintSplash(LogoBig::rawData, LogoBig::width, LogoBig::height, LogoBig::width*3, 3, (int)shade);
- #endif
- shade+=deltaT * (1.0f/6.25f);
-- deltaT = abs(::PPGetTickCount() - startTime);
-+ deltaT = abs((pp_int32)::PPGetTickCount() - startTime);
- if (!deltaT) deltaT++;
- }
- #if defined(__EXCLUDE_BIGLOGO__) || defined(__LOWRES__)
-@@ -157,7 +157,7 @@ void Tracker::hideSplash()
- screen->paintSplash(LogoBig::rawData, LogoBig::width, LogoBig::height, LogoBig::width*3, 3, (int)shade);
- #endif
- shade-=deltaT * (1.0f/6.25f);
-- deltaT = abs(::PPGetTickCount() - startTime);
-+ deltaT = abs((pp_int32)::PPGetTickCount() - startTime);
- if (!deltaT) deltaT++;
- }
- screen->clear();
diff --git a/audio/milkytracker/files/patch-src_tracker_TrackerStartUp.cpp b/audio/milkytracker/files/patch-src_tracker_TrackerStartUp.cpp
new file mode 100644
index 000000000000..deb1346b297e
--- /dev/null
+++ b/audio/milkytracker/files/patch-src_tracker_TrackerStartUp.cpp
@@ -0,0 +1,20 @@
+--- src/tracker/TrackerStartUp.cpp.orig 2013-11-09 00:12:01 UTC
++++ src/tracker/TrackerStartUp.cpp
+@@ -126,7 +126,7 @@ void Tracker::showSplash()
+ screen->paintSplash(LogoBig::rawData, LogoBig::width, LogoBig::height, LogoBig::width*3, 3, (int)shade);
+ #endif
+ shade+=deltaT * (1.0f/6.25f);
+- deltaT = abs(::PPGetTickCount() - startTime);
++ deltaT = abs((pp_int32)::PPGetTickCount() - startTime);
+ if (!deltaT) deltaT++;
+ }
+ #if defined(__EXCLUDE_BIGLOGO__) || defined(__LOWRES__)
+@@ -157,7 +157,7 @@ void Tracker::hideSplash()
+ screen->paintSplash(LogoBig::rawData, LogoBig::width, LogoBig::height, LogoBig::width*3, 3, (int)shade);
+ #endif
+ shade-=deltaT * (1.0f/6.25f);
+- deltaT = abs(::PPGetTickCount() - startTime);
++ deltaT = abs((pp_int32)::PPGetTickCount() - startTime);
+ if (!deltaT) deltaT++;
+ }
+ screen->clear();
diff --git a/audio/minitunes/files/patch-src-collectionscanner.h b/audio/minitunes/files/patch-src-collectionscanner.h
deleted file mode 100644
index 443a2568e2c8..000000000000
--- a/audio/minitunes/files/patch-src-collectionscanner.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/collectionscanner.h.orig 2010-07-05 18:02:28.000000000 +0800
-+++ src/collectionscanner.h 2010-07-06 16:08:43.000000000 +0800
-@@ -6,8 +6,8 @@
- #include "model/album.h"
-
- // TagLib
--#include "fileref.h"
--#include "tag.h"
-+#include "taglib/fileref.h"
-+#include "taglib/tag.h"
-
- class Tags {
-
diff --git a/audio/minitunes/files/patch-src_collectionscanner.h b/audio/minitunes/files/patch-src_collectionscanner.h
new file mode 100644
index 000000000000..e4b6ce5a1b70
--- /dev/null
+++ b/audio/minitunes/files/patch-src_collectionscanner.h
@@ -0,0 +1,13 @@
+--- src/collectionscanner.h.orig 2010-07-13 10:30:19 UTC
++++ src/collectionscanner.h
+@@ -6,8 +6,8 @@
+ #include "model/album.h"
+
+ // TagLib
+-#include "fileref.h"
+-#include "tag.h"
++#include "taglib/fileref.h"
++#include "taglib/tag.h"
+
+ class Tags {
+
diff --git a/audio/minitunes/files/patch-src_qtsingleapplication_qtlocalpeer.cpp b/audio/minitunes/files/patch-src_qtsingleapplication_qtlocalpeer.cpp
index 6c85ff0415fd..ebc0830d30d9 100644
--- a/audio/minitunes/files/patch-src_qtsingleapplication_qtlocalpeer.cpp
+++ b/audio/minitunes/files/patch-src_qtsingleapplication_qtlocalpeer.cpp
@@ -1,4 +1,4 @@
---- src/qtsingleapplication/qtlocalpeer.cpp.orig 2010-07-13 10:30:19.000000000 +0000
+--- src/qtsingleapplication/qtlocalpeer.cpp.orig 2010-07-13 10:30:19 UTC
+++ src/qtsingleapplication/qtlocalpeer.cpp
@@ -56,6 +56,7 @@ typedef BOOL(WINAPI*PProcessIdToSessionI
static PProcessIdToSessionId pProcessIdToSessionId = 0;
diff --git a/audio/mixer.app/files/patch-Mixer.cc b/audio/mixer.app/files/patch-Mixer.cc
index 8f1e32f14cb4..371baac8fb35 100644
--- a/audio/mixer.app/files/patch-Mixer.cc
+++ b/audio/mixer.app/files/patch-Mixer.cc
@@ -1,5 +1,5 @@
---- Mixer.cc.orig Sun Sep 15 18:42:33 2002
-+++ Mixer.cc Tue Apr 29 01:43:01 2003
+--- Mixer.cc.orig 2002-09-15 16:42:33 UTC
++++ Mixer.cc
@@ -33,8 +33,6 @@
#if defined(__Linux__)
diff --git a/audio/mixmos/files/patch-src__mixer.h b/audio/mixmos/files/patch-src__mixer.h
deleted file mode 100644
index da743376a0cb..000000000000
--- a/audio/mixmos/files/patch-src__mixer.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/mixer.h.orig Sat Jul 24 13:16:52 2004
-+++ src/mixer.h Sat Jul 24 13:17:30 2004
-@@ -23,7 +23,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
--#include <linux/soundcard.h>
-+#include <sys/soundcard.h>
- #include <sys/ioctl.h>
- #include <unistd.h>
- #include <stdio.h>
diff --git a/audio/mixmos/files/patch-src__prefs.h b/audio/mixmos/files/patch-src__prefs.h
deleted file mode 100644
index 70d41b2d7333..000000000000
--- a/audio/mixmos/files/patch-src__prefs.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/prefs.h.orig Sat Jul 24 13:17:03 2004
-+++ src/prefs.h Sat Jul 24 13:17:16 2004
-@@ -20,7 +20,7 @@
- */
-
-
--#include <linux/soundcard.h>
-+#include <sys/soundcard.h>
-
- #define config_filename "mixmos"
-
diff --git a/audio/mixmos/files/patch-src_mixer.h b/audio/mixmos/files/patch-src_mixer.h
new file mode 100644
index 000000000000..c2c6a585e223
--- /dev/null
+++ b/audio/mixmos/files/patch-src_mixer.h
@@ -0,0 +1,11 @@
+--- src/mixer.h.orig 2003-12-14 18:23:19 UTC
++++ src/mixer.h
+@@ -23,7 +23,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-#include <linux/soundcard.h>
++#include <sys/soundcard.h>
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+ #include <stdio.h>
diff --git a/audio/mixmos/files/patch-src_prefs.h b/audio/mixmos/files/patch-src_prefs.h
new file mode 100644
index 000000000000..c455262f2f23
--- /dev/null
+++ b/audio/mixmos/files/patch-src_prefs.h
@@ -0,0 +1,11 @@
+--- src/prefs.h.orig 2003-12-14 18:23:19 UTC
++++ src/prefs.h
+@@ -20,7 +20,7 @@
+ */
+
+
+-#include <linux/soundcard.h>
++#include <sys/soundcard.h>
+
+ #define config_filename "mixmos"
+
diff --git a/audio/mixxx/files/patch-build__depends.py b/audio/mixxx/files/patch-build__depends.py
deleted file mode 100644
index e638fe61a289..000000000000
--- a/audio/mixxx/files/patch-build__depends.py
+++ /dev/null
@@ -1,113 +0,0 @@
---- build/depends.py.orig 2012-01-16 06:02:51.000000000 +0900
-+++ build/depends.py 2012-01-16 06:04:08.000000000 +0900
-@@ -150,7 +150,7 @@
-
- class Qt(Dependence):
- DEFAULT_QTDIRS = {'linux': '/usr/share/qt4',
-- 'bsd': '/usr/local/lib/qt4',
-+ 'bsd': '%%LOCALBASE%%/lib/qt4',
- 'osx': '/Library/Frameworks',
- 'windows': 'C:\\qt\\4.6.0'}
-
-@@ -219,6 +219,7 @@
- build.env.Append(LIBS = 'QtOpenGL')
- build.env.Append(LIBS = 'QtXml')
- build.env.Append(LIBS = 'QtNetwork')
-+ build.env.Append(LIBS = 'QtSql')
- build.env.Append(LIBS = 'QtScript')
- if use_qtwebkit:
- build.env.Append(LIBS = 'QtWebKit')
-@@ -264,16 +265,16 @@
-
- # Set Qt include paths for non-OSX
- if not build.platform_is_osx:
-- include_paths = ['$QTDIR/include/QtCore',
-- '$QTDIR/include/QtGui',
-- '$QTDIR/include/QtOpenGL',
-- '$QTDIR/include/QtXml',
-- '$QTDIR/include/QtNetwork',
-- '$QTDIR/include/QtSql',
-- '$QTDIR/include/QtScript',
-- '$QTDIR/include/Qt']
-+ include_paths = ['$QTDIR/include/qt4/QtCore',
-+ '$QTDIR/include/qt4/QtGui',
-+ '$QTDIR/include/qt4/QtOpenGL',
-+ '$QTDIR/include/qt4/QtXml',
-+ '$QTDIR/include/qt4/QtNetwork',
-+ '$QTDIR/include/qt4/QtSql',
-+ '$QTDIR/include/qt4/QtScript',
-+ '$QTDIR/include/qt4/Qt']
- if use_qtwebkit:
-- include_paths.append('$QTDIR/include/QtWebKit')
-+ include_paths.append('$QTDIR/include/qt4/QtWebKit')
- build.env.Append(CPPPATH=include_paths)
-
- # Set the rpath for linux/bsd/osx.
-@@ -387,7 +388,7 @@
- # the files correctly. Adding this folder ot the include path should fix
- # it, though might cause issues. This is safe to remove once we
- # deprecate Karmic support. rryan 2/2011
-- build.env.Append(CPPPATH='/usr/include/taglib/')
-+ build.env.Append(CPPPATH='%%LOCALBASE%%/include/taglib/')
-
- if build.platform_is_windows and build.static_dependencies:
- build.env.Append(CPPDEFINES = 'TAGLIB_STATIC')
-@@ -782,14 +783,9 @@
- if build.toolchain_is_gnu:
- # Default GNU Options
- # TODO(XXX) always generate debugging info?
-- build.env.Append(CCFLAGS = '-pipe')
- build.env.Append(CCFLAGS = '-Wall')
- build.env.Append(CCFLAGS = '-Wextra')
-- build.env.Append(CCFLAGS = '-g')
-
-- # Check that g++ is present (yeah, SCONS is a bit dumb here)
-- if os.system("which g++ > /dev/null"): #Checks for non-zero return code
-- raise Exception("Did not find g++.")
- elif build.toolchain_is_msvs:
- # Validate the specified winlib directory exists
- mixxx_lib_path = SCons.ARGUMENTS.get('winlib', '..\\..\\..\\mixxx-win32lib-msvc100-release')
-@@ -851,16 +847,19 @@
-
- elif build.platform_is_bsd:
- build.env.Append(CPPDEFINES='__BSD__')
-- build.env.Append(CPPPATH=['/usr/include',
-- '/usr/local/include',
-- '/usr/X11R6/include/'])
-- build.env.Append(LIBPATH=['/usr/lib/',
-- '/usr/local/lib',
-- '/usr/X11R6/lib'])
- build.env.Append(LIBS='pthread')
-+ build.env.Append(CPPPATH=['%%LOCALBASE%%/include/portaudio2',
-+ '%%LOCALBASE%%/include/qt4',
-+ '%%LOCALBASE%%/include'])
-+ build.env.Append(LIBPATH=['%%LOCALBASE%%/lib/portaudio2',
-+ '%%LOCALBASE%%/lib/qt4',
-+ '%%LOCALBASE%%/lib'])
-+ build.env.Append(LINKFLAGS=['%%LOCALBASE%%/lib/libportaudio.so',
-+ '-Wl,-rpath,%%LOCALBASE%%/lib/qt4',
-+ '-Wl,-rpath,%%LOCALBASE%%/lib'])
- # why do we need to do this on OpenBSD and not on Linux? if we
- # don't then CheckLib("vorbisfile") fails
-- build.env.Append(LIBS=['ogg', 'vorbis'])
-+ # build.env.Append(LIBS=['ogg', 'vorbis'])
-
- # Define for things that would like to special case UNIX (Linux or BSD)
- if build.platform_is_bsd or build.platform_is_linux:
-@@ -897,14 +896,14 @@
- # Say where to find resources on Unix. TODO(XXX) replace this with a
- # RESOURCE_PATH that covers Win and OSX too:
- if build.platform_is_linux or build.platform_is_bsd:
-- prefix = SCons.ARGUMENTS.get('prefix', '/usr/local')
-+ prefix = SCons.ARGUMENTS.get('prefix', '%%PREFIX%%')
- share_path = os.path.join(prefix, 'share/mixxx')
- build.env.Append(CPPDEFINES=('UNIX_SHARE_PATH', r'\"%s\"' % share_path))
- lib_path = os.path.join(prefix, 'lib/mixxx')
- build.env.Append(CPPDEFINES=('UNIX_LIB_PATH', r'\"%s\"' % lib_path))
-
- def depends(self, build):
-- return [SoundTouch, ReplayGain, PortAudio, PortMIDI, Qt,
-+ return [SoundTouch, ReplayGain, PortAudio, Qt,
- FidLib, SndFile, FLAC, OggVorbis, OpenGL, TagLib, ProtoBuf]
-
- def post_dependency_check_configure(self, build, conf):
diff --git a/audio/mixxx/files/patch-build__features.py b/audio/mixxx/files/patch-build__features.py
deleted file mode 100644
index 262fe600e5c7..000000000000
--- a/audio/mixxx/files/patch-build__features.py
+++ /dev/null
@@ -1,55 +0,0 @@
---- build/features.py.orig
-+++ build/features.py
-@@ -83,6 +83,9 @@
- elif build.platform_is_osx:
- build.env.Append(LINKFLAGS='-framework IOKit')
- build.env.Append(LINKFLAGS='-framework CoreFoundation')
-+ elif build.platform_is_bsd:
-+ conf.CheckLib(['usb', 'libusb'])
-+ conf.CheckLib(['usbhid', 'libusbhid'])
-
- build.env.Append(CPPDEFINES = '__HID__')
-
-@@ -95,7 +98,7 @@
- # Requires setupapi.lib which is included by the above check for
- # setupapi.
- sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, "windows/hid.c"))
-- elif build.platform_is_linux:
-+ elif build.platform_is_linux or build.platform_is_bsd:
- sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'linux/hid-libusb.c'))
- elif build.platform_is_osx:
- sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'mac/hid.c'))
-@@ -108,24 +111,27 @@
- def enabled(self, build):
- # For now only make Bulk default on Linux only. Turn on for all
- # platforms after the 1.11.0 release.
-- is_default = 1 if build.platform_is_linux else 0
-+ is_default = 1 if build.platform_is_linux or build.platform_is_bsd else 0
- build.flags['bulk'] = util.get_flags(build.env, 'bulk', is_default)
- if int(build.flags['bulk']):
- return True
- return False
-
- def add_options(self, build, vars):
-- is_default = 1 if build.platform_is_linux else 0
-+ is_default = 1 if build.platform_is_linux or build.platform_is_bsd else 0
- vars.Add('bulk', 'Set to 1 to enable USB Bulk controller support.', is_default)
-
- def configure(self, build, conf):
- if not self.enabled(build):
- return
-
-- build.env.ParseConfig('pkg-config libusb-1.0 --silence-errors --cflags --libs')
-- if (not conf.CheckLib(['libusb-1.0', 'usb-1.0']) or
-- not conf.CheckHeader('libusb-1.0/libusb.h')):
-- raise Exception('Did not find the libusb 1.0 development library or its header file, exiting!')
-+ if build.platform_is_linux:
-+ build.env.ParseConfig('pkg-config libusb-1.0 --silence-errors --cflags --libs')
-+ if (not conf.CheckLib(['libusb-1.0', 'usb-1.0']) or
-+ not conf.CheckHeader('libusb-1.0/libusb.h')):
-+ raise Exception('Did not find the libusb 1.0 development library or its header file, exiting!')
-+ elif build.platform_is_bsd:
-+ conf.CheckLib(['usb', 'libusb'])
-
- build.env.Append(CPPDEFINES = '__BULK__')
-
diff --git a/audio/mixxx/files/patch-build__qt4.py b/audio/mixxx/files/patch-build__qt4.py
deleted file mode 100644
index e19f9b9b3630..000000000000
--- a/audio/mixxx/files/patch-build__qt4.py
+++ /dev/null
@@ -1,13 +0,0 @@
---- build/qt4.py.orig 2011-12-24 11:53:19.000000000 +0900
-+++ build/qt4.py 2012-01-16 06:10:09.000000000 +0900
-@@ -245,8 +245,8 @@
- env.Replace(
- # QTDIR = _detect(env),
- QT4_BINPATH = os.path.join('$QTDIR', 'bin'),
-- QT4_CPPPATH = os.path.join('$QTDIR', 'include'),
-- QT4_LIBPATH = os.path.join('$QTDIR', 'lib'),
-+ QT4_CPPPATH = os.path.join('$QTDIR', 'include', 'qt4', 'Qt'),
-+ QT4_LIBPATH = os.path.join('$QTDIR', 'lib', 'qt4'),
- # TODO: This is not reliable to QTDIR value changes but needed in order to support '-qt4' variants
- QT4_MOC = locateQt4Command(env,'moc', env['QTDIR']),
- QT4_UIC = locateQt4Command(env,'uic', env['QTDIR']),
diff --git a/audio/mixxx/files/patch-build_depends.py b/audio/mixxx/files/patch-build_depends.py
new file mode 100644
index 000000000000..2125e9f8771e
--- /dev/null
+++ b/audio/mixxx/files/patch-build_depends.py
@@ -0,0 +1,113 @@
+--- build/depends.py.orig 2013-05-08 23:20:26 UTC
++++ build/depends.py
+@@ -150,7 +150,7 @@ class FLAC(Dependence):
+
+ class Qt(Dependence):
+ DEFAULT_QTDIRS = {'linux': '/usr/share/qt4',
+- 'bsd': '/usr/local/lib/qt4',
++ 'bsd': '%%LOCALBASE%%/lib/qt4',
+ 'osx': '/Library/Frameworks',
+ 'windows': 'C:\\qt\\4.6.0'}
+
+@@ -219,6 +219,7 @@ class Qt(Dependence):
+ build.env.Append(LIBS = 'QtOpenGL')
+ build.env.Append(LIBS = 'QtXml')
+ build.env.Append(LIBS = 'QtNetwork')
++ build.env.Append(LIBS = 'QtSql')
+ build.env.Append(LIBS = 'QtScript')
+ if use_qtwebkit:
+ build.env.Append(LIBS = 'QtWebKit')
+@@ -264,16 +265,16 @@ class Qt(Dependence):
+
+ # Set Qt include paths for non-OSX
+ if not build.platform_is_osx:
+- include_paths = ['$QTDIR/include/QtCore',
+- '$QTDIR/include/QtGui',
+- '$QTDIR/include/QtOpenGL',
+- '$QTDIR/include/QtXml',
+- '$QTDIR/include/QtNetwork',
+- '$QTDIR/include/QtSql',
+- '$QTDIR/include/QtScript',
+- '$QTDIR/include/Qt']
++ include_paths = ['$QTDIR/include/qt4/QtCore',
++ '$QTDIR/include/qt4/QtGui',
++ '$QTDIR/include/qt4/QtOpenGL',
++ '$QTDIR/include/qt4/QtXml',
++ '$QTDIR/include/qt4/QtNetwork',
++ '$QTDIR/include/qt4/QtSql',
++ '$QTDIR/include/qt4/QtScript',
++ '$QTDIR/include/qt4/Qt']
+ if use_qtwebkit:
+- include_paths.append('$QTDIR/include/QtWebKit')
++ include_paths.append('$QTDIR/include/qt4/QtWebKit')
+ build.env.Append(CPPPATH=include_paths)
+
+ # Set the rpath for linux/bsd/osx.
+@@ -387,7 +388,7 @@ class TagLib(Dependence):
+ # the files correctly. Adding this folder ot the include path should fix
+ # it, though might cause issues. This is safe to remove once we
+ # deprecate Karmic support. rryan 2/2011
+- build.env.Append(CPPPATH='/usr/include/taglib/')
++ build.env.Append(CPPPATH='%%LOCALBASE%%/include/taglib/')
+
+ if build.platform_is_windows and build.static_dependencies:
+ build.env.Append(CPPDEFINES = 'TAGLIB_STATIC')
+@@ -782,14 +783,9 @@ class MixxxCore(Feature):
+ if build.toolchain_is_gnu:
+ # Default GNU Options
+ # TODO(XXX) always generate debugging info?
+- build.env.Append(CCFLAGS = '-pipe')
+ build.env.Append(CCFLAGS = '-Wall')
+ build.env.Append(CCFLAGS = '-Wextra')
+- build.env.Append(CCFLAGS = '-g')
+
+- # Check that g++ is present (yeah, SCONS is a bit dumb here)
+- if os.system("which g++ > /dev/null"): #Checks for non-zero return code
+- raise Exception("Did not find g++.")
+ elif build.toolchain_is_msvs:
+ # Validate the specified winlib directory exists
+ mixxx_lib_path = SCons.ARGUMENTS.get('winlib', '..\\..\\..\\mixxx-win32lib-msvc100-release')
+@@ -851,16 +847,19 @@ class MixxxCore(Feature):
+
+ elif build.platform_is_bsd:
+ build.env.Append(CPPDEFINES='__BSD__')
+- build.env.Append(CPPPATH=['/usr/include',
+- '/usr/local/include',
+- '/usr/X11R6/include/'])
+- build.env.Append(LIBPATH=['/usr/lib/',
+- '/usr/local/lib',
+- '/usr/X11R6/lib'])
+ build.env.Append(LIBS='pthread')
++ build.env.Append(CPPPATH=['%%LOCALBASE%%/include/portaudio2',
++ '%%LOCALBASE%%/include/qt4',
++ '%%LOCALBASE%%/include'])
++ build.env.Append(LIBPATH=['%%LOCALBASE%%/lib/portaudio2',
++ '%%LOCALBASE%%/lib/qt4',
++ '%%LOCALBASE%%/lib'])
++ build.env.Append(LINKFLAGS=['%%LOCALBASE%%/lib/libportaudio.so',
++ '-Wl,-rpath,%%LOCALBASE%%/lib/qt4',
++ '-Wl,-rpath,%%LOCALBASE%%/lib'])
+ # why do we need to do this on OpenBSD and not on Linux? if we
+ # don't then CheckLib("vorbisfile") fails
+- build.env.Append(LIBS=['ogg', 'vorbis'])
++ # build.env.Append(LIBS=['ogg', 'vorbis'])
+
+ # Define for things that would like to special case UNIX (Linux or BSD)
+ if build.platform_is_bsd or build.platform_is_linux:
+@@ -897,14 +896,14 @@ class MixxxCore(Feature):
+ # Say where to find resources on Unix. TODO(XXX) replace this with a
+ # RESOURCE_PATH that covers Win and OSX too:
+ if build.platform_is_linux or build.platform_is_bsd:
+- prefix = SCons.ARGUMENTS.get('prefix', '/usr/local')
++ prefix = SCons.ARGUMENTS.get('prefix', '%%PREFIX%%')
+ share_path = os.path.join(prefix, 'share/mixxx')
+ build.env.Append(CPPDEFINES=('UNIX_SHARE_PATH', r'\"%s\"' % share_path))
+ lib_path = os.path.join(prefix, 'lib/mixxx')
+ build.env.Append(CPPDEFINES=('UNIX_LIB_PATH', r'\"%s\"' % lib_path))
+
+ def depends(self, build):
+- return [SoundTouch, ReplayGain, PortAudio, PortMIDI, Qt,
++ return [SoundTouch, ReplayGain, PortAudio, Qt,
+ FidLib, SndFile, FLAC, OggVorbis, OpenGL, TagLib, ProtoBuf]
+
+ def post_dependency_check_configure(self, build, conf):
diff --git a/audio/mixxx/files/patch-build_features.py b/audio/mixxx/files/patch-build_features.py
new file mode 100644
index 000000000000..e86985c496d3
--- /dev/null
+++ b/audio/mixxx/files/patch-build_features.py
@@ -0,0 +1,55 @@
+--- build/features.py.orig 2013-05-08 23:20:26 UTC
++++ build/features.py
+@@ -83,6 +83,9 @@ class HID(Feature):
+ elif build.platform_is_osx:
+ build.env.Append(LINKFLAGS='-framework IOKit')
+ build.env.Append(LINKFLAGS='-framework CoreFoundation')
++ elif build.platform_is_bsd:
++ conf.CheckLib(['usb', 'libusb'])
++ conf.CheckLib(['usbhid', 'libusbhid'])
+
+ build.env.Append(CPPDEFINES = '__HID__')
+
+@@ -95,7 +98,7 @@ class HID(Feature):
+ # Requires setupapi.lib which is included by the above check for
+ # setupapi.
+ sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, "windows/hid.c"))
+- elif build.platform_is_linux:
++ elif build.platform_is_linux or build.platform_is_bsd:
+ sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'linux/hid-libusb.c'))
+ elif build.platform_is_osx:
+ sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'mac/hid.c'))
+@@ -108,24 +111,27 @@ class Bulk(Feature):
+ def enabled(self, build):
+ # For now only make Bulk default on Linux only. Turn on for all
+ # platforms after the 1.11.0 release.
+- is_default = 1 if build.platform_is_linux else 0
++ is_default = 1 if build.platform_is_linux or build.platform_is_bsd else 0
+ build.flags['bulk'] = util.get_flags(build.env, 'bulk', is_default)
+ if int(build.flags['bulk']):
+ return True
+ return False
+
+ def add_options(self, build, vars):
+- is_default = 1 if build.platform_is_linux else 0
++ is_default = 1 if build.platform_is_linux or build.platform_is_bsd else 0
+ vars.Add('bulk', 'Set to 1 to enable USB Bulk controller support.', is_default)
+
+ def configure(self, build, conf):
+ if not self.enabled(build):
+ return
+
+- build.env.ParseConfig('pkg-config libusb-1.0 --silence-errors --cflags --libs')
+- if (not conf.CheckLib(['libusb-1.0', 'usb-1.0']) or
+- not conf.CheckHeader('libusb-1.0/libusb.h')):
+- raise Exception('Did not find the libusb 1.0 development library or its header file, exiting!')
++ if build.platform_is_linux:
++ build.env.ParseConfig('pkg-config libusb-1.0 --silence-errors --cflags --libs')
++ if (not conf.CheckLib(['libusb-1.0', 'usb-1.0']) or
++ not conf.CheckHeader('libusb-1.0/libusb.h')):
++ raise Exception('Did not find the libusb 1.0 development library or its header file, exiting!')
++ elif build.platform_is_bsd:
++ conf.CheckLib(['usb', 'libusb'])
+
+ build.env.Append(CPPDEFINES = '__BULK__')
+
diff --git a/audio/mixxx/files/patch-build_qt4.py b/audio/mixxx/files/patch-build_qt4.py
new file mode 100644
index 000000000000..2a3ccd22bce1
--- /dev/null
+++ b/audio/mixxx/files/patch-build_qt4.py
@@ -0,0 +1,13 @@
+--- build/qt4.py.orig 2013-05-08 23:20:26 UTC
++++ build/qt4.py
+@@ -246,8 +246,8 @@ def generate(env):
+ env.Replace(
+ # QTDIR = _detect(env),
+ QT4_BINPATH = os.path.join('$QTDIR', 'bin'),
+- QT4_CPPPATH = os.path.join('$QTDIR', 'include'),
+- QT4_LIBPATH = os.path.join('$QTDIR', 'lib'),
++ QT4_CPPPATH = os.path.join('$QTDIR', 'include', 'qt4', 'Qt'),
++ QT4_LIBPATH = os.path.join('$QTDIR', 'lib', 'qt4'),
+ # TODO: This is not reliable to QTDIR value changes but needed in order to support '-qt4' variants
+ QT4_MOC = locateQt4Command(env,'moc', env['QTDIR']),
+ QT4_UIC = locateQt4Command(env,'uic', env['QTDIR']),
diff --git a/audio/mixxx/files/patch-lib__hidapi-0.8.0-pre__linux__hid-libusb.c b/audio/mixxx/files/patch-lib__hidapi-0.8.0-pre__linux__hid-libusb.c
deleted file mode 100644
index 98d89c21be99..000000000000
--- a/audio/mixxx/files/patch-lib__hidapi-0.8.0-pre__linux__hid-libusb.c
+++ /dev/null
@@ -1,42 +0,0 @@
---- lib/hidapi-0.8.0-pre/linux/hid-libusb.c.orig
-+++ lib/hidapi-0.8.0-pre/linux/hid-libusb.c
-@@ -48,6 +48,12 @@
-
- #include "hidapi.h"
-
-+#ifdef __FreeBSD__
-+#define LIBUSB_GET_STRING_DESCRIPTOR(h,i,l,d,n) libusb_get_string_descriptor_ascii(h,i,d,n)
-+#else
-+#define LIBUSB_GET_STRING_DESCRIPTOR(h,i,l,d,n) libusb_get_string_descriptor(h,i,l,d,n)
-+#endif
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-@@ -264,7 +270,7 @@
- int len;
-
- /* Get the string from libusb. */
-- len = libusb_get_string_descriptor(dev,
-+ len = LIBUSB_GET_STRING_DESCRIPTOR(dev,
- 0x0, /* String ID */
- 0x0, /* Language */
- (unsigned char*)buf,
-@@ -282,7 +288,7 @@
- int i;
-
- /* Get the string from libusb. */
-- len = libusb_get_string_descriptor(dev,
-+ len = LIBUSB_GET_STRING_DESCRIPTOR(dev,
- 0x0, /* String ID */
- 0x0, /* Language */
- (unsigned char*)buf,
-@@ -327,7 +333,7 @@
- lang = get_first_language(dev);
-
- /* Get the string from libusb. */
-- len = libusb_get_string_descriptor(dev,
-+ len = LIBUSB_GET_STRING_DESCRIPTOR(dev,
- idx,
- lang,
- (unsigned char*)buf,
diff --git a/audio/mixxx/files/patch-lib_hidapi-0.8.0-pre_linux_hid-libusb.c b/audio/mixxx/files/patch-lib_hidapi-0.8.0-pre_linux_hid-libusb.c
new file mode 100644
index 000000000000..9ef29ab1275b
--- /dev/null
+++ b/audio/mixxx/files/patch-lib_hidapi-0.8.0-pre_linux_hid-libusb.c
@@ -0,0 +1,42 @@
+--- lib/hidapi-0.8.0-pre/linux/hid-libusb.c.orig 2013-05-08 23:20:26 UTC
++++ lib/hidapi-0.8.0-pre/linux/hid-libusb.c
+@@ -48,6 +48,12 @@
+
+ #include "hidapi.h"
+
++#ifdef __FreeBSD__
++#define LIBUSB_GET_STRING_DESCRIPTOR(h,i,l,d,n) libusb_get_string_descriptor_ascii(h,i,d,n)
++#else
++#define LIBUSB_GET_STRING_DESCRIPTOR(h,i,l,d,n) libusb_get_string_descriptor(h,i,l,d,n)
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -264,7 +270,7 @@ static uint16_t get_first_language(libus
+ int len;
+
+ /* Get the string from libusb. */
+- len = libusb_get_string_descriptor(dev,
++ len = LIBUSB_GET_STRING_DESCRIPTOR(dev,
+ 0x0, /* String ID */
+ 0x0, /* Language */
+ (unsigned char*)buf,
+@@ -282,7 +288,7 @@ static int is_language_supported(libusb_
+ int i;
+
+ /* Get the string from libusb. */
+- len = libusb_get_string_descriptor(dev,
++ len = LIBUSB_GET_STRING_DESCRIPTOR(dev,
+ 0x0, /* String ID */
+ 0x0, /* Language */
+ (unsigned char*)buf,
+@@ -327,7 +333,7 @@ static wchar_t *get_usb_string(libusb_de
+ lang = get_first_language(dev);
+
+ /* Get the string from libusb. */
+- len = libusb_get_string_descriptor(dev,
++ len = LIBUSB_GET_STRING_DESCRIPTOR(dev,
+ idx,
+ lang,
+ (unsigned char*)buf,
diff --git a/audio/mixxx/files/patch-src__controllers__controllermanager.cpp b/audio/mixxx/files/patch-src__controllers__controllermanager.cpp
deleted file mode 100644
index ca6f652786c3..000000000000
--- a/audio/mixxx/files/patch-src__controllers__controllermanager.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/controllers/controllermanager.cpp.orig
-+++ src/controllers/controllermanager.cpp
-@@ -12,7 +12,10 @@
- #include "controllers/defs_controllers.h"
- #include "controllers/controllerlearningeventfilter.h"
-
-+#ifdef __PORTMIDI__
- #include "controllers/midi/portmidienumerator.h"
-+#endif
-+
- #ifdef __HSS1394__
- #include "controllers/midi/hss1394enumerator.h"
- #endif
-@@ -78,7 +81,9 @@
- m_pPresetInfoManager = new PresetInfoEnumerator(m_pConfig);
-
- // Instantiate all enumerators
-+#ifdef __PORTMIDI__
- m_enumerators.append(new PortMidiEnumerator());
-+#endif
- #ifdef __HSS1394__
- m_enumerators.append(new Hss1394Enumerator());
- #endif
diff --git a/audio/mixxx/files/patch-src__defs.h b/audio/mixxx/files/patch-src__defs.h
deleted file mode 100644
index d15e24eabc9d..000000000000
--- a/audio/mixxx/files/patch-src__defs.h
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/defs.h.orig
-+++ src/defs.h
-@@ -87,6 +87,8 @@
- #define math_min(a,b) (((a) < (b)) ? (a) : (b))
- #endif
-
-+#if !defined(__GNUC__)
-+
- // MSVC 2005/2008 needs these
- #ifndef fmax
- #define fmax math_max
-@@ -98,3 +100,5 @@
-
- #endif
-
-+#endif
-+
diff --git a/audio/mixxx/files/patch-src__recording__encodermp3.cpp b/audio/mixxx/files/patch-src__recording__encodermp3.cpp
deleted file mode 100644
index 8ce01c4d4ca7..000000000000
--- a/audio/mixxx/files/patch-src__recording__encodermp3.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/recording/encodermp3.cpp.orig 2012-06-26 05:23:37.000000000 +0900
-+++ src/recording/encodermp3.cpp 2012-08-09 09:06:21.000000000 +0900
-@@ -85,7 +85,7 @@
- */
- QStringList libnames;
- QString libname = "";
--#ifdef __LINUX__
-+#if defined(__BSD__) || defined(__LINUX__)
- libnames << "mp3lame";
- #elif __WINDOWS__
- libnames << "lame_enc.dll";
-@@ -108,7 +108,7 @@
- props->setType(DLG_WARNING);
- props->setTitle(tr("Encoder"));
- QString key = "";
--#ifdef __LINUX__
-+#if defined(__BSD__) || defined(__LINUX__)
- key = tr("<html>Mixxx cannot record or stream in MP3 without the MP3 encoder &quot;lame&quot;. Due to licensing issues, we cannot include this with Mixxx. To record or stream in MP3, you must download <b>libmp3lame</b> and install it on your system. <p>See <a href='http://mixxx.org/wiki/doku.php/internet_broadcasting#linux'>Mixxx Wiki</a> for more information. </html>");
- props->setText(key);
- #elif __WINDOWS__
diff --git a/audio/mixxx/files/patch-src__sounddeviceportaudio.cpp b/audio/mixxx/files/patch-src__sounddeviceportaudio.cpp
deleted file mode 100644
index 802c2b3a8a23..000000000000
--- a/audio/mixxx/files/patch-src__sounddeviceportaudio.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/sounddeviceportaudio.cpp.orig 2011-12-24 11:53:20.000000000 +0900
-+++ src/sounddeviceportaudio.cpp 2012-01-16 06:10:09.000000000 +0900
-@@ -182,10 +182,10 @@
- qDebug() << "Opened PortAudio stream successfully... starting";
- }
-
--#ifdef __LINUX__
-+#if defined(__BSD__) || defined(__LINUX__)
- //Attempt to dynamically load and resolve stuff in the PortAudio library
- //in order to enable RT priority with ALSA.
-- QLibrary portaudio("libportaudio.so.2");
-+ QLibrary portaudio("libportaudio.so");
- if (!portaudio.load())
- qWarning() << "Failed to dynamically load PortAudio library";
- else
diff --git a/audio/mixxx/files/patch-src__soundmanager.cpp b/audio/mixxx/files/patch-src__soundmanager.cpp
deleted file mode 100644
index 546f5462f65d..000000000000
--- a/audio/mixxx/files/patch-src__soundmanager.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/soundmanager.cpp.orig 2011-12-24 11:53:20.000000000 +0900
-+++ src/soundmanager.cpp 2012-01-16 06:10:09.000000000 +0900
-@@ -309,7 +309,7 @@
- #ifdef __PORTAUDIO__
- PaError err = paNoError;
- if (!m_paInitialized) {
--#ifdef Q_OS_LINUX
-+#if defined(__BSD__) || defined(Q_OS_LINUX)
- setJACKName();
- #endif
- err = Pa_Initialize();
-@@ -702,9 +702,9 @@
-
- void SoundManager::setJACKName() const {
- #ifdef __PORTAUDIO__
--#ifdef Q_OS_LINUX
-+#if defined(__BSD__) || defined(Q_OS_LINUX)
- typedef PaError (*SetJackClientName)(const char *name);
-- QLibrary portaudio("libportaudio.so.2");
-+ QLibrary portaudio("libportaudio.so");
- if (portaudio.load()) {
- SetJackClientName func(
- reinterpret_cast<SetJackClientName>(
diff --git a/audio/mixxx/files/patch-src__soundmanagerconfig.cpp b/audio/mixxx/files/patch-src__soundmanagerconfig.cpp
deleted file mode 100644
index 0f5246c41040..000000000000
--- a/audio/mixxx/files/patch-src__soundmanagerconfig.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/soundmanagerconfig.cpp.orig 2011-12-24 11:53:20.000000000 +0900
-+++ src/soundmanagerconfig.cpp 2012-01-16 06:10:09.000000000 +0900
-@@ -290,7 +290,7 @@
- if (flags & SoundManagerConfig::API) {
- QList<QString> apiList = soundManager->getHostAPIList();
- if (!apiList.isEmpty()) {
--#ifdef __LINUX__
-+#if defined(__BSD__) || defined(__LINUX__)
- //Check for JACK and use that if it's available, otherwise use ALSA
- if (apiList.contains(MIXXX_PORTAUDIO_JACK_STRING)) {
- m_api = MIXXX_PORTAUDIO_JACK_STRING;
diff --git a/audio/mixxx/files/patch-src__soundsourceoggvorbis.cpp b/audio/mixxx/files/patch-src__soundsourceoggvorbis.cpp
deleted file mode 100644
index 89ee7978514a..000000000000
--- a/audio/mixxx/files/patch-src__soundsourceoggvorbis.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/soundsourceoggvorbis.cpp.orig 2011-12-24 11:53:20.000000000 +0900
-+++ src/soundsourceoggvorbis.cpp 2012-01-16 06:10:09.000000000 +0900
-@@ -32,6 +32,15 @@
- #endif
- #endif
-
-+#ifdef __BSD__
-+#include <sys/endian.h>
-+#if _BYTE_ORDER == _LITTLE_ENDIAN
-+#define OV_ENDIAN_ARG 0
-+#else
-+#define OV_ENDIAN_ARG 1
-+#endif
-+#endif
-+
- #ifdef __LINUX__
- #include <endian.h>
- #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/audio/mixxx/files/patch-src__soundsourceproxy.cpp b/audio/mixxx/files/patch-src__soundsourceproxy.cpp
deleted file mode 100644
index 8809f02491dc..000000000000
--- a/audio/mixxx/files/patch-src__soundsourceproxy.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/soundsourceproxy.cpp.orig 2011-12-24 11:53:20.000000000 +0900
-+++ src/soundsourceproxy.cpp 2012-01-16 06:10:09.000000000 +0900
-@@ -84,7 +84,7 @@
- qDebug() << "Adding plugin path from commandline arg:" << pluginPath;
- pluginDirs.append(QDir(pluginPath));
- }
--#ifdef __LINUX__
-+#if defined(__BSD__) || defined(__LINUX__)
- QDir libPath(UNIX_LIB_PATH);
- if (libPath.cd("plugins") && libPath.cd("soundsource")) {
- pluginDirs.append(libPath.absolutePath());
diff --git a/audio/mixxx/files/patch-src_controllers_controllermanager.cpp b/audio/mixxx/files/patch-src_controllers_controllermanager.cpp
new file mode 100644
index 000000000000..be14f60d1d0e
--- /dev/null
+++ b/audio/mixxx/files/patch-src_controllers_controllermanager.cpp
@@ -0,0 +1,23 @@
+--- src/controllers/controllermanager.cpp.orig 2013-05-08 23:20:26 UTC
++++ src/controllers/controllermanager.cpp
+@@ -12,7 +12,10 @@
+ #include "controllers/defs_controllers.h"
+ #include "controllers/controllerlearningeventfilter.h"
+
++#ifdef __PORTMIDI__
+ #include "controllers/midi/portmidienumerator.h"
++#endif
++
+ #ifdef __HSS1394__
+ #include "controllers/midi/hss1394enumerator.h"
+ #endif
+@@ -78,7 +81,9 @@ ControllerManager::ControllerManager(Con
+ m_pPresetInfoManager = new PresetInfoEnumerator(m_pConfig);
+
+ // Instantiate all enumerators
++#ifdef __PORTMIDI__
+ m_enumerators.append(new PortMidiEnumerator());
++#endif
+ #ifdef __HSS1394__
+ m_enumerators.append(new Hss1394Enumerator());
+ #endif
diff --git a/audio/mixxx/files/patch-src_defs.h b/audio/mixxx/files/patch-src_defs.h
new file mode 100644
index 000000000000..04ef41da2eb8
--- /dev/null
+++ b/audio/mixxx/files/patch-src_defs.h
@@ -0,0 +1,17 @@
+--- src/defs.h.orig 2013-05-08 23:20:26 UTC
++++ src/defs.h
+@@ -87,6 +87,8 @@ inline double zap_denormal(double x)
+ #define math_min(a,b) (((a) < (b)) ? (a) : (b))
+ #endif
+
++#if !defined(__GNUC__)
++
+ // MSVC 2005/2008 needs these
+ #ifndef fmax
+ #define fmax math_max
+@@ -98,3 +100,5 @@ inline double zap_denormal(double x)
+
+ #endif
+
++#endif
++
diff --git a/audio/mixxx/files/patch-src_recording_encodermp3.cpp b/audio/mixxx/files/patch-src_recording_encodermp3.cpp
new file mode 100644
index 000000000000..5c4c83fd9b30
--- /dev/null
+++ b/audio/mixxx/files/patch-src_recording_encodermp3.cpp
@@ -0,0 +1,20 @@
+--- src/recording/encodermp3.cpp.orig 2013-05-08 23:20:26 UTC
++++ src/recording/encodermp3.cpp
+@@ -85,7 +85,7 @@ EncoderMp3::EncoderMp3(EngineAbstractRec
+ */
+ QStringList libnames;
+ QString libname = "";
+-#ifdef __LINUX__
++#if defined(__BSD__) || defined(__LINUX__)
+ libnames << "mp3lame";
+ #elif __WINDOWS__
+ libnames << "lame_enc.dll";
+@@ -108,7 +108,7 @@ EncoderMp3::EncoderMp3(EngineAbstractRec
+ props->setType(DLG_WARNING);
+ props->setTitle(tr("Encoder"));
+ QString key = "";
+-#ifdef __LINUX__
++#if defined(__BSD__) || defined(__LINUX__)
+ key = tr("<html>Mixxx cannot record or stream in MP3 without the MP3 encoder &quot;lame&quot;. Due to licensing issues, we cannot include this with Mixxx. To record or stream in MP3, you must download <b>libmp3lame</b> and install it on your system. <p>See <a href='http://mixxx.org/wiki/doku.php/internet_broadcasting#linux'>Mixxx Wiki</a> for more information. </html>");
+ props->setText(key);
+ #elif __WINDOWS__
diff --git a/audio/mixxx/files/patch-src_sounddeviceportaudio.cpp b/audio/mixxx/files/patch-src_sounddeviceportaudio.cpp
new file mode 100644
index 000000000000..ff34f62cef20
--- /dev/null
+++ b/audio/mixxx/files/patch-src_sounddeviceportaudio.cpp
@@ -0,0 +1,15 @@
+--- src/sounddeviceportaudio.cpp.orig 2013-05-08 23:20:26 UTC
++++ src/sounddeviceportaudio.cpp
+@@ -182,10 +182,10 @@ int SoundDevicePortAudio::open()
+ qDebug() << "Opened PortAudio stream successfully... starting";
+ }
+
+-#ifdef __LINUX__
++#if defined(__BSD__) || defined(__LINUX__)
+ //Attempt to dynamically load and resolve stuff in the PortAudio library
+ //in order to enable RT priority with ALSA.
+- QLibrary portaudio("libportaudio.so.2");
++ QLibrary portaudio("libportaudio.so");
+ if (!portaudio.load())
+ qWarning() << "Failed to dynamically load PortAudio library";
+ else
diff --git a/audio/mixxx/files/patch-src_soundmanager.cpp b/audio/mixxx/files/patch-src_soundmanager.cpp
new file mode 100644
index 000000000000..626f63cb0d0b
--- /dev/null
+++ b/audio/mixxx/files/patch-src_soundmanager.cpp
@@ -0,0 +1,23 @@
+--- src/soundmanager.cpp.orig 2013-05-08 23:20:26 UTC
++++ src/soundmanager.cpp
+@@ -234,7 +234,7 @@ void SoundManager::queryDevices() {
+ #ifdef __PORTAUDIO__
+ PaError err = paNoError;
+ if (!m_paInitialized) {
+-#ifdef Q_OS_LINUX
++#if defined(__BSD__) || defined(Q_OS_LINUX)
+ setJACKName();
+ #endif
+ err = Pa_Initialize();
+@@ -626,9 +626,9 @@ QList<AudioInput> SoundManager::register
+
+ void SoundManager::setJACKName() const {
+ #ifdef __PORTAUDIO__
+-#ifdef Q_OS_LINUX
++#if defined(__BSD__) || defined(Q_OS_LINUX)
+ typedef PaError (*SetJackClientName)(const char *name);
+- QLibrary portaudio("libportaudio.so.2");
++ QLibrary portaudio("libportaudio.so");
+ if (portaudio.load()) {
+ SetJackClientName func(
+ reinterpret_cast<SetJackClientName>(
diff --git a/audio/mixxx/files/patch-src_soundmanagerconfig.cpp b/audio/mixxx/files/patch-src_soundmanagerconfig.cpp
new file mode 100644
index 000000000000..3eb0c22cfdd8
--- /dev/null
+++ b/audio/mixxx/files/patch-src_soundmanagerconfig.cpp
@@ -0,0 +1,11 @@
+--- src/soundmanagerconfig.cpp.orig 2013-05-08 23:20:26 UTC
++++ src/soundmanagerconfig.cpp
+@@ -290,7 +290,7 @@ void SoundManagerConfig::loadDefaults(So
+ if (flags & SoundManagerConfig::API) {
+ QList<QString> apiList = soundManager->getHostAPIList();
+ if (!apiList.isEmpty()) {
+-#ifdef __LINUX__
++#if defined(__BSD__) || defined(__LINUX__)
+ //Check for JACK and use that if it's available, otherwise use ALSA
+ if (apiList.contains(MIXXX_PORTAUDIO_JACK_STRING)) {
+ m_api = MIXXX_PORTAUDIO_JACK_STRING;
diff --git a/audio/mixxx/files/patch-src_soundsourceoggvorbis.cpp b/audio/mixxx/files/patch-src_soundsourceoggvorbis.cpp
new file mode 100644
index 000000000000..5e3d66439f1b
--- /dev/null
+++ b/audio/mixxx/files/patch-src_soundsourceoggvorbis.cpp
@@ -0,0 +1,18 @@
+--- src/soundsourceoggvorbis.cpp.orig 2013-05-08 23:20:26 UTC
++++ src/soundsourceoggvorbis.cpp
+@@ -32,6 +32,15 @@
+ #endif
+ #endif
+
++#ifdef __BSD__
++#include <sys/endian.h>
++#if _BYTE_ORDER == _LITTLE_ENDIAN
++#define OV_ENDIAN_ARG 0
++#else
++#define OV_ENDIAN_ARG 1
++#endif
++#endif
++
+ #ifdef __LINUX__
+ #include <endian.h>
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/audio/mixxx/files/patch-src_soundsourceproxy.cpp b/audio/mixxx/files/patch-src_soundsourceproxy.cpp
new file mode 100644
index 000000000000..56423ca4d62b
--- /dev/null
+++ b/audio/mixxx/files/patch-src_soundsourceproxy.cpp
@@ -0,0 +1,11 @@
+--- src/soundsourceproxy.cpp.orig 2013-05-08 23:20:26 UTC
++++ src/soundsourceproxy.cpp
+@@ -84,7 +84,7 @@ void SoundSourceProxy::loadPlugins()
+ qDebug() << "Adding plugin path from commandline arg:" << pluginPath;
+ pluginDirs.append(QDir(pluginPath));
+ }
+-#ifdef __LINUX__
++#if defined(__BSD__) || defined(__LINUX__)
+ QDir libPath(UNIX_LIB_PATH);
+ if (libPath.cd("plugins") && libPath.cd("soundsource")) {
+ pluginDirs.append(libPath.absolutePath());
diff --git a/audio/modplugplay/files/patch-modplugplay.c b/audio/modplugplay/files/patch-modplugplay.c
index 42dd02e0164b..d0f512993a38 100644
--- a/audio/modplugplay/files/patch-modplugplay.c
+++ b/audio/modplugplay/files/patch-modplugplay.c
@@ -1,5 +1,5 @@
---- modplugplay.c.orig Mon Oct 6 09:33:56 2003
-+++ modplugplay.c Thu Feb 5 20:40:53 2004
+--- modplugplay.c.orig 2003-10-06 07:33:56 UTC
++++ modplugplay.c
@@ -1,8 +1,7 @@
-
/*
@@ -10,7 +10,7 @@
TODO
unlock /dev/dsp when in 'p'ause mode
-@@ -151,7 +150,7 @@
+@@ -151,7 +150,7 @@ void ansi_cursor(int visible)
void help(char *s)
{
@@ -19,7 +19,7 @@
printf("Version %s compiled on %s at %s.\n",VERSION,__DATE__,__TIME__);
printf("\n");
printf("%s: too few arguments\n",s);
-@@ -183,10 +182,10 @@
+@@ -183,10 +182,10 @@ int get_byteorder(void)
char t[sz];
int i, lit, big;
@@ -32,7 +32,7 @@
char c = ival&0xff;
ival >>= 8;
if (s[i] == c) lit++;
-@@ -250,6 +249,7 @@
+@@ -250,6 +249,7 @@ int setrelpcmvol(int newvol)
}
ioctl(mixer_fd,MIXER_WRITE(SOUND_MIXER_PCM),&newvol);
close(mixer_fd);
@@ -40,7 +40,7 @@
}
int main(int argc, char* argv[])
-@@ -257,7 +257,7 @@
+@@ -257,7 +257,7 @@ int main(int argc, char* argv[])
FILE *f;
long size;
char *d;
@@ -49,7 +49,7 @@
ModPlugFile *f2;
int len,mlen;
struct timeval tvstart;
-@@ -269,8 +269,11 @@
+@@ -269,8 +269,11 @@ int main(int argc, char* argv[])
char songname[41];
char notpaus[4];
@@ -62,7 +62,7 @@
/*
struct count_info ci;
ioctl(audio_fd,SNDCTL_DSP_GETOPTR,&ci);
-@@ -289,7 +292,6 @@
+@@ -289,7 +292,6 @@ int main(int argc, char* argv[])
int channels = 2;
int speed = 44100;
@@ -70,7 +70,7 @@
char buffer[128];
int result, nread;
struct pollfd pollfds;
-@@ -299,19 +301,10 @@
+@@ -299,19 +301,10 @@ int main(int argc, char* argv[])
int mono=0;
int bits=0;
int song;
@@ -90,7 +90,7 @@
if (get_byteorder()==0) {
format=AFMT_S16_LE;
-@@ -335,7 +328,7 @@
+@@ -335,7 +328,7 @@ int main(int argc, char* argv[])
/*
if (strstr(argv[1],"-v")) {
diff --git a/audio/mous/files/patch-contrib__ffmpeg-strip-wma__common.h b/audio/mous/files/patch-contrib_ffmpeg-strip-wma_common.h
index 74fc198e38e8..74fc198e38e8 100644
--- a/audio/mous/files/patch-contrib__ffmpeg-strip-wma__common.h
+++ b/audio/mous/files/patch-contrib_ffmpeg-strip-wma_common.h
diff --git a/audio/mp-player/files/patch-mp.c b/audio/mp-player/files/patch-mp.c
index d74b2eaeb994..251a01b0e060 100644
--- a/audio/mp-player/files/patch-mp.c
+++ b/audio/mp-player/files/patch-mp.c
@@ -1,5 +1,5 @@
---- mp.c.orig Fri Aug 26 09:59:36 2005
-+++ mp.c Fri Aug 26 09:59:57 2005
+--- mp.c.orig 2004-01-28 21:39:17 UTC
++++ mp.c
@@ -27,7 +27,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
diff --git a/audio/mp32ogg/files/patch-mp32ogg b/audio/mp32ogg/files/patch-mp32ogg
index ed119bf22716..0d404b2a8014 100644
--- a/audio/mp32ogg/files/patch-mp32ogg
+++ b/audio/mp32ogg/files/patch-mp32ogg
@@ -1,6 +1,6 @@
---- mp32ogg.orig Thu May 9 20:59:03 2002
-+++ mp32ogg Thu May 9 20:59:56 2002
-@@ -89,9 +89,9 @@
+--- mp32ogg.orig 2016-07-26 15:20:33 UTC
++++ mp32ogg
+@@ -89,9 +89,9 @@ use String::ShellQuote;
use_winamp_genres();
diff --git a/audio/mp3_check/files/patch-Makefile b/audio/mp3_check/files/patch-Makefile
index e5016201b723..57a01fd9c7b5 100644
--- a/audio/mp3_check/files/patch-Makefile
+++ b/audio/mp3_check/files/patch-Makefile
@@ -11,7 +11,7 @@
OBJS = mp3_check.o \
mp3_check_misc.o
-@@ -21,7 +21,7 @@
+@@ -21,7 +21,7 @@ trim: $(OBJS)
cat MILESTONE.INTRO
install: all
diff --git a/audio/mp3_check/files/patch-mp3__check.c b/audio/mp3_check/files/patch-mp3__check.c
new file mode 100644
index 000000000000..33aba00551ff
--- /dev/null
+++ b/audio/mp3_check/files/patch-mp3__check.c
@@ -0,0 +1,10 @@
+--- mp3_check.c.orig 2000-07-29 06:51:38 UTC
++++ mp3_check.c
+@@ -60,6 +60,7 @@ GOALS: Initially, making a higly accura
+
+ #include <errno.h>
+ #include <stdio.h>
++#include <getopt.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <getopt.h>
diff --git a/audio/mp3_check/files/patch-mp3__check__misc.c b/audio/mp3_check/files/patch-mp3__check__misc.c
new file mode 100644
index 000000000000..dbecd40c1de7
--- /dev/null
+++ b/audio/mp3_check/files/patch-mp3__check__misc.c
@@ -0,0 +1,20 @@
+--- mp3_check_misc.c.orig 2000-09-16 03:36:01 UTC
++++ mp3_check_misc.c
+@@ -11,7 +11,7 @@
+ #include "support_functions.h"
+
+ // Function prototypes go here.
+-inline int move_to_next_frame(char *possible_mp3_tag, frame_info *mp3_i, gen_info *file_info, command_flags *flags, FILE *);
++int move_to_next_frame(char *possible_mp3_tag, frame_info *mp3_i, gen_info *file_info, command_flags *flags, FILE *);
+ int get_char_from_file(FILE *, unsigned int *header_value, gen_info *file_info, command_flags *flags, char *possible_mp3_tag);
+ int scan_file(FILE *, char *filename, meta_options *flag_options, command_flags *flags);
+ int parse_args(char **argv, meta_options *flag_options, command_flags *flags);
+@@ -670,7 +670,7 @@ parse_args(argv, flag_options, flags)
+ return(PASS);
+ }
+
+-inline int
++int
+ move_to_next_frame(possible_mp3_tag, mp3_i, file_info, flags, fp)
+ char *possible_mp3_tag;
+ frame_info *mp3_i;
diff --git a/audio/mp3_check/files/patch-mp3_check.c b/audio/mp3_check/files/patch-mp3_check.c
deleted file mode 100644
index 3efd197afdc9..000000000000
--- a/audio/mp3_check/files/patch-mp3_check.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./mp3_check.c.orig 2000-07-29 08:51:38.000000000 +0200
-+++ ./mp3_check.c 2014-02-14 11:10:48.285958149 +0100
-@@ -60,6 +60,7 @@
-
- #include <errno.h>
- #include <stdio.h>
-+#include <getopt.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <getopt.h>
diff --git a/audio/mp3_check/files/patch-mp3_check_misc.c b/audio/mp3_check/files/patch-mp3_check_misc.c
deleted file mode 100644
index 95af1b4d9306..000000000000
--- a/audio/mp3_check/files/patch-mp3_check_misc.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./mp3_check_misc.c.orig 2000-09-16 05:36:01.000000000 +0200
-+++ ./mp3_check_misc.c 2014-02-14 11:10:48.287957674 +0100
-@@ -11,7 +11,7 @@
- #include "support_functions.h"
-
- // Function prototypes go here.
--inline int move_to_next_frame(char *possible_mp3_tag, frame_info *mp3_i, gen_info *file_info, command_flags *flags, FILE *);
-+int move_to_next_frame(char *possible_mp3_tag, frame_info *mp3_i, gen_info *file_info, command_flags *flags, FILE *);
- int get_char_from_file(FILE *, unsigned int *header_value, gen_info *file_info, command_flags *flags, char *possible_mp3_tag);
- int scan_file(FILE *, char *filename, meta_options *flag_options, command_flags *flags);
- int parse_args(char **argv, meta_options *flag_options, command_flags *flags);
-@@ -670,7 +670,7 @@
- return(PASS);
- }
-
--inline int
-+int
- move_to_next_frame(possible_mp3_tag, mp3_i, file_info, flags, fp)
- char *possible_mp3_tag;
- frame_info *mp3_i;
diff --git a/audio/mp3asm/files/patch-src_utils.c b/audio/mp3asm/files/patch-src_utils.c
new file mode 100644
index 000000000000..18e8a989a6d9
--- /dev/null
+++ b/audio/mp3asm/files/patch-src_utils.c
@@ -0,0 +1,10 @@
+--- src/utils.c.orig 2001-08-17 20:44:09 UTC
++++ src/utils.c
+@@ -25,6 +25,7 @@
+ #include "utils.h"
+ #include <unistd.h>
+ #include <stdio.h>
++#include <errno.h>
+
+ /*
+ * tmalloc: mallocs cleanly
diff --git a/audio/mp3asm/files/patch-utils.c b/audio/mp3asm/files/patch-utils.c
deleted file mode 100644
index a4be43497def..000000000000
--- a/audio/mp3asm/files/patch-utils.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/utils.c.orig Fri Jul 20 11:14:59 2001
-+++ src/utils.c Fri Jul 20 11:15:37 2001
-@@ -25,6 +25,7 @@
- #include "utils.h"
- #include <unistd.h>
- #include <stdio.h>
-+#include <errno.h>
-
- /*
- * tmalloc: mallocs cleanly
diff --git a/audio/mp3blaster/files/patch-src__main.cc b/audio/mp3blaster/files/patch-src__main.cc
index ba8b05bb8904..37ac6b1306ef 100644
--- a/audio/mp3blaster/files/patch-src__main.cc
+++ b/audio/mp3blaster/files/patch-src__main.cc
@@ -1,6 +1,6 @@
---- src/main.cc.orig Tue Aug 29 08:54:53 2006
-+++ src/main.cc Tue Aug 29 08:55:01 2006
-@@ -5448,7 +5448,7 @@
+--- src/main.cc.orig 2009-01-24 15:25:10 UTC
++++ src/main.cc
+@@ -5480,7 +5480,7 @@ main(int argc, char *argv[], char *envp[
{ 0, 0, 0, 0}
};
diff --git a/audio/mp3info/files/patch-Makefile b/audio/mp3info/files/patch-Makefile
index df8fae691bf5..728112309ae2 100644
--- a/audio/mp3info/files/patch-Makefile
+++ b/audio/mp3info/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig 2012-11-30 13:59:48.000000000 +0800
-+++ Makefile 2012-11-30 14:00:09.000000000 +0800
-@@ -44,8 +44,8 @@
+--- Makefile.orig 2006-11-10 00:14:11 UTC
++++ Makefile
+@@ -44,8 +44,8 @@ INSTALL = /usr/bin/install -c
STRIP = strip
LIBS = -lncurses
@@ -10,3 +10,4 @@
+CFLAGS ?= -O -pipe
all: mp3info gmp3info doc
+
diff --git a/audio/mp3lint/files/patch-Makefile.PL b/audio/mp3lint/files/patch-Makefile.PL
index 21c2b42fb508..45ffffb53e4b 100644
--- a/audio/mp3lint/files/patch-Makefile.PL
+++ b/audio/mp3lint/files/patch-Makefile.PL
@@ -1,4 +1,4 @@
---- Makefile.PL.orig 2015-04-22 12:59:15 UTC
+--- Makefile.PL.orig 2003-11-16 07:07:26 UTC
+++ Makefile.PL
@@ -124,7 +124,7 @@ sub MY::install {
my $self = shift;
diff --git a/audio/mp3plot/files/patch-src__macros.h b/audio/mp3plot/files/patch-src__macros.h
deleted file mode 100644
index 1ff355a8acbf..000000000000
--- a/audio/mp3plot/files/patch-src__macros.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/macros.h.orig 2009-04-14 11:21:18.000000000 +0900
-+++ src/macros.h 2009-05-10 02:55:54.000000000 +0900
-@@ -34,7 +34,7 @@
- // References of interest:
- // <http://sourcefrog.net/weblog/software/languages/C/unused.html>
- #ifndef UNUSED_
--# ifdef __GNUC__
-+# if (defined(__GNUC__) && __GNUC__ > 3)
- # define UNUSED_ __attribute__((unused))
- # define DEPRECATED_ __attribute__((deprecated))
- # // MSVC (_MSC_VER) doesn't seem to have an unused attribute (__declspec(...))
diff --git a/audio/mp3plot/files/patch-src_macros.h b/audio/mp3plot/files/patch-src_macros.h
new file mode 100644
index 000000000000..a6e8f1f8b7de
--- /dev/null
+++ b/audio/mp3plot/files/patch-src_macros.h
@@ -0,0 +1,11 @@
+--- src/macros.h.orig 2009-04-14 02:21:18 UTC
++++ src/macros.h
+@@ -34,7 +34,7 @@
+ // References of interest:
+ // <http://sourcefrog.net/weblog/software/languages/C/unused.html>
+ #ifndef UNUSED_
+-# ifdef __GNUC__
++# if (defined(__GNUC__) && __GNUC__ > 3)
+ # define UNUSED_ __attribute__((unused))
+ # define DEPRECATED_ __attribute__((deprecated))
+ # // MSVC (_MSC_VER) doesn't seem to have an unused attribute (__declspec(...))
diff --git a/audio/mp3stat/files/patch-base.cpp b/audio/mp3stat/files/patch-base.cpp
index dbb26395a441..ddfe7c41baa9 100644
--- a/audio/mp3stat/files/patch-base.cpp
+++ b/audio/mp3stat/files/patch-base.cpp
@@ -1,4 +1,4 @@
---- base.cpp.orig
+--- base.cpp.orig 2004-09-21 01:29:25 UTC
+++ base.cpp
@@ -1,4 +1,5 @@
-#include <stdio.h>
diff --git a/audio/mp3stat/files/patch-input__vorbis__oggstat.cpp b/audio/mp3stat/files/patch-input__vorbis__oggstat.cpp
deleted file mode 100644
index 0871455a927c..000000000000
--- a/audio/mp3stat/files/patch-input__vorbis__oggstat.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
---- input/vorbis/oggstat.cpp.orig
-+++ input/vorbis/oggstat.cpp
-@@ -1,3 +1,4 @@
-+#include <cstdlib>
- #include "oggstat.h"
-
- using namespace std;
diff --git a/audio/mp3stat/files/patch-input_mp3_mp3stat.cpp b/audio/mp3stat/files/patch-input_mp3_mp3stat.cpp
index 8e72c1f4dd7d..de5e61ccdb02 100644
--- a/audio/mp3stat/files/patch-input_mp3_mp3stat.cpp
+++ b/audio/mp3stat/files/patch-input_mp3_mp3stat.cpp
@@ -1,5 +1,5 @@
---- input/mp3/mp3stat.cpp.orig Tue Sep 14 12:50:17 2004
-+++ input/mp3/mp3stat.cpp Tue Sep 14 15:35:44 2004
+--- input/mp3/mp3stat.cpp.orig 2004-09-16 00:32:05 UTC
++++ input/mp3/mp3stat.cpp
@@ -5,6 +5,7 @@
* mp3check - check mp3 file for consistency and print infos
* Copyright (C) 1998 by Johannes Overmann <overmann@iname.com>
diff --git a/audio/mp3stat/files/patch-input_vorbis_oggstat.cpp b/audio/mp3stat/files/patch-input_vorbis_oggstat.cpp
new file mode 100644
index 000000000000..9cfd8b14c7d2
--- /dev/null
+++ b/audio/mp3stat/files/patch-input_vorbis_oggstat.cpp
@@ -0,0 +1,7 @@
+--- input/vorbis/oggstat.cpp.orig 2004-09-16 00:32:20 UTC
++++ input/vorbis/oggstat.cpp
+@@ -1,3 +1,4 @@
++#include <cstdlib>
+ #include "oggstat.h"
+
+ using namespace std;
diff --git a/audio/mp3stat/files/patch-input_vorbis_oggstat.h b/audio/mp3stat/files/patch-input_vorbis_oggstat.h
index d9470caad1cd..444d943e3987 100644
--- a/audio/mp3stat/files/patch-input_vorbis_oggstat.h
+++ b/audio/mp3stat/files/patch-input_vorbis_oggstat.h
@@ -1,5 +1,5 @@
---- input/vorbis/oggstat.h.orig Thu Sep 16 08:03:59 2004
-+++ input/vorbis/oggstat.h Tue Sep 21 21:08:41 2004
+--- input/vorbis/oggstat.h.orig 2004-09-15 23:03:59 UTC
++++ input/vorbis/oggstat.h
@@ -5,6 +5,7 @@
#include <sys/mman.h>
#include <fcntl.h>
diff --git a/audio/mp3stat/files/patch-ui.cpp b/audio/mp3stat/files/patch-ui.cpp
index 86856e3c02a8..a06f428f143b 100644
--- a/audio/mp3stat/files/patch-ui.cpp
+++ b/audio/mp3stat/files/patch-ui.cpp
@@ -1,5 +1,5 @@
---- ui.cpp.orig Fri Sep 17 09:54:41 2004
-+++ ui.cpp Tue Sep 21 20:28:28 2004
+--- ui.cpp.orig 2004-09-30 03:54:19 UTC
++++ ui.cpp
@@ -1,4 +1,5 @@
#include "ui.h"
+#include <cstdio>
diff --git a/audio/mp3stat/files/patch-ui__console__cli.cpp b/audio/mp3stat/files/patch-ui__console__cli.cpp
deleted file mode 100644
index 04d31adc1d19..000000000000
--- a/audio/mp3stat/files/patch-ui__console__cli.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
---- ui/console/cli.cpp.orig
-+++ ui/console/cli.cpp
-@@ -1,4 +1,5 @@
--#include <stdio.h>
-+#include <cstdio>
-+#include <cstdlib>
- #include "cli.h"
-
- using namespace std;
diff --git a/audio/mp3stat/files/patch-ui_console_cli.cpp b/audio/mp3stat/files/patch-ui_console_cli.cpp
new file mode 100644
index 000000000000..91cb8191754d
--- /dev/null
+++ b/audio/mp3stat/files/patch-ui_console_cli.cpp
@@ -0,0 +1,9 @@
+--- ui/console/cli.cpp.orig 2016-07-26 15:21:43 UTC
++++ ui/console/cli.cpp
+@@ -1,4 +1,5 @@
+-#include <stdio.h>
++#include <cstdio>
++#include <cstdlib>
+ #include "cli.h"
+
+ using namespace std;
diff --git a/audio/mp3stat/files/patch-ui_gtk_gtk2-ui.cpp b/audio/mp3stat/files/patch-ui_gtk_gtk2-ui.cpp
deleted file mode 100644
index 4dac4afd24dd..000000000000
--- a/audio/mp3stat/files/patch-ui_gtk_gtk2-ui.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- ui/gtk/gtk2_ui.cpp.orig Mon Sep 20 14:04:50 2004
-+++ ui/gtk/gtk2_ui.cpp Tue Sep 21 22:54:39 2004
-@@ -279,7 +279,7 @@
- Info chosen;
- Info chosen2;
-
-- gtk_init (&argcc, &argvv);
-+ gtk_init (NULL, NULL);
-
- cmap = gdk_colormap_get_system ();
- set_graph_colors ();
diff --git a/audio/mp3stat/files/patch-ui_gtk_gtk2__ui.cpp b/audio/mp3stat/files/patch-ui_gtk_gtk2__ui.cpp
new file mode 100644
index 000000000000..fa2f144d02e0
--- /dev/null
+++ b/audio/mp3stat/files/patch-ui_gtk_gtk2__ui.cpp
@@ -0,0 +1,11 @@
+--- ui/gtk/gtk2_ui.cpp.orig 2004-09-30 04:07:54 UTC
++++ ui/gtk/gtk2_ui.cpp
+@@ -285,7 +285,7 @@ gtk2_ui::gtk_interface()
+ Info chosen;
+ Info chosen2;
+
+- gtk_init (&argcc, &argvv);
++ gtk_init (NULL, NULL);
+
+ cmap = gdk_colormap_get_system ();
+ set_graph_colors ();
diff --git a/audio/mp3wrap/files/patch-crc.c b/audio/mp3wrap/files/patch-crc.c
index 34a0baca1fe8..969e6741c4eb 100644
--- a/audio/mp3wrap/files/patch-crc.c
+++ b/audio/mp3wrap/files/patch-crc.c
@@ -1,5 +1,5 @@
---- crc.c.orig Mon Jun 2 20:41:23 2003
-+++ crc.c Mon Jun 2 20:43:24 2003
+--- crc.c.orig 2003-01-10 22:19:35 UTC
++++ crc.c
@@ -25,7 +25,7 @@
#include <stdio.h>
diff --git a/audio/mpdbrowser/files/patch-setup.py b/audio/mpdbrowser/files/patch-setup.py
index 2d02a0b76ead..910ac30bb41e 100644
--- a/audio/mpdbrowser/files/patch-setup.py
+++ b/audio/mpdbrowser/files/patch-setup.py
@@ -1,6 +1,6 @@
---- ./setup.py.orig 2010-12-27 18:06:29.000000000 +0100
-+++ ./setup.py 2014-05-14 23:15:44.000000000 +0200
-@@ -62,9 +62,7 @@
+--- setup.py.orig 2010-12-27 17:06:29 UTC
++++ setup.py
+@@ -62,9 +62,7 @@ os.system("intltool-merge -d -u po mpd
# Create mo files:
if not os.path.exists("mo/"):
os.mkdir("mo/")
diff --git a/audio/mpg321/files/patch-ao.c b/audio/mpg321/files/patch-ao.c
index 46f3c0555576..385c1ffbc4ce 100644
--- a/audio/mpg321/files/patch-ao.c
+++ b/audio/mpg321/files/patch-ao.c
@@ -1,6 +1,6 @@
---- ao.c.orig
+--- ao.c.orig 2002-03-24 05:49:47 UTC
+++ ao.c
-@@ -229,6 +229,7 @@
+@@ -229,6 +229,7 @@ void open_ao_playdevice(struct mad_heade
and restore it afterwards */
signal(SIGINT, SIG_DFL);
diff --git a/audio/mpg321/files/patch-mpg321.c b/audio/mpg321/files/patch-mpg321.c
index df561df237a5..f89d23a317df 100644
--- a/audio/mpg321/files/patch-mpg321.c
+++ b/audio/mpg321/files/patch-mpg321.c
@@ -1,6 +1,6 @@
---- mpg321.c.orig
+--- mpg321.c.orig 2002-03-24 05:49:20 UTC
+++ mpg321.c
-@@ -188,7 +188,7 @@
+@@ -188,7 +188,7 @@ static int show_id3(struct id3_tag const
else
{
@@ -9,7 +9,7 @@
free(names[i]);
}
}
-@@ -203,7 +203,7 @@
+@@ -203,7 +203,7 @@ static int show_id3(struct id3_tag const
if (!names[i]) {
fprintf (stderr, emptystring);
} else {
@@ -18,7 +18,7 @@
free (names[i]);
}
if (i%2) fprintf (stderr, "\n");
-@@ -285,6 +285,8 @@
+@@ -285,6 +285,8 @@ int main(int argc, char *argv[])
signal(SIGINT, SIG_DFL);
playbuf.buf = NULL;
@@ -27,7 +27,7 @@
playbuf.fd = -1;
playbuf.length = 0;
playbuf.done = 0;
-@@ -410,12 +412,14 @@
+@@ -410,12 +412,14 @@ int main(int argc, char *argv[])
if(fstat(fd, &stat) == -1)
{
@@ -42,7 +42,7 @@
continue;
}
-@@ -432,6 +436,7 @@
+@@ -432,6 +436,7 @@ int main(int argc, char *argv[])
if((playbuf.buf = mmap(0, playbuf.length, PROT_READ, MAP_SHARED, fd, 0))
== MAP_FAILED)
{
@@ -50,7 +50,7 @@
mpg321_error(currentfile);
continue;
}
-@@ -509,9 +514,6 @@
+@@ -509,9 +514,6 @@ int main(int argc, char *argv[])
mad_decoder_finish(&decoder);
@@ -60,7 +60,7 @@
if (playbuf.frames)
free(playbuf.frames);
-@@ -521,6 +523,7 @@
+@@ -521,6 +523,7 @@ int main(int argc, char *argv[])
if (playbuf.fd == -1)
{
munmap(playbuf.buf, playbuf.length);
@@ -68,14 +68,14 @@
}
else
-@@ -535,10 +538,6 @@
- ao_close(playdevice);
+@@ -536,10 +539,6 @@ int main(int argc, char *argv[])
ao_shutdown();
--
+
-#if defined(RAW_SUPPORT) || defined(HTTP_SUPPORT) || defined(FTP_SUPPORT)
- if(fd) close(fd);
-#endif
-
+-
return(0);
}
+
diff --git a/audio/mpg321/files/patch-network.c b/audio/mpg321/files/patch-network.c
index eba18f6bbdd5..508a5f259693 100644
--- a/audio/mpg321/files/patch-network.c
+++ b/audio/mpg321/files/patch-network.c
@@ -1,6 +1,6 @@
---- network.c.orig
+--- network.c.orig 2002-03-24 05:49:56 UTC
+++ network.c
-@@ -225,7 +225,8 @@
+@@ -225,7 +225,8 @@ int http_open(char *arg)
* a html page and not the stream */
snprintf(http_request, sizeof(http_request), "GET /%s HTTP/1.0\r\n"
/* "User-Agent: Mozilla/2.0 (Win95; I)\r\n" */
diff --git a/audio/mpiosh/files/patch-Makefile.am b/audio/mpiosh/files/patch-Makefile.am
index de8196510db1..f2bb3ba254bc 100644
--- a/audio/mpiosh/files/patch-Makefile.am
+++ b/audio/mpiosh/files/patch-Makefile.am
@@ -1,5 +1,5 @@
---- Makefile.am.orig 2009-04-08 01:40:10.000000000 +0400
-+++ Makefile.am 2009-04-08 01:40:14.000000000 +0400
+--- Makefile.am.orig 2004-04-19 12:19:19 UTC
++++ Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS=@MPIO_KERNEL@ libmpio mpiosh etc tools hotplug
+SUBDIRS=@MPIO_KERNEL@ libmpio mpiosh etc tools
diff --git a/audio/mpiosh/files/patch-configure.in b/audio/mpiosh/files/patch-configure.in
index 3200ddfdb2f6..d1290540c6f1 100644
--- a/audio/mpiosh/files/patch-configure.in
+++ b/audio/mpiosh/files/patch-configure.in
@@ -1,6 +1,6 @@
---- configure.in.orig 2009-04-08 01:37:33.000000000 +0400
-+++ configure.in 2009-04-08 01:37:43.000000000 +0400
-@@ -80,14 +80,6 @@
+--- configure.in.orig 2016-07-26 15:22:25 UTC
++++ configure.in
+@@ -74,14 +74,6 @@ AC_CHECK_HEADER(usb.h,[
# This 'test' call uses non-standard syntax and will fail on most
# systems, but it's just informational so any warning can be ignored.
diff --git a/audio/mpiosh/files/patch-libmpio-debug.h b/audio/mpiosh/files/patch-libmpio-debug.h
deleted file mode 100644
index 988685381e36..000000000000
--- a/audio/mpiosh/files/patch-libmpio-debug.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- libmpio/debug.h.orig Thu Jun 19 19:47:19 2003
-+++ libmpio/debug.h Thu Jun 19 19:47:39 2003
-@@ -27,7 +27,7 @@
- #ifdef sun
- #include <sys/int_types.h>
- #else
--#include <stdint.h>
-+#include <sys/types.h>
- #endif
-
- #ifdef __cplusplus
diff --git a/audio/mpiosh/files/patch-libmpio_Makefile.am b/audio/mpiosh/files/patch-libmpio_Makefile.am
index 2c15db42bb4f..3537fd031fdf 100644
--- a/audio/mpiosh/files/patch-libmpio_Makefile.am
+++ b/audio/mpiosh/files/patch-libmpio_Makefile.am
@@ -1,5 +1,5 @@
---- libmpio/Makefile.am.orig 2009-04-08 01:38:43.000000000 +0400
-+++ libmpio/Makefile.am 2009-04-08 01:38:48.000000000 +0400
+--- libmpio/Makefile.am.orig 2003-10-19 21:06:34 UTC
++++ libmpio/Makefile.am
@@ -1,6 +1,6 @@
INCLUDES=@MPLIB_INCLUDE@
AM_CFLAGS=@MPLIB_CFLAGS@ @USB_CFLAGS@
diff --git a/audio/mpiosh/files/patch-libmpio_debug.h b/audio/mpiosh/files/patch-libmpio_debug.h
new file mode 100644
index 000000000000..28c645f8c374
--- /dev/null
+++ b/audio/mpiosh/files/patch-libmpio_debug.h
@@ -0,0 +1,11 @@
+--- libmpio/debug.h.orig 2003-04-27 12:08:20 UTC
++++ libmpio/debug.h
+@@ -41,7 +41,7 @@
+ #ifdef sun
+ #include <sys/int_types.h>
+ #else
+-#include <stdint.h>
++#include <sys/types.h>
+ #endif
+
+ #ifdef __cplusplus
diff --git a/audio/mpiosh/files/patch-mpiosh-callback.c b/audio/mpiosh/files/patch-mpiosh-callback.c
deleted file mode 100644
index d40deae5fff3..000000000000
--- a/audio/mpiosh/files/patch-mpiosh-callback.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- mpiosh/callback.c.orig Thu Jun 19 19:51:43 2003
-+++ mpiosh/callback.c Thu Jun 19 19:52:29 2003
-@@ -29,11 +29,14 @@
- #include <regex.h>
- #include <time.h>
- #include <unistd.h>
-+#include <limits.h>
-
- #include "mpiosh.h"
- #include "command.h"
-
- #include "libmpio/debug.h"
-+
-+#define NAME_MAX PATH_MAX
-
- /* commands */
- void
diff --git a/audio/mpiosh/files/patch-mpiosh-mpiosh.c b/audio/mpiosh/files/patch-mpiosh-mpiosh.c
deleted file mode 100644
index 5dfeadbc5ee7..000000000000
--- a/audio/mpiosh/files/patch-mpiosh-mpiosh.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- mpiosh/mpiosh.c.orig Thu Nov 14 02:05:28 2002
-+++ mpiosh/mpiosh.c Thu Jun 19 19:59:10 2003
-@@ -39,6 +39,8 @@
- #include "readline.h"
- #include "mpiosh.h"
-
-+#define SA_NOMASK 0
-+
- /* mpiosh core functions */
- void
- mpiosh_init(void)
-@@ -113,7 +115,9 @@
-
- while ((line = readline(mpiosh.prompt))) {
- if ((*line == '\0') || mpiosh_cancel) {
-+#if 0
- rl_clear_pending_input ();
-+#endif
- mpiosh_cancel = 0;
- mpiosh_cancel_ack = 0;
- continue;
diff --git a/audio/mpiosh/files/patch-mpiosh-readline.c b/audio/mpiosh/files/patch-mpiosh-readline.c
deleted file mode 100644
index f77f989c4d35..000000000000
--- a/audio/mpiosh/files/patch-mpiosh-readline.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- mpiosh/readline.c.orig Thu Jun 19 19:57:05 2003
-+++ mpiosh/readline.c Thu Jun 19 19:57:32 2003
-@@ -26,6 +26,8 @@
- #include "command.h"
- #include "mpiosh.h"
-
-+#define rl_completion_matches completion_matches
-+
- /* readline extensions */
- void
- mpiosh_readline_init(void)
diff --git a/audio/mpiosh/files/patch-mpiosh_Makefile.am b/audio/mpiosh/files/patch-mpiosh_Makefile.am
index 22e6b0fff8a6..f9c56d516d5a 100644
--- a/audio/mpiosh/files/patch-mpiosh_Makefile.am
+++ b/audio/mpiosh/files/patch-mpiosh_Makefile.am
@@ -1,6 +1,6 @@
---- mpiosh/Makefile.am.orig 2009-04-08 01:39:27.000000000 +0400
-+++ mpiosh/Makefile.am 2009-04-08 01:39:41.000000000 +0400
-@@ -12,7 +12,7 @@
+--- mpiosh/Makefile.am.orig 2002-10-29 20:03:34 UTC
++++ mpiosh/Makefile.am
+@@ -12,7 +12,7 @@ mpiosh_SOURCES = mpiosh.c \
AM_CFLAGS=-DSYSCONFDIR=\"@sysconfdir@\"
@@ -9,7 +9,7 @@
noinst_HEADERS = mpiosh.h \
callback.h \
-@@ -20,4 +20,4 @@
+@@ -20,4 +20,4 @@ noinst_HEADERS = mpiosh.h \
command.h \
global.h \
cfgio.h \
diff --git a/audio/mpiosh/files/patch-mpiosh_callback.c b/audio/mpiosh/files/patch-mpiosh_callback.c
new file mode 100644
index 000000000000..9acc206ac543
--- /dev/null
+++ b/audio/mpiosh/files/patch-mpiosh_callback.c
@@ -0,0 +1,18 @@
+--- mpiosh/callback.c.orig 2004-04-23 19:21:08 UTC
++++ mpiosh/callback.c
+@@ -31,12 +31,15 @@
+ #include <sys/stat.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <limits.h>
+
+ #include "mpiosh.h"
+ #include "command.h"
+
+ #include "libmpio/debug.h"
+
++#define NAME_MAX PATH_MAX
++
+ /* helper */
+ BYTE
+ mpiosh_ftype2ascii(BYTE ftype) {
diff --git a/audio/mpiosh/files/patch-mpiosh_mpiosh.c b/audio/mpiosh/files/patch-mpiosh_mpiosh.c
new file mode 100644
index 000000000000..bd308b7dd67c
--- /dev/null
+++ b/audio/mpiosh/files/patch-mpiosh_mpiosh.c
@@ -0,0 +1,21 @@
+--- mpiosh/mpiosh.c.orig 2003-08-25 19:38:57 UTC
++++ mpiosh/mpiosh.c
+@@ -39,6 +39,8 @@
+ #include "readline.h"
+ #include "mpiosh.h"
+
++#define SA_NOMASK 0
++
+ /* mpiosh core functions */
+ void
+ mpiosh_init(void)
+@@ -121,7 +123,9 @@ main(int argc, char *argv[]) {
+
+ while ((line = readline(mpiosh.prompt))) {
+ if ((*line == '\0') || mpiosh_cancel) {
++#if 0
+ rl_clear_pending_input ();
++#endif
+ mpiosh_cancel = 0;
+ mpiosh_cancel_ack = 0;
+ continue;
diff --git a/audio/mpiosh/files/patch-mpiosh_readline.c b/audio/mpiosh/files/patch-mpiosh_readline.c
new file mode 100644
index 000000000000..7a87ac6bd54d
--- /dev/null
+++ b/audio/mpiosh/files/patch-mpiosh_readline.c
@@ -0,0 +1,11 @@
+--- mpiosh/readline.c.orig 2003-04-23 08:34:16 UTC
++++ mpiosh/readline.c
+@@ -26,6 +26,8 @@
+ #include "command.h"
+ #include "mpiosh.h"
+
++#define rl_completion_matches completion_matches
++
+ /* readline extensions */
+ void
+ mpiosh_readline_init(void)
diff --git a/audio/mumble/files/patch-compiler.pri b/audio/mumble/files/patch-compiler.pri
index c6fc59df69af..6466fc46acf4 100644
--- a/audio/mumble/files/patch-compiler.pri
+++ b/audio/mumble/files/patch-compiler.pri
@@ -1,6 +1,6 @@
---- compiler.pri.orig 2011-02-24 16:24:49.000000000 -0500
-+++ compiler.pri 2011-02-24 16:26:09.000000000 -0500
-@@ -103,9 +103,9 @@
+--- compiler.pri.orig 2014-08-08 15:51:59 UTC
++++ compiler.pri
+@@ -109,9 +109,9 @@ unix {
unix:!macx {
CONFIG(debug, debug|release) {
diff --git a/audio/mumble/files/patch-overlay-overlay.h b/audio/mumble/files/patch-overlay-overlay.h
deleted file mode 100644
index a7f88f164294..000000000000
--- a/audio/mumble/files/patch-overlay-overlay.h
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -r -C 2 mumble-1.1.8/overlay/overlay.h overlay/overlay.h
-*** mumble-1.1.8/overlay/overlay.h 2009-03-22 16:05:00.000000000 +0100
---- overlay/overlay.h 2009-08-06 20:07:48.000000000 +0200
-***************
-*** 43,46 ****
---- 43,65 ----
- #define OVERLAY_VERSION_SUB 0
-
-+ /* BSD support */
-+ #ifndef ElfW
-+ # ifdef __FreeBSD__
-+ # if __ELF_WORD_SIZE == 32
-+ # define ElfW(type) Elf32_##type
-+ # else
-+ # define ElfW(type) Elf64_##type
-+ # endif
-+ # else
-+ # ifdef __NetBSD__
-+ # if ELFSIZE == 32
-+ # define ElfW(type) Elf32_##type
-+ # else
-+ # define ElfW(type) Elf64_##type
-+ # endif
-+ # endif
-+ # endif
-+ #endif
-+
- struct TextEntry {
- unsigned int color;
diff --git a/audio/mumble/files/patch-overlay_gl-overlay.c b/audio/mumble/files/patch-overlay_gl-overlay.c
index 3323640e6630..b7c34e68d84f 100644
--- a/audio/mumble/files/patch-overlay_gl-overlay.c
+++ b/audio/mumble/files/patch-overlay_gl-overlay.c
@@ -1,10 +1,10 @@
---- overlay_gl/overlay.c~ 2011-02-19 16:35:15.000000000 -0500
-+++ overlay_gl/overlay.c 2011-02-27 16:04:32.000000000 -0500
+--- overlay_gl/overlay.c.orig 2014-08-08 15:51:59 UTC
++++ overlay_gl/overlay.c
@@ -45,6 +45,7 @@
#include <sys/ipc.h>
#include <sys/time.h>
#include <sys/socket.h>
+#include <sys/stat.h>
#include <sys/un.h>
+ #include <sys/stat.h>
#include <time.h>
- #include <semaphore.h>
diff --git a/audio/mumble/files/patch-overlay_overlay.h b/audio/mumble/files/patch-overlay_overlay.h
new file mode 100644
index 000000000000..b94a68923dd5
--- /dev/null
+++ b/audio/mumble/files/patch-overlay_overlay.h
@@ -0,0 +1,28 @@
+--- overlay/overlay.h.orig 2014-08-08 15:51:59 UTC
++++ overlay/overlay.h
+@@ -42,6 +42,25 @@ struct OverlayMsgHeader {
+ #define OVERLAY_MSGTYPE_INIT 0
+ struct OverlayMsgInit {
+ unsigned int uiWidth;
++/* BSD support */
++#ifndef ElfW
++# ifdef __FreeBSD__
++# if __ELF_WORD_SIZE == 32
++# define ElfW(type) Elf32_##type
++# else
++# define ElfW(type) Elf64_##type
++# endif
++# else
++# ifdef __NetBSD__
++# if ELFSIZE == 32
++# define ElfW(type) Elf32_##type
++# else
++# define ElfW(type) Elf64_##type
++# endif
++# endif
++# endif
++#endif
++
+ unsigned int uiHeight;
+ };
+
diff --git a/audio/mumble/files/patch-plugins-plugins.pri b/audio/mumble/files/patch-plugins-plugins.pri
index 5915cb684865..9c8cebe61052 100644
--- a/audio/mumble/files/patch-plugins-plugins.pri
+++ b/audio/mumble/files/patch-plugins-plugins.pri
@@ -1,7 +1,7 @@
Disable debug; runs into cryptic errors on 9+/amd64
---- plugins/plugins.pri.orig 2013-06-04 10:06:48.955586932 -0500
-+++ plugins/plugins.pri 2013-06-04 10:07:37.450613576 -0500
+--- plugins/plugins.pri.orig 2014-08-08 15:51:59 UTC
++++ plugins/plugins.pri
@@ -1,7 +1,7 @@
include(../compiler.pri)
@@ -11,7 +11,7 @@ Disable debug; runs into cryptic errors on 9+/amd64
CONFIG -= qt
DIST *= mumble_plugin.h
-@@ -10,12 +10,7 @@
+@@ -10,12 +10,7 @@ CONFIG(static) {
CONFIG += qt_dynamic_lookup
}
diff --git a/audio/mumble/files/patch-src-Net.cpp b/audio/mumble/files/patch-src-Net.cpp
index 5904139aaf3c..f8bb61dd1384 100644
--- a/audio/mumble/files/patch-src-Net.cpp
+++ b/audio/mumble/files/patch-src-Net.cpp
@@ -1,7 +1,7 @@
---- src/Net.cpp.orig 2010-01-08 00:37:46.000000000 +0200
-+++ src/Net.cpp 2010-01-10 23:55:48.000000000 +0200
-@@ -29,6 +29,12 @@
- */
+--- src/Net.cpp.orig 2014-08-08 15:51:59 UTC
++++ src/Net.cpp
+@@ -31,6 +31,12 @@
+ #include "murmur_pch.h"
#include "Net.h"
+#ifdef __FreeBSD__
diff --git a/audio/mumble/files/patch-src-mumble-CELTCodec.cpp b/audio/mumble/files/patch-src-mumble-CELTCodec.cpp
index b8d3d2f3a0eb..fdcdb3324ae8 100644
--- a/audio/mumble/files/patch-src-mumble-CELTCodec.cpp
+++ b/audio/mumble/files/patch-src-mumble-CELTCodec.cpp
@@ -1,6 +1,6 @@
---- src/mumble/CELTCodec.cpp.orig 2013-08-07 07:26:41.259860710 +0200
-+++ src/mumble/CELTCodec.cpp 2013-08-07 07:27:58.905421337 +0200
-@@ -64,6 +64,7 @@
+--- src/mumble/CELTCodec.cpp.orig 2014-08-08 15:51:59 UTC
++++ src/mumble/CELTCodec.cpp
+@@ -64,6 +64,7 @@ CELTCodec::CELTCodec(const QString &vers
alternatives << QString::fromLatin1("libcelt0.so.%1").arg(version);
alternatives << QString::fromLatin1("libcelt.so.%1").arg(version);
alternatives << QString::fromLatin1("celt.so.%1").arg(version);
@@ -8,4 +8,3 @@
#else
int cpuinfo[4];
__cpuid(cpuinfo, 1);
-
diff --git a/audio/mumble/files/patch-src-mumble-OSS.cpp b/audio/mumble/files/patch-src-mumble-OSS.cpp
deleted file mode 100644
index 596269e4681f..000000000000
--- a/audio/mumble/files/patch-src-mumble-OSS.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
---- src/mumble/OSS.cpp.orig 2013-08-03 14:01:25.000000000 +0200
-+++ src/mumble/OSS.cpp 2013-08-03 14:12:51.000000000 +0200
-@@ -153,7 +153,6 @@
- qhOutput.insert(QString(), QLatin1String("Default OSS Device"));
- qhDevices.insert(QString(), QLatin1String("/dev/dsp"));
-
--#if (SOUND_VERSION >= 0x040002)
- int mixerfd = open("/dev/mixer", O_RDWR, 0);
- if (mixerfd == -1) {
- qWarning("OSSEnumerator: Failed to open /dev/mixer");
-@@ -182,15 +181,14 @@
- if (ainfo.caps & PCM_CAP_HIDDEN)
- continue;
-
-- qhDevices.insert(handle, device);
-+ qhDevices.insert(name, device);
-
- if (ainfo.caps & PCM_CAP_INPUT)
-- qhInput.insert(handle, name);
-+ qhInput.insert(name, name);
- if (ainfo.caps & PCM_CAP_OUTPUT)
-- qhOutput.insert(handle, name);
-+ qhOutput.insert(name, name);
- }
- close(mixerfd);
--#endif
- }
-
- OSSInput::OSSInput() {
-
diff --git a/audio/mumble/files/patch-src-mumble-ServerHandler.cpp b/audio/mumble/files/patch-src-mumble-ServerHandler.cpp
index 6f00c7a48327..321b28b9b706 100644
--- a/audio/mumble/files/patch-src-mumble-ServerHandler.cpp
+++ b/audio/mumble/files/patch-src-mumble-ServerHandler.cpp
@@ -1,7 +1,7 @@
---- src/mumble/ServerHandler.cpp.orig 2013-06-04 11:44:15.381594007 -0500
-+++ src/mumble/ServerHandler.cpp 2013-06-04 11:44:36.772583833 -0500
-@@ -45,6 +45,12 @@
- #include "PacketDataStream.h"
+--- src/mumble/ServerHandler.cpp.orig 2014-08-08 15:51:59 UTC
++++ src/mumble/ServerHandler.cpp
+@@ -46,6 +46,12 @@
+ #include "RichTextEditor.h"
#include "SSL.h"
#include "User.h"
+#ifdef __FreeBSD__
diff --git a/audio/mumble/files/patch-src-mumble-mumble.pro b/audio/mumble/files/patch-src-mumble-mumble.pro
index 12517ae6f1a2..cb36a8f10f13 100644
--- a/audio/mumble/files/patch-src-mumble-mumble.pro
+++ b/audio/mumble/files/patch-src-mumble-mumble.pro
@@ -1,6 +1,6 @@
---- src/mumble/mumble.pro.orig 2013-06-04 11:46:38.900573055 -0500
-+++ src/mumble/mumble.pro 2013-06-04 11:47:41.836576507 -0500
-@@ -161,7 +161,16 @@
+--- src/mumble/mumble.pro.orig 2014-08-08 15:51:59 UTC
++++ src/mumble/mumble.pro
+@@ -161,7 +161,16 @@ unix {
CONFIG *= link_pkgconfig
diff --git a/audio/mumble/files/patch-src__mumble__OSS.cpp b/audio/mumble/files/patch-src__mumble__OSS.cpp
index 123d3c38dd82..10ee5d91d003 100644
--- a/audio/mumble/files/patch-src__mumble__OSS.cpp
+++ b/audio/mumble/files/patch-src__mumble__OSS.cpp
@@ -1,6 +1,33 @@
---- ./src/mumble/OSS.cpp.orig 2013-06-01 21:16:31.000000000 +0000
-+++ ./src/mumble/OSS.cpp 2013-10-12 02:38:45.443221514 +0000
-@@ -221,20 +221,23 @@
+--- src/mumble/OSS.cpp.orig 2014-08-08 15:51:59 UTC
++++ src/mumble/OSS.cpp
+@@ -153,7 +153,6 @@ OSSEnumerator::OSSEnumerator() {
+ qhOutput.insert(QString(), QLatin1String("Default OSS Device"));
+ qhDevices.insert(QString(), QLatin1String("/dev/dsp"));
+
+-#if (SOUND_VERSION >= 0x040002)
+ int mixerfd = open("/dev/mixer", O_RDWR, 0);
+ if (mixerfd == -1) {
+ qWarning("OSSEnumerator: Failed to open /dev/mixer");
+@@ -182,15 +181,14 @@ OSSEnumerator::OSSEnumerator() {
+ if (ainfo.caps & PCM_CAP_HIDDEN)
+ continue;
+
+- qhDevices.insert(handle, device);
++ qhDevices.insert(name, device);
+
+ if (ainfo.caps & PCM_CAP_INPUT)
+- qhInput.insert(handle, name);
++ qhInput.insert(name, name);
+ if (ainfo.caps & PCM_CAP_OUTPUT)
+- qhOutput.insert(handle, name);
++ qhOutput.insert(name, name);
+ }
+ close(mixerfd);
+-#endif
+ }
+
+ OSSInput::OSSInput() {
+@@ -221,20 +219,23 @@ void OSSInput::run() {
ival = AFMT_S16_NE;
if ((ioctl(fd, SNDCTL_DSP_SETFMT, &ival) == -1) || (ival != AFMT_S16_NE)) {
qWarning("OSSInput: Failed to set sound format");
@@ -27,7 +54,7 @@
}
iMicFreq = ival;
-@@ -258,8 +261,6 @@
+@@ -258,8 +259,6 @@ void OSSInput::run() {
qWarning("OSSInput: Releasing.");
ioctl(fd, SNDCTL_DSP_RESET, NULL);
diff --git a/audio/murmur/files/patch-compiler.pri b/audio/murmur/files/patch-compiler.pri
index d76d9c4dbc0b..d98fd8abfc25 100644
--- a/audio/murmur/files/patch-compiler.pri
+++ b/audio/murmur/files/patch-compiler.pri
@@ -1,6 +1,6 @@
---- compiler.pri.orig 2009-12-11 03:05:44.000000000 +0900
-+++ compiler.pri 2009-12-22 02:29:38.000000000 +0900
-@@ -93,7 +93,7 @@
+--- compiler.pri.orig 2015-07-09 13:23:46 UTC
++++ compiler.pri
+@@ -111,7 +111,7 @@ unix:!macx {
CONFIG(debug, debug|release) {
QMAKE_CFLAGS *= -fstack-protector -fPIE -pie
QMAKE_CXXFLAGS *= -fstack-protector -fPIE -pie
diff --git a/audio/murmur/files/patch-initialize-SSL b/audio/murmur/files/patch-initialize-SSL
index 5513176cc423..aa959f47b2b9 100644
--- a/audio/murmur/files/patch-initialize-SSL
+++ b/audio/murmur/files/patch-initialize-SSL
@@ -8,9 +8,9 @@ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804363
Bug-Mumble: https://github.com/mumble-voip/mumble/issues/1876
Last-Updated: 2015-11-10
---- src/mumble/main.cpp
+--- src/mumble/main.cpp.orig 2015-07-09 13:23:46 UTC
+++ src/mumble/main.cpp
-@@ -170,6 +170,9 @@
+@@ -170,6 +170,9 @@ int main(int argc, char **argv) {
os_init();
#endif
@@ -20,9 +20,9 @@ Last-Updated: 2015-11-10
bool bAllowMultiple = false;
QUrl url;
if (a.arguments().count() > 1) {
---- src/murmur/main.cpp
+--- src/murmur/main.cpp.orig 2015-07-09 13:23:46 UTC
+++ src/murmur/main.cpp
-@@ -203,6 +203,9 @@
+@@ -203,6 +203,9 @@ int main(int argc, char **argv) {
qsrand(QDateTime::currentDateTime().toTime_t());
qInstallMsgHandler(murmurMessageOutput);
diff --git a/audio/muse/files/patch-Makefile.in b/audio/muse/files/patch-Makefile.in
index dc75fda38b3a..06a19bf2a07b 100644
--- a/audio/muse/files/patch-Makefile.in
+++ b/audio/muse/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2005-12-27 22:09:38.000000000 +0900
-+++ Makefile.in 2012-06-02 04:45:45.000000000 +0900
-@@ -690,7 +690,7 @@
+--- Makefile.in.orig 2005-12-27 13:09:38 UTC
++++ Makefile.in
+@@ -690,7 +690,7 @@ info: info-recursive
info-am:
diff --git a/audio/muse/files/patch-configure b/audio/muse/files/patch-configure
index d620c9b0a075..51c9ada0c7bd 100644
--- a/audio/muse/files/patch-configure
+++ b/audio/muse/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Tue Dec 27 16:03:15 2005
-+++ configure Fri Aug 4 11:51:41 2006
-@@ -1894,7 +1894,7 @@
+--- configure.orig 2005-12-27 13:03:15 UTC
++++ configure
+@@ -1894,7 +1894,7 @@ uversion=`uname -r | sed -e 's/-.*$//g;s
echo "$as_me:$LINENO: checking for which platform we are compiling" >&5
echo $ECHO_N "checking for which platform we are compiling... $ECHO_C" >&6
case $uname in
@@ -9,7 +9,7 @@
echo "$as_me:$LINENO: result: Linux" >&5
echo "${ECHO_T}Linux" >&6
-@@ -2613,16 +2613,12 @@
+@@ -2613,16 +2613,12 @@ if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -29,7 +29,7 @@
fi
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-@@ -3738,7 +3734,7 @@
+@@ -3738,7 +3734,7 @@ fi
#AM_DEFINE_UNQUOTED(HOST_CPU, "${host_cpu}")
#CFLAGS="-O4 -D_REENTRANT -fomit-frame-pointer -march=${host_cpu} -ffast-math -malign-double -funroll-loops -pipe"
@@ -38,7 +38,7 @@
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
-@@ -14588,7 +14584,7 @@
+@@ -14588,7 +14584,7 @@ if test "${ac_cv_c99_lrint+set}" = set;
else
lrint_save_CFLAGS=$CFLAGS
@@ -47,7 +47,7 @@
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
-@@ -14665,7 +14661,7 @@
+@@ -14665,7 +14661,7 @@ if test "${ac_cv_c99_lrintf+set}" = set;
else
lrintf_save_CFLAGS=$CFLAGS
diff --git a/audio/muse/files/patch-src_Makefile.in b/audio/muse/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..8f04dfe2616b
--- /dev/null
+++ b/audio/muse/files/patch-src_Makefile.in
@@ -0,0 +1,10 @@
+--- src/Makefile.in.orig 2005-12-27 13:09:36 UTC
++++ src/Makefile.in
+@@ -268,7 +268,6 @@ muse_LDADD = \
+ $(top_srcdir)/src/libmpeg/libmpeg.a \
+ $(top_srcdir)/src/shout/libshout.a \
+ $(top_srcdir)/src/portaudio/libportaudio.a \
+- -lpthread \
+ @M_LIBS@ \
+ @LAME_LIBS@ \
+ @OGG_LIBS@ \
diff --git a/audio/muse/files/patch-src__Makefile.in b/audio/muse/files/patch-src__Makefile.in
deleted file mode 100644
index abd4d08a05b1..000000000000
--- a/audio/muse/files/patch-src__Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/Makefile.in.orig Fri Aug 4 11:43:41 2006
-+++ src/Makefile.in Fri Aug 4 11:43:46 2006
-@@ -268,7 +268,6 @@
- $(top_srcdir)/src/libmpeg/libmpeg.a \
- $(top_srcdir)/src/shout/libshout.a \
- $(top_srcdir)/src/portaudio/libportaudio.a \
-- -lpthread \
- @M_LIBS@ \
- @LAME_LIBS@ \
- @OGG_LIBS@ \
diff --git a/audio/muse/files/patch-src__jmixer.cpp b/audio/muse/files/patch-src__jmixer.cpp
deleted file mode 100644
index b00c3f06560c..000000000000
--- a/audio/muse/files/patch-src__jmixer.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
---- src/jmixer.cpp.orig 2004-12-16 20:04:31.000000000 +0900
-+++ src/jmixer.cpp 2012-05-29 07:39:23.000000000 +0900
-@@ -20,18 +20,19 @@
- */
-
- #include <iostream>
--#include <math.h>
--#include <stdio.h>
--#include <stdlib.h>
-+#include <cmath>
-+#include <cstdio>
-+#include <cstdlib>
- #include <unistd.h>
- #include <dirent.h>
- #include <sys/ioctl.h>
- #include <sys/stat.h>
--#include <errno.h>
-+#include <sys/param.h>
-+#include <cerrno>
- #include <fcntl.h>
-
--#include <string.h>
--#include <signal.h>
-+#include <cstring>
-+#include <csignal>
- #include <sys/types.h>
- #include <sys/wait.h>
- #include <termios.h>
-@@ -640,7 +641,11 @@
- /* this is the function selecting files for the scandir
- on freebsd systems you should change the following line to:
- int selector(struct dirent *dir) { */
-+#if defined(__FreeBSD__) && __FreeBSD_version < 800501
-+int selector(struct dirent *dir) {
-+#else
- int selector(const struct dirent *dir) {
-+#endif
- if( strncasecmp(dir->d_name+strlen(dir->d_name)-4,".mp3",4)==0
- #ifdef HAVE_VORBIS
- || strncasecmp(dir->d_name+strlen(dir->d_name)-4,".ogg",4)==0
diff --git a/audio/muse/files/patch-src__libmpeg__mpegtoraw.cc b/audio/muse/files/patch-src__libmpeg__mpegtoraw.cc
deleted file mode 100644
index 6032cdc86627..000000000000
--- a/audio/muse/files/patch-src__libmpeg__mpegtoraw.cc
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/libmpeg/mpegtoraw.cc.orig Mon Dec 8 21:20:37 2003
-+++ src/libmpeg/mpegtoraw.cc Mon Apr 19 23:00:18 2004
-@@ -9,8 +9,8 @@
- #include <pthread.h>
- #endif
-
--#include <math.h>
--#include <stdlib.h>
-+#include <cmath>
-+#include <cstdlib>
- #include <unistd.h>
-
- #include "mpegsound.h"
-@@ -419,7 +419,7 @@
- return true;
- }
-
--#include <iostream.h>
-+#include <iostream>
- // Convert mpeg to raw
- bool Mpegtoraw::run(int frames) {
- clearrawdata();
diff --git a/audio/muse/files/patch-src__outchannels.cpp b/audio/muse/files/patch-src__outchannels.cpp
deleted file mode 100644
index b35b3ac2c444..000000000000
--- a/audio/muse/files/patch-src__outchannels.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/outchannels.cpp.orig Thu Apr 15 22:12:15 2004
-+++ src/outchannels.cpp Mon Apr 19 22:37:58 2004
-@@ -24,11 +24,11 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
--#include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
diff --git a/audio/muse/files/patch-src__pipe.cpp b/audio/muse/files/patch-src__pipe.cpp
deleted file mode 100644
index aac653714a64..000000000000
--- a/audio/muse/files/patch-src__pipe.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/pipe.cpp.orig Sat Dec 24 18:19:31 2005
-+++ src/pipe.cpp Fri Aug 4 11:48:06 2006
-@@ -25,9 +25,9 @@
- */
-
- #include <iostream>
--#include <stdlib.h>
-+#include <cstdlib>
- #include <math.h>
--#include <errno.h>
-+#include <cerrno>
-
- #include <audioproc.h>
- #include <pipe.h>
diff --git a/audio/muse/files/patch-src__shout__sock.c b/audio/muse/files/patch-src__shout__sock.c
deleted file mode 100644
index 19956755987e..000000000000
--- a/audio/muse/files/patch-src__shout__sock.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/shout/sock.c.orig Tue Mar 30 01:04:27 2004
-+++ src/shout/sock.c Mon Apr 19 23:32:09 2004
-@@ -336,7 +336,11 @@
- int rc = SOCK_ERROR;
- va_list ap_retry;
-
-+#if (defined(__FreeBSD__) && __FreeBSD__ < 5)
-+ ap_retry = ap;
-+#else
- va_copy (ap_retry, ap);
-+#endif
-
- len = vsnprintf (buff, sizeof (buffer), fmt, ap);
-
diff --git a/audio/muse/files/patch-src_jmixer.cpp b/audio/muse/files/patch-src_jmixer.cpp
new file mode 100644
index 000000000000..a0d82346df2f
--- /dev/null
+++ b/audio/muse/files/patch-src_jmixer.cpp
@@ -0,0 +1,40 @@
+--- src/jmixer.cpp.orig 2004-12-16 11:04:31 UTC
++++ src/jmixer.cpp
+@@ -20,18 +20,19 @@
+ */
+
+ #include <iostream>
+-#include <math.h>
+-#include <stdio.h>
+-#include <stdlib.h>
++#include <cmath>
++#include <cstdio>
++#include <cstdlib>
+ #include <unistd.h>
+ #include <dirent.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+-#include <errno.h>
++#include <sys/param.h>
++#include <cerrno>
+ #include <fcntl.h>
+
+-#include <string.h>
+-#include <signal.h>
++#include <cstring>
++#include <csignal>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <termios.h>
+@@ -640,7 +641,11 @@ bool Stream_mixer::set_playmode(int ch,
+ /* this is the function selecting files for the scandir
+ on freebsd systems you should change the following line to:
+ int selector(struct dirent *dir) { */
++#if defined(__FreeBSD__) && __FreeBSD_version < 800501
++int selector(struct dirent *dir) {
++#else
+ int selector(const struct dirent *dir) {
++#endif
+ if( strncasecmp(dir->d_name+strlen(dir->d_name)-4,".mp3",4)==0
+ #ifdef HAVE_VORBIS
+ || strncasecmp(dir->d_name+strlen(dir->d_name)-4,".ogg",4)==0
diff --git a/audio/muse/files/patch-src_libmpeg_mpegtoraw.cc b/audio/muse/files/patch-src_libmpeg_mpegtoraw.cc
new file mode 100644
index 000000000000..5c388cf890ee
--- /dev/null
+++ b/audio/muse/files/patch-src_libmpeg_mpegtoraw.cc
@@ -0,0 +1,22 @@
+--- src/libmpeg/mpegtoraw.cc.orig 2003-12-08 12:20:37 UTC
++++ src/libmpeg/mpegtoraw.cc
+@@ -9,8 +9,8 @@
+ #include <pthread.h>
+ #endif
+
+-#include <math.h>
+-#include <stdlib.h>
++#include <cmath>
++#include <cstdlib>
+ #include <unistd.h>
+
+ #include "mpegsound.h"
+@@ -419,7 +419,7 @@ bool Mpegtoraw::loadheader(void)
+ return true;
+ }
+
+-#include <iostream.h>
++#include <iostream>
+ // Convert mpeg to raw
+ bool Mpegtoraw::run(int frames) {
+ clearrawdata();
diff --git a/audio/muse/files/patch-src_linklist.h b/audio/muse/files/patch-src_linklist.h
index 93ecc15d3e37..2bdc384be731 100644
--- a/audio/muse/files/patch-src_linklist.h
+++ b/audio/muse/files/patch-src_linklist.h
@@ -1,6 +1,6 @@
---- src/linklist.h.orig Sun Oct 1 18:28:22 2006
-+++ src/linklist.h Sun Oct 1 18:28:52 2006
-@@ -44,7 +44,7 @@
+--- src/linklist.h.orig 2004-02-13 16:58:16 UTC
++++ src/linklist.h
+@@ -44,7 +44,7 @@ class Linklist {
bool movedown(int pos);
bool moveto(int num, int pos);
Entry *pick(int pos);
diff --git a/audio/muse/files/patch-src_outchannels.cpp b/audio/muse/files/patch-src_outchannels.cpp
new file mode 100644
index 000000000000..ed61b09da1b4
--- /dev/null
+++ b/audio/muse/files/patch-src_outchannels.cpp
@@ -0,0 +1,15 @@
+--- src/outchannels.cpp.orig 2004-12-15 18:18:06 UTC
++++ src/outchannels.cpp
+@@ -24,11 +24,11 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
+-#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
diff --git a/audio/muse/files/patch-src_pipe.cpp b/audio/muse/files/patch-src_pipe.cpp
new file mode 100644
index 000000000000..d6dc5f97af0c
--- /dev/null
+++ b/audio/muse/files/patch-src_pipe.cpp
@@ -0,0 +1,14 @@
+--- src/pipe.cpp.orig 2005-12-24 15:19:31 UTC
++++ src/pipe.cpp
+@@ -25,9 +25,9 @@ Boston, MA 02111-1307, USA.
+ */
+
+ #include <iostream>
+-#include <stdlib.h>
++#include <cstdlib>
+ #include <math.h>
+-#include <errno.h>
++#include <cerrno>
+
+ #include <audioproc.h>
+ #include <pipe.h>
diff --git a/audio/muse/files/patch-src_shout_sock.c b/audio/muse/files/patch-src_shout_sock.c
new file mode 100644
index 000000000000..3d8a57773d94
--- /dev/null
+++ b/audio/muse/files/patch-src_shout_sock.c
@@ -0,0 +1,14 @@
+--- src/shout/sock.c.orig 2004-03-29 16:04:27 UTC
++++ src/shout/sock.c
+@@ -336,7 +336,11 @@ int sock_write_fmt(sock_t sock, const ch
+ int rc = SOCK_ERROR;
+ va_list ap_retry;
+
++#if (defined(__FreeBSD__) && __FreeBSD__ < 5)
++ ap_retry = ap;
++#else
+ va_copy (ap_retry, ap);
++#endif
+
+ len = vsnprintf (buff, sizeof (buffer), fmt, ap);
+
diff --git a/audio/musepack/files/patch-configure.in b/audio/musepack/files/patch-configure.in
index 49b0124945c3..fd0497b5db29 100644
--- a/audio/musepack/files/patch-configure.in
+++ b/audio/musepack/files/patch-configure.in
@@ -1,6 +1,6 @@
---- configure.in.orig 2014-08-04 08:34:39.000000000 +0200
-+++ configure.in 2014-08-04 08:35:20.000000000 +0200
-@@ -30,7 +30,8 @@
+--- configure.in.orig 2009-07-29 21:00:32 UTC
++++ configure.in
+@@ -30,7 +30,8 @@ AC_ARG_ENABLE([mpcchap], [AS_HELP_STRING
AM_CONDITIONAL([MPC_CHAP], [test "x$enable_mpcchap" = xyes])
diff --git a/audio/musescore/files/patch-CMakeLists.txt b/audio/musescore/files/patch-CMakeLists.txt
index ea98c932d7e1..71fcf351ed73 100644
--- a/audio/musescore/files/patch-CMakeLists.txt
+++ b/audio/musescore/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig 2015-07-16 10:58:43 UTC
+--- CMakeLists.txt.orig 2015-07-16 21:02:34 UTC
+++ CMakeLists.txt
@@ -74,6 +74,10 @@ option(HAS_AUDIOFILE "enable audio expor
option(USE_SYSTEM_QTSINGLEAPPLICATION "Use system QtSingleApplication" OFF)
diff --git a/audio/musescore/files/patch-mscore-CMakeLists.txt b/audio/musescore/files/patch-mscore-CMakeLists.txt
deleted file mode 100644
index 27a9b1c33ccd..000000000000
--- a/audio/musescore/files/patch-mscore-CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
---- mscore/CMakeLists.txt.orig 2015-07-16 10:58:43 UTC
-+++ mscore/CMakeLists.txt
-@@ -474,7 +474,6 @@ else (MINGW)
- ${ALSA_LIB}
- ${QT_LIBRARIES}
- z
-- dl
- pthread
- )
- if (USE_PORTAUDIO)
-@@ -509,9 +508,6 @@
-
- # gold does not use indirect shared libraries for symbol resolution, Linux only
- if (NOT APPLE)
-- if(USE_JACK)
-- target_link_libraries(mscore dl)
-- endif(USE_JACK)
- target_link_libraries(mscore rt)
- endif (NOT APPLE)
-
diff --git a/audio/musescore/files/patch-mscore_CMakeLists.txt b/audio/musescore/files/patch-mscore_CMakeLists.txt
new file mode 100644
index 000000000000..4371aa3dcfaa
--- /dev/null
+++ b/audio/musescore/files/patch-mscore_CMakeLists.txt
@@ -0,0 +1,20 @@
+--- mscore/CMakeLists.txt.orig 2015-07-16 21:02:34 UTC
++++ mscore/CMakeLists.txt
+@@ -474,7 +474,6 @@ else (MINGW)
+ ${ALSA_LIB}
+ ${QT_LIBRARIES}
+ z
+- dl
+ pthread
+ )
+ if (USE_PORTAUDIO)
+@@ -509,9 +508,6 @@ else (MINGW)
+
+ # gold does not use indirect shared libraries for symbol resolution, Linux only
+ if (NOT APPLE)
+- if(USE_JACK)
+- target_link_libraries(mscore dl)
+- endif(USE_JACK)
+ target_link_libraries(mscore rt)
+ endif (NOT APPLE)
+
diff --git a/audio/musescore/files/patch-thirdparty__qzip__qzip.cpp b/audio/musescore/files/patch-thirdparty__qzip__qzip.cpp
deleted file mode 100644
index 156479d037f2..000000000000
--- a/audio/musescore/files/patch-thirdparty__qzip__qzip.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- thirdparty/qzip/qzip.cpp.orig 2015-07-16 10:58:43 UTC
-+++ thirdparty/qzip/qzip.cpp
-@@ -45,6 +45,9 @@
- #include "qzipreader_p.h"
- #include "qzipwriter_p.h"
-
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+
- #include <zlib.h>
-
- #if defined(Q_OS_WIN) or defined(Q_OS_ANDROID)
diff --git a/audio/musescore/files/patch-thirdparty_qzip_qzip.cpp b/audio/musescore/files/patch-thirdparty_qzip_qzip.cpp
new file mode 100644
index 000000000000..9d6d7bbb8b71
--- /dev/null
+++ b/audio/musescore/files/patch-thirdparty_qzip_qzip.cpp
@@ -0,0 +1,12 @@
+--- thirdparty/qzip/qzip.cpp.orig 2015-07-16 21:02:34 UTC
++++ thirdparty/qzip/qzip.cpp
+@@ -45,6 +45,9 @@
+ #include "qzipreader_p.h"
+ #include "qzipwriter_p.h"
+
++#include <sys/types.h>
++#include <sys/stat.h>
++
+ #include <zlib.h>
+
+ #if defined(Q_OS_WIN) or defined(Q_OS_ANDROID)
diff --git a/audio/napster/files/patch-doc_Makefile.in b/audio/napster/files/patch-doc_Makefile.in
new file mode 100644
index 000000000000..a7c816b7efcf
--- /dev/null
+++ b/audio/napster/files/patch-doc_Makefile.in
@@ -0,0 +1,11 @@
+--- doc/Makefile.in.orig 2006-11-05 02:25:23 UTC
++++ doc/Makefile.in
+@@ -134,7 +134,7 @@ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ EXTRA_DIST = nap.1.in userguide.html napster.txt
+-htmldir = $(prefix)/doc/nap
++htmldir = $(prefix)/share/doc/nap
+ man_MANS = nap.1
+ html_DATA = userguide.html
+ all: all-am
diff --git a/audio/napster/files/patch-doc__Makefile.in b/audio/napster/files/patch-doc__Makefile.in
deleted file mode 100644
index c7394856d010..000000000000
--- a/audio/napster/files/patch-doc__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- doc/Makefile.in.orig Wed Jun 23 11:20:36 2004
-+++ doc/Makefile.in Wed Jun 23 11:22:22 2004
-@@ -124,7 +124,7 @@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
- EXTRA_DIST = nap.1.in userguide.html napster.txt
--htmldir = $(prefix)/doc/nap
-+htmldir = $(prefix)/share/doc/nap
- man_MANS = nap.1
- html_DATA = userguide.html
- all: all-am
diff --git a/audio/nas/files/patch-clients_audio_audemo_audemo.c b/audio/nas/files/patch-clients_audio_audemo_audemo.c
index 4620732d03b0..05b0ba8db1b3 100644
--- a/audio/nas/files/patch-clients_audio_audemo_audemo.c
+++ b/audio/nas/files/patch-clients_audio_audemo_audemo.c
@@ -1,36 +1,46 @@
---- clients/audio/audemo/audemo.c Sun Jun 20 15:06:50 2004
-+++ clients/audio/audemo/audemo.c Mon Oct 10 11:12:15 2005
-@@ -29,4 +29,5 @@
+--- clients/audio/audemo/audemo.c.orig 2013-10-07 17:05:48 UTC
++++ clients/audio/audemo/audemo.c
+@@ -28,6 +28,7 @@
+ */
#include "config.h"
+#include <inttypes.h>
#include <stdio.h>
-@@ -973,5 +973,5 @@
+ #if defined(HAVE_STDLIB_H)
+@@ -913,7 +914,7 @@ okAction(Widget w, XEvent *event, String
+ GlobalDataPtr globals;
/* retrieve the address of the globals from the first parameter */
- globals = (GlobalDataPtr) atoi(params[0]);
+ globals = (GlobalDataPtr)(uintptr_t)strtoull(params[0], NULL, 0);
saveOk(w, globals, 0);
}
-@@ -1296,5 +1296,5 @@
+
+@@ -1198,7 +1199,7 @@ static void
+ scrollProcCB(Widget w, XtPointer globalsp, XtPointer positionp)
{
GlobalDataPtr globals = (GlobalDataPtr) globalsp;
- int position = (int) positionp;
+ intptr_t position = (intptr_t) positionp;
int newVolume;
char buf[50];
-@@ -1363,5 +1363,5 @@
+
+@@ -1258,7 +1259,7 @@ static void
+ gainScrollCB(Widget w, XtPointer globalsp, XtPointer positionp)
{
GlobalDataPtr globals = (GlobalDataPtr) globalsp;
- int position = (int) positionp;
+ intptr_t position = (intptr_t) positionp;
int newGain;
char buf[50];
-@@ -1457,5 +1457,5 @@
+
+@@ -1342,7 +1343,7 @@ makeSaveDialog(GlobalDataPtr g)
+ MakeWidget(s->file, s->form, asciiTextWidgetClass, NULL, "filename");
/* pass the address of the globals as an argument to the action */
- sprintf(tmp, "<Key>Return: ok(%u)", (unsigned int) g);
+ sprintf(tmp, "<Key>Return: ok(%p)", g);
XtOverrideTranslations(s->file, XtParseTranslationTable(tmp));
+ /* file format */
diff --git a/audio/nas/files/patch-clients_audio_auedit_Graph.c b/audio/nas/files/patch-clients_audio_auedit_Graph.c
index 3b1a50905eaf..965022e11f5d 100644
--- a/audio/nas/files/patch-clients_audio_auedit_Graph.c
+++ b/audio/nas/files/patch-clients_audio_auedit_Graph.c
@@ -1,26 +1,32 @@
---- clients/audio/auedit/Graph.c Sun Jun 20 15:01:41 2004
-+++ clients/audio/auedit/Graph.c Mon Oct 10 11:21:15 2005
-@@ -29,4 +29,5 @@
+--- clients/audio/auedit/Graph.c.orig 2013-04-27 00:41:00 UTC
++++ clients/audio/auedit/Graph.c
+@@ -28,6 +28,7 @@
+ */
#include "config.h"
+#include <inttypes.h>
#if defined(HAVE_LIMITS_H)
-@@ -453,5 +454,5 @@
+ # include <limits.h>
+@@ -452,14 +453,14 @@ GraphWidget old,
+ if (w->graph.leftMarker != old->graph.leftMarker)
{
XtCallCallbacks((Widget) w, XtNleftProc,
- (XtPointer) w->graph.leftMarker);
+ (XtPointer)(intptr_t)w->graph.leftMarker);
redraw = TRUE;
}
-@@ -460,5 +461,5 @@
+
+ if (w->graph.rightMarker != old->graph.rightMarker)
{
XtCallCallbacks((Widget) w, XtNrightProc,
- (XtPointer) w->graph.rightMarker);
+ (XtPointer)(intptr_t)w->graph.rightMarker);
redraw = TRUE;
}
-@@ -540,8 +541,8 @@
+
+@@ -539,10 +540,10 @@ XButtonEvent *event;
+
if (w->graph.marker == GraphLeftMarker)
XtCallCallbacks((Widget) w, XtNleftProc,
- (XtPointer) w->graph.leftMarker);
@@ -31,3 +37,4 @@
+ (XtPointer)(intptr_t)w->graph.rightMarker);
}
+ /* public functions */
diff --git a/audio/nas/files/patch-clients_audio_auedit_auedit.c b/audio/nas/files/patch-clients_audio_auedit_auedit.c
index 7bf5bb1079be..a35745e61d52 100644
--- a/audio/nas/files/patch-clients_audio_auedit_auedit.c
+++ b/audio/nas/files/patch-clients_audio_auedit_auedit.c
@@ -1,36 +1,46 @@
---- clients/audio/auedit/auedit.c Sun Jun 20 15:06:50 2004
-+++ clients/audio/auedit/auedit.c Mon Oct 10 11:16:16 2005
-@@ -28,4 +28,5 @@
+--- clients/audio/auedit/auedit.c.orig 2013-10-07 17:05:48 UTC
++++ clients/audio/auedit/auedit.c
+@@ -27,6 +27,7 @@
+ * $NCDId: @(#)auedit.c,v 1.35 1995/12/06 01:10:29 greg Exp $
*/
+#include <inttypes.h>
#include <stdio.h>
-@@ -390,5 +390,5 @@
+ #include "config.h"
+@@ -389,7 +390,7 @@ XtPointer gp;
+ XtPointer pp;
{
GlobalDataPtr g = (GlobalDataPtr) gp;
- int p = (int) pp;
+ intptr_t p = (intptr_t) pp;
int n;
-@@ -406,5 +406,5 @@
+ XtVaGetValues(g->graph, XtNrightMarker, &n, NULL);
+@@ -405,7 +406,7 @@ XtPointer gp;
+ XtPointer pp;
{
GlobalDataPtr g = (GlobalDataPtr) gp;
- int p = (int) pp;
+ intptr_t p = (intptr_t) pp;
int n;
-@@ -457,5 +457,5 @@
+ XtVaGetValues(g->graph, XtNleftMarker, &n, NULL);
+@@ -456,7 +457,7 @@ XtPointer gp;
+ XtPointer gainp;
{
GlobalDataPtr g = (GlobalDataPtr) gp;
- int gain = (int) gainp;
+ intptr_t gain = (intptr_t) gainp;
AuDeviceAttributes da;
-@@ -1844,5 +1844,5 @@
+ if (!AuDeviceChangableMask(AuServerDevice(g->aud,
+@@ -1843,7 +1844,7 @@ XtPointer gp;
+ XtPointer valuep;
{
GlobalDataPtr g = (GlobalDataPtr) gp;
- int value = (int) valuep;
+ intptr_t value = (intptr_t) valuep;
AuElementParameters *parms;
ElementListPtr p = ElementList;
+ int i = 0;
diff --git a/audio/nas/files/patch-clients_audio_aupanel_aupanel.c b/audio/nas/files/patch-clients_audio_aupanel_aupanel.c
index ef466560e4ee..a0ac1fb8fd05 100644
--- a/audio/nas/files/patch-clients_audio_aupanel_aupanel.c
+++ b/audio/nas/files/patch-clients_audio_aupanel_aupanel.c
@@ -1,5 +1,5 @@
---- clients/audio/aupanel/aupanel.c.orig Tue Nov 22 03:09:06 2005
-+++ clients/audio/aupanel/aupanel.c Sat May 20 10:58:12 2006
+--- clients/audio/aupanel/aupanel.c.orig 2013-10-07 17:05:47 UTC
++++ clients/audio/aupanel/aupanel.c
@@ -28,6 +28,7 @@
*/
@@ -8,7 +8,7 @@
#include <stdlib.h>
#ifndef SYSV
#include <audio/Aos.h> /* for string and other os stuff */
-@@ -271,7 +272,7 @@
+@@ -280,7 +281,7 @@ inputModeCB(Widget w, XtPointer gp, XtPo
if (!state) /* ignore resets */
return;
@@ -17,7 +17,7 @@
? AuDeviceInputModeLineIn : AuDeviceInputModeMicrophone;
AuSetDeviceAttributes(g->aud, AuDeviceIdentifier(da),
-@@ -335,7 +336,7 @@
+@@ -331,7 +332,7 @@ setGain(Widget w, XtPointer gp, XtPointe
{
GlobalDataPtr g = (GlobalDataPtr) gp;
AuDeviceAttributes *da = &g->da[g->deviceNum];
@@ -26,7 +26,7 @@
AuDeviceGain(da) = AuFixedPointFromSum(value, 0);
AuSetDeviceAttributes(g->aud, AuDeviceIdentifier(da),
-@@ -366,7 +367,7 @@
+@@ -359,7 +360,7 @@ muteCB(Widget w, XtPointer gp, XtPointer
g->restoreValues[g->deviceNum] = current;
setGain(w, gp, (XtPointer)0);
} else if(g->restoreValues[g->deviceNum] > 0){
diff --git a/audio/nas/files/patch-clients_audio_auphone_auphone.c b/audio/nas/files/patch-clients_audio_auphone_auphone.c
index a548c98f2840..340489fc715e 100644
--- a/audio/nas/files/patch-clients_audio_auphone_auphone.c
+++ b/audio/nas/files/patch-clients_audio_auphone_auphone.c
@@ -1,5 +1,5 @@
---- clients/audio/auphone/auphone.c.orig 2007-06-16 23:03:12.000000000 +0400
-+++ clients/audio/auphone/auphone.c 2008-05-14 22:44:05.000000000 +0400
+--- clients/audio/auphone/auphone.c.orig 2013-10-07 17:05:48 UTC
++++ clients/audio/auphone/auphone.c
@@ -27,6 +27,7 @@
* $NCDId: @(#)auphone.c,v 1.10 1996/05/07 20:13:12 greg Exp $
*/
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
-@@ -219,13 +220,12 @@
+@@ -219,13 +220,12 @@ extern char *ringinData,
*ringoutData,
*busyData;
@@ -23,7 +23,7 @@
}
static void
-@@ -237,7 +237,7 @@
+@@ -237,7 +237,7 @@ readData(GlobalDataPtr g, AuElementNotif
{
g->bufSize = e->num_bytes;
@@ -32,7 +32,7 @@
fatalError("malloc failed", NULL);
}
else
-@@ -249,8 +249,8 @@
+@@ -249,8 +249,8 @@ readData(GlobalDataPtr g, AuElementNotif
g->bufSize += e->num_bytes;
@@ -43,7 +43,7 @@
}
n = AuReadElement(g->local.aud, e->flow, e->element_num, e->num_bytes,
-@@ -871,7 +871,7 @@
+@@ -871,7 +871,7 @@ static void
adjustVolume(Widget w, XtPointer gp, XtPointer volp)
{
GlobalDataPtr g = (GlobalDataPtr)gp;
@@ -52,7 +52,7 @@
AuElementParameters parms;
if (!g->local.volFlow)
-@@ -890,7 +890,7 @@
+@@ -890,7 +890,7 @@ static void
adjustInputGain(Widget w, XtPointer gp, XtPointer gainp)
{
GlobalDataPtr g = (GlobalDataPtr)gp;
@@ -61,7 +61,7 @@
ServerPtr l = &g->local;
AuDeviceAttributes da;
-@@ -1065,7 +1065,7 @@
+@@ -1065,7 +1065,7 @@ initLocalAudioServer(GlobalDataPtr g, ch
if (!(s = SoundOpenFileForReading(ring)))
fatalError("Can't open ring %s", ring);
diff --git a/audio/nas/files/patch-clients_audio_autool_audiotool.c b/audio/nas/files/patch-clients_audio_autool_audiotool.c
index b137e650843d..0ea93642012a 100644
--- a/audio/nas/files/patch-clients_audio_autool_audiotool.c
+++ b/audio/nas/files/patch-clients_audio_autool_audiotool.c
@@ -1,22 +1,28 @@
---- clients/audio/autool/audiotool.c Sun Jun 20 19:27:08 2004
-+++ clients/audio/autool/audiotool.c Mon Oct 10 11:24:41 2005
-@@ -30,4 +30,5 @@
+--- clients/audio/autool/audiotool.c.orig 2013-10-07 17:05:48 UTC
++++ clients/audio/autool/audiotool.c
+@@ -29,6 +29,7 @@
+
#include "config.h"
+#include <inttypes.h>
- #include <stdio.h>
+ #include <stdio.h>
-@@ -37,5 +38,5 @@
+ #if defined(HAVE_STDLIB_H)
+@@ -36,7 +37,7 @@
+ #endif
#if defined(HAVE_MALLOC_H)
-# include <malloc.h>
+# include <stdlib.h>
#endif
-@@ -387,5 +388,5 @@
+ #include <audio/audiolib.h>
+@@ -366,7 +367,7 @@ static void
+ scrollProcCB(Widget w, XtPointer data, XtPointer cd)
{
GlobalDataPtr globals = (GlobalDataPtr) data;
- int position = (int) cd;
+ intptr_t position = (intptr_t) cd;
int newVolume;
char buf[50];
+
diff --git a/audio/nas/files/patch-clients_audio_auwave_auwave.c b/audio/nas/files/patch-clients_audio_auwave_auwave.c
index a5a02649bce9..799a833ad178 100644
--- a/audio/nas/files/patch-clients_audio_auwave_auwave.c
+++ b/audio/nas/files/patch-clients_audio_auwave_auwave.c
@@ -1,29 +1,37 @@
---- clients/audio/auwave/auwave.c Thu Apr 7 15:08:14 2005
-+++ clients/audio/auwave/auwave.c Mon Oct 10 11:26:40 2005
-@@ -28,4 +28,5 @@
+--- clients/audio/auwave/auwave.c.orig 2013-10-07 17:05:47 UTC
++++ clients/audio/auwave/auwave.c
+@@ -27,6 +27,7 @@
+ * $NCDId: @(#)auwave.c,v 1.7 1994/11/01 23:18:30 greg Exp $
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
-@@ -237,5 +238,5 @@
+ #ifndef SYSV
+@@ -222,7 +223,7 @@ static void
+ setVol(Widget w, XtPointer gp, XtPointer valuep)
{
GlobalDataPtr g = (GlobalDataPtr) gp;
- int value = (int) valuep;
+ intptr_t value = (intptr_t) valuep;
AuElementParameters parms;
-@@ -259,5 +260,5 @@
+
+@@ -241,7 +242,7 @@ static void
+ setFreq(Widget w, XtPointer gp, XtPointer valuep)
{
GlobalDataPtr g = (GlobalDataPtr) gp;
- int value = (int) valuep;
+ intptr_t value = (intptr_t) valuep;
AuElementParameters parms;
char buf[10];
-@@ -284,5 +285,5 @@
+
+@@ -263,7 +264,7 @@ static void
+ setGain(Widget w, XtPointer gp, XtPointer valuep)
{
GlobalDataPtr g = (GlobalDataPtr) gp;
- int value = (int) valuep;
+ intptr_t value = (intptr_t) valuep;
AuDeviceAttributes da;
+ AuDeviceGain(&da) = AuFixedPointFromSum(value, 0);
diff --git a/audio/nas/files/patch-config_NetAudio.def b/audio/nas/files/patch-config_NetAudio.def
index e06f32944189..7d098d6ab598 100644
--- a/audio/nas/files/patch-config_NetAudio.def
+++ b/audio/nas/files/patch-config_NetAudio.def
@@ -1,9 +1,10 @@
---- config/NetAudio.def.orig Sun Feb 13 05:31:14 2000
-+++ config/NetAudio.def Fri Mar 24 04:55:49 2000
-@@ -8,5 +8,5 @@
+--- config/NetAudio.def.orig 2013-04-27 00:41:00 UTC
++++ config/NetAudio.def
+@@ -8,6 +8,6 @@
XCOMM Directory where NAS will look for it's config file(s)
#ifndef NasConfigSearchPath
-#define NasConfigSearchPath /etc/nas/
+#define NasConfigSearchPath $(PROJECTROOT)/etc/
#endif
+
diff --git a/audio/nas/files/patch-server_dda_voxware_auvoxware.c b/audio/nas/files/patch-server_dda_voxware_auvoxware.c
index d36871915fe7..104cad814fab 100644
--- a/audio/nas/files/patch-server_dda_voxware_auvoxware.c
+++ b/audio/nas/files/patch-server_dda_voxware_auvoxware.c
@@ -1,6 +1,6 @@
---- server/dda/voxware/auvoxware.c.orig 2008-05-14 22:35:08.000000000 +0400
-+++ server/dda/voxware/auvoxware.c 2008-05-14 22:40:32.000000000 +0400
-@@ -133,7 +133,7 @@
+--- server/dda/voxware/auvoxware.c.orig 2013-08-13 18:50:30 UTC
++++ server/dda/voxware/auvoxware.c
+@@ -133,7 +133,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include <stdio.h>
#include <stdlib.h>
@@ -9,7 +9,7 @@
#include <getopt.h>
#endif
#include <sys/types.h>
-@@ -183,7 +183,9 @@
+@@ -183,7 +183,9 @@ static int debug_msg_indentation = 0;
# else
# include <machine/soundcard.h>
# endif
@@ -19,7 +19,7 @@
#else
# ifdef __NetBSD__
# include <sys/ioctl.h>
-@@ -875,7 +877,11 @@
+@@ -875,7 +877,11 @@ openDevice(AuBool wait)
if (sndStatOut.fd == -1) {
while ((sndStatOut.fd = open(sndStatOut.device,
sndStatOut.
@@ -31,7 +31,7 @@
0666)) == -1 && wait) {
osLogMsg("openDevice: waiting on output device\n");
sleep(1);
-@@ -1618,6 +1624,11 @@
+@@ -1624,6 +1630,11 @@ setWritePhysicalOutputFunction(CompiledF
/*
* Setup soundcard at maximum audio quality.
*/
@@ -43,7 +43,7 @@
static void
setupSoundcard(SndStat * sndStatPtr)
{
-@@ -1880,7 +1891,11 @@
+@@ -1886,7 +1897,11 @@ AuInitPhysicalDevices(void)
sndStatOut.device, sndStatOut.howToOpen);
if ((fd = open(sndStatOut.device,
diff --git a/audio/nas/files/patch-server_dda_voxware_config.c b/audio/nas/files/patch-server_dda_voxware_config.c
index 3acfe5bef98a..0d0bf279b40d 100644
--- a/audio/nas/files/patch-server_dda_voxware_config.c
+++ b/audio/nas/files/patch-server_dda_voxware_config.c
@@ -1,5 +1,5 @@
---- server/dda/voxware/config.c.orig 2007-06-16 23:03:22.000000000 +0400
-+++ server/dda/voxware/config.c 2008-05-14 22:49:23.000000000 +0400
+--- server/dda/voxware/config.c.orig 2013-04-27 00:41:06 UTC
++++ server/dda/voxware/config.c
@@ -5,6 +5,7 @@
*/
@@ -8,7 +8,7 @@
#include "nasconf.h"
#include "config.h"
#include "aulog.h"
-@@ -27,7 +28,7 @@
+@@ -27,7 +28,7 @@ ddaSetConfig(int token, void *value)
switch (token) {
case CONF_SET_SECTION:
@@ -17,7 +17,7 @@
if (num == INPUTSECTION) { /* we're in the input section */
confStat = &sndStatIn;
-@@ -37,12 +38,12 @@
+@@ -37,12 +38,12 @@ ddaSetConfig(int token, void *value)
break;
case FORCERATE:
@@ -32,7 +32,7 @@
if (num < 0 || num > 100)
osLogMsg("config: gain scaling must be within the range 0-100\n");
else
-@@ -50,7 +51,7 @@
+@@ -50,7 +51,7 @@ ddaSetConfig(int token, void *value)
break;
case GAIN:
@@ -41,7 +41,7 @@
/* the default is 50, so if it's just out of range, don't
reset it */
if (num < 0 || num > 100)
-@@ -61,12 +62,12 @@
+@@ -61,12 +62,12 @@ ddaSetConfig(int token, void *value)
break;
case AUTOOPEN:
@@ -56,7 +56,7 @@
if (confStat == &sndStatIn) {
confStat->howToOpen = (num ? O_RDWR : O_RDONLY);
} else {
-@@ -89,7 +90,7 @@
+@@ -89,7 +90,7 @@ ddaSetConfig(int token, void *value)
break;
case WORDSIZE:
@@ -65,7 +65,7 @@
if (num != 8 && num != 16) {
osLogMsg("config: Wordsize (%d) not 8 or 16, setting to 8\n",
-@@ -100,7 +101,7 @@
+@@ -100,7 +101,7 @@ ddaSetConfig(int token, void *value)
break;
case FRAGSIZE:
@@ -74,7 +74,7 @@
{
int i, j, k;
-@@ -125,7 +126,7 @@
+@@ -125,7 +126,7 @@ ddaSetConfig(int token, void *value)
break;
case MINFRAGS:
@@ -83,7 +83,7 @@
if (num < 2 || num > 32) {
osLogMsg("config: Minfrags out of range - setting to 2\n");
-@@ -138,7 +139,7 @@
+@@ -138,7 +139,7 @@ ddaSetConfig(int token, void *value)
break;
case MAXFRAGS:
@@ -92,7 +92,7 @@
if (num < 2 || num > 32) {
osLogMsg("config: Maxfrags out of range - setting to 32\n");
-@@ -151,7 +152,7 @@
+@@ -151,7 +152,7 @@ ddaSetConfig(int token, void *value)
break;
case NUMCHANS:
@@ -101,7 +101,7 @@
if (num != 1 && num != 2) {
osLogMsg("config: Number of channels wrong, setting to 1\n");
-@@ -161,25 +162,25 @@
+@@ -161,25 +162,25 @@ ddaSetConfig(int token, void *value)
break;
case MAXRATE:
diff --git a/audio/nas/files/patch-server_dia_gram.y b/audio/nas/files/patch-server_dia_gram.y
index 11edf436ffaf..5df223068240 100644
--- a/audio/nas/files/patch-server_dia_gram.y
+++ b/audio/nas/files/patch-server_dia_gram.y
@@ -1,5 +1,5 @@
---- server/dia/gram.y.orig 2007-06-16 23:03:22.000000000 +0400
-+++ server/dia/gram.y 2008-05-14 22:51:53.000000000 +0400
+--- server/dia/gram.y.orig 2013-04-27 00:41:06 UTC
++++ server/dia/gram.y
@@ -3,6 +3,7 @@
@@ -25,7 +25,7 @@
char *ptr;
};
-@@ -250,30 +251,21 @@
+@@ -250,30 +251,21 @@ char *str;
*o = '\0';
}
diff --git a/audio/nas/files/patch-server_dia_lex.l b/audio/nas/files/patch-server_dia_lex.l
index 91e39e76f131..782b31cdaa49 100644
--- a/audio/nas/files/patch-server_dia_lex.l
+++ b/audio/nas/files/patch-server_dia_lex.l
@@ -1,29 +1,38 @@
---- server/dia/lex.l Tue Jul 9 22:28:41 2002
-+++ server/dia/lex.l Mon Oct 10 10:47:16 2005
-@@ -3,4 +3,5 @@
-
- %{
-+#include <inttypes.h>
- #include "auservertype.h"
- #include "gram.h"
-+++ clients/audio/widgets/Slider.c Mon Oct 10 11:04:41 2005
-@@ -32,4 +32,5 @@
+--- clients/audio/widgets/Slider.c.orig 2013-04-27 00:41:00 UTC
++++ clients/audio/widgets/Slider.c
+@@ -31,6 +31,7 @@
+ #include <X11/StringDefs.h>
#include <X11/Xaw/Label.h>
#include <X11/Xaw/Scrollbar.h>
+#include <inttypes.h>
#include <stdio.h>
#include "SliderP.h"
-@@ -151,5 +152,5 @@
+
+@@ -148,7 +149,7 @@ setValue(SliderWidget w, int value, Bool
+ XawScrollbarSetThumb(w->slider.scrollbarW,
(float) w->slider.value / w->slider.max, -1.0);
- XtCallCallbacks((Widget) w, XtNcallback, (XtPointer) w->slider.value);
+ XtCallCallbacks((Widget) w, XtNcallback, (XtPointer)(intptr_t)w->slider.value);
}
}
-@@ -162,5 +163,5 @@
+
+@@ -156,7 +157,7 @@ static void
+ scroll(Widget w, XtPointer swp, XtPointer positionp)
{
SliderWidget sw = (SliderWidget) swp;
- int position = (int) positionp;
+ intptr_t position = (intptr_t) positionp;
setValue(sw, sw->slider.value + (position > 0 ? -1 : 1), True, False);
+ }
+--- server/dia/lex.l.orig 2013-04-27 00:41:06 UTC
++++ server/dia/lex.l
+@@ -2,6 +2,7 @@
+ /* $NCDId: @(#)lex.l,v 1.1 1996/04/24 17:01:06 greg Exp $ */
+
+ %{
++#include <inttypes.h>
+ #include "auservertype.h"
+ #include "gram.h"
+ #include "nasconf.h"
diff --git a/audio/nas/files/patch-tmpl b/audio/nas/files/patch-tmpl
index 8be973f99326..db29c2bc8e95 100644
--- a/audio/nas/files/patch-tmpl
+++ b/audio/nas/files/patch-tmpl
@@ -1,9 +1,11 @@
---- config/NetAudio.tmpl Sat Feb 14 18:38:32 2004
-+++ config/NetAudio.tmpl Mon Oct 10 13:27:33 2005
-@@ -59,5 +59,5 @@
+--- config/NetAudio.tmpl.orig 2013-04-27 00:41:00 UTC
++++ config/NetAudio.tmpl
+@@ -87,7 +87,7 @@ EXTRA_LOAD_FLAGS=/link /nodefaultlib:lib
+
#if HasSharedLibraries
#define NormalLibAudio NormalLibX
-#define SharedLibAudio SharedLibX
+#define SharedLibAudio YES
#define DebugLibAudio DebugLibX
#define ProfileLibAudio ProfileLibX
+ #else
diff --git a/audio/nas/files/patch-useXt b/audio/nas/files/patch-useXt
index 290772ab8d48..11401cbf961e 100644
--- a/audio/nas/files/patch-useXt
+++ b/audio/nas/files/patch-useXt
@@ -1,6 +1,6 @@
---- lib/audio/Imakefile.orig 2011-01-26 14:10:17.000000000 -0200
-+++ lib/audio/Imakefile 2011-08-23 13:58:17.000000000 -0300
-@@ -150,9 +150,7 @@
+--- lib/audio/Imakefile.orig 2013-04-27 00:41:05 UTC
++++ lib/audio/Imakefile
+@@ -150,9 +150,7 @@ XAULIB =
XAULIB = -lXau
#endif
diff --git a/audio/ncmpcpp/files/patch-src_browser.cpp b/audio/ncmpcpp/files/patch-src_browser.cpp
index ca8ca3b38d74..e82bcc3e0e86 100644
--- a/audio/ncmpcpp/files/patch-src_browser.cpp
+++ b/audio/ncmpcpp/files/patch-src_browser.cpp
@@ -1,4 +1,4 @@
---- src/browser.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/browser.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/browser.cpp
@@ -42,6 +42,7 @@
#include "utility/comparators.h"
diff --git a/audio/ncmpcpp/files/patch-src_configuration.cpp b/audio/ncmpcpp/files/patch-src_configuration.cpp
index f519c206a591..b07a0a235cb1 100644
--- a/audio/ncmpcpp/files/patch-src_configuration.cpp
+++ b/audio/ncmpcpp/files/patch-src_configuration.cpp
@@ -1,4 +1,4 @@
---- src/configuration.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/configuration.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/configuration.cpp
@@ -29,6 +29,7 @@
#include "mpdpp.h"
diff --git a/audio/ncmpcpp/files/patch-src_helpers.cpp b/audio/ncmpcpp/files/patch-src_helpers.cpp
index cc2045b8f1bb..5989c3dc09e5 100644
--- a/audio/ncmpcpp/files/patch-src_helpers.cpp
+++ b/audio/ncmpcpp/files/patch-src_helpers.cpp
@@ -1,4 +1,4 @@
---- src/helpers.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/helpers.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/helpers.cpp
@@ -26,6 +26,7 @@
#include "playlist.h"
diff --git a/audio/ncmpcpp/files/patch-src_media__library.cpp b/audio/ncmpcpp/files/patch-src_media__library.cpp
index cbf51fa88d60..ef6774836b0f 100644
--- a/audio/ncmpcpp/files/patch-src_media__library.cpp
+++ b/audio/ncmpcpp/files/patch-src_media__library.cpp
@@ -1,4 +1,4 @@
---- src/media_library.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/media_library.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/media_library.cpp
@@ -40,6 +40,7 @@
#include "utility/type_conversions.h"
diff --git a/audio/ncmpcpp/files/patch-src_mpdpp.cpp b/audio/ncmpcpp/files/patch-src_mpdpp.cpp
index db5a6c03c5be..4d03b43c92f8 100644
--- a/audio/ncmpcpp/files/patch-src_mpdpp.cpp
+++ b/audio/ncmpcpp/files/patch-src_mpdpp.cpp
@@ -1,6 +1,6 @@
---- src/mpdpp.cpp.orig 2015-11-09 12:52:27 UTC
+--- src/mpdpp.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/mpdpp.cpp
-@@ -95,6 +95,8 @@ Connection::Connection() : m_connection(
+@@ -105,6 +105,8 @@ Connection::Connection() : m_connection(
m_port(6600),
m_timeout(15)
{
@@ -9,7 +9,7 @@
}
void Connection::Connect()
-@@ -560,7 +562,7 @@ bool Connection::AddRandomTag(mpd_tag_ty
+@@ -570,7 +572,7 @@ bool Connection::AddRandomTag(mpd_tag_ty
if (number > tags.size())
return false;
@@ -18,7 +18,7 @@
auto it = tags.begin();
for (size_t i = 0; i < number && it != tags.end(); ++i)
{
-@@ -599,7 +601,7 @@ bool Connection::AddRandomSongs(size_t n
+@@ -609,7 +611,7 @@ bool Connection::AddRandomSongs(size_t n
}
else
{
diff --git a/audio/ncmpcpp/files/patch-src_mpdpp.h b/audio/ncmpcpp/files/patch-src_mpdpp.h
index 38eb97278d1c..5ef20ebbafb7 100644
--- a/audio/ncmpcpp/files/patch-src_mpdpp.h
+++ b/audio/ncmpcpp/files/patch-src_mpdpp.h
@@ -1,4 +1,4 @@
---- src/mpdpp.h.orig 2015-11-09 12:51:44 UTC
+--- src/mpdpp.h.orig 2016-04-17 05:41:01 UTC
+++ src/mpdpp.h
@@ -23,6 +23,7 @@
diff --git a/audio/ncmpcpp/files/patch-src_playlist.cpp b/audio/ncmpcpp/files/patch-src_playlist.cpp
index 6e4ddac347d9..eabea233322f 100644
--- a/audio/ncmpcpp/files/patch-src_playlist.cpp
+++ b/audio/ncmpcpp/files/patch-src_playlist.cpp
@@ -1,4 +1,4 @@
---- src/playlist.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/playlist.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/playlist.cpp
@@ -35,6 +35,7 @@
#include "utility/comparators.h"
diff --git a/audio/ncmpcpp/files/patch-src_playlist__editor.cpp b/audio/ncmpcpp/files/patch-src_playlist__editor.cpp
index b71d69658a8b..6110fdfa5cfb 100644
--- a/audio/ncmpcpp/files/patch-src_playlist__editor.cpp
+++ b/audio/ncmpcpp/files/patch-src_playlist__editor.cpp
@@ -1,4 +1,4 @@
---- src/playlist_editor.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/playlist_editor.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/playlist_editor.cpp
@@ -39,6 +39,7 @@
#include "utility/comparators.h"
diff --git a/audio/ncmpcpp/files/patch-src_search__engine.cpp b/audio/ncmpcpp/files/patch-src_search__engine.cpp
index 68dff6bbce42..b4d8e60e8b21 100644
--- a/audio/ncmpcpp/files/patch-src_search__engine.cpp
+++ b/audio/ncmpcpp/files/patch-src_search__engine.cpp
@@ -1,4 +1,4 @@
---- src/search_engine.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/search_engine.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/search_engine.cpp
@@ -35,6 +35,7 @@
#include "utility/comparators.h"
diff --git a/audio/ncmpcpp/files/patch-src_status.cpp b/audio/ncmpcpp/files/patch-src_status.cpp
index 72edb2b0666c..0ebd286df741 100644
--- a/audio/ncmpcpp/files/patch-src_status.cpp
+++ b/audio/ncmpcpp/files/patch-src_status.cpp
@@ -1,4 +1,4 @@
---- src/status.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/status.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/status.cpp
@@ -21,6 +21,8 @@
#include <boost/date_time/posix_time/posix_time.hpp>
diff --git a/audio/ncmpcpp/files/patch-src_tag__editor.cpp b/audio/ncmpcpp/files/patch-src_tag__editor.cpp
index f50899f6c8e8..b5979181ec7e 100644
--- a/audio/ncmpcpp/files/patch-src_tag__editor.cpp
+++ b/audio/ncmpcpp/files/patch-src_tag__editor.cpp
@@ -1,4 +1,4 @@
---- src/tag_editor.cpp.orig 2015-11-04 20:01:29 UTC
+--- src/tag_editor.cpp.orig 2016-04-17 05:41:01 UTC
+++ src/tag_editor.cpp
@@ -42,6 +42,7 @@
#include "title.h"
diff --git a/audio/ncmpcpp/files/patch-src_window.h b/audio/ncmpcpp/files/patch-src_window.h
index 0ab80f40698f..7e7c93bda8fc 100644
--- a/audio/ncmpcpp/files/patch-src_window.h
+++ b/audio/ncmpcpp/files/patch-src_window.h
@@ -1,4 +1,4 @@
---- src/window.h.orig 2015-11-04 20:01:29 UTC
+--- src/window.h.orig 2016-04-17 05:41:01 UTC
+++ src/window.h
@@ -23,7 +23,9 @@
diff --git a/audio/nosefart/files/patch-Makefile b/audio/nosefart/files/patch-Makefile
index d4af7a2b2769..49d473e333bf 100644
--- a/audio/nosefart/files/patch-Makefile
+++ b/audio/nosefart/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Wed Sep 24 11:02:34 2003
-+++ Makefile Wed Sep 24 19:43:19 2003
+--- Makefile.orig 2003-09-24 18:02:34 UTC
++++ Makefile
@@ -1,11 +1,10 @@
################################
# Configuration
diff --git a/audio/nosefart/files/patch-src-sndhrdw-nes_apu.c b/audio/nosefart/files/patch-src-sndhrdw-nes_apu.c
deleted file mode 100644
index efa8af47ccea..000000000000
--- a/audio/nosefart/files/patch-src-sndhrdw-nes_apu.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- src/sndhrdw/nes_apu.c.orig 2007-10-30 22:51:03.000000000 +0100
-+++ src/sndhrdw/nes_apu.c 2007-10-30 22:52:28.000000000 +0100
-@@ -980,6 +980,9 @@
- uint32 elapsed_cycles;
- static int32 prev_sample = 0;
- int32 next_sample, accum;
-+ uint8 *buff_u8 = (uint8 *)buffer;
-+ int16 *buff_16 = (int16 *)buffer;
-+
-
- ASSERT(apu);
-
-@@ -1035,9 +1038,9 @@
-
- /* signed 16-bit output, unsigned 8-bit */
- if (16 == apu->sample_bits)
-- *((int16 *) buffer)++ = (int16) accum;
-- else
-- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
-+ *buff_16++ = (int16) accum;
-+ else
-+ *buff_u8++ = (accum >> 8) ^0x80;
- }
-
- /* resync cycle counter */
diff --git a/audio/nosefart/files/patch-src_sndhrdw_nes__apu.c b/audio/nosefart/files/patch-src_sndhrdw_nes__apu.c
new file mode 100644
index 000000000000..0f6c08660923
--- /dev/null
+++ b/audio/nosefart/files/patch-src_sndhrdw_nes__apu.c
@@ -0,0 +1,25 @@
+--- src/sndhrdw/nes_apu.c.orig 2003-05-04 18:39:04 UTC
++++ src/sndhrdw/nes_apu.c
+@@ -980,6 +980,9 @@ void apu_process(void *buffer, int num_s
+ uint32 elapsed_cycles;
+ static int32 prev_sample = 0;
+ int32 next_sample, accum;
++ uint8 *buff_u8 = (uint8 *)buffer;
++ int16 *buff_16 = (int16 *)buffer;
++
+
+ ASSERT(apu);
+
+@@ -1035,9 +1038,9 @@ void apu_process(void *buffer, int num_s
+
+ /* signed 16-bit output, unsigned 8-bit */
+ if (16 == apu->sample_bits)
+- *((int16 *) buffer)++ = (int16) accum;
+- else
+- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
++ *buff_16++ = (int16) accum;
++ else
++ *buff_u8++ = (accum >> 8) ^0x80;
+ }
+
+ /* resync cycle counter */
diff --git a/audio/nspmod/files/patch-Makefile b/audio/nspmod/files/patch-Makefile
index 07273f38949f..9e9c4f038938 100644
--- a/audio/nspmod/files/patch-Makefile
+++ b/audio/nspmod/files/patch-Makefile
@@ -1,21 +1,13 @@
-*** Makefile.orig Sun Sep 17 06:18:20 1995
---- Makefile Tue Jun 3 02:48:46 1997
-***************
-*** 25,32 ****
-
- #}
-
-! CFLAGS = $(CFLAGS_OS) $(CFLAGS_OPT) $(CFLAGS_EXT)
-! CFLAGS_HIOPT_ = $(CFLAGS_OS) $(CFLAGS_HIOPT) $(CFLAGS_EXT)
- LDFLAGS = $(LDFLAGS_OS) $(LDFLAGS_EXT)
- LIBS = $(LIBS_EXT) $(LIBS_OS)
-
---- 25,32 ----
-
- #}
-
-! #CFLAGS = $(CFLAGS_OS) $(CFLAGS_OPT) $(CFLAGS_EXT)
-! CFLAGS_HIOPT_ = $(CFLAGS) $(CFLAGS_HIOPT)
- LDFLAGS = $(LDFLAGS_OS) $(LDFLAGS_EXT)
- LIBS = $(LIBS_EXT) $(LIBS_OS)
-
+--- Makefile.orig 1995-09-17 13:18:20 UTC
++++ Makefile
+@@ -25,8 +25,8 @@ DACIO_ARCH = dacio-linux.c
+
+ #}
+
+-CFLAGS = $(CFLAGS_OS) $(CFLAGS_OPT) $(CFLAGS_EXT)
+-CFLAGS_HIOPT_ = $(CFLAGS_OS) $(CFLAGS_HIOPT) $(CFLAGS_EXT)
++#CFLAGS = $(CFLAGS_OS) $(CFLAGS_OPT) $(CFLAGS_EXT)
++CFLAGS_HIOPT_ = $(CFLAGS) $(CFLAGS_HIOPT)
+ LDFLAGS = $(LDFLAGS_OS) $(LDFLAGS_EXT)
+ LIBS = $(LIBS_EXT) $(LIBS_OS)
+
diff --git a/audio/nspmod/files/patch-dacio-linux.c b/audio/nspmod/files/patch-dacio-linux.c
index f31c4efea135..c81ebe12ee3a 100644
--- a/audio/nspmod/files/patch-dacio-linux.c
+++ b/audio/nspmod/files/patch-dacio-linux.c
@@ -1,5 +1,5 @@
---- dacio-linux.c.orig Sun Sep 17 05:51:43 1995
-+++ dacio-linux.c Thu Aug 22 20:42:04 2002
+--- dacio-linux.c.orig 1995-09-17 12:51:43 UTC
++++ dacio-linux.c
@@ -3,7 +3,11 @@
#include <fcntl.h> /*O_WRONLY*/
#include <sys/ioctl.h> /*(ioctl)*/
@@ -12,7 +12,7 @@
#include <errno.h> /*EINTR*/
#include "defs.h" /*u8,u16*/
#include "dacio.h" /*(dacioXXX)*/
-@@ -47,7 +51,7 @@
+@@ -47,7 +51,7 @@ dacioInit(void)
static struct {
union {
u8 *p8;
@@ -21,7 +21,7 @@
} p;
u8 *top;
u8 *bot;
-@@ -67,11 +71,39 @@
+@@ -67,11 +71,39 @@ dacioConf(DacioConfInfo *dcp)
exit(1);
}
#endif
@@ -62,7 +62,7 @@
/*fprintf(stderr, "fmt = 0x%x\n", tmp);*/
if (ioctl(fd, SNDCTL_DSP_STEREO, &dcp->stereo) < 0) {
-@@ -90,10 +122,15 @@
+@@ -90,10 +122,15 @@ dacioConf(DacioConfInfo *dcp)
perror("dacioConf");
exit(1);
}
@@ -79,7 +79,7 @@
buf.p.p8 = buf.top;
buf.bot = buf.top + buf.size;
}
-@@ -115,7 +152,14 @@
+@@ -115,7 +152,14 @@ dacioFlush(void)
int s;
if (buf.p.p8 <= buf.top) return;
@@ -95,7 +95,7 @@
RETRY:
s = write(fd, buf.top, buf.size);
if (s < buf.size) {
-@@ -179,6 +223,8 @@
+@@ -179,6 +223,8 @@ dacioGlobalVol(i15x v)
(tmpvar & ~255)? ~tmpvar >> 16 : tmpvar ) /* 16 will be OK */
/* ~(tmpvar >> 16) makes longer asm */
#endif
@@ -104,7 +104,7 @@
/* stereo */
static void
-@@ -186,14 +232,26 @@
+@@ -186,14 +232,26 @@ dacioOutHirevS(i15x n)
{
const i31 *inbufp = inbuf.p;
u8 *u8p = buf.p.p8;
@@ -136,7 +136,7 @@
}
/* mono */
-@@ -202,19 +260,31 @@
+@@ -202,19 +260,31 @@ dacioOutHirevM(i15x n)
{
const i31 *inbufp = inbuf.p;
u8 *u8p = buf.p.p8;
diff --git a/audio/nspmod/files/patch-dacio.h b/audio/nspmod/files/patch-dacio.h
index eaf68819e358..6f4e2379debc 100644
--- a/audio/nspmod/files/patch-dacio.h
+++ b/audio/nspmod/files/patch-dacio.h
@@ -1,12 +1,10 @@
-*** dacio.h.orig Wed Sep 3 14:58:39 1997
---- dacio.h Wed Sep 3 13:49:32 1997
-***************
-*** 3,8 ****
---- 3,9 ----
- #endif
-
- typedef struct {
-+ int bits;
- int speed;
- int stereo;
- } DacioConfInfo;
+--- dacio.h.orig 1995-09-16 07:01:08 UTC
++++ dacio.h
+@@ -3,6 +3,7 @@
+ #endif
+
+ typedef struct {
++ int bits;
+ int speed;
+ int stereo;
+ } DacioConfInfo;
diff --git a/audio/nspmod/files/patch-nspmod.c b/audio/nspmod/files/patch-nspmod.c
index e031445d0fdd..ed4bb6938760 100644
--- a/audio/nspmod/files/patch-nspmod.c
+++ b/audio/nspmod/files/patch-nspmod.c
@@ -1,50 +1,35 @@
-*** nspmod.c.orig Wed Sep 3 14:58:19 1997
---- nspmod.c Wed Sep 3 14:55:06 1997
-***************
-*** 1,4 ****
---- 1,5 ----
- #include <stdio.h> /*(perror)*/
-+ #include <sys/types.h>
- #include <sys/mman.h> /*PROT_READ,MAP_xxx*/
- #include <fcntl.h> /*O_RDONLY*/
- #include <sys/stat.h> /*stat*/
-***************
-*** 35,40 ****
---- 36,42 ----
- printf("NSPmod version " LIT(VERSION_MAJOR) "." LIT(VERSION_MINOR) "\n");
- printf("Usage: %s [options] modfile\n", argv0);
- printf("Options:\n");
-+ printf(" -b # number of bits to output (8 or 16)\n");
- printf(" -c # play only the channel\n");
- printf(" -e show events\n");
- printf(" -f # output sample rate\n");
-***************
-*** 62,69 ****
- oi.outRate = DEF_OUTRATE;
- oi.ovsFreq = -1;
- /*oi.repLimit = 1;*/
-! while ((optChar = getopt(argc, argv, "c:ef:il:mo:rs:v:")) > 0) {
- switch (optChar) {
- case 'c': oi.onlyCh = (i15x)strtol(optarg, NULL, 0) | 0x100; break;
- case 'e': oi.showEvents++; break;
- case 'f': oi.outRate = (u16x)strtol(optarg, NULL, 0); break;
---- 64,72 ----
- oi.outRate = DEF_OUTRATE;
- oi.ovsFreq = -1;
- /*oi.repLimit = 1;*/
-! while ((optChar = getopt(argc, argv, "b:c:ef:il:mo:rs:v:")) > 0) {
- switch (optChar) {
-+ case 'b': oi.bits = (i15x)strtol(optarg, NULL, 0); break;
- case 'c': oi.onlyCh = (i15x)strtol(optarg, NULL, 0) | 0x100; break;
- case 'e': oi.showEvents++; break;
- case 'f': oi.outRate = (u16x)strtol(optarg, NULL, 0); break;
-***************
-*** 116,121 ****
---- 119,125 ----
-
- lookOverFile(p, statbuf.st_size);
- dacioInit();
-+ dci.bits = oi.bits;
- dci.speed = oi.outRate;
- dci.stereo = !oi.mono;
- dacioConf(&dci);
+--- nspmod.c.orig 1995-09-16 08:10:37 UTC
++++ nspmod.c
+@@ -1,4 +1,5 @@
+ #include <stdio.h> /*(perror)*/
++#include <sys/types.h>
+ #include <sys/mman.h> /*PROT_READ,MAP_xxx*/
+ #include <fcntl.h> /*O_RDONLY*/
+ #include <sys/stat.h> /*stat*/
+@@ -35,6 +36,7 @@ help(const char *argv0)
+ printf("NSPmod version " LIT(VERSION_MAJOR) "." LIT(VERSION_MINOR) "\n");
+ printf("Usage: %s [options] modfile\n", argv0);
+ printf("Options:\n");
++ printf(" -b # number of bits to output (8 or 16)\n");
+ printf(" -c # play only the channel\n");
+ printf(" -e show events\n");
+ printf(" -f # output sample rate\n");
+@@ -62,8 +64,9 @@ main(int argc, char *argv[])
+ oi.outRate = DEF_OUTRATE;
+ oi.ovsFreq = -1;
+ /*oi.repLimit = 1;*/
+- while ((optChar = getopt(argc, argv, "c:ef:il:mo:rs:v:")) > 0) {
++ while ((optChar = getopt(argc, argv, "b:c:ef:il:mo:rs:v:")) > 0) {
+ switch (optChar) {
++ case 'b': oi.bits = (i15x)strtol(optarg, NULL, 0); break;
+ case 'c': oi.onlyCh = (i15x)strtol(optarg, NULL, 0) | 0x100; break;
+ case 'e': oi.showEvents++; break;
+ case 'f': oi.outRate = (u16x)strtol(optarg, NULL, 0); break;
+@@ -116,6 +119,7 @@ main(int argc, char *argv[])
+
+ lookOverFile(p, statbuf.st_size);
+ dacioInit();
++ dci.bits = oi.bits;
+ dci.speed = oi.outRate;
+ dci.stereo = !oi.mono;
+ dacioConf(&dci);
diff --git a/audio/nspmod/files/patch-nspmod.h b/audio/nspmod/files/patch-nspmod.h
index 687f69484bf2..460df995f714 100644
--- a/audio/nspmod/files/patch-nspmod.h
+++ b/audio/nspmod/files/patch-nspmod.h
@@ -1,12 +1,10 @@
-*** nspmod.h.orig Wed Sep 3 14:58:53 1997
---- nspmod.h Wed Sep 3 13:47:40 1997
-***************
-*** 3,8 ****
---- 3,9 ----
- #endif
-
- typedef struct {
-+ i15x bits; /* -b # */
- i15x onlyCh; /* -c # */
- i15x showEvents; /* -e, -ee */
- u16x outRate; /* -f # */
+--- nspmod.h.orig 1995-09-16 06:50:32 UTC
++++ nspmod.h
+@@ -3,6 +3,7 @@
+ #endif
+
+ typedef struct {
++ i15x bits; /* -b # */
+ i15x onlyCh; /* -c # */
+ i15x showEvents; /* -e, -ee */
+ u16x outRate; /* -f # */
diff --git a/audio/ocp/files/patch-Makefile.in b/audio/ocp/files/patch-Makefile.in
index e98dfdb34970..38306df997a1 100644
--- a/audio/ocp/files/patch-Makefile.in
+++ b/audio/ocp/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2010-05-17 11:55:17.000000000 +0200
-+++ Makefile.in 2010-05-17 12:44:57.000000000 +0200
-@@ -35,8 +35,8 @@
+--- Makefile.in.orig 2011-11-17 21:46:08 UTC
++++ Makefile.in
+@@ -35,8 +35,8 @@ endif
install: all
diff --git a/audio/ocp/files/patch-configure b/audio/ocp/files/patch-configure
index c9431c85bc4a..d5eed433ff57 100644
--- a/audio/ocp/files/patch-configure
+++ b/audio/ocp/files/patch-configure
@@ -1,8 +1,8 @@
---- configure.orig 2010-05-17 09:55:17 UTC
+--- configure.orig 2011-11-17 21:46:08 UTC
+++ configure
-@@ -4511,7 +4511,7 @@ else
+@@ -4589,7 +4589,7 @@ else
'')
- as_fn_error "not found" "$LINENO" 5;
+ as_fn_error $? "not found" "$LINENO" 5;
;;
- 2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9]|3.[0-9]|3.[0-9].[0-9]-*|4.*)
+ 2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9]|3.[0-9]|3.[0-9].[0-9]-*|4.*|5.*)
diff --git a/audio/ocp/files/patch-doc-texi-Makefile.in b/audio/ocp/files/patch-doc-texi-Makefile.in
deleted file mode 100644
index f531b86888bb..000000000000
--- a/audio/ocp/files/patch-doc-texi-Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- doc/texi/Makefile.orig 2010-05-17 11:55:16.000000000 +0200
-+++ doc/texi/Makefile 2010-05-17 12:33:02.000000000 +0200
-@@ -19,8 +19,8 @@
- mkdir -p "$(DESTDIR)$(INFODIR)"
- $(CP) ocp.info.gz "$(DESTDIR)$(INFODIR)"
- install-info --dir-file="$(DESTDIR)$(INFODIR)/dir" "$(DESTDIR)$(INFODIR)/ocp.info.gz" || true
-- mkdir -p "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
-- $(CP) -R ocp.html/* "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
-+ $(DOCS)mkdir -p "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
-+ $(DOCS)$(CP) -R ocp.html/* "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
- uninstall:
- install-info --delete --dir-file="$(DESTDIR)$(INFODIR)/dir" "$(DESTDIR)$(INFODIR)/ocp.info.gz"
- rm -f "$(DESTDIR)$(INFODIR)/ocp.info.gz"
diff --git a/audio/ocp/files/patch-doc_texi_Makefile b/audio/ocp/files/patch-doc_texi_Makefile
new file mode 100644
index 000000000000..86654cffdb0a
--- /dev/null
+++ b/audio/ocp/files/patch-doc_texi_Makefile
@@ -0,0 +1,13 @@
+--- doc/texi/Makefile.orig 2011-11-17 21:46:08 UTC
++++ doc/texi/Makefile
+@@ -19,8 +19,8 @@ install: all
+ mkdir -p "$(DESTDIR)$(INFODIR)"
+ $(CP) ocp.info.gz "$(DESTDIR)$(INFODIR)"
+ install-info --dir-file="$(DESTDIR)$(INFODIR)/dir" "$(DESTDIR)$(INFODIR)/ocp.info.gz" || true
+- mkdir -p "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
+- $(CP) -R ocp.html/* "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
++ $(DOCS)mkdir -p "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
++ $(DOCS)$(CP) -R ocp.html/* "$(DESTDIR)$(PREFIX)/share/doc/ocp$(DIR_SUFFIX)/html"
+ uninstall:
+ install-info --delete --dir-file="$(DESTDIR)$(INFODIR)/dir" "$(DESTDIR)$(INFODIR)/ocp.info.gz"
+ rm -f "$(DESTDIR)$(INFODIR)/ocp.info.gz"
diff --git a/audio/ogg2mp3/files/patch-ogg2mp3 b/audio/ogg2mp3/files/patch-ogg2mp3
index 71eb2c96d65b..d866f0d9a0c3 100644
--- a/audio/ogg2mp3/files/patch-ogg2mp3
+++ b/audio/ogg2mp3/files/patch-ogg2mp3
@@ -1,12 +1,12 @@
---- ./ogg2mp3.orig 2009-09-10 19:33:42.000000000 +0200
-+++ ./ogg2mp3 2009-09-10 19:34:42.000000000 +0200
+--- ogg2mp3.orig 2009-08-28 00:49:03 UTC
++++ ogg2mp3
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!%%LOCALBASE%%/bin/perl
# ogg2mp3
# Maintained by: James Ausmus <james.ausmus.code@gmail.com>
-@@ -50,10 +50,10 @@
+@@ -50,10 +50,10 @@ print " Maintainership assumed by Jam
print " This code is released under the General Public License v2.\n";
print " ------------------------------------------------------------------- \n\n";
diff --git a/audio/openal-soft/files/patch-CMakeLists.txt b/audio/openal-soft/files/patch-CMakeLists.txt
index 3d83e5817d4e..5322bdebc3be 100644
--- a/audio/openal-soft/files/patch-CMakeLists.txt
+++ b/audio/openal-soft/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
--- CMakeLists.txt.orig 2014-08-15 07:06:59 UTC
+++ CMakeLists.txt
-@@ -62,8 +62,8 @@
+@@ -62,8 +62,8 @@ ELSE()
SET(LIBNAME openal)
# These are needed on non-Windows systems for extra features
@@ -11,7 +11,7 @@
ENDIF()
# Set defines for large file support
-@@ -186,7 +186,7 @@
+@@ -186,7 +186,7 @@ HAVE_C11_ALIGNAS)
# Check if we have C11 _Atomic
CHECK_C_SOURCE_COMPILES(
"#include <stdatomic.h>
@@ -20,7 +20,7 @@
int main()
{
return atomic_load(&foo);
-@@ -523,10 +523,6 @@
+@@ -523,10 +523,6 @@ IF(NOT HAVE_WINDOWS_H)
CHECK_SYMBOL_EXISTS(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK)
@@ -31,7 +31,7 @@
ENDIF()
# Check for a 64-bit type
-@@ -1108,7 +1104,7 @@
+@@ -1108,7 +1104,7 @@ INSTALL(FILES include/AL/al.h
DESTINATION include/AL
)
INSTALL(FILES "${OpenAL_BINARY_DIR}/openal.pc"
diff --git a/audio/openal-soft/files/patch-OpenAL32_alBuffer.c b/audio/openal-soft/files/patch-OpenAL32_alBuffer.c
index 4036d8026aef..715b719802e0 100644
--- a/audio/openal-soft/files/patch-OpenAL32_alBuffer.c
+++ b/audio/openal-soft/files/patch-OpenAL32_alBuffer.c
@@ -1,4 +1,4 @@
---- OpenAL32/alBuffer.c.orig 2015-09-21 20:22:13 UTC
+--- OpenAL32/alBuffer.c.orig 2014-08-15 07:06:59 UTC
+++ OpenAL32/alBuffer.c
@@ -1179,7 +1179,7 @@ static ALboolean DecomposeFormat(ALenum
{ AL_7POINT1_16_SOFT, FmtX71, FmtShort },
diff --git a/audio/openal/files/patch-common__include__AL__alc.h b/audio/openal/files/patch-common__include__AL__alc.h
deleted file mode 100644
index e9b754a9eca0..000000000000
--- a/audio/openal/files/patch-common__include__AL__alc.h
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./common/include/AL/alc.h.orig Sat Feb 11 12:36:55 2006
-+++ ./common/include/AL/alc.h Sat Jul 14 19:33:48 2007
-@@ -187,7 +187,7 @@
-
- ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );
-
--ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( ALCvoid );
-+ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void );
-
- ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
-
-@@ -248,7 +248,7 @@
- typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
- typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
- typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
--typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( ALCvoid );
-+typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void );
- typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
- typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
- typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
diff --git a/audio/openal/files/patch-common_include_AL_alc.h b/audio/openal/files/patch-common_include_AL_alc.h
new file mode 100644
index 000000000000..213d597df407
--- /dev/null
+++ b/audio/openal/files/patch-common_include_AL_alc.h
@@ -0,0 +1,20 @@
+--- common/include/AL/alc.h.orig 2006-02-11 09:36:55 UTC
++++ common/include/AL/alc.h
+@@ -187,7 +187,7 @@ ALC_API void ALC_APIENTRY alc
+
+ ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );
+
+-ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( ALCvoid );
++ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void );
+
+ ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
+
+@@ -248,7 +248,7 @@ typedef ALCboolean (ALC_APIENTRY *LP
+ typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
+ typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
+ typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
+-typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( ALCvoid );
++typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void );
+ typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
+ typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
+ typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
diff --git a/audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm b/audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm
deleted file mode 100644
index 1ac4253aba18..000000000000
--- a/audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/arch/i386/memcpy_mmx_prk.nasm.orig 2005-12-17 15:50:39.000000000 +0300
-+++ src/arch/i386/memcpy_mmx_prk.nasm 2009-03-16 17:20:23.000000000 +0300
-@@ -22,6 +22,7 @@
- ; pretty straight-forward implementation
- ; by design broken for n<8, so check that before calling
- ; x86 32 bit only!
-+[Section .text]
- global __alMMXmemcpy
- global _alMMXmemcpy
-
diff --git a/audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm b/audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm
deleted file mode 100644
index ba816063911b..000000000000
--- a/audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/arch/i386/x86_cpu_caps_detect_prk.nasm.orig 2005-12-17 15:50:39.000000000 +0300
-+++ src/arch/i386/x86_cpu_caps_detect_prk.nasm 2009-03-16 17:20:50.000000000 +0300
-@@ -23,6 +23,7 @@
- ; using infos from sandpile.org
-
- ; returns 0 if no CPUID available
-+[Section .text]
- global __alDetectx86CPUCaps
- global _alDetectx86CPUCaps
-
diff --git a/audio/openal/files/patch-src-arch-i386-x86_floatmul.c b/audio/openal/files/patch-src-arch-i386-x86_floatmul.c
deleted file mode 100644
index 871ccc6a40c1..000000000000
--- a/audio/openal/files/patch-src-arch-i386-x86_floatmul.c
+++ /dev/null
@@ -1,39 +0,0 @@
---- src/arch/i386/x86_floatmul.c.orig 2005-12-21 22:06:35.000000000 +0300
-+++ src/arch/i386/x86_floatmul.c 2009-04-04 04:53:56.000000000 +0400
-@@ -46,7 +46,7 @@
- v4hi temp;
-
-
-- samples_pre = MMX_ALIGN - (aint)bpt % MMX_ALIGN;
-+ samples_pre = (MMX_ALIGN - (aint)bpt % MMX_ALIGN) % MMX_ALIGN;
- samples_pre /= sizeof(ALshort);
- samples_main = len - samples_pre;
- samples_post = samples_main % 8;
-@@ -82,11 +82,27 @@ void _alFloatMul(ALshort *bpt, ALfloat s
- v_sa.s[3] = v_sa.s[0];
-
- while (samples_main--) {
-+ union {
-+ short s[4];
-+ v4hi v;
-+ } ALIGN16(v_one);
-+ v_one.s[0] = 1;
-+ v_one.s[1] = 0;
-+ v_one.s[2] = 0;
-+ v_one.s[3] = 0;
- temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
-+#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
- *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
-+#else
-+ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);
-+#endif
- bpt += 4;
- temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
-+#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
- *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
-+#else
-+ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);
-+#endif
- bpt += 4;
- }
- }
diff --git a/audio/openal/files/patch-src-backends-alc_backend_bsd.c b/audio/openal/files/patch-src-backends-alc_backend_bsd.c
deleted file mode 100644
index 6a653388f3f3..000000000000
--- a/audio/openal/files/patch-src-backends-alc_backend_bsd.c
+++ /dev/null
@@ -1,75 +0,0 @@
---- src/backends/alc_backend_bsd.c.orig Thu Jan 5 16:11:20 2006
-+++ src/backends/alc_backend_bsd.c Sun Aug 13 07:39:16 2006
-@@ -9,7 +9,10 @@
- */
- #include "al_siteconfig.h"
-
-+#define __BSD_VISIBLE 1
-+
- #include <AL/al.h>
-+#include <AL/alext.h>
- #include <assert.h>
- #include <fcntl.h>
- #include <sys/soundcard.h>
-@@ -113,7 +116,6 @@
- */
- static void *grab_write_native(void) {
- const char *dsppath = "/dev/dsp";
-- int divisor = _alSpot(_AL_DEF_BUFSIZ) | (2<<16);
-
- dsp_fd = open(dsppath, O_WRONLY | O_NONBLOCK);
-
-@@ -126,10 +128,6 @@
- perror("fcntl");
- }
-
-- if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
-- perror("ioctl SETFRAGMENT");
-- }
--
- FD_ZERO(&dsp_fd_set);
- FD_SET(dsp_fd, &dsp_fd_set);
-
-@@ -318,10 +316,12 @@
- }
-
- static ALboolean set_write_native(UNUSED(void *handle),
-- UNUSED(unsigned int *bufsiz),
-+ unsigned int *bufsiz,
- ALenum *fmt,
- unsigned int *speed) {
- ALuint channels = _alGetChannelsFromFormat(*fmt);
-+ int divisor;
-+ char *custom_bufsiz;
-
- if(dsp_fd < 0) {
- return AL_FALSE;
-@@ -363,6 +363,28 @@
-
-
- *fmt = BSD2ALFMT(*fmt, channels);
-+
-+ custom_bufsiz = getenv("OPENAL_BUFFER_SIZE");
-+ if (custom_bufsiz != NULL)
-+ *bufsiz = atoi(custom_bufsiz);
-+ else {
-+ if(ioctl(dsp_fd, SNDCTL_DSP_GETBLKSIZE, bufsiz) < 0) {
-+#ifdef DEBUG_MAXIMUS
-+ fprintf(stderr, "blksize %d\n", *bufsiz);
-+ perror("get_devsp blksize ioctl");
-+#endif
-+ return AL_FALSE;
-+ }
-+ }
-+
-+ divisor = _alSpot(*bufsiz) | (2<<16);
-+ if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
-+#ifdef DEBUG_MAXIMUS
-+ fprintf(stderr, "divisor %d\n", divisor);
-+ perror("set_devsp fragment ioctl");
-+#endif
-+ return AL_FALSE;
-+ }
-
- return AL_TRUE;
- }
diff --git a/audio/openal/files/patch-src-backends-alc_backend_esd.c b/audio/openal/files/patch-src-backends-alc_backend_esd.c
deleted file mode 100644
index ad1f5d1bb147..000000000000
--- a/audio/openal/files/patch-src-backends-alc_backend_esd.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/backends/alc_backend_esd.c.orig Sat Apr 22 21:06:15 2006
-+++ src/backends/alc_backend_esd.c Sat Apr 22 21:05:33 2006
-@@ -15,6 +15,7 @@
- #include <string.h>
- #include <sys/ioctl.h>
- #include <sys/mman.h>
-+#include <sys/select.h>
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <sys/types.h>
diff --git a/audio/openal/files/patch-src_arch_i386_memcpy__mmx__prk.nasm b/audio/openal/files/patch-src_arch_i386_memcpy__mmx__prk.nasm
new file mode 100644
index 000000000000..56a7f9d56932
--- /dev/null
+++ b/audio/openal/files/patch-src_arch_i386_memcpy__mmx__prk.nasm
@@ -0,0 +1,10 @@
+--- src/arch/i386/memcpy_mmx_prk.nasm.orig 2005-12-17 12:50:39 UTC
++++ src/arch/i386/memcpy_mmx_prk.nasm
+@@ -22,6 +22,7 @@
+ ; pretty straight-forward implementation
+ ; by design broken for n<8, so check that before calling
+ ; x86 32 bit only!
++[Section .text]
+ global __alMMXmemcpy
+ global _alMMXmemcpy
+
diff --git a/audio/openal/files/patch-src_arch_i386_x86__cpu__caps__detect__prk.nasm b/audio/openal/files/patch-src_arch_i386_x86__cpu__caps__detect__prk.nasm
new file mode 100644
index 000000000000..0ae0826813f8
--- /dev/null
+++ b/audio/openal/files/patch-src_arch_i386_x86__cpu__caps__detect__prk.nasm
@@ -0,0 +1,10 @@
+--- src/arch/i386/x86_cpu_caps_detect_prk.nasm.orig 2005-12-17 12:50:39 UTC
++++ src/arch/i386/x86_cpu_caps_detect_prk.nasm
+@@ -23,6 +23,7 @@
+ ; using infos from sandpile.org
+
+ ; returns 0 if no CPUID available
++[Section .text]
+ global __alDetectx86CPUCaps
+ global _alDetectx86CPUCaps
+
diff --git a/audio/openal/files/patch-src_arch_i386_x86__floatmul.c b/audio/openal/files/patch-src_arch_i386_x86__floatmul.c
new file mode 100644
index 000000000000..3901c418dfcf
--- /dev/null
+++ b/audio/openal/files/patch-src_arch_i386_x86__floatmul.c
@@ -0,0 +1,39 @@
+--- src/arch/i386/x86_floatmul.c.orig 2005-12-21 19:06:35 UTC
++++ src/arch/i386/x86_floatmul.c
+@@ -46,7 +46,7 @@ void _alFloatMul(ALshort *bpt, ALfloat s
+ v4hi temp;
+
+
+- samples_pre = MMX_ALIGN - (aint)bpt % MMX_ALIGN;
++ samples_pre = (MMX_ALIGN - (aint)bpt % MMX_ALIGN) % MMX_ALIGN;
+ samples_pre /= sizeof(ALshort);
+ samples_main = len - samples_pre;
+ samples_post = samples_main % 8;
+@@ -82,11 +82,27 @@ void _alFloatMul(ALshort *bpt, ALfloat s
+ v_sa.s[3] = v_sa.s[0];
+
+ while (samples_main--) {
++ union {
++ short s[4];
++ v4hi v;
++ } ALIGN16(v_one);
++ v_one.s[0] = 1;
++ v_one.s[1] = 0;
++ v_one.s[2] = 0;
++ v_one.s[3] = 0;
+ temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
++#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
+ *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
++#else
++ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);
++#endif
+ bpt += 4;
+ temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
++#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__)
+ *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
++#else
++ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v);
++#endif
+ bpt += 4;
+ }
+ }
diff --git a/audio/openal/files/patch-src_backends_alc__backend__bsd.c b/audio/openal/files/patch-src_backends_alc__backend__bsd.c
new file mode 100644
index 000000000000..44d53c86c317
--- /dev/null
+++ b/audio/openal/files/patch-src_backends_alc__backend__bsd.c
@@ -0,0 +1,75 @@
+--- src/backends/alc_backend_bsd.c.orig 2006-01-05 15:11:20 UTC
++++ src/backends/alc_backend_bsd.c
+@@ -9,7 +9,10 @@
+ */
+ #include "al_siteconfig.h"
+
++#define __BSD_VISIBLE 1
++
+ #include <AL/al.h>
++#include <AL/alext.h>
+ #include <assert.h>
+ #include <fcntl.h>
+ #include <sys/soundcard.h>
+@@ -113,7 +116,6 @@ static int AL2BSDFMT(int fmt)
+ */
+ static void *grab_write_native(void) {
+ const char *dsppath = "/dev/dsp";
+- int divisor = _alSpot(_AL_DEF_BUFSIZ) | (2<<16);
+
+ dsp_fd = open(dsppath, O_WRONLY | O_NONBLOCK);
+
+@@ -126,10 +128,6 @@ static void *grab_write_native(void) {
+ perror("fcntl");
+ }
+
+- if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
+- perror("ioctl SETFRAGMENT");
+- }
+-
+ FD_ZERO(&dsp_fd_set);
+ FD_SET(dsp_fd, &dsp_fd_set);
+
+@@ -318,10 +316,12 @@ ALsizei capture_nativedevice(UNUSED(void
+ }
+
+ static ALboolean set_write_native(UNUSED(void *handle),
+- UNUSED(unsigned int *bufsiz),
++ unsigned int *bufsiz,
+ ALenum *fmt,
+ unsigned int *speed) {
+ ALuint channels = _alGetChannelsFromFormat(*fmt);
++ int divisor;
++ char *custom_bufsiz;
+
+ if(dsp_fd < 0) {
+ return AL_FALSE;
+@@ -364,6 +364,28 @@ static ALboolean set_write_native(UNUSED
+
+ *fmt = BSD2ALFMT(*fmt, channels);
+
++ custom_bufsiz = getenv("OPENAL_BUFFER_SIZE");
++ if (custom_bufsiz != NULL)
++ *bufsiz = atoi(custom_bufsiz);
++ else {
++ if(ioctl(dsp_fd, SNDCTL_DSP_GETBLKSIZE, bufsiz) < 0) {
++#ifdef DEBUG_MAXIMUS
++ fprintf(stderr, "blksize %d\n", *bufsiz);
++ perror("get_devsp blksize ioctl");
++#endif
++ return AL_FALSE;
++ }
++ }
++
++ divisor = _alSpot(*bufsiz) | (2<<16);
++ if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
++#ifdef DEBUG_MAXIMUS
++ fprintf(stderr, "divisor %d\n", divisor);
++ perror("set_devsp fragment ioctl");
++#endif
++ return AL_FALSE;
++ }
++
+ return AL_TRUE;
+ }
+
diff --git a/audio/openal/files/patch-src_backends_alc__backend__esd.c b/audio/openal/files/patch-src_backends_alc__backend__esd.c
new file mode 100644
index 000000000000..9ea8a03e3e48
--- /dev/null
+++ b/audio/openal/files/patch-src_backends_alc__backend__esd.c
@@ -0,0 +1,10 @@
+--- src/backends/alc_backend_esd.c.orig 2006-01-12 18:12:11 UTC
++++ src/backends/alc_backend_esd.c
+@@ -15,6 +15,7 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
++#include <sys/select.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
diff --git a/audio/opus/files/patch-configure b/audio/opus/files/patch-configure
index 3cf6e1cbc021..867efc968d0a 100644
--- a/audio/opus/files/patch-configure
+++ b/audio/opus/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2015-11-25 20:46:28 UTC
+--- configure.orig 2016-01-12 18:17:49 UTC
+++ configure
-@@ -13229,7 +13229,7 @@ $as_echo "$as_me: WARNING: Compiler does
+@@ -13251,7 +13251,7 @@ $as_echo "$as_me: WARNING: Compiler does
fi
;; #(
diff --git a/audio/osalp/files/patch-aflib_aflibConverter.cc b/audio/osalp/files/patch-aflib_aflibConverter.cc
index 4b204a0f632f..3deebeaacfb7 100644
--- a/audio/osalp/files/patch-aflib_aflibConverter.cc
+++ b/audio/osalp/files/patch-aflib_aflibConverter.cc
@@ -1,6 +1,6 @@
---- ./aflib/aflibConverter.cc.orig 2014-01-30 14:56:04.000000000 +0100
-+++ ./aflib/aflibConverter.cc 2014-01-30 14:56:11.000000000 +0100
-@@ -226,7 +226,7 @@
+--- aflib/aflibConverter.cc.orig 2007-01-16 19:26:39 UTC
++++ aflib/aflibConverter.cc
+@@ -226,7 +226,7 @@ aflibConverter::resample( /* numbe
int
diff --git a/audio/osalp/files/patch-aflib_aflibConverter.h b/audio/osalp/files/patch-aflib_aflibConverter.h
index 01a27f5a3c37..70589a53bda3 100644
--- a/audio/osalp/files/patch-aflib_aflibConverter.h
+++ b/audio/osalp/files/patch-aflib_aflibConverter.h
@@ -1,6 +1,6 @@
---- ./aflib/aflibConverter.h.orig 2014-01-30 14:55:43.000000000 +0100
-+++ ./aflib/aflibConverter.h 2014-01-30 14:55:50.000000000 +0100
-@@ -110,7 +110,7 @@
+--- aflib/aflibConverter.h.orig 2007-01-16 19:26:39 UTC
++++ aflib/aflibConverter.h
+@@ -110,7 +110,7 @@ private:
operator=(const aflibConverter& op);
int
diff --git a/audio/osalp/files/patch-aflib_aflibMemCache.cc b/audio/osalp/files/patch-aflib_aflibMemCache.cc
index 3db11fbec9df..e104d342f91b 100644
--- a/audio/osalp/files/patch-aflib_aflibMemCache.cc
+++ b/audio/osalp/files/patch-aflib_aflibMemCache.cc
@@ -1,5 +1,5 @@
---- aflib/aflibMemCache.cc.orig 2014-01-30 12:09:41.000000000 +0100
-+++ aflib/aflibMemCache.cc 2014-01-30 12:10:12.000000000 +0100
+--- aflib/aflibMemCache.cc.orig 2007-01-16 19:26:39 UTC
++++ aflib/aflibMemCache.cc
@@ -24,6 +24,7 @@
#include <config.h>
#endif
diff --git a/audio/osalp/files/patch-formatlib-audiofile-0.2.0-libaudiofile_aiffwrite.c b/audio/osalp/files/patch-formatlib-audiofile-0.2.0-libaudiofile_aiffwrite.c
deleted file mode 100644
index 6e5da8b3b7c4..000000000000
--- a/audio/osalp/files/patch-formatlib-audiofile-0.2.0-libaudiofile_aiffwrite.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- formatlib/audiofile-0.2.0/libaudiofile/aiffwrite.c.orig 2014-01-30 15:01:36.000000000 +0100
-+++ formatlib/audiofile-0.2.0/libaudiofile/aiffwrite.c 2014-01-30 15:01:51.000000000 +0100
-@@ -28,6 +28,7 @@
-
- #include <assert.h>
- #include <sys/types.h>
-+#include <string.h>
- #include <stdlib.h>
-
- #include "extended.h"
diff --git a/audio/osalp/files/patch-formatlib_audiofile-0.2.0_libaudiofile_aiffwrite.c b/audio/osalp/files/patch-formatlib_audiofile-0.2.0_libaudiofile_aiffwrite.c
new file mode 100644
index 000000000000..a87d115a9c35
--- /dev/null
+++ b/audio/osalp/files/patch-formatlib_audiofile-0.2.0_libaudiofile_aiffwrite.c
@@ -0,0 +1,10 @@
+--- formatlib/audiofile-0.2.0/libaudiofile/aiffwrite.c.orig 2001-02-20 19:37:23 UTC
++++ formatlib/audiofile-0.2.0/libaudiofile/aiffwrite.c
+@@ -28,6 +28,7 @@
+
+ #include <assert.h>
+ #include <sys/types.h>
++#include <string.h>
+ #include <stdlib.h>
+
+ #include "extended.h"
diff --git a/audio/osd-lyrics/files/patch-lib__chardetect__src__entry__impl.cpp b/audio/osd-lyrics/files/patch-lib__chardetect__src__entry__impl.cpp
deleted file mode 100644
index 37fa0b014e97..000000000000
--- a/audio/osd-lyrics/files/patch-lib__chardetect__src__entry__impl.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- lib/chardetect/src/entry/impl.cpp.orig
-+++ lib/chardetect/src/entry/impl.cpp
-@@ -41,8 +41,10 @@
- #include "chardetect.h"
- #include "nscore.h"
- #include "nsUniversalDetector.h"
-+#pragma GCC visibility push(default)
- #include <string.h>
- #include <stdlib.h>
-+#pragma GCC visibility pop
-
- #ifdef _WIN32
- # include <windows.h>
diff --git a/audio/osd-lyrics/files/patch-lib__chardetect__src__prmem.h b/audio/osd-lyrics/files/patch-lib__chardetect__src__prmem.h
deleted file mode 100644
index 17e0610138ad..000000000000
--- a/audio/osd-lyrics/files/patch-lib__chardetect__src__prmem.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/chardetect/src/prmem.h.orig
-+++ lib/chardetect/src/prmem.h
-@@ -37,7 +37,9 @@
- #ifndef nsDummyPrmem_h__
- #define nsDummyPrmem_h__
-
-+#pragma GCC visibility push(default)
- #include <stdlib.h>
-+#pragma GCC visibility pop
-
- inline void* PR_Malloc(size_t len)
- {
diff --git a/audio/osd-lyrics/files/patch-lib_chardetect_src_entry_impl.cpp b/audio/osd-lyrics/files/patch-lib_chardetect_src_entry_impl.cpp
new file mode 100644
index 000000000000..fd0bd35afeca
--- /dev/null
+++ b/audio/osd-lyrics/files/patch-lib_chardetect_src_entry_impl.cpp
@@ -0,0 +1,13 @@
+--- lib/chardetect/src/entry/impl.cpp.orig 2012-06-04 03:45:15 UTC
++++ lib/chardetect/src/entry/impl.cpp
+@@ -41,8 +41,10 @@
+ #include "chardetect.h"
+ #include "nscore.h"
+ #include "nsUniversalDetector.h"
++#pragma GCC visibility push(default)
+ #include <string.h>
+ #include <stdlib.h>
++#pragma GCC visibility pop
+
+ #ifdef _WIN32
+ # include <windows.h>
diff --git a/audio/osd-lyrics/files/patch-lib_chardetect_src_prmem.h b/audio/osd-lyrics/files/patch-lib_chardetect_src_prmem.h
new file mode 100644
index 000000000000..f7b4e7fe402e
--- /dev/null
+++ b/audio/osd-lyrics/files/patch-lib_chardetect_src_prmem.h
@@ -0,0 +1,12 @@
+--- lib/chardetect/src/prmem.h.orig 2012-06-04 03:45:15 UTC
++++ lib/chardetect/src/prmem.h
+@@ -37,7 +37,9 @@
+ #ifndef nsDummyPrmem_h__
+ #define nsDummyPrmem_h__
+
++#pragma GCC visibility push(default)
+ #include <stdlib.h>
++#pragma GCC visibility pop
+
+ inline void* PR_Malloc(size_t len)
+ {
diff --git a/audio/oss/files/patch-configure b/audio/oss/files/patch-configure
index 40eef2cdd201..e5e242017875 100644
--- a/audio/oss/files/patch-configure
+++ b/audio/oss/files/patch-configure
@@ -1,5 +1,5 @@
---- configure.orig 2009-08-10 13:16:21.000000000 -0400
-+++ configure 2009-09-22 14:38:20.000000000 -0400
+--- configure.orig 2014-02-14 22:59:55 UTC
++++ configure
@@ -2,7 +2,7 @@
CONFIGURE=YES
@@ -9,7 +9,7 @@
TARGETOS=
unset USE_PHPMAKE
-@@ -24,11 +24,11 @@
+@@ -24,11 +24,11 @@ export CONFIGURE CONFIG_MIDI
unset CDPATH >/dev/null 2>&1
diff --git a/audio/oss/files/patch-os__cmd_FreeBSD_.config b/audio/oss/files/patch-os__cmd_FreeBSD_.config
new file mode 100644
index 000000000000..b49025cf7382
--- /dev/null
+++ b/audio/oss/files/patch-os__cmd_FreeBSD_.config
@@ -0,0 +1,7 @@
+--- os_cmd/FreeBSD/.config.orig 2014-02-14 22:59:55 UTC
++++ os_cmd/FreeBSD/.config
+@@ -1,3 +1,3 @@
+ targetos=FreeBSD
+ mode=sbin
+-cflags=-I/sys
++cflags=-I${SYSDIR}
diff --git a/audio/oss/files/patch-os__cmd_FreeBSD_ossdetect_ossdetect.c b/audio/oss/files/patch-os__cmd_FreeBSD_ossdetect_ossdetect.c
new file mode 100644
index 000000000000..200e0d98bb74
--- /dev/null
+++ b/audio/oss/files/patch-os__cmd_FreeBSD_ossdetect_ossdetect.c
@@ -0,0 +1,34 @@
+--- os_cmd/FreeBSD/ossdetect/ossdetect.c.orig 2015-01-28 08:07:32 UTC
++++ os_cmd/FreeBSD/ossdetect/ossdetect.c
+@@ -376,17 +376,20 @@ pci_detect (void)
+ char name[32];
+
+ if (verbose > 2)
+- printf ("%s%d@pci%d:%d:%d:\tclass=0x%06x card=0x%08x "
+- "chip=0x%08x rev=0x%02x hdr=0x%02x\n",
+- (p->pd_name && *p->pd_name) ? p->pd_name :
+- "none",
+- (p->pd_name && *p->pd_name) ? (int) p->pd_unit :
+- p->pc_sel.pc_bus, p->pc_sel.pc_dev,
+- p->pc_sel.pc_func, (p->pc_class << 16) |
+- (p->pc_subclass << 8) | p->pc_progif,
+- (p->pc_subdevice << 16) | p->pc_subvendor,
+- (p->pc_device << 16) | p->pc_vendor,
+- p->pc_revid, p->pc_hdr);
++ {
++ if (p->pd_name && *p->pd_name)
++ sprintf(name, "%s%d", p->pd_name, (int) p->pd_unit);
++ else
++ strcpy(name, "none");
++ printf ("%s@pci%d:%d:%d:\tclass=0x%06x card=0x%08x "
++ "chip=0x%08x rev=0x%02x hdr=0x%02x\n", name,
++ p->pc_sel.pc_bus, p->pc_sel.pc_dev, p->pc_sel.pc_func,
++ (p->pc_class << 16) |
++ (p->pc_subclass << 8) | p->pc_progif,
++ (p->pc_subdevice << 16) | p->pc_subvendor,
++ (p->pc_device << 16) | p->pc_vendor,
++ p->pc_revid, p->pc_hdr);
++ }
+
+ sprintf (name, "pcs%x,%x", p->pc_subvendor, p->pc_subdevice);
+ if (add_drv (name, PCI_PASS))
diff --git a/audio/oss/files/patch-os_cmd-FreeBSD-.config b/audio/oss/files/patch-os_cmd-FreeBSD-.config
deleted file mode 100644
index bf76b057b6ac..000000000000
--- a/audio/oss/files/patch-os_cmd-FreeBSD-.config
+++ /dev/null
@@ -1,7 +0,0 @@
---- os_cmd/FreeBSD/.config~
-+++ os_cmd/FreeBSD/.config
-@@ -1,3 +1,3 @@
- targetos=FreeBSD
- mode=sbin
--cflags=-I/sys
-+cflags=-I${SYSDIR}
diff --git a/audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c b/audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c
deleted file mode 100644
index 75c1c2c3be90..000000000000
--- a/audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- os_cmd/FreeBSD/ossdetect/ossdetect.c.orig 2011-01-05 16:06:39.000000000 -0500
-+++ os_cmd/FreeBSD/ossdetect/ossdetect.c 2011-06-21 17:49:37.000000000 -0400
-@@ -376,17 +376,20 @@ pci_detect (void)
- char name[32];
-
- if (verbose > 2)
-- printf ("%s%d@pci%d:%d:%d:\tclass=0x%06x card=0x%08x "
-- "chip=0x%08x rev=0x%02x hdr=0x%02x\n",
-- (p->pd_name && *p->pd_name) ? p->pd_name :
-- "none",
-- (p->pd_name && *p->pd_name) ? (int) p->pd_unit :
-- p->pc_sel.pc_bus, p->pc_sel.pc_dev,
-- p->pc_sel.pc_func, (p->pc_class << 16) |
-- (p->pc_subclass << 8) | p->pc_progif,
-- (p->pc_subdevice << 16) | p->pc_subvendor,
-- (p->pc_device << 16) | p->pc_vendor,
-- p->pc_revid, p->pc_hdr);
-+ {
-+ if (p->pd_name && *p->pd_name)
-+ sprintf(name, "%s%d", p->pd_name, (int) p->pd_unit);
-+ else
-+ strcpy(name, "none");
-+ printf ("%s@pci%d:%d:%d:\tclass=0x%06x card=0x%08x "
-+ "chip=0x%08x rev=0x%02x hdr=0x%02x\n", name,
-+ p->pc_sel.pc_bus, p->pc_sel.pc_dev, p->pc_sel.pc_func,
-+ (p->pc_class << 16) |
-+ (p->pc_subclass << 8) | p->pc_progif,
-+ (p->pc_subdevice << 16) | p->pc_subvendor,
-+ (p->pc_device << 16) | p->pc_vendor,
-+ p->pc_revid, p->pc_hdr);
-+ }
-
- sprintf (name, "pcs%x,%x", p->pc_subvendor, p->pc_subdevice);
- if (add_drv (name, PCI_PASS))
diff --git a/audio/oss/files/patch-setup-FreeBSD-build.sh b/audio/oss/files/patch-setup-FreeBSD-build.sh
deleted file mode 100644
index 40eb0ed30a1b..000000000000
--- a/audio/oss/files/patch-setup-FreeBSD-build.sh
+++ /dev/null
@@ -1,38 +0,0 @@
---- setup/FreeBSD/build.sh.orig 2011-01-04 20:33:08.000000000 -0500
-+++ setup/FreeBSD/build.sh 2011-07-25 13:39:05.000000000 -0400
-@@ -7,7 +7,7 @@
- TXT2MAN=$SRCDIR/setup/txt2man
- else
- echo "No gawk found. Using lesser replacement" >&2
-- cc -o txt2man origdir/setup/txt2man.c
-+ $CC -o txt2man origdir/setup/txt2man.c
- TXT2MAN=./txt2man
- fi
-
-@@ -38,7 +38,7 @@
-
- # Regenerating the config file templates
- rm -f /tmp/confgen
--if ! cc -o /tmp/confgen ./setup/FreeBSD/confgen.c
-+if ! $CC -o /tmp/confgen ./setup/FreeBSD/confgen.c
- then
- echo Building confgen failed
- exit 1
-@@ -146,7 +146,7 @@
- # Licensing stuff
- if test -f $SRCDIR/4front-private/osslic.c
- then
-- cc -o prototype/usr/sbin/osslic -Isetup -Ikernel/nonfree/include -Ikernel/framework/include -Iinclude -Ikernel/OS/FreeBSD -I$SRCDIR $SRCDIR/4front-private/osslic.c
-+ $CC -o prototype/usr/sbin/osslic -Isetup -Ikernel/nonfree/include -Ikernel/framework/include -Iinclude -Ikernel/OS/FreeBSD -I$SRCDIR $SRCDIR/4front-private/osslic.c
- strip prototype/usr/sbin/osslic
-
- BITS=3 # Default to 32 bit ELF format
-@@ -162,7 +162,7 @@
- if test -f 4front-private/ossupdate.c
- then
- #ossupdate
-- cc -I. 4front-private/ossupdate.c -s -o prototype/usr/sbin/ossupdate
-+ $CC -I. 4front-private/ossupdate.c -s -o prototype/usr/sbin/ossupdate
- fi
-
- sh $SRCDIR/setup/build_common.sh $SRCDIR $OSSLIBDIR
diff --git a/audio/oss/files/patch-setup-FreeBSD-make.local b/audio/oss/files/patch-setup-FreeBSD-make.local
deleted file mode 100644
index 44a98d9f427b..000000000000
--- a/audio/oss/files/patch-setup-FreeBSD-make.local
+++ /dev/null
@@ -1,14 +0,0 @@
---- setup/FreeBSD/make.local.orig 2008-01-05 18:38:18.000000000 -0500
-+++ setup/FreeBSD/make.local 2008-01-07 11:52:17.000000000 -0500
-@@ -2,10 +2,9 @@
- sh build.sh
-
- copy: build
-- cp -R prototype/* /
-
- package: build
- sh setup/FreeBSD/mkpkg.sh
-
- install: copy
-- cd /usr/lib/oss/build && sh install.sh
-+ cd prototype%%PREFIX%%/lib/oss/build && sh install.sh
diff --git a/audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh b/audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh
deleted file mode 100644
index 8209cd82e239..000000000000
--- a/audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh
+++ /dev/null
@@ -1,33 +0,0 @@
---- setup/FreeBSD/oss/build/install.sh.orig 2007-07-18 19:21:12.000000000 -0400
-+++ setup/FreeBSD/oss/build/install.sh 2007-10-09 19:51:09.000000000 -0400
-@@ -1,11 +1,6 @@
- #!/bin/sh
-
--if test -f /etc/oss.conf
--then
-- . /etc/oss.conf
--else
-- OSSLIBDIR=/usr/lib/oss
--fi
-+OSSLIBDIR=${PREFIX}/lib/oss
-
- rm -f osscore_mainline.o
- ln -s osscore.lib osscore_mainline.o
-@@ -59,17 +54,4 @@
- rm -f Makefile
- done
-
--if ! test -f $OSSLIBDIR/etc/installed_drivers
--then
-- echo "-----------------------------"
-- /usr/sbin/ossdetect -v
-- echo "-----------------------------"
-- echo ""
--fi
--
--if test ! -f $OSSLIBDIR/etc/userdefs
--then
-- echo "autosave_mixer yes" > $OSSLIBDIR/etc/userdefs
--fi
--
- exit 0
diff --git a/audio/oss/files/patch-setup-FreeBSD-sbin-soundoff b/audio/oss/files/patch-setup-FreeBSD-sbin-soundoff
deleted file mode 100644
index d4a0fef76c2f..000000000000
--- a/audio/oss/files/patch-setup-FreeBSD-sbin-soundoff
+++ /dev/null
@@ -1,30 +0,0 @@
---- setup/FreeBSD/sbin/soundoff.orig 2011-01-04 20:33:08.000000000 -0500
-+++ setup/FreeBSD/sbin/soundoff 2011-01-06 13:59:37.000000000 -0500
-@@ -1,10 +1,10 @@
- #!/bin/sh
-
--if test -f /etc/oss.conf
-+if test -f %%PREFIX%%/etc/oss.conf
- then
-- . /etc/oss.conf
-+ . %%PREFIX%%/etc/oss.conf
- else
-- OSSLIBDIR=/usr/lib/oss
-+ OSSLIBDIR=%%PREFIX%%/lib/oss
- fi
-
- if ! /sbin/kldstat | grep -q osscore.ko
-@@ -22,11 +22,11 @@
- # Save mixer settings automatically if requested
- if test -f $OSSLIBDIR/etc/userdefs && grep -q "autosave_mixer yes" $OSSLIBDIR/etc/userdefs
- then
-- /usr/sbin/savemixer
-+ %%PREFIX%%/sbin/savemixer
- fi
-
- # Save legacy devices
--/usr/sbin/ossdevlinks -N
-+%%PREFIX%%/sbin/ossdevlinks -N
-
- PROGRAMS="`fstat /dev/mixer* /dev/dsp* /dev/midi* /dev/oss/*/* 2>/dev/null | sed '1 D'`"
-
diff --git a/audio/oss/files/patch-setup-FreeBSD-sbin-soundon b/audio/oss/files/patch-setup-FreeBSD-sbin-soundon
deleted file mode 100644
index 8c38a308bcbe..000000000000
--- a/audio/oss/files/patch-setup-FreeBSD-sbin-soundon
+++ /dev/null
@@ -1,66 +0,0 @@
---- setup/FreeBSD/sbin/soundon.orig 2011-01-04 20:33:08.000000000 -0500
-+++ setup/FreeBSD/sbin/soundon 2011-01-06 14:48:55.000000000 -0500
-@@ -1,10 +1,10 @@
- #!/bin/sh
-
--if test -f /etc/oss.conf
-+if test -f %%PREFIX%%/etc/oss.conf
- then
-- . /etc/oss.conf
-+ . %%PREFIX%%/etc/oss.conf
- else
-- OSSLIBDIR=/usr/lib/oss
-+ OSSLIBDIR=%%PREFIX%%/lib/oss
- fi
-
- LOG=/var/log/soundon.log
-@@ -29,7 +29,7 @@
-
- if test -f $OSSLIBDIR/etc/license.asc
- then
-- /usr/sbin/ossdetect -l >> $LOG
-+ %%PREFIX%%/sbin/ossdetect -l >> $LOG
- fi
-
- OPTIONS=
-@@ -70,7 +70,7 @@
- done
-
- echo "+++ ossinfo -v3 +++" >> $LOG
--/usr/bin/ossinfo -v3 >> $LOG 2>&1
-+%%PREFIX%%/bin/ossinfo -v3 >> $LOG 2>&1
- echo "+++ /dev/sndstat +++" >> $LOG
- cat /dev/sndstat >> $LOG 2>&1
- echo "+++ dmesg +++" >> $LOG
-@@ -85,11 +85,11 @@
- sh $OSSLIBDIR/etc/legacy_devices >> $LOG 2>&1
- fi
-
--/usr/sbin/ossdevlinks -v >> $LOG 2>&1
-+%%PREFIX%%/sbin/ossdevlinks -v >> $LOG 2>&1
-
- ls -l /dev/dsp* /dev/sndstat /dev/mixer* /dev/oss/*/* >> $LOG 2>&1
-
--/usr/sbin/savemixer -L -v >> $LOG 2>&1
-+%%PREFIX%%/sbin/savemixer -L -v >> $LOG 2>&1
-
- if test -x $OSSLIBDIR/soundon.user
- then
-@@ -97,7 +97,7 @@
- $OSSLIBDIR/soundon.user >> $LOG 2>&1
- fi
-
--if test "`ossinfo -g|grep TRIAL` " != " "
-+if test "`%%PREFIX%%/bin/ossinfo -g|grep TRIAL` " != " "
- then
- echo
- echo "************************************************************"
-@@ -108,7 +108,7 @@
- sleep 1
- fi
-
--if test "`ossinfo -g|grep EXPIRED` " != " "
-+if test "`%%PREFIX%%/bin/ossinfo -g|grep EXPIRED` " != " "
- then
- echo
- echo "****************************************************************"
diff --git a/audio/oss/files/patch-setup-srcconf.c b/audio/oss/files/patch-setup-srcconf.c
deleted file mode 100644
index c058fce01c82..000000000000
--- a/audio/oss/files/patch-setup-srcconf.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- setup/srcconf.c.orig 2009-09-03 06:14:33.000000000 -0400
-+++ setup/srcconf.c 2009-09-22 14:52:03.000000000 -0400
-@@ -195,7 +195,7 @@
- {
- parms = "";
- if (getenv ("OGG_SUPPORT") != NULL)
-- parms = "-DOGG_SUPPORT";
-+ parms = "-DOGG_SUPPORT -I%%LOCALBASE%%/include";
- }
-
- if (strcmp (line, "project") == 0)
-@@ -913,7 +913,7 @@
- if (config_phpmake)
- fprintf (f, "<?php require getenv(\"PHPMAKE_LIBPATH\") . \"library.php\"; phpmake_makefile_top_rules(); ?>\n");
-
-- fprintf (f, "CC=%s\n", conf.ccomp);
-+ fprintf (f, "CC=%s\n", targetcc);
- // fprintf (f, "LD=ld\n");
- fprintf (f, "HOSTCC=%s\n", hostcc);
- fprintf (f, "CPLUSPLUS=%s\n", conf.cplusplus);
diff --git a/audio/oss/files/patch-setup_FreeBSD_build.sh b/audio/oss/files/patch-setup_FreeBSD_build.sh
new file mode 100644
index 000000000000..cdad8f5cc81a
--- /dev/null
+++ b/audio/oss/files/patch-setup_FreeBSD_build.sh
@@ -0,0 +1,38 @@
+--- setup/FreeBSD/build.sh.orig 2014-02-14 22:59:55 UTC
++++ setup/FreeBSD/build.sh
+@@ -7,7 +7,7 @@ then
+ TXT2MAN=$SRCDIR/setup/txt2man
+ else
+ echo "No gawk found. Using lesser replacement" >&2
+- cc -o txt2man origdir/setup/txt2man.c
++ $CC -o txt2man origdir/setup/txt2man.c
+ TXT2MAN=./txt2man
+ fi
+
+@@ -38,7 +38,7 @@ echo "OSSLIBDIR=$OSSLIBDIR" > prototype/
+
+ # Regenerating the config file templates
+ rm -f /tmp/confgen
+-if ! cc -o /tmp/confgen ./setup/FreeBSD/confgen.c
++if ! $CC -o /tmp/confgen ./setup/FreeBSD/confgen.c
+ then
+ echo Building confgen failed
+ exit 1
+@@ -146,7 +146,7 @@ cp .version prototype/$OSSLIBDIR/version
+ # Licensing stuff
+ if test -f $SRCDIR/4front-private/osslic.c
+ then
+- cc -o prototype/usr/sbin/osslic -Isetup -Ikernel/nonfree/include -Ikernel/framework/include -Iinclude -Ikernel/OS/FreeBSD -I$SRCDIR $SRCDIR/4front-private/osslic.c
++ $CC -o prototype/usr/sbin/osslic -Isetup -Ikernel/nonfree/include -Ikernel/framework/include -Iinclude -Ikernel/OS/FreeBSD -I$SRCDIR $SRCDIR/4front-private/osslic.c
+ strip prototype/usr/sbin/osslic
+
+ BITS=3 # Default to 32 bit ELF format
+@@ -162,7 +162,7 @@ fi
+ if test -f 4front-private/ossupdate.c
+ then
+ #ossupdate
+- cc -I. 4front-private/ossupdate.c -s -o prototype/usr/sbin/ossupdate
++ $CC -I. 4front-private/ossupdate.c -s -o prototype/usr/sbin/ossupdate
+ fi
+
+ sh $SRCDIR/setup/build_common.sh $SRCDIR $OSSLIBDIR
diff --git a/audio/oss/files/patch-setup_FreeBSD_make.local b/audio/oss/files/patch-setup_FreeBSD_make.local
new file mode 100644
index 000000000000..12acbd535e11
--- /dev/null
+++ b/audio/oss/files/patch-setup_FreeBSD_make.local
@@ -0,0 +1,14 @@
+--- setup/FreeBSD/make.local.orig 2015-01-24 04:25:26 UTC
++++ setup/FreeBSD/make.local
+@@ -2,10 +2,9 @@ build: kernel/framework/include/buildid
+ sh build.sh
+
+ copy: build
+- cp -R prototype/* /
+
+ package: build
+ sh setup/FreeBSD/mkpkg.sh
+
+ install: copy
+- cd ${OSSLIBDIR}/build && sh install.sh
++ cd prototype%%PREFIX%%/lib/oss/build && sh install.sh
diff --git a/audio/oss/files/patch-setup_FreeBSD_oss_build_install.sh b/audio/oss/files/patch-setup_FreeBSD_oss_build_install.sh
new file mode 100644
index 000000000000..d7b478f3eb46
--- /dev/null
+++ b/audio/oss/files/patch-setup_FreeBSD_oss_build_install.sh
@@ -0,0 +1,33 @@
+--- setup/FreeBSD/oss/build/install.sh.orig 2014-02-14 22:59:55 UTC
++++ setup/FreeBSD/oss/build/install.sh
+@@ -1,11 +1,6 @@
+ #!/bin/sh
+
+-if test -f /etc/oss.conf
+-then
+- . /etc/oss.conf
+-else
+- OSSLIBDIR=/usr/lib/oss
+-fi
++OSSLIBDIR=${PREFIX}/lib/oss
+
+ rm -f osscore_mainline.o
+ ln -s osscore.lib osscore_mainline.o
+@@ -59,17 +54,4 @@ do
+ rm -f Makefile
+ done
+
+-if ! test -f $OSSLIBDIR/etc/installed_drivers
+-then
+- echo "-----------------------------"
+- /usr/sbin/ossdetect -v
+- echo "-----------------------------"
+- echo ""
+-fi
+-
+-if test ! -f $OSSLIBDIR/etc/userdefs
+-then
+- echo "autosave_mixer yes" > $OSSLIBDIR/etc/userdefs
+-fi
+-
+ exit 0
diff --git a/audio/oss/files/patch-setup_FreeBSD_sbin_soundoff b/audio/oss/files/patch-setup_FreeBSD_sbin_soundoff
new file mode 100644
index 000000000000..5e324f2fb19c
--- /dev/null
+++ b/audio/oss/files/patch-setup_FreeBSD_sbin_soundoff
@@ -0,0 +1,30 @@
+--- setup/FreeBSD/sbin/soundoff.orig 2014-02-14 22:59:55 UTC
++++ setup/FreeBSD/sbin/soundoff
+@@ -1,10 +1,10 @@
+ #!/bin/sh
+
+-if test -f /etc/oss.conf
++if test -f %%PREFIX%%/etc/oss.conf
+ then
+- . /etc/oss.conf
++ . %%PREFIX%%/etc/oss.conf
+ else
+- OSSLIBDIR=/usr/lib/oss
++ OSSLIBDIR=%%PREFIX%%/lib/oss
+ fi
+
+ if ! /sbin/kldstat | grep -q osscore.ko
+@@ -22,11 +22,11 @@ fi
+ # Save mixer settings automatically if requested
+ if test -f $OSSLIBDIR/etc/userdefs && grep -q "autosave_mixer yes" $OSSLIBDIR/etc/userdefs
+ then
+- /usr/sbin/savemixer
++ %%PREFIX%%/sbin/savemixer
+ fi
+
+ # Save legacy devices
+-/usr/sbin/ossdevlinks -N
++%%PREFIX%%/sbin/ossdevlinks -N
+
+ PROGRAMS="`fstat /dev/mixer* /dev/dsp* /dev/midi* /dev/oss/*/* 2>/dev/null | sed '1 D'`"
+
diff --git a/audio/oss/files/patch-setup_FreeBSD_sbin_soundon b/audio/oss/files/patch-setup_FreeBSD_sbin_soundon
new file mode 100644
index 000000000000..ac0076f71181
--- /dev/null
+++ b/audio/oss/files/patch-setup_FreeBSD_sbin_soundon
@@ -0,0 +1,66 @@
+--- setup/FreeBSD/sbin/soundon.orig 2014-02-14 22:59:55 UTC
++++ setup/FreeBSD/sbin/soundon
+@@ -1,10 +1,10 @@
+ #!/bin/sh
+
+-if test -f /etc/oss.conf
++if test -f %%PREFIX%%/etc/oss.conf
+ then
+- . /etc/oss.conf
++ . %%PREFIX%%/etc/oss.conf
+ else
+- OSSLIBDIR=/usr/lib/oss
++ OSSLIBDIR=%%PREFIX%%/lib/oss
+ fi
+
+ LOG=/var/log/soundon.log
+@@ -29,7 +29,7 @@ fi
+
+ if test -f $OSSLIBDIR/etc/license.asc
+ then
+- /usr/sbin/ossdetect -l >> $LOG
++ %%PREFIX%%/sbin/ossdetect -l >> $LOG
+ fi
+
+ OPTIONS=
+@@ -70,7 +70,7 @@ do
+ done
+
+ echo "+++ ossinfo -v3 +++" >> $LOG
+-/usr/bin/ossinfo -v3 >> $LOG 2>&1
++%%PREFIX%%/bin/ossinfo -v3 >> $LOG 2>&1
+ echo "+++ /dev/sndstat +++" >> $LOG
+ cat /dev/sndstat >> $LOG 2>&1
+ echo "+++ dmesg +++" >> $LOG
+@@ -85,11 +85,11 @@ then
+ sh $OSSLIBDIR/etc/legacy_devices >> $LOG 2>&1
+ fi
+
+-/usr/sbin/ossdevlinks -v >> $LOG 2>&1
++%%PREFIX%%/sbin/ossdevlinks -v >> $LOG 2>&1
+
+ ls -l /dev/dsp* /dev/sndstat /dev/mixer* /dev/oss/*/* >> $LOG 2>&1
+
+-/usr/sbin/savemixer -L -v >> $LOG 2>&1
++%%PREFIX%%/sbin/savemixer -L -v >> $LOG 2>&1
+
+ if test -x $OSSLIBDIR/soundon.user
+ then
+@@ -97,7 +97,7 @@ then
+ $OSSLIBDIR/soundon.user >> $LOG 2>&1
+ fi
+
+-if test "`ossinfo -g|grep TRIAL` " != " "
++if test "`%%PREFIX%%/bin/ossinfo -g|grep TRIAL` " != " "
+ then
+ echo
+ echo "************************************************************"
+@@ -108,7 +108,7 @@ then
+ sleep 1
+ fi
+
+-if test "`ossinfo -g|grep EXPIRED` " != " "
++if test "`%%PREFIX%%/bin/ossinfo -g|grep EXPIRED` " != " "
+ then
+ echo
+ echo "****************************************************************"
diff --git a/audio/oss/files/patch-setup_srcconf.c b/audio/oss/files/patch-setup_srcconf.c
new file mode 100644
index 000000000000..53d97d093d40
--- /dev/null
+++ b/audio/oss/files/patch-setup_srcconf.c
@@ -0,0 +1,20 @@
+--- setup/srcconf.c.orig 2015-01-28 08:07:32 UTC
++++ setup/srcconf.c
+@@ -195,7 +195,7 @@ parse_config (FILE * f, conf_t * conf, c
+ {
+ parms = "";
+ if (getenv ("OGG_SUPPORT") != NULL)
+- parms = "-DOGG_SUPPORT";
++ parms = "-DOGG_SUPPORT -I%%LOCALBASE%%/include";
+ }
+
+ if (strcmp (line, "project") == 0)
+@@ -913,7 +913,7 @@ printf("Symlink %s -> %s\n", source, tar
+ if (config_phpmake)
+ fprintf (f, "<?php require getenv(\"PHPMAKE_LIBPATH\") . \"library.php\"; phpmake_makefile_top_rules(); ?>\n");
+
+- fprintf (f, "CC=%s\n", conf.ccomp);
++ fprintf (f, "CC=%s\n", targetcc);
+ // fprintf (f, "LD=ld\n");
+ fprintf (f, "HOSTCC=%s\n", hostcc);
+ fprintf (f, "CPLUSPLUS=%s\n", conf.cplusplus);
diff --git a/audio/p5-Audio-Ecasound/files/patch-Makefile.PL b/audio/p5-Audio-Ecasound/files/patch-Makefile.PL
index b73dc2dce76a..4e8dd55aeda1 100644
--- a/audio/p5-Audio-Ecasound/files/patch-Makefile.PL
+++ b/audio/p5-Audio-Ecasound/files/patch-Makefile.PL
@@ -1,6 +1,6 @@
---- Makefile.PL.orig 2010-11-21 12:26:33.201477139 +0900
-+++ Makefile.PL 2010-11-21 12:26:54.018506858 +0900
-@@ -8,7 +8,7 @@
+--- Makefile.PL.orig 2010-07-12 02:34:56 UTC
++++ Makefile.PL
+@@ -8,7 +8,7 @@ WriteMakefile(
# next two could be from libecasoundc-config --libs --cflags
# not for now since want it to install w/o libecasoundc-config
LIBS => ['-lecasoundc'],
diff --git a/audio/p5-Net-FreeDB/files/patch-Makefile.PL b/audio/p5-Net-FreeDB/files/patch-Makefile.PL
index 5dd6984df14f..f03231056a01 100644
--- a/audio/p5-Net-FreeDB/files/patch-Makefile.PL
+++ b/audio/p5-Net-FreeDB/files/patch-Makefile.PL
@@ -1,6 +1,6 @@
---- Makefile.PL.orig 2006-09-27 08:46:57.000000000 +0000
+--- Makefile.PL.orig 2014-10-15 18:10:11 UTC
+++ Makefile.PL
-@@ -9,6 +9,10 @@ if ($^O =~ /linux/) {
+@@ -12,6 +12,10 @@ if ($^O =~ /linux/) {
print "OS: $^O, copying XS file: ";
system("cp FreeDB.xs.linux FreeDB.xs") && die "Copying failed\n";
print "1 file copied\n";
diff --git a/audio/p5-Ogg-Vorbis-Header/files/patch-Header.pm b/audio/p5-Ogg-Vorbis-Header/files/patch-Header.pm
index 4adb945fdc98..e971019258db 100644
--- a/audio/p5-Ogg-Vorbis-Header/files/patch-Header.pm
+++ b/audio/p5-Ogg-Vorbis-Header/files/patch-Header.pm
@@ -1,7 +1,7 @@
---- Header.pm.orig 2016-07-01 18:06:38 UTC
+--- Header.pm.orig 2016-07-03 05:26:27 UTC
+++ Header.pm
@@ -7,8 +7,8 @@ use warnings;
- our $VERSION = '0.04';
+ our $VERSION = '0.05';
use Inline C => 'DATA',
- LIBS => '-logg -lvorbis -lvorbisfile',
@@ -10,4 +10,4 @@
+ INC => '-I${LOCALBASE}/include',
AUTO_INCLUDE => '#include "inc/vcedit.h"',
AUTO_INCLUDE => '#include "inc/vcedit.c"',
- VERSION => '0.04',
+ VERSION => '0.05',
diff --git a/audio/p5-libvorbis/files/patch-Makefile.PL b/audio/p5-libvorbis/files/patch-Makefile.PL
index c30aabb02f81..87fdd5041e13 100644
--- a/audio/p5-libvorbis/files/patch-Makefile.PL
+++ b/audio/p5-libvorbis/files/patch-Makefile.PL
@@ -1,6 +1,6 @@
---- Makefile.PL.orig Mon Oct 23 08:53:08 2000
-+++ Makefile.PL Wed Jul 31 16:09:47 2002
-@@ -4,8 +4,7 @@
+--- Makefile.PL.orig 2003-08-13 14:16:29 UTC
++++ Makefile.PL
+@@ -4,8 +4,7 @@ use ExtUtils::MakeMaker;
WriteMakefile(
'NAME' => 'Ogg::Vorbis',
'VERSION_FROM' => 'Vorbis.pm',
diff --git a/audio/patchage/files/patch-src-Patchage.cpp b/audio/patchage/files/patch-src-Patchage.cpp
deleted file mode 100644
index 5677cd232470..000000000000
--- a/audio/patchage/files/patch-src-Patchage.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/Patchage.cpp.orig 2011-01-10 07:53:06.000000000 +0900
-+++ src/Patchage.cpp 2011-07-24 02:43:38.000000000 +0900
-@@ -21,6 +21,11 @@
- #include <fstream>
- #include <sstream>
-
-+#include <sys/param.h>
-+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
-+#define log2f(x) (logf(x) / logf(2))
-+#endif
-+
- #include <gtk/gtkwindow.h>
- #include <libglademm/xml.h>
- #include <libgnomecanvasmm.h>
diff --git a/audio/patchage/files/patch-src_Patchage.cpp b/audio/patchage/files/patch-src_Patchage.cpp
new file mode 100644
index 000000000000..cb3c45f07261
--- /dev/null
+++ b/audio/patchage/files/patch-src_Patchage.cpp
@@ -0,0 +1,14 @@
+--- src/Patchage.cpp.orig 2011-01-09 22:53:06 UTC
++++ src/Patchage.cpp
+@@ -21,6 +21,11 @@
+ #include <fstream>
+ #include <sstream>
+
++#include <sys/param.h>
++#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
++#define log2f(x) (logf(x) / logf(2))
++#endif
++
+ #include <gtk/gtkwindow.h>
+ #include <libglademm/xml.h>
+ #include <libgnomecanvasmm.h>
diff --git a/audio/pd/files/patch-extra_pd_pd.c b/audio/pd/files/patch-extra_pd_pd.c
deleted file mode 100644
index a8c0e0ce9e7e..000000000000
--- a/audio/pd/files/patch-extra_pd_pd.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- extra/pd~/pd~.c.orig 2016-05-13 08:31:10 UTC
-+++ extra/pd~/pd~.c
-@@ -19,6 +19,7 @@ typedef int socklen_t;
- #include <stdlib.h>
- #include <errno.h>
- #include <ctype.h>
-+#include <signal.h>
- #include <sys/wait.h>
- #include <fcntl.h>
- #endif
diff --git a/audio/pd/files/patch-extra_pd~_pd~.c b/audio/pd/files/patch-extra_pd~_pd~.c
new file mode 100644
index 000000000000..3989b1e5a3ef
--- /dev/null
+++ b/audio/pd/files/patch-extra_pd~_pd~.c
@@ -0,0 +1,10 @@
+--- extra/pd~/pd~.c.orig 2016-04-13 23:39:44 UTC
++++ extra/pd~/pd~.c
+@@ -19,6 +19,7 @@ typedef int socklen_t;
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <ctype.h>
++#include <signal.h>
+ #include <sys/wait.h>
+ #include <fcntl.h>
+ #endif
diff --git a/audio/pd/files/patch-src_s__audio__alsa.c b/audio/pd/files/patch-src_s__audio__alsa.c
index 7bbf1b3b55bf..edf75f8e8fdb 100644
--- a/audio/pd/files/patch-src_s__audio__alsa.c
+++ b/audio/pd/files/patch-src_s__audio__alsa.c
@@ -1,4 +1,4 @@
---- src/s_audio_alsa.c.orig 2014-09-18 00:09:56 UTC
+--- src/s_audio_alsa.c.orig 2016-04-03 04:15:36 UTC
+++ src/s_audio_alsa.c
@@ -25,7 +25,14 @@
#include <sched.h>
diff --git a/audio/pianobar/files/patch-Makefile b/audio/pianobar/files/patch-Makefile
index bd162ce3fa6b..d3ab3eb76534 100644
--- a/audio/pianobar/files/patch-Makefile
+++ b/audio/pianobar/files/patch-Makefile
@@ -1,12 +1,11 @@
-diff -urN pianobar-2013.09.15.orig/Makefile pianobar-2013.09.15/Makefile
---- Makefile 2013-09-15 06:54:04.000000000 -0700
-+++ Makefile 2013-09-23 12:20:05.869414665 -0700
-@@ -4,7 +4,7 @@
+--- Makefile.orig 2016-06-02 06:49:26 UTC
++++ Makefile
+@@ -4,7 +4,7 @@ PREFIX:=/usr/local
BINDIR:=${PREFIX}/bin
LIBDIR:=${PREFIX}/lib
INCDIR:=${PREFIX}/include
-MANDIR:=${PREFIX}/share/man
+MANDIR:=${PREFIX}/man
DYNLINK:=0
+ CFLAGS?=-O2 -DNDEBUG
- # Respect environment variables set by user; does not work with :=
diff --git a/audio/pithos/files/patch-setup.py b/audio/pithos/files/patch-setup.py
index 2445832bd5ea..cbd9afc1d6d8 100644
--- a/audio/pithos/files/patch-setup.py
+++ b/audio/pithos/files/patch-setup.py
@@ -1,6 +1,6 @@
---- setup.py.orig 2014-05-01 18:33:16.000000000 -0400
-+++ setup.py 2014-07-24 20:19:53.091960936 -0400
-@@ -37,11 +37,11 @@
+--- setup.py.orig 2014-05-01 22:33:16 UTC
++++ setup.py
+@@ -37,11 +37,11 @@ def read(fname):
if sys.platform != 'win32':
data_files = [
@@ -17,7 +17,7 @@
]
else:
data_files = []
-@@ -78,6 +78,7 @@
+@@ -78,6 +78,7 @@ setup(
],
packages=find_packages(),
include_package_data=True,
diff --git a/audio/play/files/patch-encode__riff.c b/audio/play/files/patch-encode__riff.c
new file mode 100644
index 000000000000..9965314a2953
--- /dev/null
+++ b/audio/play/files/patch-encode__riff.c
@@ -0,0 +1,54 @@
+--- encode_riff.c.orig 1997-03-25 15:25:07 UTC
++++ encode_riff.c
+@@ -11,7 +11,7 @@ static char rcsid[] =
+ #include <signal.h>
+ #include <err.h>
+
+-#include <machine/soundcard.h>
++#include <sys/soundcard.h>
+
+ #include "play.h"
+ #include "encode_riff.h"
+@@ -74,7 +74,7 @@ int play_riff(char *audio_file, riff_hea
+ char *bufp;
+ char *device;
+ int devfd, filefd;
+- int stat, len, buf_size, format, data_length;
++ int stat, len, buf_size, format = 0, data_length;
+
+ if (!f_hasdsp) {
+ fprintf(stderr, "%s: %s: needs DSP for play\n", myname, audio_file);
+@@ -109,7 +109,12 @@ int play_riff(char *audio_file, riff_hea
+ warn("%s", device);
+ stat = FAIL; goto failplay0;
+ }
++#if 0
++ /* this (at least under fbsd) means that you want to set play format
++ * to headerp->sample_size which is a nonsense */
+ if (ioctl(devfd, SNDCTL_DSP_SAMPLESIZE, &headerp->sample_size) < 0) {
++#endif
++ if (ioctl(devfd, SNDCTL_DSP_SAMPLESIZE, &format) < 0) {
+ warn("%s", device);
+ stat = FAIL; goto failplay0;
+ }
+@@ -121,11 +126,6 @@ int play_riff(char *audio_file, riff_hea
+ warn("%s", device);
+ stat = FAIL; goto failplay0;
+ }
+- /* XXX */
+- if (ioctl(devfd, SNDCTL_DSP_SETFMT, &format) < 0) {
+- warn("%s", device);
+- stat = FAIL; goto failplay0;
+- }
+ if (headerp->channels > 1) {
+ int ch = headerp->channels;
+ if (ioctl(devfd, SNDCTL_DSP_STEREO, &ch) < 0) {
+@@ -163,6 +163,8 @@ int play_riff(char *audio_file, riff_hea
+ warn("read");
+ stat = FAIL; goto failplay2;
+ }
++/* printf("len = %10d, len = %10d\n", stat, len); */
++ stat = (len < stat)? len : stat;
+ if (write(devfd, bufp, stat) < 0) {
+ warn("write");
+ stat = FAIL; goto failplay2;
diff --git a/audio/play/files/patch-encode_riff.c b/audio/play/files/patch-encode_riff.c
deleted file mode 100644
index c4ce12c4b53c..000000000000
--- a/audio/play/files/patch-encode_riff.c
+++ /dev/null
@@ -1,54 +0,0 @@
---- encode_riff.c.orig Tue Mar 25 16:25:07 1997
-+++ encode_riff.c Thu Aug 19 14:37:52 2004
-@@ -11,7 +11,7 @@
- #include <signal.h>
- #include <err.h>
-
--#include <machine/soundcard.h>
-+#include <sys/soundcard.h>
-
- #include "play.h"
- #include "encode_riff.h"
-@@ -74,7 +74,7 @@
- char *bufp;
- char *device;
- int devfd, filefd;
-- int stat, len, buf_size, format, data_length;
-+ int stat, len, buf_size, format = 0, data_length;
-
- if (!f_hasdsp) {
- fprintf(stderr, "%s: %s: needs DSP for play\n", myname, audio_file);
-@@ -109,7 +109,12 @@
- warn("%s", device);
- stat = FAIL; goto failplay0;
- }
-+#if 0
-+ /* this (at least under fbsd) means that you want to set play format
-+ * to headerp->sample_size which is a nonsense */
- if (ioctl(devfd, SNDCTL_DSP_SAMPLESIZE, &headerp->sample_size) < 0) {
-+#endif
-+ if (ioctl(devfd, SNDCTL_DSP_SAMPLESIZE, &format) < 0) {
- warn("%s", device);
- stat = FAIL; goto failplay0;
- }
-@@ -121,11 +126,6 @@
- warn("%s", device);
- stat = FAIL; goto failplay0;
- }
-- /* XXX */
-- if (ioctl(devfd, SNDCTL_DSP_SETFMT, &format) < 0) {
-- warn("%s", device);
-- stat = FAIL; goto failplay0;
-- }
- if (headerp->channels > 1) {
- int ch = headerp->channels;
- if (ioctl(devfd, SNDCTL_DSP_STEREO, &ch) < 0) {
-@@ -163,6 +163,8 @@
- warn("read");
- stat = FAIL; goto failplay2;
- }
-+/* printf("len = %10d, len = %10d\n", stat, len); */
-+ stat = (len < stat)? len : stat;
- if (write(devfd, bufp, stat) < 0) {
- warn("write");
- stat = FAIL; goto failplay2;
diff --git a/audio/play/files/patch-play.c b/audio/play/files/patch-play.c
index 6f11414e8534..e8a74e8aa5e8 100644
--- a/audio/play/files/patch-play.c
+++ b/audio/play/files/patch-play.c
@@ -1,12 +1,10 @@
-*** play.c.orig Wed May 20 11:42:42 1998
---- play.c Wed May 20 13:21:15 1998
-***************
-*** 4,9 ****
---- 4,10 ----
-
- #include <stdio.h>
- #include <stdlib.h>
-+ #include <unistd.h>
- #include <fcntl.h>
- #include <err.h>
- #include <signal.h>
+--- play.c.orig 1997-03-25 15:25:12 UTC
++++ play.c
+@@ -4,6 +4,7 @@ static char rcsid[] = "$Id: play.c,v 1.7
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <fcntl.h>
+ #include <err.h>
+ #include <signal.h>
diff --git a/audio/playgsf/files/patch-VBA_GBA.cpp b/audio/playgsf/files/patch-VBA_GBA.cpp
new file mode 100644
index 000000000000..e8e3a13f90c2
--- /dev/null
+++ b/audio/playgsf/files/patch-VBA_GBA.cpp
@@ -0,0 +1,17 @@
+--- VBA/GBA.cpp.orig 2016-07-26 15:40:39 UTC
++++ VBA/GBA.cpp
+@@ -1054,12 +1054,12 @@ int CPULoadRom(const char *szFile)
+ {
+ rom = (u8 *)malloc(0x200);
+ loadedsize=0;
+- i = (int)utilLoad(szFile,utilIsGBAImage,whereToLoad,size);
++ i = (long)utilLoad(szFile,utilIsGBAImage,whereToLoad,size);
+ }
+ else
+ {
+ rom = utilLoad(szFile,utilIsGBAImage,whereToLoad,size);
+- i = (int) rom;
++ i = (long) rom;
+ }
+
+ //loadedsize = sizeof(*rom);
diff --git a/audio/playgsf/files/patch-VBA_Util.cpp b/audio/playgsf/files/patch-VBA_Util.cpp
index 096a5f6f0262..b89973153125 100644
--- a/audio/playgsf/files/patch-VBA_Util.cpp
+++ b/audio/playgsf/files/patch-VBA_Util.cpp
@@ -1,6 +1,6 @@
---- ./VBA/Util.cpp.orig 2013-04-02 11:32:02.322879639 +0200
-+++ ./VBA/Util.cpp 2013-04-02 11:33:58.107884638 +0200
-@@ -1484,7 +1484,8 @@
+--- VBA/Util.cpp.orig 2016-07-26 15:40:39 UTC
++++ VBA/Util.cpp
+@@ -1484,7 +1484,8 @@ void utilWriteData(gzFile gzFile, variab
gzFile utilGzOpen(const char *file, const char *mode)
{
diff --git a/audio/playgsf/files/patch-VBA__GBA.cpp b/audio/playgsf/files/patch-VBA__GBA.cpp
deleted file mode 100644
index b97fbe111df9..000000000000
--- a/audio/playgsf/files/patch-VBA__GBA.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
---- ./VBA/GBA.cpp.orig 2013-04-02 11:31:53.610879624 +0200
-+++ ./VBA/GBA.cpp 2013-04-02 11:31:53.631880125 +0200
-@@ -1054,12 +1054,12 @@
- {
- rom = (u8 *)malloc(0x200);
- loadedsize=0;
-- i = (int)utilLoad(szFile,utilIsGBAImage,whereToLoad,size);
-+ i = (long)utilLoad(szFile,utilIsGBAImage,whereToLoad,size);
- }
- else
- {
- rom = utilLoad(szFile,utilIsGBAImage,whereToLoad,size);
-- i = (int) rom;
-+ i = (long) rom;
- }
-
- //loadedsize = sizeof(*rom);
diff --git a/audio/playgsf/files/patch-libresample-0.1.3_Makefile.in b/audio/playgsf/files/patch-libresample-0.1.3_Makefile.in
new file mode 100644
index 000000000000..715ca00f65c1
--- /dev/null
+++ b/audio/playgsf/files/patch-libresample-0.1.3_Makefile.in
@@ -0,0 +1,13 @@
+--- libresample-0.1.3/Makefile.in.orig 2016-07-26 15:40:39 UTC
++++ libresample-0.1.3/Makefile.in
+@@ -3,8 +3,8 @@
+ # systems, use this file as a template to create a
+ # working Makefile.
+
+-CC = @CC@
+-CFLAGS = @CFLAGS@ -Wall
++CC ?= @CC@
++CFLAGS ?= @CFLAGS@ -Wall
+
+ LIBS = @LIBS@ -lm
+
diff --git a/audio/playgsf/files/patch-libresample-0.1.3__Makefile.in b/audio/playgsf/files/patch-libresample-0.1.3__Makefile.in
deleted file mode 100644
index d33cee871dd0..000000000000
--- a/audio/playgsf/files/patch-libresample-0.1.3__Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./libresample-0.1.3/Makefile.in.orig 2013-03-30 04:01:28.000000000 +0100
-+++ ./libresample-0.1.3/Makefile.in 2013-03-30 14:03:51.000000000 +0100
-@@ -3,8 +3,8 @@
- # systems, use this file as a template to create a
- # working Makefile.
-
--CC = @CC@
--CFLAGS = @CFLAGS@ -Wall
-+CC ?= @CC@
-+CFLAGS ?= @CFLAGS@ -Wall
-
- LIBS = @LIBS@ -lm
-
diff --git a/audio/playmidi/files/patch-Configure b/audio/playmidi/files/patch-Configure
index 4e764cf74af6..c7b9844dbf81 100644
--- a/audio/playmidi/files/patch-Configure
+++ b/audio/playmidi/files/patch-Configure
@@ -1,6 +1,6 @@
---- Configure.orig Mon May 12 06:26:36 1997
-+++ Configure Tue Aug 15 22:51:15 2000
-@@ -8,7 +8,7 @@
+--- Configure.orig 1997-05-11 21:26:36 UTC
++++ Configure
+@@ -8,7 +8,7 @@ fmmode=0
mididevno=-1
play=PLAY_MIDI
gus1=/dos/ultrasnd/midi
diff --git a/audio/playmidi/files/patch-Makefile b/audio/playmidi/files/patch-Makefile
index d08757d1c3ae..7cacb2da2d0e 100644
--- a/audio/playmidi/files/patch-Makefile
+++ b/audio/playmidi/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 1998-10-01 04:39:18.000000000 +0200
-+++ Makefile 2014-02-16 11:55:45.713871624 +0100
+--- Makefile.orig 1998-10-01 02:39:18 UTC
++++ Makefile
@@ -12,39 +12,40 @@
# ncurses usually /usr/lib, -L/usr/local/lib doesn't hurt
@@ -54,7 +54,7 @@
OBJECTS = playmidi.o readmidi.o playevents.o \
patchload.o emumidi.o io_ncurses.o
-@@ -58,7 +59,7 @@
+@@ -58,7 +59,7 @@ SOBJECTS= playmidi.o readmidi.o playeven
GOBJECTS= playmidi.o readmidi.o playevents.o \
patchload.o emumidi.o io_gtk.o
@@ -63,7 +63,7 @@
config:
playmidi.h: playmidi.h-dist
-@@ -73,64 +74,70 @@
+@@ -73,64 +74,70 @@ io_xaw.o: io_xaw.c
io_svgalib.o: io_svgalib.c
$(CC) $(CFLAGS) $(INCVGA) -c io_svgalib.c -o io_svgalib.o
@@ -97,24 +97,24 @@
$(INSTALLDIR)/splaymidi: splaymidi
- $(INSTALL) splaymidi $(INSTALLDIR)
-+ ${BSD_INSTALL_PROGRAM} splaymidi $(INSTALLDIR)
-
+-
-/etc/std.o3:
- cp -i std.o3 /etc
++ ${BSD_INSTALL_PROGRAM} splaymidi $(INSTALLDIR)
+
+-/etc/drums.o3:
+- cp -i drums.o3 /etc
+$(MIDI)/std.o3:
+ ${BSD_INSTALL_DATA} std.o3 $(MIDI)
+
+$(MIDI)/drums.o3:
+ ${BSD_INSTALL_DATA} drums.o3 $(MIDI)
--/etc/drums.o3:
-- cp -i drums.o3 /etc
+-/etc/std.sb:
+- cp -i std.sb /etc
+$(MIDI)/std.sb:
+ ${BSD_INSTALL_DATA} std.sb $(MIDI)
--/etc/std.sb:
-- cp -i std.sb /etc
--
-/etc/drums.sb:
- cp -i drums.sb /etc
+$(MIDI)/drums.sb:
@@ -122,38 +122,35 @@
$(XAPPDEFAULTS)/XPlaymidi:
- cp -i XPlaymidi.ad $(XAPPDEFAULTS)/XPlaymidi
--
++ ${BSD_INSTALL_DATA} XPlaymidi.ad $(XAPPDEFAULTS)/XPlaymidi
+
-install: $(INSTALLDIR)/playmidi $(INSTALLDIR)/splaymidi \
- $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \
- /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi
--
--install.novga: $(INSTALLDIR)/playmidi \
-- $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \
-- /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi
-+ ${BSD_INSTALL_DATA} XPlaymidi.ad $(XAPPDEFAULTS)/XPlaymidi
-
--install.noX11: $(INSTALLDIR)/playmidi $(INSTALLDIR)/splaymidi \
-- /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb
+dirs:
+ -@mkdir -p $(MIDI)
--install.Xonly: $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \
+-install.novga: $(INSTALLDIR)/playmidi \
+- $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \
- /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi
--
--install.lame: $(INSTALLDIR)/playmidi \
-- /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb
+install: dirs $(INSTALLDIR)/playmidi $(INSTALLDIR)/splaymidi \
+ $(INSTALLDIR)/xplaymidi $(MIDI)/std.o3 $(MIDI)/drums.o3 \
+ $(MIDI)/std.sb $(MIDI)/drums.sb $(XAPPDEFAULTS)/XPlaymidi
-+
+
+-install.noX11: $(INSTALLDIR)/playmidi $(INSTALLDIR)/splaymidi \
+- /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb
+install.novga: dirs $(INSTALLDIR)/playmidi \
+ $(INSTALLDIR)/xplaymidi $(MIDI)/std.o3 $(MIDI)/drums.o3 \
+ $(MIDI)/std.sb $(MIDI)/drums.sb $(XAPPDEFAULTS)/XPlaymidi
-+
+
+-install.Xonly: $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \
+- /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi
+install.noX11: dirs $(INSTALLDIR)/playmidi $(INSTALLDIR)/splaymidi \
+ $(MIDI)/std.o3 $(MIDI)/drums.o3 \
+ $(MIDI)/std.sb $(MIDI)/drums.sb
-+
+
+-install.lame: $(INSTALLDIR)/playmidi \
+- /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb
+install.Xonly: dirs $(INSTALLDIR)/xplaymidi \
+ $(MIDI)/std.o3 $(MIDI)/drums.o3 \
+ $(MIDI)/std.sb $(MIDI)/drums.sb $(XAPPDEFAULTS)/XPlaymidi
@@ -168,7 +165,7 @@
clean:
rm -f *.o playmidi splaymidi xplaymidi a.out toy seq2mid beat
-@@ -138,22 +145,3 @@
+@@ -138,22 +145,3 @@ clean:
distclean: clean
rm -f .depend *~ *.bak playmidi.h config.sed
diff --git a/audio/playmidi/files/patch-emumidi.h b/audio/playmidi/files/patch-emumidi.h
index 39df7639dc57..5b1d23638c0c 100644
--- a/audio/playmidi/files/patch-emumidi.h
+++ b/audio/playmidi/files/patch-emumidi.h
@@ -1,5 +1,5 @@
---- emumidi.h.orig Sun May 11 23:26:36 1997
-+++ emumidi.h Mon Nov 17 22:05:20 2003
+--- emumidi.h.orig 1997-05-11 21:26:36 UTC
++++ emumidi.h
@@ -17,7 +17,6 @@
#ifdef linux
#include <linux/ultrasound.h>
diff --git a/audio/playmidi/files/patch-patchload.c b/audio/playmidi/files/patch-patchload.c
index 904a15095111..1d08763abd57 100644
--- a/audio/playmidi/files/patch-patchload.c
+++ b/audio/playmidi/files/patch-patchload.c
@@ -1,5 +1,5 @@
---- patchload.c.orig Sat Feb 7 17:22:51 1998
-+++ patchload.c Mon Nov 17 22:10:07 2003
+--- patchload.c.orig 1998-02-07 16:22:51 UTC
++++ patchload.c
@@ -19,7 +19,6 @@
#ifdef linux
#include <linux/ultrasound.h>
@@ -8,7 +8,7 @@
#endif
#include <sys/stat.h>
#include <fcntl.h>
-@@ -93,7 +92,6 @@
+@@ -93,7 +92,6 @@ int pgm;
if (pgm < 0) {
use8bit = force8bit;
diff --git a/audio/playmidi/files/patch-playmidi.h-dist b/audio/playmidi/files/patch-playmidi.h-dist
new file mode 100644
index 000000000000..5fbe13926c45
--- /dev/null
+++ b/audio/playmidi/files/patch-playmidi.h-dist
@@ -0,0 +1,17 @@
+--- playmidi.h-dist.orig 1997-05-11 21:26:36 UTC
++++ playmidi.h-dist
+@@ -35,10 +35,10 @@
+ #define MAXTRKS 128
+ /* where to find fm patch libraries */
+ #define SEQUENCER_DEV "/dev/sequencer"
+-#define O3MELODIC "/etc/std.o3"
+-#define O3DRUMS "/etc/drums.o3"
+-#define SBMELODIC "/etc/std.sb"
+-#define SBDRUMS "/etc/drums.sb"
++#define O3MELODIC MIDI "/std.o3"
++#define O3DRUMS MIDI "/drums.o3"
++#define SBMELODIC MIDI "/std.sb"
++#define SBDRUMS MIDI "/drums.sb"
+ #define ISPERC(x) (perc & (1 << x))
+ #define ISGUS(x) (play_gus & (1 << x))
+ #define ISFM(x) (play_fm & (1 << x))
diff --git a/audio/playmidi/files/patch-playmidi_h-dist b/audio/playmidi/files/patch-playmidi_h-dist
deleted file mode 100644
index 53ef556a7e4b..000000000000
--- a/audio/playmidi/files/patch-playmidi_h-dist
+++ /dev/null
@@ -1,17 +0,0 @@
---- playmidi.h-dist.orig Mon May 12 06:26:36 1997
-+++ playmidi.h-dist Tue Aug 15 23:02:27 2000
-@@ -35,10 +35,10 @@
- #define MAXTRKS 128
- /* where to find fm patch libraries */
- #define SEQUENCER_DEV "/dev/sequencer"
--#define O3MELODIC "/etc/std.o3"
--#define O3DRUMS "/etc/drums.o3"
--#define SBMELODIC "/etc/std.sb"
--#define SBDRUMS "/etc/drums.sb"
-+#define O3MELODIC MIDI "/std.o3"
-+#define O3DRUMS MIDI "/drums.o3"
-+#define SBMELODIC MIDI "/std.sb"
-+#define SBDRUMS MIDI "/drums.sb"
- #define ISPERC(x) (perc & (1 << x))
- #define ISGUS(x) (play_gus & (1 << x))
- #define ISFM(x) (play_fm & (1 << x))
diff --git a/audio/pm3umpdl/files/patch-pm3umpdl-1.0.0 b/audio/pm3umpdl/files/patch-pm3umpdl-1.0.0
index a8a27e16eb4a..220ee02f0513 100644
--- a/audio/pm3umpdl/files/patch-pm3umpdl-1.0.0
+++ b/audio/pm3umpdl/files/patch-pm3umpdl-1.0.0
@@ -1,6 +1,6 @@
---- ./pm3umpdl-1.0.0.orig 2014-09-19 23:21:45.605430746 +0400
-+++ ./pm3umpdl-1.0.0 2014-09-19 23:27:36.057142106 +0400
-@@ -103,6 +103,8 @@
+--- pm3umpdl-1.0.0.orig 2016-07-26 15:41:09 UTC
++++ pm3umpdl-1.0.0
+@@ -103,6 +103,8 @@ pm3umpdl B<-f> <file> [B<-c>] [B<-l>] [B
=head1 FLAGS
@@ -9,7 +9,7 @@
=item -c
If set, it will clear the playlist first.
-@@ -119,12 +121,18 @@
+@@ -119,12 +121,18 @@ If set, along with -p, this will play th
If set, it
diff --git a/audio/pms/files/patch-Makefile.in b/audio/pms/files/patch-Makefile.in
index 72d0f85016f5..8510ba6dfe7f 100644
--- a/audio/pms/files/patch-Makefile.in
+++ b/audio/pms/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2010-05-14 13:49:13.000000000 +0200
-+++ Makefile.in 2014-05-18 13:35:32.621813124 +0200
-@@ -238,55 +238,19 @@
+--- Makefile.in.orig 2010-05-14 11:49:13 UTC
++++ Makefile.in
+@@ -238,55 +238,19 @@ all: config.h
.SUFFIXES: .c .cpp .o .obj
am--refresh:
@:
@@ -27,30 +27,25 @@
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
--
++$(srcdir)/Makefile.in:
+
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
--
++Makefile:
+
-$(top_srcdir)/configure: $(am__configure_deps)
- $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
--
++$(top_builddir)/config.status:
+
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
-+$(srcdir)/Makefile.in:
-+
-+Makefile:
-+
-+$(top_builddir)/config.status:
-+
+$(top_srcdir)/configure:
-+
-+config.h:
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
@@ -59,6 +54,8 @@
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
++config.h:
++
+stamp-h1:
distclean-hdr:
diff --git a/audio/pms/files/patch-src_message.h b/audio/pms/files/patch-src_message.h
index 6376d8b8e232..a61e3dd75a09 100644
--- a/audio/pms/files/patch-src_message.h
+++ b/audio/pms/files/patch-src_message.h
@@ -1,5 +1,5 @@
---- src/message.h.orig 2010-01-02 21:53:36.000000000 +0100
-+++ src/message.h 2014-01-19 16:59:54.616726275 +0100
+--- src/message.h.orig 2010-01-02 20:53:36 UTC
++++ src/message.h
@@ -25,6 +25,7 @@
#define _PMS_MESSAGE_H_
diff --git a/audio/pms/files/patch-src_pms.cpp b/audio/pms/files/patch-src_pms.cpp
index 8bf9ac126e33..bf6f012f416f 100644
--- a/audio/pms/files/patch-src_pms.cpp
+++ b/audio/pms/files/patch-src_pms.cpp
@@ -1,4 +1,4 @@
---- src/pms.cpp.orig
+--- src/pms.cpp.orig 2010-05-13 23:17:13 UTC
+++ src/pms.cpp
@@ -23,6 +23,10 @@
diff --git a/audio/praat/files/patch-external_portaudio_Makefile b/audio/praat/files/patch-external_portaudio_Makefile
index a773129cb39c..455236105f6a 100644
--- a/audio/praat/files/patch-external_portaudio_Makefile
+++ b/audio/praat/files/patch-external_portaudio_Makefile
@@ -1,4 +1,4 @@
---- external/portaudio/Makefile.orig 2015-05-20 01:47:31 UTC
+--- external/portaudio/Makefile.orig 2016-07-26 15:41:19 UTC
+++ external/portaudio/Makefile
@@ -3,8 +3,9 @@
diff --git a/audio/praat/files/patch-sys_melder.h b/audio/praat/files/patch-sys_melder.h
index 14449446ce3c..f90bdd43c20a 100644
--- a/audio/praat/files/patch-sys_melder.h
+++ b/audio/praat/files/patch-sys_melder.h
@@ -1,4 +1,4 @@
---- sys/melder.h.orig 2015-03-22 17:29:26 UTC
+--- sys/melder.h.orig 2015-05-20 01:47:31 UTC
+++ sys/melder.h
@@ -51,6 +51,8 @@
#define INT54_MIN -9007199254740991LL
diff --git a/audio/praat/files/patch-sys_melder__alloc.cpp b/audio/praat/files/patch-sys_melder__alloc.cpp
index e68e90b9a550..261cb1dcbfc8 100644
--- a/audio/praat/files/patch-sys_melder__alloc.cpp
+++ b/audio/praat/files/patch-sys_melder__alloc.cpp
@@ -1,4 +1,4 @@
---- sys/melder_alloc.cpp.orig 2015-01-30 17:35:26 UTC
+--- sys/melder_alloc.cpp.orig 2015-05-20 01:47:31 UTC
+++ sys/melder_alloc.cpp
@@ -317,8 +317,8 @@ int Melder_strcmp (const char *string1,
}
diff --git a/audio/praat/files/patch-sys_melder__files.cpp b/audio/praat/files/patch-sys_melder__files.cpp
index 67377a49c69f..9111bdb9f637 100644
--- a/audio/praat/files/patch-sys_melder__files.cpp
+++ b/audio/praat/files/patch-sys_melder__files.cpp
@@ -1,4 +1,4 @@
---- sys/melder_files.cpp.orig 2015-03-24 09:58:31 UTC
+--- sys/melder_files.cpp.orig 2015-05-20 01:47:31 UTC
+++ sys/melder_files.cpp
@@ -301,7 +301,7 @@ void MelderFile_setToNull (MelderFile fi
}
diff --git a/audio/praat/files/patch-sys_melder__strings.cpp b/audio/praat/files/patch-sys_melder__strings.cpp
index 505600428377..3bcacb5fef90 100644
--- a/audio/praat/files/patch-sys_melder__strings.cpp
+++ b/audio/praat/files/patch-sys_melder__strings.cpp
@@ -1,4 +1,4 @@
---- sys/melder_strings.cpp.orig 2015-02-01 16:38:59 UTC
+--- sys/melder_strings.cpp.orig 2015-05-20 01:47:31 UTC
+++ sys/melder_strings.cpp
@@ -386,7 +386,7 @@ void MelderString32_appendCharacter (Mel
expandIfNecessary (char32)
diff --git a/audio/pragha/files/patch-configure b/audio/pragha/files/patch-configure
index 3d7e8027390c..032cd1891ec8 100644
--- a/audio/pragha/files/patch-configure
+++ b/audio/pragha/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2015-02-21 22:12:00 UTC
+--- configure.orig 2015-09-23 23:09:54 UTC
+++ configure
-@@ -12595,7 +12595,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>
+@@ -12523,7 +12523,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>
fi
fi
diff --git a/audio/pragha/files/patch-plugins_Makefile.in b/audio/pragha/files/patch-plugins_Makefile.in
index 39ee7974c32f..c0d5d291061c 100644
--- a/audio/pragha/files/patch-plugins_Makefile.in
+++ b/audio/pragha/files/patch-plugins_Makefile.in
@@ -1,8 +1,8 @@
Remove 'gnome-media-keys' plugin, it requires sysutils/gnome-settings-daemon.
---- plugins/Makefile.in.orig 2015-02-21 22:11:57 UTC
+--- plugins/Makefile.in.orig 2015-09-23 23:30:18 UTC
+++ plugins/Makefile.in
-@@ -182,7 +182,7 @@ am__define_uniq_tagged_files = \
+@@ -192,7 +192,7 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
@@ -10,8 +10,8 @@ Remove 'gnome-media-keys' plugin, it requires sysutils/gnome-settings-daemon.
+DIST_SUBDIRS = mpris2 song-info keybinder notify \
devices removable-media mtp acoustid tunein dlna dlna-renderer \
cdrom lastfm
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-@@ -467,7 +467,7 @@ AM_CPPFLAGS = \
+ am__DIST_COMMON = $(srcdir)/Makefile.in
+@@ -474,7 +474,7 @@ AM_CPPFLAGS = \
pluginincludedir = $(includedir)/pragha/plugins
plugininclude_HEADERS = pragha-plugin-macros.h
diff --git a/audio/pulseaudio/files/patch-src_Makefile.in b/audio/pulseaudio/files/patch-src_Makefile.in
index 2c19f6f58e8b..1c4093c8e217 100644
--- a/audio/pulseaudio/files/patch-src_Makefile.in
+++ b/audio/pulseaudio/files/patch-src_Makefile.in
@@ -1,6 +1,6 @@
---- src/Makefile.in.orig 2016-02-01 11:20:44.952568000 +0100
-+++ src/Makefile.in 2016-02-01 11:22:08.462998000 +0100
-@@ -11042,7 +11042,7 @@
+--- src/Makefile.in.orig 2016-01-22 07:34:26 UTC
++++ src/Makefile.in
+@@ -11042,7 +11042,7 @@ info-am:
install-data-am: install-commonlibLTLIBRARIES install-dbuspolicyDATA \
install-dist_alsapathsDATA install-dist_alsaprofilesetsDATA \
diff --git a/audio/pulseaudio/files/patch-src_daemon_default.pa.in b/audio/pulseaudio/files/patch-src_daemon_default.pa.in
index 06870ba4705b..5b2918cc291a 100644
--- a/audio/pulseaudio/files/patch-src_daemon_default.pa.in
+++ b/audio/pulseaudio/files/patch-src_daemon_default.pa.in
@@ -1,4 +1,4 @@
---- src/daemon/default.pa.in.orig 2015-02-12 14:10:35 UTC
+--- src/daemon/default.pa.in.orig 2016-01-18 10:14:20 UTC
+++ src/daemon/default.pa.in
@@ -26,10 +26,10 @@ ifelse(@OS_IS_WIN32@, 1, [dnl
load-sample x11-bell %WINDIR%\Media\ding.wav
diff --git a/audio/pulseaudio/files/patch-src_modules_module-detect.c b/audio/pulseaudio/files/patch-src_modules_module-detect.c
index e538ea0e80a3..e5360d7128b6 100644
--- a/audio/pulseaudio/files/patch-src_modules_module-detect.c
+++ b/audio/pulseaudio/files/patch-src_modules_module-detect.c
@@ -1,8 +1,8 @@
---- src/modules/module-detect.c.orig 2010-11-26 01:45:43.000000000 +0100
-+++ src/modules/module-detect.c 2011-03-03 00:35:10.000000000 +0100
-@@ -50,7 +50,9 @@ PA_MODULE_DESCRIPTION("Detect available
+--- src/modules/module-detect.c.orig 2015-09-10 04:51:41 UTC
++++ src/modules/module-detect.c
+@@ -46,7 +46,9 @@ PA_MODULE_DESCRIPTION("Detect available
PA_MODULE_VERSION(PACKAGE_VERSION);
- PA_MODULE_LOAD_ONCE(TRUE);
+ PA_MODULE_LOAD_ONCE(true);
PA_MODULE_USAGE("just-one=<boolean>");
+#ifdef __linux__
PA_MODULE_DEPRECATED("Please use module-udev-detect instead of module-detect!");
@@ -10,7 +10,7 @@
static const char* const valid_modargs[] = {
"just-one",
-@@ -161,8 +163,7 @@ static int detect_oss(pa_core *c, int ju
+@@ -157,8 +159,7 @@ static int detect_oss(pa_core *c, int ju
continue;
} else if (sscanf(line, "pcm%u: ", &device) == 1) {
diff --git a/audio/pulseaudio/files/patch-src_modules_oss_module-oss.c b/audio/pulseaudio/files/patch-src_modules_oss_module-oss.c
index e7b600cb3bf1..8e58b3b80ff6 100644
--- a/audio/pulseaudio/files/patch-src_modules_oss_module-oss.c
+++ b/audio/pulseaudio/files/patch-src_modules_oss_module-oss.c
@@ -1,6 +1,6 @@
---- src/modules/oss/module-oss.c.orig 2015-08-06 11:39:12.000000000 +0200
-+++ src/modules/oss/module-oss.c 2015-09-03 13:13:37.953255000 +0200
-@@ -1227,10 +1227,14 @@
+--- src/modules/oss/module-oss.c.orig 2015-09-10 04:51:41 UTC
++++ src/modules/oss/module-oss.c
+@@ -1227,10 +1227,14 @@ int pa__init(pa_module*m) {
use_mmap = false;
}
diff --git a/audio/pulseaudio/files/patch-src_modules_oss_oss-util.c b/audio/pulseaudio/files/patch-src_modules_oss_oss-util.c
index fb21bfe55d05..5641f9b82dbf 100644
--- a/audio/pulseaudio/files/patch-src_modules_oss_oss-util.c
+++ b/audio/pulseaudio/files/patch-src_modules_oss_oss-util.c
@@ -1,8 +1,8 @@
Support 24bit audio see Comment 6 of
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567
---- src/modules/oss/oss-util.c.orig 2015-02-12 15:10:35.000000000 +0100
-+++ src/modules/oss/oss-util.c 2015-04-15 14:41:41.512557000 +0200
+--- src/modules/oss/oss-util.c.orig 2015-09-10 04:51:41 UTC
++++ src/modules/oss/oss-util.c
@@ -39,6 +39,22 @@
#include "oss-util.h"
@@ -26,7 +26,7 @@ https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567
int pa_oss_open(const char *device, int *mode, int* pcaps) {
int fd = -1;
int caps;
-@@ -164,8 +180,8 @@
+@@ -164,8 +180,8 @@ int pa_oss_auto_format(int fd, pa_sample
[PA_SAMPLE_FLOAT32BE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S32LE] = AFMT_QUERY, /* not supported */
[PA_SAMPLE_S32BE] = AFMT_QUERY, /* not supported */
diff --git a/audio/pulseaudio/files/patch-src_pulse_introspect.c b/audio/pulseaudio/files/patch-src_pulse_introspect.c
index 6681f70caff3..26dae90a12b0 100644
--- a/audio/pulseaudio/files/patch-src_pulse_introspect.c
+++ b/audio/pulseaudio/files/patch-src_pulse_introspect.c
@@ -1,11 +1,11 @@
---- src/pulse/introspect.c.orig 2008-01-03 20:01:31.000000000 -0500
-+++ src/pulse/introspect.c 2008-01-03 20:01:39.000000000 -0500
-@@ -26,6 +26,8 @@
+--- src/pulse/introspect.c.orig 2015-09-10 04:51:41 UTC
++++ src/pulse/introspect.c
+@@ -22,6 +22,8 @@
#include <config.h>
#endif
+#include <string.h>
+
#include <pulse/context.h>
-
- #include <pulsecore/gccmacro.h>
+ #include <pulse/direction.h>
+ #include <pulse/xmalloc.h>
diff --git a/audio/pulseaudio/files/patch-src_pulse_util.c b/audio/pulseaudio/files/patch-src_pulse_util.c
index ebad76e19038..0fdf0f91c5ba 100644
--- a/audio/pulseaudio/files/patch-src_pulse_util.c
+++ b/audio/pulseaudio/files/patch-src_pulse_util.c
@@ -1,5 +1,5 @@
---- src/pulse/util.c.orig 2015-02-12 09:10:35.000000000 -0500
-+++ src/pulse/util.c 2015-06-13 17:15:14.603153000 -0400
+--- src/pulse/util.c.orig 2015-12-29 00:56:00 UTC
++++ src/pulse/util.c
@@ -30,6 +30,10 @@
#include <time.h>
#include <unistd.h>
@@ -25,15 +25,14 @@
#ifdef __FreeBSD__
{
- char *rp;
--
++ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()};
++ struct kinfo_proc kp;
++ size_t sz = sizeof(kp);
+
- if ((rp = pa_readlink("/proc/curproc/file"))) {
- pa_strlcpy(s, pa_path_get_filename(rp), l);
- pa_xfree(rp);
- return s;
-+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()};
-+ struct kinfo_proc kp;
-+ size_t sz = sizeof(kp);
-+
+ if (sysctl(mib, 4, &kp, &sz, NULL, 0) == 0)
+ {
+ pa_strlcpy(s, kp.ki_comm, l);
diff --git a/audio/pulseaudio/files/patch-src_pulsecore_atomic.h b/audio/pulseaudio/files/patch-src_pulsecore_atomic.h
index 55a415966f99..f8430307a636 100644
--- a/audio/pulseaudio/files/patch-src_pulsecore_atomic.h
+++ b/audio/pulseaudio/files/patch-src_pulsecore_atomic.h
@@ -1,6 +1,6 @@
---- src/pulsecore/atomic.h.orig 2015-02-12 15:10:35.000000000 +0100
-+++ src/pulsecore/atomic.h 2015-03-29 15:54:11.161110000 +0200
-@@ -185,39 +185,6 @@
+--- src/pulsecore/atomic.h.orig 2015-09-10 04:51:41 UTC
++++ src/pulsecore/atomic.h
+@@ -185,39 +185,6 @@ static inline bool pa_atomic_ptr_cmpxchg
#include <sys/param.h>
#include <machine/atomic.h>
diff --git a/audio/pulseaudio/files/patch-src_pulsecore_shm.c b/audio/pulseaudio/files/patch-src_pulsecore_shm.c
index 85030b5ea4f5..c1a7b33dc1cb 100644
--- a/audio/pulseaudio/files/patch-src_pulsecore_shm.c
+++ b/audio/pulseaudio/files/patch-src_pulsecore_shm.c
@@ -1,6 +1,6 @@
---- src/pulsecore/shm.c.orig 2013-04-14 06:42:35.000000000 +0200
-+++ src/pulsecore/shm.c 2013-06-24 17:25:58.000000000 +0200
-@@ -97,7 +97,7 @@ struct shm_marker {
+--- src/pulsecore/shm.c.orig 2015-12-31 06:28:35 UTC
++++ src/pulsecore/shm.c
+@@ -95,7 +95,7 @@ struct shm_marker {
#ifdef HAVE_SHM_OPEN
static char *segment_name(char *fn, size_t l, unsigned id) {
diff --git a/audio/py-ao/files/patch-src_aomodule.c b/audio/py-ao/files/patch-src_aomodule.c
index b4d686943e39..14f99d74e8a0 100644
--- a/audio/py-ao/files/patch-src_aomodule.c
+++ b/audio/py-ao/files/patch-src_aomodule.c
@@ -1,5 +1,5 @@
---- src/aomodule.c.orig 2010-06-06 18:41:04.000000000 +0200
-+++ src/aomodule.c 2010-06-06 18:45:01.000000000 +0200
+--- src/aomodule.c.orig 2003-07-24 06:52:59 UTC
++++ src/aomodule.c
@@ -4,7 +4,7 @@
static ao_option *
dict_to_options(PyObject *dict)
diff --git a/audio/py-ao/files/patch-src_aomodule.h b/audio/py-ao/files/patch-src_aomodule.h
index 1309f423d2e8..1c1fda4b7020 100644
--- a/audio/py-ao/files/patch-src_aomodule.h
+++ b/audio/py-ao/files/patch-src_aomodule.h
@@ -1,5 +1,5 @@
---- src/aomodule.h.orig 2010-06-06 18:45:10.000000000 +0200
-+++ src/aomodule.h 2010-06-06 18:45:25.000000000 +0200
+--- src/aomodule.h.orig 2003-07-24 06:58:07 UTC
++++ src/aomodule.h
@@ -9,6 +9,7 @@
typedef struct {
PyObject_HEAD
diff --git a/audio/py-karaoke/files/patch-setup.cfg b/audio/py-karaoke/files/patch-setup.cfg
index 1d2870b0d51e..f6ef565f7838 100644
--- a/audio/py-karaoke/files/patch-setup.cfg
+++ b/audio/py-karaoke/files/patch-setup.cfg
@@ -1,6 +1,6 @@
---- setup.cfg.orig 2011-06-15 03:59:31.000000000 +0900
-+++ setup.cfg 2012-09-28 07:07:06.000000000 +0900
-@@ -27,4 +27,5 @@
+--- setup.cfg.orig 2011-06-14 18:59:31 UTC
++++ setup.cfg
+@@ -27,4 +27,5 @@ group = Applications/Multimedia
requires=python,pygame,numeric,wxpython,timidity,freepats
[build_ext]
diff --git a/audio/py-karaoke/files/patch-setup.py b/audio/py-karaoke/files/patch-setup.py
index a1d701f51f8c..178992f28b08 100644
--- a/audio/py-karaoke/files/patch-setup.py
+++ b/audio/py-karaoke/files/patch-setup.py
@@ -1,6 +1,6 @@
---- setup.py.orig 2011-06-15 03:59:31.000000000 +0900
-+++ setup.py 2012-09-28 07:03:50.000000000 +0900
-@@ -61,17 +61,12 @@
+--- setup.py.orig 2011-06-14 18:59:31 UTC
++++ setup.py
+@@ -61,17 +61,12 @@ data_files = [
'icons/microphone.ico',
'icons/microphone.png',
'icons/pykaraoke.xpm',
diff --git a/audio/py-mutagen/files/patch-setup.py b/audio/py-mutagen/files/patch-setup.py
index 08972b421dbb..d625eca48c8c 100644
--- a/audio/py-mutagen/files/patch-setup.py
+++ b/audio/py-mutagen/files/patch-setup.py
@@ -1,7 +1,7 @@
---- setup.py.orig 2009-06-16 07:04:23.000000000 +0200
-+++ setup.py 2009-09-11 09:45:41.000000000 +0200
-@@ -185,7 +185,7 @@
- 100.0 * (total_lines - bad_lines) / float(total_lines))
+--- setup.py.orig 2016-06-07 11:07:56 UTC
++++ setup.py
+@@ -214,7 +214,7 @@ class coverage_cmd(Command):
+
if os.name == "posix":
- data_files = [('share/man/man1', glob.glob("man/*.1"))]
diff --git a/audio/py-openal/files/patch-py__openal.c b/audio/py-openal/files/patch-py__openal.c
new file mode 100644
index 000000000000..4c5c08e7d816
--- /dev/null
+++ b/audio/py-openal/files/patch-py__openal.c
@@ -0,0 +1,45 @@
+--- py_openal.c.orig 2005-07-16 14:19:11 UTC
++++ py_openal.c
+@@ -1041,28 +1041,26 @@ static PyObject *_wrap_alutExit(PyObject
+ }
+
+
+-static PyObject *_wrap_alutLoadWAVFile(PyObject *self, PyObject *arg) {
++static PyObject *_wrap_alutLoadMemoryFromFile(PyObject *self, PyObject *arg) {
+ ALvoid *wave = NULL;
+ ALsizei format;
+ ALsizei size;
+- ALsizei bits;
+- ALsizei freq;
++ ALfloat freq;
+ PyObject* resultobj;
+
+ if(!PyString_Check(arg)) return NULL;
+
+- alutLoadWAVFile((char* const) PyString_AS_STRING(arg), &wave, &format, &size, &bits, &freq);
++ wave = alutLoadMemoryFromFile ((char* const) PyString_AS_STRING(arg), &format, &size, &freq);
+
+ if(wave == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ } else {
+- resultobj = PyTuple_New(5);
++ resultobj = PyTuple_New(4);
+ PyTuple_SET_ITEM(resultobj, 0, PyString_FromStringAndSize(wave, size));
+ PyTuple_SET_ITEM(resultobj, 1, PyInt_FromLong((long) format));
+ PyTuple_SET_ITEM(resultobj, 2, PyInt_FromLong((long) size));
+- PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) bits));
+- PyTuple_SET_ITEM(resultobj, 4, PyInt_FromLong((long) freq));
++ PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) freq));
+ return resultobj;
+ }
+ }
+@@ -2274,7 +2272,7 @@ static PyMethodDef OpenALMethods[] = {
+ */
+ { (char *)"alutInit", (PyCFunction) _wrap_alutInit, METH_VARARGS },
+ { (char *)"alutExit", (PyCFunction) _wrap_alutExit, METH_NOARGS },
+- { (char *)"alutLoadWAVFile", (PyCFunction) _wrap_alutLoadWAVFile, METH_VARARGS },
++ { (char *)"alutLoadMemoryFromFile", (PyCFunction) _wrap_alutLoadMemoryFromFile, METH_VARARGS },
+ /*
+ { (char *)"alcGetAudioChannel_LOKI", (PyCFunction) _wrap_alcGetAudioChannel_LOKI, METH_VARARGS },
+ { (char *)"alcSetAudioChannel_LOKI", (PyCFunction) _wrap_alcSetAudioChannel_LOKI, METH_VARARGS },
diff --git a/audio/py-openal/files/patch-py_openal.c b/audio/py-openal/files/patch-py_openal.c
deleted file mode 100644
index e2e69852bbb4..000000000000
--- a/audio/py-openal/files/patch-py_openal.c
+++ /dev/null
@@ -1,45 +0,0 @@
---- py_openal.c Sat Jul 16 09:19:11 2005
-+++ py_openal.c Mon Aug 21 01:33:49 2006
-@@ -1041,28 +1041,26 @@
- }
-
-
--static PyObject *_wrap_alutLoadWAVFile(PyObject *self, PyObject *arg) {
-+static PyObject *_wrap_alutLoadMemoryFromFile(PyObject *self, PyObject *arg) {
- ALvoid *wave = NULL;
- ALsizei format;
- ALsizei size;
-- ALsizei bits;
-- ALsizei freq;
-+ ALfloat freq;
- PyObject* resultobj;
-
- if(!PyString_Check(arg)) return NULL;
-
-- alutLoadWAVFile((char* const) PyString_AS_STRING(arg), &wave, &format, &size, &bits, &freq);
-+ wave = alutLoadMemoryFromFile ((char* const) PyString_AS_STRING(arg), &format, &size, &freq);
-
- if(wave == NULL) {
- Py_INCREF(Py_None);
- return Py_None;
- } else {
-- resultobj = PyTuple_New(5);
-+ resultobj = PyTuple_New(4);
- PyTuple_SET_ITEM(resultobj, 0, PyString_FromStringAndSize(wave, size));
- PyTuple_SET_ITEM(resultobj, 1, PyInt_FromLong((long) format));
- PyTuple_SET_ITEM(resultobj, 2, PyInt_FromLong((long) size));
-- PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) bits));
-- PyTuple_SET_ITEM(resultobj, 4, PyInt_FromLong((long) freq));
-+ PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) freq));
- return resultobj;
- }
- }
-@@ -2274,7 +2272,7 @@
- */
- { (char *)"alutInit", (PyCFunction) _wrap_alutInit, METH_VARARGS },
- { (char *)"alutExit", (PyCFunction) _wrap_alutExit, METH_NOARGS },
-- { (char *)"alutLoadWAVFile", (PyCFunction) _wrap_alutLoadWAVFile, METH_VARARGS },
-+ { (char *)"alutLoadMemoryFromFile", (PyCFunction) _wrap_alutLoadMemoryFromFile, METH_VARARGS },
- /*
- { (char *)"alcGetAudioChannel_LOKI", (PyCFunction) _wrap_alcGetAudioChannel_LOKI, METH_VARARGS },
- { (char *)"alcSetAudioChannel_LOKI", (PyCFunction) _wrap_alcSetAudioChannel_LOKI, METH_VARARGS },
diff --git a/audio/py-openal/files/patch-setup.py b/audio/py-openal/files/patch-setup.py
index 676207cddf3c..f8ad931eda43 100644
--- a/audio/py-openal/files/patch-setup.py
+++ b/audio/py-openal/files/patch-setup.py
@@ -1,5 +1,5 @@
---- setup.py.orig 2006-04-30 17:23:44.000000000 +0200
-+++ setup.py 2009-12-26 17:50:57.000000000 +0100
+--- setup.py.orig 2006-04-30 15:23:44 UTC
++++ setup.py
@@ -1,17 +1,17 @@
import os
from distutils.core import setup, Extension
@@ -23,7 +23,7 @@
setup(
-@@ -38,7 +38,7 @@
+@@ -38,7 +38,7 @@ Does not include OpenAL extension.""",
ext_modules = [Extension("_openal",
["py_openal.c"],
diff --git a/audio/py-pyaudio/files/patch-setup.py b/audio/py-pyaudio/files/patch-setup.py
index 4feed50c13bd..37be2151de14 100644
--- a/audio/py-pyaudio/files/patch-setup.py
+++ b/audio/py-pyaudio/files/patch-setup.py
@@ -1,4 +1,4 @@
---- setup.py.orig 2016-04-04 21:15:34 UTC
+--- setup.py.orig 2015-10-19 05:48:12 UTC
+++ setup.py
@@ -63,6 +63,12 @@ extra_link_args = []
scripts = []
diff --git a/audio/py-pyliblo/files/patch-setup.py b/audio/py-pyliblo/files/patch-setup.py
index 6b88847adb3c..693cd0ee4531 100644
--- a/audio/py-pyliblo/files/patch-setup.py
+++ b/audio/py-pyliblo/files/patch-setup.py
@@ -1,14 +1,14 @@
---- setup.py.orig 2014-09-17 12:36:01.069734246 +0200
-+++ setup.py 2014-09-17 12:36:49.484953374 +0200
-@@ -45,6 +45,7 @@
+--- setup.py.orig 2015-04-14 07:23:17 UTC
++++ setup.py
+@@ -45,6 +45,7 @@ ext_modules = [
'-fno-strict-aliasing',
'-Werror-implicit-function-declaration',
'-Wfatal-errors',
+ '-I%%LOCALBASE%%/include/',
],
- libraries = ['lo']
+ libraries = ['lo'],
)
-@@ -66,12 +67,7 @@
+@@ -63,12 +64,7 @@ setup(
'scripts/send_osc.py',
'scripts/dump_osc.py',
],
@@ -20,5 +20,5 @@
- ],
+ data_files = [],
cmdclass = cmdclass,
- ext_modules = ext_modules
- )
+ ext_modules = ext_modules,
+ **args
diff --git a/audio/py-tagpy/files/patch-aksetup__helper.py b/audio/py-tagpy/files/patch-aksetup__helper.py
new file mode 100644
index 000000000000..9dfc31b75e5e
--- /dev/null
+++ b/audio/py-tagpy/files/patch-aksetup__helper.py
@@ -0,0 +1,11 @@
+--- aksetup_helper.py.orig 2012-12-16 01:56:27 UTC
++++ aksetup_helper.py
+@@ -1,6 +1,6 @@
+ # dealings with ez_setup ------------------------------------------------------
+-import distribute_setup
+-distribute_setup.use_setuptools()
++#import distribute_setup
++#distribute_setup.use_setuptools()
+
+ import setuptools
+ from setuptools import Extension
diff --git a/audio/py-tagpy/files/patch-aksetup_helper.py b/audio/py-tagpy/files/patch-aksetup_helper.py
deleted file mode 100644
index da3dd1b0b891..000000000000
--- a/audio/py-tagpy/files/patch-aksetup_helper.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./aksetup_helper.py.orig 2013-03-21 22:56:24.000000000 +0100
-+++ ./aksetup_helper.py 2013-03-21 22:56:29.000000000 +0100
-@@ -1,6 +1,6 @@
- # dealings with ez_setup ------------------------------------------------------
--import distribute_setup
--distribute_setup.use_setuptools()
-+#import distribute_setup
-+#distribute_setup.use_setuptools()
-
- import setuptools
- from setuptools import Extension
diff --git a/audio/py-tagpy/files/patch-src__wrapper__common.hpp b/audio/py-tagpy/files/patch-src__wrapper__common.hpp
deleted file mode 100644
index db74cc72aac1..000000000000
--- a/audio/py-tagpy/files/patch-src__wrapper__common.hpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- ./src/wrapper/common.hpp.orig 2013-03-22 10:46:55.000000000 +0100
-+++ ./src/wrapper/common.hpp 2013-03-22 10:47:04.000000000 +0100
-@@ -50,10 +50,7 @@
-
-
-
--#define TAGPY_TAGLIB_HEX_VERSION \
-- (TAGLIB_MAJOR_VERSION << 16) + \
-- (TAGLIB_MINOR_VERSION << 8) + \
-- (TAGLIB_PATCH_VERSION << 0)
-+#define TAGPY_TAGLIB_HEX_VERSION 0x10800
-
- #if (TAGPY_TAGLIB_HEX_VERSION < 0x10400)
- #warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/audio/py-tagpy/files/patch-src_wrapper_common.hpp b/audio/py-tagpy/files/patch-src_wrapper_common.hpp
new file mode 100644
index 000000000000..b2b5789738db
--- /dev/null
+++ b/audio/py-tagpy/files/patch-src_wrapper_common.hpp
@@ -0,0 +1,14 @@
+--- src/wrapper/common.hpp.orig 2008-04-24 19:44:50 UTC
++++ src/wrapper/common.hpp
+@@ -50,10 +50,7 @@ using namespace std;
+
+
+
+-#define TAGPY_TAGLIB_HEX_VERSION \
+- (TAGLIB_MAJOR_VERSION << 16) + \
+- (TAGLIB_MINOR_VERSION << 8) + \
+- (TAGLIB_PATCH_VERSION << 0)
++#define TAGPY_TAGLIB_HEX_VERSION 0x10800
+
+ #if (TAGPY_TAGLIB_HEX_VERSION < 0x10400)
+ #warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/audio/qjackctl/files/patch-src-qjackctlSetup.cpp b/audio/qjackctl/files/patch-src-qjackctlSetup.cpp
deleted file mode 100644
index 879c9123b8ba..000000000000
--- a/audio/qjackctl/files/patch-src-qjackctlSetup.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/qjackctlSetup.cpp.orig 2015-07-15 13:30:36 UTC
-+++ src/qjackctlSetup.cpp
-@@ -34,7 +34,7 @@
- #if defined(WIN32)
- #define DEFAULT_DRIVER "portaudio"
- #else
--#define DEFAULT_DRIVER "alsa"
-+#define DEFAULT_DRIVER "oss"
- #endif
-
-
diff --git a/audio/qjackctl/files/patch-src_qjackctl.cpp b/audio/qjackctl/files/patch-src_qjackctl.cpp
index b8fb4df00bbd..d17852904d80 100644
--- a/audio/qjackctl/files/patch-src_qjackctl.cpp
+++ b/audio/qjackctl/files/patch-src_qjackctl.cpp
@@ -1,4 +1,4 @@
---- src/qjackctl.cpp.orig 2015-10-28 15:24:52 UTC
+--- src/qjackctl.cpp.orig 2016-04-05 15:57:30 UTC
+++ src/qjackctl.cpp
@@ -30,6 +30,10 @@
@@ -11,7 +11,7 @@
#if QT_VERSION < 0x040500
namespace Qt {
const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000);
-@@ -216,7 +220,7 @@ public:
+@@ -218,7 +222,7 @@ public:
sUnique += sServerName;
}
char szHostName[255];
diff --git a/audio/qjackctl/files/patch-src_qjackctlInterfaceComboBox.cpp b/audio/qjackctl/files/patch-src_qjackctlInterfaceComboBox.cpp
index 9488afdca8e3..deb60846ae36 100644
--- a/audio/qjackctl/files/patch-src_qjackctlInterfaceComboBox.cpp
+++ b/audio/qjackctl/files/patch-src_qjackctlInterfaceComboBox.cpp
@@ -1,6 +1,6 @@
---- src/qjackctlInterfaceComboBox.cpp.orig 2015-10-28 15:24:52 UTC
+--- src/qjackctlInterfaceComboBox.cpp.orig 2016-04-05 15:57:30 UTC
+++ src/qjackctlInterfaceComboBox.cpp
-@@ -191,9 +191,16 @@ private:
+@@ -210,9 +210,16 @@ private:
// Fill HostApi info...
const PaHostApiIndex iNumHostApi = Pa_GetHostApiCount();
diff --git a/audio/qjackctl/files/patch-src_qjackctlSetup.cpp b/audio/qjackctl/files/patch-src_qjackctlSetup.cpp
new file mode 100644
index 000000000000..e4d37c91e75a
--- /dev/null
+++ b/audio/qjackctl/files/patch-src_qjackctlSetup.cpp
@@ -0,0 +1,11 @@
+--- src/qjackctlSetup.cpp.orig 2016-04-05 15:57:30 UTC
++++ src/qjackctlSetup.cpp
+@@ -34,7 +34,7 @@
+ #if defined(WIN32)
+ #define DEFAULT_DRIVER "portaudio"
+ #else
+-#define DEFAULT_DRIVER "alsa"
++#define DEFAULT_DRIVER "oss"
+ #endif
+
+
diff --git a/audio/qsynth/files/patch-Makefile.in b/audio/qsynth/files/patch-Makefile.in
index a90d428f3c6c..09b17397414b 100644
--- a/audio/qsynth/files/patch-Makefile.in
+++ b/audio/qsynth/files/patch-Makefile.in
@@ -1,4 +1,4 @@
---- Makefile.in.orig 2015-09-07 14:59:23 UTC
+--- Makefile.in.orig 2016-04-05 15:57:45 UTC
+++ Makefile.in
@@ -57,6 +57,7 @@ forms = \
src/qsynthSetupForm.ui
diff --git a/audio/qsynth/files/patch-src-qsynthOptions.cpp b/audio/qsynth/files/patch-src-qsynthOptions.cpp
deleted file mode 100644
index 542de6de424b..000000000000
--- a/audio/qsynth/files/patch-src-qsynthOptions.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
---- src/qsynthOptions.cpp.orig 2015-09-07 14:59:23 UTC
-+++ src/qsynthOptions.cpp
-@@ -174,11 +174,11 @@ void qsynthOptions::print_usage ( const
- out << " -n, --no-midi-in" + sEot +
- QObject::tr("Don't create a midi driver to read MIDI input events [default = yes]") + sEol;
- out << " -m, --midi-driver=[label]" + sEot +
-- QObject::tr("The name of the midi driver to use [oss,alsa,alsa_seq,...]") + sEol;
-+ QObject::tr("The name of the midi driver to use [jack,oss,...]") + sEol;
- out << " -K, --midi-channels=[num]" + sEot +
- QObject::tr("The number of midi channels [default = 16]") + sEol;
- out << " -a, --audio-driver=[label]" + sEot +
-- QObject::tr("The audio driver [alsa,jack,oss,dsound,...]") + sEol;
-+ QObject::tr("The audio driver [jack,oss,dsound,...]") + sEol;
- out << " -j, --connect-jack-outputs" + sEot +
- QObject::tr("Attempt to connect the jack outputs to the physical ports") + sEol;
- out << " -L, --audio-channels=[num]" + sEot +
-@@ -481,7 +481,7 @@ void qsynthOptions::loadSetup ( qsynthSe
- pSetup->iAudioBufSize = m_settings.value("/AudioBufSize", 512).toInt();
- pSetup->iAudioBufCount = m_settings.value("/AudioBufCount", 8).toInt();
- #else
-- pSetup->sMidiDriver = m_settings.value("/MidiDriver", "alsa_seq").toString();
-+ pSetup->sMidiDriver = m_settings.value("/MidiDriver", "jack").toString();
- pSetup->sAudioDriver = m_settings.value("/AudioDriver", "jack").toString();
- pSetup->iAudioBufSize = m_settings.value("/AudioBufSize", 64).toInt();
- pSetup->iAudioBufCount = m_settings.value("/AudioBufCount", 2).toInt();
diff --git a/audio/qsynth/files/patch-src_qsynthOptions.cpp b/audio/qsynth/files/patch-src_qsynthOptions.cpp
new file mode 100644
index 000000000000..ec3d4e63af43
--- /dev/null
+++ b/audio/qsynth/files/patch-src_qsynthOptions.cpp
@@ -0,0 +1,25 @@
+--- src/qsynthOptions.cpp.orig 2016-04-05 15:57:45 UTC
++++ src/qsynthOptions.cpp
+@@ -172,11 +172,11 @@ void qsynthOptions::print_usage ( const
+ out << " -n, --no-midi-in" + sEot +
+ QObject::tr("Don't create a midi driver to read MIDI input events [default = yes]") + sEol;
+ out << " -m, --midi-driver=[label]" + sEot +
+- QObject::tr("The name of the midi driver to use [oss,alsa,alsa_seq,...]") + sEol;
++ QObject::tr("The name of the midi driver to use [jack,oss,...]") + sEol;
+ out << " -K, --midi-channels=[num]" + sEot +
+ QObject::tr("The number of midi channels [default = 16]") + sEol;
+ out << " -a, --audio-driver=[label]" + sEot +
+- QObject::tr("The audio driver [alsa,jack,oss,dsound,...]") + sEol;
++ QObject::tr("The audio driver [jack,oss,dsound,...]") + sEol;
+ out << " -j, --connect-jack-outputs" + sEot +
+ QObject::tr("Attempt to connect the jack outputs to the physical ports") + sEol;
+ out << " -L, --audio-channels=[num]" + sEot +
+@@ -479,7 +479,7 @@ void qsynthOptions::loadSetup ( qsynthSe
+ pSetup->iAudioBufSize = m_settings.value("/AudioBufSize", 512).toInt();
+ pSetup->iAudioBufCount = m_settings.value("/AudioBufCount", 8).toInt();
+ #else
+- pSetup->sMidiDriver = m_settings.value("/MidiDriver", "alsa_seq").toString();
++ pSetup->sMidiDriver = m_settings.value("/MidiDriver", "jack").toString();
+ pSetup->sAudioDriver = m_settings.value("/AudioDriver", "jack").toString();
+ pSetup->iAudioBufSize = m_settings.value("/AudioBufSize", 64).toInt();
+ pSetup->iAudioBufCount = m_settings.value("/AudioBufCount", 2).toInt();
diff --git a/audio/quimup/files/patch-src__qm-config.cpp b/audio/quimup/files/patch-src__qm-config.cpp
deleted file mode 100644
index 50f931ce50d3..000000000000
--- a/audio/quimup/files/patch-src__qm-config.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/qm_config.cpp.orig 2016-02-28 04:52:29.000000000 -0500
-+++ src/qm_config.cpp 2016-06-02 13:28:13.722103000 -0400
-@@ -168,9 +168,9 @@
- version = sts.value("version", "0.0" ).toString();
- // server related values
- quitMPD_onquit = sts.value("quitMPD_onquit", false ).toBool();
-- onquit_mpd_command = sts.value("onquit_mpd_command", "mpd --kill").toString();
-+ onquit_mpd_command = sts.value("onquit_mpd_command", "musicpd --kill").toString();
- startMPD_onstart = sts.value("startMPD_onstart", false ).toBool();
-- onstart_mpd_command = sts.value("onstart_mpd_command", "mpd" ).toString();
-+ onstart_mpd_command = sts.value("onstart_mpd_command", "musicpd" ).toString();
- auto_connect = sts.value("auto_connect", true ).toBool();
-
- profile = sts.value("profile", 0 ).toInt();
diff --git a/audio/quimup/files/patch-src__qm-mpdcom.cpp b/audio/quimup/files/patch-src__qm-mpdcom.cpp
deleted file mode 100644
index 0e1f4945d99e..000000000000
--- a/audio/quimup/files/patch-src__qm-mpdcom.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/qm_mpdcom.cpp.orig 2016-02-28 04:52:46.000000000 -0500
-+++ src/qm_mpdcom.cpp 2016-06-02 13:24:56.493027000 -0400
-@@ -2500,17 +2500,10 @@
- struct stat sts;
- bool b_isrunning = false;
-
-- // try pidof
-- if (stat("/bin/pidof", &sts) == 0)
-- {
-- if( system("pidof mpd > /dev/null") == 0)
-- b_isrunning = true;
-- }
-- else
- // try pgrep
-- if (stat("/usr/bin/pgrep", &sts) == 0)
-+ if (stat("/bin/pgrep", &sts) == 0)
- {
-- if( system("pgrep mpd > /dev/null") == 0)
-+ if( system("pgrep musicpd > /dev/null") == 0)
- b_isrunning = true;
- }
-
diff --git a/audio/quimup/files/patch-src__qm_itemlist.h b/audio/quimup/files/patch-src__qm_itemlist.h
deleted file mode 100644
index 529edb7c2e54..000000000000
--- a/audio/quimup/files/patch-src__qm_itemlist.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/qm_itemlist.h.orig
-+++ src/qm_itemlist.h
-@@ -63,7 +63,7 @@
- QString sorter;
-
- // Override the < operator for alist.sort();
-- bool operator < (const qm_listitemInfo& litem)
-+ bool operator < (const qm_listitemInfo& litem) const
- {
- return sorter < litem.sorter;
- }
diff --git a/audio/quimup/files/patch-src_qm__config.cpp b/audio/quimup/files/patch-src_qm__config.cpp
new file mode 100644
index 000000000000..e862e10a3a7d
--- /dev/null
+++ b/audio/quimup/files/patch-src_qm__config.cpp
@@ -0,0 +1,14 @@
+--- src/qm_config.cpp.orig 2016-02-28 09:52:29 UTC
++++ src/qm_config.cpp
+@@ -168,9 +168,9 @@ void qm_config::load_config()
+ version = sts.value("version", "0.0" ).toString();
+ // server related values
+ quitMPD_onquit = sts.value("quitMPD_onquit", false ).toBool();
+- onquit_mpd_command = sts.value("onquit_mpd_command", "mpd --kill").toString();
++ onquit_mpd_command = sts.value("onquit_mpd_command", "musicpd --kill").toString();
+ startMPD_onstart = sts.value("startMPD_onstart", false ).toBool();
+- onstart_mpd_command = sts.value("onstart_mpd_command", "mpd" ).toString();
++ onstart_mpd_command = sts.value("onstart_mpd_command", "musicpd" ).toString();
+ auto_connect = sts.value("auto_connect", true ).toBool();
+
+ profile = sts.value("profile", 0 ).toInt();
diff --git a/audio/quimup/files/patch-src_qm__itemlist.h b/audio/quimup/files/patch-src_qm__itemlist.h
new file mode 100644
index 000000000000..2121f33f37f3
--- /dev/null
+++ b/audio/quimup/files/patch-src_qm__itemlist.h
@@ -0,0 +1,11 @@
+--- src/qm_itemlist.h.orig 2016-02-28 09:52:29 UTC
++++ src/qm_itemlist.h
+@@ -63,7 +63,7 @@ public:
+ QString sorter;
+
+ // Override the < operator for alist.sort();
+- bool operator < (const qm_listitemInfo& litem)
++ bool operator < (const qm_listitemInfo& litem) const
+ {
+ return sorter < litem.sorter;
+ }
diff --git a/audio/quimup/files/patch-src_qm__mpdcom.cpp b/audio/quimup/files/patch-src_qm__mpdcom.cpp
new file mode 100644
index 000000000000..d2630be2ebd3
--- /dev/null
+++ b/audio/quimup/files/patch-src_qm__mpdcom.cpp
@@ -0,0 +1,22 @@
+--- src/qm_mpdcom.cpp.orig 2016-02-28 09:52:46 UTC
++++ src/qm_mpdcom.cpp
+@@ -2500,17 +2500,10 @@ bool qm_mpdCom::is_mpd_running()
+ struct stat sts;
+ bool b_isrunning = false;
+
+- // try pidof
+- if (stat("/bin/pidof", &sts) == 0)
+- {
+- if( system("pidof mpd > /dev/null") == 0)
+- b_isrunning = true;
+- }
+- else
+ // try pgrep
+- if (stat("/usr/bin/pgrep", &sts) == 0)
++ if (stat("/bin/pgrep", &sts) == 0)
+ {
+- if( system("pgrep mpd > /dev/null") == 0)
++ if( system("pgrep musicpd > /dev/null") == 0)
+ b_isrunning = true;
+ }
+
diff --git a/audio/raop_play/files/patch-Makefile b/audio/raop_play/files/patch-Makefile
deleted file mode 100644
index 9a9870fa4c45..000000000000
--- a/audio/raop_play/files/patch-Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
---- Makefile.in- Fri Aug 12 09:57:20 2005
-+++ Makefile.in Fri Aug 12 09:57:58 2005
-@@ -1,9 +1,9 @@
- SUBDIRS = rendezvous raop_play aexcl
-
- all:
-- for i in $(SUBDIRS); do make -C $$i; done
-+ for i in $(SUBDIRS); do gmake -C $$i; done
-
- install uninstall clean:
-- for i in $(SUBDIRS); do make -C $$i $@; done
-+ for i in $(SUBDIRS); do gmake -C $$i $@; done
-
- distclean:
diff --git a/audio/raop_play/files/patch-Makefile.in b/audio/raop_play/files/patch-Makefile.in
new file mode 100644
index 000000000000..a4ffabddfa9f
--- /dev/null
+++ b/audio/raop_play/files/patch-Makefile.in
@@ -0,0 +1,14 @@
+--- Makefile.in.orig 2005-12-16 14:16:59 UTC
++++ Makefile.in
+@@ -1,9 +1,9 @@
+ SUBDIRS = rendezvous raop_play aexcl
+
+ all:
+- for i in $(SUBDIRS); do make -C $$i; done
++ for i in $(SUBDIRS); do gmake -C $$i; done
+
+ install uninstall clean:
+- for i in $(SUBDIRS); do make -C $$i $@; done
++ for i in $(SUBDIRS); do gmake -C $$i $@; done
+
+ distclean:
diff --git a/audio/raop_play/files/patch-aexcl-Makefile.in b/audio/raop_play/files/patch-aexcl-Makefile.in
deleted file mode 100644
index 5b5356db3086..000000000000
--- a/audio/raop_play/files/patch-aexcl-Makefile.in
+++ /dev/null
@@ -1,38 +0,0 @@
---- aexcl/Makefile.in.orig 2005-12-16 15:17:00.000000000 +0100
-+++ aexcl/Makefile.in 2014-10-01 17:14:38.124305107 +0200
-@@ -2,6 +2,7 @@
- CC = @CC@
- CXX = @CXX@
- DEFS = @DEFS@
-+LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
-@@ -12,13 +13,12 @@
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-
- TARGET=aexcl_play
--GLIB_SUBST=1 # remove this line, if you want to use libglib-2.0
- DESTDIR =
-
--CXXFLAGS += -Wall -D_GNU_SOURCE -I../raop_play -I../rendezvous
-+CXXFLAGS += -Wall -I../raop_play -I../rendezvous
- GLIB = glib-2.0
--CXXFLAGS += -I/usr/include/$(GLIB) -I/usr/lib/$(GLIB)/include
--CFLAGS += -Wall -I/usr/include/$(GLIB) -I/usr/lib/$(GLIB)/include -I../raop_play
-+CXXFLAGS += -I$(prefix)/include -I$(prefix)/include/$(GLIB) -I$(prefix)/lib/$(GLIB)/include -I/usr/X11R6/include/
-+CFLAGS += -Wall -I$(prefix)/include -I$(prefix)/include/$(GLIB) -I$(prefix)/lib/$(GLIB)/include -I/usr/X11R6/include/ -I../raop_play
-
- ifdef GLIB_SUBST
- GLIB_SUBST_OBJ = ipod/glibsubst.o
-@@ -29,8 +29,8 @@
-
- all: $(TARGET)
-
--$(TARGET): aexcl_gui.o aexcl_play.o ipod_browser.o ../raop_play/aexcl_lib.o ipod/itunesdb.o $(GLIB_SUBST_OBJ)
-- $(CXX) -o $@ $^ -lfltk $(GLIB_LINK)
-+$(TARGET): aexcl_gui.o aexcl_play.o ipod_browser.o ../raop_play/aexcl_lib.o ipod/itunesdb.o ../rendezvous/getline.o $(GLIB_SUBST_OBJ)
-+ $(CXX) $(LDFLAGS) -o $@ $^ -lfltk $(GLIB_LINK)
-
- install:
- $(mkinstalldirs) $(DESTDIR)$(bindir)/
diff --git a/audio/raop_play/files/patch-aexcl-aexcl_play.c b/audio/raop_play/files/patch-aexcl-aexcl_play.c
deleted file mode 100644
index 177a78ef6987..000000000000
--- a/audio/raop_play/files/patch-aexcl-aexcl_play.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- aexcl/aexcl_play.cxx.orig Fri Dec 16 23:17:00 2005
-+++ aexcl/aexcl_play.cxx Wed Jul 5 16:28:14 2006
-@@ -23,6 +23,9 @@
- #include <signal.h>
- #include <sys/wait.h>
- #include <getopt.h>
-+extern "C" {
-+#include "getline.h"
-+};
- #include "aexcl_gui.h"
- #include "aexcl_lib.h"
- #include "mDNS.h"
diff --git a/audio/raop_play/files/patch-aexcl_Makefile.in b/audio/raop_play/files/patch-aexcl_Makefile.in
new file mode 100644
index 000000000000..18926dc10ec0
--- /dev/null
+++ b/audio/raop_play/files/patch-aexcl_Makefile.in
@@ -0,0 +1,38 @@
+--- aexcl/Makefile.in.orig 2005-12-16 14:17:00 UTC
++++ aexcl/Makefile.in
+@@ -2,6 +2,7 @@ SHELL = @SHELL@
+ CC = @CC@
+ CXX = @CXX@
+ DEFS = @DEFS@
++LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -12,13 +13,12 @@ top_srcdir = @top_srcdir@
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+
+ TARGET=aexcl_play
+-GLIB_SUBST=1 # remove this line, if you want to use libglib-2.0
+ DESTDIR =
+
+-CXXFLAGS += -Wall -D_GNU_SOURCE -I../raop_play -I../rendezvous
++CXXFLAGS += -Wall -I../raop_play -I../rendezvous
+ GLIB = glib-2.0
+-CXXFLAGS += -I/usr/include/$(GLIB) -I/usr/lib/$(GLIB)/include
+-CFLAGS += -Wall -I/usr/include/$(GLIB) -I/usr/lib/$(GLIB)/include -I../raop_play
++CXXFLAGS += -I$(prefix)/include -I$(prefix)/include/$(GLIB) -I$(prefix)/lib/$(GLIB)/include -I/usr/X11R6/include/
++CFLAGS += -Wall -I$(prefix)/include -I$(prefix)/include/$(GLIB) -I$(prefix)/lib/$(GLIB)/include -I/usr/X11R6/include/ -I../raop_play
+
+ ifdef GLIB_SUBST
+ GLIB_SUBST_OBJ = ipod/glibsubst.o
+@@ -29,8 +29,8 @@ endif
+
+ all: $(TARGET)
+
+-$(TARGET): aexcl_gui.o aexcl_play.o ipod_browser.o ../raop_play/aexcl_lib.o ipod/itunesdb.o $(GLIB_SUBST_OBJ)
+- $(CXX) -o $@ $^ -lfltk $(GLIB_LINK)
++$(TARGET): aexcl_gui.o aexcl_play.o ipod_browser.o ../raop_play/aexcl_lib.o ipod/itunesdb.o ../rendezvous/getline.o $(GLIB_SUBST_OBJ)
++ $(CXX) $(LDFLAGS) -o $@ $^ -lfltk $(GLIB_LINK)
+
+ install:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)/
diff --git a/audio/raop_play/files/patch-aexcl_aexcl__play.cxx b/audio/raop_play/files/patch-aexcl_aexcl__play.cxx
new file mode 100644
index 000000000000..5c363dd0e4b5
--- /dev/null
+++ b/audio/raop_play/files/patch-aexcl_aexcl__play.cxx
@@ -0,0 +1,12 @@
+--- aexcl/aexcl_play.cxx.orig 2005-12-16 14:17:00 UTC
++++ aexcl/aexcl_play.cxx
+@@ -23,6 +23,9 @@
+ #include <signal.h>
+ #include <sys/wait.h>
+ #include <getopt.h>
++extern "C" {
++#include "getline.h"
++};
+ #include "aexcl_gui.h"
+ #include "aexcl_lib.h"
+ #include "mDNS.h"
diff --git a/audio/raop_play/files/patch-raop__play_Makefile.in b/audio/raop_play/files/patch-raop__play_Makefile.in
new file mode 100644
index 000000000000..088f2d93a8ca
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_Makefile.in
@@ -0,0 +1,29 @@
+--- raop_play/Makefile.in.orig 2005-12-16 14:17:00 UTC
++++ raop_play/Makefile.in
+@@ -1,6 +1,7 @@
+ SHELL = @SHELL@
+ CC = @CC@
+ DEFS = @DEFS@
++LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -12,15 +13,15 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/m
+ TARGET=raop_play
+ DESTDIR =
+
+-CFLAGS=-Wall
++CFLAGS=-Wall -I$(prefix)/include/
+ OBJS := raop_play.o raop_client.o rtsp_client.o aexcl_lib.o base64.o aes.o m4a_stream.o \
+ audio_stream.o wav_stream.o mp3_stream.o flac_stream.o ogg_stream.o aac_stream.o pls_stream.o \
+-pcm_stream.o flac_stream.o
++pcm_stream.o flac_stream.o ../rendezvous/getline.o
+
+ all: $(TARGET)
+
+ raop_play: $(OBJS)
+- $(CC) -o $@ -lssl -lsamplerate -lid3tag $^
++ $(CC) -o $@ $(LDFLAGS) -lssl -lsamplerate -lid3tag $^
+
+ install:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)/
diff --git a/audio/raop_play/files/patch-raop__play_aac__stream.c b/audio/raop_play/files/patch-raop__play_aac__stream.c
new file mode 100644
index 000000000000..036cc4a9c2c0
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_aac__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/aac_stream.c.orig 2005-12-16 14:17:00 UTC
++++ raop_play/aac_stream.c
+@@ -17,7 +17,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
diff --git a/audio/raop_play/files/patch-raop__play_aexcl__lib.h b/audio/raop_play/files/patch-raop__play_aexcl__lib.h
new file mode 100644
index 000000000000..f6c8c898b722
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_aexcl__lib.h
@@ -0,0 +1,27 @@
+--- raop_play/aexcl_lib.h.orig 2005-12-16 14:17:01 UTC
++++ raop_play/aexcl_lib.h
+@@ -1,5 +1,5 @@
+ #include <stdio.h>
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+@@ -35,6 +35,9 @@
+ #define END_C_DECLS
+ #endif
+
++#define __u8 u_int8_t
++#define __u16 u_int16_t
++#define __u32 u_int32_t
+
+ BEGIN_C_DECLS
+
+@@ -75,7 +78,6 @@ static inline int realloc_memory(void **
+ }
+ n=n<<1;
+ }
+- newsize=newsize;
+ np=realloc(*p,newsize);
+ if(!np){
+ ERRMSG("%s: realloc failed: %s\n",func,strerror(errno));
diff --git a/audio/raop_play/files/patch-raop__play_audio__stream.c b/audio/raop_play/files/patch-raop__play_audio__stream.c
new file mode 100644
index 000000000000..2888200bad30
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_audio__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/audio_stream.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/audio_stream.c
+@@ -17,7 +17,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
diff --git a/audio/raop_play/files/patch-raop__play_audio__stream.h b/audio/raop_play/files/patch-raop__play_audio__stream.h
new file mode 100644
index 000000000000..19908e6a1aa4
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_audio__stream.h
@@ -0,0 +1,16 @@
+--- raop_play/audio_stream.h.orig 2005-12-16 14:17:01 UTC
++++ raop_play/audio_stream.h
+@@ -20,6 +20,13 @@
+ #ifndef __AUDIO_STREAM_H_
+ #define __AUDIO_STREAM_H_
+
++#define __u8 u_int8_t
++#define __u16 u_int16_t
++#define __u32 u_int32_t
++#define __s8 int8_t
++#define __s16 int16_t
++#define __s32 int32_t
++
+ #include <signal.h>
+
+ typedef enum data_type_t {
diff --git a/audio/raop_play/files/patch-raop__play_flac__stream.c b/audio/raop_play/files/patch-raop__play_flac__stream.c
new file mode 100644
index 000000000000..eb8b7d395b2e
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_flac__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/flac_stream.c.orig 2005-12-16 14:17:02 UTC
++++ raop_play/flac_stream.c
+@@ -18,7 +18,7 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+ #include <netinet/in.h>
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
diff --git a/audio/raop_play/files/patch-raop__play_m4a__stream.c b/audio/raop_play/files/patch-raop__play_m4a__stream.c
new file mode 100644
index 000000000000..f1345673d2ed
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_m4a__stream.c
@@ -0,0 +1,10 @@
+--- raop_play/m4a_stream.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/m4a_stream.c
+@@ -20,7 +20,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <asm/types.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
diff --git a/audio/raop_play/files/patch-raop__play_mp3__stream.c b/audio/raop_play/files/patch-raop__play_mp3__stream.c
new file mode 100644
index 000000000000..9ee5a35acdd4
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_mp3__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/mp3_stream.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/mp3_stream.c
+@@ -17,7 +17,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/wait.h>
diff --git a/audio/raop_play/files/patch-raop__play_ogg__stream.c b/audio/raop_play/files/patch-raop__play_ogg__stream.c
new file mode 100644
index 000000000000..024b54f736bc
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_ogg__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/ogg_stream.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/ogg_stream.c
+@@ -17,7 +17,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
diff --git a/audio/raop_play/files/patch-raop__play_pcm__stream.c b/audio/raop_play/files/patch-raop__play_pcm__stream.c
new file mode 100644
index 000000000000..e23ea7816b80
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_pcm__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/pcm_stream.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/pcm_stream.c
+@@ -19,7 +19,7 @@
+ *****************************************************************************/
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <sys/poll.h>
+ #define PCM_STREAM_C_
diff --git a/audio/raop_play/files/patch-raop__play_pls__stream.c b/audio/raop_play/files/patch-raop__play_pls__stream.c
new file mode 100644
index 000000000000..c9635dfd8fb2
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_pls__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/pls_stream.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/pls_stream.c
+@@ -17,7 +17,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+-#include <asm/types.h>
++#include <sys/types.h>
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
diff --git a/audio/raop_play/files/patch-raop__play_raop__client.c b/audio/raop_play/files/patch-raop__play_raop__client.c
new file mode 100644
index 000000000000..da97660157a3
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_raop__client.c
@@ -0,0 +1,29 @@
+--- raop_play/raop_client.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/raop_client.c
+@@ -24,7 +24,7 @@
+ #include <openssl/rsa.h>
+ #include <openssl/engine.h>
+
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include "aexcl_lib.h"
+ #include "rtsp_client.h"
+ #include "raop_client.h"
+@@ -93,7 +93,7 @@ static int rsa_encrypt(__u8 *text, int l
+ return size;
+ }
+
+-static int encrypt(raopcl_data_t *raopcld, __u8 *data, int size)
++static int raop_encrypt(raopcl_data_t *raopcld, __u8 *data, int size)
+ {
+ __u8 *buf;
+ //__u8 tmp[16];
+@@ -260,7 +260,7 @@ int raopcl_send_sample(raopcl_t *p, __u8
+ raopcld->data[2]=len>>8;
+ raopcld->data[3]=len&0xff;
+ memcpy(raopcld->data+header_size,sample,count);
+- encrypt(raopcld, raopcld->data+header_size, count);
++ raop_encrypt(raopcld, raopcld->data+header_size, count);
+ len=count+header_size;
+ raopcld->wblk_remsize=count+header_size;
+ raopcld->wblk_wsize=0;
diff --git a/audio/raop_play/files/patch-raop__play_wav__stream.c b/audio/raop_play/files/patch-raop__play_wav__stream.c
new file mode 100644
index 000000000000..d8b8ff3124bc
--- /dev/null
+++ b/audio/raop_play/files/patch-raop__play_wav__stream.c
@@ -0,0 +1,11 @@
+--- raop_play/wav_stream.c.orig 2005-12-16 14:17:01 UTC
++++ raop_play/wav_stream.c
+@@ -17,7 +17,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *****************************************************************************/
+-#include <asm/types.h>
++#include <sys/types.h>
+ #include <stdio.h>
+ #define WAV_STREAM_C
+ #include "audio_stream.h"
diff --git a/audio/raop_play/files/patch-raop_play-Makefile.in b/audio/raop_play/files/patch-raop_play-Makefile.in
deleted file mode 100644
index 5897bc8dfe58..000000000000
--- a/audio/raop_play/files/patch-raop_play-Makefile.in
+++ /dev/null
@@ -1,29 +0,0 @@
---- raop_play/Makefile.in.orig Fri Dec 16 23:17:00 2005
-+++ raop_play/Makefile.in Thu Jul 6 16:38:02 2006
-@@ -1,6 +1,7 @@
- SHELL = @SHELL@
- CC = @CC@
- DEFS = @DEFS@
-+LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
-@@ -12,15 +13,15 @@
- TARGET=raop_play
- DESTDIR =
-
--CFLAGS=-Wall
-+CFLAGS=-Wall -I$(prefix)/include/
- OBJS := raop_play.o raop_client.o rtsp_client.o aexcl_lib.o base64.o aes.o m4a_stream.o \
- audio_stream.o wav_stream.o mp3_stream.o flac_stream.o ogg_stream.o aac_stream.o pls_stream.o \
--pcm_stream.o flac_stream.o
-+pcm_stream.o flac_stream.o ../rendezvous/getline.o
-
- all: $(TARGET)
-
- raop_play: $(OBJS)
-- $(CC) -o $@ -lssl -lsamplerate -lid3tag $^
-+ $(CC) -o $@ $(LDFLAGS) -lssl -lsamplerate -lid3tag $^
-
- install:
- $(mkinstalldirs) $(DESTDIR)$(bindir)/
diff --git a/audio/raop_play/files/patch-raop_play-aac_stream.c b/audio/raop_play/files/patch-raop_play-aac_stream.c
deleted file mode 100644
index 15a08a7d82b3..000000000000
--- a/audio/raop_play/files/patch-raop_play-aac_stream.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/aac_stream.c~ Thu Jul 28 04:43:16 2005
-+++ raop_play/aac_stream.c Fri Aug 12 09:48:37 2005
-@@ -17,7 +17,7 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <sys/stat.h>
diff --git a/audio/raop_play/files/patch-raop_play-aexcl_lib.h b/audio/raop_play/files/patch-raop_play-aexcl_lib.h
deleted file mode 100644
index 6e8c0a885cec..000000000000
--- a/audio/raop_play/files/patch-raop_play-aexcl_lib.h
+++ /dev/null
@@ -1,27 +0,0 @@
---- raop_play/aexcl_lib.h.orig 2005-12-16 23:17:01.000000000 +0900
-+++ raop_play/aexcl_lib.h 2008-05-08 21:52:26.000000000 +0900
-@@ -1,5 +1,5 @@
- #include <stdio.h>
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <sys/time.h>
- #include <time.h>
- #include <stdlib.h>
-@@ -35,6 +35,9 @@
- #define END_C_DECLS
- #endif
-
-+#define __u8 u_int8_t
-+#define __u16 u_int16_t
-+#define __u32 u_int32_t
-
- BEGIN_C_DECLS
-
-@@ -75,7 +78,6 @@
- }
- n=n<<1;
- }
-- newsize=newsize;
- np=realloc(*p,newsize);
- if(!np){
- ERRMSG("%s: realloc failed: %s\n",func,strerror(errno));
diff --git a/audio/raop_play/files/patch-raop_play-audio_stream.c b/audio/raop_play/files/patch-raop_play-audio_stream.c
deleted file mode 100644
index 4efb2d4c1399..000000000000
--- a/audio/raop_play/files/patch-raop_play-audio_stream.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/audio_stream.c~ Thu Jul 28 04:43:17 2005
-+++ raop_play/audio_stream.c Fri Aug 12 09:42:04 2005
-@@ -17,7 +17,7 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
diff --git a/audio/raop_play/files/patch-raop_play-audio_stream.h b/audio/raop_play/files/patch-raop_play-audio_stream.h
deleted file mode 100644
index e90eee4d7a35..000000000000
--- a/audio/raop_play/files/patch-raop_play-audio_stream.h
+++ /dev/null
@@ -1,16 +0,0 @@
---- raop_play/audio_stream.h.orig Thu Jul 28 04:43:17 2005
-+++ raop_play/audio_stream.h Fri Aug 12 09:46:45 2005
-@@ -20,6 +20,13 @@
- #ifndef __AUDIO_STREAM_H_
- #define __AUDIO_STREAM_H_
-
-+#define __u8 u_int8_t
-+#define __u16 u_int16_t
-+#define __u32 u_int32_t
-+#define __s8 int8_t
-+#define __s16 int16_t
-+#define __s32 int32_t
-+
- #include <signal.h>
-
- typedef enum data_type_t {
diff --git a/audio/raop_play/files/patch-raop_play-flac_streams.c b/audio/raop_play/files/patch-raop_play-flac_streams.c
deleted file mode 100644
index ccace8aaa8a8..000000000000
--- a/audio/raop_play/files/patch-raop_play-flac_streams.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/flac_stream.c~ Fri Dec 16 23:17:02 2005
-+++ raop_play/flac_stream.c Wed Jul 5 16:01:58 2006
-@@ -18,7 +18,7 @@
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
- #include <netinet/in.h>
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <sys/stat.h>
diff --git a/audio/raop_play/files/patch-raop_play-m4a_stream.c b/audio/raop_play/files/patch-raop_play-m4a_stream.c
deleted file mode 100644
index 56780a212d64..000000000000
--- a/audio/raop_play/files/patch-raop_play-m4a_stream.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- raop_play/m4a_stream.c~ Thu Jul 28 04:43:17 2005
-+++ raop_play/m4a_stream.c Fri Aug 12 09:32:06 2005
-@@ -20,7 +20,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
--#include <asm/types.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
diff --git a/audio/raop_play/files/patch-raop_play-mp3_stream.c b/audio/raop_play/files/patch-raop_play-mp3_stream.c
deleted file mode 100644
index dd26c8805b6c..000000000000
--- a/audio/raop_play/files/patch-raop_play-mp3_stream.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/mp3_stream.c~ Thu Jul 28 04:43:18 2005
-+++ raop_play/mp3_stream.c Fri Aug 12 09:47:58 2005
-@@ -17,7 +17,7 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <sys/wait.h>
diff --git a/audio/raop_play/files/patch-raop_play-ogg_stream.c b/audio/raop_play/files/patch-raop_play-ogg_stream.c
deleted file mode 100644
index ed40d0d22512..000000000000
--- a/audio/raop_play/files/patch-raop_play-ogg_stream.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/ogg_stream.c~ Thu Jul 28 04:43:18 2005
-+++ raop_play/ogg_stream.c Fri Aug 12 09:48:20 2005
-@@ -17,7 +17,7 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <sys/stat.h>
diff --git a/audio/raop_play/files/patch-raop_play-pcm_streams.c b/audio/raop_play/files/patch-raop_play-pcm_streams.c
deleted file mode 100644
index 964b5ecbe33b..000000000000
--- a/audio/raop_play/files/patch-raop_play-pcm_streams.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/pcm_stream.c~ Fri Dec 16 23:17:01 2005
-+++ raop_play/pcm_stream.c Wed Jul 5 16:02:29 2006
-@@ -19,7 +19,7 @@
- *****************************************************************************/
- #include <unistd.h>
- #include <fcntl.h>
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <stdio.h>
- #include <sys/poll.h>
- #define PCM_STREAM_C_
diff --git a/audio/raop_play/files/patch-raop_play-pls_stream.c b/audio/raop_play/files/patch-raop_play-pls_stream.c
deleted file mode 100644
index 7fbb2453c6ce..000000000000
--- a/audio/raop_play/files/patch-raop_play-pls_stream.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/pls_stream.c~ Thu Jul 28 04:43:18 2005
-+++ raop_play/pls_stream.c Fri Aug 12 09:48:57 2005
-@@ -17,7 +17,7 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
--#include <asm/types.h>
-+#include <sys/types.h>
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <unistd.h>
diff --git a/audio/raop_play/files/patch-raop_play-raop_client.c b/audio/raop_play/files/patch-raop_play-raop_client.c
deleted file mode 100644
index 635bfee4a6d3..000000000000
--- a/audio/raop_play/files/patch-raop_play-raop_client.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- raop_play/raop_client.c.orig Thu Jul 28 04:43:18 2005
-+++ raop_play/raop_client.c Fri Aug 12 09:31:35 2005
-@@ -24,7 +24,7 @@
- #include <openssl/rsa.h>
- #include <openssl/engine.h>
-
--#include <asm/types.h>
-+#include <sys/types.h>
- #include "aexcl_lib.h"
- #include "rtsp_client.h"
- #include "raop_client.h"
-@@ -87,7 +87,7 @@
- return size;
- }
-
--static int encrypt(raopcl_data_t *raopcld, __u8 *data, int size)
-+static int raop_encrypt(raopcl_data_t *raopcld, __u8 *data, int size)
- {
- __u8 *buf;
- //__u8 tmp[16];
-@@ -222,7 +222,7 @@
- raopcld->data[2]=len>>8;
- raopcld->data[3]=len&0xff;
- memcpy(raopcld->data+header_size,sample,count);
-- encrypt(raopcld, raopcld->data+header_size, count);
-+ raop_encrypt(raopcld, raopcld->data+header_size, count);
- len=count+header_size;
- raopcld->wblk_remsize=count+header_size;
- raopcld->wblk_wsize=0;
diff --git a/audio/raop_play/files/patch-raop_play-wav_stream.c b/audio/raop_play/files/patch-raop_play-wav_stream.c
deleted file mode 100644
index 555d3217d886..000000000000
--- a/audio/raop_play/files/patch-raop_play-wav_stream.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- raop_play/wav_stream.c~ Thu Jul 28 04:43:19 2005
-+++ raop_play/wav_stream.c Fri Aug 12 09:47:15 2005
-@@ -17,7 +17,7 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
- *****************************************************************************/
--#include <asm/types.h>
-+#include <sys/types.h>
- #include <stdio.h>
- #define WAV_STREAM_C
- #include "audio_stream.h"
diff --git a/audio/raop_play/files/patch-rendezvous-Client.c b/audio/raop_play/files/patch-rendezvous-Client.c
deleted file mode 100644
index e218c98d3c18..000000000000
--- a/audio/raop_play/files/patch-rendezvous-Client.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- rendezvous/Client.c.orig Fri Dec 16 23:17:02 2005
-+++ rendezvous/Client.c Wed Jul 5 16:32:45 2006
-@@ -83,8 +83,9 @@
- #include <string.h>
- #include <unistd.h>
- #include <stdlib.h>
--#include <asm/types.h>
-+#include <sys/types.h>
-
-+#include "getline.h"
- #include "mDNSClientAPI.h"// Defines the interface to the mDNS core code
- #include "mDNSPosix.h" // Defines the specific types needed to run mDNS on this platform
- #include "ExampleClientApp.h"
diff --git a/audio/raop_play/files/patch-rendezvous-Makefile.in b/audio/raop_play/files/patch-rendezvous-Makefile.in
deleted file mode 100644
index ae852061d196..000000000000
--- a/audio/raop_play/files/patch-rendezvous-Makefile.in
+++ /dev/null
@@ -1,30 +0,0 @@
---- rendezvous/Makefile.in.orig Fri Dec 16 23:17:02 2005
-+++ rendezvous/Makefile.in Thu Jul 6 16:40:26 2006
-@@ -1,6 +1,7 @@
- SHELL = @SHELL@
- CC = @CC@
- DEFS = @DEFS@
-+LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
-@@ -9,7 +10,7 @@
- top_srcdir = @top_srcdir@
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-
--CFLAGS += -Wall -DNOT_HAVE_SA_LEN
-+CFLAGS += -Wall
-
- TARGET = mDNSClient
- DESTDIR =
-@@ -17,8 +18,8 @@
- all: $(TARGET)
-
-
--mDNSClient: mDNSPosix.o mDNSUNP.o ExampleClientApp.o mDNS.o Client.o
-- $(CC) $(LFLAGS) $^ -o $@
-+mDNSClient: mDNSPosix.o mDNSUNP.o ExampleClientApp.o mDNS.o Client.o getline.o
-+ $(CC) $(LDFLAGS) mDNSPosix.o mDNSUNP.o ExampleClientApp.o mDNS.o Client.o getline.o -o $@
-
- install:
- $(mkinstalldirs) $(DESTDIR)$(bindir)/
diff --git a/audio/raop_play/files/patch-rendezvous-mDNS.c b/audio/raop_play/files/patch-rendezvous-mDNS.c
deleted file mode 100644
index cb3349040f10..000000000000
--- a/audio/raop_play/files/patch-rendezvous-mDNS.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- rendezvous/mDNS.c- Fri Aug 12 09:08:40 2005
-+++ rendezvous/mDNS.c Fri Aug 12 09:09:07 2005
-@@ -1139,7 +1139,7 @@
-
- #include <stdio.h>
- #include <string.h>
--#include <asm/types.h>
-+#include <sys/types.h>
-
- static const struct mDNSprintf_format
- {
diff --git a/audio/raop_play/files/patch-rendezvous_Client.c b/audio/raop_play/files/patch-rendezvous_Client.c
new file mode 100644
index 000000000000..44c81829b410
--- /dev/null
+++ b/audio/raop_play/files/patch-rendezvous_Client.c
@@ -0,0 +1,13 @@
+--- rendezvous/Client.c.orig 2005-12-16 14:17:02 UTC
++++ rendezvous/Client.c
+@@ -83,8 +83,9 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+-#include <asm/types.h>
++#include <sys/types.h>
+
++#include "getline.h"
+ #include "mDNSClientAPI.h"// Defines the interface to the mDNS core code
+ #include "mDNSPosix.h" // Defines the specific types needed to run mDNS on this platform
+ #include "ExampleClientApp.h"
diff --git a/audio/raop_play/files/patch-rendezvous_Makefile.in b/audio/raop_play/files/patch-rendezvous_Makefile.in
new file mode 100644
index 000000000000..5067dc748e32
--- /dev/null
+++ b/audio/raop_play/files/patch-rendezvous_Makefile.in
@@ -0,0 +1,30 @@
+--- rendezvous/Makefile.in.orig 2005-12-16 14:17:02 UTC
++++ rendezvous/Makefile.in
+@@ -1,6 +1,7 @@
+ SHELL = @SHELL@
+ CC = @CC@
+ DEFS = @DEFS@
++LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -9,7 +10,7 @@ INSTALL = @INSTALL@
+ top_srcdir = @top_srcdir@
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+
+-CFLAGS += -Wall -DNOT_HAVE_SA_LEN
++CFLAGS += -Wall
+
+ TARGET = mDNSClient
+ DESTDIR =
+@@ -17,8 +18,8 @@ DESTDIR =
+ all: $(TARGET)
+
+
+-mDNSClient: mDNSPosix.o mDNSUNP.o ExampleClientApp.o mDNS.o Client.o
+- $(CC) $(LFLAGS) $^ -o $@
++mDNSClient: mDNSPosix.o mDNSUNP.o ExampleClientApp.o mDNS.o Client.o getline.o
++ $(CC) $(LDFLAGS) mDNSPosix.o mDNSUNP.o ExampleClientApp.o mDNS.o Client.o getline.o -o $@
+
+ install:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)/
diff --git a/audio/raop_play/files/patch-rendezvous_mDNS.c b/audio/raop_play/files/patch-rendezvous_mDNS.c
new file mode 100644
index 000000000000..ec6688f8cc72
--- /dev/null
+++ b/audio/raop_play/files/patch-rendezvous_mDNS.c
@@ -0,0 +1,11 @@
+--- rendezvous/mDNS.c.orig 2005-12-16 14:17:02 UTC
++++ rendezvous/mDNS.c
+@@ -1139,7 +1139,7 @@ static const char *const mDNS_DomainType
+
+ #include <stdio.h>
+ #include <string.h>
+-#include <asm/types.h>
++#include <sys/types.h>
+
+ static const struct mDNSprintf_format
+ {
diff --git a/audio/rawrec/files/patch-main.c b/audio/rawrec/files/patch-main.c
index f6db5853685a..21fb45387f3e 100644
--- a/audio/rawrec/files/patch-main.c
+++ b/audio/rawrec/files/patch-main.c
@@ -1,5 +1,5 @@
---- main.c.orig 2006-01-22 03:40:17.000000000 +0100
-+++ main.c 2014-12-07 19:14:39.778784753 +0100
+--- main.c.orig 2006-01-22 02:40:17 UTC
++++ main.c
@@ -14,6 +14,12 @@
#include "rawrec.h"
@@ -13,7 +13,7 @@
int main(int argc, char *argv[])
{
/* Action for ignoring signals we don't want to deal with. */
-@@ -118,6 +124,7 @@
+@@ -118,6 +124,7 @@ int main(int argc, char *argv[])
strncpy(cnst_dflt_format, "s16_le", (size_t) (MAX_FORMAT_STRING_LENGTH + 1));
/* at the moment, this application goes with the default for most signals */
diff --git a/audio/rawrec/files/patch-play.c b/audio/rawrec/files/patch-play.c
index c2459d06fc66..0b878d2edb6c 100644
--- a/audio/rawrec/files/patch-play.c
+++ b/audio/rawrec/files/patch-play.c
@@ -1,6 +1,6 @@
---- play.c.orig Sun Jan 22 00:40:17 2006
-+++ play.c Wed May 10 17:31:34 2006
-@@ -54,7 +54,6 @@
+--- play.c.orig 2006-01-22 02:40:17 UTC
++++ play.c
+@@ -54,7 +54,6 @@ void play(parameters_stt *clp) /* pneumo
int rtn; /* For return values of pthread fctns. */
/* Maximum priority of FIFO thread. Should always be initialized
elsewhere before use. */
@@ -8,7 +8,7 @@
void *au_th_ret; /* Audio thread return pointer. */
void *fd_th_ret; /* File thread return pointer. */
sigset_t all_sigs; /* Full set of all signals. */
-@@ -263,6 +262,10 @@
+@@ -263,6 +262,10 @@ void play(parameters_stt *clp) /* pneumo
PTHREAD_CREATE_JOINABLE)) ) {
err_die("BUG: pthread_attr_setdetachstate failed: %s\n", strerror(rtn));
}
@@ -19,7 +19,7 @@
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING) \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != -1 \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != 0
-@@ -282,6 +285,8 @@
+@@ -282,6 +285,8 @@ void play(parameters_stt *clp) /* pneumo
err_die("BUG: pthread_attr_setscope failed: %s\n", strerror(rtn));
}
#endif
@@ -28,7 +28,7 @@
if ( (rtn = pthread_attr_init(&move_fd_attr)) )
err_die("BUG: pthread_attr_init failed: %s\n", strerror(rtn));
if ( (rtn = pthread_attr_setdetachstate(&move_fd_attr,
-@@ -289,6 +294,9 @@
+@@ -289,6 +294,9 @@ void play(parameters_stt *clp) /* pneumo
err_die("BUG: pthread_attr_setdetachstate failed: %s\n", strerror(rtn));
}
@@ -38,7 +38,7 @@
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING) \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != -1 \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != 0
-@@ -306,7 +314,7 @@
+@@ -306,7 +314,7 @@ void play(parameters_stt *clp) /* pneumo
err_die("BUG: pthread_attr_setscope failed: %s\n", strerror(rtn));
}
#endif
diff --git a/audio/rawrec/files/patch-record.c b/audio/rawrec/files/patch-record.c
index 8f4b4eca6bf6..c906a25c685e 100644
--- a/audio/rawrec/files/patch-record.c
+++ b/audio/rawrec/files/patch-record.c
@@ -1,6 +1,6 @@
---- record.c.orig Sun Jan 22 00:40:17 2006
-+++ record.c Wed May 10 17:31:45 2006
-@@ -43,7 +43,6 @@
+--- record.c.orig 2006-01-22 02:40:17 UTC
++++ record.c
+@@ -43,7 +43,6 @@ void record(parameters_stt *clp)
int rtn; /* For return values of pthread fctns. */
/* Maximum priority of FIFO thread. Should always be rinitialized
elsewhere before use. */
@@ -8,7 +8,7 @@
void *au_th_ret; /* Audio thread return pointer. */
void *fd_th_ret; /* File thread return pointer. */
sigset_t all_sigs; /* Full set of all signals. */
-@@ -183,6 +182,10 @@
+@@ -183,6 +182,10 @@ void record(parameters_stt *clp)
PTHREAD_CREATE_JOINABLE)) ) {
err_die("BUG: pthread_attr_setdetachstate failed: %s\n", strerror(rtn));
}
@@ -19,7 +19,7 @@
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING) \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != -1 \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != 0
-@@ -202,12 +205,17 @@
+@@ -202,12 +205,17 @@ void record(parameters_stt *clp)
err_die("BUG: pthread_attr_setscope failed: %s\n", strerror(rtn));
}
#endif
@@ -37,7 +37,7 @@
#if defined (_POSIX_THREAD_PRIORITY_SCHEDULING) \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != -1 \
&& _POSIX_THREAD_PRIORITY_SCHEDULING != 0
-@@ -225,6 +233,7 @@
+@@ -225,6 +233,7 @@ void record(parameters_stt *clp)
err_die("BUG: pthread_attr_setscope failed: %s\n", strerror(rtn));
}
#endif
diff --git a/audio/rawrec/files/patch-sleep__on__option.c b/audio/rawrec/files/patch-sleep__on__option.c
new file mode 100644
index 000000000000..299a6d09a1d1
--- /dev/null
+++ b/audio/rawrec/files/patch-sleep__on__option.c
@@ -0,0 +1,11 @@
+--- sleep_on_option.c.orig 2006-01-05 17:36:27 UTC
++++ sleep_on_option.c
+@@ -15,7 +15,7 @@ void sleep_on_option(double time, double
+
+ if ( time > samples / speed ) {
+ reqst.tv_sec = (time_t) floor(time);
+- reqst.tv_nsec = (long) nearbyint((time - floor(time)) * 1000000);
++ reqst.tv_nsec = (long) rint((time - floor(time)) * 1000000);
+ } else {
+ reqst.tv_sec = (time_t) floor(samples / speed);
+ reqst.tv_nsec = (long) rint((samples / speed - floor(samples / speed))
diff --git a/audio/rawrec/files/patch-sleep_on_motion.c b/audio/rawrec/files/patch-sleep_on_motion.c
deleted file mode 100644
index 6646f808060e..000000000000
--- a/audio/rawrec/files/patch-sleep_on_motion.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- sleep_on_option.c.orig Tue Jul 22 15:27:18 2003
-+++ sleep_on_option.c Tue Jul 22 15:27:32 2003
-@@ -15,7 +15,7 @@
-
- if ( time > samples / speed ) {
- reqst.tv_sec = (time_t) floor(time);
-- reqst.tv_nsec = (long) nearbyint((time - floor(time)) * 1000000);
-+ reqst.tv_nsec = (long) rint((time - floor(time)) * 1000000);
- } else {
- reqst.tv_sec = (time_t) floor(samples / speed);
- reqst.tv_nsec = (long) rint((samples / speed - floor(samples / speed))
diff --git a/audio/re/files/patch-mk-re.mk b/audio/re/files/patch-mk-re.mk
deleted file mode 100644
index ca4eac1b3c22..000000000000
--- a/audio/re/files/patch-mk-re.mk
+++ /dev/null
@@ -1,12 +0,0 @@
---- mk/re.mk.orig 2013-12-20 13:16:19.461335812 +0000
-+++ mk/re.mk 2013-12-20 13:16:30.914336263 +0000
-@@ -73,9 +73,6 @@
- ifeq ($(CC),)
- CC := gcc
- endif
--ifeq ($(CC),cc)
-- CC := gcc
--endif
- LD := $(CC)
- CC_LONGVER := $(shell if $(CC) -v 2>/dev/null; then \
- $(CC) -v 2>&1 ;\
diff --git a/audio/re/files/patch-mk_re.mk b/audio/re/files/patch-mk_re.mk
new file mode 100644
index 000000000000..1e77f47ec8f5
--- /dev/null
+++ b/audio/re/files/patch-mk_re.mk
@@ -0,0 +1,12 @@
+--- mk/re.mk.orig 2016-04-15 07:09:59 UTC
++++ mk/re.mk
+@@ -75,9 +75,6 @@ endif
+ ifeq ($(CC),)
+ CC := gcc
+ endif
+-ifeq ($(CC),cc)
+- CC := gcc
+-endif
+ LD := $(CC)
+ CC_LONGVER := $(shell if $(CC) -v 2>/dev/null; then \
+ $(CC) -v 2>&1 ;\
diff --git a/audio/rhythmbox/files/patch-configure b/audio/rhythmbox/files/patch-configure
index 8f02324ccceb..5e36653af999 100644
--- a/audio/rhythmbox/files/patch-configure
+++ b/audio/rhythmbox/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2014-03-24 12:42:39.411641038 +0000
-+++ configure 2014-03-24 12:43:17.116638621 +0000
-@@ -21652,7 +21652,7 @@
+--- configure.orig 2015-04-19 09:36:39 UTC
++++ configure
+@@ -21798,7 +21798,7 @@ else
fi
diff --git a/audio/rio500/files/patch-include-libfon.h b/audio/rio500/files/patch-include-libfon.h
deleted file mode 100644
index 174de6261ce3..000000000000
--- a/audio/rio500/files/patch-include-libfon.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- include/libfon.h.orig Tue Jan 17 14:07:33 2006
-+++ include/libfon.h Tue Jan 17 14:08:42 2006
-@@ -34,6 +34,9 @@
- #define MZ_HEADER_MAGIC 0x5a4d
- #define NE_HEADER_MAGIC 0x454e
-
-+#define bswap_16(x) (be16toh(x))
-+#define bswap_32(x) (be32toh(x))
-+
- typedef struct {
- uint16_t magic;
- uint16_t dummy[29]; /* MZ Header data that we want to skip */
diff --git a/audio/rio500/files/patch-include_libfon.h b/audio/rio500/files/patch-include_libfon.h
new file mode 100644
index 000000000000..767dd5e0a5ba
--- /dev/null
+++ b/audio/rio500/files/patch-include_libfon.h
@@ -0,0 +1,12 @@
+--- include/libfon.h.orig 2000-05-21 23:01:46 UTC
++++ include/libfon.h
+@@ -34,6 +34,9 @@
+ #define MZ_HEADER_MAGIC 0x5a4d
+ #define NE_HEADER_MAGIC 0x454e
+
++#define bswap_16(x) (be16toh(x))
++#define bswap_32(x) (be32toh(x))
++
+ typedef struct {
+ uint16_t magic;
+ uint16_t dummy[29]; /* MZ Header data that we want to skip */
diff --git a/audio/rio500/files/patch-src_rio__add__song.c b/audio/rio500/files/patch-src_rio__add__song.c
index 98ba205df47a..8602d3c5fdc1 100644
--- a/audio/rio500/files/patch-src_rio__add__song.c
+++ b/audio/rio500/files/patch-src_rio__add__song.c
@@ -1,6 +1,6 @@
---- src/rio_add_song.c.orig Sun Aug 22 16:53:27 2004
-+++ src/rio_add_song.c Sun Aug 22 16:55:17 2004
-@@ -325,6 +325,7 @@
+--- src/rio_add_song.c.orig 2000-06-14 13:46:06 UTC
++++ src/rio_add_song.c
+@@ -325,6 +325,7 @@ main(int argc, char *argv[])
send_command (rio_dev, 0x58, 0x0, card_number);
try_next:
@@ -8,7 +8,7 @@
} /* end of add file loop */
/* Close device */
-@@ -624,7 +625,7 @@
+@@ -624,7 +625,7 @@ printf("%s\n", display_format);
safe_strcat(display_string, "%", DISPLAY_STRING_LEN);
break;
diff --git a/audio/rioutil/files/patch-configure.ac b/audio/rioutil/files/patch-configure.ac
index 34d3d9d06a68..b1ff56890885 100644
--- a/audio/rioutil/files/patch-configure.ac
+++ b/audio/rioutil/files/patch-configure.ac
@@ -1,6 +1,6 @@
---- configure.ac.orig 2009-03-07 01:48:24.000000000 +0300
-+++ configure.ac 2009-03-07 01:49:07.000000000 +0300
-@@ -74,13 +74,7 @@
+--- configure.ac.orig 2006-08-08 18:11:58 UTC
++++ configure.ac
+@@ -74,13 +74,7 @@ if test "x$libusb" = "xyes"; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(WITH_LIBUSB)
diff --git a/audio/ripperx/files/patch-plugins-ripperX_plugin-oggenc.c b/audio/ripperx/files/patch-plugins-ripperX_plugin-oggenc.c
deleted file mode 100644
index 059fcdbc3f6a..000000000000
--- a/audio/ripperx/files/patch-plugins-ripperX_plugin-oggenc.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- plugins/ripperX_plugin-oggenc.c.orig Wed Jan 3 20:15:49 2007
-+++ plugins/ripperX_plugin-oggenc.c Wed Jan 3 20:22:39 2007
-@@ -1,5 +1,3 @@
--// strndup is a GNU extension:
--#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-@@ -8,6 +6,21 @@
-
- #define OGG_OUTPUT_BUF_LENGTH 2048
- #define PRINTOUT_INTERVAL 0.5
-+
-+char
-+*strndup(const char *string, size_t n)
-+{
-+ char *ret = malloc(n + 1);
-+
-+ if (ret == NULL)
-+ return NULL;
-+
-+ strncpy(ret, string, n);
-+
-+ ret[n] = '\0';
-+
-+ return ret;
-+}
-
- void
- strip_shit(char* input, int len) {
diff --git a/audio/ripperx/files/patch-plugins_ripperX__plugin-oggenc.c b/audio/ripperx/files/patch-plugins_ripperX__plugin-oggenc.c
new file mode 100644
index 000000000000..ddbb5d1d419e
--- /dev/null
+++ b/audio/ripperx/files/patch-plugins_ripperX__plugin-oggenc.c
@@ -0,0 +1,30 @@
+--- plugins/ripperX_plugin-oggenc.c.orig 2006-12-10 07:13:15 UTC
++++ plugins/ripperX_plugin-oggenc.c
+@@ -1,5 +1,3 @@
+-// strndup is a GNU extension:
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -9,6 +7,21 @@
+ #define OGG_OUTPUT_BUF_LENGTH 2048
+ #define PRINTOUT_INTERVAL 0.5
+
++char
++*strndup(const char *string, size_t n)
++{
++ char *ret = malloc(n + 1);
++
++ if (ret == NULL)
++ return NULL;
++
++ strncpy(ret, string, n);
++
++ ret[n] = '\0';
++
++ return ret;
++}
++
+ void
+ strip_shit(char* input, int len) {
+ int i;
diff --git a/audio/ripperx/files/patch-src-config_rw.c b/audio/ripperx/files/patch-src-config_rw.c
deleted file mode 100644
index c292b0367de1..000000000000
--- a/audio/ripperx/files/patch-src-config_rw.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/config_rw.c.orig 2008-01-28 06:00:09.000000000 +0100
-+++ src/config_rw.c 2008-02-21 19:01:31.000000000 +0100
-@@ -87,9 +87,9 @@
- { "Encoder::Plugin", config.encoder.plugin,
- STRING, 0, "ripperX_plugin-lame" },
- { "CdPlayer::Play_command", config.cd_player.play_command,
-- STRING, 0, "cdplay %" },
-+ STRING, 0, "cdcontrol play %" },
- { "CdPlayer::Stop_command", config.cd_player.stop_command,
-- STRING, 0, "cdstop" },
-+ STRING, 0, "cdcontrol stop" },
- { "WavPlayer::Command", config.wav_player.command,
- STRING, 0, "play %" },
- { "Mp3Player::Command", config.mp3_player.command,
diff --git a/audio/ripperx/files/patch-src-ripper_encoder_manipulation.c b/audio/ripperx/files/patch-src-ripper_encoder_manipulation.c
deleted file mode 100644
index 1e5866004572..000000000000
--- a/audio/ripperx/files/patch-src-ripper_encoder_manipulation.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- src/ripper_encoder_manipulation.c.orig 2008-02-02 18:51:29.000000000 +0100
-+++ src/ripper_encoder_manipulation.c 2008-02-22 16:15:16.000000000 +0100
-@@ -16,7 +16,6 @@
- #include <fcntl.h>
- #include <sys/wait.h>
- #include <sys/ioctl.h>
--#include <pty.h>
-
- #include "ripper_encoder_manipulation.h"
- #include "misc_utils.h"
-@@ -335,7 +334,7 @@
- dup2( pty_fd0, 0 );
- dup2( tty_fd1, 1 );
-
-- setpgrp();
-+ setpgid(0, 0);
- execvp( plugin_argv[ 0 ], plugin_argv );
-
- dup2( stderr_fd, 2 );
-@@ -368,7 +367,7 @@
- dup2( tty_fd0, 1 );
- dup2( tty_fd0, 2 );
-
-- setpgrp();
-+ setpgid(0, 0);
- execvp( program_argv[ 0 ], program_argv );
-
- dup2( stderr_fd, 2 );
diff --git a/audio/ripperx/files/patch-src_config__rw.c b/audio/ripperx/files/patch-src_config__rw.c
new file mode 100644
index 000000000000..f8cdbba1c0b4
--- /dev/null
+++ b/audio/ripperx/files/patch-src_config__rw.c
@@ -0,0 +1,14 @@
+--- src/config_rw.c.orig 2008-01-25 09:53:50 UTC
++++ src/config_rw.c
+@@ -87,9 +87,9 @@ static struct {
+ { "Encoder::Plugin", config.encoder.plugin,
+ STRING, 0, "ripperX_plugin-lame" },
+ { "CdPlayer::Play_command", config.cd_player.play_command,
+- STRING, 0, "cdplay %" },
++ STRING, 0, "cdcontrol play %" },
+ { "CdPlayer::Stop_command", config.cd_player.stop_command,
+- STRING, 0, "cdstop" },
++ STRING, 0, "cdcontrol stop" },
+ { "WavPlayer::Command", config.wav_player.command,
+ STRING, 0, "play %" },
+ { "Mp3Player::Command", config.mp3_player.command,
diff --git a/audio/ripperx/files/patch-src_ripper__encoder__manipulation.c b/audio/ripperx/files/patch-src_ripper__encoder__manipulation.c
new file mode 100644
index 000000000000..f076bcb271e4
--- /dev/null
+++ b/audio/ripperx/files/patch-src_ripper__encoder__manipulation.c
@@ -0,0 +1,28 @@
+--- src/ripper_encoder_manipulation.c.orig 2010-11-07 05:42:25 UTC
++++ src/ripper_encoder_manipulation.c
+@@ -16,7 +16,6 @@
+ #include <fcntl.h>
+ #include <sys/wait.h>
+ #include <sys/ioctl.h>
+-#include <pty.h>
+
+ #include "ripper_encoder_manipulation.h"
+ #include "misc_utils.h"
+@@ -340,7 +339,7 @@ int execute_ripper_encoder_with_plugin(
+ dup2( pty_fd0, 0 );
+ dup2( tty_fd1, 1 );
+
+- setpgrp();
++ setpgid(0, 0);
+ execvp( plugin_argv[ 0 ], plugin_argv );
+
+ dup2( stderr_fd, 2 );
+@@ -373,7 +372,7 @@ int execute_ripper_encoder_with_plugin(
+ dup2( tty_fd0, 1 );
+ dup2( tty_fd0, 2 );
+
+- setpgrp();
++ setpgid(0, 0);
+ execvp( program_argv[ 0 ], program_argv );
+
+ dup2( stderr_fd, 2 );
diff --git a/audio/rplay/Makefile b/audio/rplay/Makefile
index 8b30543ef58e..6d5c8569edba 100644
--- a/audio/rplay/Makefile
+++ b/audio/rplay/Makefile
@@ -30,7 +30,7 @@ USE_RC_SUBR= rplayd
.if ${ARCH} == "amd64"
# pr ports/166658 mentions a problem with amd64. if it happens on i386, you can delete this conditional
# and rename to patch-ao
-EXTRA_PATCHES= ${FILESDIR}/extra-patch-ao
+#EXTRA_PATCHES= ${FILESDIR}/extra-patch-ao
.endif
post-extract:
diff --git a/audio/rplay/files/extra-patch-ao b/audio/rplay/files/extra-patch-ao
index 748e6e0c8715..5e80ed2068c1 100644
--- a/audio/rplay/files/extra-patch-ao
+++ b/audio/rplay/files/extra-patch-ao
@@ -1,13 +1,6 @@
-bllslkjl
-slkj;
-
-lkjsl slk
-
-
-diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/lib/Makefile.in rplay/lib/Makefile.in
---- lib/Makefile.in 1998-07-15 08:35:23.000000000 +1000
-+++ rplay/lib/Makefile.in 2012-04-05 12:54:44.000000000 +1000
-@@ -25,8 +13,8 @@
+--- lib/Makefile.in.orig 1998-07-14 22:35:23 UTC
++++ lib/Makefile.in
+@@ -13,8 +13,8 @@ CPPFLAGS= $(CC_OPTIONS) -I. -I../include
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
TARGET= librp.a
@@ -18,22 +11,9 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/lib/Makefile
all: $(TARGET)
-diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/Makefile.in rplay/rplayd/Makefile.in
---- rplayd/Makefile.in 2012-04-05 15:19:53.000000000 +1000
-+++ rplay/rplayd/Makefile.in 2012-04-05 15:21:58.000000000 +1000
-@@ -25,7 +25,7 @@
- $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
-
- LDFLAGS= $(LD_OPTIONS) -L../librplay -lrplay -L../lib -lrp \
-- -L../adpcm -ladpcm @GSM_LIBS@ -L../rx -lrx @LDFLAGS@ @LIBS@ -lm
-+ -L../adpcm -ladpcm @GSM_LIBS@ @LDFLAGS@ @LIBS@ -lm
-
- TARGET= rplayd
-
-diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/helper.c rplay/rplayd/helper.c
---- rplayd/helper.c 1999-03-10 18:58:03.000000000 +1100
-+++ rplay/rplayd/helper.c 2012-04-05 14:31:10.000000000 +1000
-@@ -110,7 +110,7 @@
+--- rplayd/helper.c.orig 1999-03-10 07:58:03 UTC
++++ rplayd/helper.c
+@@ -110,7 +110,7 @@ helper_read(filename)
done(1);
}
//memset ((char *) &hp->pattern, 0, sizeof (hp->pattern));
@@ -42,7 +22,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/helpe
if (error)
{
report(REPORT_ERROR, "helper_read: %d line %d\n", error, line);
-@@ -188,7 +188,7 @@
+@@ -188,7 +188,7 @@ helper_lookup(sound)
for (hp = helpers; hp; hp = hp->next)
{
@@ -51,10 +31,9 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/helpe
{
return hp;
}
-diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.c rplay/rplayd/host.c
---- rplayd/host.c 1999-06-09 16:27:44.000000000 +1000
-+++ rplay/rplayd/host.c 2012-04-05 14:14:12.000000000 +1000
-@@ -95,10 +95,10 @@
+--- rplayd/host.c.orig 1999-06-09 06:27:44 UTC
++++ rplayd/host.c
+@@ -95,10 +95,10 @@ host_read(filename)
//memset ((char *) &access_write, 0, sizeof (access_write));
//memset ((char *) &access_execute, 0, sizeof (access_execute));
@@ -69,7 +48,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
do
{
-@@ -162,7 +162,7 @@
+@@ -162,7 +162,7 @@ host_read(filename)
if (strlen(expr_read) == 3)
{
@@ -78,7 +57,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
}
else
{
-@@ -171,7 +171,7 @@
+@@ -171,7 +171,7 @@ host_read(filename)
strcat(expr_read, "$");
if (strlen(expr_write) == 3)
{
@@ -87,7 +66,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
}
else
{
-@@ -180,7 +180,7 @@
+@@ -180,7 +180,7 @@ host_read(filename)
strcat(expr_write, "$");
if (strlen(expr_execute) == 3)
{
@@ -96,7 +75,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
}
else
{
-@@ -189,7 +189,7 @@
+@@ -189,7 +189,7 @@ host_read(filename)
strcat(expr_execute, "$");
if (strlen(expr_monitor) == 3)
{
@@ -105,7 +84,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
}
else
{
-@@ -197,35 +197,35 @@
+@@ -197,35 +197,35 @@ host_read(filename)
}
strcat(expr_monitor, "$");
@@ -153,7 +132,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
done(1);
}
}
-@@ -354,22 +354,22 @@
+@@ -354,22 +354,22 @@ host_insert(expr_read, expr_write, expr_
{
case HOST_READ:
strcat(expr_read, re_name);
@@ -180,7 +159,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
break;
default:
-@@ -432,7 +432,7 @@
+@@ -432,7 +432,7 @@ host_access(sin, access_mode)
done(1);
}
@@ -189,9 +168,8 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/host.
return !n;
}
-diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/native.c rplay/rplayd/native.c
---- rplayd/native.c 1999-03-10 18:58:03.000000000 +1100
-+++ rplay/rplayd/native.c 2012-04-05 12:58:20.000000000 +1000
+--- rplayd/native.c.orig 1999-03-10 07:58:03 UTC
++++ rplayd/native.c
@@ -32,6 +32,7 @@
#include "rplayd.h"
#include "native.h"
@@ -200,10 +178,9 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/nativ
/* Native means 16-bit signed. */
-diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/sound.c rplay/rplayd/sound.c
---- rplayd/sound.c 1999-06-09 16:27:44.000000000 +1000
-+++ rplay/rplayd/sound.c 2012-04-05 14:31:19.000000000 +1000
-@@ -96,14 +96,14 @@
+--- rplayd/sound.c.orig 1999-06-09 06:27:44 UTC
++++ rplayd/sound.c
+@@ -96,14 +96,14 @@ bad_dirs_init()
dirs = strdup(BAD_DIRS); /* XXX */
@@ -220,7 +197,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/sound
}
}
-@@ -119,7 +119,7 @@
+@@ -119,7 +119,7 @@ bad_dirs_init()
}
first = 1;
@@ -229,7 +206,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/sound
while (p = (char *) strtok(first ? dirs : 0, ":"))
{
if (first)
-@@ -129,12 +129,12 @@
+@@ -129,12 +129,12 @@ bad_dirs_init()
}
else
{
@@ -245,7 +222,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/sound
#if 0
report(REPORT_DEBUG, "bad_dirs=%s, strlen=%d, length=%d\n",
-@@ -143,9 +143,9 @@
+@@ -143,9 +143,9 @@ bad_dirs_init()
//memset ((char *) &bad_dirs, 0, sizeof (bad_dirs));
@@ -257,7 +234,7 @@ diff -rwu /export/ports_work/usr/ports/audio/rplay/work/rplay-3.3.2/rplayd/sound
done(1);
}
-@@ -162,7 +162,7 @@
+@@ -162,7 +162,7 @@ bad_dir(dir)
#endif
{
/* return 1 if bad */
diff --git a/audio/rplay/files/patch-Makefile.config.in b/audio/rplay/files/patch-Makefile.config.in
index 7b5d09de9015..7874153b780d 100644
--- a/audio/rplay/files/patch-Makefile.config.in
+++ b/audio/rplay/files/patch-Makefile.config.in
@@ -1,6 +1,6 @@
---- Makefile.config.in.orig Thu Aug 13 15:12:59 1998
-+++ Makefile.config.in Wed Jun 21 22:26:35 2000
-@@ -43,6 +43,7 @@
+--- Makefile.config.in.orig 1998-08-13 06:12:59 UTC
++++ Makefile.config.in
+@@ -43,6 +43,7 @@ CFLAGS= @CFLAGS@
#CC_OPTIONS= -O -cckr # SGI
#CC_OPTIONS= -O # generic
#CC_OPTIONS= -g # debug
diff --git a/audio/rplay/files/patch-doc_Makefile.in b/audio/rplay/files/patch-doc_Makefile.in
index 38c78247e0dd..a7ce9719d631 100644
--- a/audio/rplay/files/patch-doc_Makefile.in
+++ b/audio/rplay/files/patch-doc_Makefile.in
@@ -1,6 +1,6 @@
---- doc/Makefile.in.orig Wed Jul 15 07:35:23 1998
-+++ doc/Makefile.in Thu Jun 22 00:41:13 2000
-@@ -23,15 +23,15 @@
+--- doc/Makefile.in.orig 1998-07-14 22:35:23 UTC
++++ doc/Makefile.in
+@@ -23,15 +23,15 @@ MKINSTALLDIRS= @srcdir@/../mkinstalldirs
.texi.html:
$(TEXI2HTML) $(TEXI2HTML_FLAGS) $<
@@ -21,7 +21,7 @@
man:
./genman rplay.1.in
-@@ -50,7 +50,7 @@
+@@ -50,7 +50,7 @@ install: all
-$(INSTALL_DATA) RPLAY.info $(infodir)/RPLAY.info
-$(INSTALL_DATA) RPTP.info $(infodir)/RPTP.info
-$(INSTALL_DATA) librplay.info $(infodir)/librplay.info
@@ -30,7 +30,7 @@
uninstall:
-$(RM) $(mandir)/man1/rplay.1
-@@ -63,7 +63,7 @@
+@@ -63,7 +63,7 @@ uninstall:
-$(RM) $(infodir)/RPLAY.info
-$(RM) $(infodir)/RPTP.info
-$(RM) $(infodir)/librplay.info
diff --git a/audio/rplay/files/patch-doc_RPLAY.texi b/audio/rplay/files/patch-doc_RPLAY.texi
index df40a019a006..bb98b88d39b9 100644
--- a/audio/rplay/files/patch-doc_RPLAY.texi
+++ b/audio/rplay/files/patch-doc_RPLAY.texi
@@ -1,5 +1,5 @@
---- doc/RPLAY.texi.orig Wed Jul 15 07:35:23 1998
-+++ doc/RPLAY.texi Wed Jun 21 22:38:54 2000
+--- doc/RPLAY.texi.orig 1998-07-14 22:35:23 UTC
++++ doc/RPLAY.texi
@@ -2,6 +2,10 @@
@c %**start of header
@setfilename RPLAY.info
diff --git a/audio/rplay/files/patch-doc_RPTP.texi b/audio/rplay/files/patch-doc_RPTP.texi
index 7bb0f3d0da47..85630ee7d9b4 100644
--- a/audio/rplay/files/patch-doc_RPTP.texi
+++ b/audio/rplay/files/patch-doc_RPTP.texi
@@ -1,5 +1,5 @@
---- doc/RPTP.texi.orig Wed Jul 15 07:35:23 1998
-+++ doc/RPTP.texi Wed Jun 21 22:38:56 2000
+--- doc/RPTP.texi.orig 1998-07-14 22:35:23 UTC
++++ doc/RPTP.texi
@@ -2,6 +2,10 @@
@c %**start of header
@setfilename RPTP.info
diff --git a/audio/rplay/files/patch-doc_librplay.texi b/audio/rplay/files/patch-doc_librplay.texi
index 865bd4e9f282..f472f3b378c8 100644
--- a/audio/rplay/files/patch-doc_librplay.texi
+++ b/audio/rplay/files/patch-doc_librplay.texi
@@ -1,5 +1,5 @@
---- doc/librplay.texi.orig Wed Jul 15 07:35:23 1998
-+++ doc/librplay.texi Wed Jun 21 22:38:58 2000
+--- doc/librplay.texi.orig 1998-07-14 22:35:23 UTC
++++ doc/librplay.texi
@@ -2,6 +2,10 @@
@c %**start of header
@setfilename librplay.info
diff --git a/audio/rplay/files/patch-doc_rplayd.8 b/audio/rplay/files/patch-doc_rplayd.8
index 654c104718b4..24aab7da14aa 100644
--- a/audio/rplay/files/patch-doc_rplayd.8
+++ b/audio/rplay/files/patch-doc_rplayd.8
@@ -1,6 +1,6 @@
---- doc/rplayd.8.orig Wed Jul 15 07:35:23 1998
-+++ doc/rplayd.8 Wed Jun 21 22:39:07 2000
-@@ -125,7 +125,7 @@
+--- doc/rplayd.8.orig 1998-07-14 22:35:23 UTC
++++ doc/rplayd.8
+@@ -125,7 +125,7 @@ mapping is cdrom[0-3] -> /vol/dev/aliase
Linux uses cdrom[0-3] -> /dev/cdrom[0-3].
.TP
.I "\-C FILE, \-\-conf=FILE"
@@ -9,7 +9,7 @@
.TP
.I "\-T N, \-\-connection\-timeout=N"
Close idle RPTP connections after N seconds, disabled with 0 (300).
-@@ -146,10 +146,10 @@
+@@ -146,10 +146,10 @@ Run with GROUP privs. (audio)
Display helpful information.
.TP
.I "\-\-helpers=FILE"
@@ -22,7 +22,7 @@
.TP
.I "\-\-inetd"
Enable inetd mode. (disabled)
-@@ -191,7 +191,7 @@
+@@ -191,7 +191,7 @@ Use PORT as the RPTP/TCP port. (5556)
(--other-rptp-port may also be available)
.TP
.I "\-S FILE, \-\-servers=FILE"
diff --git a/audio/rplay/files/patch-doc_rplayd.texi b/audio/rplay/files/patch-doc_rplayd.texi
index 5612cc1aa202..054b83e731ae 100644
--- a/audio/rplay/files/patch-doc_rplayd.texi
+++ b/audio/rplay/files/patch-doc_rplayd.texi
@@ -1,5 +1,5 @@
---- doc/rplayd.texi.orig Wed Jul 15 07:35:23 1998
-+++ doc/rplayd.texi Thu Jun 22 01:20:50 2000
+--- doc/rplayd.texi.orig 2016-07-26 15:48:49 UTC
++++ doc/rplayd.texi
@@ -1,7 +1,11 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@@ -13,7 +13,7 @@
@iftex
@finalout
@end iftex
-@@ -71,7 +75,6 @@
+@@ -71,7 +75,6 @@ This file documents the rplay Network Au
* rplayd:: The rplay audio server.
* rplay:: A sample RPLAY client.
* rptp:: A sample RPTP client.
@@ -21,7 +21,7 @@
@end menu
@node Overview, rplayd, Top, Top
-@@ -162,25 +165,12 @@
+@@ -162,25 +165,12 @@ sounds can be sent over the network usin
attempt to determine whether or not the server has the sound before
using the network.
@@ -32,7 +32,7 @@
RPTP protocol. Several commands can be issued to control rplayd and
report its status. See the output of the rptp help command for a list
of available commands.
--
+
-@node xrplay, , rptp, Top
-@chapter xrplay
-rplay control panel which includes CD player-like buttons, volume
@@ -45,6 +45,6 @@
-
-xrplay communicates with the local (or remote) rplayd using the RPTP
-protocol.
-
+-
@bye
diff --git a/audio/rplay/files/patch-librplay_Makefile.in b/audio/rplay/files/patch-librplay_Makefile.in
index dd85d7c40f1f..db1eb40d5813 100644
--- a/audio/rplay/files/patch-librplay_Makefile.in
+++ b/audio/rplay/files/patch-librplay_Makefile.in
@@ -1,6 +1,6 @@
---- librplay/Makefile.in.orig Tue Mar 23 11:38:38 1999
-+++ librplay/Makefile.in Thu Jun 22 00:07:42 2000
-@@ -19,11 +19,12 @@
+--- librplay/Makefile.in.orig 1999-03-23 02:38:38 UTC
++++ librplay/Makefile.in
+@@ -19,11 +19,12 @@ LDFLAGS= $(LD_OPTIONS) -shared @LDFLAGS@
$(CC) -c -fPIC $(CPPFLAGS) $(CFLAGS) -o $@ $<
TARGET= $(LIBRPLAY_NAME)
@@ -14,7 +14,7 @@
#
# Use the following for SunOS 4.1.x, Solaris 2.x, Linux, NetBSD
-@@ -32,8 +33,9 @@
+@@ -32,8 +33,9 @@ $(TARGET): $(OBJS)
$(AR) rcv $@ $?
$(RANLIB) $@
@@ -26,7 +26,7 @@
#
# For HP-UX comment above and uncomment below.
-@@ -50,7 +52,8 @@
+@@ -50,7 +52,8 @@ librplay.so: $(SHAREDOBJS)
install: all
$(MKINSTALLDIRS) $(libdir)
$(INSTALL_DATA) $(TARGET) $(libdir)
diff --git a/audio/rplay/files/patch-rplayd_Makefile.in b/audio/rplay/files/patch-rplayd_Makefile.in
index 40662a82670b..4e2e34c54b11 100644
--- a/audio/rplay/files/patch-rplayd_Makefile.in
+++ b/audio/rplay/files/patch-rplayd_Makefile.in
@@ -1,6 +1,6 @@
---- rplayd/Makefile.in.orig Wed Jun 9 15:27:43 1999
-+++ rplayd/Makefile.in Wed Jun 21 23:04:00 2000
-@@ -54,7 +54,6 @@
+--- rplayd/Makefile.in.orig 1999-06-09 06:27:43 UTC
++++ rplayd/Makefile.in
+@@ -54,7 +54,6 @@ $(TARGET): $(OBJS) ../librplay/$(LIBRPLA
install: all
$(MKINSTALLDIRS) $(sbindir)
$(INSTALL_PROGRAM) $(TARGET) $(sbindir)/$(TARGET)
diff --git a/audio/rplay/files/patch-rplayd__audio__audio_FreeBSD.c b/audio/rplay/files/patch-rplayd__audio__audio_FreeBSD.c
index 2a7d99ae2dee..3ae57a8b3607 100644
--- a/audio/rplay/files/patch-rplayd__audio__audio_FreeBSD.c
+++ b/audio/rplay/files/patch-rplayd__audio__audio_FreeBSD.c
@@ -1,5 +1,5 @@
---- rplayd/audio/audio_FreeBSD.c.orig Wed Mar 10 16:58:10 1999
-+++ rplayd/audio/audio_FreeBSD.c Thu Apr 11 07:45:56 2002
+--- rplayd/audio/audio_FreeBSD.c.orig 1999-03-10 07:58:10 UTC
++++ rplayd/audio/audio_FreeBSD.c
@@ -35,7 +35,7 @@
#include <sys/ioctl.h>
#include <sys/errno.h>
@@ -9,7 +9,7 @@
/*
* for the poor folks who don't have a sound card, but use the pc speaker
-@@ -353,7 +353,7 @@
+@@ -353,7 +353,7 @@ rplay_audio_get_volume(void)
return (-1);
}
@@ -18,7 +18,7 @@
{
report(REPORT_ERROR, "rplay_audio_get_volume: pcm mixer device not installed\n");
close(mx);
-@@ -417,7 +417,7 @@
+@@ -417,7 +417,7 @@ rplay_audio_set_volume(int volume)
return (-1);
}
diff --git a/audio/rplay/files/patch-rplayd__rplayd.c b/audio/rplay/files/patch-rplayd__rplayd.c
index e764578164ab..d53a34cc11b3 100644
--- a/audio/rplay/files/patch-rplayd__rplayd.c
+++ b/audio/rplay/files/patch-rplayd__rplayd.c
@@ -1,6 +1,6 @@
---- rplayd/rplayd.c.orig Wed Mar 10 16:58:04 1999
-+++ rplayd/rplayd.c Fri Jan 31 02:12:40 2003
-@@ -421,10 +421,9 @@
+--- rplayd/rplayd.c.orig 1999-03-10 07:58:04 UTC
++++ rplayd/rplayd.c
+@@ -421,10 +421,9 @@ main(argc, argv)
/* Fork */
if (do_fork)
{
diff --git a/audio/rplay/files/patch-rplayd_rplayd.h b/audio/rplay/files/patch-rplayd_rplayd.h
index b85520b4eac3..18359e742ca1 100644
--- a/audio/rplay/files/patch-rplayd_rplayd.h
+++ b/audio/rplay/files/patch-rplayd_rplayd.h
@@ -1,6 +1,6 @@
---- rplayd/rplayd.h.orig Tue Dec 26 16:03:40 2006
-+++ rplayd/rplayd.h Tue Dec 26 16:03:44 2006
-@@ -73,7 +73,6 @@
+--- rplayd/rplayd.h.orig 1999-03-10 07:58:04 UTC
++++ rplayd/rplayd.h
+@@ -73,7 +73,6 @@ extern RPLAY_AUDIO_TABLE *rplay_audio_ta
extern fd_set read_mask;
extern fd_set write_mask;
extern int debug;
diff --git a/audio/rplay/files/patch-rplayd_sound.h b/audio/rplay/files/patch-rplayd_sound.h
index b0a7b830458c..c5ad69322425 100644
--- a/audio/rplay/files/patch-rplayd_sound.h
+++ b/audio/rplay/files/patch-rplayd_sound.h
@@ -1,6 +1,6 @@
---- rplayd/sound.h.orig Wed Jun 9 15:27:44 1999
-+++ rplayd/sound.h Wed Jun 21 22:29:37 2000
-@@ -170,9 +170,9 @@
+--- rplayd/sound.h.orig 1999-06-09 06:27:44 UTC
++++ rplayd/sound.h
+@@ -170,9 +170,9 @@ typedef struct _sindex
int gsm_bit_frame_bytes; /* Number of bytes in gsm_bit_frame */
int gsm_fixed_buffer_size;
#endif /* HAVE_GSM */
diff --git a/audio/rplay/files/patch-rplayd_spool.c b/audio/rplay/files/patch-rplayd_spool.c
index 40e400f0215c..57a3e19589c3 100644
--- a/audio/rplay/files/patch-rplayd_spool.c
+++ b/audio/rplay/files/patch-rplayd_spool.c
@@ -1,6 +1,6 @@
---- rplayd/spool.c.orig Thu Mar 11 06:14:38 1999
-+++ rplayd/spool.c Wed Jun 21 23:20:13 2000
-@@ -1127,8 +1127,8 @@
+--- rplayd/spool.c.orig 1999-03-10 21:14:38 UTC
++++ rplayd/spool.c
+@@ -1127,8 +1127,8 @@ spool_update()
spool_flow_pause(sp);
}
}
diff --git a/audio/rplay/files/patch-rx_Makefile.in b/audio/rplay/files/patch-rx_Makefile.in
index b45b9504124e..fa7ed2cc4dd5 100644
--- a/audio/rplay/files/patch-rx_Makefile.in
+++ b/audio/rplay/files/patch-rx_Makefile.in
@@ -1,6 +1,6 @@
---- rx/Makefile.in.orig Wed Jun 21 22:57:55 2000
-+++ rx/Makefile.in Wed Jun 21 22:59:43 2000
-@@ -64,11 +64,11 @@
+--- rx/Makefile.in.orig 1998-07-14 22:35:25 UTC
++++ rx/Makefile.in
+@@ -64,11 +64,11 @@ gen_c_files=rgx.x
all: librx.a
install: all
diff --git a/audio/rsynth/files/patch-configure.in b/audio/rsynth/files/patch-configure.in
index e115c2cd0af0..52505df8549e 100644
--- a/audio/rsynth/files/patch-configure.in
+++ b/audio/rsynth/files/patch-configure.in
@@ -1,4 +1,4 @@
---- configure.in.orig 1994-11-08 13:30:51.000000000 +0000
+--- configure.in.orig 1994-11-08 13:30:51 UTC
+++ configure.in
@@ -11,7 +11,8 @@ hplay=dummy
dbm=none
diff --git a/audio/rsynth/files/patch-naplay.c b/audio/rsynth/files/patch-naplay.c
index 44906e467d35..b8a5b8d01957 100644
--- a/audio/rsynth/files/patch-naplay.c
+++ b/audio/rsynth/files/patch-naplay.c
@@ -1,9 +1,7 @@
-*** naplay.c.ORIG Tue Nov 1 19:40:13 1994
---- naplay.c Sat Jun 10 19:51:40 1995
-***************
-*** 1,3 ****
---- 1,4 ----
-+ #include <sys/types.h>
- #include <useconfig.h>
- #include <sys/time.h>
- #include <sys/stat.h>
+--- naplay.c.orig 1994-11-01 18:40:13 UTC
++++ naplay.c
+@@ -1,3 +1,4 @@
++#include <sys/types.h>
+ #include <useconfig.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
diff --git a/audio/rubberband/files/patch-Makefile b/audio/rubberband/files/patch-Makefile
deleted file mode 100644
index 76e93aae9197..000000000000
--- a/audio/rubberband/files/patch-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in-dist 2012-01-08 17:53:50.857150609 +0100
-+++ Makefile.in 2012-01-08 17:54:03.141155975 +0100
-@@ -32,7 +32,7 @@
- INSTALL_VAMPDIR := @prefix@/lib/vamp
- INSTALL_LADSPADIR := @prefix@/lib/ladspa
- INSTALL_LRDFDIR := @prefix@/share/ladspa/rdf
--INSTALL_PKGDIR := @prefix@/lib/pkgconfig
-+INSTALL_PKGDIR := @prefix@/libdata/pkgconfig
-
- all: bin lib $(PROGRAM_TARGET) $(STATIC_TARGET) $(DYNAMIC_TARGET) $(VAMP_TARGET) $(LADSPA_TARGET)
-
diff --git a/audio/rubberband/files/patch-Makefile.in b/audio/rubberband/files/patch-Makefile.in
new file mode 100644
index 000000000000..1042756d0796
--- /dev/null
+++ b/audio/rubberband/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig 2012-10-28 10:30:09 UTC
++++ Makefile.in
+@@ -32,7 +32,7 @@ INSTALL_LIBDIR := @prefix@/lib
+ INSTALL_VAMPDIR := @prefix@/lib/vamp
+ INSTALL_LADSPADIR := @prefix@/lib/ladspa
+ INSTALL_LRDFDIR := @prefix@/share/ladspa/rdf
+-INSTALL_PKGDIR := @prefix@/lib/pkgconfig
++INSTALL_PKGDIR := @prefix@/libdata/pkgconfig
+
+ all: bin lib $(PROGRAM_TARGET) $(STATIC_TARGET) $(DYNAMIC_TARGET) $(VAMP_TARGET) $(LADSPA_TARGET)
+
diff --git a/audio/rubberband/files/patch-StrecherProcess.cpp b/audio/rubberband/files/patch-StrecherProcess.cpp
deleted file mode 100644
index 733775d18915..000000000000
--- a/audio/rubberband/files/patch-StrecherProcess.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/StretcherProcess.cpp-dist 2012-01-08 17:24:27.535146749 +0100
-+++ src/StretcherProcess.cpp 2012-01-08 17:21:19.739152441 +0100
-@@ -26,7 +26,8 @@
- #include "system/VectorOps.h"
-
- #ifndef _WIN32
--#include <alloca.h>
-+/* linux stdlib include alloca.h */
-+#include <stdlib.h>
- #endif
-
- #include <cassert>
diff --git a/audio/rubberband/files/patch-StretcherImpl.cpp b/audio/rubberband/files/patch-StretcherImpl.cpp
deleted file mode 100644
index 47f7b2914ff1..000000000000
--- a/audio/rubberband/files/patch-StretcherImpl.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/StretcherImpl.cpp-dist 2012-01-08 17:23:26.816147081 +0100
-+++ src/StretcherImpl.cpp 2012-01-08 17:22:19.098146464 +0100
-@@ -28,7 +28,7 @@
- #include "base/Profiler.h"
-
- #ifndef _WIN32
--#include <alloca.h>
-+#include <stdlib.h>
- #endif
-
- #include <cassert>
diff --git a/audio/rubberband/files/patch-src_StretcherImpl.cpp b/audio/rubberband/files/patch-src_StretcherImpl.cpp
new file mode 100644
index 000000000000..c8bef0eabb74
--- /dev/null
+++ b/audio/rubberband/files/patch-src_StretcherImpl.cpp
@@ -0,0 +1,11 @@
+--- src/StretcherImpl.cpp.orig 2012-10-28 10:30:09 UTC
++++ src/StretcherImpl.cpp
+@@ -38,7 +38,7 @@
+ #include "base/Profiler.h"
+
+ #ifndef _WIN32
+-#include <alloca.h>
++#include <stdlib.h>
+ #endif
+
+ #include <cassert>
diff --git a/audio/rubberband/files/patch-src_StretcherProcess.cpp b/audio/rubberband/files/patch-src_StretcherProcess.cpp
new file mode 100644
index 000000000000..871854ade33e
--- /dev/null
+++ b/audio/rubberband/files/patch-src_StretcherProcess.cpp
@@ -0,0 +1,12 @@
+--- src/StretcherProcess.cpp.orig 2012-10-28 10:30:09 UTC
++++ src/StretcherProcess.cpp
+@@ -35,7 +35,8 @@
+ #include "system/VectorOps.h"
+
+ #ifndef _WIN32
+-#include <alloca.h>
++/* linux stdlib include alloca.h */
++#include <stdlib.h>
+ #endif
+
+ #include <cassert>
diff --git a/audio/rubberband/files/patch-src_system_sysutils.h b/audio/rubberband/files/patch-src_system_sysutils.h
new file mode 100644
index 000000000000..ef3ef41d6e40
--- /dev/null
+++ b/audio/rubberband/files/patch-src_system_sysutils.h
@@ -0,0 +1,12 @@
+--- src/system/sysutils.h.orig 2012-10-28 10:30:09 UTC
++++ src/system/sysutils.h
+@@ -41,7 +41,8 @@
+ #include <malloc.h>
+ #else
+ #ifndef __MSVC__
+-#include <alloca.h>
++/* linux stdlib also includes alloca.h */
++#include <stdlib.h>
+ #endif
+ #endif
+
diff --git a/audio/rubberband/files/patch-system-sysutils.h b/audio/rubberband/files/patch-system-sysutils.h
deleted file mode 100644
index 93a644d64621..000000000000
--- a/audio/rubberband/files/patch-system-sysutils.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/system/sysutils.h-dist 2012-01-08 17:15:39.369149714 +0100
-+++ src/system/sysutils.h 2012-01-08 17:19:42.384145925 +0100
-@@ -41,7 +41,8 @@
- #include <malloc.h>
- #else
- #ifndef __MSVC__
--#include <alloca.h>
-+/* linux stdlib also includes alloca.h */
-+#include <stdlib.h>
- #endif
- #endif
-
diff --git a/audio/ruby-audiofile/files/patch-audiofile.c b/audio/ruby-audiofile/files/patch-audiofile.c
index 88dcdd9a8ca8..bfb89ae9979b 100644
--- a/audio/ruby-audiofile/files/patch-audiofile.c
+++ b/audio/ruby-audiofile/files/patch-audiofile.c
@@ -1,6 +1,6 @@
--- audiofile.c.orig 2003-08-09 23:29:57 UTC
+++ audiofile.c
-@@ -161,7 +161,7 @@
+@@ -161,7 +161,7 @@ static VALUE af_initialize(int argc, VAL
/* get mode into a C-string */
mode = malloc(2);
@@ -9,7 +9,7 @@
mode[1] = '\0';
switch(*mode) {
-@@ -188,7 +188,7 @@
+@@ -188,7 +188,7 @@ static VALUE af_initialize(int argc, VAL
switch(*mode) {
case 'r':
@@ -18,7 +18,7 @@
if(fh != AF_NULL_FILEHANDLE) {
afp = ALLOC(struct af_data);
DATA_PTR(obj) = afp;
-@@ -212,8 +212,8 @@
+@@ -212,8 +212,8 @@ static VALUE af_initialize(int argc, VAL
case 'w':
@@ -29,7 +29,7 @@
afp = ALLOC(struct af_data);
DATA_PTR(obj) = afp;
-@@ -335,8 +335,8 @@
+@@ -335,8 +335,8 @@ static VALUE af_read_into(VALUE obj, VAL
Check_Type(readIntoString, T_STRING);
@@ -40,7 +40,7 @@
frame_size = afGetFrameSize(afp->handle, AF_DEFAULT_TRACK, EXPAND_3TO4);
frames = bytes / frame_size;
-@@ -357,8 +357,8 @@
+@@ -357,8 +357,8 @@ static VALUE actually_write(VALUE obj, V
GetAFP(obj, afp);
Check_Type(writeFromString, T_STRING);
@@ -51,7 +51,7 @@
frame_size = afGetFrameSize(afp->handle, AF_DEFAULT_TRACK, EXPAND_3TO4);
frames = bytes / frame_size;
-@@ -679,18 +679,18 @@
+@@ -679,18 +679,18 @@ static VALUE af_pcm_mapping_eq(VALUE obj
struct af_data *afp;
Check_Type(args, T_ARRAY);
@@ -77,7 +77,7 @@
Check_Type(v_slope, T_FLOAT);
Check_Type(v_intercept, T_FLOAT);
Check_Type(v_min_clip, T_FLOAT);
-@@ -700,12 +700,12 @@
+@@ -700,12 +700,12 @@ static VALUE af_pcm_mapping_eq(VALUE obj
if(af_is_open(afp)) {
afSetTrackPCMMapping(afp->handle, AF_DEFAULT_TRACK,
diff --git a/audio/rubygem-ruby-shout/files/patch-ext-shout_ext.c b/audio/rubygem-ruby-shout/files/patch-ext-shout_ext.c
deleted file mode 100644
index a07ff0a02b16..000000000000
--- a/audio/rubygem-ruby-shout/files/patch-ext-shout_ext.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ext/shout_ext.c.orig 2015-05-27 15:58:04 UTC
-+++ ext/shout_ext.c
-@@ -250,7 +250,7 @@ static VALUE _sh_send(VALUE self, VALUE
- shout_connection *s;
- GET_SC(self, s);
-
-- Check_SafeStr(to_send);
-+ SafeStringValue(to_send);
- err = shout_send(s->conn, (unsigned char *) (RSTRING_PTR(to_send)),
- RSTRING_LEN(to_send));
- if(err != SHOUTERR_SUCCESS) {
diff --git a/audio/rubygem-ruby-shout/files/patch-ext_shout__ext.c b/audio/rubygem-ruby-shout/files/patch-ext_shout__ext.c
new file mode 100644
index 000000000000..5e285aaa1024
--- /dev/null
+++ b/audio/rubygem-ruby-shout/files/patch-ext_shout__ext.c
@@ -0,0 +1,11 @@
+--- ext/shout_ext.c.orig 2016-07-26 15:50:39 UTC
++++ ext/shout_ext.c
+@@ -250,7 +250,7 @@ static VALUE _sh_send(VALUE self, VALUE
+ shout_connection *s;
+ GET_SC(self, s);
+
+- Check_SafeStr(to_send);
++ SafeStringValue(to_send);
+ err = shout_send(s->conn, (unsigned char *) (RSTRING_PTR(to_send)),
+ RSTRING_LEN(to_send));
+ if(err != SHOUTERR_SUCCESS) {
diff --git a/audio/s3mod/Makefile b/audio/s3mod/Makefile
index 762ff8fcbe32..453dd517b62b 100644
--- a/audio/s3mod/Makefile
+++ b/audio/s3mod/Makefile
@@ -14,7 +14,7 @@ COMMENT= MOD/S3M player
ALL_TARGET= freebsd
PLIST_FILES= bin/s3mod
-pre-patch:
+post-extract:
@${CP} ${WRKSRC}/DspDrivers/linux_dsp.c ${WRKSRC}/dsp.c
do-install:
diff --git a/audio/s3mod/files/patch-Makefile b/audio/s3mod/files/patch-Makefile
index ef5edb95f918..87bea037260d 100644
--- a/audio/s3mod/files/patch-Makefile
+++ b/audio/s3mod/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sun Oct 22 04:48:51 1995
-+++ Makefile Sat Jan 27 15:52:13 2001
+--- Makefile.orig 1995-10-21 19:48:51 UTC
++++ Makefile
@@ -5,11 +5,11 @@
#
########
@@ -14,7 +14,7 @@
LFLAGS =
OBJS = mod.o s3m.o main.o play.o mix.o cmdline.o dsp.o gus.o
-@@ -24,6 +24,7 @@
+@@ -24,6 +24,7 @@ all:
@echo " make sun - SunOS/Solaris"
@echo " make sgi - SGI Irix"
@echo " make linux - Voxware DSP/GUS"
@@ -22,13 +22,13 @@
@echo " make dec - Dec OSF/1"
@echo " make clean - remove all .o files"
@echo " make clobber - remove all .o and targets"
-@@ -50,6 +51,9 @@
- $(RM) -f dsp.c
+@@ -51,6 +52,9 @@ linux:
$(LN) DspDrivers/linux_dsp.c dsp.c
make CC=gcc CFLAGS=-O2 DEFINES="-DLINUX -DGUS" s3mod
-+
+
+freebsd:
+ $(MAKE) CFLAGS="$(CFLAGS)" DEFINES="" s3mod
-
++
s3mod: $(OBJS)
$(CC) $(CFLAGS) -o s3mod $(OBJS) $(LFLAGS) $(LIBS)
+
diff --git a/audio/s3mod/files/patch-config.h b/audio/s3mod/files/patch-config.h
index a625e2cbdc03..7e71c5a78b10 100644
--- a/audio/s3mod/files/patch-config.h
+++ b/audio/s3mod/files/patch-config.h
@@ -1,5 +1,5 @@
---- config.h.orig Sat Oct 21 20:59:55 1995
-+++ config.h Sun Dec 29 10:50:41 2002
+--- config.h.orig 1995-10-21 19:59:55 UTC
++++ config.h
@@ -64,6 +64,11 @@
#define GUS
#endif /* GUS */
diff --git a/audio/s3mod/files/patch-dsp.c b/audio/s3mod/files/patch-dsp.c
index 3ebf20cead1f..5cf09892284c 100644
--- a/audio/s3mod/files/patch-dsp.c
+++ b/audio/s3mod/files/patch-dsp.c
@@ -1,5 +1,5 @@
---- dsp.c.orig 2012-10-10 23:29:01.000000000 +0800
-+++ dsp.c 2012-10-10 23:30:54.000000000 +0800
+--- dsp.c.orig 2016-07-26 15:51:01 UTC
++++ dsp.c
@@ -22,20 +22,20 @@
* linux_dsp.c - Support for the Linux DSP driver from the Voxware(C) Drivers.
*/
diff --git a/audio/s3mod/files/patch-dsp.h b/audio/s3mod/files/patch-dsp.h
index f1c0a1a4eb8b..12936268219c 100644
--- a/audio/s3mod/files/patch-dsp.h
+++ b/audio/s3mod/files/patch-dsp.h
@@ -1,5 +1,5 @@
---- dsp.h.orig 2012-10-10 23:31:11.000000000 +0800
-+++ dsp.h 2012-10-10 23:31:22.000000000 +0800
+--- dsp.h.orig 1995-10-21 06:52:31 UTC
++++ dsp.h
@@ -34,7 +34,7 @@ extern uint8 *audio_sta
extern uint8 *audio_end_buffer;
extern uint8 *audio_curptr;
diff --git a/audio/s3mod/files/patch-gus.c b/audio/s3mod/files/patch-gus.c
index 747c31266b76..5bc720cdcea3 100644
--- a/audio/s3mod/files/patch-gus.c
+++ b/audio/s3mod/files/patch-gus.c
@@ -1,5 +1,5 @@
---- gus.c.orig Sat Oct 21 12:14:33 1995
-+++ gus.c Thu Aug 22 20:55:06 2002
+--- gus.c.orig 1995-10-21 19:14:33 UTC
++++ gus.c
@@ -26,7 +26,7 @@
#ifdef GUS
diff --git a/audio/s3mod/files/patch-gus.h b/audio/s3mod/files/patch-gus.h
index 291c9b942e69..df5fa0c4839d 100644
--- a/audio/s3mod/files/patch-gus.h
+++ b/audio/s3mod/files/patch-gus.h
@@ -1,6 +1,6 @@
---- gus.h.orig Sat Oct 21 13:06:38 1995
-+++ gus.h Thu Aug 22 20:53:57 2002
-@@ -41,7 +41,7 @@
+--- gus.h.orig 1995-10-21 20:06:38 UTC
++++ gus.h
+@@ -41,7 +41,7 @@ void sync_time(void);
extern unsigned char _seqbuf[];
extern int _seqbuflen, _seqbufptr;
diff --git a/audio/s3mod/files/patch-main.c b/audio/s3mod/files/patch-main.c
index eddf50ee01c3..c0f43f1748ce 100644
--- a/audio/s3mod/files/patch-main.c
+++ b/audio/s3mod/files/patch-main.c
@@ -1,6 +1,6 @@
---- main.c.orig Sun Oct 22 04:13:23 1995
-+++ main.c Sat Jan 27 15:22:17 2001
-@@ -56,6 +56,10 @@
+--- main.c.orig 1995-10-21 19:13:23 UTC
++++ main.c
+@@ -56,6 +56,10 @@ void help(void)
printf(" Linux Support by Daniel Marks \n");
printf(" GUS Support by David Jeske (jeske@uiuc.edu)\n");
#endif /* LINUX */
@@ -11,7 +11,7 @@
#if defined(__sgi)
printf(" SGI Support by Mike Muuss (Mike@arl.mil)\n\n");
#endif /* __sgi */
-@@ -69,6 +73,9 @@
+@@ -69,6 +73,9 @@ void help(void)
#ifdef LINUX
printf(" -b 16 bit samples\n");
#endif /* ?LINUX */
@@ -21,7 +21,7 @@
printf(" -f set frequency\n");
printf(" -q quiet (don't print anything)\n");
printf(" -n don't loop\n");
-@@ -76,6 +83,9 @@
+@@ -76,6 +83,9 @@ void help(void)
#ifdef LINUX
printf(" -g do NOT use GUS native mode\n");
#endif /* ?LINUX */
@@ -31,7 +31,7 @@
printf(" -p PAL speed adjustment (145bpm start)\n");
printf("s3mod -sbf 44100 foobar.mod\n");
printf(" plays in stereo, 16 bits, 44.1 kHz\n\n");
-@@ -109,7 +119,7 @@
+@@ -109,7 +119,7 @@ void get_audio_device(void)
}
@@ -40,7 +40,7 @@
{
uint32 j;
char *filename;
-@@ -241,6 +251,7 @@
+@@ -241,6 +251,7 @@ bit16 = 1;
close_dsp_device();
free(audio_start_buffer);
diff --git a/audio/s3mod/files/patch-main.h b/audio/s3mod/files/patch-main.h
index dd5881d1d985..048263ffdbde 100644
--- a/audio/s3mod/files/patch-main.h
+++ b/audio/s3mod/files/patch-main.h
@@ -1,6 +1,6 @@
---- main.h.orig Sat Oct 21 15:56:32 1995
-+++ main.h Sat Jan 27 15:30:30 2001
-@@ -43,7 +43,7 @@
+--- main.h.orig 1995-10-21 06:56:32 UTC
++++ main.h
+@@ -43,7 +43,7 @@ extern uint32 mixspeed;
void help(void);
void get_audio_device(void);
diff --git a/audio/s3mod/files/patch-mod.c b/audio/s3mod/files/patch-mod.c
index f31016c94442..3e8802d05424 100644
--- a/audio/s3mod/files/patch-mod.c
+++ b/audio/s3mod/files/patch-mod.c
@@ -1,5 +1,5 @@
---- mod.c.orig Sun Oct 22 04:13:23 1995
-+++ mod.c Sat Jan 27 15:04:15 2001
+--- mod.c.orig 1995-10-21 19:13:23 UTC
++++ mod.c
@@ -11,7 +11,7 @@
@@ -9,7 +9,7 @@
#include "gus.h"
#endif /* GUS */
-@@ -130,8 +130,10 @@
+@@ -130,8 +130,10 @@ void beattrack(register track_info_ptr t
/* Portamento Down */
if ((track->period += track->port_down) > track->period_high_limit)
track->period = track->period_high_limit;
diff --git a/audio/s3mod/files/patch-play.c b/audio/s3mod/files/patch-play.c
index 900d668bbecb..42aee42274f6 100644
--- a/audio/s3mod/files/patch-play.c
+++ b/audio/s3mod/files/patch-play.c
@@ -1,5 +1,5 @@
---- play.c.orig Sun Oct 22 04:13:35 1995
-+++ play.c Sat Jan 27 15:04:15 2001
+--- play.c.orig 1995-10-21 19:13:35 UTC
++++ play.c
@@ -36,7 +36,7 @@
#include "dsp.h"
diff --git a/audio/s3mod/files/patch-tables.h b/audio/s3mod/files/patch-tables.h
index 7bb5ff7e9925..8de857f48f38 100644
--- a/audio/s3mod/files/patch-tables.h
+++ b/audio/s3mod/files/patch-tables.h
@@ -1,5 +1,5 @@
---- tables.h.orig Sat Oct 21 15:59:26 1995
-+++ tables.h Sat Jan 27 15:31:20 2001
+--- tables.h.orig 1995-10-21 06:59:26 UTC
++++ tables.h
@@ -13,7 +13,8 @@
unsigned short base_freq_table[] =
{
diff --git a/audio/schism/files/patch-modplug__snd_gm.c b/audio/schism/files/patch-modplug__snd_gm.c
deleted file mode 100644
index 73b22615aec1..000000000000
--- a/audio/schism/files/patch-modplug__snd_gm.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- ./modplug/snd_gm.c.orig 2010-01-01 20:22:26.000000000 +0100
-+++ ./modplug/snd_gm.c 2011-12-09 21:50:22.000000000 +0100
-@@ -10,12 +10,14 @@
- #include "mplink.h" // for 'mp', which we shouldn't need
- #include "snd_gm.h"
-
-+/*
- #if !defined(HAVE_LOG2) && !defined(__USE_ISOC99) && !defined(log2)
- static double log2(double d)
- {
- return log(d) / log(2.0);
- }
- #endif
-+*/
-
-
- #define LinearMidivol 1
diff --git a/audio/schism/files/patch-modplug_snd__gm.c b/audio/schism/files/patch-modplug_snd__gm.c
new file mode 100644
index 000000000000..60641a8da69b
--- /dev/null
+++ b/audio/schism/files/patch-modplug_snd__gm.c
@@ -0,0 +1,17 @@
+--- modplug/snd_gm.c.orig 2010-01-01 19:22:26 UTC
++++ modplug/snd_gm.c
+@@ -10,12 +10,14 @@
+ #include "mplink.h" // for 'mp', which we shouldn't need
+ #include "snd_gm.h"
+
++/*
+ #if !defined(HAVE_LOG2) && !defined(__USE_ISOC99) && !defined(log2)
+ static double log2(double d)
+ {
+ return log(d) / log(2.0);
+ }
+ #endif
++*/
+
+
+ #define LinearMidivol 1
diff --git a/audio/scrobbler/files/patch-Makefile.in b/audio/scrobbler/files/patch-Makefile.in
index 139471d1fb5c..b79c6fd6f82a 100644
--- a/audio/scrobbler/files/patch-Makefile.in
+++ b/audio/scrobbler/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- ./Makefile.in.orig 2005-02-26 21:37:07.000000000 -0500
-+++ ./Makefile.in 2012-05-19 08:49:13.000000000 -0400
-@@ -78,7 +78,7 @@
+--- Makefile.in.orig 2005-02-27 02:37:07 UTC
++++ Makefile.in
+@@ -78,7 +78,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -9,7 +9,7 @@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
-@@ -173,9 +173,9 @@
+@@ -173,9 +173,9 @@ libxmms_scrobbler_la_SOURCES = xmms_scro
queue.c queue.h tags/tags.c tags/include/tags.h tags/unicode.c \
tags/include/unicode.h fmt.c fmt.h gtkstuff.c gtkstuff.h md5.c md5.h \
tags/include/endian.h tags/id3v1.c tags/id3v2.c tags/vorbis.c tags/ape.c \
@@ -21,7 +21,7 @@
libbmp_scrobbler_la_CFLAGS = $(AM_CFLAGS) @BMP_CFLAGS@ -DMAKE_BMP=1 \
-@@ -188,13 +188,13 @@
+@@ -188,13 +188,13 @@ libbmp_scrobbler_la_SOURCES = xmms_scrob
queue.c queue.h tags/tags.c tags/include/tags.h tags/unicode.c \
tags/include/unicode.h fmt.c fmt.h gtkstuff.c gtkstuff.h md5.c md5.h \
tags/include/endian.h tags/id3v1.c tags/id3v2.c tags/vorbis.c tags/ape.c \
@@ -38,7 +38,7 @@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-@@ -210,7 +210,7 @@
+@@ -210,7 +210,7 @@ am_libbmp_scrobbler_la_OBJECTS = libbmp_
libbmp_scrobbler_la-md5.lo libbmp_scrobbler_la-id3v1.lo \
libbmp_scrobbler_la-id3v2.lo libbmp_scrobbler_la-vorbis.lo \
libbmp_scrobbler_la-ape.lo libbmp_scrobbler_la-itunes.lo \
@@ -47,7 +47,7 @@
libbmp_scrobbler_la-wma.lo
libbmp_scrobbler_la_OBJECTS = $(am_libbmp_scrobbler_la_OBJECTS)
libxmms_scrobbler_la_LIBADD =
-@@ -221,7 +221,6 @@
+@@ -221,7 +221,6 @@ am_libxmms_scrobbler_la_OBJECTS = libxmm
libxmms_scrobbler_la-md5.lo libxmms_scrobbler_la-id3v1.lo \
libxmms_scrobbler_la-id3v2.lo libxmms_scrobbler_la-vorbis.lo \
libxmms_scrobbler_la-ape.lo libxmms_scrobbler_la-itunes.lo \
@@ -55,7 +55,7 @@
libxmms_scrobbler_la-id3genres.lo libxmms_scrobbler_la-wma.lo
libxmms_scrobbler_la_OBJECTS = $(am_libxmms_scrobbler_la_OBJECTS)
-@@ -229,7 +228,6 @@
+@@ -229,7 +228,6 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libbmp_scrobbler_la-ape.Plo \
@@ -63,7 +63,7 @@
@AMDEP_TRUE@ ./$(DEPDIR)/libbmp_scrobbler_la-fmt.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/libbmp_scrobbler_la-gtkstuff.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/libbmp_scrobbler_la-id3genres.Plo \
-@@ -245,7 +243,6 @@
+@@ -245,7 +243,6 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./$(DEPDIR)/libbmp_scrobbler_la-wma.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/libbmp_scrobbler_la-xmms_scrobbler.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/libxmms_scrobbler_la-ape.Plo \
@@ -71,7 +71,7 @@
@AMDEP_TRUE@ ./$(DEPDIR)/libxmms_scrobbler_la-fmt.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/libxmms_scrobbler_la-gtkstuff.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/libxmms_scrobbler_la-id3genres.Plo \
-@@ -381,7 +378,6 @@
+@@ -381,7 +378,6 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbmp_scrobbler_la-ape.Plo@am__quote@
@@ -79,7 +79,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbmp_scrobbler_la-fmt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbmp_scrobbler_la-gtkstuff.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbmp_scrobbler_la-id3genres.Plo@am__quote@
-@@ -397,7 +393,6 @@
+@@ -397,7 +393,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbmp_scrobbler_la-wma.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbmp_scrobbler_la-xmms_scrobbler.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmms_scrobbler_la-ape.Plo@am__quote@
@@ -87,7 +87,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmms_scrobbler_la-fmt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmms_scrobbler_la-gtkstuff.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmms_scrobbler_la-id3genres.Plo@am__quote@
-@@ -875,39 +870,6 @@
+@@ -875,39 +870,6 @@ libbmp_scrobbler_la-itunes.lo: tags/itun
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbmp_scrobbler_la_CFLAGS) $(CFLAGS) -c -o libbmp_scrobbler_la-itunes.lo `test -f 'tags/itunes.c' || echo '$(srcdir)/'`tags/itunes.c
diff --git a/audio/scrobbler/files/patch-config.h.in b/audio/scrobbler/files/patch-config.h.in
index 7d55db17abcf..85ef6e41c99c 100644
--- a/audio/scrobbler/files/patch-config.h.in
+++ b/audio/scrobbler/files/patch-config.h.in
@@ -1,5 +1,5 @@
---- ./config.h.in.orig 2005-02-20 14:26:40.000000000 -0500
-+++ ./config.h.in 2012-05-19 08:49:13.000000000 -0400
+--- config.h.in.orig 2005-02-20 19:26:40 UTC
++++ config.h.in
@@ -12,9 +12,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
diff --git a/audio/scrobbler/files/patch-configure b/audio/scrobbler/files/patch-configure
index 905afbef3d89..8e49da6c3cf3 100644
--- a/audio/scrobbler/files/patch-configure
+++ b/audio/scrobbler/files/patch-configure
@@ -1,6 +1,6 @@
---- ./configure.orig 2005-02-26 21:37:06.000000000 -0500
-+++ ./configure 2012-05-19 08:49:13.000000000 -0400
-@@ -22548,145 +22548,6 @@
+--- configure.orig 2005-02-27 02:37:06 UTC
++++ configure
+@@ -22548,145 +22548,6 @@ fi
@@ -146,7 +146,7 @@
if test "${my_cv_curl_vers+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-@@ -22727,24 +22588,6 @@
+@@ -22727,24 +22588,6 @@ fi
LIBS="$LIBS $GTKLIBS"
diff --git a/audio/scrobbler/files/patch-scrobbler.c b/audio/scrobbler/files/patch-scrobbler.c
index 07148bac36c3..277913c39516 100644
--- a/audio/scrobbler/files/patch-scrobbler.c
+++ b/audio/scrobbler/files/patch-scrobbler.c
@@ -1,6 +1,6 @@
---- scrobbler.c.orig Mon Feb 21 03:45:05 2005
-+++ scrobbler.c Sat Nov 26 20:14:10 2005
-@@ -382,9 +382,9 @@
+--- scrobbler.c.orig 2005-02-21 00:45:05 UTC
++++ scrobbler.c
+@@ -382,9 +382,9 @@ static int sc_parse_sb_res(void)
static gchar *sc_itemtag(char c, int n, char *str)
{
diff --git a/audio/scrobbler/files/patch-tags__include__tags.h b/audio/scrobbler/files/patch-tags__include__tags.h
deleted file mode 100644
index 4d15b0076c11..000000000000
--- a/audio/scrobbler/files/patch-tags__include__tags.h
+++ /dev/null
@@ -1,26 +0,0 @@
---- ./tags/include/tags.h.orig 2012-05-19 17:35:23.000000000 -0400
-+++ ./tags/include/tags.h 2012-05-19 17:36:12.000000000 -0400
-@@ -31,7 +31,6 @@
- #include "vorbis.h"
- #include "itunes.h"
- #include "ape.h"
--#include "cdaudio.h"
-
- extern const char *genre_list[148];
-
-@@ -59,7 +58,6 @@
- has_oggflac,
- has_speex,
- has_itunes,
-- has_cdaudio,
- prefer_ape;
- wma_t *wma;
- id3v1_t *id3v1;
-@@ -70,7 +68,6 @@
- *oggflac,
- *speex;
- itunes_t *itunes;
-- cdaudio_t *cdaudio;
- } metatag_t;
-
- void get_tag_data(metatag_t *, char *, int);
diff --git a/audio/scrobbler/files/patch-tags__tags.c b/audio/scrobbler/files/patch-tags__tags.c
deleted file mode 100644
index f1e219376453..000000000000
--- a/audio/scrobbler/files/patch-tags__tags.c
+++ /dev/null
@@ -1,58 +0,0 @@
---- ./tags/tags.c.orig 2005-02-20 13:08:42.000000000 -0500
-+++ ./tags/tags.c 2012-05-19 08:49:13.000000000 -0400
-@@ -141,37 +141,6 @@
- return;
- }
-
--void metaCD(metatag_t *meta, char *filename, int track)
--{
-- int tmp;
--
-- pdebug("Getting CD Audio metadata...", META_DEBUG);
-- meta->cdaudio = readCDAudio(filename, track);
-- if(meta->cdaudio == NULL)
-- {
-- pdebug("Error getting metadata", META_DEBUG);
--
-- return;
-- }
--
-- meta->has_cdaudio = 1;
--
-- pdebug("Reading metadata into structs...", META_DEBUG);
-- meta->artist = meta->cdaudio->artist;
-- meta->title = meta->cdaudio->title;
-- meta->mb = realloc(meta->mb, strlen(meta->cdaudio->mbid) + 1);
-- strcpy(meta->mb, meta->cdaudio->mbid);
-- meta->album = meta->cdaudio->album;
-- meta->year = NULL;
-- meta->genre = NULL;
-- /* Special track handling... Yay! */
-- meta->track = realloc(meta->track, 4);
-- tmp = snprintf(meta->track, 3, "%d", track);
-- *(meta->track + tmp) = '\0';
--
-- return;
--} /* End CD Audio support */
--
- static ape_t *fetchAPE(char *filename)
- {
- ape_t *ape;
-@@ -693,8 +662,6 @@
- {
- if(track > 0)
- {
-- metaCD(meta, filename, track);
--
- return;
- }
- else
-@@ -801,8 +768,6 @@
- freeVorbis(meta->speex);
- if(meta->itunes != NULL)
- freeiTunes(meta->itunes);
-- if(meta->cdaudio != NULL)
-- freeCDAudio(meta->cdaudio);
- free(meta);
- }
-
diff --git a/audio/scrobbler/files/patch-tags_include_tags.h b/audio/scrobbler/files/patch-tags_include_tags.h
new file mode 100644
index 000000000000..b6e8a6d9baa4
--- /dev/null
+++ b/audio/scrobbler/files/patch-tags_include_tags.h
@@ -0,0 +1,26 @@
+--- tags/include/tags.h.orig 2004-09-24 01:23:17 UTC
++++ tags/include/tags.h
+@@ -31,7 +31,6 @@
+ #include "vorbis.h"
+ #include "itunes.h"
+ #include "ape.h"
+-#include "cdaudio.h"
+
+ extern const char *genre_list[148];
+
+@@ -59,7 +58,6 @@ typedef struct {
+ has_oggflac,
+ has_speex,
+ has_itunes,
+- has_cdaudio,
+ prefer_ape;
+ wma_t *wma;
+ id3v1_t *id3v1;
+@@ -70,7 +68,6 @@ typedef struct {
+ *oggflac,
+ *speex;
+ itunes_t *itunes;
+- cdaudio_t *cdaudio;
+ } metatag_t;
+
+ void get_tag_data(metatag_t *, char *, int);
diff --git a/audio/scrobbler/files/patch-tags_tags.c b/audio/scrobbler/files/patch-tags_tags.c
new file mode 100644
index 000000000000..0f3e3013952d
--- /dev/null
+++ b/audio/scrobbler/files/patch-tags_tags.c
@@ -0,0 +1,58 @@
+--- tags/tags.c.orig 2005-02-20 18:08:42 UTC
++++ tags/tags.c
+@@ -141,37 +141,6 @@ void tag_exists(metatag_t *meta, char *f
+ return;
+ }
+
+-void metaCD(metatag_t *meta, char *filename, int track)
+-{
+- int tmp;
+-
+- pdebug("Getting CD Audio metadata...", META_DEBUG);
+- meta->cdaudio = readCDAudio(filename, track);
+- if(meta->cdaudio == NULL)
+- {
+- pdebug("Error getting metadata", META_DEBUG);
+-
+- return;
+- }
+-
+- meta->has_cdaudio = 1;
+-
+- pdebug("Reading metadata into structs...", META_DEBUG);
+- meta->artist = meta->cdaudio->artist;
+- meta->title = meta->cdaudio->title;
+- meta->mb = realloc(meta->mb, strlen(meta->cdaudio->mbid) + 1);
+- strcpy(meta->mb, meta->cdaudio->mbid);
+- meta->album = meta->cdaudio->album;
+- meta->year = NULL;
+- meta->genre = NULL;
+- /* Special track handling... Yay! */
+- meta->track = realloc(meta->track, 4);
+- tmp = snprintf(meta->track, 3, "%d", track);
+- *(meta->track + tmp) = '\0';
+-
+- return;
+-} /* End CD Audio support */
+-
+ static ape_t *fetchAPE(char *filename)
+ {
+ ape_t *ape;
+@@ -693,8 +662,6 @@ void get_tag_data(metatag_t *meta, char
+ {
+ if(track > 0)
+ {
+- metaCD(meta, filename, track);
+-
+ return;
+ }
+ else
+@@ -801,8 +768,6 @@ void metatag_delete(metatag_t *meta)
+ freeVorbis(meta->speex);
+ if(meta->itunes != NULL)
+ freeiTunes(meta->itunes);
+- if(meta->cdaudio != NULL)
+- freeCDAudio(meta->cdaudio);
+ free(meta);
+ }
+
diff --git a/audio/sdl_mixer/files/patch-SDL__mixer.h b/audio/sdl_mixer/files/patch-SDL__mixer.h
new file mode 100644
index 000000000000..021af4acb13b
--- /dev/null
+++ b/audio/sdl_mixer/files/patch-SDL__mixer.h
@@ -0,0 +1,11 @@
+--- SDL_mixer.h.orig 2012-01-15 22:01:04 UTC
++++ SDL_mixer.h
+@@ -621,6 +621,8 @@ extern DECLSPEC Mix_Chunk * SDLCALL Mix_
+ /* Close the mixer, halting all playing audio */
+ extern DECLSPEC void SDLCALL Mix_CloseAudio(void);
+
++extern DECLSPEC int Mix_GetMixerInfo(SDL_AudioSpec *, char *, int);
++
+ /* We'll use SDL for reporting errors */
+ #define Mix_SetError SDL_SetError
+ #define Mix_GetError SDL_GetError
diff --git a/audio/sdl_mixer/files/patch-SDL_mixer.h b/audio/sdl_mixer/files/patch-SDL_mixer.h
deleted file mode 100644
index db6569727572..000000000000
--- a/audio/sdl_mixer/files/patch-SDL_mixer.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- SDL_mixer.h 2001/05/08 07:44:56 1.1
-+++ SDL_mixer.h 2001/05/08 07:48:13
-@@ -222,6 +222,8 @@
- /* Close the mixer, halting all playing audio */
- extern DECLSPEC void Mix_CloseAudio(void);
-
-+extern DECLSPEC int Mix_GetMixerInfo(SDL_AudioSpec *, char *, int);
-+
- /* We'll use SDL for reporting errors */
- #define Mix_SetError SDL_SetError
- #define Mix_GetError SDL_GetError
diff --git a/audio/sdl_mixer/files/patch-mixer.c b/audio/sdl_mixer/files/patch-mixer.c
index eee8220c789f..dd4d189014c1 100644
--- a/audio/sdl_mixer/files/patch-mixer.c
+++ b/audio/sdl_mixer/files/patch-mixer.c
@@ -1,10 +1,9 @@
---- mixer.c 2001/05/08 07:44:26 1.1
-+++ mixer.c 2001/05/08 07:47:09
-@@ -865,3 +865,18 @@
- }
+--- mixer.c.orig 2012-01-15 22:01:05 UTC
++++ mixer.c
+@@ -1272,6 +1272,21 @@ int Mix_GroupOldest(int tag)
return(chan);
}
-+
+
+int Mix_GetMixerInfo(SDL_AudioSpec *m, char *namebuf, int maxlen)
+{
+ if (!audio_opened)
@@ -19,3 +18,7 @@
+ }
+ return 0;
+}
++
+ /* Finds the "most recent" (i.e. last) sample playing in a group of channels */
+ int Mix_GroupNewer(int tag)
+ {
diff --git a/audio/sdl_mixer/files/patch-timidity-config.h b/audio/sdl_mixer/files/patch-timidity-config.h
deleted file mode 100644
index ffb260237ea2..000000000000
--- a/audio/sdl_mixer/files/patch-timidity-config.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- timidity/config.h.orig 2012-01-16 02:01:05.000000000 +0400
-+++ timidity/config.h 2012-12-04 00:12:31.000000000 +0400
-@@ -161,7 +161,7 @@
- /* You could specify a complete path, e.g. "/etc/timidity.cfg", and
- then specify the library directory in the configuration file. */
- #define CONFIG_FILE "timidity.cfg"
--#define CONFIG_FILE_ETC "/etc/timidity.cfg"
-+#define CONFIG_FILE_ETC "%%CONFIG_FILE%%"
-
- #if defined(__WIN32__) || defined(__OS2__)
- #define DEFAULT_PATH "C:\\TIMIDITY"
diff --git a/audio/sdl_mixer/files/patch-timidity_config.h b/audio/sdl_mixer/files/patch-timidity_config.h
new file mode 100644
index 000000000000..c6463f9e197b
--- /dev/null
+++ b/audio/sdl_mixer/files/patch-timidity_config.h
@@ -0,0 +1,11 @@
+--- timidity/config.h.orig 2012-01-15 22:01:05 UTC
++++ timidity/config.h
+@@ -161,7 +161,7 @@ typedef char int8;
+ /* You could specify a complete path, e.g. "/etc/timidity.cfg", and
+ then specify the library directory in the configuration file. */
+ #define CONFIG_FILE "timidity.cfg"
+-#define CONFIG_FILE_ETC "/etc/timidity.cfg"
++#define CONFIG_FILE_ETC "%%CONFIG_FILE%%"
+
+ #if defined(__WIN32__) || defined(__OS2__)
+ #define DEFAULT_PATH "C:\\TIMIDITY"
diff --git a/audio/shairport/files/patch-shairport.pl b/audio/shairport/files/patch-shairport.pl
index 4a3c6f9db44f..55da5b6bd768 100644
--- a/audio/shairport/files/patch-shairport.pl
+++ b/audio/shairport/files/patch-shairport.pl
@@ -1,6 +1,6 @@
---- shairport.pl.orig 2012-01-08 22:34:35.000000000 +1000
-+++ shairport.pl 2012-01-08 22:34:14.000000000 +1000
-@@ -270,6 +270,7 @@
+--- shairport.pl.orig 2012-01-02 10:57:00 UTC
++++ shairport.pl
+@@ -270,6 +270,7 @@ $SIG{__DIE__} = sub {
$avahi_publish = fork();
my $pw_clause = (length $password) ? "pw=true" : "pw=false";
if ($avahi_publish==0) {
@@ -8,7 +8,7 @@
{ exec 'avahi-publish-service',
join('', map { sprintf "%02X", $_ } @hw_addr) . "\@$apname",
"_raop._tcp",
-@@ -329,7 +330,6 @@
+@@ -329,7 +330,6 @@ my $sel = new IO::Select($listen);
if ($daemon) {
chdir "/" or die "Could not chdir to '/': $!";
diff --git a/audio/shout/files/patch-configure b/audio/shout/files/patch-configure
index d4d24c0b9bee..e1cf22b5b7c3 100644
--- a/audio/shout/files/patch-configure
+++ b/audio/shout/files/patch-configure
@@ -1,6 +1,6 @@
---- configure Thu Apr 20 03:41:45 2000
-+++ configure.new Wed Jun 14 19:34:23 2000
-@@ -539,9 +539,9 @@
+--- configure.orig 2000-04-20 07:41:45 UTC
++++ configure
+@@ -539,9 +539,9 @@ if test "x$enable_fsstd" = "xyes"; then
LOGDIR="/var/log/icecast"
else
echo "FSSTD DISABLED"
diff --git a/audio/shout/files/patch-shout.c b/audio/shout/files/patch-shout.c
index 55a3928779a7..04a7a5efe85f 100644
--- a/audio/shout/files/patch-shout.c
+++ b/audio/shout/files/patch-shout.c
@@ -1,6 +1,6 @@
---- shout.c.orig Thu Apr 20 00:31:50 2000
-+++ shout.c Sun Aug 31 19:59:41 2003
-@@ -1738,7 +1738,7 @@
+--- shout.c.orig 2000-04-20 07:31:50 UTC
++++ shout.c
+@@ -1738,7 +1738,7 @@ login ()
void
update_meta_info_on_server (char *filename, unsigned long int size)
{
@@ -9,7 +9,7 @@
char title[BUFSIZE]; /* copy of filename */
char *song = NULL;
char *mount = NULL;
-@@ -1815,7 +1815,7 @@
+@@ -1815,7 +1815,7 @@ update_meta_info_on_server (char *filena
if (sockfd != -1) {
if (set.use_icy) {
diff --git a/audio/shout/files/patch-sock.c b/audio/shout/files/patch-sock.c
index 8763c427e5de..dc3b47719cef 100644
--- a/audio/shout/files/patch-sock.c
+++ b/audio/shout/files/patch-sock.c
@@ -1,5 +1,5 @@
---- sock.c Thu Apr 20 03:31:50 2000
-+++ sock.c.new Wed Jun 14 15:43:59 2000
+--- sock.c.orig 2000-04-20 07:31:50 UTC
++++ sock.c
@@ -12,8 +12,10 @@
#include <process.h>
#include <winbase.h>
diff --git a/audio/shout/files/patch-util.c b/audio/shout/files/patch-util.c
index b9e2676d43db..e2f98e54eaa8 100644
--- a/audio/shout/files/patch-util.c
+++ b/audio/shout/files/patch-util.c
@@ -1,5 +1,5 @@
---- util.c Thu Apr 20 03:31:50 2000
-+++ util.c.new Wed Jun 14 15:42:24 2000
+--- util.c.orig 2000-04-20 07:31:50 UTC
++++ util.c
@@ -18,8 +18,6 @@
#include <process.h>
#include <winbase.h>
diff --git a/audio/sidplay/files/patch-audio_oss_audiodrv.h b/audio/sidplay/files/patch-audio_oss_audiodrv.h
index 91e7a4013bbf..1e03d9016738 100644
--- a/audio/sidplay/files/patch-audio_oss_audiodrv.h
+++ b/audio/sidplay/files/patch-audio_oss_audiodrv.h
@@ -1,5 +1,5 @@
---- audio/oss/audiodrv.h.org Tue Jan 21 19:51:13 2003
-+++ audio/oss/audiodrv.h Tue Jan 21 19:51:50 2003
+--- audio/oss/audiodrv.h.orig 2002-09-28 18:43:38 UTC
++++ audio/oss/audiodrv.h
@@ -16,8 +16,8 @@
#if defined(HAVE_LINUX) && defined(HAVE_LINUX_SOUNDCARD_H)
diff --git a/audio/sidplay/files/patch-configure b/audio/sidplay/files/patch-configure
index dc0c4c60e7cc..362aabdfa5e8 100644
--- a/audio/sidplay/files/patch-configure
+++ b/audio/sidplay/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Mon Mar 11 11:42:18 2002
-+++ configure Tue Jul 30 14:09:39 2002
-@@ -1416,7 +1416,7 @@
+--- configure.orig 2002-09-28 18:44:14 UTC
++++ configure
+@@ -1414,7 +1414,7 @@ else
fi
done
diff --git a/audio/sidplay/files/patch-sid2wav.cpp b/audio/sidplay/files/patch-sid2wav.cpp
index 2da4ab773325..e0af40315c11 100644
--- a/audio/sidplay/files/patch-sid2wav.cpp
+++ b/audio/sidplay/files/patch-sid2wav.cpp
@@ -1,4 +1,4 @@
---- sid2wav.cpp.orig
+--- sid2wav.cpp.orig 2002-03-11 10:42:10 UTC
+++ sid2wav.cpp
@@ -18,9 +18,9 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/audio/sidplay/files/patch-sidcon.cpp b/audio/sidplay/files/patch-sidcon.cpp
index a61473a7d24d..75d591bfd033 100644
--- a/audio/sidplay/files/patch-sidcon.cpp
+++ b/audio/sidplay/files/patch-sidcon.cpp
@@ -1,4 +1,4 @@
---- sidcon.cpp.orig
+--- sidcon.cpp.orig 2002-02-19 19:48:37 UTC
+++ sidcon.cpp
@@ -25,12 +25,18 @@
#include <stdio.h>
diff --git a/audio/sidplay/files/patch-sidplay.cpp b/audio/sidplay/files/patch-sidplay.cpp
index a0113920df32..89e3b05a8266 100644
--- a/audio/sidplay/files/patch-sidplay.cpp
+++ b/audio/sidplay/files/patch-sidplay.cpp
@@ -1,4 +1,4 @@
---- sidplay.cpp.orig
+--- sidplay.cpp.orig 2002-09-28 18:44:02 UTC
+++ sidplay.cpp
@@ -18,8 +18,8 @@
//
diff --git a/audio/sidplay2/files/patch-src_audio_oss_audiodrv.h b/audio/sidplay2/files/patch-src_audio_oss_audiodrv.h
index a28ff35d2cfd..9534173d6cc0 100644
--- a/audio/sidplay2/files/patch-src_audio_oss_audiodrv.h
+++ b/audio/sidplay2/files/patch-src_audio_oss_audiodrv.h
@@ -1,5 +1,5 @@
---- src/audio/oss/audiodrv.h.orig Fri Jun 9 13:55:40 2006
-+++ src/audio/oss/audiodrv.h Fri Jun 9 13:56:03 2006
+--- src/audio/oss/audiodrv.h.orig 2001-10-30 23:35:35 UTC
++++ src/audio/oss/audiodrv.h
@@ -57,15 +57,7 @@
#include <stdio.h>
#include <unistd.h>
diff --git a/audio/smasher/files/patch-src__replace.cpp b/audio/smasher/files/patch-src__replace.cpp
deleted file mode 100644
index f7f47ca69d14..000000000000
--- a/audio/smasher/files/patch-src__replace.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
---- ./src/replace.cpp.orig 2014-01-20 16:50:27.000000000 -0200
-+++ ./src/replace.cpp 2014-01-20 16:50:38.000000000 -0200
-@@ -1,4 +1,5 @@
- #include <cstring>
-+#include <cstdio>
- #include "replace.h"
-
- int Replace::run (
diff --git a/audio/smasher/files/patch-src_replace.cpp b/audio/smasher/files/patch-src_replace.cpp
new file mode 100644
index 000000000000..5f9c5b3b9f88
--- /dev/null
+++ b/audio/smasher/files/patch-src_replace.cpp
@@ -0,0 +1,9 @@
+--- src/replace.cpp.orig 2010-06-02 19:10:54 UTC
++++ src/replace.cpp
+@@ -1,5 +1,6 @@
+ #include <cstdio>
+ #include <cstring>
++#include <cstdio>
+ #include "replace.h"
+
+ int Replace::run (
diff --git a/audio/snack/Makefile b/audio/snack/Makefile
index 29c9593f0dc2..5349ba3b969b 100644
--- a/audio/snack/Makefile
+++ b/audio/snack/Makefile
@@ -18,7 +18,8 @@ USES= tk:tea
USE_LDCONFIG= ${PREFIX}/lib/snack${PORTVERSION:R}
MAKE_ENV= prefix=${PREFIX} exec_prefix=${PREFIX}
-WRKSRC= ${WRKDIR}/${DISTNAME}/unix
+WRKSRC_SUBDIR= unix
+PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
PLIST_SUB= SNACK_VER=${PORTVERSION:R}
PORTDOCS= *
diff --git a/audio/snack/files/patch-configure b/audio/snack/files/patch-configure
deleted file mode 100644
index 153d3c0c30a6..000000000000
--- a/audio/snack/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2005-12-14 11:29:39 UTC
-+++ configure
-@@ -1487,7 +1487,7 @@ if test "$TCL_SHARED_BUILD" = 0; then
- echo "$as_me: error: Tcl and Tk must be configured with the --enable-shared flag" >&2;}
- { (exit 1); exit 1; }; }
- fi
--CFLAGS=$TCL_SHLIB_CFLAGS
-+CFLAGS="$CFLAGS $TCL_SHLIB_CFLAGS"
- LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
- SHLIB_LD=$TCL_SHLIB_LD
- SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
diff --git a/audio/snack/files/patch-generic-jkFormatMP3.c b/audio/snack/files/patch-generic-jkFormatMP3.c
deleted file mode 100644
index 7f509dac31c7..000000000000
--- a/audio/snack/files/patch-generic-jkFormatMP3.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- ../generic/jkFormatMP3.c.orig 2005-12-14 11:29:38 UTC
-+++ ../generic/jkFormatMP3.c
-@@ -31,7 +31,6 @@ must retain this copyright notice.
- #include <string.h>
- #define FRAS2(is,a) ((is) > 0 ? t_43[(is)]*(a):-t_43[-(is)]*(a))
- #define MAXFRAMESIZE 2106 /* frame size starting at header */
--#define roundf(x) (floor((x)+(float )0.5f))
- static char *gblOutputbuf;
- static char *gblReadbuf;
- static int gblBufind = 0;
-@@ -1311,6 +1310,7 @@ huffman_decode(int tbl,int *x,int *y)
-
- #include <math.h>
-
-+#define roundf(x) (floor((x)+(float )0.5f))
- #define PI12 0.261799387f
- #define PI36 0.087266462f
- #define COSPI3 0.500000000f
diff --git a/audio/snack/files/patch-generic_jkFormatMP3.c b/audio/snack/files/patch-generic_jkFormatMP3.c
new file mode 100644
index 000000000000..48d7c79966ff
--- /dev/null
+++ b/audio/snack/files/patch-generic_jkFormatMP3.c
@@ -0,0 +1,18 @@
+--- generic/jkFormatMP3.c.orig 2005-12-14 11:29:38 UTC
++++ generic/jkFormatMP3.c
+@@ -31,7 +31,6 @@ must retain this copyright notice.
+ #include <string.h>
+ #define FRAS2(is,a) ((is) > 0 ? t_43[(is)]*(a):-t_43[-(is)]*(a))
+ #define MAXFRAMESIZE 2106 /* frame size starting at header */
+-#define roundf(x) (floor((x)+(float )0.5f))
+ static char *gblOutputbuf;
+ static char *gblReadbuf;
+ static int gblBufind = 0;
+@@ -1311,6 +1310,7 @@ huffman_decode(int tbl,int *x,int *y)
+
+ #include <math.h>
+
++#define roundf(x) (floor((x)+(float )0.5f))
+ #define PI12 0.261799387f
+ #define PI36 0.087266462f
+ #define COSPI3 0.500000000f
diff --git a/audio/snack/files/patch-unix_configure b/audio/snack/files/patch-unix_configure
new file mode 100644
index 000000000000..0cb4ac67d334
--- /dev/null
+++ b/audio/snack/files/patch-unix_configure
@@ -0,0 +1,11 @@
+--- unix/configure.orig 2005-12-14 11:29:39 UTC
++++ unix/configure
+@@ -1487,7 +1487,7 @@ if test "$TCL_SHARED_BUILD" = 0; then
+ echo "$as_me: error: Tcl and Tk must be configured with the --enable-shared flag" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+-CFLAGS=$TCL_SHLIB_CFLAGS
++CFLAGS="$CFLAGS $TCL_SHLIB_CFLAGS"
+ LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
+ SHLIB_LD=$TCL_SHLIB_LD
+ SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
diff --git a/audio/sonata/files/patch-setup.py b/audio/sonata/files/patch-setup.py
index 7ea789273323..9ffe987c4206 100644
--- a/audio/sonata/files/patch-setup.py
+++ b/audio/sonata/files/patch-setup.py
@@ -1,6 +1,6 @@
---- setup.py 2009-03-18 03:23:09.000000000 +0100
-+++ setup.py.port 2009-05-30 22:04:54.000000000 +0200
-@@ -54,6 +54,38 @@
+--- setup.py.orig 2009-09-21 21:02:16 UTC
++++ setup.py
+@@ -54,6 +54,38 @@ VERSION = %r
""" % sonata.svnversion.VERSION)
versionfile.close()
@@ -37,9 +37,9 @@
+ port_data_files.append(('man/man1', ['sonata.1']))
+
setup(name='Sonata',
- version=sonata.svnversion.VERSION,
+ version="1.6.2.1",
description='GTK+ client for the Music Player Daemon (MPD).',
-@@ -77,34 +109,7 @@
+@@ -77,34 +109,7 @@ setup(name='Sonata',
extra_link_args=capture("pkg-config --libs gtk+-2.0 pygtk-2.0").split()
),],
scripts = ['sonata/sonata'],
diff --git a/audio/sonata/files/patch-sonata.py b/audio/sonata/files/patch-sonata.py
index 751d80e0214d..501ab20be292 100644
--- a/audio/sonata/files/patch-sonata.py
+++ b/audio/sonata/files/patch-sonata.py
@@ -1,6 +1,6 @@
---- ./sonata.py.orig 2012-07-17 15:55:43.000000000 +0200
-+++ ./sonata.py 2012-07-17 15:56:48.000000000 +0200
-@@ -59,6 +59,8 @@
+--- sonata.py.orig 2009-09-21 21:02:16 UTC
++++ sonata.py
+@@ -59,6 +59,8 @@ except ImportError:
# https://bugs.launchpad.net/ubuntu/+source/zsi/+bug/208855
sys.path.append('/usr/lib/python2.5/site-packages/oldxml')
diff --git a/audio/sonata/files/patch-sonata_main.py b/audio/sonata/files/patch-sonata_main.py
index f26e1e0d75ac..6a280b09e274 100644
--- a/audio/sonata/files/patch-sonata_main.py
+++ b/audio/sonata/files/patch-sonata_main.py
@@ -1,6 +1,6 @@
---- sonata/main.py.orig 2009-09-21 23:02:16.000000000 +0200
-+++ sonata/main.py 2013-12-21 09:55:28.000000000 +0100
-@@ -989,13 +989,14 @@
+--- sonata/main.py.orig 2009-09-21 21:02:16 UTC
++++ sonata/main.py
+@@ -989,13 +989,14 @@ class Base(object):
self.repeatmenu.set_active(self.status['repeat'] == '1')
if not self.last_random or self.last_random != self.status['random']:
self.randommenu.set_active(self.status['random'] == '1')
@@ -22,7 +22,7 @@
self.last_repeat = self.status['repeat']
self.last_random = self.status['random']
return
-@@ -3400,4 +3401,7 @@
+@@ -3400,4 +3401,7 @@ class Base(object):
self.on_currsong_notify(force_popup=True)
def main(self):
diff --git a/audio/sooperlooper/files/patch-libs-pbd-ftw.cc b/audio/sooperlooper/files/patch-libs-pbd-ftw.cc
deleted file mode 100644
index fc00fc0d3882..000000000000
--- a/audio/sooperlooper/files/patch-libs-pbd-ftw.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- libs/pbd/ftw.cc-dist 2012-01-08 20:15:45.901151819 +0100
-+++ libs/pbd/ftw.cc 2012-01-08 20:15:58.904148109 +0100
-@@ -33,7 +33,7 @@
- #include <sys/types.h> /* Because fts(3) says so */
- #include <sys/stat.h>
- #include <fts.h>
--#include <alloca.h>
-+#include <cstdlib>
-
- #include <unistd.h> /* We want strcpy */
-
diff --git a/audio/sooperlooper/files/patch-libs__pbd__pathscanner.cpp b/audio/sooperlooper/files/patch-libs__pbd__pathscanner.cpp
deleted file mode 100644
index d1b942423bc5..000000000000
--- a/audio/sooperlooper/files/patch-libs__pbd__pathscanner.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- libs/pbd/pathscanner.cc.orig
-+++ libs/pbd/pathscanner.cc
-@@ -21,6 +21,7 @@
- #include <cstdlib>
- #include <cstdio>
- #include <cstring>
-+#include <climits>
- #include <vector>
- #include <dirent.h>
-
diff --git a/audio/sooperlooper/files/patch-libs_pbd_ftw.cc b/audio/sooperlooper/files/patch-libs_pbd_ftw.cc
new file mode 100644
index 000000000000..765396c9905d
--- /dev/null
+++ b/audio/sooperlooper/files/patch-libs_pbd_ftw.cc
@@ -0,0 +1,11 @@
+--- libs/pbd/ftw.cc.orig 2012-05-15 13:18:56 UTC
++++ libs/pbd/ftw.cc
+@@ -33,7 +33,7 @@
+ #include <sys/types.h> /* Because fts(3) says so */
+ #include <sys/stat.h>
+ #include <fts.h>
+-#include <alloca.h>
++#include <cstdlib>
+
+ #include <unistd.h> /* We want strcpy */
+
diff --git a/audio/sooperlooper/files/patch-libs_pbd_pathscanner.cc b/audio/sooperlooper/files/patch-libs_pbd_pathscanner.cc
new file mode 100644
index 000000000000..34fba65589aa
--- /dev/null
+++ b/audio/sooperlooper/files/patch-libs_pbd_pathscanner.cc
@@ -0,0 +1,10 @@
+--- libs/pbd/pathscanner.cc.orig 2012-05-15 13:18:56 UTC
++++ libs/pbd/pathscanner.cc
+@@ -21,6 +21,7 @@
+ #include <cstdlib>
+ #include <cstdio>
+ #include <cstring>
++#include <climits>
+ #include <vector>
+ #include <dirent.h>
+
diff --git a/audio/sound-juicer/files/patch-libjuicer_sj-metadata-musicbrainz5.c b/audio/sound-juicer/files/patch-libjuicer_sj-metadata-musicbrainz5.c
index 2f759c4e9f09..8a34a2cfa9e3 100644
--- a/audio/sound-juicer/files/patch-libjuicer_sj-metadata-musicbrainz5.c
+++ b/audio/sound-juicer/files/patch-libjuicer_sj-metadata-musicbrainz5.c
@@ -1,6 +1,6 @@
---- libjuicer/sj-metadata-musicbrainz5.c.orig 2015-08-17 21:51:58.000000000 +0200
-+++ libjuicer/sj-metadata-musicbrainz5.c 2015-08-17 21:52:28.000000000 +0200
-@@ -757,7 +757,7 @@
+--- libjuicer/sj-metadata-musicbrainz5.c.orig 2015-11-16 10:34:34 UTC
++++ libjuicer/sj-metadata-musicbrainz5.c
+@@ -757,7 +757,7 @@ fill_tracks_from_medium (SjMetadataMusic
if (*error != NULL) {
track_details_free (track);
g_list_free_full (tracks, (GDestroyNotify) track_details_free);
diff --git a/audio/soundtracker/files/patch-app_Makefile.in b/audio/soundtracker/files/patch-app_Makefile.in
new file mode 100644
index 000000000000..eb4eda7e9c13
--- /dev/null
+++ b/audio/soundtracker/files/patch-app_Makefile.in
@@ -0,0 +1,15 @@
+--- app/Makefile.in.orig 2006-02-25 13:37:15 UTC
++++ app/Makefile.in
+@@ -235,9 +235,9 @@ soundtracker_LDADD = drivers/libdrivers.
+
+ stdir = $(datadir)/soundtracker
+
+-#INCLUDES = -DDATADIR=\"$(stdir)\" \
+-# -DLOCALEDIR=\"$(datadir)/locale\"
+-INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
++INCLUDES = -DDATADIR=\"$(stdir)\" \
++ -DLOCALEDIR=\"$(datadir)/locale\"
++#INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
+ subdir = app
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/audio/soundtracker/files/patch-app__Makefile.in b/audio/soundtracker/files/patch-app__Makefile.in
deleted file mode 100644
index b77dd5b8b80a..000000000000
--- a/audio/soundtracker/files/patch-app__Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
---- app/Makefile.in.orig Mon Jan 12 01:21:51 2004
-+++ app/Makefile.in Thu Jan 29 19:28:09 2004
-@@ -230,9 +230,9 @@
-
- stdir = $(datadir)/soundtracker
-
--#INCLUDES = -DDATADIR=\"$(stdir)\" \
--# -DLOCALEDIR=\"$(datadir)/locale\"
--INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
-+INCLUDES = -DDATADIR=\"$(stdir)\" \
-+ -DLOCALEDIR=\"$(datadir)/locale\"
-+#INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
- subdir = app
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
- CONFIG_HEADER = $(top_builddir)/config.h
diff --git a/audio/soundtracker/files/patch-app__sample-editor.c b/audio/soundtracker/files/patch-app__sample-editor.c
deleted file mode 100644
index 6db65ed09d6b..000000000000
--- a/audio/soundtracker/files/patch-app__sample-editor.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- app/sample-editor.c.orig Sat Feb 25 21:26:05 2006
-+++ app/sample-editor.c Sun Feb 26 13:05:51 2006
-@@ -2647,13 +2647,15 @@
- static void
- sample_editor_crop()
- {
-- int start = sampledisplay->sel_start, end = sampledisplay->sel_end;
-+ int start, end, l;
-+
-+ start = sampledisplay->sel_start, end = sampledisplay->sel_end;
-
- if(current_sample == NULL || start == -1)
- return;
--
-- int l = current_sample->sample.length;
-
-+ l = current_sample->sample.length;
-+
- sample_editor_lock_sample();
- sample_editor_delete(current_sample, 0, start);
- sample_editor_delete(current_sample, end - start, l - start);
diff --git a/audio/soundtracker/files/patch-app__tracer.c b/audio/soundtracker/files/patch-app__tracer.c
deleted file mode 100644
index 393c41bc9cf4..000000000000
--- a/audio/soundtracker/files/patch-app__tracer.c
+++ /dev/null
@@ -1,41 +0,0 @@
---- app/tracer.c.orig Sat Feb 25 21:30:54 2006
-+++ app/tracer.c Sun Feb 26 13:14:18 2006
-@@ -361,15 +361,19 @@
- void
- tracer_trace (int mixfreq, int songpos, int patpos)
- {
-+ st_mixer *real_mixer;
-+ int stopsongpos, stoppatpos;
-+ double rest, previous;
-+
- /* Attemp to take pitchband into account */
- /* Test if tempo and BPM are traced */
-- st_mixer *real_mixer = mixer;
-+ real_mixer = mixer;
- mixer = &mixer_tracer;
-
-- int stopsongpos = songpos;
-- int stoppatpos = patpos;
-+ stopsongpos = songpos;
-+ stoppatpos = patpos;
-
-- double rest = 0, previous = 0; /* Fractional part of the samples */
-+ rest = 0, previous = 0; /* Fractional part of the samples */
-
- if((stoppatpos -= 1) < 0){
- stopsongpos -= 1;
-@@ -381,12 +385,13 @@
-
- while(1) {
- double t;
-+ guint32 samples;
-
- double current = xmplayer_play();
- t = current - previous + rest;
- previous = current;
-
-- guint32 samples = t * mixfreq;
-+ samples = t * mixfreq;
- rest = t - (double)samples / (double)mixfreq;
-
- tracer_mix(NULL, samples, NULL, 0);
diff --git a/audio/soundtracker/files/patch-app__track-editor.c b/audio/soundtracker/files/patch-app__track-editor.c
deleted file mode 100644
index c2f5ed22afd7..000000000000
--- a/audio/soundtracker/files/patch-app__track-editor.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- app/track-editor.c.orig Sat Feb 25 21:30:54 2006
-+++ app/track-editor.c Sun Feb 26 13:08:32 2006
-@@ -603,6 +603,8 @@
- }
-
- if(!GUI_ENABLED && !ASYNCEDIT) { // Recording mode
-+ XMNote *note;
-+
- if(pressed){ // Insert note
-
- for(c = 0; c < 32; c++){ // Cleanup
-@@ -624,7 +626,7 @@
- reckey[c].chn = t->cursor_ch;
- reckey[c].act = TRUE;
-
-- XMNote *note = &t->curpattern->channels[t->cursor_ch][t->patpos];
-+ note = &t->curpattern->channels[t->cursor_ch][t->patpos];
- note->note = i;
- note->instrument = gui_get_current_instrument();
- tracker_redraw_current_row(t);
-@@ -645,7 +647,7 @@
- if (!insert_noteoff)
- goto fin_note;
-
-- XMNote *note = &t->curpattern->channels[reckey[c].chn][t->patpos];
-+ note = &t->curpattern->channels[reckey[c].chn][t->patpos];
- note->note = 97;
- note->instrument = 0;
- tracker_redraw_current_row(t);
diff --git a/audio/soundtracker/files/patch-app_sample-editor.c b/audio/soundtracker/files/patch-app_sample-editor.c
new file mode 100644
index 000000000000..e9b88632689e
--- /dev/null
+++ b/audio/soundtracker/files/patch-app_sample-editor.c
@@ -0,0 +1,21 @@
+--- app/sample-editor.c.orig 2006-02-25 12:26:05 UTC
++++ app/sample-editor.c
+@@ -2647,13 +2647,15 @@ sample_editor_trim(gboolean trbeg, gbool
+ static void
+ sample_editor_crop()
+ {
+- int start = sampledisplay->sel_start, end = sampledisplay->sel_end;
++ int start, end, l;
++
++ start = sampledisplay->sel_start, end = sampledisplay->sel_end;
+
+ if(current_sample == NULL || start == -1)
+ return;
+-
+- int l = current_sample->sample.length;
+
++ l = current_sample->sample.length;
++
+ sample_editor_lock_sample();
+ sample_editor_delete(current_sample, 0, start);
+ sample_editor_delete(current_sample, end - start, l - start);
diff --git a/audio/soundtracker/files/patch-app_tracer.c b/audio/soundtracker/files/patch-app_tracer.c
new file mode 100644
index 000000000000..8b137b394461
--- /dev/null
+++ b/audio/soundtracker/files/patch-app_tracer.c
@@ -0,0 +1,41 @@
+--- app/tracer.c.orig 2006-02-25 12:30:54 UTC
++++ app/tracer.c
+@@ -361,15 +361,19 @@ static st_mixer mixer_tracer = {
+ void
+ tracer_trace (int mixfreq, int songpos, int patpos)
+ {
++ st_mixer *real_mixer;
++ int stopsongpos, stoppatpos;
++ double rest, previous;
++
+ /* Attemp to take pitchband into account */
+ /* Test if tempo and BPM are traced */
+- st_mixer *real_mixer = mixer;
++ real_mixer = mixer;
+ mixer = &mixer_tracer;
+
+- int stopsongpos = songpos;
+- int stoppatpos = patpos;
++ stopsongpos = songpos;
++ stoppatpos = patpos;
+
+- double rest = 0, previous = 0; /* Fractional part of the samples */
++ rest = 0, previous = 0; /* Fractional part of the samples */
+
+ if((stoppatpos -= 1) < 0){
+ stopsongpos -= 1;
+@@ -381,12 +385,13 @@ tracer_trace (int mixfreq, int songpos,
+
+ while(1) {
+ double t;
++ guint32 samples;
+
+ double current = xmplayer_play();
+ t = current - previous + rest;
+ previous = current;
+
+- guint32 samples = t * mixfreq;
++ samples = t * mixfreq;
+ rest = t - (double)samples / (double)mixfreq;
+
+ tracer_mix(NULL, samples, NULL, 0);
diff --git a/audio/soundtracker/files/patch-app_track-editor.c b/audio/soundtracker/files/patch-app_track-editor.c
new file mode 100644
index 000000000000..8629e74e545e
--- /dev/null
+++ b/audio/soundtracker/files/patch-app_track-editor.c
@@ -0,0 +1,29 @@
+--- app/track-editor.c.orig 2006-02-25 12:30:54 UTC
++++ app/track-editor.c
+@@ -603,6 +603,8 @@ track_editor_handle_keys (int shift,
+ }
+
+ if(!GUI_ENABLED && !ASYNCEDIT) { // Recording mode
++ XMNote *note;
++
+ if(pressed){ // Insert note
+
+ for(c = 0; c < 32; c++){ // Cleanup
+@@ -624,7 +626,7 @@ track_editor_handle_keys (int shift,
+ reckey[c].chn = t->cursor_ch;
+ reckey[c].act = TRUE;
+
+- XMNote *note = &t->curpattern->channels[t->cursor_ch][t->patpos];
++ note = &t->curpattern->channels[t->cursor_ch][t->patpos];
+ note->note = i;
+ note->instrument = gui_get_current_instrument();
+ tracker_redraw_current_row(t);
+@@ -645,7 +647,7 @@ track_editor_handle_keys (int shift,
+ if (!insert_noteoff)
+ goto fin_note;
+
+- XMNote *note = &t->curpattern->channels[reckey[c].chn][t->patpos];
++ note = &t->curpattern->channels[reckey[c].chn][t->patpos];
+ note->note = 97;
+ note->instrument = 0;
+ tracker_redraw_current_row(t);
diff --git a/audio/soundtracker/files/patch-po__ja.po b/audio/soundtracker/files/patch-po__ja.po
deleted file mode 100644
index 360d66a7d0fc..000000000000
--- a/audio/soundtracker/files/patch-po__ja.po
+++ /dev/null
@@ -1,65 +0,0 @@
---- po/ja.po.orig Sat Feb 25 22:25:08 2006
-+++ po/ja.po Sun Feb 26 13:55:01 2006
-@@ -2,14 +2,14 @@
- # Copyright (C) 1998-2000 Michael Krause <m.krause@tu-harburg.de>.
- # Translators: Atsushi Yamagata <yamagata@plathome.co.jp>, 1999, 2000.
- # Yuuki NINOMIYA <gm@smn.enjoy.ne.jp>, 1999, 2000.
--# Junichi Uekawa <dancer@debian.org>, 2002, 2003.
-+# Junichi Uekawa <dancer@debian.org>, 2002, 2003, 2004.
- #
- msgid ""
- msgstr ""
- "Project-Id-Version: SoundTracker 0.3.10\n"
- "Report-Msgid-Bugs-To: soundtracker-discuss@soundtracker.org\n"
- "POT-Creation-Date: 2006-02-25 14:25+0100\n"
--"PO-Revision-Date: 2003-08-05 06:54+0900\n"
-+"PO-Revision-Date: 2004-01-12 12:13+0900\n"
- "Last-Translator: Junichi Uekawa <dancer@debian.org>\n"
- "Language-Team: Debian Japanese project <debian-japanese@lists.debian.org>\n"
- "MIME-Version: 1.0\n"
-@@ -553,6 +553,8 @@
- "Odd pattern rows contain data which will be lost after shrinking.\n"
- "Do you want to continue anyway?"
- msgstr ""
-+"´ñ¿ô¤Î¥Ñ¥¿¡¼¥ó¤ÎÎó¤Ï½Ì¾®¤¹¤ë¤È¼º¤ï¤ì¤Þ¤¹¡¥\n"
-+"³¹Ô¤·¤Þ¤¹¤«¡©"
-
- #: app/gui.c:506
- msgid ""
-@@ -560,6 +562,8 @@
- "Some data at the end of the pattern will be lost.\n"
- "Do you want to continue anyway?"
- msgstr ""
-+"³ÈÄ¥¤¹¤ë¤Ë¤Ï¥Ñ¥¿¡¼¥ó¤ÏŤ¹¤®¤Þ¤¹¡¥\n"
-+"¥Ñ¥¿¡¼¥ó¤ÎºÇ¸å¤Î¥Ç¡¼¥¿¤¬°ìÉô¼º¤ï¤ì¤ë»ö¤Ë¤Ê¤ê¤Þ¤¹¡¥Â³¹Ô¤·¤Þ¤¹¤«¡©"
-
- #: app/gui.c:555 app/instrument-editor.c:212 app/sample-editor.c:1719
- #: app/sample-editor.c:1915 app/sample-editor.c:1959
-@@ -1034,9 +1038,8 @@
- msgstr "¥ª¥¯¥¿¡¼¥Ö²¼¤²¤ë"
-
- #: app/menubar.c:526
--#, fuzzy
- msgid "P_aste"
--msgstr "ŽÉÕ"
-+msgstr "ŽÉÕ(_a)"
-
- #: app/menubar.c:531
- msgid "_Jazz Edit Mode"
-@@ -1087,14 +1090,12 @@
- msgstr "¥Ñ¥¿¡¼¥ó¤òÆɤ߹þ¤ß(_o)"
-
- #: app/menubar.c:599
--#, fuzzy
- msgid "Sh_rink Current Pattern"
--msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó"
-+msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó¤ò½Ì¾®(_r)"
-
- #: app/menubar.c:601
--#, fuzzy
- msgid "_Expand Current Pattern"
--msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó¤òÊݸ(_S)"
-+msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó¤ò³ÈÄ¥(_E)"
-
- #: app/menubar.c:608
- msgid "_Toggle Current Channel Permanentness"
diff --git a/audio/soundtracker/files/patch-po_ja.po b/audio/soundtracker/files/patch-po_ja.po
new file mode 100644
index 000000000000..b3f136d17c28
--- /dev/null
+++ b/audio/soundtracker/files/patch-po_ja.po
@@ -0,0 +1,65 @@
+--- po/ja.po.orig 2006-02-25 13:25:08 UTC
++++ po/ja.po
+@@ -2,14 +2,14 @@
+ # Copyright (C) 1998-2000 Michael Krause <m.krause@tu-harburg.de>.
+ # Translators: Atsushi Yamagata <yamagata@plathome.co.jp>, 1999, 2000.
+ # Yuuki NINOMIYA <gm@smn.enjoy.ne.jp>, 1999, 2000.
+-# Junichi Uekawa <dancer@debian.org>, 2002, 2003.
++# Junichi Uekawa <dancer@debian.org>, 2002, 2003, 2004.
+ #
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: SoundTracker 0.3.10\n"
+ "Report-Msgid-Bugs-To: soundtracker-discuss@soundtracker.org\n"
+ "POT-Creation-Date: 2006-02-25 14:25+0100\n"
+-"PO-Revision-Date: 2003-08-05 06:54+0900\n"
++"PO-Revision-Date: 2004-01-12 12:13+0900\n"
+ "Last-Translator: Junichi Uekawa <dancer@debian.org>\n"
+ "Language-Team: Debian Japanese project <debian-japanese@lists.debian.org>\n"
+ "MIME-Version: 1.0\n"
+@@ -553,6 +553,8 @@ msgid ""
+ "Odd pattern rows contain data which will be lost after shrinking.\n"
+ "Do you want to continue anyway?"
+ msgstr ""
++"´ñ¿ô¤Î¥Ñ¥¿¡¼¥ó¤ÎÎó¤Ï½Ì¾®¤¹¤ë¤È¼º¤ï¤ì¤Þ¤¹¡¥\n"
++"³¹Ô¤·¤Þ¤¹¤«¡©"
+
+ #: app/gui.c:506
+ msgid ""
+@@ -560,6 +562,8 @@ msgid ""
+ "Some data at the end of the pattern will be lost.\n"
+ "Do you want to continue anyway?"
+ msgstr ""
++"³ÈÄ¥¤¹¤ë¤Ë¤Ï¥Ñ¥¿¡¼¥ó¤ÏŤ¹¤®¤Þ¤¹¡¥\n"
++"¥Ñ¥¿¡¼¥ó¤ÎºÇ¸å¤Î¥Ç¡¼¥¿¤¬°ìÉô¼º¤ï¤ì¤ë»ö¤Ë¤Ê¤ê¤Þ¤¹¡¥Â³¹Ô¤·¤Þ¤¹¤«¡©"
+
+ #: app/gui.c:555 app/instrument-editor.c:212 app/sample-editor.c:1719
+ #: app/sample-editor.c:1915 app/sample-editor.c:1959
+@@ -1034,9 +1038,8 @@ msgid "Transpose octave down"
+ msgstr "¥ª¥¯¥¿¡¼¥Ö²¼¤²¤ë"
+
+ #: app/menubar.c:526
+-#, fuzzy
+ msgid "P_aste"
+-msgstr "ŽÉÕ"
++msgstr "ŽÉÕ(_a)"
+
+ #: app/menubar.c:531
+ msgid "_Jazz Edit Mode"
+@@ -1087,14 +1090,12 @@ msgid "L_oad Pattern"
+ msgstr "¥Ñ¥¿¡¼¥ó¤òÆɤ߹þ¤ß(_o)"
+
+ #: app/menubar.c:599
+-#, fuzzy
+ msgid "Sh_rink Current Pattern"
+-msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó"
++msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó¤ò½Ì¾®(_r)"
+
+ #: app/menubar.c:601
+-#, fuzzy
+ msgid "_Expand Current Pattern"
+-msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó¤òÊݸ(_S)"
++msgstr "¸½ºß¤Î¥Ñ¥¿¡¼¥ó¤ò³ÈÄ¥(_E)"
+
+ #: app/menubar.c:608
+ msgid "_Toggle Current Channel Permanentness"
diff --git a/audio/specimen/files/patch-configure b/audio/specimen/files/patch-configure
index 62ab2a4fd4bc..122ae6dcce4b 100644
--- a/audio/specimen/files/patch-configure
+++ b/audio/specimen/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Tue Feb 6 23:13:49 2007
-+++ configure Tue Mar 6 13:02:40 2007
-@@ -6276,6 +6276,7 @@
+--- configure.orig 2007-03-12 22:23:06 UTC
++++ configure
+@@ -6465,6 +6465,7 @@ CC="$PTHREAD_CC"
# print build summary
diff --git a/audio/specimen/files/patch-src-Makefile.in b/audio/specimen/files/patch-src-Makefile.in
deleted file mode 100644
index b02eb27ce7a6..000000000000
--- a/audio/specimen/files/patch-src-Makefile.in
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/Makefile.in.orig Mon Mar 12 23:23:06 2007
-+++ src/Makefile.in Tue May 22 20:42:01 2007
-@@ -58,9 +58,9 @@
- ticks.c ticks.h adsr.c adsr.h lfo.c lfo.h sync.c sync.h \
- control.h lashdriver.c lashdriver.h
- @HAVE_LASH_TRUE@am__objects_1 = lashdriver.$(OBJEXT)
--am_specimen_OBJECTS = alsadriver.$(OBJEXT) jackdriver.$(OBJEXT) \
-+am_specimen_OBJECTS = jackdriver.$(OBJEXT) \
- mixer.$(OBJEXT) sample.$(OBJEXT) driver.$(OBJEXT) \
-- midi.$(OBJEXT) patch.$(OBJEXT) specimen.$(OBJEXT) \
-+ patch.$(OBJEXT) specimen.$(OBJEXT) \
- beef.$(OBJEXT) maths.$(OBJEXT) ticks.$(OBJEXT) adsr.$(OBJEXT) \
- lfo.$(OBJEXT) sync.$(OBJEXT) $(am__objects_1)
- specimen_OBJECTS = $(am_specimen_OBJECTS)
-@@ -314,14 +314,12 @@
- -rm -f *.tab.c
-
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adsr.Po@am__quote@
--@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsadriver.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beef.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jackdriver.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lashdriver.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfo.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maths.Po@am__quote@
--@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midi.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mixer.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patch.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample.Po@am__quote@
diff --git a/audio/specimen/files/patch-src-driver.c b/audio/specimen/files/patch-src-driver.c
deleted file mode 100644
index e33df591f271..000000000000
--- a/audio/specimen/files/patch-src-driver.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/driver.c.orig Tue Mar 6 13:09:22 2007
-+++ src/driver.c Tue Mar 6 13:09:35 2007
-@@ -7,8 +7,7 @@
-
- /* available drivers */
- extern Driver jack_driver;
--extern Driver alsa_driver;
--static Driver* drivers[] = { &jack_driver, &alsa_driver, NULL };
-+static Driver* drivers[] = { &jack_driver, NULL };
-
- /* number of drivers available (we set this var in driver_init ( ) */
- static int ndrivers = 0;
diff --git a/audio/specimen/files/patch-src-jackdriver.c b/audio/specimen/files/patch-src-jackdriver.c
deleted file mode 100644
index 289e7750ce61..000000000000
--- a/audio/specimen/files/patch-src-jackdriver.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/jackdriver.c.orig 2008-07-23 13:54:34.000000000 +0200
-+++ src/jackdriver.c 2008-07-23 13:54:49.000000000 +0200
-@@ -81,7 +81,7 @@
- jack_midi_event_t jack_midi_event;
- jack_nframes_t event_index = 0;
- #ifdef HAVE_JACK_MIDI
-- jack_nframes_t event_count = jack_midi_get_event_count(midi_buf, frames);
-+ jack_nframes_t event_count = jack_midi_get_event_count(midi_buf);
- #endif /* HAVE_JACK_MIDI */
- #ifdef HAVE_OLD_JACK_MIDI
- jack_nframes_t event_count = jack_midi_port_get_info(midi_buf, frames)->event_count;
-@@ -123,7 +123,7 @@
- /* send the JACK MIDI events to the mixer */
- while (event_index < event_count) {
-
-- jack_midi_event_get(&jack_midi_event, midi_buf,event_index, frames);
-+ jack_midi_event_get(&jack_midi_event, midi_buf,event_index);
- midi_data = jack_midi_event.buffer;
-
- /* TODO: handle 14-bit controllers and RPNs and NRPNs */
diff --git a/audio/specimen/files/patch-src-specimen.c b/audio/specimen/files/patch-src-specimen.c
deleted file mode 100644
index 8ef2e5729e43..000000000000
--- a/audio/specimen/files/patch-src-specimen.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/specimen.c.orig Mon Mar 12 01:32:12 2007
-+++ src/specimen.c Tue May 22 20:43:41 2007
-@@ -73,7 +73,6 @@
- }
-
- /* start */
-- midi_start();
- driver_start(0, client_name);
- #ifdef HAVE_LASH
- lashdriver_start();
-@@ -81,7 +80,6 @@
- gtk_main();
-
- /* stop */
-- midi_stop();
- driver_stop();
-
- /* destructors */
diff --git a/audio/specimen/files/patch-src_Makefile.in b/audio/specimen/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..ccd3ec520328
--- /dev/null
+++ b/audio/specimen/files/patch-src_Makefile.in
@@ -0,0 +1,29 @@
+--- src/Makefile.in.orig 2007-03-12 22:23:06 UTC
++++ src/Makefile.in
+@@ -58,9 +58,9 @@ am__specimen_SOURCES_DIST = alsadriver.c
+ ticks.c ticks.h adsr.c adsr.h lfo.c lfo.h sync.c sync.h \
+ control.h lashdriver.c lashdriver.h
+ @HAVE_LASH_TRUE@am__objects_1 = lashdriver.$(OBJEXT)
+-am_specimen_OBJECTS = alsadriver.$(OBJEXT) jackdriver.$(OBJEXT) \
++am_specimen_OBJECTS = jackdriver.$(OBJEXT) \
+ mixer.$(OBJEXT) sample.$(OBJEXT) driver.$(OBJEXT) \
+- midi.$(OBJEXT) patch.$(OBJEXT) specimen.$(OBJEXT) \
++ patch.$(OBJEXT) specimen.$(OBJEXT) \
+ beef.$(OBJEXT) maths.$(OBJEXT) ticks.$(OBJEXT) adsr.$(OBJEXT) \
+ lfo.$(OBJEXT) sync.$(OBJEXT) $(am__objects_1)
+ specimen_OBJECTS = $(am_specimen_OBJECTS)
+@@ -314,14 +314,12 @@ distclean-compile:
+ -rm -f *.tab.c
+
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adsr.Po@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsadriver.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beef.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jackdriver.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lashdriver.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfo.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maths.Po@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midi.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mixer.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patch.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample.Po@am__quote@
diff --git a/audio/specimen/files/patch-src_driver.c b/audio/specimen/files/patch-src_driver.c
new file mode 100644
index 000000000000..3d1d04f8d5e4
--- /dev/null
+++ b/audio/specimen/files/patch-src_driver.c
@@ -0,0 +1,12 @@
+--- src/driver.c.orig 2007-01-30 20:58:57 UTC
++++ src/driver.c
+@@ -7,8 +7,7 @@
+
+ /* available drivers */
+ extern Driver jack_driver;
+-extern Driver alsa_driver;
+-static Driver* drivers[] = { &jack_driver, &alsa_driver, NULL };
++static Driver* drivers[] = { &jack_driver, NULL };
+
+ /* number of drivers available (we set this var in driver_init ( ) */
+ static int ndrivers = 0;
diff --git a/audio/specimen/files/patch-src_jackdriver.c b/audio/specimen/files/patch-src_jackdriver.c
new file mode 100644
index 000000000000..6b90b289060c
--- /dev/null
+++ b/audio/specimen/files/patch-src_jackdriver.c
@@ -0,0 +1,20 @@
+--- src/jackdriver.c.orig 2007-03-12 00:32:12 UTC
++++ src/jackdriver.c
+@@ -81,7 +81,7 @@ static int process (jack_nframes_t frame
+ jack_midi_event_t jack_midi_event;
+ jack_nframes_t event_index = 0;
+ #ifdef HAVE_JACK_MIDI
+- jack_nframes_t event_count = jack_midi_get_event_count(midi_buf, frames);
++ jack_nframes_t event_count = jack_midi_get_event_count(midi_buf);
+ #endif /* HAVE_JACK_MIDI */
+ #ifdef HAVE_OLD_JACK_MIDI
+ jack_nframes_t event_count = jack_midi_port_get_info(midi_buf, frames)->event_count;
+@@ -123,7 +123,7 @@ static int process (jack_nframes_t frame
+ /* send the JACK MIDI events to the mixer */
+ while (event_index < event_count) {
+
+- jack_midi_event_get(&jack_midi_event, midi_buf,event_index, frames);
++ jack_midi_event_get(&jack_midi_event, midi_buf,event_index);
+ midi_data = jack_midi_event.buffer;
+
+ /* TODO: handle 14-bit controllers and RPNs and NRPNs */
diff --git a/audio/specimen/files/patch-src_specimen.c b/audio/specimen/files/patch-src_specimen.c
new file mode 100644
index 000000000000..426984ec2d47
--- /dev/null
+++ b/audio/specimen/files/patch-src_specimen.c
@@ -0,0 +1,18 @@
+--- src/specimen.c.orig 2007-03-12 00:32:12 UTC
++++ src/specimen.c
+@@ -73,7 +73,6 @@ int main(int argc, char *argv[])
+ }
+
+ /* start */
+- midi_start();
+ driver_start(0, client_name);
+ #ifdef HAVE_LASH
+ lashdriver_start();
+@@ -81,7 +80,6 @@ int main(int argc, char *argv[])
+ gtk_main();
+
+ /* stop */
+- midi_stop();
+ driver_stop();
+
+ /* destructors */
diff --git a/audio/speexdsp/files/patch-include-speex-speexdsp_config_types.h.in b/audio/speexdsp/files/patch-include_speex_speexdsp__config__types.h.in
index 61944bb31e76..61944bb31e76 100644
--- a/audio/speexdsp/files/patch-include-speex-speexdsp_config_types.h.in
+++ b/audio/speexdsp/files/patch-include_speex_speexdsp__config__types.h.in
diff --git a/audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c b/audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c
index 07f62d27a087..2b47eb0afe2f 100644
--- a/audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c
+++ b/audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c
@@ -1,4 +1,4 @@
---- src/libsphinx2fe/fe_sigproc.c.orig 2016-06-20 13:31:26 UTC
+--- src/libsphinx2fe/fe_sigproc.c.orig 2016-07-26 15:58:05 UTC
+++ src/libsphinx2fe/fe_sigproc.c
@@ -43,7 +43,7 @@
diff --git a/audio/sphinx3/files/patch-src_libs3decoder_libsearch_vithist.c b/audio/sphinx3/files/patch-src_libs3decoder_libsearch_vithist.c
index e3fc3d22e2c6..91bab7a84c25 100644
--- a/audio/sphinx3/files/patch-src_libs3decoder_libsearch_vithist.c
+++ b/audio/sphinx3/files/patch-src_libs3decoder_libsearch_vithist.c
@@ -1,5 +1,5 @@
---- src/libs3decoder/libsearch/vithist.c.orig 2012-12-14 12:01:13.000000000 -0500
-+++ src/libs3decoder/libsearch/vithist.c 2012-12-14 12:00:44.000000000 -0500
+--- src/libs3decoder/libsearch/vithist.c.orig 2008-12-31 18:27:56 UTC
++++ src/libs3decoder/libsearch/vithist.c
@@ -647,7 +647,7 @@ vithist_prune(vithist_t * vh, dict_t * d
{
int32 se, fe, filler_done, th;
diff --git a/audio/spiralloops/files/patch-GUI-OutputGUI.C b/audio/spiralloops/files/patch-GUI_OutputGUI.C
index de4b17a4dc4f..de4b17a4dc4f 100644
--- a/audio/spiralloops/files/patch-GUI-OutputGUI.C
+++ b/audio/spiralloops/files/patch-GUI_OutputGUI.C
diff --git a/audio/spiralloops/files/patch-GUI-ScopeGUI.C b/audio/spiralloops/files/patch-GUI_ScopeGUI.C
index 3dbf6a2e47f0..3dbf6a2e47f0 100644
--- a/audio/spiralloops/files/patch-GUI-ScopeGUI.C
+++ b/audio/spiralloops/files/patch-GUI_ScopeGUI.C
diff --git a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Knob.cxx b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Knob.cxx
index ff53ece651b1..ff53ece651b1 100644
--- a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Knob.cxx
+++ b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Knob.cxx
diff --git a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Loop.C b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Loop.C
index e76be23ef25d..e76be23ef25d 100644
--- a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Loop.C
+++ b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Loop.C
diff --git a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Loop.h b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Loop.h
index b2409524ab5c..b2409524ab5c 100644
--- a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Loop.h
+++ b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Loop.h
diff --git a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Trigger.C b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Trigger.C
index 962301336075..962301336075 100644
--- a/audio/spiralloops/files/patch-GUI-Widgets-Fl_Trigger.C
+++ b/audio/spiralloops/files/patch-GUI_Widgets_Fl__Trigger.C
diff --git a/audio/spiralloops/files/patch-SpiralSound-Output.C b/audio/spiralloops/files/patch-SpiralSound_Output.C
index ad16b8079a05..ad16b8079a05 100644
--- a/audio/spiralloops/files/patch-SpiralSound-Output.C
+++ b/audio/spiralloops/files/patch-SpiralSound_Output.C
diff --git a/audio/spiralloops/files/patch-SpiralSound-RiffWav.C b/audio/spiralloops/files/patch-SpiralSound_RiffWav.C
index c7d8675edd95..c7d8675edd95 100644
--- a/audio/spiralloops/files/patch-SpiralSound-RiffWav.C
+++ b/audio/spiralloops/files/patch-SpiralSound_RiffWav.C
diff --git a/audio/spiralloops/files/patch-SpiralSound-Sample.C b/audio/spiralloops/files/patch-SpiralSound_Sample.C
index 442bb7fccaf7..442bb7fccaf7 100644
--- a/audio/spiralloops/files/patch-SpiralSound-Sample.C
+++ b/audio/spiralloops/files/patch-SpiralSound_Sample.C
diff --git a/audio/spiralloops/files/patch-SpiralSound-Sample.h b/audio/spiralloops/files/patch-SpiralSound_Sample.h
index 0051162e48a4..0051162e48a4 100644
--- a/audio/spiralloops/files/patch-SpiralSound-Sample.h
+++ b/audio/spiralloops/files/patch-SpiralSound_Sample.h
diff --git a/audio/spiralloops/files/patch-SpiralSound-SpiralInfo.C b/audio/spiralloops/files/patch-SpiralSound_SpiralInfo.C
index cc924cd5ba15..cc924cd5ba15 100644
--- a/audio/spiralloops/files/patch-SpiralSound-SpiralInfo.C
+++ b/audio/spiralloops/files/patch-SpiralSound_SpiralInfo.C
diff --git a/audio/spiralloops/files/patch-SpiralSound-SpiralInfo.h b/audio/spiralloops/files/patch-SpiralSound_SpiralInfo.h
index 64ea41d0aa6d..64ea41d0aa6d 100644
--- a/audio/spiralloops/files/patch-SpiralSound-SpiralInfo.h
+++ b/audio/spiralloops/files/patch-SpiralSound_SpiralInfo.h
diff --git a/audio/spiralsynth/files/patch-SpiralSound-RiffWav.C b/audio/spiralsynth/files/patch-SpiralSound_RiffWav.C
index 2213b08a812a..2213b08a812a 100644
--- a/audio/spiralsynth/files/patch-SpiralSound-RiffWav.C
+++ b/audio/spiralsynth/files/patch-SpiralSound_RiffWav.C
diff --git a/audio/spiralsynth/files/patch-SpiralSound-Sequencer.h b/audio/spiralsynth/files/patch-SpiralSound_Sequencer.h
index 8ece3e185586..8ece3e185586 100644
--- a/audio/spiralsynth/files/patch-SpiralSound-Sequencer.h
+++ b/audio/spiralsynth/files/patch-SpiralSound_Sequencer.h
diff --git a/audio/spiralsynthmodular/files/patch-SpiralSound-PluginManager.C b/audio/spiralsynthmodular/files/patch-SpiralSound-PluginManager.C
deleted file mode 100644
index 702073dac679..000000000000
--- a/audio/spiralsynthmodular/files/patch-SpiralSound-PluginManager.C
+++ /dev/null
@@ -1,29 +0,0 @@
---- SpiralSound/PluginManager.C.orig Mon Jan 6 01:17:04 2003
-+++ SpiralSound/PluginManager.C Mon Jan 6 01:17:45 2003
-@@ -48,7 +48,7 @@
- }
-
- // Link the neccesary functions
-- char *error;
-+ const char *error;
-
- NewPlugin->CreateInstance = (SpiralPlugin*(*)()) dlsym(NewPlugin->Handle, "CreateInstance");
-
-@@ -89,7 +89,7 @@
- if (IsValid(ID))
- {
- dlclose(GetPlugin(ID)->Handle);
-- char *error;
-+ const char *error;
- if ((error = dlerror()) != NULL)
- {
- SpiralInfo::Alert("Error unlinking plugin: \n"+string(error));
-@@ -103,7 +103,7 @@
- i!=m_PluginVec.end(); i++)
- {
- dlclose((*i)->Handle);
-- char *error;
-+ const char *error;
- if ((error = dlerror()) != NULL)
- {
- SpiralInfo::Alert("Error unlinking plugin: \n"+string(error));
diff --git a/audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-LADSPAPlugin-LADSPAInfo.h b/audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-LADSPAPlugin-LADSPAInfo.h
deleted file mode 100644
index 17de851b0998..000000000000
--- a/audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-LADSPAPlugin-LADSPAInfo.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.h.orig 2014-02-13 05:56:16.387137838 +0400
-+++ SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.h 2014-02-13 05:57:44.261183646 +0400
-@@ -91,7 +91,7 @@
- unsigned long UniqueID;
- std::string Name;
-
-- bool operator<(const PluginEntry& pe)
-+ bool operator<(const PluginEntry& pe) const
- {
- return (Name<pe.Name);
- }
diff --git a/audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-OutputPlugin-OutputPlugin.C b/audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-OutputPlugin-OutputPlugin.C
deleted file mode 100644
index 7a180c71fd69..000000000000
--- a/audio/spiralsynthmodular/files/patch-SpiralSound-Plugins-OutputPlugin-OutputPlugin.C
+++ /dev/null
@@ -1,19 +0,0 @@
---- SpiralSound/Plugins/OutputPlugin/OutputPlugin.C.orig Thu Dec 12 16:23:11 2002
-+++ SpiralSound/Plugins/OutputPlugin/OutputPlugin.C Tue Jan 7 01:03:15 2003
-@@ -20,6 +20,7 @@
- #define _ISOC9X_SOURCE 1
- #define _ISOC99_SOURCE 1
- #include <math.h>
-+#define lrintf(flt) ((int) (flt))
-
- #include <sys/types.h>
- #include <stdio.h>
-@@ -27,7 +28,7 @@
- #include <unistd.h>
- #include <limits.h>
- #if defined (__FreeBSD__)
-- #include <machine/soundcard.h>
-+ #include <sys/soundcard.h>
- #else
- #if defined (__NetBSD__) || defined (__OpenBSD__)
- #include <soundcard.h> /* OSS emulation */
diff --git a/audio/spiralsynthmodular/files/patch-SpiralSound_PluginManager.C b/audio/spiralsynthmodular/files/patch-SpiralSound_PluginManager.C
new file mode 100644
index 000000000000..00496ebe1139
--- /dev/null
+++ b/audio/spiralsynthmodular/files/patch-SpiralSound_PluginManager.C
@@ -0,0 +1,29 @@
+--- SpiralSound/PluginManager.C.orig 2003-08-08 13:07:30 UTC
++++ SpiralSound/PluginManager.C
+@@ -49,7 +49,7 @@ PluginID PluginManager::LoadPlugin(const
+ }
+
+ // Link the neccesary functions
+- char *error;
++ const char *error;
+
+ NewPlugin->CreateInstance = (SpiralPlugin*(*)()) dlsym(NewPlugin->Handle, "SpiralPlugin_CreateInstance");
+
+@@ -98,7 +98,7 @@ void PluginManager::UnLoadPlugin(PluginI
+ if (IsValid(ID))
+ {
+ dlclose(GetPlugin(ID)->Handle);
+- char *error;
++ const char *error;
+ if ((error = dlerror()) != NULL)
+ {
+ SpiralInfo::Alert("Error unlinking plugin: \n"+string(error));
+@@ -112,7 +112,7 @@ void PluginManager::UnloadAll()
+ i!=m_PluginVec.end(); i++)
+ {
+ dlclose((*i)->Handle);
+- char *error;
++ const char *error;
+ if ((error = dlerror()) != NULL)
+ {
+ SpiralInfo::Alert("Error unlinking plugin: \n"+string(error));
diff --git a/audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_LADSPAPlugin_LADSPAInfo.h b/audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_LADSPAPlugin_LADSPAInfo.h
new file mode 100644
index 000000000000..13fd3a1b8480
--- /dev/null
+++ b/audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_LADSPAPlugin_LADSPAInfo.h
@@ -0,0 +1,11 @@
+--- SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.h.orig 2003-06-05 18:26:42 UTC
++++ SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.h
+@@ -91,7 +91,7 @@ public:
+ unsigned long UniqueID;
+ std::string Name;
+
+- bool operator<(const PluginEntry& pe)
++ bool operator<(const PluginEntry& pe) const
+ {
+ return (Name<pe.Name);
+ }
diff --git a/audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_OutputPlugin_OutputPlugin.C b/audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_OutputPlugin_OutputPlugin.C
new file mode 100644
index 000000000000..492a817892f6
--- /dev/null
+++ b/audio/spiralsynthmodular/files/patch-SpiralSound_Plugins_OutputPlugin_OutputPlugin.C
@@ -0,0 +1,19 @@
+--- SpiralSound/Plugins/OutputPlugin/OutputPlugin.C.orig 2004-02-08 18:36:17 UTC
++++ SpiralSound/Plugins/OutputPlugin/OutputPlugin.C
+@@ -20,6 +20,7 @@
+ #define _ISOC9X_SOURCE 1
+ #define _ISOC99_SOURCE 1
+ #include <math.h>
++#define lrintf(flt) ((int) (flt))
+
+ #include <sys/types.h>
+ #include <stdio.h>
+@@ -27,7 +28,7 @@
+ #include <unistd.h>
+ #include <limits.h>
+ #if defined (__FreeBSD__)
+- #include <machine/soundcard.h>
++ #include <sys/soundcard.h>
+ #else
+ #if defined (__NetBSD__) || defined (__OpenBSD__)
+ #include <soundcard.h> /* OSS emulation */
diff --git a/audio/spiralsynthmodular/files/patch-gcc46 b/audio/spiralsynthmodular/files/patch-gcc46
index 75f9e77444f1..1b0e84d66f6c 100644
--- a/audio/spiralsynthmodular/files/patch-gcc46
+++ b/audio/spiralsynthmodular/files/patch-gcc46
@@ -1,4 +1,4 @@
---- SpiralSound/ChannelHandler.C~
+--- SpiralSound/ChannelHandler.C.orig 2003-02-21 00:51:15 UTC
+++ SpiralSound/ChannelHandler.C
@@ -19,6 +19,9 @@
#include "ChannelHandler.h"
@@ -10,7 +10,7 @@
using namespace std;
//#define CHANNEL_DEBUG
---- SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.C~
+--- SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.C.orig 2003-08-08 17:58:26 UTC
+++ SpiralSound/Plugins/LADSPAPlugin/LADSPAInfo.C
@@ -30,6 +30,7 @@
#include <stdio.h>
@@ -20,7 +20,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
---- SpiralSound/Sample.h~
+--- SpiralSound/Sample.h.orig 2003-07-22 22:08:41 UTC
+++ SpiralSound/Sample.h
@@ -23,6 +23,7 @@
diff --git a/audio/splay/files/patch-apps_Makefile.in b/audio/splay/files/patch-apps_Makefile.in
new file mode 100644
index 000000000000..bec8427c93a7
--- /dev/null
+++ b/audio/splay/files/patch-apps_Makefile.in
@@ -0,0 +1,11 @@
+--- apps/Makefile.in.orig 2001-05-06 22:00:36 UTC
++++ apps/Makefile.in
+@@ -81,7 +81,7 @@ LDADD = ../libs/libmpeg.a
+ INCLUDES = -I../libs -I/usr/include/qt
+ xsplay_LDADD = -lqt $(LDADD)
+
+-man_MANS = splay.1 xsplay.1
++man_MANS = splay.1
+ EXTRA_DIST = $(man_MANS)
+
+ LIBS = @LIBS@
diff --git a/audio/splay/files/patch-apps_Makefile_in b/audio/splay/files/patch-apps_Makefile_in
deleted file mode 100644
index d6de36e13757..000000000000
--- a/audio/splay/files/patch-apps_Makefile_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- apps/Makefile.in.orig Mon Apr 2 22:49:53 2001
-+++ apps/Makefile.in Mon Apr 2 22:50:05 2001
-@@ -81,7 +81,7 @@
- INCLUDES = -I../libs -I/usr/include/qt
- xsplay_LDADD = -lqt $(LDADD)
-
--man_MANS = splay.1 xsplay.1
-+man_MANS = splay.1
- EXTRA_DIST = $(man_MANS)
-
- LIBS = @LIBS@
diff --git a/audio/splay/files/patch-apps_splay.cc b/audio/splay/files/patch-apps_splay.cc
index 48f0682282c1..71b23805c5a0 100644
--- a/audio/splay/files/patch-apps_splay.cc
+++ b/audio/splay/files/patch-apps_splay.cc
@@ -1,5 +1,5 @@
---- apps/splay.cc.orig 2001-03-19 09:51:27.000000000 +0100
-+++ apps/splay.cc 2013-09-23 12:15:27.000000000 +0200
+--- apps/splay.cc.orig 2001-03-19 08:51:27 UTC
++++ apps/splay.cc
@@ -16,14 +16,15 @@
#include <sys/types.h>
diff --git a/audio/splay/files/patch-apps_xsplay.cc b/audio/splay/files/patch-apps_xsplay.cc
index c886010a5d54..aed3a8cef414 100644
--- a/audio/splay/files/patch-apps_xsplay.cc
+++ b/audio/splay/files/patch-apps_xsplay.cc
@@ -1,5 +1,5 @@
---- apps/xsplay.cc.orig 2001-02-20 20:04:07.000000000 +0100
-+++ apps/xsplay.cc 2013-09-23 12:11:46.000000000 +0200
+--- apps/xsplay.cc.orig 2001-02-20 19:04:07 UTC
++++ apps/xsplay.cc
@@ -29,7 +29,7 @@
#include <fcntl.h>
#include <string.h>
diff --git a/audio/splay/files/patch-configure b/audio/splay/files/patch-configure
index ea50dce7da56..7401aae284fd 100644
--- a/audio/splay/files/patch-configure
+++ b/audio/splay/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Mon Mar 19 17:51:43 2001
-+++ configure Mon Apr 2 22:38:07 2001
-@@ -1967,12 +1969,12 @@
+--- configure.orig 2001-05-06 21:56:47 UTC
++++ configure
+@@ -1967,12 +1967,12 @@ rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
diff --git a/audio/splay/files/patch-libs_fileplayer.cc b/audio/splay/files/patch-libs_fileplayer.cc
index 0c1f652b4282..f227a853c611 100644
--- a/audio/splay/files/patch-libs_fileplayer.cc
+++ b/audio/splay/files/patch-libs_fileplayer.cc
@@ -1,5 +1,5 @@
---- libs/fileplayer.cc.orig 2001-03-17 19:57:12.000000000 +0100
-+++ libs/fileplayer.cc 2013-09-23 12:12:55.000000000 +0200
+--- libs/fileplayer.cc.orig 2001-03-17 18:57:12 UTC
++++ libs/fileplayer.cc
@@ -10,7 +10,8 @@
#endif
diff --git a/audio/splay/files/patch-libs_mpegtoraw.cc b/audio/splay/files/patch-libs_mpegtoraw.cc
index 619f311527f4..2370f9c85897 100644
--- a/audio/splay/files/patch-libs_mpegtoraw.cc
+++ b/audio/splay/files/patch-libs_mpegtoraw.cc
@@ -1,6 +1,6 @@
---- libs/mpegtoraw.cc.orig 2001-02-15 14:43:40.000000000 +0100
-+++ libs/mpegtoraw.cc 2013-09-23 12:11:46.000000000 +0200
-@@ -552,7 +552,7 @@
+--- libs/mpegtoraw.cc.orig 2001-02-15 13:43:40 UTC
++++ libs/mpegtoraw.cc
+@@ -552,7 +552,7 @@ int Mpegtoraw::getframesaved(void)
#endif
diff --git a/audio/splaytk/files/patch-splay-tk.tcl b/audio/splaytk/files/patch-splay-tk.tcl
index d3634efa5239..cab55c47847a 100644
--- a/audio/splaytk/files/patch-splay-tk.tcl
+++ b/audio/splaytk/files/patch-splay-tk.tcl
@@ -1,14 +1,12 @@
-*** splay-tk.tcl Sun Apr 6 06:36:35 1997
---- splay-tk.tcl.orig Sun Apr 19 15:32:05 1998
-***************
-*** 1,3 ****
---- 1,9 ----
-+ #!/bin/sh
-+ # start up wish \
-+ exec wish "$0" "$@"
-+
-+ set libdir %%DATADIR%%
-+ set images ${libdir}
- #####################################################################
- # SPlaY-Tk v2.0p1, (C) Andrew Hobgood #
- # #
+--- splay-tk.tcl.orig 1997-04-06 12:36:35 UTC
++++ splay-tk.tcl
+@@ -1,3 +1,9 @@
++#!/bin/sh
++# start up wish \
++exec wish "$0" "$@"
++
++set libdir %%DATADIR%%
++set images ${libdir}
+ #####################################################################
+ # SPlaY-Tk v2.0p1, (C) Andrew Hobgood #
+ # #
diff --git a/audio/squash/files/patch-FIXLOCK-src_global_squash.c b/audio/squash/files/patch-FIXLOCK-src_global_squash.c
index 0b94b31b4f08..a2a9fdbd67bf 100644
--- a/audio/squash/files/patch-FIXLOCK-src_global_squash.c
+++ b/audio/squash/files/patch-FIXLOCK-src_global_squash.c
@@ -1,6 +1,6 @@
---- ./src/global_squash.c.orig 2003-12-05 21:23:51.000000000 +0100
-+++ ./src/global_squash.c 2011-03-21 17:21:19.000000000 +0100
-@@ -143,7 +143,6 @@
+--- src/global_squash.c.orig 2003-12-05 20:23:51 UTC
++++ src/global_squash.c
+@@ -143,7 +143,6 @@ void load_state() {
playlist_queue_song( song, state_info.raw_songs[state_info.current_song].position );
}
state_info.current_song++;
diff --git a/audio/squash/files/patch-include__global.h b/audio/squash/files/patch-include__global.h
deleted file mode 100644
index 72822f196f81..000000000000
--- a/audio/squash/files/patch-include__global.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./include/global.h.orig 2003-12-18 22:51:43.000000000 +0100
-+++ ./include/global.h 2011-03-21 17:21:19.000000000 +0100
-@@ -57,7 +57,7 @@
- #endif
- #include <math.h>
- #include <stdarg.h>
--#include <wait.h>
-+#include <sys/wait.h>
- #include <sys/mman.h>
- #include <sys/types.h>
- #include <sys/stat.h>
diff --git a/audio/squash/files/patch-include__play_flac.h b/audio/squash/files/patch-include__play_flac.h
deleted file mode 100644
index c23848fc65e5..000000000000
--- a/audio/squash/files/patch-include__play_flac.h
+++ /dev/null
@@ -1,28 +0,0 @@
---- ./include/play_flac.h.orig 2003-10-12 21:14:33.000000000 +0200
-+++ ./include/play_flac.h 2011-03-21 17:21:19.000000000 +0100
-@@ -32,7 +32,7 @@
- * Structures
- */
- typedef struct flac_data_s {
-- FLAC__FileDecoder *decoder;
-+ FLAC__StreamDecoder *decoder;
- char *buffer;
- int buffer_size;
- int channels;
-@@ -45,11 +45,11 @@
- * Prototypes
- */
- void *flac_open( char *filename, sound_format_t *sound_format );
--void flac_error_callback( const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data );
--FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
--void flac_metadata_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
--FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
--void flac_metadata_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
-+void flac_error_callback( const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data );
-+FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
-+void flac_metadata_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
-+FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
-+void flac_metadata_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
- void flac_load_meta( void *data, char *filename );
- frame_data_t flac_decode_frame( void *data );
- long flac_calc_duration( void *data );
diff --git a/audio/squash/files/patch-include_global.h b/audio/squash/files/patch-include_global.h
new file mode 100644
index 000000000000..70710f91a7ca
--- /dev/null
+++ b/audio/squash/files/patch-include_global.h
@@ -0,0 +1,11 @@
+--- include/global.h.orig 2003-12-18 21:51:43 UTC
++++ include/global.h
+@@ -57,7 +57,7 @@
+ #endif
+ #include <math.h>
+ #include <stdarg.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <sys/mman.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff --git a/audio/squash/files/patch-include_play__flac.h b/audio/squash/files/patch-include_play__flac.h
new file mode 100644
index 000000000000..b193a1b823bb
--- /dev/null
+++ b/audio/squash/files/patch-include_play__flac.h
@@ -0,0 +1,28 @@
+--- include/play_flac.h.orig 2003-10-12 19:14:33 UTC
++++ include/play_flac.h
+@@ -32,7 +32,7 @@
+ * Structures
+ */
+ typedef struct flac_data_s {
+- FLAC__FileDecoder *decoder;
++ FLAC__StreamDecoder *decoder;
+ char *buffer;
+ int buffer_size;
+ int channels;
+@@ -45,11 +45,11 @@ typedef struct flac_data_s {
+ * Prototypes
+ */
+ void *flac_open( char *filename, sound_format_t *sound_format );
+-void flac_error_callback( const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data );
+-FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
+-void flac_metadata_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
+-FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
+-void flac_metadata_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
++void flac_error_callback( const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data );
++FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
++void flac_metadata_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
++FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data );
++void flac_metadata_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data );
+ void flac_load_meta( void *data, char *filename );
+ frame_data_t flac_decode_frame( void *data );
+ long flac_calc_duration( void *data );
diff --git a/audio/squash/files/patch-src__display.c b/audio/squash/files/patch-src__display.c
deleted file mode 100644
index eddc376beaad..000000000000
--- a/audio/squash/files/patch-src__display.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- ./src/display.c.orig 2003-12-07 22:20:41.000000000 +0100
-+++ ./src/display.c 2011-03-21 17:21:19.000000000 +0100
-@@ -179,6 +179,22 @@
- return (void *)NULL;
- }
-
-+char *mystrndup(const char *s, size_t sz)
-+{
-+ size_t l = strlen(s), i;
-+ char *x;
-+
-+ i = l < sz ? l : sz;
-+
-+ x = malloc(i + 1);
-+
-+ if (x) {
-+ memcpy(x, s, i);
-+ x[i] = '\0';
-+ }
-+ return x;
-+}
-+
- /*
- * Draw the screen, This takes into account rebuilding all the
- * windows in case of screen resize, or if a window changes size.
-@@ -1567,7 +1583,7 @@
- }
-
- /* Clip filename */
-- filename = strndup( filename, win_width - 2 );
-+ filename = mystrndup( filename, win_width - 2 );
-
- /* Display filename and songs loaded */
- mvwprintw( win, 1, 1, "Current Selected Song filename:" );
diff --git a/audio/squash/files/patch-src__play_flac.c b/audio/squash/files/patch-src__play_flac.c
deleted file mode 100644
index 57fc5d2fe2af..000000000000
--- a/audio/squash/files/patch-src__play_flac.c
+++ /dev/null
@@ -1,228 +0,0 @@
---- ./src/play_flac.c.orig 2003-12-18 18:08:57.000000000 +0100
-+++ ./src/play_flac.c 2011-03-21 17:21:19.000000000 +0100
-@@ -24,7 +24,7 @@
- #include "database.h" /* for insert_meta_data */
- #include "play_flac.h"
-
--void flac_error_callback(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) {
-+void flac_error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) {
- /* errors? we don't need no stinking errors */
- return;
- }
-@@ -36,47 +36,26 @@
- */
- void *flac_open( char *filename, sound_format_t *sound_format ) {
- flac_data_t *flac_data;
-- FLAC__FileDecoderState state;
-+ FLAC__StreamDecoderInitStatus state;
-
- /* Allocate space for data */
- squash_malloc( flac_data, sizeof(flac_data_t) );
-
-- if( (flac_data->decoder = FLAC__file_decoder_new()) == NULL ) {
-+ if( (flac_data->decoder = FLAC__stream_decoder_new()) == NULL ) {
- squash_free( flac_data );
- return (void *)NULL;
- // squash_error( "Unable to create flac decoder" );
- }
-
-- if( !FLAC__file_decoder_set_filename( flac_data->decoder, filename ) ) {
-- squash_free( flac_data );
-- return (void *)NULL;
-- // squash_error( "Unable to set filename in decoder" );
-- }
--
-- FLAC__file_decoder_set_metadata_callback( flac_data->decoder, flac_metadata_callback_decode_frame );
--
-- FLAC__file_decoder_set_write_callback( flac_data->decoder, flac_write_callback_decode_frame );
--
-- FLAC__file_decoder_set_error_callback( flac_data->decoder, flac_error_callback );
--
-- FLAC__file_decoder_set_client_data( flac_data->decoder, flac_data );
--
-- state = FLAC__file_decoder_init( flac_data->decoder );
-+ state = FLAC__stream_decoder_init_file( flac_data->decoder, filename, flac_write_callback_decode_frame, flac_metadata_callback_decode_frame, flac_error_callback, flac_data );
- switch( state ) {
-- case FLAC__FILE_DECODER_OK:
-+ case FLAC__STREAM_DECODER_INIT_STATUS_OK:
- /* no problem */
- break;
-- case FLAC__FILE_DECODER_END_OF_FILE:
-- case FLAC__FILE_DECODER_ERROR_OPENING_FILE:
-- case FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR:
-- case FLAC__FILE_DECODER_SEEK_ERROR:
-- case FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR:
-- case FLAC__FILE_DECODER_ALREADY_INITIALIZED:
-- case FLAC__FILE_DECODER_INVALID_CALLBACK:
-- case FLAC__FILE_DECODER_UNINITIALIZED:
-+ default:
- squash_free( flac_data );
- return (void *)NULL;
-- // squash_error( "Unable to initialize decoder: %s", FLAC__FileDecoderStateString[ state ] );
-+ // squash_error( "Unable to initialize decoder: %s", FLAC__StreamDecoderInitStatusString[ state ] );
- break;
- }
-
-@@ -86,7 +65,7 @@
- flac_data->sample_rate = -1;
- flac_data->duration = -1;
-
-- FLAC__file_decoder_process_until_end_of_metadata( flac_data->decoder );
-+ FLAC__stream_decoder_process_until_end_of_metadata( flac_data->decoder );
-
- sound_format->rate = flac_data->sample_rate;
- sound_format->channels = flac_data->channels;
-@@ -97,12 +76,12 @@
- return (void *)flac_data;
- }
-
--FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
-+FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
- /* do nothing ignore any decoded frames (when just loading meta data)*/
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
- }
-
--void flac_metadata_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
-+void flac_metadata_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
- FLAC__StreamMetadata_VorbisComment comment = metadata->data.vorbis_comment;
- int i;
- char *start, *end, *key, *value;
-@@ -128,7 +107,7 @@
- }
- }
-
--FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
-+FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
- flac_data_t *flac_data = (flac_data_t *)client_data;
- int i, j, k;
-
-@@ -158,7 +137,7 @@
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
- }
-
--void flac_metadata_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
-+void flac_metadata_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
- flac_data_t *flac_data = (flac_data_t *)client_data;
-
- if( metadata->type != FLAC__METADATA_TYPE_STREAMINFO ) {
-@@ -172,47 +151,29 @@
- }
-
- void flac_load_meta( void *data, char *filename ) {
-- FLAC__FileDecoder *decoder;
-- FLAC__FileDecoderState state;
-+ FLAC__StreamDecoder *decoder;
-+ FLAC__StreamDecoderInitStatus state;
-
-- if( (decoder = FLAC__file_decoder_new()) == NULL ) {
-+ if( (decoder = FLAC__stream_decoder_new()) == NULL ) {
- squash_error( "Unable to create flac decoder" );
- }
-
-- if( !FLAC__file_decoder_set_filename( decoder, filename ) ) {
-- squash_error( "Unable to set filename in decoder" );
-- }
--
-- FLAC__file_decoder_set_metadata_callback( decoder, flac_metadata_callback_load_meta );
-- FLAC__file_decoder_set_metadata_respond_all( decoder );
--
-- FLAC__file_decoder_set_write_callback( decoder, flac_write_callback_load_meta );
--
-- FLAC__file_decoder_set_error_callback( decoder, flac_error_callback );
--
-- FLAC__file_decoder_set_client_data( decoder, data );
-+ FLAC__stream_decoder_set_metadata_respond_all( decoder );
-
-- state = FLAC__file_decoder_init( decoder );
-+ state = FLAC__stream_decoder_init_file( decoder, filename, flac_write_callback_load_meta, flac_metadata_callback_load_meta, flac_error_callback, data );
- switch( state ) {
-- case FLAC__FILE_DECODER_OK:
-+ case FLAC__STREAM_DECODER_INIT_STATUS_OK:
- /* no problem */
- break;
-- case FLAC__FILE_DECODER_END_OF_FILE:
-- case FLAC__FILE_DECODER_ERROR_OPENING_FILE:
-- case FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR:
-- case FLAC__FILE_DECODER_SEEK_ERROR:
-- case FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR:
-- case FLAC__FILE_DECODER_ALREADY_INITIALIZED:
-- case FLAC__FILE_DECODER_INVALID_CALLBACK:
-- case FLAC__FILE_DECODER_UNINITIALIZED:
-- squash_error( "Unable to initialize decoder: %s", FLAC__FileDecoderStateString[ state ] );
-+ default:
-+ squash_error( "Unable to initialize decoder: %s", FLAC__StreamDecoderInitStatusString[ state ] );
- break;
- }
-
-- FLAC__file_decoder_process_until_end_of_metadata( decoder );
-+ FLAC__stream_decoder_process_until_end_of_metadata( decoder );
-
-- FLAC__file_decoder_finish( decoder );
-- FLAC__file_decoder_delete( decoder );
-+ FLAC__stream_decoder_finish( decoder );
-+ FLAC__stream_decoder_delete( decoder );
-
- return;
- }
-@@ -223,29 +184,27 @@
- frame_data_t flac_decode_frame( void *data ) {
- flac_data_t *flac_data = (flac_data_t *)data;
- frame_data_t frame_data;
-- FLAC__FileDecoderState state;
-+ FLAC__StreamDecoderState state;
-
-- FLAC__file_decoder_process_single( flac_data->decoder );
-+ FLAC__stream_decoder_process_single( flac_data->decoder );
- frame_data.position = flac_data->position;
-
-- state = FLAC__file_decoder_get_state( flac_data->decoder );
-+ state = FLAC__stream_decoder_get_state( flac_data->decoder );
- switch( state ) {
-- case FLAC__FILE_DECODER_OK:
-+ case FLAC__STREAM_DECODER_READ_FRAME:
- frame_data.pcm_data = flac_data->buffer;
- frame_data.pcm_size = flac_data->buffer_size;
- break;
-- case FLAC__FILE_DECODER_END_OF_FILE:
-+ case FLAC__STREAM_DECODER_END_OF_STREAM:
- frame_data.pcm_data = NULL;
- frame_data.pcm_size = 0;
- break;
-- case FLAC__FILE_DECODER_ERROR_OPENING_FILE:
-- case FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR:
-- case FLAC__FILE_DECODER_SEEK_ERROR:
-- case FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR:
-- case FLAC__FILE_DECODER_ALREADY_INITIALIZED:
-- case FLAC__FILE_DECODER_INVALID_CALLBACK:
-- case FLAC__FILE_DECODER_UNINITIALIZED:
-- squash_error("Error while decoding: %s", FLAC__FileDecoderStateString[ state ] );
-+ case FLAC__STREAM_DECODER_OGG_ERROR:
-+ case FLAC__STREAM_DECODER_SEEK_ERROR:
-+ case FLAC__STREAM_DECODER_ABORTED:
-+ case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
-+ case FLAC__STREAM_DECODER_UNINITIALIZED:
-+ squash_error("Error while decoding: %s", FLAC__StreamDecoderStateString[ state ] );
- break;
- }
-
-@@ -267,7 +226,7 @@
- void flac_seek( void *data, long seek_time, long duration ) {
- flac_data_t *flac_data = (flac_data_t *)data;
-
-- FLAC__file_decoder_seek_absolute( flac_data->decoder, seek_time * (flac_data->sample_rate / 1000) );
-+ FLAC__stream_decoder_seek_absolute( flac_data->decoder, seek_time * (flac_data->sample_rate / 1000) );
- return;
- }
-
-@@ -277,9 +236,9 @@
- void flac_close( void *data ) {
- flac_data_t *flac_data = (flac_data_t *)data;
-
-- FLAC__file_decoder_finish( flac_data->decoder );
-+ FLAC__stream_decoder_finish( flac_data->decoder );
-
-- FLAC__file_decoder_delete( flac_data->decoder );
-+ FLAC__stream_decoder_delete( flac_data->decoder );
-
- /* Free allocated storage */
- squash_free( flac_data->buffer );
diff --git a/audio/squash/files/patch-src__player.c b/audio/squash/files/patch-src__player.c
deleted file mode 100644
index 325165629ca2..000000000000
--- a/audio/squash/files/patch-src__player.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./src/player.c.orig 2003-12-18 22:53:12.000000000 +0100
-+++ ./src/player.c 2011-03-21 17:21:19.000000000 +0100
-@@ -118,6 +118,7 @@
- char *full_filename;
- long start_position;
-
-+ memset(&sound_format, 0, sizeof(sound_format));
- play_state = STATE_BEFORE_SONG;
-
- /* make the compiler happy */
diff --git a/audio/squash/files/patch-src_display.c b/audio/squash/files/patch-src_display.c
new file mode 100644
index 000000000000..5e8ddf6a3b80
--- /dev/null
+++ b/audio/squash/files/patch-src_display.c
@@ -0,0 +1,34 @@
+--- src/display.c.orig 2003-12-07 21:20:41 UTC
++++ src/display.c
+@@ -179,6 +179,22 @@ void *display_monitor( void *input_data
+ return (void *)NULL;
+ }
+
++char *mystrndup(const char *s, size_t sz)
++{
++ size_t l = strlen(s), i;
++ char *x;
++
++ i = l < sz ? l : sz;
++
++ x = malloc(i + 1);
++
++ if (x) {
++ memcpy(x, s, i);
++ x[i] = '\0';
++ }
++ return x;
++}
++
+ /*
+ * Draw the screen, This takes into account rebuilding all the
+ * windows in case of screen resize, or if a window changes size.
+@@ -1567,7 +1583,7 @@ void draw_info( void ) {
+ }
+
+ /* Clip filename */
+- filename = strndup( filename, win_width - 2 );
++ filename = mystrndup( filename, win_width - 2 );
+
+ /* Display filename and songs loaded */
+ mvwprintw( win, 1, 1, "Current Selected Song filename:" );
diff --git a/audio/squash/files/patch-src_play__flac.c b/audio/squash/files/patch-src_play__flac.c
new file mode 100644
index 000000000000..b9925d280e15
--- /dev/null
+++ b/audio/squash/files/patch-src_play__flac.c
@@ -0,0 +1,228 @@
+--- src/play_flac.c.orig 2003-12-18 17:08:57 UTC
++++ src/play_flac.c
+@@ -24,7 +24,7 @@
+ #include "database.h" /* for insert_meta_data */
+ #include "play_flac.h"
+
+-void flac_error_callback(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) {
++void flac_error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) {
+ /* errors? we don't need no stinking errors */
+ return;
+ }
+@@ -36,47 +36,26 @@ void flac_error_callback(const FLAC__Fil
+ */
+ void *flac_open( char *filename, sound_format_t *sound_format ) {
+ flac_data_t *flac_data;
+- FLAC__FileDecoderState state;
++ FLAC__StreamDecoderInitStatus state;
+
+ /* Allocate space for data */
+ squash_malloc( flac_data, sizeof(flac_data_t) );
+
+- if( (flac_data->decoder = FLAC__file_decoder_new()) == NULL ) {
++ if( (flac_data->decoder = FLAC__stream_decoder_new()) == NULL ) {
+ squash_free( flac_data );
+ return (void *)NULL;
+ // squash_error( "Unable to create flac decoder" );
+ }
+
+- if( !FLAC__file_decoder_set_filename( flac_data->decoder, filename ) ) {
+- squash_free( flac_data );
+- return (void *)NULL;
+- // squash_error( "Unable to set filename in decoder" );
+- }
+-
+- FLAC__file_decoder_set_metadata_callback( flac_data->decoder, flac_metadata_callback_decode_frame );
+-
+- FLAC__file_decoder_set_write_callback( flac_data->decoder, flac_write_callback_decode_frame );
+-
+- FLAC__file_decoder_set_error_callback( flac_data->decoder, flac_error_callback );
+-
+- FLAC__file_decoder_set_client_data( flac_data->decoder, flac_data );
+-
+- state = FLAC__file_decoder_init( flac_data->decoder );
++ state = FLAC__stream_decoder_init_file( flac_data->decoder, filename, flac_write_callback_decode_frame, flac_metadata_callback_decode_frame, flac_error_callback, flac_data );
+ switch( state ) {
+- case FLAC__FILE_DECODER_OK:
++ case FLAC__STREAM_DECODER_INIT_STATUS_OK:
+ /* no problem */
+ break;
+- case FLAC__FILE_DECODER_END_OF_FILE:
+- case FLAC__FILE_DECODER_ERROR_OPENING_FILE:
+- case FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR:
+- case FLAC__FILE_DECODER_SEEK_ERROR:
+- case FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR:
+- case FLAC__FILE_DECODER_ALREADY_INITIALIZED:
+- case FLAC__FILE_DECODER_INVALID_CALLBACK:
+- case FLAC__FILE_DECODER_UNINITIALIZED:
++ default:
+ squash_free( flac_data );
+ return (void *)NULL;
+- // squash_error( "Unable to initialize decoder: %s", FLAC__FileDecoderStateString[ state ] );
++ // squash_error( "Unable to initialize decoder: %s", FLAC__StreamDecoderInitStatusString[ state ] );
+ break;
+ }
+
+@@ -86,7 +65,7 @@ void *flac_open( char *filename, sound_f
+ flac_data->sample_rate = -1;
+ flac_data->duration = -1;
+
+- FLAC__file_decoder_process_until_end_of_metadata( flac_data->decoder );
++ FLAC__stream_decoder_process_until_end_of_metadata( flac_data->decoder );
+
+ sound_format->rate = flac_data->sample_rate;
+ sound_format->channels = flac_data->channels;
+@@ -97,12 +76,12 @@ void *flac_open( char *filename, sound_f
+ return (void *)flac_data;
+ }
+
+-FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
++FLAC__StreamDecoderWriteStatus flac_write_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
+ /* do nothing ignore any decoded frames (when just loading meta data)*/
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+
+-void flac_metadata_callback_load_meta( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
++void flac_metadata_callback_load_meta( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
+ FLAC__StreamMetadata_VorbisComment comment = metadata->data.vorbis_comment;
+ int i;
+ char *start, *end, *key, *value;
+@@ -128,7 +107,7 @@ void flac_metadata_callback_load_meta( c
+ }
+ }
+
+-FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
++FLAC__StreamDecoderWriteStatus flac_write_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data ) {
+ flac_data_t *flac_data = (flac_data_t *)client_data;
+ int i, j, k;
+
+@@ -158,7 +137,7 @@ FLAC__StreamDecoderWriteStatus flac_writ
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+
+-void flac_metadata_callback_decode_frame( const FLAC__FileDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
++void flac_metadata_callback_decode_frame( const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data ) {
+ flac_data_t *flac_data = (flac_data_t *)client_data;
+
+ if( metadata->type != FLAC__METADATA_TYPE_STREAMINFO ) {
+@@ -172,47 +151,29 @@ void flac_metadata_callback_decode_frame
+ }
+
+ void flac_load_meta( void *data, char *filename ) {
+- FLAC__FileDecoder *decoder;
+- FLAC__FileDecoderState state;
++ FLAC__StreamDecoder *decoder;
++ FLAC__StreamDecoderInitStatus state;
+
+- if( (decoder = FLAC__file_decoder_new()) == NULL ) {
++ if( (decoder = FLAC__stream_decoder_new()) == NULL ) {
+ squash_error( "Unable to create flac decoder" );
+ }
+
+- if( !FLAC__file_decoder_set_filename( decoder, filename ) ) {
+- squash_error( "Unable to set filename in decoder" );
+- }
+-
+- FLAC__file_decoder_set_metadata_callback( decoder, flac_metadata_callback_load_meta );
+- FLAC__file_decoder_set_metadata_respond_all( decoder );
+-
+- FLAC__file_decoder_set_write_callback( decoder, flac_write_callback_load_meta );
+-
+- FLAC__file_decoder_set_error_callback( decoder, flac_error_callback );
+-
+- FLAC__file_decoder_set_client_data( decoder, data );
++ FLAC__stream_decoder_set_metadata_respond_all( decoder );
+
+- state = FLAC__file_decoder_init( decoder );
++ state = FLAC__stream_decoder_init_file( decoder, filename, flac_write_callback_load_meta, flac_metadata_callback_load_meta, flac_error_callback, data );
+ switch( state ) {
+- case FLAC__FILE_DECODER_OK:
++ case FLAC__STREAM_DECODER_INIT_STATUS_OK:
+ /* no problem */
+ break;
+- case FLAC__FILE_DECODER_END_OF_FILE:
+- case FLAC__FILE_DECODER_ERROR_OPENING_FILE:
+- case FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR:
+- case FLAC__FILE_DECODER_SEEK_ERROR:
+- case FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR:
+- case FLAC__FILE_DECODER_ALREADY_INITIALIZED:
+- case FLAC__FILE_DECODER_INVALID_CALLBACK:
+- case FLAC__FILE_DECODER_UNINITIALIZED:
+- squash_error( "Unable to initialize decoder: %s", FLAC__FileDecoderStateString[ state ] );
++ default:
++ squash_error( "Unable to initialize decoder: %s", FLAC__StreamDecoderInitStatusString[ state ] );
+ break;
+ }
+
+- FLAC__file_decoder_process_until_end_of_metadata( decoder );
++ FLAC__stream_decoder_process_until_end_of_metadata( decoder );
+
+- FLAC__file_decoder_finish( decoder );
+- FLAC__file_decoder_delete( decoder );
++ FLAC__stream_decoder_finish( decoder );
++ FLAC__stream_decoder_delete( decoder );
+
+ return;
+ }
+@@ -223,29 +184,27 @@ void flac_load_meta( void *data, char *f
+ frame_data_t flac_decode_frame( void *data ) {
+ flac_data_t *flac_data = (flac_data_t *)data;
+ frame_data_t frame_data;
+- FLAC__FileDecoderState state;
++ FLAC__StreamDecoderState state;
+
+- FLAC__file_decoder_process_single( flac_data->decoder );
++ FLAC__stream_decoder_process_single( flac_data->decoder );
+ frame_data.position = flac_data->position;
+
+- state = FLAC__file_decoder_get_state( flac_data->decoder );
++ state = FLAC__stream_decoder_get_state( flac_data->decoder );
+ switch( state ) {
+- case FLAC__FILE_DECODER_OK:
++ case FLAC__STREAM_DECODER_READ_FRAME:
+ frame_data.pcm_data = flac_data->buffer;
+ frame_data.pcm_size = flac_data->buffer_size;
+ break;
+- case FLAC__FILE_DECODER_END_OF_FILE:
++ case FLAC__STREAM_DECODER_END_OF_STREAM:
+ frame_data.pcm_data = NULL;
+ frame_data.pcm_size = 0;
+ break;
+- case FLAC__FILE_DECODER_ERROR_OPENING_FILE:
+- case FLAC__FILE_DECODER_MEMORY_ALLOCATION_ERROR:
+- case FLAC__FILE_DECODER_SEEK_ERROR:
+- case FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR:
+- case FLAC__FILE_DECODER_ALREADY_INITIALIZED:
+- case FLAC__FILE_DECODER_INVALID_CALLBACK:
+- case FLAC__FILE_DECODER_UNINITIALIZED:
+- squash_error("Error while decoding: %s", FLAC__FileDecoderStateString[ state ] );
++ case FLAC__STREAM_DECODER_OGG_ERROR:
++ case FLAC__STREAM_DECODER_SEEK_ERROR:
++ case FLAC__STREAM_DECODER_ABORTED:
++ case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
++ case FLAC__STREAM_DECODER_UNINITIALIZED:
++ squash_error("Error while decoding: %s", FLAC__StreamDecoderStateString[ state ] );
+ break;
+ }
+
+@@ -267,7 +226,7 @@ long flac_calc_duration( void *data ) {
+ void flac_seek( void *data, long seek_time, long duration ) {
+ flac_data_t *flac_data = (flac_data_t *)data;
+
+- FLAC__file_decoder_seek_absolute( flac_data->decoder, seek_time * (flac_data->sample_rate / 1000) );
++ FLAC__stream_decoder_seek_absolute( flac_data->decoder, seek_time * (flac_data->sample_rate / 1000) );
+ return;
+ }
+
+@@ -277,9 +236,9 @@ void flac_seek( void *data, long seek_ti
+ void flac_close( void *data ) {
+ flac_data_t *flac_data = (flac_data_t *)data;
+
+- FLAC__file_decoder_finish( flac_data->decoder );
++ FLAC__stream_decoder_finish( flac_data->decoder );
+
+- FLAC__file_decoder_delete( flac_data->decoder );
++ FLAC__stream_decoder_delete( flac_data->decoder );
+
+ /* Free allocated storage */
+ squash_free( flac_data->buffer );
diff --git a/audio/squash/files/patch-src_player.c b/audio/squash/files/patch-src_player.c
new file mode 100644
index 000000000000..53708272c9d3
--- /dev/null
+++ b/audio/squash/files/patch-src_player.c
@@ -0,0 +1,10 @@
+--- src/player.c.orig 2003-12-18 21:53:12 UTC
++++ src/player.c
+@@ -118,6 +118,7 @@ void *player( void *input_data ) {
+ char *full_filename;
+ long start_position;
+
++ memset(&sound_format, 0, sizeof(sound_format));
+ play_state = STATE_BEFORE_SONG;
+
+ /* make the compiler happy */
diff --git a/audio/squeezeboxserver/files/patch-Slim-Utils-Log.pm b/audio/squeezeboxserver/files/patch-Slim-Utils-Log.pm
deleted file mode 100644
index 25d5aa8a1a81..000000000000
--- a/audio/squeezeboxserver/files/patch-Slim-Utils-Log.pm
+++ /dev/null
@@ -1,20 +0,0 @@
---- Slim/Utils/Log.pm 2010-04-01 13:21:54.000000000 +0100
-+++ Slim/Utils/Log.pm 2010-06-07 09:08:34.000000000 +0100
-@@ -134,7 +134,7 @@
- # Make sure recreate option is set if user has an existing log.conf
- if ( !main::ISWINDOWS && !$ENV{NYTPROF} ) {
- $config{'log4perl.appender.server.recreate'} = 1;
-- $config{'log4perl.appender.server.recreate_check_signal'} = 'USR1';
-+ $config{'log4perl.appender.server.recreate_check_signal'} = 'HUP';
- }
-
- # Change to syslog if requested
-@@ -985,7 +985,7 @@
-
- if ( !main::ISWINDOWS && !$ENV{NYTPROF} ) {
- $defaultAppenders{server}->{recreate} = 1;
-- $defaultAppenders{server}->{recreate_check_signal} = 'USR1';
-+ $defaultAppenders{server}->{recreate_check_signal} = 'HUP';
- }
-
- return $class->_fixupAppenders(\%defaultAppenders);
diff --git a/audio/squeezeboxserver/files/patch-Slim_Utils_Log.pm b/audio/squeezeboxserver/files/patch-Slim_Utils_Log.pm
new file mode 100644
index 000000000000..ac4e83c45130
--- /dev/null
+++ b/audio/squeezeboxserver/files/patch-Slim_Utils_Log.pm
@@ -0,0 +1,20 @@
+--- Slim/Utils/Log.pm.orig 2011-01-24 15:15:39 UTC
++++ Slim/Utils/Log.pm
+@@ -134,7 +134,7 @@ sub init {
+ # Make sure recreate option is set if user has an existing log.conf
+ if ( !main::ISWINDOWS && !$ENV{NYTPROF} ) {
+ $config{'log4perl.appender.server.recreate'} = 1;
+- $config{'log4perl.appender.server.recreate_check_signal'} = 'USR1';
++ $config{'log4perl.appender.server.recreate_check_signal'} = 'HUP';
+ }
+ else {
+ $config{'log4perl.appender.server.recreate'} = 0;
+@@ -989,7 +989,7 @@ sub _defaultAppenders {
+
+ if ( !main::ISWINDOWS && !$ENV{NYTPROF} ) {
+ $defaultAppenders{server}->{recreate} = 1;
+- $defaultAppenders{server}->{recreate_check_signal} = 'USR1';
++ $defaultAppenders{server}->{recreate_check_signal} = 'HUP';
+ }
+
+ return $class->_fixupAppenders(\%defaultAppenders);
diff --git a/audio/squeezeboxserver/files/patch-convert.conf b/audio/squeezeboxserver/files/patch-convert.conf
index 4d6c53fbd6ab..04d630cf8c24 100644
--- a/audio/squeezeboxserver/files/patch-convert.conf
+++ b/audio/squeezeboxserver/files/patch-convert.conf
@@ -1,7 +1,7 @@
---- convert.conf.orig
+--- convert.conf.orig 2011-01-24 15:16:10 UTC
+++ convert.conf
-@@ -82,8 +82,8 @@
- [faad] -q -w -f 1 $FILE$ | [lame] --silent -q $QUALITY$ $BITRATE - -
+@@ -86,8 +86,8 @@ sls mp3 * *
+ [sls] $FILE$ - -s | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
mov mp3 * *
- # FRB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
@@ -10,8 +10,8 @@
+ [faad] -q -w -f 2 $FILE$ | [lame] -s 44100 --silent -q $QUALITY$ $RESAMPLE$ -v $BITRATE$ -r --little-endian - -
alc mp3 * *
- # FB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
-@@ -115,7 +115,7 @@
+ # FB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}T:{START=-j %s}
+@@ -127,7 +127,7 @@ mpc mp3 * *
ape mp3 * *
# FB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
@@ -20,9 +20,9 @@
wvp mp3 * *
# FB:{BITRATE=-B %B}T:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=--resample %D}
-@@ -173,9 +173,9 @@
- # IF
- [faad] -q -w -f 2 -b 1 -s 44100 $FILE$
+@@ -197,9 +197,9 @@ sls pcm * *
+ # F
+ [sls] $FILE$ - -r -s
-mov aif * *
+mov wav * *
@@ -32,8 +32,8 @@
wma wma * *
-
-@@ -221,8 +221,8 @@
- [faad] -q -w -f 1 $FILE$ | [flac] -cs --totally-silent --compression-level-0 --ignore-chunk-sizes -
+@@ -264,8 +264,8 @@ sls flc * *
+ [sls] $FILE$ - -s | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
mov flc * *
- # FR
@@ -42,4 +42,4 @@
+ [faad] -w -q -f 2 $FILE$ | [flac] -cs --totally-silent --compression-level-0 --endian little --sign signed --channels 2 --bps 16 --sample-rate 44100 -
alc flc * *
- # F
+ # FT:{START=-j %s}D:{RESAMPLE=-r %d}
diff --git a/audio/squeezeboxserver/files/patch-dbix-class-bug.diff b/audio/squeezeboxserver/files/patch-dbix-class-bug.diff
index 0e0684251df1..4745e571a74b 100644
--- a/audio/squeezeboxserver/files/patch-dbix-class-bug.diff
+++ b/audio/squeezeboxserver/files/patch-dbix-class-bug.diff
@@ -1,8 +1,8 @@
Index: Slim/Schema.pm
===================================================================
---- Slim/Schema.pm (revision 31006)
-+++ Slim/Schema.pm (working copy)
-@@ -274,11 +274,15 @@
+--- Slim/Schema.pm.orig 2011-01-24 15:15:39 UTC
++++ Slim/Schema.pm
+@@ -274,11 +274,15 @@ sub _connect {
# For custom exceptions
$class->storage_type('Slim::Schema::Storage');
@@ -19,11 +19,9 @@ Index: Slim/Schema.pm
PrintError => 0,
Taint => 1,
on_connect_do => [
-Index: scanner.pl
-===================================================================
---- scanner.pl (revision 31006)
-+++ scanner.pl (working copy)
-@@ -236,9 +236,6 @@
+--- scanner.pl.orig 2011-03-21 13:05:58 UTC
++++ scanner.pl
+@@ -236,9 +236,6 @@ sub main {
main::INFOLOG && $log->info("Squeezebox Server Scanner done init...\n");
@@ -33,5 +31,3 @@ Index: scanner.pl
my $scanType = 'SETUP_STANDARDRESCAN';
if ($wipe) {
-
---------------020502080403070605040408--
diff --git a/audio/squeezeboxserver/files/patch-modules.conf b/audio/squeezeboxserver/files/patch-modules.conf
index cf83507518cc..d607ecdd0eb6 100644
--- a/audio/squeezeboxserver/files/patch-modules.conf
+++ b/audio/squeezeboxserver/files/patch-modules.conf
@@ -1,4 +1,4 @@
---- modules.conf.orig
+--- modules.conf.orig 2011-03-21 19:56:39 UTC
+++ modules.conf
@@ -5,7 +5,7 @@
# <module> <min_version> [ <max_version> ]
diff --git a/audio/streamtranscoder/files/patch-src-commandline.cpp b/audio/streamtranscoder/files/patch-src-commandline.cpp
deleted file mode 100644
index 2dfb700fb05f..000000000000
--- a/audio/streamtranscoder/files/patch-src-commandline.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/commandline.cpp.orig 2014-06-08 18:46:55.585823061 +0100
-+++ src/commandline.cpp 2014-06-08 18:47:13.735820885 +0100
-@@ -221,7 +221,7 @@
- return 1;
- }
-
--main(int argc, char **argv) {
-+int main(int argc, char **argv) {
- int processID = 0;
- transcode_init(argc, argv);
- return transcode_main();
diff --git a/audio/streamtranscoder/files/patch-src_commandline.cpp b/audio/streamtranscoder/files/patch-src_commandline.cpp
new file mode 100644
index 000000000000..24206f4d556c
--- /dev/null
+++ b/audio/streamtranscoder/files/patch-src_commandline.cpp
@@ -0,0 +1,11 @@
+--- src/commandline.cpp.orig 2004-12-02 03:43:43 UTC
++++ src/commandline.cpp
+@@ -221,7 +221,7 @@ int transcode_init(int argc, char **argv
+ return 1;
+ }
+
+-main(int argc, char **argv) {
++int main(int argc, char **argv) {
+ int processID = 0;
+ transcode_init(argc, argv);
+ return transcode_main();
diff --git a/audio/stymulator/files/patch-Makefile b/audio/stymulator/files/patch-Makefile
index 673e9282c574..698c78ea0bba 100644
--- a/audio/stymulator/files/patch-Makefile
+++ b/audio/stymulator/files/patch-Makefile
@@ -1,5 +1,5 @@
---- ./Makefile.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./Makefile 2010-04-23 13:49:47.000000000 +0200
+--- Makefile.orig 2016-07-26 16:04:42 UTC
++++ Makefile
@@ -1,6 +1,5 @@
RM = rm -f
-CC = g++
@@ -8,7 +8,7 @@
LZH = stsoundlib/lzh
STLIB = stsoundlib
-@@ -17,22 +16,22 @@
+@@ -17,22 +16,22 @@ libs:
done
ymplayer: ymplayer.o sound.o ui.o
diff --git a/audio/stymulator/files/patch-sound.cpp b/audio/stymulator/files/patch-sound.cpp
index 29509c6be853..86dd17e30ab5 100644
--- a/audio/stymulator/files/patch-sound.cpp
+++ b/audio/stymulator/files/patch-sound.cpp
@@ -1,5 +1,5 @@
---- ./sound.cpp.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./sound.cpp 2010-04-23 13:49:47.000000000 +0200
+--- sound.cpp.orig 2016-07-26 16:04:42 UTC
++++ sound.cpp
@@ -6,7 +6,6 @@
Project Page: http://atariarea.krap.pl/stymulator
diff --git a/audio/stymulator/files/patch-sound.h b/audio/stymulator/files/patch-sound.h
index 16ee88dd000a..b75dce10a135 100644
--- a/audio/stymulator/files/patch-sound.h
+++ b/audio/stymulator/files/patch-sound.h
@@ -1,5 +1,5 @@
---- ./sound.h.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./sound.h 2010-04-23 13:49:47.000000000 +0200
+--- sound.h.orig 2016-07-26 16:04:42 UTC
++++ sound.h
@@ -6,7 +6,6 @@
Project Page: http://atariarea.krap.pl/stymulator
diff --git a/audio/stymulator/files/patch-stsoundlib_Makefile b/audio/stymulator/files/patch-stsoundlib_Makefile
new file mode 100644
index 000000000000..12d75fa3e04f
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_Makefile
@@ -0,0 +1,38 @@
+--- stsoundlib/Makefile.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/Makefile
+@@ -1,28 +1,28 @@
+-CC = g++
++CXX ?= g++
+ AR = ar cr
+ RM = rm -f
+
+ LIB = digidrum.o Ymload.o Ym2149Ex.o YmMusic.o YmUserInterface.o
+
+-CFLAGS = -Wall
++CFLAGS ?= -Wall
+
+ libym.a: $(LIB)
+ $(AR) libym.a $(LIB)
+
+ digidrum.o: digidrum.cpp YmTypes.h
+- $(CC) -c digidrum.cpp
++ $(CXX) $(CXXFLAGS) -c digidrum.cpp
+
+ Ym2149Ex.o: Ym2149Ex.cpp Ym2149Ex.h YmTypes.h
+- $(CC) -c Ym2149Ex.cpp
++ $(CXX) $(CXXFLAGS) -c Ym2149Ex.cpp
+
+ Ymload.o: Ymload.cpp YmMusic.h lzh/lzh.h
+- $(CC) -c Ymload.cpp
++ $(CXX) $(CXXFLAGS) -c Ymload.cpp
+
+ YmMusic.o: YmMusic.cpp YmMusic.h
+- $(CC) -c YmMusic.cpp
++ $(CXX) $(CXXFLAGS) -c YmMusic.cpp
+
+ YmUserInterface.o: YmUserInterface.cpp StSoundLibrary.h YmMusic.h
+- $(CC) -c YmUserInterface.cpp
++ $(CXX) $(CXXFLAGS) -c YmUserInterface.cpp
+
+ clean:
+ $(RM) *~ *.o *.a
diff --git a/audio/stymulator/files/patch-stsoundlib_YmMusic.cpp b/audio/stymulator/files/patch-stsoundlib_YmMusic.cpp
new file mode 100644
index 000000000000..58f60414c1df
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_YmMusic.cpp
@@ -0,0 +1,54 @@
+--- stsoundlib/YmMusic.cpp.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/YmMusic.cpp
+@@ -167,12 +167,12 @@ ymbool CYmMusic::isSeekable(void)
+ return getAttrib()&A_TIMECONTROL;
+ }
+
+-void CYmMusic::setLastError(char *pError)
++void CYmMusic::setLastError(const char *pError)
+ {
+ pLastError = pError;
+ }
+
+-char *CYmMusic::getLastError(void)
++const char *CYmMusic::getLastError(void)
+ {
+ return pLastError;
+ }
+@@ -364,11 +364,14 @@ void CYmMusic::player(void)
+
+ if (ptr[12])
+ {
+- sampleFrq = (MFP_CLOCK / ptr[12]);
+- ymChip.drumStart( 2, // Voice C
+- sampleAdress[sampleNum],
+- sampleLen[sampleNum],
+- sampleFrq);
++ if (sampleNum < MAX_DIGIDRUM)
++ {
++ sampleFrq = (MFP_CLOCK / ptr[12]);
++ ymChip.drumStart( 2, // Voice C
++ sampleAdress[sampleNum],
++ sampleLen[sampleNum],
++ sampleFrq);
++ }
+ }
+ }
+ }
+@@ -612,7 +615,6 @@ ymTrackerLine_t *pLine;
+ for (i=0;i<nbVoice;i++)
+ {
+ ymint n;
+- ymint freq =
+ pVoice[i].sampleFreq = ((ymint)pLine->freqHigh<<8) | pLine->freqLow;
+ if (pVoice[i].sampleFreq)
+ {
+@@ -677,7 +679,7 @@ double step;
+ #ifdef _LINEAR_OVRS
+ ymint vb = va;
+ if (samplePos < (sampleEnd-(1<<YMTPREC)))
+- ymint vb = pVolumeTab[pSample[(samplePos>>YMTPREC)+1]];
++ vb = pVolumeTab[pSample[(samplePos>>YMTPREC)+1]];
+ ymint frac = samplePos & ((1<<YMTPREC)-1);
+ va += (((vb-va)*frac)>>YMTPREC);
+ #endif
diff --git a/audio/stymulator/files/patch-stsoundlib_YmMusic.h b/audio/stymulator/files/patch-stsoundlib_YmMusic.h
new file mode 100644
index 000000000000..eb34d1ea468c
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_YmMusic.h
@@ -0,0 +1,38 @@
+--- stsoundlib/YmMusic.h.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/YmMusic.h
+@@ -38,8 +38,6 @@
+ #include "Ymload.h"
+ #include "digidrum.h"
+
+-#define MAX_DIGIDRUM 128
+-
+ #define YMTPREC 16
+ #define MAX_VOICE 8
+ #define PC_DAC_FREQ 44100
+@@ -143,7 +141,7 @@ public:
+ int getAttrib(void);
+ void getMusicInfo(ymMusicInfo_t *pInfo);
+ void setLoopMode(ymbool bLoop);
+- char *getLastError(void);
++ const char *getLastError(void);
+ int readYmRegister(ymint reg) { return ymChip.readRegister(reg); }
+
+ //-------------------------------------------------------------
+@@ -159,7 +157,7 @@ private:
+
+ void setPlayerRate(int rate);
+ void setAttrib(int _attrib);
+- void setLastError(char *pError);
++ void setLastError(const char *pError);
+ ymu8 *depackFile(void);
+ ymbool deInterleave(void);
+ void readYm6Effect(ymu8 *pReg,int code,int prediv,int count);
+@@ -168,7 +166,7 @@ private:
+
+
+ CYm2149Ex ymChip;
+- char *pLastError;
++ const char *pLastError;
+ ymFile_t songType;
+ int nbFrame;
+ int loopFrame;
diff --git a/audio/stymulator/files/patch-stsoundlib_YmTypes.h b/audio/stymulator/files/patch-stsoundlib_YmTypes.h
new file mode 100644
index 000000000000..a88199d38fec
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_YmTypes.h
@@ -0,0 +1,84 @@
+--- stsoundlib/YmTypes.h.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/YmTypes.h
+@@ -44,45 +44,44 @@
+ // These settings are ok for Windows 32bits platform.
+
+ #ifdef YM_INTEGER_ONLY
+-typedef __int64 yms64;
++typedef __int64 yms64;
+ #else
+-typedef float ymfloat;
++typedef float ymfloat;
+ #endif
+
+-typedef signed char yms8; // 8 bits signed integer
+-typedef signed short yms16; // 16 bits signed integer
+-typedef signed long yms32; // 32 bits signed integer
++typedef signed char yms8; /* 8 bits signed integer */
++typedef signed short yms16; /* 16 bits signed integer */
++typedef signed long yms32; /* 32 bits signed integer */
+
+-typedef unsigned char ymu8; // 8 bits unsigned integer
+-typedef unsigned short ymu16; // 16 bits unsigned integer
+-typedef unsigned long ymu32; // 32 bits unsigned integer
++typedef unsigned char ymu8; /* 8 bits unsigned integer */
++typedef unsigned short ymu16; /* 16 bits unsigned integer */
++typedef unsigned long ymu32; /* 32 bits unsigned integer */
+
+-typedef int ymint; // Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32
++typedef int ymint; /* Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32 */
+
+-typedef char ymchar; // 8 bits char character (used for null terminated strings)
++typedef char ymchar; /* 8 bits char character (used for null terminated strings) */
+
+-#else // These settings are O.K. for GNU/Linux 32/64bit platforms (done by Grzegorz Tomasz Stanczyk)
++#else
++
++#include <stdint.h>
+
+ #ifdef YM_INTEGER_ONLY
+-typedef long long int yms64;
++typedef int64_t yms64;
+ #else
+-typedef float ymfloat;
++typedef float ymfloat;
+ #endif
+-typedef signed char yms8; // 8 bits signed integer
+-typedef signed short yms16; // 16 bits signed integer
+-//changed for 64bit GNU/Linux compatibility by Grzegorz Stanczyk (2007.03.06)
+-//typedef signed long yms32; // 32 bits signed integer
+-typedef signed int yms32; // 32 bits signed integer
+-
+-typedef unsigned char ymu8; // 8 bits unsigned integer
+-typedef unsigned short ymu16; // 16 bits unsigned integer
+-//changed for 64bit GNU/Linux compatibility by Grzegorz Stanczyk (2007.03.06)
+-//typedef unsigned long ymu32; // 32 bits unsigned integer
+-typedef unsigned int ymu32; // 32 bits unsigned integer
++typedef int8_t yms8; /* 8 bits signed integer */
++typedef int16_t yms16; /* 16 bits signed integer */
++typedef int32_t yms32; /* 32 bits signed integer */
+
+-typedef int ymint; // Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32
++typedef uint8_t ymu8; /* 8 bits unsigned integer */
++typedef uint16_t ymu16; /* 16 bits unsigned integer */
++typedef uint32_t ymu32; /* 32 bits unsigned integer */
+
+-typedef char ymchar; // 8 bits char character (used for null terminated strings)
++/* Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32 */
++/*typedef int32_t ymint; */
++typedef int ymint;
++typedef char ymchar; /* 8 bits char character (used for null terminated strings) */
+
+ #endif
+
+@@ -93,8 +92,8 @@ typedef char ymchar; // 8 bits char
+ //-----------------------------------------------------------
+ // Multi-platform
+ //-----------------------------------------------------------
+-typedef int ymbool; // boolean ( theorically nothing is assumed for its size in StSound,so keep using int)
+-typedef yms16 ymsample; // StSound emulator render mono 16bits signed PCM samples
++typedef int ymbool; /* boolean ( theorically nothing is assumed for its size in StSound,so keep using int) */
++typedef yms16 ymsample; /* StSound emulator render mono 16bits signed PCM samples */
+
+ #define YMFALSE (0)
+ #define YMTRUE (!YMFALSE)
diff --git a/audio/stymulator/files/patch-stsoundlib_Ymload.cpp b/audio/stymulator/files/patch-stsoundlib_Ymload.cpp
new file mode 100644
index 000000000000..e3b1d0dfbc49
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_Ymload.cpp
@@ -0,0 +1,647 @@
+--- stsoundlib/Ymload.cpp.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/Ymload.cpp
+@@ -51,61 +51,98 @@ static void signeSample(ymu8 *ptr,yms32
+ }
+ }
+
+-char *mstrdup(char *in)
++void myFree(void **pPtr)
++{
++ if (*pPtr) free(*pPtr);
++ *pPtr = NULL;
++}
++
++char *mstrdup(const char *in)
+ {
+ char *out = (char*)malloc(strlen(in)+1);
+ if (out) strcpy(out,in);
+ return out;
+ }
+
+-ymu32 readMotorolaDword(ymu8 **ptr)
++ymu32 readMotorolaDword(ymu8 **ptr, ymint *ptr_size)
+ {
+-ymu32 n;
++ymu32 n = 0;
+ ymu8 *p = *ptr;
+-
+- n = (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3];
+- p+=4;
+- *ptr = p;
++ if (*ptr_size>=4)
++ {
++ n = (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3];
++ p+=4;
++ *ptr = p;
++ }
++ (*ptr_size)+=4;
+ return n;
+ }
+
+-ymu16 readMotorolaWord(ymu8 **ptr)
++ymu16 readMotorolaWord(ymu8 **ptr, ymint *ptr_size)
+ {
+-ymu16 n;
++ymu16 n = 0;
+ ymu8 *p = *ptr;
+-
+- n = (p[0]<<8)|p[1];
+- p+=2;
+- *ptr = p;
++ if (*ptr_size>=2)
++ {
++ n = (p[0]<<8)|p[1];
++ p+=2;
++ *ptr = p;
++ }
++ (*ptr_size)+=2;
+ return n;
+ }
+
+-ymchar *readNtString(ymchar **ptr)
++ymchar *readNtString(ymchar **ptr, ymint *ptr_size)
+ {
+ ymchar *p;
++ymint len = 0;
+
+- p = mstrdup(*ptr);
+- (*ptr) += strlen(*ptr)+1;
++ if (*ptr_size<=0)
++ {
++ (*ptr_size)-=1;
++ return mstrdup("");
++ }
++ p=*ptr;
++ while(!*p)
++ {
++ p++;
++ ptr_size--;
++ len++;
++ if (*ptr_size==0)
++ {
++ (*ptr_size)-=1;
++ return mstrdup("");
++ }
++ }
++
++ p = mstrdup(*ptr);
++ (*ptr) += len+1;
+ return p;
+ }
+
+-yms32 ReadLittleEndian32(ymu8 *pLittle)
++yms32 ReadLittleEndian32(ymu8 *pLittle, ymint ptr_size)
+ {
+- yms32 v = ( (pLittle[0]<<0) |
++ yms32 v = 0;
++ if (ptr_size>=4)
++ {
++ v = ( (pLittle[0]<<0) |
+ (pLittle[1]<<8) |
+ (pLittle[2]<<16) |
+ (pLittle[3]<<24));
+-
++ }
+ return v;
+ }
+
+-yms32 ReadBigEndian32(ymu8 *pBig)
++yms32 ReadBigEndian32(ymu8 *pBig, ymint ptr_size)
+ {
+- yms32 v = ( (pBig[0]<<24) |
++ yms32 v = 0;
++ if (ptr_size>=4)
++ {
++ v = ( (pBig[0]<<24) |
+ (pBig[1]<<16) |
+ (pBig[2]<<8) |
+- (pBig[3]<<0));
+-
++ (pBig[3]<<0));
++ }
+ return v;
+ }
+
+@@ -114,6 +151,13 @@ unsigned char *CYmMusic::depackFile(void
+ lzhHeader_t *pHeader;
+ ymu8 *pNew;
+ ymu8 *pSrc;
++ ymint ptr_left = fileSize;
++ ymint dummy;
++
++ if (ptr_left < (ymint)sizeof(lzhHeader_t))
++ {
++ return pBigMalloc;
++ }
+
+ pHeader = (lzhHeader_t*)pBigMalloc;
+
+@@ -123,8 +167,6 @@ unsigned char *CYmMusic::depackFile(void
+ return pBigMalloc;
+ }
+
+- fileSize = (ymu32)-1;
+-
+ if (pHeader->level != 0) // NOTE: Endianness works because value is 0
+ { // Compression LH5, header !=0 : Error.
+ free(pBigMalloc);
+@@ -133,7 +175,8 @@ unsigned char *CYmMusic::depackFile(void
+ return NULL;
+ }
+
+- fileSize = ReadLittleEndian32((ymu8*)&pHeader->original);
++ dummy = 4;
++ fileSize = ReadLittleEndian32((ymu8*)&pHeader->original, dummy);
+ pNew = (ymu8*)malloc(fileSize);
+ if (!pNew)
+ {
+@@ -144,10 +187,20 @@ unsigned char *CYmMusic::depackFile(void
+ }
+
+ pSrc = pBigMalloc+sizeof(lzhHeader_t)+pHeader->name_lenght; // NOTE: Endianness works because name_lenght is a byte
++ ptr_left -= sizeof(lzhHeader_t)+pHeader->name_lenght;
+
+ pSrc += 2; // skip CRC16
++ ptr_left -= 2;
+
+- const int packedSize = ReadLittleEndian32((ymu8*)&pHeader->packed);
++ dummy = 4;
++ const int packedSize = ReadLittleEndian32((ymu8*)&pHeader->packed, dummy);
++
++ if (packedSize > ptr_left)
++ {
++ setLastError("File too small");
++ free(pNew);
++ return pBigMalloc;
++ }
+
+ // alloc space for depacker and depack data
+ CLzhDepacker *pDepacker = new CLzhDepacker;
+@@ -229,19 +282,29 @@ ymbool CYmMusic::ymDecode(void)
+ {
+ ymu8 *pUD;
+ ymu8 *ptr;
++ ymint ptr_size = fileSize;
+ ymint skip;
+ ymint i;
+ ymu32 sampleSize;
+ yms32 tmp;
+ ymu32 id;
+-
+
+- id = ReadBigEndian32((unsigned char*)pBigMalloc);
++ if (ptr_size < 4)
++ {
++ setLastError("File too small");
++ return YMFALSE;
++ }
++ id = ReadBigEndian32((unsigned char*)pBigMalloc, ptr_size);
+ switch (id)
+ {
+- case 'YM2!': // MADMAX specific.
++ case 0x594d3221 /*'YM2!'*/: // MADMAX specific.
+ songType = YM_V2;
+ nbFrame = (fileSize-4)/14;
++ if (nbFrame == 0)
++ {
++ setLastError("No frames in file");
++ return YMFALSE;
++ }
+ loopFrame = 0;
+ ymChip.setClock(ATARI_CLOCK);
+ setPlayerRate(50);
+@@ -256,9 +319,14 @@ ymbool CYmMusic::ymDecode(void)
+ pSongPlayer = mstrdup("YM-Chip driver.");
+ break;
+
+- case 'YM3!': // Standart YM-Atari format.
++ case 0x594d3321 /*'YM3!'*/: // Standart YM-Atari format.
+ songType = YM_V3;
+ nbFrame = (fileSize-4)/14;
++ if (nbFrame == 0)
++ {
++ setLastError("No frames in file");
++ return YMFALSE;
++ }
+ loopFrame = 0;
+ ymChip.setClock(ATARI_CLOCK);
+ setPlayerRate(50);
+@@ -273,11 +341,24 @@ ymbool CYmMusic::ymDecode(void)
+ pSongPlayer = mstrdup("YM-Chip driver.");
+ break;
+
+- case 'YM3b': // Standart YM-Atari format + Loop info.
++ case 0x594d3362 /*'YM3b'*/: // Standart YM-Atari format + Loop info.
++ if (ptr_size < 4)
++ {
++ setLastError("File too small");
++ return YMFALSE;
++ }
+ pUD = (ymu8*)(pBigMalloc+fileSize-4);
+ songType = YM_V3;
+- nbFrame = (fileSize-4)/14;
+- loopFrame = ReadLittleEndian32(pUD);
++ nbFrame = (fileSize-8)/14;
++ if (nbFrame == 0)
++ {
++ setLastError("No frames in file");
++ return YMFALSE;
++ }
++ {
++ ymint dummy = 4;
++ loopFrame = ReadLittleEndian32(pUD, dummy);
++ }
+ ymChip.setClock(ATARI_CLOCK);
+ setPlayerRate(50);
+ pDataStream = pBigMalloc+4;
+@@ -291,35 +372,62 @@ ymbool CYmMusic::ymDecode(void)
+ pSongPlayer = mstrdup("YM-Chip driver.");
+ break;
+
+- case 'YM4!': // Extended ATARI format.
++ case 0x594d3421 /*'YM4!'*/: // Extended ATARI format.
+ setLastError("No more YM4! support. Use YM5! format.");
+ return YMFALSE;
+ break;
+
+- case 'YM5!': // Extended YM2149 format, all machines.
+- case 'YM6!': // Extended YM2149 format, all machines.
++ case 0x594d3521 /*'YM5!'*/: // Extended YM2149 format, all machines.
++ case 0x594d3621 /*'YM6!'*/: // Extended YM2149 format, all machines.
++ if (ptr_size < 12)
++ {
++ setLastError("File too small");
++ return YMFALSE;
++ }
+ if (strncmp((const char*)(pBigMalloc+4),"LeOnArD!",8))
+ {
+ setLastError("Not a valid YM format !");
+ return YMFALSE;
+ }
+ ptr = pBigMalloc+12;
+- nbFrame = readMotorolaDword(&ptr);
+- setAttrib(readMotorolaDword(&ptr));
+- nbDrum = readMotorolaWord(&ptr);
+- ymChip.setClock(readMotorolaDword(&ptr));
+- setPlayerRate(readMotorolaWord(&ptr));
+- loopFrame = readMotorolaDword(&ptr);
+- skip = readMotorolaWord(&ptr);
++ ptr_size -= 12;
++ nbFrame = readMotorolaDword(&ptr, &ptr_size);
++ setAttrib(readMotorolaDword(&ptr, &ptr_size));
++ nbDrum = readMotorolaWord(&ptr, &ptr_size);
++ ymChip.setClock(readMotorolaDword(&ptr, &ptr_size));
++ setPlayerRate(readMotorolaWord(&ptr, &ptr_size));
++ loopFrame = readMotorolaDword(&ptr, &ptr_size);
++ skip = readMotorolaWord(&ptr, &ptr_size);
+ ptr += skip;
++ ptr_size -= skip;
++ if (ptr_size <= 0)
++ {
++ setLastError("File too small");
++ return YMFALSE;
++ }
+ if (nbDrum>0)
+ {
+- pDrumTab=(digiDrum_t*)malloc(nbDrum*sizeof(digiDrum_t));
++ pDrumTab=(digiDrum_t*)calloc(nbDrum, sizeof(digiDrum_t));
+ for (i=0;i<nbDrum;i++)
+ {
+- pDrumTab[i].size = readMotorolaDword(&ptr);
++ pDrumTab[i].size = readMotorolaDword(&ptr, &ptr_size);
++ if (ptr_size <= 0)
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
+ if (pDrumTab[i].size)
+ {
++ if (pDrumTab[i].size >= 0x80000000)
++ {
++ setLastError("To big drumtab");
++ goto error_out;
++ }
++ if (ptr_size<(ymint)pDrumTab[i].size)
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
+ pDrumTab[i].pData = (ymu8*)malloc(pDrumTab[i].size);
+ memcpy(pDrumTab[i].pData,ptr,pDrumTab[i].size);
+ if (attrib&A_DRUM4BITS)
+@@ -328,23 +436,26 @@ ymbool CYmMusic::ymDecode(void)
+ ymu8 *pw = pDrumTab[i].pData;
+ for (j=0;j<pDrumTab[i].size;j++)
+ {
+- *pw++ = ymVolumeTable[(*pw)&15]>>7;
++ *pw = ymVolumeTable[(*pw)&15]>>7;
++ pw++;
+ }
+ }
+ ptr += pDrumTab[i].size;
+- }
+- else
+- {
+- pDrumTab[i].pData = NULL;
++ ptr_size -= pDrumTab[i].size;
+ }
+ }
+ attrib &= (~A_DRUM4BITS);
+ }
+- pSongName = readNtString((char**)&ptr);
+- pSongAuthor = readNtString((char**)&ptr);
+- pSongComment = readNtString((char**)&ptr);
++ pSongName = readNtString((char**)&ptr, &ptr_size);
++ pSongAuthor = readNtString((char**)&ptr, &ptr_size);
++ pSongComment = readNtString((char**)&ptr, &ptr_size);
++ if (ptr_size <= 0)
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
+ songType = YM_V5;
+- if (id=='YM6!')
++ if (id==0x594d3621/*'YM6!'*/)
+ {
+ songType = YM_V6;
+ pSongType = mstrdup("YM 6");
+@@ -353,13 +464,28 @@ ymbool CYmMusic::ymDecode(void)
+ {
+ pSongType = mstrdup("YM 5");
+ }
++ if ((nbFrame >= 0x08000000) || (nbFrame < 0))
++ {
++ setLastError("Too many frames");
++ goto error_out;
++ }
++ if (ptr_size < (ymint)(nbFrame * 16))
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
+ pDataStream = ptr;
+ streamInc = 16;
+ setAttrib(A_STREAMINTERLEAVED|A_TIMECONTROL);
+ pSongPlayer = mstrdup("YM-Chip driver.");
+ break;
+
+- case 'MIX1': // ATARI Remix digit format.
++ case 0x4d495831 /*'MIX1'*/: // ATARI Remix digit format.
++ if (ptr_size < 12)
++ {
++ setLastError("File too small");
++ return YMFALSE;
++ }
+
+ if (strncmp((const char*)(pBigMalloc+4),"LeOnArD!",8))
+ {
+@@ -367,23 +493,50 @@ ymbool CYmMusic::ymDecode(void)
+ return YMFALSE;
+ }
+ ptr = pBigMalloc+12;
++ ptr_size -= 12;
+ songType = YM_MIX1;
+- tmp = readMotorolaDword(&ptr);
++ tmp = readMotorolaDword(&ptr, &ptr_size);
+ setAttrib(0);
+ if (tmp&1) setAttrib(A_DRUMSIGNED);
+- sampleSize = readMotorolaDword(&ptr);
+- nbMixBlock = readMotorolaDword(&ptr);
++ sampleSize = readMotorolaDword(&ptr, &ptr_size);
++ nbMixBlock = readMotorolaDword(&ptr, &ptr_size);
++ if (ptr_size <= 0)
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
++ if (sampleSize <= 0)
++ {
++ setLastError("Invalid sampleSize");
++ goto error_out;
++ }
++ if (nbMixBlock <= 0)
++ {
++ setLastError("Invalid number of mixblocks");
++ goto error_out;
++ }
+ pMixBlock = (mixBlock_t*)malloc(nbMixBlock*sizeof(mixBlock_t));
+ for (i=0;i<nbMixBlock;i++)
+ { // Lecture des block-infos.
+- pMixBlock[i].sampleStart = readMotorolaDword(&ptr);
+- pMixBlock[i].sampleLength = readMotorolaDword(&ptr);
+- pMixBlock[i].nbRepeat = readMotorolaWord(&ptr);
+- pMixBlock[i].replayFreq = readMotorolaWord(&ptr);
++ pMixBlock[i].sampleStart = readMotorolaDword(&ptr, &ptr_size);
++ pMixBlock[i].sampleLength = readMotorolaDword(&ptr, &ptr_size);
++ pMixBlock[i].nbRepeat = readMotorolaWord(&ptr, &ptr_size);
++ pMixBlock[i].replayFreq = readMotorolaWord(&ptr, &ptr_size);
++ }
++ pSongName = readNtString((char**)&ptr, &ptr_size);
++ pSongAuthor = readNtString((char**)&ptr, &ptr_size);
++ pSongComment = readNtString((char**)&ptr, &ptr_size);
++
++ if (sampleSize>=0x80000000)
++ {
++ setLastError("Invalid sampleSize");
++ goto error_out;
++ }
++ if (ptr_size < (ymint)sampleSize)
++ {
++ setLastError("File too small");
++ goto error_out;
+ }
+- pSongName = readNtString((char**)&ptr);
+- pSongAuthor = readNtString((char**)&ptr);
+- pSongComment = readNtString((char**)&ptr);
+
+ pBigSampleBuffer = (unsigned char*)malloc(sampleSize);
+ memcpy(pBigSampleBuffer,ptr,sampleSize);
+@@ -400,8 +553,8 @@ ymbool CYmMusic::ymDecode(void)
+
+ break;
+
+- case 'YMT1': // YM-Tracker
+- case 'YMT2': // YM-Tracker
++ case 0x594d5431 /*'YMT1'*/: // YM-Tracker
++ case 0x594d5432 /*'YMT2'*/: // YM-Tracker
+ /*;
+ ; Format du YM-Tracker-1
+ ;
+@@ -418,33 +571,55 @@ ymbool CYmMusic::ymDecode(void)
+ ; NT Music comment
+ ; nb digi *
+ */
++ if (ptr_size < 12)
++ {
++ setLastError("File too small");
++ return YMFALSE;
++ }
++
+ if (strncmp((const char*)(pBigMalloc+4),"LeOnArD!",8))
+ {
+ setLastError("Not a valid YM format !");
+ return YMFALSE;
+ }
+ ptr = pBigMalloc+12;
++ ptr_size -= 12;
+ songType = YM_TRACKER1;
+- nbVoice = readMotorolaWord(&ptr);
+- setPlayerRate(readMotorolaWord(&ptr));
+- nbFrame= readMotorolaDword(&ptr);
+- loopFrame = readMotorolaDword(&ptr);
+- nbDrum = readMotorolaWord(&ptr);
+- attrib = readMotorolaDword(&ptr);
+- pSongName = readNtString((char**)&ptr);
+- pSongAuthor = readNtString((char**)&ptr);
+- pSongComment = readNtString((char**)&ptr);
++ nbVoice = readMotorolaWord(&ptr, &ptr_size);
++ setPlayerRate(readMotorolaWord(&ptr, &ptr_size));
++ nbFrame= readMotorolaDword(&ptr, &ptr_size);
++ loopFrame = readMotorolaDword(&ptr, &ptr_size);
++ nbDrum = readMotorolaWord(&ptr, &ptr_size);
++ attrib = readMotorolaDword(&ptr, &ptr_size);
++ pSongName = readNtString((char**)&ptr, &ptr_size);
++ pSongAuthor = readNtString((char**)&ptr, &ptr_size);
++ pSongComment = readNtString((char**)&ptr, &ptr_size);
++ if (ptr_size < 0)
++ {
++ setLastError("File too small");
++ return YMFALSE;
++ }
+ if (nbDrum>0)
+ {
+- pDrumTab=(digiDrum_t*)malloc(nbDrum*sizeof(digiDrum_t));
++ pDrumTab=(digiDrum_t*)calloc(nbDrum, sizeof(digiDrum_t));
+ for (i=0;i<(ymint)nbDrum;i++)
+ {
+- pDrumTab[i].size = readMotorolaWord(&ptr);
++ pDrumTab[i].size = readMotorolaWord(&ptr, &ptr_size);
++ if (ptr_size < 0)
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
+ pDrumTab[i].repLen = pDrumTab[i].size;
+- if ('YMT2' == id)
++ if (0x594d5432/*'YMT2'*/ == id)
+ {
+- pDrumTab[i].repLen = readMotorolaWord(&ptr); // repLen
+- readMotorolaWord(&ptr); // flag
++ pDrumTab[i].repLen = readMotorolaWord(&ptr, &ptr_size); // repLen
++ readMotorolaWord(&ptr, &ptr_size); // flag
++ if (ptr_size < 0)
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
+ }
+ if (pDrumTab[i].repLen>pDrumTab[i].size)
+ {
+@@ -453,19 +628,27 @@ ymbool CYmMusic::ymDecode(void)
+
+ if (pDrumTab[i].size)
+ {
++ if (pDrumTab[i].size >= 0x80000000)
++ {
++ setLastError("Drumtab to big");
++ goto error_out;
++ }
++ if (ptr_size<(ymint)pDrumTab[i].size)
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
++
+ pDrumTab[i].pData = (ymu8*)malloc(pDrumTab[i].size);
+ memcpy(pDrumTab[i].pData,ptr,pDrumTab[i].size);
+ ptr += pDrumTab[i].size;
+- }
+- else
+- {
+- pDrumTab[i].pData = NULL;
++ ptr_size -= pDrumTab[i].size;
+ }
+ }
+ }
+
+ ymTrackerFreqShift = 0;
+- if ('YMT2' == id)
++ if (0x594d5432/*'YMT2'*/ == id)
+ {
+ ymTrackerFreqShift = (attrib>>28)&15;
+ attrib &= 0x0fffffff;
+@@ -476,18 +659,33 @@ ymbool CYmMusic::ymDecode(void)
+ pSongType = mstrdup("YM-T1");
+ }
+
++ if ((nbVoice > MAX_VOICE) || (nbVoice < 0))
++ {
++ setLastError("Too many voices");
++ goto error_out;
++ }
++ if ((nbFrame >= (ymint)(0x80000000 / (MAX_VOICE * (sizeof(ymTrackerLine_t))))) || (nbFrame < 0)) /* ymTrackerLine_t has a 2^N size */
++ {
++ setLastError("Too many frames");
++ goto error_out;
++ }
++ if (ptr_size < (ymint)(sizeof(ymTrackerLine_t) * nbVoice * nbFrame))
++ {
++ setLastError("File too small");
++ goto error_out;
++ }
+
+ pDataStream = ptr;
+ ymChip.setClock(ATARI_CLOCK);
+
+ ymTrackerInit(100); // 80% de volume maxi.
+- streamInc = 16;
++ streamInc = 16; /* not needed, since this is only used for YMx formats */
+ setTimeControl(YMTRUE);
+ pSongPlayer = mstrdup("Universal Tracker");
+ break;
+
+ default:
+- setLastError("Unknow YM format !");
++ setLastError("Unknown YM format !");
+ return YMFALSE;
+ break;
+ }
+@@ -498,6 +696,25 @@ ymbool CYmMusic::ymDecode(void)
+ }
+
+ return YMTRUE;
++error_out:
++ for (i=0;i<nbDrum;i++)
++ {
++ if (pDrumTab[i].pData)
++ myFree((void **)&pDrumTab[i].pData);
++ }
++ if (nbDrum>0)
++ {
++ myFree((void **)&pDrumTab);
++ nbDrum=0;
++ }
++ myFree((void **)&pSongName);
++ myFree((void **)&pSongAuthor);
++ myFree((void **)&pSongComment);
++ myFree((void **)&pSongType); /* <- never needed, but we keep it for purity */
++ myFree((void **)&pSongPlayer); /* <- never needed, but we keep it for purity */
++ myFree((void **)&pMixBlock);
++ myFree((void **)&pBigSampleBuffer); /* <- never needed, but we keep it for purity */
++ return YMFALSE;
+ }
+
+
+@@ -645,12 +862,6 @@ ymbool CYmMusic::loadMemory(void *pBlock
+ return YMTRUE;
+ }
+
+-void myFree(void **pPtr)
+-{
+- if (*pPtr) free(*pPtr);
+- *pPtr = NULL;
+-}
+-
+ void CYmMusic::unLoad(void)
+ {
+
diff --git a/audio/stymulator/files/patch-stsoundlib__Makefile b/audio/stymulator/files/patch-stsoundlib__Makefile
deleted file mode 100644
index 7d8dc3ce0845..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
---- ./stsoundlib/Makefile.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/Makefile 2010-04-23 13:49:47.000000000 +0200
-@@ -1,28 +1,28 @@
--CC = g++
-+CXX ?= g++
- AR = ar cr
- RM = rm -f
-
- LIB = digidrum.o Ymload.o Ym2149Ex.o YmMusic.o YmUserInterface.o
-
--CFLAGS = -Wall
-+CFLAGS ?= -Wall
-
- libym.a: $(LIB)
- $(AR) libym.a $(LIB)
-
- digidrum.o: digidrum.cpp YmTypes.h
-- $(CC) -c digidrum.cpp
-+ $(CXX) $(CXXFLAGS) -c digidrum.cpp
-
- Ym2149Ex.o: Ym2149Ex.cpp Ym2149Ex.h YmTypes.h
-- $(CC) -c Ym2149Ex.cpp
-+ $(CXX) $(CXXFLAGS) -c Ym2149Ex.cpp
-
- Ymload.o: Ymload.cpp YmMusic.h lzh/lzh.h
-- $(CC) -c Ymload.cpp
-+ $(CXX) $(CXXFLAGS) -c Ymload.cpp
-
- YmMusic.o: YmMusic.cpp YmMusic.h
-- $(CC) -c YmMusic.cpp
-+ $(CXX) $(CXXFLAGS) -c YmMusic.cpp
-
- YmUserInterface.o: YmUserInterface.cpp StSoundLibrary.h YmMusic.h
-- $(CC) -c YmUserInterface.cpp
-+ $(CXX) $(CXXFLAGS) -c YmUserInterface.cpp
-
- clean:
- $(RM) *~ *.o *.a
diff --git a/audio/stymulator/files/patch-stsoundlib__YmMusic.cpp b/audio/stymulator/files/patch-stsoundlib__YmMusic.cpp
deleted file mode 100644
index cbb57e079fc6..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__YmMusic.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
---- ./stsoundlib/YmMusic.cpp.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/YmMusic.cpp 2010-04-23 13:50:07.000000000 +0200
-@@ -167,12 +167,12 @@
- return getAttrib()&A_TIMECONTROL;
- }
-
--void CYmMusic::setLastError(char *pError)
-+void CYmMusic::setLastError(const char *pError)
- {
- pLastError = pError;
- }
-
--char *CYmMusic::getLastError(void)
-+const char *CYmMusic::getLastError(void)
- {
- return pLastError;
- }
-@@ -364,11 +364,14 @@
-
- if (ptr[12])
- {
-- sampleFrq = (MFP_CLOCK / ptr[12]);
-- ymChip.drumStart( 2, // Voice C
-- sampleAdress[sampleNum],
-- sampleLen[sampleNum],
-- sampleFrq);
-+ if (sampleNum < MAX_DIGIDRUM)
-+ {
-+ sampleFrq = (MFP_CLOCK / ptr[12]);
-+ ymChip.drumStart( 2, // Voice C
-+ sampleAdress[sampleNum],
-+ sampleLen[sampleNum],
-+ sampleFrq);
-+ }
- }
- }
- }
-@@ -612,7 +615,6 @@
- for (i=0;i<nbVoice;i++)
- {
- ymint n;
-- ymint freq =
- pVoice[i].sampleFreq = ((ymint)pLine->freqHigh<<8) | pLine->freqLow;
- if (pVoice[i].sampleFreq)
- {
-@@ -677,7 +679,7 @@
- #ifdef _LINEAR_OVRS
- ymint vb = va;
- if (samplePos < (sampleEnd-(1<<YMTPREC)))
-- ymint vb = pVolumeTab[pSample[(samplePos>>YMTPREC)+1]];
-+ vb = pVolumeTab[pSample[(samplePos>>YMTPREC)+1]];
- ymint frac = samplePos & ((1<<YMTPREC)-1);
- va += (((vb-va)*frac)>>YMTPREC);
- #endif
diff --git a/audio/stymulator/files/patch-stsoundlib__YmMusic.h b/audio/stymulator/files/patch-stsoundlib__YmMusic.h
deleted file mode 100644
index 826e8d009902..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__YmMusic.h
+++ /dev/null
@@ -1,38 +0,0 @@
---- ./stsoundlib/YmMusic.h.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/YmMusic.h 2010-04-23 13:50:07.000000000 +0200
-@@ -38,8 +38,6 @@
- #include "Ymload.h"
- #include "digidrum.h"
-
--#define MAX_DIGIDRUM 128
--
- #define YMTPREC 16
- #define MAX_VOICE 8
- #define PC_DAC_FREQ 44100
-@@ -143,7 +141,7 @@
- int getAttrib(void);
- void getMusicInfo(ymMusicInfo_t *pInfo);
- void setLoopMode(ymbool bLoop);
-- char *getLastError(void);
-+ const char *getLastError(void);
- int readYmRegister(ymint reg) { return ymChip.readRegister(reg); }
-
- //-------------------------------------------------------------
-@@ -159,7 +157,7 @@
-
- void setPlayerRate(int rate);
- void setAttrib(int _attrib);
-- void setLastError(char *pError);
-+ void setLastError(const char *pError);
- ymu8 *depackFile(void);
- ymbool deInterleave(void);
- void readYm6Effect(ymu8 *pReg,int code,int prediv,int count);
-@@ -168,7 +166,7 @@
-
-
- CYm2149Ex ymChip;
-- char *pLastError;
-+ const char *pLastError;
- ymFile_t songType;
- int nbFrame;
- int loopFrame;
diff --git a/audio/stymulator/files/patch-stsoundlib__YmTypes.h b/audio/stymulator/files/patch-stsoundlib__YmTypes.h
deleted file mode 100644
index 5cdc7b12484d..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__YmTypes.h
+++ /dev/null
@@ -1,84 +0,0 @@
---- ./stsoundlib/YmTypes.h.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/YmTypes.h 2010-04-23 13:49:47.000000000 +0200
-@@ -44,45 +44,44 @@
- // These settings are ok for Windows 32bits platform.
-
- #ifdef YM_INTEGER_ONLY
--typedef __int64 yms64;
-+typedef __int64 yms64;
- #else
--typedef float ymfloat;
-+typedef float ymfloat;
- #endif
-
--typedef signed char yms8; // 8 bits signed integer
--typedef signed short yms16; // 16 bits signed integer
--typedef signed long yms32; // 32 bits signed integer
-+typedef signed char yms8; /* 8 bits signed integer */
-+typedef signed short yms16; /* 16 bits signed integer */
-+typedef signed long yms32; /* 32 bits signed integer */
-
--typedef unsigned char ymu8; // 8 bits unsigned integer
--typedef unsigned short ymu16; // 16 bits unsigned integer
--typedef unsigned long ymu32; // 32 bits unsigned integer
-+typedef unsigned char ymu8; /* 8 bits unsigned integer */
-+typedef unsigned short ymu16; /* 16 bits unsigned integer */
-+typedef unsigned long ymu32; /* 32 bits unsigned integer */
-
--typedef int ymint; // Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32
-+typedef int ymint; /* Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32 */
-
--typedef char ymchar; // 8 bits char character (used for null terminated strings)
-+typedef char ymchar; /* 8 bits char character (used for null terminated strings) */
-
--#else // These settings are O.K. for GNU/Linux 32/64bit platforms (done by Grzegorz Tomasz Stanczyk)
-+#else
-+
-+#include <stdint.h>
-
- #ifdef YM_INTEGER_ONLY
--typedef long long int yms64;
-+typedef int64_t yms64;
- #else
--typedef float ymfloat;
-+typedef float ymfloat;
- #endif
--typedef signed char yms8; // 8 bits signed integer
--typedef signed short yms16; // 16 bits signed integer
--//changed for 64bit GNU/Linux compatibility by Grzegorz Stanczyk (2007.03.06)
--//typedef signed long yms32; // 32 bits signed integer
--typedef signed int yms32; // 32 bits signed integer
--
--typedef unsigned char ymu8; // 8 bits unsigned integer
--typedef unsigned short ymu16; // 16 bits unsigned integer
--//changed for 64bit GNU/Linux compatibility by Grzegorz Stanczyk (2007.03.06)
--//typedef unsigned long ymu32; // 32 bits unsigned integer
--typedef unsigned int ymu32; // 32 bits unsigned integer
-+typedef int8_t yms8; /* 8 bits signed integer */
-+typedef int16_t yms16; /* 16 bits signed integer */
-+typedef int32_t yms32; /* 32 bits signed integer */
-
--typedef int ymint; // Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32
-+typedef uint8_t ymu8; /* 8 bits unsigned integer */
-+typedef uint16_t ymu16; /* 16 bits unsigned integer */
-+typedef uint32_t ymu32; /* 32 bits unsigned integer */
-
--typedef char ymchar; // 8 bits char character (used for null terminated strings)
-+/* Native "int" for speed purpose. StSound suppose int is signed and at least 32bits. If not, change it to match to yms32 */
-+/*typedef int32_t ymint; */
-+typedef int ymint;
-+typedef char ymchar; /* 8 bits char character (used for null terminated strings) */
-
- #endif
-
-@@ -93,8 +92,8 @@
- //-----------------------------------------------------------
- // Multi-platform
- //-----------------------------------------------------------
--typedef int ymbool; // boolean ( theorically nothing is assumed for its size in StSound,so keep using int)
--typedef yms16 ymsample; // StSound emulator render mono 16bits signed PCM samples
-+typedef int ymbool; /* boolean ( theorically nothing is assumed for its size in StSound,so keep using int) */
-+typedef yms16 ymsample; /* StSound emulator render mono 16bits signed PCM samples */
-
- #define YMFALSE (0)
- #define YMTRUE (!YMFALSE)
diff --git a/audio/stymulator/files/patch-stsoundlib__Ymload.cpp b/audio/stymulator/files/patch-stsoundlib__Ymload.cpp
deleted file mode 100644
index 9b5bd81f3e2c..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__Ymload.cpp
+++ /dev/null
@@ -1,647 +0,0 @@
---- ./stsoundlib/Ymload.cpp.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/Ymload.cpp 2010-04-23 13:50:07.000000000 +0200
-@@ -51,61 +51,98 @@
- }
- }
-
--char *mstrdup(char *in)
-+void myFree(void **pPtr)
-+{
-+ if (*pPtr) free(*pPtr);
-+ *pPtr = NULL;
-+}
-+
-+char *mstrdup(const char *in)
- {
- char *out = (char*)malloc(strlen(in)+1);
- if (out) strcpy(out,in);
- return out;
- }
-
--ymu32 readMotorolaDword(ymu8 **ptr)
-+ymu32 readMotorolaDword(ymu8 **ptr, ymint *ptr_size)
- {
--ymu32 n;
-+ymu32 n = 0;
- ymu8 *p = *ptr;
--
-- n = (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3];
-- p+=4;
-- *ptr = p;
-+ if (*ptr_size>=4)
-+ {
-+ n = (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3];
-+ p+=4;
-+ *ptr = p;
-+ }
-+ (*ptr_size)+=4;
- return n;
- }
-
--ymu16 readMotorolaWord(ymu8 **ptr)
-+ymu16 readMotorolaWord(ymu8 **ptr, ymint *ptr_size)
- {
--ymu16 n;
-+ymu16 n = 0;
- ymu8 *p = *ptr;
--
-- n = (p[0]<<8)|p[1];
-- p+=2;
-- *ptr = p;
-+ if (*ptr_size>=2)
-+ {
-+ n = (p[0]<<8)|p[1];
-+ p+=2;
-+ *ptr = p;
-+ }
-+ (*ptr_size)+=2;
- return n;
- }
-
--ymchar *readNtString(ymchar **ptr)
-+ymchar *readNtString(ymchar **ptr, ymint *ptr_size)
- {
- ymchar *p;
-+ymint len = 0;
-
-- p = mstrdup(*ptr);
-- (*ptr) += strlen(*ptr)+1;
-+ if (*ptr_size<=0)
-+ {
-+ (*ptr_size)-=1;
-+ return mstrdup("");
-+ }
-+ p=*ptr;
-+ while(!*p)
-+ {
-+ p++;
-+ ptr_size--;
-+ len++;
-+ if (*ptr_size==0)
-+ {
-+ (*ptr_size)-=1;
-+ return mstrdup("");
-+ }
-+ }
-+
-+ p = mstrdup(*ptr);
-+ (*ptr) += len+1;
- return p;
- }
-
--yms32 ReadLittleEndian32(ymu8 *pLittle)
-+yms32 ReadLittleEndian32(ymu8 *pLittle, ymint ptr_size)
- {
-- yms32 v = ( (pLittle[0]<<0) |
-+ yms32 v = 0;
-+ if (ptr_size>=4)
-+ {
-+ v = ( (pLittle[0]<<0) |
- (pLittle[1]<<8) |
- (pLittle[2]<<16) |
- (pLittle[3]<<24));
--
-+ }
- return v;
- }
-
--yms32 ReadBigEndian32(ymu8 *pBig)
-+yms32 ReadBigEndian32(ymu8 *pBig, ymint ptr_size)
- {
-- yms32 v = ( (pBig[0]<<24) |
-+ yms32 v = 0;
-+ if (ptr_size>=4)
-+ {
-+ v = ( (pBig[0]<<24) |
- (pBig[1]<<16) |
- (pBig[2]<<8) |
-- (pBig[3]<<0));
--
-+ (pBig[3]<<0));
-+ }
- return v;
- }
-
-@@ -114,6 +151,13 @@
- lzhHeader_t *pHeader;
- ymu8 *pNew;
- ymu8 *pSrc;
-+ ymint ptr_left = fileSize;
-+ ymint dummy;
-+
-+ if (ptr_left < (ymint)sizeof(lzhHeader_t))
-+ {
-+ return pBigMalloc;
-+ }
-
- pHeader = (lzhHeader_t*)pBigMalloc;
-
-@@ -123,8 +167,6 @@
- return pBigMalloc;
- }
-
-- fileSize = (ymu32)-1;
--
- if (pHeader->level != 0) // NOTE: Endianness works because value is 0
- { // Compression LH5, header !=0 : Error.
- free(pBigMalloc);
-@@ -133,7 +175,8 @@
- return NULL;
- }
-
-- fileSize = ReadLittleEndian32((ymu8*)&pHeader->original);
-+ dummy = 4;
-+ fileSize = ReadLittleEndian32((ymu8*)&pHeader->original, dummy);
- pNew = (ymu8*)malloc(fileSize);
- if (!pNew)
- {
-@@ -144,10 +187,20 @@
- }
-
- pSrc = pBigMalloc+sizeof(lzhHeader_t)+pHeader->name_lenght; // NOTE: Endianness works because name_lenght is a byte
-+ ptr_left -= sizeof(lzhHeader_t)+pHeader->name_lenght;
-
- pSrc += 2; // skip CRC16
-+ ptr_left -= 2;
-
-- const int packedSize = ReadLittleEndian32((ymu8*)&pHeader->packed);
-+ dummy = 4;
-+ const int packedSize = ReadLittleEndian32((ymu8*)&pHeader->packed, dummy);
-+
-+ if (packedSize > ptr_left)
-+ {
-+ setLastError("File too small");
-+ free(pNew);
-+ return pBigMalloc;
-+ }
-
- // alloc space for depacker and depack data
- CLzhDepacker *pDepacker = new CLzhDepacker;
-@@ -229,19 +282,29 @@
- {
- ymu8 *pUD;
- ymu8 *ptr;
-+ ymint ptr_size = fileSize;
- ymint skip;
- ymint i;
- ymu32 sampleSize;
- yms32 tmp;
- ymu32 id;
--
-
-- id = ReadBigEndian32((unsigned char*)pBigMalloc);
-+ if (ptr_size < 4)
-+ {
-+ setLastError("File too small");
-+ return YMFALSE;
-+ }
-+ id = ReadBigEndian32((unsigned char*)pBigMalloc, ptr_size);
- switch (id)
- {
-- case 'YM2!': // MADMAX specific.
-+ case 0x594d3221 /*'YM2!'*/: // MADMAX specific.
- songType = YM_V2;
- nbFrame = (fileSize-4)/14;
-+ if (nbFrame == 0)
-+ {
-+ setLastError("No frames in file");
-+ return YMFALSE;
-+ }
- loopFrame = 0;
- ymChip.setClock(ATARI_CLOCK);
- setPlayerRate(50);
-@@ -256,9 +319,14 @@
- pSongPlayer = mstrdup("YM-Chip driver.");
- break;
-
-- case 'YM3!': // Standart YM-Atari format.
-+ case 0x594d3321 /*'YM3!'*/: // Standart YM-Atari format.
- songType = YM_V3;
- nbFrame = (fileSize-4)/14;
-+ if (nbFrame == 0)
-+ {
-+ setLastError("No frames in file");
-+ return YMFALSE;
-+ }
- loopFrame = 0;
- ymChip.setClock(ATARI_CLOCK);
- setPlayerRate(50);
-@@ -273,11 +341,24 @@
- pSongPlayer = mstrdup("YM-Chip driver.");
- break;
-
-- case 'YM3b': // Standart YM-Atari format + Loop info.
-+ case 0x594d3362 /*'YM3b'*/: // Standart YM-Atari format + Loop info.
-+ if (ptr_size < 4)
-+ {
-+ setLastError("File too small");
-+ return YMFALSE;
-+ }
- pUD = (ymu8*)(pBigMalloc+fileSize-4);
- songType = YM_V3;
-- nbFrame = (fileSize-4)/14;
-- loopFrame = ReadLittleEndian32(pUD);
-+ nbFrame = (fileSize-8)/14;
-+ if (nbFrame == 0)
-+ {
-+ setLastError("No frames in file");
-+ return YMFALSE;
-+ }
-+ {
-+ ymint dummy = 4;
-+ loopFrame = ReadLittleEndian32(pUD, dummy);
-+ }
- ymChip.setClock(ATARI_CLOCK);
- setPlayerRate(50);
- pDataStream = pBigMalloc+4;
-@@ -291,35 +372,62 @@
- pSongPlayer = mstrdup("YM-Chip driver.");
- break;
-
-- case 'YM4!': // Extended ATARI format.
-+ case 0x594d3421 /*'YM4!'*/: // Extended ATARI format.
- setLastError("No more YM4! support. Use YM5! format.");
- return YMFALSE;
- break;
-
-- case 'YM5!': // Extended YM2149 format, all machines.
-- case 'YM6!': // Extended YM2149 format, all machines.
-+ case 0x594d3521 /*'YM5!'*/: // Extended YM2149 format, all machines.
-+ case 0x594d3621 /*'YM6!'*/: // Extended YM2149 format, all machines.
-+ if (ptr_size < 12)
-+ {
-+ setLastError("File too small");
-+ return YMFALSE;
-+ }
- if (strncmp((const char*)(pBigMalloc+4),"LeOnArD!",8))
- {
- setLastError("Not a valid YM format !");
- return YMFALSE;
- }
- ptr = pBigMalloc+12;
-- nbFrame = readMotorolaDword(&ptr);
-- setAttrib(readMotorolaDword(&ptr));
-- nbDrum = readMotorolaWord(&ptr);
-- ymChip.setClock(readMotorolaDword(&ptr));
-- setPlayerRate(readMotorolaWord(&ptr));
-- loopFrame = readMotorolaDword(&ptr);
-- skip = readMotorolaWord(&ptr);
-+ ptr_size -= 12;
-+ nbFrame = readMotorolaDword(&ptr, &ptr_size);
-+ setAttrib(readMotorolaDword(&ptr, &ptr_size));
-+ nbDrum = readMotorolaWord(&ptr, &ptr_size);
-+ ymChip.setClock(readMotorolaDword(&ptr, &ptr_size));
-+ setPlayerRate(readMotorolaWord(&ptr, &ptr_size));
-+ loopFrame = readMotorolaDword(&ptr, &ptr_size);
-+ skip = readMotorolaWord(&ptr, &ptr_size);
- ptr += skip;
-+ ptr_size -= skip;
-+ if (ptr_size <= 0)
-+ {
-+ setLastError("File too small");
-+ return YMFALSE;
-+ }
- if (nbDrum>0)
- {
-- pDrumTab=(digiDrum_t*)malloc(nbDrum*sizeof(digiDrum_t));
-+ pDrumTab=(digiDrum_t*)calloc(nbDrum, sizeof(digiDrum_t));
- for (i=0;i<nbDrum;i++)
- {
-- pDrumTab[i].size = readMotorolaDword(&ptr);
-+ pDrumTab[i].size = readMotorolaDword(&ptr, &ptr_size);
-+ if (ptr_size <= 0)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
- if (pDrumTab[i].size)
- {
-+ if (pDrumTab[i].size >= 0x80000000)
-+ {
-+ setLastError("To big drumtab");
-+ goto error_out;
-+ }
-+ if (ptr_size<(ymint)pDrumTab[i].size)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
- pDrumTab[i].pData = (ymu8*)malloc(pDrumTab[i].size);
- memcpy(pDrumTab[i].pData,ptr,pDrumTab[i].size);
- if (attrib&A_DRUM4BITS)
-@@ -328,23 +436,26 @@
- ymu8 *pw = pDrumTab[i].pData;
- for (j=0;j<pDrumTab[i].size;j++)
- {
-- *pw++ = ymVolumeTable[(*pw)&15]>>7;
-+ *pw = ymVolumeTable[(*pw)&15]>>7;
-+ pw++;
- }
- }
- ptr += pDrumTab[i].size;
-- }
-- else
-- {
-- pDrumTab[i].pData = NULL;
-+ ptr_size -= pDrumTab[i].size;
- }
- }
- attrib &= (~A_DRUM4BITS);
- }
-- pSongName = readNtString((char**)&ptr);
-- pSongAuthor = readNtString((char**)&ptr);
-- pSongComment = readNtString((char**)&ptr);
-+ pSongName = readNtString((char**)&ptr, &ptr_size);
-+ pSongAuthor = readNtString((char**)&ptr, &ptr_size);
-+ pSongComment = readNtString((char**)&ptr, &ptr_size);
-+ if (ptr_size <= 0)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
- songType = YM_V5;
-- if (id=='YM6!')
-+ if (id==0x594d3621/*'YM6!'*/)
- {
- songType = YM_V6;
- pSongType = mstrdup("YM 6");
-@@ -353,13 +464,28 @@
- {
- pSongType = mstrdup("YM 5");
- }
-+ if ((nbFrame >= 0x08000000) || (nbFrame < 0))
-+ {
-+ setLastError("Too many frames");
-+ goto error_out;
-+ }
-+ if (ptr_size < (ymint)(nbFrame * 16))
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
- pDataStream = ptr;
- streamInc = 16;
- setAttrib(A_STREAMINTERLEAVED|A_TIMECONTROL);
- pSongPlayer = mstrdup("YM-Chip driver.");
- break;
-
-- case 'MIX1': // ATARI Remix digit format.
-+ case 0x4d495831 /*'MIX1'*/: // ATARI Remix digit format.
-+ if (ptr_size < 12)
-+ {
-+ setLastError("File too small");
-+ return YMFALSE;
-+ }
-
- if (strncmp((const char*)(pBigMalloc+4),"LeOnArD!",8))
- {
-@@ -367,23 +493,50 @@
- return YMFALSE;
- }
- ptr = pBigMalloc+12;
-+ ptr_size -= 12;
- songType = YM_MIX1;
-- tmp = readMotorolaDword(&ptr);
-+ tmp = readMotorolaDword(&ptr, &ptr_size);
- setAttrib(0);
- if (tmp&1) setAttrib(A_DRUMSIGNED);
-- sampleSize = readMotorolaDword(&ptr);
-- nbMixBlock = readMotorolaDword(&ptr);
-+ sampleSize = readMotorolaDword(&ptr, &ptr_size);
-+ nbMixBlock = readMotorolaDword(&ptr, &ptr_size);
-+ if (ptr_size <= 0)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
-+ if (sampleSize <= 0)
-+ {
-+ setLastError("Invalid sampleSize");
-+ goto error_out;
-+ }
-+ if (nbMixBlock <= 0)
-+ {
-+ setLastError("Invalid number of mixblocks");
-+ goto error_out;
-+ }
- pMixBlock = (mixBlock_t*)malloc(nbMixBlock*sizeof(mixBlock_t));
- for (i=0;i<nbMixBlock;i++)
- { // Lecture des block-infos.
-- pMixBlock[i].sampleStart = readMotorolaDword(&ptr);
-- pMixBlock[i].sampleLength = readMotorolaDword(&ptr);
-- pMixBlock[i].nbRepeat = readMotorolaWord(&ptr);
-- pMixBlock[i].replayFreq = readMotorolaWord(&ptr);
-+ pMixBlock[i].sampleStart = readMotorolaDword(&ptr, &ptr_size);
-+ pMixBlock[i].sampleLength = readMotorolaDword(&ptr, &ptr_size);
-+ pMixBlock[i].nbRepeat = readMotorolaWord(&ptr, &ptr_size);
-+ pMixBlock[i].replayFreq = readMotorolaWord(&ptr, &ptr_size);
-+ }
-+ pSongName = readNtString((char**)&ptr, &ptr_size);
-+ pSongAuthor = readNtString((char**)&ptr, &ptr_size);
-+ pSongComment = readNtString((char**)&ptr, &ptr_size);
-+
-+ if (sampleSize>=0x80000000)
-+ {
-+ setLastError("Invalid sampleSize");
-+ goto error_out;
-+ }
-+ if (ptr_size < (ymint)sampleSize)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
- }
-- pSongName = readNtString((char**)&ptr);
-- pSongAuthor = readNtString((char**)&ptr);
-- pSongComment = readNtString((char**)&ptr);
-
- pBigSampleBuffer = (unsigned char*)malloc(sampleSize);
- memcpy(pBigSampleBuffer,ptr,sampleSize);
-@@ -400,8 +553,8 @@
-
- break;
-
-- case 'YMT1': // YM-Tracker
-- case 'YMT2': // YM-Tracker
-+ case 0x594d5431 /*'YMT1'*/: // YM-Tracker
-+ case 0x594d5432 /*'YMT2'*/: // YM-Tracker
- /*;
- ; Format du YM-Tracker-1
- ;
-@@ -418,33 +571,55 @@
- ; NT Music comment
- ; nb digi *
- */
-+ if (ptr_size < 12)
-+ {
-+ setLastError("File too small");
-+ return YMFALSE;
-+ }
-+
- if (strncmp((const char*)(pBigMalloc+4),"LeOnArD!",8))
- {
- setLastError("Not a valid YM format !");
- return YMFALSE;
- }
- ptr = pBigMalloc+12;
-+ ptr_size -= 12;
- songType = YM_TRACKER1;
-- nbVoice = readMotorolaWord(&ptr);
-- setPlayerRate(readMotorolaWord(&ptr));
-- nbFrame= readMotorolaDword(&ptr);
-- loopFrame = readMotorolaDword(&ptr);
-- nbDrum = readMotorolaWord(&ptr);
-- attrib = readMotorolaDword(&ptr);
-- pSongName = readNtString((char**)&ptr);
-- pSongAuthor = readNtString((char**)&ptr);
-- pSongComment = readNtString((char**)&ptr);
-+ nbVoice = readMotorolaWord(&ptr, &ptr_size);
-+ setPlayerRate(readMotorolaWord(&ptr, &ptr_size));
-+ nbFrame= readMotorolaDword(&ptr, &ptr_size);
-+ loopFrame = readMotorolaDword(&ptr, &ptr_size);
-+ nbDrum = readMotorolaWord(&ptr, &ptr_size);
-+ attrib = readMotorolaDword(&ptr, &ptr_size);
-+ pSongName = readNtString((char**)&ptr, &ptr_size);
-+ pSongAuthor = readNtString((char**)&ptr, &ptr_size);
-+ pSongComment = readNtString((char**)&ptr, &ptr_size);
-+ if (ptr_size < 0)
-+ {
-+ setLastError("File too small");
-+ return YMFALSE;
-+ }
- if (nbDrum>0)
- {
-- pDrumTab=(digiDrum_t*)malloc(nbDrum*sizeof(digiDrum_t));
-+ pDrumTab=(digiDrum_t*)calloc(nbDrum, sizeof(digiDrum_t));
- for (i=0;i<(ymint)nbDrum;i++)
- {
-- pDrumTab[i].size = readMotorolaWord(&ptr);
-+ pDrumTab[i].size = readMotorolaWord(&ptr, &ptr_size);
-+ if (ptr_size < 0)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
- pDrumTab[i].repLen = pDrumTab[i].size;
-- if ('YMT2' == id)
-+ if (0x594d5432/*'YMT2'*/ == id)
- {
-- pDrumTab[i].repLen = readMotorolaWord(&ptr); // repLen
-- readMotorolaWord(&ptr); // flag
-+ pDrumTab[i].repLen = readMotorolaWord(&ptr, &ptr_size); // repLen
-+ readMotorolaWord(&ptr, &ptr_size); // flag
-+ if (ptr_size < 0)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
- }
- if (pDrumTab[i].repLen>pDrumTab[i].size)
- {
-@@ -453,19 +628,27 @@
-
- if (pDrumTab[i].size)
- {
-+ if (pDrumTab[i].size >= 0x80000000)
-+ {
-+ setLastError("Drumtab to big");
-+ goto error_out;
-+ }
-+ if (ptr_size<(ymint)pDrumTab[i].size)
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
-+
- pDrumTab[i].pData = (ymu8*)malloc(pDrumTab[i].size);
- memcpy(pDrumTab[i].pData,ptr,pDrumTab[i].size);
- ptr += pDrumTab[i].size;
-- }
-- else
-- {
-- pDrumTab[i].pData = NULL;
-+ ptr_size -= pDrumTab[i].size;
- }
- }
- }
-
- ymTrackerFreqShift = 0;
-- if ('YMT2' == id)
-+ if (0x594d5432/*'YMT2'*/ == id)
- {
- ymTrackerFreqShift = (attrib>>28)&15;
- attrib &= 0x0fffffff;
-@@ -476,18 +659,33 @@
- pSongType = mstrdup("YM-T1");
- }
-
-+ if ((nbVoice > MAX_VOICE) || (nbVoice < 0))
-+ {
-+ setLastError("Too many voices");
-+ goto error_out;
-+ }
-+ if ((nbFrame >= (ymint)(0x80000000 / (MAX_VOICE * (sizeof(ymTrackerLine_t))))) || (nbFrame < 0)) /* ymTrackerLine_t has a 2^N size */
-+ {
-+ setLastError("Too many frames");
-+ goto error_out;
-+ }
-+ if (ptr_size < (ymint)(sizeof(ymTrackerLine_t) * nbVoice * nbFrame))
-+ {
-+ setLastError("File too small");
-+ goto error_out;
-+ }
-
- pDataStream = ptr;
- ymChip.setClock(ATARI_CLOCK);
-
- ymTrackerInit(100); // 80% de volume maxi.
-- streamInc = 16;
-+ streamInc = 16; /* not needed, since this is only used for YMx formats */
- setTimeControl(YMTRUE);
- pSongPlayer = mstrdup("Universal Tracker");
- break;
-
- default:
-- setLastError("Unknow YM format !");
-+ setLastError("Unknown YM format !");
- return YMFALSE;
- break;
- }
-@@ -498,6 +696,25 @@
- }
-
- return YMTRUE;
-+error_out:
-+ for (i=0;i<nbDrum;i++)
-+ {
-+ if (pDrumTab[i].pData)
-+ myFree((void **)&pDrumTab[i].pData);
-+ }
-+ if (nbDrum>0)
-+ {
-+ myFree((void **)&pDrumTab);
-+ nbDrum=0;
-+ }
-+ myFree((void **)&pSongName);
-+ myFree((void **)&pSongAuthor);
-+ myFree((void **)&pSongComment);
-+ myFree((void **)&pSongType); /* <- never needed, but we keep it for purity */
-+ myFree((void **)&pSongPlayer); /* <- never needed, but we keep it for purity */
-+ myFree((void **)&pMixBlock);
-+ myFree((void **)&pBigSampleBuffer); /* <- never needed, but we keep it for purity */
-+ return YMFALSE;
- }
-
-
-@@ -645,12 +862,6 @@
- return YMTRUE;
- }
-
--void myFree(void **pPtr)
--{
-- if (*pPtr) free(*pPtr);
-- *pPtr = NULL;
--}
--
- void CYmMusic::unLoad(void)
- {
-
diff --git a/audio/stymulator/files/patch-stsoundlib__digidrum.cpp b/audio/stymulator/files/patch-stsoundlib__digidrum.cpp
deleted file mode 100644
index 747de1b03097..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__digidrum.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
---- ./stsoundlib/digidrum.cpp.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/digidrum.cpp 2010-04-23 13:50:07.000000000 +0200
-@@ -30,6 +30,7 @@
- -----------------------------------------------------------------------------*/
-
- #include "YmTypes.h"
-+#include "digidrum.h"
-
- static ymu8 sample00[631]={
- 0xCC,0x84,0xB4,0x70,0x90,0x94,0x70,0x80,0x80,0xAC,
-@@ -2565,7 +2566,7 @@
- 0x80,0x80,0x80,0x80,0x80,0x80,};
- /***********************************************************/
-
--ymu8 *sampleAdress[40] = {
-+ymu8 *sampleAdress[MAX_DIGIDRUM] = {
- sample00,sample01,sample02,sample03,sample04,sample05,sample06,sample07,
- sample08,sample09,sample10,sample11,sample12,sample13,sample14,sample15,
- sample16,sample17,sample18,sample19,sample20,sample21,sample22,sample23,
-@@ -2574,7 +2575,7 @@
-
- /***********************************************************/
-
--ymu32 sampleLen[40] = {
-+ymu32 sampleLen[MAX_DIGIDRUM] = {
- 631, 631, 490, 490, 699, 505, 727, 480,
- 2108, 4231, 378, 1527, 258, 258, 451, 1795,
- 271, 633, 1379, 147, 139, 85, 150, 507,
diff --git a/audio/stymulator/files/patch-stsoundlib__digidrum.h b/audio/stymulator/files/patch-stsoundlib__digidrum.h
deleted file mode 100644
index 0f1757dac54c..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__digidrum.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./stsoundlib/digidrum.h.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/digidrum.h 2010-04-23 13:50:07.000000000 +0200
-@@ -32,6 +32,8 @@
- #ifndef __DIGIDRUM__
- #define __DIGIDRUM__
-
-+#define MAX_DIGIDRUM 40
-+
- extern ymu8 * sampleAdress[];
- extern ymu32 sampleLen[];
-
diff --git a/audio/stymulator/files/patch-stsoundlib__lzh__Makefile b/audio/stymulator/files/patch-stsoundlib__lzh__Makefile
deleted file mode 100644
index 8d3ad20f557a..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__lzh__Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./stsoundlib/lzh/Makefile.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/lzh/Makefile 2010-04-23 13:49:47.000000000 +0200
-@@ -1,14 +1,14 @@
--CC = gcc
-+CC ?= gcc
- AR = ar cr
- RM = rm -f
-
--CFLAGS = -Wall
-+CFLAGS ?= -Wall
-
- liblzh.a: lzhlib.o
- $(AR) liblzh.a lzhlib.o
-
- lzhlib.o: lzhlib.cpp lzh.h
-- $(CC) -c lzhlib.cpp
-+ $(CC) $(CFLAGS) -c lzhlib.cpp
-
- clean:
- $(RM) *~ *.o *.a
diff --git a/audio/stymulator/files/patch-stsoundlib__lzh__lzhlib.cpp b/audio/stymulator/files/patch-stsoundlib__lzh__lzhlib.cpp
deleted file mode 100644
index 6be183f017b4..000000000000
--- a/audio/stymulator/files/patch-stsoundlib__lzh__lzhlib.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./stsoundlib/lzh/lzhlib.cpp.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./stsoundlib/lzh/lzhlib.cpp 2010-04-23 13:49:47.000000000 +0200
-@@ -413,10 +413,10 @@
-
- decode_start ();
-
-- int origsize = dstSize;
-+ uint origsize = dstSize;
- while (origsize != 0)
- {
-- int n = (uint) ((origsize > DICSIZ) ? DICSIZ : origsize);
-+ uint n = (origsize > DICSIZ) ? DICSIZ : origsize;
- decode (n, outbuf);
- if (with_error)
- break;
diff --git a/audio/stymulator/files/patch-stsoundlib_digidrum.cpp b/audio/stymulator/files/patch-stsoundlib_digidrum.cpp
new file mode 100644
index 000000000000..b2a86a16348d
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_digidrum.cpp
@@ -0,0 +1,28 @@
+--- stsoundlib/digidrum.cpp.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/digidrum.cpp
+@@ -30,6 +30,7 @@
+ -----------------------------------------------------------------------------*/
+
+ #include "YmTypes.h"
++#include "digidrum.h"
+
+ static ymu8 sample00[631]={
+ 0xCC,0x84,0xB4,0x70,0x90,0x94,0x70,0x80,0x80,0xAC,
+@@ -2565,7 +2566,7 @@ static ymu8 sample39[656]={
+ 0x80,0x80,0x80,0x80,0x80,0x80,};
+ /***********************************************************/
+
+-ymu8 *sampleAdress[40] = {
++ymu8 *sampleAdress[MAX_DIGIDRUM] = {
+ sample00,sample01,sample02,sample03,sample04,sample05,sample06,sample07,
+ sample08,sample09,sample10,sample11,sample12,sample13,sample14,sample15,
+ sample16,sample17,sample18,sample19,sample20,sample21,sample22,sample23,
+@@ -2574,7 +2575,7 @@ ymu8 *sampleAdress[40] = {
+
+ /***********************************************************/
+
+-ymu32 sampleLen[40] = {
++ymu32 sampleLen[MAX_DIGIDRUM] = {
+ 631, 631, 490, 490, 699, 505, 727, 480,
+ 2108, 4231, 378, 1527, 258, 258, 451, 1795,
+ 271, 633, 1379, 147, 139, 85, 150, 507,
diff --git a/audio/stymulator/files/patch-stsoundlib_digidrum.h b/audio/stymulator/files/patch-stsoundlib_digidrum.h
new file mode 100644
index 000000000000..c187c4411a73
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_digidrum.h
@@ -0,0 +1,11 @@
+--- stsoundlib/digidrum.h.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/digidrum.h
+@@ -32,6 +32,8 @@
+ #ifndef __DIGIDRUM__
+ #define __DIGIDRUM__
+
++#define MAX_DIGIDRUM 40
++
+ extern ymu8 * sampleAdress[];
+ extern ymu32 sampleLen[];
+
diff --git a/audio/stymulator/files/patch-stsoundlib_lzh_Makefile b/audio/stymulator/files/patch-stsoundlib_lzh_Makefile
new file mode 100644
index 000000000000..21326d69513e
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_lzh_Makefile
@@ -0,0 +1,20 @@
+--- stsoundlib/lzh/Makefile.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/lzh/Makefile
+@@ -1,14 +1,14 @@
+-CC = gcc
++CC ?= gcc
+ AR = ar cr
+ RM = rm -f
+
+-CFLAGS = -Wall
++CFLAGS ?= -Wall
+
+ liblzh.a: lzhlib.o
+ $(AR) liblzh.a lzhlib.o
+
+ lzhlib.o: lzhlib.cpp lzh.h
+- $(CC) -c lzhlib.cpp
++ $(CC) $(CFLAGS) -c lzhlib.cpp
+
+ clean:
+ $(RM) *~ *.o *.a
diff --git a/audio/stymulator/files/patch-stsoundlib_lzh_lzhlib.cpp b/audio/stymulator/files/patch-stsoundlib_lzh_lzhlib.cpp
new file mode 100644
index 000000000000..985c11dde8f7
--- /dev/null
+++ b/audio/stymulator/files/patch-stsoundlib_lzh_lzhlib.cpp
@@ -0,0 +1,15 @@
+--- stsoundlib/lzh/lzhlib.cpp.orig 2016-07-26 16:04:42 UTC
++++ stsoundlib/lzh/lzhlib.cpp
+@@ -413,10 +413,10 @@ bool CLzhDepacker::LzUnpack(void *pSrc,i
+
+ decode_start ();
+
+- int origsize = dstSize;
++ uint origsize = dstSize;
+ while (origsize != 0)
+ {
+- int n = (uint) ((origsize > DICSIZ) ? DICSIZ : origsize);
++ uint n = (origsize > DICSIZ) ? DICSIZ : origsize;
+ decode (n, outbuf);
+ if (with_error)
+ break;
diff --git a/audio/stymulator/files/patch-ui.c b/audio/stymulator/files/patch-ui.c
index dc0591c6f9d9..8a06916a00e2 100644
--- a/audio/stymulator/files/patch-ui.c
+++ b/audio/stymulator/files/patch-ui.c
@@ -1,5 +1,5 @@
---- ./ui.c.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./ui.c 2010-04-23 13:49:47.000000000 +0200
+--- ui.c.orig 2016-07-26 16:04:42 UTC
++++ ui.c
@@ -6,7 +6,6 @@
Project Page: http://atariarea.krap.pl/stymulator
diff --git a/audio/stymulator/files/patch-ui.h b/audio/stymulator/files/patch-ui.h
index e42eb6b15278..d3c4ca2170a1 100644
--- a/audio/stymulator/files/patch-ui.h
+++ b/audio/stymulator/files/patch-ui.h
@@ -1,5 +1,5 @@
---- ./ui.h.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./ui.h 2010-04-23 13:49:47.000000000 +0200
+--- ui.h.orig 2016-07-26 16:04:42 UTC
++++ ui.h
@@ -6,7 +6,6 @@
Project Page: http://atariarea.krap.pl/stymulator
diff --git a/audio/stymulator/files/patch-ym2wav.cpp b/audio/stymulator/files/patch-ym2wav.cpp
index 5b3d814dc6a6..e791ed96df1c 100644
--- a/audio/stymulator/files/patch-ym2wav.cpp
+++ b/audio/stymulator/files/patch-ym2wav.cpp
@@ -1,6 +1,6 @@
---- ./ym2wav.cpp.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./ym2wav.cpp 2010-04-23 13:49:47.000000000 +0200
-@@ -71,7 +71,7 @@
+--- ym2wav.cpp.orig 2016-07-26 16:04:42 UTC
++++ ym2wav.cpp
+@@ -71,7 +71,7 @@ typedef struct
int main(int argc, char* argv[])
{
diff --git a/audio/stymulator/files/patch-ymplayer.cpp b/audio/stymulator/files/patch-ymplayer.cpp
index 010795b1c6d6..dff56c8f7dac 100644
--- a/audio/stymulator/files/patch-ymplayer.cpp
+++ b/audio/stymulator/files/patch-ymplayer.cpp
@@ -1,5 +1,5 @@
---- ./ymplayer.cpp.orig 2010-04-23 13:49:47.000000000 +0200
-+++ ./ymplayer.cpp 2010-04-23 13:49:47.000000000 +0200
+--- ymplayer.cpp.orig 2016-07-26 16:04:42 UTC
++++ ymplayer.cpp
@@ -6,7 +6,6 @@
Project Page: http://atariarea.krap.pl/stymulator
@@ -27,7 +27,7 @@
bool digi;
int main(int argc, char **argv)
-@@ -55,7 +58,7 @@
+@@ -55,7 +58,7 @@ bool playing;
bool ff = false;
bool rew = false;
@@ -36,7 +36,7 @@
if (PLATFORM)
platform = "64bit";
-@@ -69,30 +72,22 @@
+@@ -69,30 +72,22 @@ char *platform;
return -1;
}
@@ -73,7 +73,7 @@
exit(EXIT_FAILURE);
}
-@@ -113,15 +108,10 @@
+@@ -113,15 +108,10 @@ char *platform;
if (digi)
draw_time(ymMusicGetPos(pMusic) / 1000);
@@ -93,7 +93,7 @@
switch(getch()) {
case 27: case 'q': quit = true; break;
case 'z': pmode = true; break; //play
-@@ -132,6 +122,7 @@
+@@ -132,6 +122,7 @@ char *platform;
case 'n': rew = true; break;
}
if (rmode)
@@ -101,7 +101,7 @@
if (repeat) {
ymMusicSetLoopMode(pMusic,YMTRUE);
mvaddstr(pos_y+7,pos_x+67,"Yes");
-@@ -143,7 +134,7 @@
+@@ -143,7 +134,7 @@ char *platform;
rmode = false;
repeat = true;
}
@@ -110,7 +110,7 @@
if (!stop && playing) {
if (pmode && !paused)
mvaddstr(pos_y+6,pos_x+67,"Play"); //play
-@@ -168,18 +159,20 @@
+@@ -168,18 +159,20 @@ char *platform;
pmode = false;
}
diff --git a/audio/taglib-extras/files/patch-svn_1444333 b/audio/taglib-extras/files/patch-svn_1444333
index 0090b0c15d7d..bff25fd35e35 100644
--- a/audio/taglib-extras/files/patch-svn_1444333
+++ b/audio/taglib-extras/files/patch-svn_1444333
@@ -1,6 +1,6 @@
---- cmake/modules/FindTaglib.cmake 2009/03/18 13:31:18 940895
-+++ cmake/modules/FindTaglib.cmake 2015/11/16 19:05:39 1444333
-@@ -29,10 +29,10 @@
+--- cmake/modules/FindTaglib.cmake.orig 2009-03-13 21:40:24 UTC
++++ cmake/modules/FindTaglib.cmake
+@@ -29,10 +29,10 @@ if(TAGLIBCONFIG_EXECUTABLE)
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION)
@@ -13,7 +13,7 @@
exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES)
-@@ -42,7 +42,7 @@
+@@ -42,7 +42,7 @@ if(TAGLIBCONFIG_EXECUTABLE)
set(TAGLIB_FOUND TRUE)
endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS)
string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}")
diff --git a/audio/taglib/files/extrapatch-rcc b/audio/taglib/files/extrapatch-rcc
index 93d107c578f4..04e393852da8 100644
--- a/audio/taglib/files/extrapatch-rcc
+++ b/audio/taglib/files/extrapatch-rcc
@@ -1,4 +1,14 @@
-diff -dPNur ./config.h.cmake ./config.h.cmake
+--- ConfigureChecks.cmake.orig 2015-11-11 21:41:59 UTC
++++ ConfigureChecks.cmake
+@@ -201,6 +201,8 @@ if(NOT ZLIB_SOURCE)
+ endif()
+ endif()
+
++SET(HAVE_LIBRCC 1)
++
+ if(BUILD_TESTS)
+ find_package(CppUnit)
+ if(NOT CppUnit_FOUND)
--- config.h.cmake.orig 2015-11-11 21:41:59 UTC
+++ config.h.cmake
@@ -22,6 +22,9 @@
@@ -11,22 +21,9 @@ diff -dPNur ./config.h.cmake ./config.h.cmake
/* Indicates whether debug messages are shown even in release mode */
#cmakedefine TRACE_IN_RELEASE 1
-diff -dPNur ./ConfigureChecks.cmake ./ConfigureChecks.cmake
---- ConfigureChecks.cmake.orig 2015-11-11 21:41:59 UTC
-+++ ConfigureChecks.cmake
-@@ -201,6 +201,8 @@ if(NOT ZLIB_SOURCE)
- endif()
- endif()
-
-+SET(HAVE_LIBRCC 1)
-+
- if(BUILD_TESTS)
- find_package(CppUnit)
- if(NOT CppUnit_FOUND)
-diff -dPNur ./examples/tagreader_c.c ./examples/tagreader_c.c
---- ./examples/tagreader_c.c 2013-10-08 17:50:01.000000000 +0200
-+++ ./examples/tagreader_c.c 2013-11-11 13:42:53.017126134 +0100
-@@ -38,7 +38,7 @@
+--- examples/tagreader_c.c.orig 2015-11-11 21:41:59 UTC
++++ examples/tagreader_c.c
+@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
TagLib_Tag *tag;
const TagLib_AudioProperties *properties;
@@ -35,19 +32,17 @@ diff -dPNur ./examples/tagreader_c.c ./examples/tagreader_c.c
for(i = 1; i < argc; i++) {
printf("******************** \"%s\" ********************\n", argv[i]);
-diff -dPNur ./examples/tagwriter.cpp ./examples/tagwriter.cpp
---- ./examples/tagwriter.cpp 2013-10-08 17:50:01.000000000 +0200
-+++ ./examples/tagwriter.cpp 2013-11-11 13:42:53.028126368 +0100
-@@ -92,7 +92,7 @@
+--- examples/tagwriter.cpp.orig 2015-11-11 21:41:59 UTC
++++ examples/tagwriter.cpp
+@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
if(isArgument(argv[i]) && i + 1 < argc && !isArgument(argv[i + 1])) {
char field = argv[i][1];
- TagLib::String value = argv[i + 1];
+ TagLib::String value(argv[i + 1], TagLib::String::Locale);
- TagLib::List<TagLib::FileRef>::Iterator it;
+ TagLib::List<TagLib::FileRef>::ConstIterator it;
for(it = fileList.begin(); it != fileList.end(); ++it) {
-diff -dPNur ./taglib/CMakeLists.txt ./taglib/CMakeLists.txt
--- taglib/CMakeLists.txt.orig 2015-11-11 21:41:59 UTC
+++ taglib/CMakeLists.txt
@@ -38,6 +38,7 @@ set(tag_HDRS
@@ -75,10 +70,9 @@ diff -dPNur ./taglib/CMakeLists.txt ./taglib/CMakeLists.txt
endif()
set_target_properties(tag PROPERTIES
-diff -dPNur ./taglib/mpeg/id3v1/id3v1tag.cpp ./taglib/mpeg/id3v1/id3v1tag.cpp
---- ./taglib/mpeg/id3v1/id3v1tag.cpp 2013-10-08 17:50:01.000000000 +0200
-+++ ./taglib/mpeg/id3v1/id3v1tag.cpp 2013-11-11 13:42:53.043126686 +0100
-@@ -64,17 +64,18 @@
+--- taglib/mpeg/id3v1/id3v1tag.cpp.orig 2015-11-11 21:41:59 UTC
++++ taglib/mpeg/id3v1/id3v1tag.cpp
+@@ -64,17 +64,18 @@ StringHandler::StringHandler()
String ID3v1::StringHandler::parse(const ByteVector &data) const
{
@@ -99,7 +93,7 @@ diff -dPNur ./taglib/mpeg/id3v1/id3v1tag.cpp ./taglib/mpeg/id3v1/id3v1tag.cpp
}
////////////////////////////////////////////////////////////////////////////////
-@@ -257,7 +258,7 @@
+@@ -257,7 +258,7 @@ void ID3v1::Tag::parse(const ByteVector
d->track = uchar(data[offset + 29]);
}
else
@@ -108,10 +102,9 @@ diff -dPNur ./taglib/mpeg/id3v1/id3v1tag.cpp ./taglib/mpeg/id3v1/id3v1tag.cpp
offset += 30;
-diff -dPNur ./taglib/mpeg/id3v2/frames/commentsframe.cpp ./taglib/mpeg/id3v2/frames/commentsframe.cpp
---- ./taglib/mpeg/id3v2/frames/commentsframe.cpp 2013-10-08 17:50:01.000000000 +0200
-+++ ./taglib/mpeg/id3v2/frames/commentsframe.cpp 2013-11-11 13:42:53.043126686 +0100
-@@ -150,10 +150,10 @@
+--- taglib/mpeg/id3v2/frames/commentsframe.cpp.orig 2015-11-11 21:41:59 UTC
++++ taglib/mpeg/id3v2/frames/commentsframe.cpp
+@@ -150,10 +150,10 @@ void CommentsFrame::parseFields(const By
return;
}
@@ -124,7 +117,7 @@ diff -dPNur ./taglib/mpeg/id3v2/frames/commentsframe.cpp ./taglib/mpeg/id3v2/fra
ByteVectorList l = ByteVectorList::split(data.mid(4), textDelimiter(d->textEncoding), byteAlign, 2);
-@@ -174,10 +174,12 @@
+@@ -174,10 +174,12 @@ ByteVector CommentsFrame::renderFields()
String::Type encoding = d->textEncoding;
@@ -138,10 +131,9 @@ diff -dPNur ./taglib/mpeg/id3v2/frames/commentsframe.cpp ./taglib/mpeg/id3v2/fra
v.append(d->language.size() == 3 ? d->language : "XXX");
v.append(d->description.data(encoding));
v.append(textDelimiter(encoding));
-diff -dPNur ./taglib/mpeg/id3v2/frames/textidentificationframe.cpp ./taglib/mpeg/id3v2/frames/textidentificationframe.cpp
---- ./taglib/mpeg/id3v2/frames/textidentificationframe.cpp 2013-10-08 17:50:01.000000000 +0200
-+++ ./taglib/mpeg/id3v2/frames/textidentificationframe.cpp 2013-11-11 13:42:53.044126708 +0100
-@@ -187,12 +187,12 @@
+--- taglib/mpeg/id3v2/frames/textidentificationframe.cpp.orig 2015-11-11 21:41:59 UTC
++++ taglib/mpeg/id3v2/frames/textidentificationframe.cpp
+@@ -187,12 +187,12 @@ void TextIdentificationFrame::parseField
// read the string data type (the first byte of the field data)
@@ -156,7 +148,7 @@ diff -dPNur ./taglib/mpeg/id3v2/frames/textidentificationframe.cpp ./taglib/mpeg
// build a small counter to strip nulls off the end of the field
-@@ -223,11 +223,14 @@
+@@ -223,11 +223,14 @@ void TextIdentificationFrame::parseField
ByteVector TextIdentificationFrame::renderFields() const
{
@@ -173,10 +165,9 @@ diff -dPNur ./taglib/mpeg/id3v2/frames/textidentificationframe.cpp ./taglib/mpeg
for(StringList::ConstIterator it = d->fieldList.begin(); it != d->fieldList.end(); it++) {
-diff -dPNur ./taglib/mpeg/id3v2/id3v2frame.cpp ./taglib/mpeg/id3v2/id3v2frame.cpp
---- ./taglib/mpeg/id3v2/id3v2frame.cpp 2013-10-08 17:50:01.000000000 +0200
-+++ ./taglib/mpeg/id3v2/id3v2frame.cpp 2013-11-11 13:42:53.045126729 +0100
-@@ -302,7 +302,7 @@
+--- taglib/mpeg/id3v2/id3v2frame.cpp.orig 2015-11-11 21:41:59 UTC
++++ taglib/mpeg/id3v2/id3v2frame.cpp
+@@ -339,7 +339,7 @@ String::Type Frame::checkEncoding(const
if((encoding == String::UTF8 || encoding == String::UTF16BE) && version != 4)
return String::UTF16;
@@ -185,9 +176,8 @@ diff -dPNur ./taglib/mpeg/id3v2/id3v2frame.cpp ./taglib/mpeg/id3v2/id3v2frame.cp
return encoding;
for(StringList::ConstIterator it = fields.begin(); it != fields.end(); ++it) {
-diff -dPNur ./taglib/toolkit/rccpatch.cpp ./taglib/toolkit/rccpatch.cpp
---- ./taglib/toolkit/rccpatch.cpp 1970-01-01 01:00:00.000000000 +0100
-+++ ./taglib/toolkit/rccpatch.cpp 2013-11-11 13:42:53.045126729 +0100
+--- taglib/toolkit/rccpatch.cpp.orig 2016-07-26 16:05:28 UTC
++++ taglib/toolkit/rccpatch.cpp
@@ -0,0 +1,237 @@
+#include <stdlib.h>
+
@@ -426,9 +416,8 @@ diff -dPNur ./taglib/toolkit/rccpatch.cpp ./taglib/toolkit/rccpatch.cpp
+#endif /* HAVE_LIBRCC */
+ return TagLib::String::Latin1;
+}
-diff -dPNur ./taglib/toolkit/rccpatch.h ./taglib/toolkit/rccpatch.h
---- ./taglib/toolkit/rccpatch.h 1970-01-01 01:00:00.000000000 +0100
-+++ ./taglib/toolkit/rccpatch.h 2013-11-11 13:42:53.045126729 +0100
+--- taglib/toolkit/rccpatch.h.orig 2016-07-26 16:05:28 UTC
++++ taglib/toolkit/rccpatch.h
@@ -0,0 +1,20 @@
+#ifndef _RCC_PATCH_H
+#define _RCC_PATCH_H
@@ -450,7 +439,6 @@ diff -dPNur ./taglib/toolkit/rccpatch.h ./taglib/toolkit/rccpatch.h
+TagLib::String::Type rccTaglibPatchGetID3Type();
+
+#endif /* _RCC_PATCH_H */
-diff -dPNur ./taglib/toolkit/tstring.cpp ./taglib/toolkit/tstring.cpp
--- taglib/toolkit/tstring.cpp.orig 2015-11-11 21:41:59 UTC
+++ taglib/toolkit/tstring.cpp
@@ -29,6 +29,7 @@
@@ -622,10 +610,9 @@ diff -dPNur ./taglib/toolkit/tstring.cpp ./taglib/toolkit/tstring.cpp
+ return Latin1;
+ return type;
+}
-diff -dPNur ./taglib/toolkit/tstring.h ./taglib/toolkit/tstring.h
---- ./taglib/toolkit/tstring.h 2013-10-08 17:50:01.000000000 +0200
-+++ ./taglib/toolkit/tstring.h 2013-11-11 13:42:53.047126771 +0100
-@@ -90,6 +90,18 @@
+--- taglib/toolkit/tstring.h.orig 2015-11-11 21:41:59 UTC
++++ taglib/toolkit/tstring.h
+@@ -96,6 +96,18 @@ namespace TagLib {
*/
enum Type {
/*!
@@ -644,7 +631,7 @@ diff -dPNur ./taglib/toolkit/tstring.h ./taglib/toolkit/tstring.h
* IS08859-1, or <i>Latin1</i> encoding. 8 bit characters.
*/
Latin1 = 0,
-@@ -112,6 +124,10 @@
+@@ -118,6 +130,10 @@ namespace TagLib {
UTF16LE = 4
};
@@ -655,12 +642,12 @@ diff -dPNur ./taglib/toolkit/tstring.h ./taglib/toolkit/tstring.h
/*!
* Constructs an empty String.
*/
-@@ -479,7 +495,7 @@
- * Converts a \e Latin-1 string into \e UTF-16(without BOM/CPU byte order)
+@@ -519,7 +535,7 @@ namespace TagLib {
+ * Converts a \e Latin-1 string into \e UTF-16(without BOM/CPU byte order)
* and copies it to the internal buffer.
*/
- void copyFromLatin1(const char *s, size_t length);
+ void copyFromLatin1(const char *s, size_t length, bool prepare = false, Type t = Latin1);
/*!
- * Converts a \e UTF-8 string into \e UTF-16(without BOM/CPU byte order)
+ * Converts a \e UTF-8 string into \e UTF-16(without BOM/CPU byte order)
diff --git a/audio/taglookup/files/patch-command__line.cpp b/audio/taglookup/files/patch-command__line.cpp
new file mode 100644
index 000000000000..c9ffd7fa9eeb
--- /dev/null
+++ b/audio/taglookup/files/patch-command__line.cpp
@@ -0,0 +1,11 @@
+--- command_line.cpp.orig 2007-10-01 19:09:46 UTC
++++ command_line.cpp
+@@ -105,7 +105,7 @@ namespace TagLookup
+
+ bool CommandLineArgumentsParser::parsePort()
+ {
+- int port = (int)std::strtol(ct_.c_str(), (char**)NULL, 10);
++ int port = (int)strtol(ct_.c_str(), (char**)NULL, 10);
+
+ if(port > 32767 || port <= 0)
+ {
diff --git a/audio/taglookup/files/patch-command_line.cpp b/audio/taglookup/files/patch-command_line.cpp
deleted file mode 100644
index 2ee3237c3223..000000000000
--- a/audio/taglookup/files/patch-command_line.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./command_line.cpp.orig 2007-10-01 21:09:46.000000000 +0200
-+++ ./command_line.cpp 2014-04-07 10:14:49.462722923 +0200
-@@ -105,7 +105,7 @@
-
- bool CommandLineArgumentsParser::parsePort()
- {
-- int port = (int)std::strtol(ct_.c_str(), (char**)NULL, 10);
-+ int port = (int)strtol(ct_.c_str(), (char**)NULL, 10);
-
- if(port > 32767 || port <= 0)
- {
diff --git a/audio/taglookup/files/patch-tag.cpp b/audio/taglookup/files/patch-tag.cpp
index 1a74178d794e..9ed9dcbe12fe 100644
--- a/audio/taglookup/files/patch-tag.cpp
+++ b/audio/taglookup/files/patch-tag.cpp
@@ -1,5 +1,5 @@
---- ./tag.cpp.orig 2007-10-28 18:42:56.000000000 -0400
-+++ ./tag.cpp 2011-03-18 18:59:23.000000000 -0400
+--- tag.cpp.orig 2007-10-28 22:42:56 UTC
++++ tag.cpp
@@ -27,6 +27,7 @@
#include <utility>
diff --git a/audio/tagtool/files/patch-configure b/audio/tagtool/files/patch-configure
index ed746e1bd47f..a8874a3fcc05 100644
--- a/audio/tagtool/files/patch-configure
+++ b/audio/tagtool/files/patch-configure
@@ -1,4 +1,4 @@
---- configure.orig 2015-05-20 17:11:37 UTC
+--- configure.orig 2007-02-27 20:34:14 UTC
+++ configure
@@ -9044,8 +9044,10 @@ echo "${ECHO_T}$LINGUAS" >&6; }
diff --git a/audio/tagtool/files/patch-src_Makefile.in b/audio/tagtool/files/patch-src_Makefile.in
index d52b814d89b4..6c2e8626b9c0 100644
--- a/audio/tagtool/files/patch-src_Makefile.in
+++ b/audio/tagtool/files/patch-src_Makefile.in
@@ -1,4 +1,4 @@
---- src/Makefile.in.orig 2015-05-20 17:11:37 UTC
+--- src/Makefile.in.orig 2007-02-27 20:34:13 UTC
+++ src/Makefile.in
@@ -193,7 +193,7 @@ tagtool_CFLAGS = -Wall -Wno-pointer-sign
${vorbis_cflags} -DDATADIR='"$(datadir)/${PACKAGE_NAME}"'
diff --git a/audio/tagtool/files/patch-src__main.c b/audio/tagtool/files/patch-src_main.c
index e6a4e7882cf2..e6a4e7882cf2 100644
--- a/audio/tagtool/files/patch-src__main.c
+++ b/audio/tagtool/files/patch-src_main.c
diff --git a/audio/tcd/files/patch-cddb.c b/audio/tcd/files/patch-cddb.c
deleted file mode 100644
index ffeb02383a3e..000000000000
--- a/audio/tcd/files/patch-cddb.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./src/cddb.c.orig 2004-06-15 17:20:09.000000000 -0400
-+++ ./src/cddb.c 2012-03-05 13:42:25.000000000 -0500
-@@ -229,10 +229,11 @@
- return concat_strings(get_home_dir(), "/.tcd/", cd_id, NULL);
- }
-
--extern int tcd_readdiskinfo(struct cd_info *cd, SDL_CD * cdrom)
-+extern int tcd_readdiskinfo(struct tcd_state *cds, SDL_CD * cdrom)
- {
- int result;
- char *filename;
-+ struct cd_info *cd = &cds->cd_info;
-
- result = 0;
- if ((filename = cddb_filename(cddb_discid(cdrom))) != NULL) {
diff --git a/audio/tcd/files/patch-cddb.h b/audio/tcd/files/patch-cddb.h
deleted file mode 100644
index 461bcb139c36..000000000000
--- a/audio/tcd/files/patch-cddb.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/cddb.h.orig 2004-06-15 22:13:19.000000000 +0200
-+++ src/cddb.h 2008-06-26 20:13:57.000000000 +0200
-@@ -30,7 +30,7 @@
-
- #include "tcd.h"
-
--extern int tcd_readdiskinfo(struct cd_info *cd, SDL_CD *cdrom);
-+extern int tcd_readdiskinfo(struct tcd_state *cd, SDL_CD *cdrom);
- extern void tcd_writediskinfo(struct cd_info *cd, SDL_CD *cdrom);
-
- #endif /* TCD_CDDB_H */
diff --git a/audio/tcd/files/patch-src_cddb.c b/audio/tcd/files/patch-src_cddb.c
new file mode 100644
index 000000000000..4c2960505c8a
--- /dev/null
+++ b/audio/tcd/files/patch-src_cddb.c
@@ -0,0 +1,15 @@
+--- src/cddb.c.orig 2004-06-15 21:20:09 UTC
++++ src/cddb.c
+@@ -229,10 +229,11 @@ static char *cddb_filename(unsigned long
+ return concat_strings(get_home_dir(), "/.tcd/", cd_id, NULL);
+ }
+
+-extern int tcd_readdiskinfo(struct cd_info *cd, SDL_CD * cdrom)
++extern int tcd_readdiskinfo(struct tcd_state *cds, SDL_CD * cdrom)
+ {
+ int result;
+ char *filename;
++ struct cd_info *cd = &cds->cd_info;
+
+ result = 0;
+ if ((filename = cddb_filename(cddb_discid(cdrom))) != NULL) {
diff --git a/audio/tcd/files/patch-src_cddb.h b/audio/tcd/files/patch-src_cddb.h
new file mode 100644
index 000000000000..f551d1e9b285
--- /dev/null
+++ b/audio/tcd/files/patch-src_cddb.h
@@ -0,0 +1,11 @@
+--- src/cddb.h.orig 2004-06-15 20:13:19 UTC
++++ src/cddb.h
+@@ -30,7 +30,7 @@
+
+ #include "tcd.h"
+
+-extern int tcd_readdiskinfo(struct cd_info *cd, SDL_CD *cdrom);
++extern int tcd_readdiskinfo(struct tcd_state *cd, SDL_CD *cdrom);
+ extern void tcd_writediskinfo(struct cd_info *cd, SDL_CD *cdrom);
+
+ #endif /* TCD_CDDB_H */
diff --git a/audio/tcd/files/patch-src_tcd.c b/audio/tcd/files/patch-src_tcd.c
new file mode 100644
index 000000000000..d12398710c6b
--- /dev/null
+++ b/audio/tcd/files/patch-src_tcd.c
@@ -0,0 +1,156 @@
+--- src/tcd.c.orig 2004-06-15 20:32:31 UTC
++++ src/tcd.c
+@@ -33,6 +33,7 @@
+ #include <unistd.h>
+
+ #include <SDL/SDL.h>
++#include <sys/cdio.h>
+
+ #include "cd-utils.h"
+ #include "cddb.h"
+@@ -80,37 +81,40 @@ static void handle_play(void)
+
+ static void handle_next_track(void)
+ {
+- if (!CD_INDRIVE(state.cdrom->status)) {
++ int next_track;
++
++ if (!CD_INDRIVE(state.cdrom->status))
+ return;
+- }
+- if (state.cdrom->cur_track == state.cdrom->numtracks - 1) {
+- SDL_CDStop(state.cdrom);
+- } else if (state.play_method == REPEAT_TRK) {
+- SDL_CDPlayTracks(state.cdrom, state.cdrom->cur_track + 1, 0, 1, 0);
+- } else {
+- SDL_CDPlayTracks(state.cdrom, state.cdrom->cur_track + 1, 0, 0, 0);
+- }
++
++ if (state.cdrom->cur_track == state.cdrom->numtracks - 1)
++ next_track = 0;
++ else
++ next_track = state.cdrom->cur_track + 1;
++
++ if (state.play_method == REPEAT_TRK)
++ SDL_CDPlayTracks(state.cdrom, next_track, 0, 1, 0);
++ else
++ SDL_CDPlayTracks(state.cdrom, next_track, 0, 0, 0);
+ }
+
+ static void handle_prev_track(void)
+ {
+ int prev_track;
+
+- if (!CD_INDRIVE(state.cdrom->status)) {
++ if (!CD_INDRIVE(state.cdrom->status))
+ return;
+- }
+- if (state.cdrom->cur_track == 0) {
+- prev_track = 0;
+- } else if (state.cdrom->cur_frame / CD_FPS < 5) {
+- prev_track = state.cdrom->cur_track - 1;
+- } else {
++
++ if (state.cdrom->cur_frame / CD_FPS > 5)
+ prev_track = state.cdrom->cur_track;
+- }
+- if (state.play_method == REPEAT_TRK) {
++ else if (state.cdrom->cur_track == 0)
++ prev_track = state.cdrom->numtracks - 1;
++ else
++ prev_track = state.cdrom->cur_track - 1;
++
++ if (state.play_method == REPEAT_TRK)
+ SDL_CDPlayTracks(state.cdrom, prev_track, 0, 1, 0);
+- } else {
++ else
+ SDL_CDPlayTracks(state.cdrom, prev_track, 0, 0, 0);
+- }
+ }
+
+ static void handle_goto(void)
+@@ -134,11 +138,6 @@ static void handle_method(void)
+ }
+ }
+
+-static void handle_repeat_track(void)
+-{
+- state.play_method = REPEAT_TRK;
+-}
+-
+ static void handle_eject(void)
+ {
+ SDL_CDEject(state.cdrom);
+@@ -179,6 +178,26 @@ static void handle_skip_back(void)
+ }
+ }
+
++static void inc_volume(void)
++{
++ struct ioc_vol arg;
++ if(ioctl(state.cdrom->id, CDIOCGETVOL, &arg) == -1)
++ return;
++ arg.vol[0] += arg.vol[0] > 250 ? 255 - arg.vol[0] : 5;
++ arg.vol[1] += arg.vol[1] > 250 ? 255 - arg.vol[1] : 5;
++ ioctl(state.cdrom->id, CDIOCSETVOL, &arg);
++}
++
++static void dec_volume(void)
++{
++ struct ioc_vol arg;
++ if(ioctl(state.cdrom->id, CDIOCGETVOL, &arg) == -1)
++ return;
++ arg.vol[0] -= arg.vol[0] < 5 ? arg.vol[0] : 5;
++ arg.vol[1] -= arg.vol[1] < 5 ? arg.vol[1] : 5;
++ ioctl(state.cdrom->id, CDIOCSETVOL, &arg);
++}
++
+ static void init_SDL(int cdrom_num)
+ {
+ int err = SDL_Init(SDL_INIT_CDROM);
+@@ -218,10 +237,12 @@ static void detect_disc_change(void)
+ {
+ unsigned long discid = cddb_discid(state.cdrom);
+ if (discid != state.current_discid) {
+- if (state.cd_info.modified) {
++ if (state.cd_info.modified)
+ tcd_writediskinfo(&state.cd_info, state.cdrom);
+- }
+- tcd_readdiskinfo(&state.cd_info, state.cdrom);
++ if (CD_INDRIVE(state.cdrom->status))
++ tcd_readdiskinfo(&state, state.cdrom);
++ else
++ bzero(&state.cd_info, sizeof(state.cd_info));
+ state.current_discid = discid;
+ }
+ }
+@@ -237,7 +258,7 @@ int main(int argc, char **argv)
+ state.play_method = NORMAL;
+
+ init_SDL((argc > 1) ? strtol(argv[1], NULL, 0) : 0);
+- tcd_readdiskinfo(&state.cd_info, state.cdrom);
++ tcd_readdiskinfo(&state, state.cdrom);
+ tcd_ui_init();
+ tcd_ui_update(&state);
+ state.current_discid = cddb_discid(state.cdrom);
+@@ -255,14 +276,17 @@ int main(int argc, char **argv)
+ case '-': case '_': handle_prev_track(); break;
+ case 'g': case 'G': handle_goto(); break;
+ case 'c': case 'C': state.play_method = REPEAT_CD; break;
+- case 'r': case 'R': handle_repeat_track(); break;
++ case 'r': case 'R': state.play_method = REPEAT_TRK; break;
+ case 'm': case 'M': handle_method(); break;
+ case 'e': case 'E': handle_eject(); break;
+ case 't': case 'T': handle_editor(); break;
+- case 's': case 'S': handle_stop(); break;
++ case 's': case 'S': state.play_method = NORMAL;
++ handle_stop(); break;
+ case ']': handle_skip_forward(); break;
+ case '[': handle_skip_back(); break;
+- }
++ case '*': inc_volume(); break;
++ case '/': dec_volume(); break;
++ }
+ }
+ tcd_ui_shutdown();
+ if (state.cd_info.modified) {
diff --git a/audio/tcd/files/patch-src_user-interface.c b/audio/tcd/files/patch-src_user-interface.c
new file mode 100644
index 000000000000..d7fabd73204e
--- /dev/null
+++ b/audio/tcd/files/patch-src_user-interface.c
@@ -0,0 +1,15 @@
+--- src/user-interface.c.orig 2004-06-15 21:14:47 UTC
++++ src/user-interface.c
+@@ -186,8 +186,10 @@ static void draw_control_panel(struct tc
+ phelp(3, 26, 'G', "- Go to track", playable);
+ phelp(4, 26, ']', "- Skip ahead", playable);
+ phelp(5, 26, '[', "- Skip back", playable);
+- phelp(7, 1, 'T', "- Edit track database", playable);
+- phelp(8, 1, 'Q', "- Quit", 1);
++ phelp(7, 1, '*', "- Increase volume", playable);
++ phelp(8, 1, '/', "- Decrease volume", playable);
++ phelp(10, 1, 'T', "- Edit track database", playable);
++ phelp(11, 1, 'Q', "- Quit", 1);
+ }
+
+ static void draw_info(struct tcd_state *state)
diff --git a/audio/tcd/files/patch-tcd.c b/audio/tcd/files/patch-tcd.c
deleted file mode 100644
index 435bdfbe2cc6..000000000000
--- a/audio/tcd/files/patch-tcd.c
+++ /dev/null
@@ -1,156 +0,0 @@
---- src/tcd.c.orig 2004-06-15 22:32:31.000000000 +0200
-+++ src/tcd.c 2008-07-25 13:25:50.000000000 +0200
-@@ -33,6 +33,7 @@
- #include <unistd.h>
-
- #include <SDL/SDL.h>
-+#include <sys/cdio.h>
-
- #include "cd-utils.h"
- #include "cddb.h"
-@@ -80,37 +81,40 @@
-
- static void handle_next_track(void)
- {
-- if (!CD_INDRIVE(state.cdrom->status)) {
-+ int next_track;
-+
-+ if (!CD_INDRIVE(state.cdrom->status))
- return;
-- }
-- if (state.cdrom->cur_track == state.cdrom->numtracks - 1) {
-- SDL_CDStop(state.cdrom);
-- } else if (state.play_method == REPEAT_TRK) {
-- SDL_CDPlayTracks(state.cdrom, state.cdrom->cur_track + 1, 0, 1, 0);
-- } else {
-- SDL_CDPlayTracks(state.cdrom, state.cdrom->cur_track + 1, 0, 0, 0);
-- }
-+
-+ if (state.cdrom->cur_track == state.cdrom->numtracks - 1)
-+ next_track = 0;
-+ else
-+ next_track = state.cdrom->cur_track + 1;
-+
-+ if (state.play_method == REPEAT_TRK)
-+ SDL_CDPlayTracks(state.cdrom, next_track, 0, 1, 0);
-+ else
-+ SDL_CDPlayTracks(state.cdrom, next_track, 0, 0, 0);
- }
-
- static void handle_prev_track(void)
- {
- int prev_track;
-
-- if (!CD_INDRIVE(state.cdrom->status)) {
-+ if (!CD_INDRIVE(state.cdrom->status))
- return;
-- }
-- if (state.cdrom->cur_track == 0) {
-- prev_track = 0;
-- } else if (state.cdrom->cur_frame / CD_FPS < 5) {
-- prev_track = state.cdrom->cur_track - 1;
-- } else {
-+
-+ if (state.cdrom->cur_frame / CD_FPS > 5)
- prev_track = state.cdrom->cur_track;
-- }
-- if (state.play_method == REPEAT_TRK) {
-+ else if (state.cdrom->cur_track == 0)
-+ prev_track = state.cdrom->numtracks - 1;
-+ else
-+ prev_track = state.cdrom->cur_track - 1;
-+
-+ if (state.play_method == REPEAT_TRK)
- SDL_CDPlayTracks(state.cdrom, prev_track, 0, 1, 0);
-- } else {
-+ else
- SDL_CDPlayTracks(state.cdrom, prev_track, 0, 0, 0);
-- }
- }
-
- static void handle_goto(void)
-@@ -134,11 +138,6 @@
- }
- }
-
--static void handle_repeat_track(void)
--{
-- state.play_method = REPEAT_TRK;
--}
--
- static void handle_eject(void)
- {
- SDL_CDEject(state.cdrom);
-@@ -179,6 +178,26 @@
- }
- }
-
-+static void inc_volume(void)
-+{
-+ struct ioc_vol arg;
-+ if(ioctl(state.cdrom->id, CDIOCGETVOL, &arg) == -1)
-+ return;
-+ arg.vol[0] += arg.vol[0] > 250 ? 255 - arg.vol[0] : 5;
-+ arg.vol[1] += arg.vol[1] > 250 ? 255 - arg.vol[1] : 5;
-+ ioctl(state.cdrom->id, CDIOCSETVOL, &arg);
-+}
-+
-+static void dec_volume(void)
-+{
-+ struct ioc_vol arg;
-+ if(ioctl(state.cdrom->id, CDIOCGETVOL, &arg) == -1)
-+ return;
-+ arg.vol[0] -= arg.vol[0] < 5 ? arg.vol[0] : 5;
-+ arg.vol[1] -= arg.vol[1] < 5 ? arg.vol[1] : 5;
-+ ioctl(state.cdrom->id, CDIOCSETVOL, &arg);
-+}
-+
- static void init_SDL(int cdrom_num)
- {
- int err = SDL_Init(SDL_INIT_CDROM);
-@@ -218,10 +237,12 @@
- {
- unsigned long discid = cddb_discid(state.cdrom);
- if (discid != state.current_discid) {
-- if (state.cd_info.modified) {
-+ if (state.cd_info.modified)
- tcd_writediskinfo(&state.cd_info, state.cdrom);
-- }
-- tcd_readdiskinfo(&state.cd_info, state.cdrom);
-+ if (CD_INDRIVE(state.cdrom->status))
-+ tcd_readdiskinfo(&state, state.cdrom);
-+ else
-+ bzero(&state.cd_info, sizeof(state.cd_info));
- state.current_discid = discid;
- }
- }
-@@ -237,7 +258,7 @@
- state.play_method = NORMAL;
-
- init_SDL((argc > 1) ? strtol(argv[1], NULL, 0) : 0);
-- tcd_readdiskinfo(&state.cd_info, state.cdrom);
-+ tcd_readdiskinfo(&state, state.cdrom);
- tcd_ui_init();
- tcd_ui_update(&state);
- state.current_discid = cddb_discid(state.cdrom);
-@@ -255,14 +276,17 @@
- case '-': case '_': handle_prev_track(); break;
- case 'g': case 'G': handle_goto(); break;
- case 'c': case 'C': state.play_method = REPEAT_CD; break;
-- case 'r': case 'R': handle_repeat_track(); break;
-+ case 'r': case 'R': state.play_method = REPEAT_TRK; break;
- case 'm': case 'M': handle_method(); break;
- case 'e': case 'E': handle_eject(); break;
- case 't': case 'T': handle_editor(); break;
-- case 's': case 'S': handle_stop(); break;
-+ case 's': case 'S': state.play_method = NORMAL;
-+ handle_stop(); break;
- case ']': handle_skip_forward(); break;
- case '[': handle_skip_back(); break;
-- }
-+ case '*': inc_volume(); break;
-+ case '/': dec_volume(); break;
-+ }
- }
- tcd_ui_shutdown();
- if (state.cd_info.modified) {
diff --git a/audio/tcd/files/patch-user-interface.c b/audio/tcd/files/patch-user-interface.c
deleted file mode 100644
index 0fbb2521e55a..000000000000
--- a/audio/tcd/files/patch-user-interface.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/user-interface.c.orig 2008-06-27 22:55:46.000000000 +0200
-+++ src/user-interface.c 2008-06-27 22:55:49.000000000 +0200
-@@ -186,8 +186,10 @@
- phelp(3, 26, 'G', "- Go to track", playable);
- phelp(4, 26, ']', "- Skip ahead", playable);
- phelp(5, 26, '[', "- Skip back", playable);
-- phelp(7, 1, 'T', "- Edit track database", playable);
-- phelp(8, 1, 'Q', "- Quit", 1);
-+ phelp(7, 1, '*', "- Increase volume", playable);
-+ phelp(8, 1, '/', "- Decrease volume", playable);
-+ phelp(10, 1, 'T', "- Edit track database", playable);
-+ phelp(11, 1, 'Q', "- Quit", 1);
- }
-
- static void draw_info(struct tcd_state *state)
diff --git a/audio/tclmidi/files/patch-Makefile.ins b/audio/tclmidi/files/patch-Makefile.ins
index 037b99198ab6..39cdd3df4cfc 100644
--- a/audio/tclmidi/files/patch-Makefile.ins
+++ b/audio/tclmidi/files/patch-Makefile.ins
@@ -1,6 +1,6 @@
---- Makefile.in 1996-10-09 23:32:36.000000000 -0400
-+++ Makefile.in 2012-04-07 12:07:34.000000000 -0400
-@@ -11,7 +11,7 @@
+--- Makefile.in.orig 1996-10-10 03:32:36 UTC
++++ Makefile.in
+@@ -11,7 +11,7 @@ SCRIPTS = midtotcl minfo mplay mrec
# The directory containing the Tcl library archive file appropriate
# for this version of Tk:
@@ -9,7 +9,7 @@
#----------------------------------------------------------------
# The information below is modified by the configure script when
-@@ -35,8 +35,9 @@
+@@ -35,8 +35,9 @@ srcdir = @srcdir@
VPATH = @srcdir@
CFLAGS = @CFLAGS@ @DEFS@
@@ -20,7 +20,7 @@
TCLMFILES = tclmCmd.o tclmUtil.o tclmEvnt.o tclmPlay.o tclmPtch.o TclmIntp.o
TCLMFILES_SRC = tclmCmd.cxx tclmUtil.cxx tclmEvnt.cxx tclmPlay.cxx \
-@@ -61,7 +62,7 @@
+@@ -61,7 +62,7 @@ pkgIndex.tcl: $(PROJ_LIB_NAME)
@echo 'pkg_mkIndex . $(PROJ_LIB_NAME)' | @TCLSH_PATH@
.cxx.o:
@@ -29,7 +29,7 @@
$(PROJ_LIB_NAME): events/objs smf/objs \
song/objs device/objs patch/objs rb/objs $(TCLMFILES)
-@@ -101,7 +102,7 @@
+@@ -101,7 +102,7 @@ midtotcl: midtotcl.dist
install: $(PROJ_LIB_NAME) $(SCRIPTS)
-mkdir -p $(prefix)$(libdir)/tclmidi
@@ -38,7 +38,7 @@
echo 'pkg_mkIndex $(prefix)$(libdir)/tclmidi \
$(PROJECT)*${SHLIB_SUFFIX}' | @TCLSH_PATH@
cd man; $(MAKE) install
-@@ -128,7 +129,7 @@
+@@ -128,7 +129,7 @@ depend:
sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
echo >> Makefile.tmp
echo "##" "Dependancies" >> Makefile.tmp
@@ -47,69 +47,87 @@
cp Makefile.tmp Makefile
rm Makefile.tmp
---- device/Makefile.in 1996-10-09 23:32:40.000000000 -0400
-+++ device/Makefile.in 2012-04-07 12:13:09.000000000 -0400
-@@ -18,4 +18,5 @@
+--- device/Makefile.in.orig 1996-10-10 03:32:40 UTC
++++ device/Makefile.in
+@@ -17,6 +17,7 @@ CFLAGS = @CFLAGS@ @DEFS@
+ CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
-I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../patch \
-I$(srcdir)/../smf -I$(srcdir)/../song -I$(srcdir)/.. -I$(srcdir)
+CXX_SWITCHES= ${CC_SWITCHES} ${CXXFLAGS}
DEVICEFILES = MidiDev.o TclmDr75.o
-@@ -25,5 +26,5 @@
+ DEVICEFILES_SRC = MidiDev.cxx TclmDr75.cxx
+@@ -24,7 +25,7 @@ DEVICEFILES_SRC = MidiDev.cxx TclmDr75.c
+ .SUFFIXES: .cxx $(SUFFIXES)
.cxx.o:
- @CXX@ -c $(CC_SWITCHES) $<
+ @CXX@ -c $(CXX_SWITCHES) $<
objs: $(DEVICEFILES)
-@@ -34,5 +35,5 @@
+ for f in $(DEVICEFILES) ; do echo device/$$f ; done > objs
+@@ -33,7 +34,7 @@ depend:
+ sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
echo >> Makefile.tmp
echo "##" "Dependancies" >> Makefile.tmp
- @CXX@ -M $(CC_SWITCHES) $(DEVICEFILES_SRC) >> Makefile.tmp
+ @CXX@ -M $(CXX_SWITCHES) $(DEVICEFILES_SRC) >> Makefile.tmp
cp Makefile.tmp Makefile
rm Makefile.tmp
---- events/Makefile.in 1996-10-09 23:32:42.000000000 -0400
-+++ events/Makefile.in 2012-04-07 12:15:41.000000000 -0400
-@@ -17,4 +17,5 @@
+
+--- events/Makefile.in.orig 1996-10-10 03:32:42 UTC
++++ events/Makefile.in
+@@ -16,6 +16,7 @@ VPATH = @srcdir@
+ CFLAGS = @CFLAGS@ @DEFS@
CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
-I$(srcdir)/../smf -I$(srcdir)/../song -I$(srcdir)/.. -I$(srcdir)
+CXX_SWITCHES = ${CC_SWITCHES} ${CXXFLAGS}
EVENTFILES = ChanPres.o Event.o MChanPrf.o MCopy.o MCue.o \
-@@ -36,5 +37,5 @@
+ MEOT.o MEvent.o MInstNam.o MKey.o MLyric.o \
+@@ -35,7 +36,7 @@ EVENTFILES_SRC = ChanPres.cxx Event.cxx
+ .SUFFIXES: .cxx $(SUFFIXES)
.cxx.o:
- @CXX@ -c $(CC_SWITCHES) $<
+ @CXX@ -c $(CXX_SWITCHES) $<
objs: $(EVENTFILES)
-@@ -45,5 +46,5 @@
+ for f in $(EVENTFILES) ; do echo events/$$f ; done > objs
+@@ -44,7 +45,7 @@ depend:
+ sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
echo >> Makefile.tmp
echo "##" "Dependancies" >> Makefile.tmp
- @CXX@ -M $(CC_SWITCHES) $(EVENTFILES_SRC) >> Makefile.tmp
+ @CXX@ -M $(CXX_SWITCHES) $(EVENTFILES_SRC) >> Makefile.tmp
cp Makefile.tmp Makefile
rm Makefile.tmp
---- patch/Makefile.in 1996-10-09 23:32:43.000000000 -0400
-+++ patch/Makefile.in 2012-04-07 12:23:29.000000000 -0400
-@@ -17,4 +17,5 @@
+
+--- patch/Makefile.in.orig 1996-10-10 03:32:43 UTC
++++ patch/Makefile.in
+@@ -16,6 +16,7 @@ VPATH = @srcdir@
+ CFLAGS = @CFLAGS@ @DEFS@
CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
-I. -I..
+CXX_SWITCHES = ${CC_SWITCHES} ${CXXFLAGS}
PATCHFILES = GusPatch.o
-@@ -24,5 +25,5 @@
+ PATCHFILES_SRC = GusPatch.cxx
+@@ -23,7 +24,7 @@ PATCHFILES_SRC = GusPatch.cxx
+ .SUFFIXES: .cxx $(SUFFIXES)
.cxx.o:
- @CXX@ -c $(CC_SWITCHES) $<
+ @CXX@ -c $(CXX_SWITCHES) $<
objs: $(PATCHFILES)
-@@ -33,5 +34,5 @@
+ for f in $(PATCHFILES) ; do echo patch/$$f ; done > objs
+@@ -32,7 +33,7 @@ depend:
+ sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
echo >> Makefile.tmp
echo "##" "Dependancies" >> Makefile.tmp
- @CXX@ -M $(CC_SWITCHES) $(PATCHFILES_SRC) >> Makefile.tmp
+ @CXX@ -M $(CXX_SWITCHES) $(PATCHFILES_SRC) >> Makefile.tmp
cp Makefile.tmp Makefile
rm Makefile.tmp
+
diff --git a/audio/tclmidi/files/patch-TclmIntp.cxx b/audio/tclmidi/files/patch-TclmIntp.cxx
index 56ca08aafebc..528a8a6c37ae 100644
--- a/audio/tclmidi/files/patch-TclmIntp.cxx
+++ b/audio/tclmidi/files/patch-TclmIntp.cxx
@@ -1,5 +1,5 @@
---- TclmIntp.cxx.orig 2013-05-14 11:25:42.000000000 +0200
-+++ TclmIntp.cxx 2013-05-14 11:25:49.000000000 +0200
+--- TclmIntp.cxx.orig 1996-07-28 19:09:03 UTC
++++ TclmIntp.cxx
@@ -37,8 +37,7 @@
#endif
#include "TclmIntp.h"
diff --git a/audio/tclmidi/files/patch-TclmIntp.h b/audio/tclmidi/files/patch-TclmIntp.h
index ef1452fce43b..dcecbffbab5a 100644
--- a/audio/tclmidi/files/patch-TclmIntp.h
+++ b/audio/tclmidi/files/patch-TclmIntp.h
@@ -1,6 +1,6 @@
---- TclmIntp.h.orig 2013-05-14 11:24:39.000000000 +0200
-+++ TclmIntp.h 2013-05-14 11:25:36.000000000 +0200
-@@ -64,6 +64,5 @@
+--- TclmIntp.h.orig 1996-07-28 18:53:08 UTC
++++ TclmIntp.h
+@@ -64,6 +64,5 @@ private:
int current_song;
int current_dev;
int current_patch;
diff --git a/audio/tclmidi/files/patch-configure b/audio/tclmidi/files/patch-configure
index 3358f74e9e64..c813021d7fe8 100644
--- a/audio/tclmidi/files/patch-configure
+++ b/audio/tclmidi/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Thu Oct 10 19:57:27 1996
-+++ configure Sun Mar 28 22:54:44 2004
-@@ -1604,7 +1604,7 @@
+--- configure.orig 1996-10-11 02:57:27 UTC
++++ configure
+@@ -1604,7 +1604,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
# Greg figured out how to use gcc instead of ld..
# -lgcc can be found in /usr/lib/gcc-lib/i486-linux/2.7.0/
# or something similar.
@@ -9,7 +9,7 @@
DL_OBJS="tclLoadDld.o"
DL_LIBS="-ldld"
LD_FLAGS=""
-@@ -1727,12 +1727,12 @@
+@@ -1727,12 +1727,12 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
diff --git a/audio/tclmidi/files/patch-smf_Makefile.in b/audio/tclmidi/files/patch-smf_Makefile.in
new file mode 100644
index 000000000000..1039412dd897
--- /dev/null
+++ b/audio/tclmidi/files/patch-smf_Makefile.in
@@ -0,0 +1,31 @@
+--- smf/Makefile.in.orig 1996-10-10 03:32:53 UTC
++++ smf/Makefile.in
+@@ -14,7 +14,9 @@ srcdir = @srcdir@
+ VPATH = @srcdir@
+
+ CFLAGS = @CFLAGS@ @DEFS@
+-CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS}
++CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
++ -I$(srcdir)/../smf -I$(srcdir)/../song -I$(srcdir)/.. -I$(srcdir)
++CXX_SWITCHES= ${CC_SWITCHES} ${CXXFLAGS}
+
+ SMFFILES = SMFUtils.o SMFHead.o SMFTrack.o
+ SMFFILES_SRC = SMFUtils.cxx SMFHead.cxx SMFTrack.cxx
+@@ -22,7 +24,7 @@ SMFFILES_SRC = SMFUtils.cxx SMFHead.cxx
+ .SUFFIXES: .cxx $(SUFFIXES)
+
+ .cxx.o:
+- @CXX@ -c $(CC_SWITCHES) $<
++ @CXX@ -c $(CXX_SWITCHES) $<
+
+ objs: $(SMFFILES)
+ for f in $(SMFFILES) ; do echo smf/$$f ; done > objs
+@@ -31,7 +33,7 @@ depend:
+ sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
+ echo >> Makefile.tmp
+ echo "##" "Dependancies" >> Makefile.tmp
+- @CXX@ -M $(CC_SWITCHES) $(SMFFILES_SRC) >> Makefile.tmp
++ @CXX@ -M $(CXX_SWITCHES) $(SMFFILES_SRC) >> Makefile.tmp
+ cp Makefile.tmp Makefile
+ rm Makefile.tmp
+
diff --git a/audio/tclmidi/files/patch-smf_SMFHead.cxx b/audio/tclmidi/files/patch-smf_SMFHead.cxx
index 897dedea31e8..5f5d03b0a8b7 100644
--- a/audio/tclmidi/files/patch-smf_SMFHead.cxx
+++ b/audio/tclmidi/files/patch-smf_SMFHead.cxx
@@ -1,6 +1,6 @@
---- smf/SMFHead.cxx.orig 2013-09-24 09:16:20.000000000 +0200
-+++ smf/SMFHead.cxx 2013-09-24 09:16:53.000000000 +0200
-@@ -160,8 +160,8 @@
+--- smf/SMFHead.cxx.orig 1996-08-05 03:47:35 UTC
++++ smf/SMFHead.cxx
+@@ -160,8 +160,8 @@ SMFHead::Write(Tcl_Channel channel) cons
return (1);
}
diff --git a/audio/tclmidi/files/patch-smf_SMFHead.h b/audio/tclmidi/files/patch-smf_SMFHead.h
index 791aefa61f18..c913ffc57b0d 100644
--- a/audio/tclmidi/files/patch-smf_SMFHead.h
+++ b/audio/tclmidi/files/patch-smf_SMFHead.h
@@ -1,5 +1,5 @@
---- smf/SMFHead.h.orig 2013-09-24 09:15:40.000000000 +0200
-+++ smf/SMFHead.h 2013-09-24 09:15:50.000000000 +0200
+--- smf/SMFHead.h.orig 1996-08-05 03:47:35 UTC
++++ smf/SMFHead.h
@@ -34,10 +34,10 @@
extern "C" {
#include <tcl.h>
diff --git a/audio/tclmidi/files/patch-smf_SMFTrack.cxx b/audio/tclmidi/files/patch-smf_SMFTrack.cxx
index 457060c0f032..37944d6a0f3c 100644
--- a/audio/tclmidi/files/patch-smf_SMFTrack.cxx
+++ b/audio/tclmidi/files/patch-smf_SMFTrack.cxx
@@ -1,6 +1,6 @@
---- smf/SMFTrack.cxx.orig 1996-08-05 05:47:36.000000000 +0200
-+++ smf/SMFTrack.cxx 2013-09-24 09:53:53.000000000 +0200
-@@ -355,7 +355,8 @@
+--- smf/SMFTrack.cxx.orig 1996-08-05 03:47:36 UTC
++++ smf/SMFTrack.cxx
+@@ -355,7 +355,8 @@ SMFTrack::IncreaseSize(long len)
ostream &
operator<<(ostream &os, const SMFTrack &t)
{
diff --git a/audio/tclmidi/files/patch-smf__Makefile.in b/audio/tclmidi/files/patch-smf__Makefile.in
deleted file mode 100644
index 83cd73c753c9..000000000000
--- a/audio/tclmidi/files/patch-smf__Makefile.in
+++ /dev/null
@@ -1,30 +0,0 @@
---- smf/Makefile.in Thu Oct 10 05:32:53 1996
-+++ smf/Makefile.in 2012-04-07 12:16:41.000000000 -0400
-@@ -14,7 +14,9 @@
- VPATH = @srcdir@
-
- CFLAGS = @CFLAGS@ @DEFS@
--CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS}
-+CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
-+ -I$(srcdir)/../smf -I$(srcdir)/../song -I$(srcdir)/.. -I$(srcdir)
-+CXX_SWITCHES= ${CC_SWITCHES} ${CXXFLAGS}
-
- SMFFILES = SMFUtils.o SMFHead.o SMFTrack.o
- SMFFILES_SRC = SMFUtils.cxx SMFHead.cxx SMFTrack.cxx
-@@ -22,7 +24,7 @@
- .SUFFIXES: .cxx $(SUFFIXES)
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- objs: $(SMFFILES)
- for f in $(SMFFILES) ; do echo smf/$$f ; done > objs
-@@ -31,6 +33,6 @@
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(SMFFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(SMFFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
diff --git a/audio/tclmidi/files/patch-song_Makefile.in b/audio/tclmidi/files/patch-song_Makefile.in
new file mode 100644
index 000000000000..f0ff02970f63
--- /dev/null
+++ b/audio/tclmidi/files/patch-song_Makefile.in
@@ -0,0 +1,30 @@
+--- song/Makefile.in.orig 1996-10-10 03:32:55 UTC
++++ song/Makefile.in
+@@ -15,7 +15,8 @@ VPATH = @srcdir@
+
+ CFLAGS = @CFLAGS@ @DEFS@
+ CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
+- -I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../smf -I$(srcdir)
++ -I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../smf -I$(srcdir)/.. -I$(srcdir)
++CXX_SWITCHES = ${CC_SWITCHES} ${CXXFLAGS}
+
+ SONGFILES = EvntTree.o Song.o
+ SONGFILES_SRC = EvntTree.cxx Song.cxx
+@@ -23,7 +24,7 @@ SONGFILES_SRC = EvntTree.cxx Song.cxx
+ .SUFFIXES: .cxx $(SUFFIXES)
+
+ .cxx.o:
+- @CXX@ -c $(CC_SWITCHES) $<
++ @CXX@ -c $(CXX_SWITCHES) $<
+
+ objs: $(SONGFILES)
+ for f in $(SONGFILES) ; do echo song/$$f ; done > objs
+@@ -32,7 +33,7 @@ depend:
+ sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
+ echo >> Makefile.tmp
+ echo "##" "Dependancies" >> Makefile.tmp
+- @CXX@ -M $(CC_SWITCHES) $(SONGFILES_SRC) >> Makefile.tmp
++ @CXX@ -M $(CXX_SWITCHES) $(SONGFILES_SRC) >> Makefile.tmp
+ cp Makefile.tmp Makefile
+ rm Makefile.tmp
+
diff --git a/audio/tclmidi/files/patch-song__Makefile.in b/audio/tclmidi/files/patch-song__Makefile.in
deleted file mode 100644
index 594790d70b68..000000000000
--- a/audio/tclmidi/files/patch-song__Makefile.in
+++ /dev/null
@@ -1,30 +0,0 @@
---- song/Makefile.in Thu Oct 10 05:32:55 1996
-+++ song/Makefile.in 2012-04-07 12:25:09.000000000 -0400
-@@ -15,7 +15,8 @@
-
- CFLAGS = @CFLAGS@ @DEFS@
- CC_SWITCHES = @CFLAGS@ @DEFS@ -I${TCL_GENERIC_DIR} ${SHLIB_CFLAGS} \
-- -I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../smf -I$(srcdir)
-+ -I$(srcdir)/../events -I$(srcdir)/../rb -I$(srcdir)/../smf -I$(srcdir)/.. -I$(srcdir)
-+CXX_SWITCHES = ${CC_SWITCHES} ${CXXFLAGS}
-
- SONGFILES = EvntTree.o Song.o
- SONGFILES_SRC = EvntTree.cxx Song.cxx
-@@ -23,7 +24,7 @@
- .SUFFIXES: .cxx $(SUFFIXES)
-
- .cxx.o:
-- @CXX@ -c $(CC_SWITCHES) $<
-+ @CXX@ -c $(CXX_SWITCHES) $<
-
- objs: $(SONGFILES)
- for f in $(SONGFILES) ; do echo song/$$f ; done > objs
-@@ -32,7 +33,7 @@
- sed "/[#]# Dependancies/,$$$$d" < Makefile > Makefile.tmp
- echo >> Makefile.tmp
- echo "##" "Dependancies" >> Makefile.tmp
-- @CXX@ -M $(CC_SWITCHES) $(SONGFILES_SRC) >> Makefile.tmp
-+ @CXX@ -M $(CXX_SWITCHES) $(SONGFILES_SRC) >> Makefile.tmp
- cp Makefile.tmp Makefile
- rm Makefile.tmp
-
diff --git a/audio/tclmidi/files/patch-tclmUtil.cxx b/audio/tclmidi/files/patch-tclmUtil.cxx
index a4dde2a2285d..f0ebd5511152 100644
--- a/audio/tclmidi/files/patch-tclmUtil.cxx
+++ b/audio/tclmidi/files/patch-tclmUtil.cxx
@@ -1,5 +1,5 @@
---- tclmUtil.cxx.orig 2013-09-24 09:20:50.000000000 +0200
-+++ tclmUtil.cxx 2013-09-24 09:22:32.000000000 +0200
+--- tclmUtil.cxx.orig 1996-07-28 19:09:06 UTC
++++ tclmUtil.cxx
@@ -31,8 +31,8 @@
extern "C" {
#include <tcl.h>
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-@@ -99,12 +99,12 @@
+@@ -99,12 +99,12 @@ Tclm_ParseDataByte(Tcl_Interp *interp, c
}
void
diff --git a/audio/tempest_for_eliza/files/patch-configure b/audio/tempest_for_eliza/files/patch-configure
index 35451fd653af..40b929b294af 100644
--- a/audio/tempest_for_eliza/files/patch-configure
+++ b/audio/tempest_for_eliza/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Sat Dec 1 19:50:18 2001
-+++ configure Wed Apr 17 16:00:28 2002
-@@ -1055,7 +1055,7 @@
+--- configure.orig 2001-12-01 17:50:18 UTC
++++ configure
+@@ -1055,7 +1055,7 @@ YYY_CXXFLAGS="$CXXFLAGS"
if test "$yyynooptimizing" = "yes"; then
YYY_CXXFLAGS="$YYY_CXXFLAGS -O0"
else
diff --git a/audio/terminatorx/files/patch-configure.in b/audio/terminatorx/files/patch-configure.in
index 4fc362b786ea..0c89f46345d6 100644
--- a/audio/terminatorx/files/patch-configure.in
+++ b/audio/terminatorx/files/patch-configure.in
@@ -1,6 +1,6 @@
---- configure.in.orig 2010-08-14 21:50:15.000000000 +0200
-+++ configure.in 2010-08-14 21:53:26.000000000 +0200
-@@ -118,6 +118,32 @@
+--- configure.in.orig 2011-11-13 12:53:51 UTC
++++ configure.in
+@@ -118,6 +118,32 @@ if test "$tX_threads" = "no"; then
AC_MSG_ERROR([** failed to detect pthreads implementation **])
fi
@@ -33,7 +33,7 @@
dnl GTK+ search. Enable FileChooser for gtk+>=2.4
AM_PATH_GTK_2_0(, [
-@@ -490,6 +516,8 @@
+@@ -509,6 +535,8 @@ AC_MSG_CHECKING(for GNOME)
AC_MSG_RESULT([Found GNOME - installing terminatorX.desktop.])
OPTION_GNOME="yes"
else
@@ -42,7 +42,7 @@
AC_MSG_RESULT([GNOME not found.])
fi
AM_CONDITIONAL(GNOMEpresent, test "$gnomepresent" = yes)
-@@ -544,7 +572,7 @@
+@@ -563,7 +591,7 @@ AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)
if test "$prefix" != "NONE"; then
diff --git a/audio/terminatorx/files/patch-src_main.cc b/audio/terminatorx/files/patch-src_main.cc
index 4b8a777e90f5..f5461e893806 100644
--- a/audio/terminatorx/files/patch-src_main.cc
+++ b/audio/terminatorx/files/patch-src_main.cc
@@ -1,5 +1,5 @@
---- src/main.cc.orig Thu Aug 21 06:41:24 2003
-+++ src/main.cc Sat Aug 23 04:52:05 2003
+--- src/main.cc.orig 2011-01-30 21:01:30 UTC
++++ src/main.cc
@@ -33,7 +33,7 @@
4 October 1999: Rewrite ;) - back to C++
*/
diff --git a/audio/terminatorx/files/patch-src_tX__dial.c b/audio/terminatorx/files/patch-src_tX__dial.c
new file mode 100644
index 000000000000..6a7208f51753
--- /dev/null
+++ b/audio/terminatorx/files/patch-src_tX__dial.c
@@ -0,0 +1,11 @@
+--- src/tX_dial.c.orig 2011-01-30 21:01:30 UTC
++++ src/tX_dial.c
+@@ -266,7 +266,7 @@ static void gtk_tx_dial_size_allocate (G
+ }
+ }
+
+-inline void gtk_tx_dial_draw (GtkTxDial *tx_dial, GtkWidget *widget)
++static inline void gtk_tx_dial_draw (GtkTxDial *tx_dial, GtkWidget *widget)
+ {
+ if (GTK_WIDGET_DRAWABLE (widget)) {
+ gdk_pixbuf_render_to_drawable(knob_pixmaps[tx_dial->old_image],
diff --git a/audio/terminatorx/files/patch-src_tX__dialog.cc b/audio/terminatorx/files/patch-src_tX__dialog.cc
new file mode 100644
index 000000000000..321cb9716c76
--- /dev/null
+++ b/audio/terminatorx/files/patch-src_tX__dialog.cc
@@ -0,0 +1,14 @@
+--- src/tX_dialog.cc.orig 2011-01-30 21:01:30 UTC
++++ src/tX_dialog.cc
+@@ -252,7 +252,11 @@ GList *get_alsa_device_list() {
+ #ifdef USE_OSS
+ static GList *oss_devices=NULL;
+
++#ifdef HAVE_SCANDIR_POSIX
+ int oss_select_dsp_only(const struct dirent *entry){
++#else
++int oss_select_dsp_only(struct dirent *entry){
++#endif
+ return (strstr(entry->d_name, "dsp")!=0);
+ }
+
diff --git a/audio/terminatorx/files/patch-src_tX__global.c b/audio/terminatorx/files/patch-src_tX__global.c
new file mode 100644
index 000000000000..990d98831e29
--- /dev/null
+++ b/audio/terminatorx/files/patch-src_tX__global.c
@@ -0,0 +1,11 @@
+--- src/tX_global.c.orig 2011-01-30 21:01:31 UTC
++++ src/tX_global.c
+@@ -127,7 +127,7 @@ void set_global_defaults() {
+ #endif
+ globals.use_stdout_cmdline=0;
+ strcpy(globals.current_path, "");
+- strcpy(globals.lrdf_path, "/usr/share/ladspa/rdf:/usr/local/share/ladspa/rdf");
++ strcpy(globals.lrdf_path, "%%LOCALBASE%%/share/ladspa/rdf");
+ globals.fullscreen_enabled=0;
+ globals.confirm_events=0;
+ globals.compress_set_files=0;
diff --git a/audio/terminatorx/files/patch-src_tX__ladspa.cc b/audio/terminatorx/files/patch-src_tX__ladspa.cc
new file mode 100644
index 000000000000..a7e9dc7ef5fe
--- /dev/null
+++ b/audio/terminatorx/files/patch-src_tX__ladspa.cc
@@ -0,0 +1,13 @@
+--- src/tX_ladspa.cc.orig 2011-01-30 21:01:31 UTC
++++ src/tX_ladspa.cc
+@@ -45,8 +45,8 @@ void LADSPA_Plugin :: init ()
+ ladspa_path_ptr=getenv("LADSPA_PATH");
+
+ if (!ladspa_path_ptr) {
+- tX_warning("LADSPA_PATH not set. Trying /usr/lib/ladspa:/usr/local/lib/ladspa");
+- strcpy(ladspa_path, "/usr/lib/ladspa:/usr/local/lib/ladspa");
++ tX_warning("LADSPA_PATH not set. Trying %%LOCALBASE%%/lib/ladspa");
++ strcpy(ladspa_path, "%%LOCALBASE%%/lib/ladspa");
+ }
+ else strncpy(ladspa_path, ladspa_path_ptr, sizeof(ladspa_path));
+
diff --git a/audio/terminatorx/files/patch-src_tX__mastergui.cc b/audio/terminatorx/files/patch-src_tX__mastergui.cc
new file mode 100644
index 000000000000..8e951f239487
--- /dev/null
+++ b/audio/terminatorx/files/patch-src_tX__mastergui.cc
@@ -0,0 +1,20 @@
+--- src/tX_mastergui.cc.orig 2011-11-13 12:53:51 UTC
++++ src/tX_mastergui.cc
+@@ -273,7 +273,7 @@ char tx_mg_current_setname[PATH_MAX]="";
+ GtkSignalFunc new_tables() {
+ GtkWidget *dialog=gtk_message_dialog_new(GTK_WINDOW(main_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+- "Are you sure you want to loose all turntables and events?");
++ "Are you sure you want to lose all turntables and events?");
+
+ int res=gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+@@ -894,7 +894,7 @@ gboolean quit()
+ if (globals.quit_confirm) {
+ GtkWidget *dialog=gtk_message_dialog_new(GTK_WINDOW(main_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+- "Exit terminatorX and loose all unsaved data?");
++ "Exit terminatorX and lose all unsaved data?");
+
+ int res=gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
diff --git a/audio/terminatorx/files/patch-src_tX__mouse.cc b/audio/terminatorx/files/patch-src_tX__mouse.cc
new file mode 100644
index 000000000000..facee670de49
--- /dev/null
+++ b/audio/terminatorx/files/patch-src_tX__mouse.cc
@@ -0,0 +1,12 @@
+--- src/tX_mouse.cc.orig 2011-01-30 21:01:32 UTC
++++ src/tX_mouse.cc
+@@ -47,7 +47,8 @@
+ #include "tX_global.h"
+ #include "tX_engine.h"
+ #include "tX_vtt.h"
+-#include <stdlib.h>
++#include <cstdlib>
++#include <cmath>
+
+ #define TX_MOUSE_SPEED_NORMAL 0.05
+ #define TX_MOUSE_SPEED_WARP 250000
diff --git a/audio/terminatorx/files/patch-src_tX__mouse.h b/audio/terminatorx/files/patch-src_tX__mouse.h
new file mode 100644
index 000000000000..2de3f7430e3b
--- /dev/null
+++ b/audio/terminatorx/files/patch-src_tX__mouse.h
@@ -0,0 +1,11 @@
+--- src/tX_mouse.h.orig 2011-01-30 21:01:32 UTC
++++ src/tX_mouse.h
+@@ -34,7 +34,7 @@
+ #include <X11/extensions/XInput.h>
+ #include <X11/keysym.h>
+ #include <glib.h>
+-#include <gdk/gdk.h>
++#include <gtk/gtk.h>
+ #include <gdk/gdkkeysyms.h>
+
+ /* Use old gdk keys if the new ones are not yet defined */
diff --git a/audio/terminatorx/files/patch-src_tX_dial.c b/audio/terminatorx/files/patch-src_tX_dial.c
deleted file mode 100644
index 6589437cf80a..000000000000
--- a/audio/terminatorx/files/patch-src_tX_dial.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/tX_dial.c.orig 2013-03-20 09:38:30.000000000 +0100
-+++ src/tX_dial.c 2013-03-20 09:38:43.000000000 +0100
-@@ -266,7 +266,7 @@
- }
- }
-
--inline void gtk_tx_dial_draw (GtkTxDial *tx_dial, GtkWidget *widget)
-+static inline void gtk_tx_dial_draw (GtkTxDial *tx_dial, GtkWidget *widget)
- {
- if (GTK_WIDGET_DRAWABLE (widget)) {
- gdk_pixbuf_render_to_drawable(knob_pixmaps[tx_dial->old_image],
diff --git a/audio/terminatorx/files/patch-src_tX_dialog.cc b/audio/terminatorx/files/patch-src_tX_dialog.cc
deleted file mode 100644
index a69700179d6b..000000000000
--- a/audio/terminatorx/files/patch-src_tX_dialog.cc
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/tX_dialog.cc.orig 2004-02-06 19:28:21.000000000 +0100
-+++ src/tX_dialog.cc 2010-08-14 22:00:50.000000000 +0200
-@@ -252,7 +252,11 @@
- #ifdef USE_OSS
- static GList *oss_devices=NULL;
-
-+#ifdef HAVE_SCANDIR_POSIX
- int oss_select_dsp_only(const struct dirent *entry){
-+#else
-+int oss_select_dsp_only(struct dirent *entry){
-+#endif
- return (strstr(entry->d_name, "dsp")!=0);
- }
-
diff --git a/audio/terminatorx/files/patch-src_tX_global.c b/audio/terminatorx/files/patch-src_tX_global.c
deleted file mode 100644
index 67c21b697554..000000000000
--- a/audio/terminatorx/files/patch-src_tX_global.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/tX_global.c.orig Thu Aug 21 06:41:24 2003
-+++ src/tX_global.c Sat Aug 23 04:34:16 2003
-@@ -127,7 +127,7 @@
- #endif
- globals.use_stdout_cmdline=0;
- strcpy(globals.current_path, "");
-- strcpy(globals.lrdf_path, "/usr/share/ladspa/rdf:/usr/local/share/ladspa/rdf");
-+ strcpy(globals.lrdf_path, "%%LOCALBASE%%/share/ladspa/rdf");
- globals.fullscreen_enabled=0;
- globals.confirm_events=0;
- globals.compress_set_files=0;
diff --git a/audio/terminatorx/files/patch-src_tX_ladspa.cc b/audio/terminatorx/files/patch-src_tX_ladspa.cc
deleted file mode 100644
index 56ba8e4ecc17..000000000000
--- a/audio/terminatorx/files/patch-src_tX_ladspa.cc
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/tX_ladspa.cc.orig Tue Aug 19 02:36:40 2003
-+++ src/tX_ladspa.cc Sat Aug 23 04:37:18 2003
-@@ -44,8 +44,8 @@
- ladspa_path_ptr=getenv("LADSPA_PATH");
-
- if (!ladspa_path_ptr) {
-- tX_warning("LADSPA_PATH not set. Trying /usr/lib/ladspa:/usr/local/lib/ladspa");
-- strcpy(ladspa_path, "/usr/lib/ladspa:/usr/local/lib/ladspa");
-+ tX_warning("LADSPA_PATH not set. Trying %%LOCALBASE%%/lib/ladspa");
-+ strcpy(ladspa_path, "%%LOCALBASE%%/lib/ladspa");
- }
- else strcpy(ladspa_path, ladspa_path_ptr);
-
diff --git a/audio/terminatorx/files/patch-src_tX_mastergui.cc b/audio/terminatorx/files/patch-src_tX_mastergui.cc
deleted file mode 100644
index eb889529c199..000000000000
--- a/audio/terminatorx/files/patch-src_tX_mastergui.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/tX_mastergui.cc.orig 2011-01-31 06:01:32.000000000 +0900
-+++ src/tX_mastergui.cc 2011-03-24 11:38:00.000000000 +0900
-@@ -273,7 +273,7 @@
- GtkSignalFunc new_tables() {
- GtkWidget *dialog=gtk_message_dialog_new(GTK_WINDOW(main_window),
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
-- "Are you sure you want to loose all turntables and events?");
-+ "Are you sure you want to lose all turntables and events?");
-
- int res=gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
-@@ -894,7 +894,7 @@
- if (globals.quit_confirm) {
- GtkWidget *dialog=gtk_message_dialog_new(GTK_WINDOW(main_window),
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
-- "Exit terminatorX and loose all unsaved data?");
-+ "Exit terminatorX and lose all unsaved data?");
-
- int res=gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
diff --git a/audio/terminatorx/files/patch-src_tX_mouse.cc b/audio/terminatorx/files/patch-src_tX_mouse.cc
deleted file mode 100644
index a2fec9e93450..000000000000
--- a/audio/terminatorx/files/patch-src_tX_mouse.cc
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/tX_mouse.cc.orig 2011-01-31 06:01:32.000000000 +0900
-+++ src/tX_mouse.cc 2011-04-02 11:56:20.000000000 +0900
-@@ -47,7 +47,8 @@
- #include "tX_global.h"
- #include "tX_engine.h"
- #include "tX_vtt.h"
--#include <stdlib.h>
-+#include <cstdlib>
-+#include <cmath>
-
- #define TX_MOUSE_SPEED_NORMAL 0.05
- #define TX_MOUSE_SPEED_WARP 250000
diff --git a/audio/terminatorx/files/patch-src_tX_mouse.h b/audio/terminatorx/files/patch-src_tX_mouse.h
deleted file mode 100644
index d86d25ccd1cd..000000000000
--- a/audio/terminatorx/files/patch-src_tX_mouse.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/tX_mouse.h.orig 2011-01-31 06:01:32.000000000 +0900
-+++ src/tX_mouse.h 2011-03-18 02:55:38.000000000 +0900
-@@ -34,7 +34,7 @@
- #include <X11/extensions/XInput.h>
- #include <X11/keysym.h>
- #include <glib.h>
--#include <gdk/gdk.h>
-+#include <gtk/gtk.h>
- #include <gdk/gdkkeysyms.h>
-
- /* Use old gdk keys if the new ones are not yet defined */
diff --git a/audio/timidity++/files/patch-Makefile.in b/audio/timidity++/files/patch-Makefile.in
index 2c106efd2b58..2e7c72523847 100644
--- a/audio/timidity++/files/patch-Makefile.in
+++ b/audio/timidity++/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2012-06-28 23:14:25.000000000 +0900
-+++ Makefile.in 2012-10-01 02:41:14.000000000 +0900
-@@ -284,7 +284,6 @@
+--- Makefile.in.orig 2012-06-28 14:14:25 UTC
++++ Makefile.in
+@@ -284,7 +284,6 @@ M4DIR = autoconf
SUBDIRS = \
autoconf \
utils \
diff --git a/audio/timidity++/files/patch-configure b/audio/timidity++/files/patch-configure
index dabec2cd2637..44f61834b14c 100644
--- a/audio/timidity++/files/patch-configure
+++ b/audio/timidity++/files/patch-configure
@@ -1,4 +1,4 @@
---- configure.orig 2012-06-28 14:14:25.000000000 +0000
+--- configure.orig 2012-06-28 14:14:25 UTC
+++ configure
@@ -3930,6 +3930,10 @@ case "$target" in
test -n "$SHLD" || SHLD="ld -Bshareable"
diff --git a/audio/timidity++/files/patch-interface_Makefile.in b/audio/timidity++/files/patch-interface_Makefile.in
new file mode 100644
index 000000000000..85fa929efa4e
--- /dev/null
+++ b/audio/timidity++/files/patch-interface_Makefile.in
@@ -0,0 +1,10 @@
+--- interface/Makefile.in.orig 2012-06-28 14:14:25 UTC
++++ interface/Makefile.in
+@@ -340,7 +340,6 @@ SUBDIRS = motif_bitmaps bitmaps pixmaps
+
+ INCLUDES = \
+ -I$(top_srcdir)/timidity \
+- -I$(top_srcdir)/libarc \
+ -I$(top_srcdir)/utils
+
+
diff --git a/audio/timidity++/files/patch-interface__Makefile.in b/audio/timidity++/files/patch-interface__Makefile.in
deleted file mode 100644
index 4b914b6a79d4..000000000000
--- a/audio/timidity++/files/patch-interface__Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- interface/Makefile.in.orig 2012-06-28 23:14:25.000000000 +0900
-+++ interface/Makefile.in 2012-10-13 00:59:03.000000000 +0900
-@@ -340,7 +340,6 @@
-
- INCLUDES = \
- -I$(top_srcdir)/timidity \
-- -I$(top_srcdir)/libarc \
- -I$(top_srcdir)/utils
-
-
diff --git a/audio/timidity++/files/patch-interface__tk_c.c b/audio/timidity++/files/patch-interface__tk_c.c
deleted file mode 100644
index 19b88a914e9c..000000000000
--- a/audio/timidity++/files/patch-interface__tk_c.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- interface/tk_c.c.orig
-+++ interface/tk_c.c
-@@ -913,7 +913,7 @@
- vsnprintf(buf, sizeof(buf), fmt, ap);
- Tcl_Eval(my_interp, buf);
- va_end(ap);
-- return my_interp->result;
-+ return Tcl_GetStringResult(my_interp);
- }
-
- static const char *v_get2(const char *v1, const char *v2)
diff --git a/audio/timidity++/files/patch-interface_tk__c.c b/audio/timidity++/files/patch-interface_tk__c.c
new file mode 100644
index 000000000000..de0028f9f28d
--- /dev/null
+++ b/audio/timidity++/files/patch-interface_tk__c.c
@@ -0,0 +1,11 @@
+--- interface/tk_c.c.orig 2011-12-03 15:49:19 UTC
++++ interface/tk_c.c
+@@ -913,7 +913,7 @@ static char *v_eval(char *fmt, ...)
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ Tcl_Eval(my_interp, buf);
+ va_end(ap);
+- return my_interp->result;
++ return Tcl_GetStringResult(my_interp);
+ }
+
+ static const char *v_get2(const char *v1, const char *v2)
diff --git a/audio/timidity++/files/patch-timidity_Makefile.in b/audio/timidity++/files/patch-timidity_Makefile.in
new file mode 100644
index 000000000000..ea2b2bc0ca5e
--- /dev/null
+++ b/audio/timidity++/files/patch-timidity_Makefile.in
@@ -0,0 +1,88 @@
+--- timidity/Makefile.in.orig 2012-06-28 14:14:25 UTC
++++ timidity/Makefile.in
+@@ -336,7 +336,6 @@ BITMAP_DIR = $(TCL_DIR)/bitmaps
+
+ INCLUDES = \
+ -I$(top_srcdir) \
+- -I$(top_srcdir)/libarc \
+ -I$(top_srcdir)/libunimod \
+ -I$(top_srcdir)/interface \
+ -I$(top_srcdir)/utils \
+@@ -497,7 +496,7 @@ calcnewt_SOURCES = calcnewt.c
+ @VCPP_TRUE@timidity_LDADD = \
+ @VCPP_TRUE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @VCPP_TRUE@ $(top_builddir)/interface/interface.lib \
+-@VCPP_TRUE@ $(top_builddir)/libarc/arc.lib \
++@VCPP_TRUE@ -larc \
+ @VCPP_TRUE@ $(top_builddir)/libunimod/unimod.lib \
+ @VCPP_TRUE@ $(top_builddir)/utils/utils.lib \
+ @VCPP_TRUE@ $(W32GUI_RES)
+@@ -528,7 +527,7 @@ calcnewt_SOURCES = calcnewt.c
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_LDADD = \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
++@BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ -larc \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(W32GUI_RES)
+@@ -558,7 +557,6 @@ calcnewt_SOURCES = calcnewt.c
+
+ @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@timidity_dep = $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/interface/interface.lib \
+-@BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/libarc/arc.lib \
+ @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/libunimod/unimod.lib \
+ @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/utils/utils.lib \
+ @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(W32GUI_RES)
+@@ -573,7 +571,6 @@ calcnewt_SOURCES = calcnewt.c
+
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_dep = $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(W32GUI_RES)
+@@ -648,7 +645,6 @@ timidity_OBJECTS = $(am_timidity_OBJECTS
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_TRUE@@WATCOM_C_TRUE@timidity_DEPENDENCIES = \
+@@ -695,7 +691,6 @@ timidity_OBJECTS = $(am_timidity_OBJECTS
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/w32g_res.res
+@@ -749,7 +744,6 @@ timidity_OBJECTS = $(am_timidity_OBJECTS
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/w32g_res.res
+@@ -803,7 +797,6 @@ timidity_OBJECTS = $(am_timidity_OBJECTS
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
+ @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/w32g_res.res
+@@ -1538,9 +1531,8 @@ install-binPROGRAMS: $(bin_PROGRAMS)
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
++ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$p"; \
++ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$p || exit 1; \
+ else :; fi; \
+ done
+
diff --git a/audio/timidity++/files/patch-timidity__Makefile.in b/audio/timidity++/files/patch-timidity__Makefile.in
deleted file mode 100644
index 9375cd99432d..000000000000
--- a/audio/timidity++/files/patch-timidity__Makefile.in
+++ /dev/null
@@ -1,88 +0,0 @@
---- timidity/Makefile.in.orig 2012-06-28 23:14:25.000000000 +0900
-+++ timidity/Makefile.in 2012-10-01 03:09:08.000000000 +0900
-@@ -336,7 +336,6 @@
-
- INCLUDES = \
- -I$(top_srcdir) \
-- -I$(top_srcdir)/libarc \
- -I$(top_srcdir)/libunimod \
- -I$(top_srcdir)/interface \
- -I$(top_srcdir)/utils \
-@@ -497,7 +496,7 @@
- @VCPP_TRUE@timidity_LDADD = \
- @VCPP_TRUE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @VCPP_TRUE@ $(top_builddir)/interface/interface.lib \
--@VCPP_TRUE@ $(top_builddir)/libarc/arc.lib \
-+@VCPP_TRUE@ -larc \
- @VCPP_TRUE@ $(top_builddir)/libunimod/unimod.lib \
- @VCPP_TRUE@ $(top_builddir)/utils/utils.lib \
- @VCPP_TRUE@ $(W32GUI_RES)
-@@ -528,7 +527,7 @@
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_LDADD = \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
--@BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
-+@BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ -larc \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(W32GUI_RES)
-@@ -558,7 +557,6 @@
-
- @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@timidity_dep = $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/interface/interface.lib \
--@BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/libarc/arc.lib \
- @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/libunimod/unimod.lib \
- @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(top_builddir)/utils/utils.lib \
- @BORLANDC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_TRUE@ $(W32GUI_RES)
-@@ -573,7 +571,6 @@
-
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_dep = $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
--@BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
- @BORLANDC_FALSE@@DMC_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(W32GUI_RES)
-@@ -648,7 +645,6 @@
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
--@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_TRUE@@WATCOM_C_TRUE@timidity_DEPENDENCIES = \
-@@ -695,7 +691,6 @@
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
--@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/w32g_res.res
-@@ -749,7 +744,6 @@
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
--@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_FALSE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/w32g_res.res
-@@ -803,7 +797,6 @@
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_DEPENDENCIES = \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
--@BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
- @BORLANDC_FALSE@@DMC_FALSE@@ENABLE_W32GUI_TRUE@@ENABLE_W32G_SYN_TRUE@@POCC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/w32g_res.res
-@@ -1538,9 +1531,8 @@
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- ; then \
-- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
-+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$p"; \
-+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$p || exit 1; \
- else :; fi; \
- done
-
diff --git a/audio/timidity/files/patch-common.c b/audio/timidity/files/patch-common.c
index 62f92114a610..9e1653c316e6 100644
--- a/audio/timidity/files/patch-common.c
+++ b/audio/timidity/files/patch-common.c
@@ -1,5 +1,5 @@
---- ./common.c.orig 1996-06-01 07:20:19.000000000 -0500
-+++ ./common.c 2013-04-21 10:18:23.000000000 -0500
+--- common.c.orig 1996-06-01 12:20:19 UTC
++++ common.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/audio/timidity/files/patch-config.h b/audio/timidity/files/patch-config.h
index 9330b30fb8e4..c9345adaae8c 100644
--- a/audio/timidity/files/patch-config.h
+++ b/audio/timidity/files/patch-config.h
@@ -1,5 +1,5 @@
---- ./config.h.orig 1996-06-01 07:54:49.000000000 -0500
-+++ ./config.h 2013-04-21 10:18:23.000000000 -0500
+--- config.h.orig 1996-06-01 12:54:49 UTC
++++ config.h
@@ -217,6 +217,22 @@
# endif
#endif /* linux */
diff --git a/audio/timidity/files/patch-dumb__c.c b/audio/timidity/files/patch-dumb__c.c
new file mode 100644
index 000000000000..46a39316d53c
--- /dev/null
+++ b/audio/timidity/files/patch-dumb__c.c
@@ -0,0 +1,16 @@
+--- dumb_c.c.orig 1996-05-20 14:01:17 UTC
++++ dumb_c.c
+@@ -66,10 +66,12 @@ ControlMode ctl=
+ ctl_expression, ctl_panning, ctl_sustain, ctl_pitch_bend
+ };
+
+-static FILE *infp=stdin, *outfp=stdout; /* infp isn't actually used yet */
++static FILE *infp, *outfp; /* infp isn't actually used yet */
+
+ static int ctl_open(int using_stdin, int using_stdout)
+ {
++ infp = stdin;
++ outfp = stdout;
+ if (using_stdin && using_stdout)
+ infp=outfp=stderr;
+ else if (using_stdout)
diff --git a/audio/timidity/files/patch-dumb_c.c b/audio/timidity/files/patch-dumb_c.c
deleted file mode 100644
index 2b740bd6aa96..000000000000
--- a/audio/timidity/files/patch-dumb_c.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- ./dumb_c.c.orig 1996-05-20 09:01:17.000000000 -0500
-+++ ./dumb_c.c 2013-04-21 10:18:23.000000000 -0500
-@@ -66,10 +66,12 @@
- ctl_expression, ctl_panning, ctl_sustain, ctl_pitch_bend
- };
-
--static FILE *infp=stdin, *outfp=stdout; /* infp isn't actually used yet */
-+static FILE *infp, *outfp; /* infp isn't actually used yet */
-
- static int ctl_open(int using_stdin, int using_stdout)
- {
-+ infp = stdin;
-+ outfp = stdout;
- if (using_stdin && using_stdout)
- infp=outfp=stderr;
- else if (using_stdout)
diff --git a/audio/timidity/files/patch-instrum.c b/audio/timidity/files/patch-instrum.c
index 33d53c6241d5..895c5d2e0065 100644
--- a/audio/timidity/files/patch-instrum.c
+++ b/audio/timidity/files/patch-instrum.c
@@ -1,5 +1,5 @@
---- ./instrum.c.orig 1996-05-20 08:15:10.000000000 -0500
-+++ ./instrum.c 2013-04-21 10:18:23.000000000 -0500
+--- instrum.c.orig 1996-05-20 13:15:10 UTC
++++ instrum.c
@@ -25,7 +25,7 @@
#include <stdio.h>
diff --git a/audio/timidity/files/patch-linux__a.c b/audio/timidity/files/patch-linux__a.c
new file mode 100644
index 000000000000..f778eeca0356
--- /dev/null
+++ b/audio/timidity/files/patch-linux__a.c
@@ -0,0 +1,139 @@
+--- linux_a.c.orig 1996-05-20 13:09:46 UTC
++++ linux_a.c
+@@ -71,12 +71,15 @@ PlayMode dpm = {
+ then 8-bit unsigned if it fails. If you have a sound device that
+ can't handle either, let me know. */
+
++/* Flag for Luigi Rizzo new sound driver (as opposed to VoxWare) */
++static int luigi_driver = 0;
++
+ static int open_output(void)
+ {
+ int fd, tmp, i, warnings=0;
+
+ /* Open the audio device */
+- fd=open(dpm.name, O_RDWR | O_NDELAY);
++ fd=open(dpm.name, O_RDWR);
+ if (fd<0)
+ {
+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s",
+@@ -84,6 +87,23 @@ static int open_output(void)
+ return -1;
+ }
+
++ /* Figure out if we're running with the Luigi driver or
++ the original VoxWare driver, with code based on dburr/luigi
++ in ports/5607. It'd be great if we could do this before
++ opening the audio device, but oh well... */
++#if defined(AIOGFMT) /* only defined in Luigi driver */
++ {
++ snd_chan_param s;
++ int i;
++ i = ioctl(fd, AIOGFMT, &s);
++ if (i != -1)
++ luigi_driver = 1;
++ }
++#endif
++
++ ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Using %s sound driver",
++ luigi_driver ? "luigi" : "VoxWare");
++
+ /* They can't mean these */
+ dpm.encoding &= ~(PE_ULAW|PE_BYTESWAP);
+
+@@ -92,6 +112,29 @@ static int open_output(void)
+ the other one. */
+
+ i=tmp=(dpm.encoding & PE_16BIT) ? 16 : 8;
++ if (luigi_driver)
++ {
++ if (dpm.encoding & PE_16BIT) {
++ int fmt = AFMT_S16_LE ;
++
++ if (ioctl(fd, SNDCTL_DSP_SETFMT, &fmt) < 0 || fmt != AFMT_S16_LE) {
++ fmt = AFMT_U8 ;
++ if (ioctl(fd, SNDCTL_DSP_SETFMT, &fmt) < 0 || fmt != AFMT_U8) {
++ ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
++ "%s doesn't support 16- or 8-bit sample width",
++ dpm.name);
++ close(fd);
++ return -1;
++ }
++ ctl->cmsg(CMSG_WARNING, VERB_VERBOSE,
++ "Sample width adjusted to %d bits", tmp);
++ dpm.encoding ^= PE_16BIT;
++ warnings = 1;
++ }
++ }
++ }
++ else
++ {
+ if (ioctl(fd, SNDCTL_DSP_SAMPLESIZE, &tmp)<0 || tmp!=i)
+ {
+ /* Try the other one */
+@@ -109,6 +152,7 @@ static int open_output(void)
+ dpm.encoding ^= PE_16BIT;
+ warnings=1;
+ }
++ }
+ if (dpm.encoding & PE_16BIT)
+ dpm.encoding |= PE_SIGNED;
+ else
+@@ -163,6 +207,8 @@ static int open_output(void)
+ /* Set buffer fragments (in extra_param[0]) */
+
+ tmp=AUDIO_BUFFER_BITS;
++ if (luigi_driver)
++ tmp += 2;
+ if (!(dpm.encoding & PE_MONO)) tmp++;
+ if (dpm.encoding & PE_16BIT) tmp++;
+ tmp |= (dpm.extra_param[0]<<16);
+@@ -189,28 +235,35 @@ static int open_output(void)
+ return warnings;
+ }
+
++/* output_data comes from Luigi's linux_a.c. This version seems to allow
++ for partial writes to the sound device, where as the original version
++ doesn't. */
+ static void output_data(int32 *buf, int32 count)
+ {
++ char *p;
++ int res, l;
++
+ if (!(dpm.encoding & PE_MONO)) count*=2; /* Stereo samples */
+
+- if (dpm.encoding & PE_16BIT)
+- {
++ if (dpm.encoding & PE_16BIT) {
+ /* Convert data to signed 16-bit PCM */
+ s32tos16(buf, count);
+-
+- /* Write the data out. Linux likes to give an EINTR if you suspend
+- a program while waiting on a write, so we may need to retry. */
+- while ((-1==write(dpm.fd, buf, count * 2)) && errno==EINTR)
+- ;
+- }
+- else
+- {
++ res = count*2;
++ } else {
+ /* Convert to 8-bit unsigned and write out. */
+ s32tou8(buf, count);
+-
+- while ((-1==write(dpm.fd, buf, count)) && errno==EINTR)
+- ;
++ res = count;
++ }
++ for (p = (char *) buf; res > 0; res -= l) {
++again:
++ l = write(dpm.fd, p, res);
++ if (l < 0) {
++ if (errno == EINTR)
++ goto again;
++ return;
+ }
++ p += l;
++ }
+ }
+
+ static void close_output(void)
diff --git a/audio/timidity/files/patch-linux_a.c b/audio/timidity/files/patch-linux_a.c
deleted file mode 100644
index 0d383938cdc0..000000000000
--- a/audio/timidity/files/patch-linux_a.c
+++ /dev/null
@@ -1,139 +0,0 @@
---- ./linux_a.c.orig 1996-05-20 08:09:46.000000000 -0500
-+++ ./linux_a.c 2013-04-21 10:18:23.000000000 -0500
-@@ -71,12 +71,15 @@
- then 8-bit unsigned if it fails. If you have a sound device that
- can't handle either, let me know. */
-
-+/* Flag for Luigi Rizzo new sound driver (as opposed to VoxWare) */
-+static int luigi_driver = 0;
-+
- static int open_output(void)
- {
- int fd, tmp, i, warnings=0;
-
- /* Open the audio device */
-- fd=open(dpm.name, O_RDWR | O_NDELAY);
-+ fd=open(dpm.name, O_RDWR);
- if (fd<0)
- {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s",
-@@ -84,6 +87,23 @@
- return -1;
- }
-
-+ /* Figure out if we're running with the Luigi driver or
-+ the original VoxWare driver, with code based on dburr/luigi
-+ in ports/5607. It'd be great if we could do this before
-+ opening the audio device, but oh well... */
-+#if defined(AIOGFMT) /* only defined in Luigi driver */
-+ {
-+ snd_chan_param s;
-+ int i;
-+ i = ioctl(fd, AIOGFMT, &s);
-+ if (i != -1)
-+ luigi_driver = 1;
-+ }
-+#endif
-+
-+ ctl->cmsg(CMSG_INFO, VERB_VERBOSE, "Using %s sound driver",
-+ luigi_driver ? "luigi" : "VoxWare");
-+
- /* They can't mean these */
- dpm.encoding &= ~(PE_ULAW|PE_BYTESWAP);
-
-@@ -92,6 +112,29 @@
- the other one. */
-
- i=tmp=(dpm.encoding & PE_16BIT) ? 16 : 8;
-+ if (luigi_driver)
-+ {
-+ if (dpm.encoding & PE_16BIT) {
-+ int fmt = AFMT_S16_LE ;
-+
-+ if (ioctl(fd, SNDCTL_DSP_SETFMT, &fmt) < 0 || fmt != AFMT_S16_LE) {
-+ fmt = AFMT_U8 ;
-+ if (ioctl(fd, SNDCTL_DSP_SETFMT, &fmt) < 0 || fmt != AFMT_U8) {
-+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
-+ "%s doesn't support 16- or 8-bit sample width",
-+ dpm.name);
-+ close(fd);
-+ return -1;
-+ }
-+ ctl->cmsg(CMSG_WARNING, VERB_VERBOSE,
-+ "Sample width adjusted to %d bits", tmp);
-+ dpm.encoding ^= PE_16BIT;
-+ warnings = 1;
-+ }
-+ }
-+ }
-+ else
-+ {
- if (ioctl(fd, SNDCTL_DSP_SAMPLESIZE, &tmp)<0 || tmp!=i)
- {
- /* Try the other one */
-@@ -109,6 +152,7 @@
- dpm.encoding ^= PE_16BIT;
- warnings=1;
- }
-+ }
- if (dpm.encoding & PE_16BIT)
- dpm.encoding |= PE_SIGNED;
- else
-@@ -163,6 +207,8 @@
- /* Set buffer fragments (in extra_param[0]) */
-
- tmp=AUDIO_BUFFER_BITS;
-+ if (luigi_driver)
-+ tmp += 2;
- if (!(dpm.encoding & PE_MONO)) tmp++;
- if (dpm.encoding & PE_16BIT) tmp++;
- tmp |= (dpm.extra_param[0]<<16);
-@@ -189,28 +235,35 @@
- return warnings;
- }
-
-+/* output_data comes from Luigi's linux_a.c. This version seems to allow
-+ for partial writes to the sound device, where as the original version
-+ doesn't. */
- static void output_data(int32 *buf, int32 count)
- {
-+ char *p;
-+ int res, l;
-+
- if (!(dpm.encoding & PE_MONO)) count*=2; /* Stereo samples */
-
-- if (dpm.encoding & PE_16BIT)
-- {
-+ if (dpm.encoding & PE_16BIT) {
- /* Convert data to signed 16-bit PCM */
- s32tos16(buf, count);
--
-- /* Write the data out. Linux likes to give an EINTR if you suspend
-- a program while waiting on a write, so we may need to retry. */
-- while ((-1==write(dpm.fd, buf, count * 2)) && errno==EINTR)
-- ;
-- }
-- else
-- {
-+ res = count*2;
-+ } else {
- /* Convert to 8-bit unsigned and write out. */
- s32tou8(buf, count);
--
-- while ((-1==write(dpm.fd, buf, count)) && errno==EINTR)
-- ;
-+ res = count;
-+ }
-+ for (p = (char *) buf; res > 0; res -= l) {
-+again:
-+ l = write(dpm.fd, p, res);
-+ if (l < 0) {
-+ if (errno == EINTR)
-+ goto again;
-+ return;
- }
-+ p += l;
-+ }
- }
-
- static void close_output(void)
diff --git a/audio/timidity/files/patch-mix.c b/audio/timidity/files/patch-mix.c
index 44b50f10c021..fb9e8fd3d7a2 100644
--- a/audio/timidity/files/patch-mix.c
+++ b/audio/timidity/files/patch-mix.c
@@ -1,5 +1,5 @@
---- ./mix.c.orig 1996-05-20 08:09:46.000000000 -0500
-+++ ./mix.c 2013-04-21 10:18:23.000000000 -0500
+--- mix.c.orig 1996-05-20 13:09:46 UTC
++++ mix.c
@@ -23,7 +23,11 @@
#include <math.h>
diff --git a/audio/timidity/files/patch-playmidi.c b/audio/timidity/files/patch-playmidi.c
index 4d313ea223e5..5e2f993dd143 100644
--- a/audio/timidity/files/patch-playmidi.c
+++ b/audio/timidity/files/patch-playmidi.c
@@ -1,5 +1,5 @@
---- ./playmidi.c.orig 1996-05-20 08:09:46.000000000 -0500
-+++ ./playmidi.c 2013-04-21 10:18:23.000000000 -0500
+--- playmidi.c.orig 1996-05-20 13:09:46 UTC
++++ playmidi.c
@@ -27,7 +27,7 @@
#endif
#include <stdlib.h>
diff --git a/audio/timidity/files/patch-raw__a.c b/audio/timidity/files/patch-raw__a.c
new file mode 100644
index 000000000000..4f0190dbb1a9
--- /dev/null
+++ b/audio/timidity/files/patch-raw__a.c
@@ -0,0 +1,10 @@
+--- raw_a.c.orig 1996-05-20 13:09:47 UTC
++++ raw_a.c
+@@ -35,6 +35,7 @@
+
+ #ifdef __FreeBSD__
+ #include <stdio.h>
++#include <string.h>
+ #endif
+
+ #include "config.h"
diff --git a/audio/timidity/files/patch-raw_a.c b/audio/timidity/files/patch-raw_a.c
deleted file mode 100644
index 35dc2e936265..000000000000
--- a/audio/timidity/files/patch-raw_a.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./raw_a.c.orig 1996-05-20 08:09:47.000000000 -0500
-+++ ./raw_a.c 2013-04-21 10:18:23.000000000 -0500
-@@ -35,6 +35,7 @@
-
- #ifdef __FreeBSD__
- #include <stdio.h>
-+#include <string.h>
- #endif
-
- #include "config.h"
diff --git a/audio/timidity/files/patch-readmidi.c b/audio/timidity/files/patch-readmidi.c
index 3282b42d223a..cf39fa248c73 100644
--- a/audio/timidity/files/patch-readmidi.c
+++ b/audio/timidity/files/patch-readmidi.c
@@ -1,5 +1,5 @@
---- ./readmidi.c.orig 1996-05-20 08:09:47.000000000 -0500
-+++ ./readmidi.c 2013-04-21 10:18:23.000000000 -0500
+--- readmidi.c.orig 1996-05-20 13:09:47 UTC
++++ readmidi.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <errno.h>
diff --git a/audio/timidity/files/patch-resample.c b/audio/timidity/files/patch-resample.c
index 254f5bbd294f..42c564222384 100644
--- a/audio/timidity/files/patch-resample.c
+++ b/audio/timidity/files/patch-resample.c
@@ -1,5 +1,5 @@
---- ./resample.c.orig 1996-05-20 08:09:47.000000000 -0500
-+++ ./resample.c 2013-04-21 10:18:23.000000000 -0500
+--- resample.c.orig 1996-05-20 13:09:47 UTC
++++ resample.c
@@ -22,7 +22,11 @@
#include <math.h>
diff --git a/audio/timidity/files/patch-timidity.c b/audio/timidity/files/patch-timidity.c
index db44a7a11ea7..cc06c9dd440a 100644
--- a/audio/timidity/files/patch-timidity.c
+++ b/audio/timidity/files/patch-timidity.c
@@ -1,5 +1,5 @@
---- ./timidity.c.orig 1996-05-21 14:16:20.000000000 -0500
-+++ ./timidity.c 2013-04-21 10:18:23.000000000 -0500
+--- timidity.c.orig 1996-05-21 19:16:20 UTC
++++ timidity.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/audio/timidity/files/patch-timidity.cfg b/audio/timidity/files/patch-timidity.cfg
index 7d6b7fe47fe1..702bb0c0ba3c 100644
--- a/audio/timidity/files/patch-timidity.cfg
+++ b/audio/timidity/files/patch-timidity.cfg
@@ -1,5 +1,5 @@
---- ./timidity.cfg.orig 1995-05-21 17:40:27.000000000 -0500
-+++ ./timidity.cfg 2013-04-21 10:18:23.000000000 -0500
+--- timidity.cfg.orig 1995-05-21 22:40:27 UTC
++++ timidity.cfg
@@ -27,16 +27,16 @@
# If you've moved things around since compiling, uncomment and edit this to
# point to the library directory:
@@ -21,7 +21,7 @@
##############################################################################
# If you have Dustin McCartney's "wowpats" patches, you can source the
-@@ -70,6 +70,7 @@
+@@ -70,6 +70,7 @@ bank 0
#source midia.cfg
#
diff --git a/audio/timidity/files/patch-wav2pat.c b/audio/timidity/files/patch-wav2pat.c
index ccecf7f127d4..85c78f6a9656 100644
--- a/audio/timidity/files/patch-wav2pat.c
+++ b/audio/timidity/files/patch-wav2pat.c
@@ -1,5 +1,5 @@
---- ./wav2pat.c.orig 1996-05-20 08:09:47.000000000 -0500
-+++ ./wav2pat.c 2013-04-21 10:18:23.000000000 -0500
+--- wav2pat.c.orig 1996-05-20 13:09:47 UTC
++++ wav2pat.c
@@ -28,7 +28,7 @@
#include <unistd.h>
#include <fcntl.h>
diff --git a/audio/timidity/files/patch-wave__a.c b/audio/timidity/files/patch-wave__a.c
new file mode 100644
index 000000000000..488a41f48f2e
--- /dev/null
+++ b/audio/timidity/files/patch-wave__a.c
@@ -0,0 +1,10 @@
+--- wave_a.c.orig 1996-05-20 13:10:15 UTC
++++ wave_a.c
+@@ -35,6 +35,7 @@
+
+ #ifdef __FreeBSD__
+ #include <stdio.h>
++#include <string.h>
+ #endif
+
+ #include "config.h"
diff --git a/audio/timidity/files/patch-wave_a.c b/audio/timidity/files/patch-wave_a.c
deleted file mode 100644
index 89b6121d813f..000000000000
--- a/audio/timidity/files/patch-wave_a.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./wave_a.c.orig 1996-05-20 08:10:15.000000000 -0500
-+++ ./wave_a.c 2013-04-21 10:18:23.000000000 -0500
-@@ -35,6 +35,7 @@
-
- #ifdef __FreeBSD__
- #include <stdio.h>
-+#include <string.h>
- #endif
-
- #include "config.h"
diff --git a/audio/tomahawk/files/patch-src__libtomahawk__sip__PeerInfo.cpp b/audio/tomahawk/files/patch-src__libtomahawk__sip__PeerInfo.cpp
deleted file mode 100644
index 0549df927931..000000000000
--- a/audio/tomahawk/files/patch-src__libtomahawk__sip__PeerInfo.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/libtomahawk/sip/PeerInfo.cpp.orig 2014-11-20 00:17:56 UTC
-+++ src/libtomahawk/sip/PeerInfo.cpp
-@@ -333,7 +333,7 @@ PeerInfo::setAvatar( const QPixmap& avat
- d->fancyAvatar.reset();
-
- Q_ASSERT( !contactId().isEmpty() );
-- TomahawkUtils::Cache::instance()->putData( "Sources", 7776000000 /* 90 days */, contactId(), ba );
-+ TomahawkUtils::Cache::instance()->putData( "Sources", Q_INT64_C(7776000000) /* 90 days */, contactId(), ba );
- }
-
-
diff --git a/audio/tomahawk/files/patch-src__libtomahawk__utils__Closure.h b/audio/tomahawk/files/patch-src__libtomahawk__utils__Closure.h
deleted file mode 100644
index 8583ee5f478a..000000000000
--- a/audio/tomahawk/files/patch-src__libtomahawk__utils__Closure.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/libtomahawk/utils/Closure.h.orig 2014-11-20 00:17:56 UTC
-+++ src/libtomahawk/utils/Closure.h
-@@ -40,6 +40,10 @@ using std::tr1::function;
- #include <boost/noncopyable.hpp>
- #include <boost/scoped_ptr.hpp>
-
-+#ifdef _LIBCPP_VERSION
-+namespace std { namespace tr1 = std; }
-+#endif
-+
- namespace _detail {
-
- class DLLEXPORT ClosureArgumentWrapper {
diff --git a/audio/tomahawk/files/patch-src_libtomahawk_sip_PeerInfo.cpp b/audio/tomahawk/files/patch-src_libtomahawk_sip_PeerInfo.cpp
new file mode 100644
index 000000000000..4a9dd1de3c74
--- /dev/null
+++ b/audio/tomahawk/files/patch-src_libtomahawk_sip_PeerInfo.cpp
@@ -0,0 +1,11 @@
+--- src/libtomahawk/sip/PeerInfo.cpp.orig 2015-04-15 04:41:40 UTC
++++ src/libtomahawk/sip/PeerInfo.cpp
+@@ -333,7 +333,7 @@ PeerInfo::setAvatar( const QPixmap& avat
+ d->fancyAvatar.reset();
+
+ Q_ASSERT( !contactId().isEmpty() );
+- TomahawkUtils::Cache::instance()->putData( "Sources", 7776000000 /* 90 days */, contactId(), ba );
++ TomahawkUtils::Cache::instance()->putData( "Sources", Q_INT64_C(7776000000) /* 90 days */, contactId(), ba );
+ }
+
+
diff --git a/audio/tomahawk/files/patch-src_libtomahawk_utils_Closure.h b/audio/tomahawk/files/patch-src_libtomahawk_utils_Closure.h
new file mode 100644
index 000000000000..e805f28c5ec9
--- /dev/null
+++ b/audio/tomahawk/files/patch-src_libtomahawk_utils_Closure.h
@@ -0,0 +1,13 @@
+--- src/libtomahawk/utils/Closure.h.orig 2015-04-15 04:41:40 UTC
++++ src/libtomahawk/utils/Closure.h
+@@ -40,6 +40,10 @@ using std::tr1::function;
+ #include <boost/noncopyable.hpp>
+ #include <boost/scoped_ptr.hpp>
+
++#ifdef _LIBCPP_VERSION
++namespace std { namespace tr1 = std; }
++#endif
++
+ namespace _detail {
+
+ class DLLEXPORT ClosureArgumentWrapper {
diff --git a/audio/tomahawk/files/patch-src_libtomahawk_utils_TomahawkUtils.cpp b/audio/tomahawk/files/patch-src_libtomahawk_utils_TomahawkUtils.cpp
index deb74d8349da..c4d7209f8652 100644
--- a/audio/tomahawk/files/patch-src_libtomahawk_utils_TomahawkUtils.cpp
+++ b/audio/tomahawk/files/patch-src_libtomahawk_utils_TomahawkUtils.cpp
@@ -1,4 +1,4 @@
---- src/libtomahawk/utils/TomahawkUtils.cpp.orig 2014-11-20 00:17:56 UTC
+--- src/libtomahawk/utils/TomahawkUtils.cpp.orig 2015-04-15 04:41:40 UTC
+++ src/libtomahawk/utils/TomahawkUtils.cpp
@@ -19,6 +19,8 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
diff --git a/audio/toolame/files/patch-psycho_3.c b/audio/toolame/files/patch-psycho_3.c
deleted file mode 100644
index e602e68edfe0..000000000000
--- a/audio/toolame/files/patch-psycho_3.c
+++ /dev/null
@@ -1,51 +0,0 @@
---- psycho_3.c.orig Thu Mar 27 16:46:02 2003
-+++ psycho_3.c Thu Mar 27 16:51:53 2003
-@@ -131,10 +131,10 @@
- int i;
- static int init = 0;
- static FLOAT *window;
-+ register const FLOAT sqrt_8_over_3 = pow (8.0 / 3.0, 0.5);
-
- if (!init) { /* calculate window function for the Fourier transform */
- window = (FLOAT *) mem_alloc (sizeof (DFFT), "window");
-- register FLOAT sqrt_8_over_3 = pow (8.0 / 3.0, 0.5);
- for (i = 0; i < BLKSIZE; i++) {
- window[i] = sqrt_8_over_3 * 0.5 * (1 - cos (2.0 * PI * i / (BLKSIZE))) / BLKSIZE;
- }
-@@ -340,6 +340,7 @@
- int i,j,k;
- FLOAT LTtm[SUBSIZE];
- FLOAT LTnm[SUBSIZE];
-+ FLOAT av,dz,vf;
-
- for (i=0;i<SUBSIZE;i++) {
- LTtm[i] = DBMIN;
-@@ -353,10 +354,9 @@
- if (tonelabel[k]==TONE) {
- for (j=0;j<SUBSIZE;j++) {
- /* figure out how it masks the levels around it */
-- FLOAT dz = bark[freq_subset[j]] - bark[k];
-+ dz = bark[freq_subset[j]] - bark[k];
- if (dz >= -3.0 && dz < 8.0) {
-- FLOAT vf;
-- FLOAT av = -1.525 - 0.275 * bark[k] - 4.5 + Xtm[k];
-+ av = -1.525 - 0.275 * bark[k] - 4.5 + Xtm[k];
- /* masking function for lower & upper slopes */
- if (dz < -1)
- vf = 17 * (dz + 1) - (0.4 * Xtm[k] + 6);
-@@ -434,6 +434,7 @@
- void psycho_3_init(options *glopts) {
- int i;
- int cbase = 0; /* current base index for the bark range calculation */
-+ register const FLOAT sfreq = (FLOAT) s_freq[header->version][header->sampling_frequency] * 1000;
-
- fft_buf = (D1408 *) mem_alloc ((long) sizeof (D1408) * 2, "fft_buf");
-
-@@ -441,7 +442,6 @@
- psycho_3_init_add_db();
-
- /* For each spectral line calculate the bark and the ATH (in dB) */
-- FLOAT sfreq = (FLOAT) s_freq[header->version][header->sampling_frequency] * 1000;
- for (i=1;i<HBLKSIZE; i++) {
- FLOAT freq = i * sfreq/BLKSIZE;
- bark[i] = freq2bark(freq);
diff --git a/audio/toolame/files/patch-psycho_4.c b/audio/toolame/files/patch-psycho_4.c
deleted file mode 100644
index df557a4cdf30..000000000000
--- a/audio/toolame/files/patch-psycho_4.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- psycho_4.c.orig Thu Mar 27 16:58:41 2003
-+++ psycho_4.c Thu Mar 27 16:59:20 2003
-@@ -330,6 +330,8 @@
- void psycho_4_init (double sfreq, options *glopts)
- {
- int i, j;
-+ int partition_count; /* keep a count of the partitions */
-+ int cbase; /* current base index for the bark range calculation */
-
- /* Allocate memory for all the static variables */
- psycho_4_allocmem();
-@@ -365,8 +367,8 @@
- Starting from line 0, all lines within 0.33 of the starting
- bark are added to the same partition. When a line is greater
- by 0.33 of a bark, start a new partition. */
-- int partition_count = 0; /* keep a count of the partitions */
-- int cbase = 0; /* current base index for the bark range calculation */
-+ partition_count = 0;
-+ cbase = 0;
- for (i=0;i<HBLKSIZE;i++) {
- if ((bark[i] - bark[cbase]) > 0.33) { /* 1/3 critical band? */
- /* this frequency line is too different from the starting line,
diff --git a/audio/toolame/files/patch-psycho__3.c b/audio/toolame/files/patch-psycho__3.c
new file mode 100644
index 000000000000..61dc7b359405
--- /dev/null
+++ b/audio/toolame/files/patch-psycho__3.c
@@ -0,0 +1,51 @@
+--- psycho_3.c.orig 2003-03-01 09:35:14 UTC
++++ psycho_3.c
+@@ -131,10 +131,10 @@ void psycho_3_fft(FLOAT sample[BLKSIZE],
+ int i;
+ static int init = 0;
+ static FLOAT *window;
++ register const FLOAT sqrt_8_over_3 = pow (8.0 / 3.0, 0.5);
+
+ if (!init) { /* calculate window function for the Fourier transform */
+ window = (FLOAT *) mem_alloc (sizeof (DFFT), "window");
+- register FLOAT sqrt_8_over_3 = pow (8.0 / 3.0, 0.5);
+ for (i = 0; i < BLKSIZE; i++) {
+ window[i] = sqrt_8_over_3 * 0.5 * (1 - cos (2.0 * PI * i / (BLKSIZE))) / BLKSIZE;
+ }
+@@ -340,6 +340,7 @@ void psycho_3_threshold(FLOAT *LTg, int
+ int i,j,k;
+ FLOAT LTtm[SUBSIZE];
+ FLOAT LTnm[SUBSIZE];
++ FLOAT av,dz,vf;
+
+ for (i=0;i<SUBSIZE;i++) {
+ LTtm[i] = DBMIN;
+@@ -353,10 +354,9 @@ void psycho_3_threshold(FLOAT *LTg, int
+ if (tonelabel[k]==TONE) {
+ for (j=0;j<SUBSIZE;j++) {
+ /* figure out how it masks the levels around it */
+- FLOAT dz = bark[freq_subset[j]] - bark[k];
++ dz = bark[freq_subset[j]] - bark[k];
+ if (dz >= -3.0 && dz < 8.0) {
+- FLOAT vf;
+- FLOAT av = -1.525 - 0.275 * bark[k] - 4.5 + Xtm[k];
++ av = -1.525 - 0.275 * bark[k] - 4.5 + Xtm[k];
+ /* masking function for lower & upper slopes */
+ if (dz < -1)
+ vf = 17 * (dz + 1) - (0.4 * Xtm[k] + 6);
+@@ -434,6 +434,7 @@ void psycho_3_smr(double *LTmin, double
+ void psycho_3_init(options *glopts) {
+ int i;
+ int cbase = 0; /* current base index for the bark range calculation */
++ register const FLOAT sfreq = (FLOAT) s_freq[header->version][header->sampling_frequency] * 1000;
+
+ fft_buf = (D1408 *) mem_alloc ((long) sizeof (D1408) * 2, "fft_buf");
+
+@@ -441,7 +442,6 @@ void psycho_3_init(options *glopts) {
+ psycho_3_init_add_db();
+
+ /* For each spectral line calculate the bark and the ATH (in dB) */
+- FLOAT sfreq = (FLOAT) s_freq[header->version][header->sampling_frequency] * 1000;
+ for (i=1;i<HBLKSIZE; i++) {
+ FLOAT freq = i * sfreq/BLKSIZE;
+ bark[i] = freq2bark(freq);
diff --git a/audio/toolame/files/patch-psycho__4.c b/audio/toolame/files/patch-psycho__4.c
new file mode 100644
index 000000000000..1facd4e25e51
--- /dev/null
+++ b/audio/toolame/files/patch-psycho__4.c
@@ -0,0 +1,22 @@
+--- psycho_4.c.orig 2003-03-02 00:50:48 UTC
++++ psycho_4.c
+@@ -330,6 +330,8 @@ void psycho_4 (short int *buffer, short
+ void psycho_4_init (double sfreq, options *glopts)
+ {
+ int i, j;
++ int partition_count; /* keep a count of the partitions */
++ int cbase; /* current base index for the bark range calculation */
+
+ /* Allocate memory for all the static variables */
+ psycho_4_allocmem();
+@@ -365,8 +367,8 @@ void psycho_4_init (double sfreq, option
+ Starting from line 0, all lines within 0.33 of the starting
+ bark are added to the same partition. When a line is greater
+ by 0.33 of a bark, start a new partition. */
+- int partition_count = 0; /* keep a count of the partitions */
+- int cbase = 0; /* current base index for the bark range calculation */
++ partition_count = 0;
++ cbase = 0;
+ for (i=0;i<HBLKSIZE;i++) {
+ if ((bark[i] - bark[cbase]) > 0.33) { /* 1/3 critical band? */
+ /* this frequency line is too different from the starting line,
diff --git a/audio/tosha/files/patch-Makefile b/audio/tosha/files/patch-Makefile
index a2dae8165ea7..320b9ddbc14e 100644
--- a/audio/tosha/files/patch-Makefile
+++ b/audio/tosha/files/patch-Makefile
@@ -1,6 +1,6 @@
--- Makefile.orig 1998-12-16 12:34:09 UTC
+++ Makefile
-@@ -53,15 +53,10 @@
+@@ -53,15 +53,10 @@ pcmfade: pcmfade.o utils.o
$(CC) $(CFLAGS) -o pcmfade pcmfade.o utils.o
install: $(BINS)
diff --git a/audio/tosha/files/patch-pcmplay.c b/audio/tosha/files/patch-pcmplay.c
index 5e46e05837e0..d2e904255f35 100644
--- a/audio/tosha/files/patch-pcmplay.c
+++ b/audio/tosha/files/patch-pcmplay.c
@@ -1,6 +1,6 @@
---- pcmplay.c.old Sat Jan 2 08:57:41 1999
-+++ pcmplay.c Thu Apr 11 08:00:07 2002
-@@ -44,7 +44,7 @@
+--- pcmplay.c.orig 1999-01-01 23:57:41 UTC
++++ pcmplay.c
+@@ -44,7 +44,7 @@ static const char cvsid[]
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
diff --git a/audio/tosha/files/patch-tosha.c b/audio/tosha/files/patch-tosha.c
index d8a03754384f..dae5a18859b0 100644
--- a/audio/tosha/files/patch-tosha.c
+++ b/audio/tosha/files/patch-tosha.c
@@ -1,76 +1,45 @@
-*** tosha.c.orig Fri Jan 1 16:57:49 1999
---- tosha.c Wed Feb 7 13:29:21 2001
-***************
-*** 240,247 ****
- return template;
- if (!(tmpstr = malloc(strlen(template) + strlen(formatspec->ext) - 1)))
- out_of_memory();
-! if ((prefix = cptr - template))
- strncpy (tmpstr, template, prefix);
- strcat (tmpstr + prefix, formatspec->ext);
- prefix += strlen(formatspec->ext);
- strcat (tmpstr + prefix, cptr + 2);
---- 240,249 ----
- return template;
- if (!(tmpstr = malloc(strlen(template) + strlen(formatspec->ext) - 1)))
- out_of_memory();
-! if ((prefix = cptr - template)) {
- strncpy (tmpstr, template, prefix);
-+ tmpstr[prefix] = '\0';
-+ }
- strcat (tmpstr + prefix, formatspec->ext);
- prefix += strlen(formatspec->ext);
- strcat (tmpstr + prefix, cptr + 2);
-***************
-*** 369,379 ****
- frmctl = trackctl[i];
- break;
- }
-! if (frmctl < 0) /* Ugh! */
- if (numtracks >= 1 && start >= trackstart[1])
- frmctl = trackctl[numtracks - 1];
- else
- frmctl = trackctl[0];
- }
- if ((frmctl & 4) == 0)
- return 1;
---- 371,382 ----
- frmctl = trackctl[i];
- break;
- }
-! if (frmctl < 0) { /* Ugh! */
- if (numtracks >= 1 && start >= trackstart[1])
- frmctl = trackctl[numtracks - 1];
- else
- frmctl = trackctl[0];
-+ }
- }
- if ((frmctl & 4) == 0)
- return 1;
-***************
-*** 698,704 ****
- * Now get us the stuff!
- */
-
-! if (!indexonly && (singlefile = startsec >= 0 || !strchr(outname, '%')))
- if (!strcmp(outname, "-"))
- pcmfd = 1;
- else {
---- 701,707 ----
- * Now get us the stuff!
- */
-
-! if (!indexonly && (singlefile = startsec >= 0 || !strchr(outname, '%'))){
- if (!strcmp(outname, "-"))
- pcmfd = 1;
- else {
-***************
-*** 710,715 ****
---- 713,719 ----
- O_TRUNC, 0644)) < 0)
- die ("open(output file)");
- }
-+ }
- if (!quiet)
- print_head();
- get_time (&starttime);
+--- tosha.c.orig 1999-01-01 23:57:49 UTC
++++ tosha.c
+@@ -240,8 +240,10 @@ resolve_extension (char *template)
+ return template;
+ if (!(tmpstr = malloc(strlen(template) + strlen(formatspec->ext) - 1)))
+ out_of_memory();
+- if ((prefix = cptr - template))
++ if ((prefix = cptr - template)) {
+ strncpy (tmpstr, template, prefix);
++ tmpstr[prefix] = '\0';
++ }
+ strcat (tmpstr + prefix, formatspec->ext);
+ prefix += strlen(formatspec->ext);
+ strcat (tmpstr + prefix, cptr + 2);
+@@ -369,11 +371,12 @@ is_audio (int track, ulong start)
+ frmctl = trackctl[i];
+ break;
+ }
+- if (frmctl < 0) /* Ugh! */
++ if (frmctl < 0) { /* Ugh! */
+ if (numtracks >= 1 && start >= trackstart[1])
+ frmctl = trackctl[numtracks - 1];
+ else
+ frmctl = trackctl[0];
++ }
+ }
+ if ((frmctl & 4) == 0)
+ return 1;
+@@ -698,7 +701,7 @@ main (int argc, char *argv[])
+ * Now get us the stuff!
+ */
+
+- if (!indexonly && (singlefile = startsec >= 0 || !strchr(outname, '%')))
++ if (!indexonly && (singlefile = startsec >= 0 || !strchr(outname, '%'))){
+ if (!strcmp(outname, "-"))
+ pcmfd = 1;
+ else {
+@@ -710,6 +713,7 @@ main (int argc, char *argv[])
+ O_TRUNC, 0644)) < 0)
+ die ("open(output file)");
+ }
++ }
+ if (!quiet)
+ print_head();
+ get_time (&starttime);
diff --git a/audio/tosha/files/patch-utils.c b/audio/tosha/files/patch-utils.c
index 4b34b37e9d3e..f93d6c651dad 100644
--- a/audio/tosha/files/patch-utils.c
+++ b/audio/tosha/files/patch-utils.c
@@ -1,6 +1,6 @@
---- utils.c.orig 2009-02-24 14:41:16.000000000 +0100
-+++ utils.c 2009-02-24 14:41:55.000000000 +0100
-@@ -59,6 +59,9 @@
+--- utils.c.orig 1999-01-01 23:57:50 UTC
++++ utils.c
+@@ -59,6 +59,9 @@ void *tmalloc (size_t size)
return (mem);
}
@@ -10,7 +10,7 @@
char *strndup (char *src, int num)
{
char *dst;
-@@ -68,6 +71,8 @@
+@@ -68,6 +71,8 @@ char *strndup (char *src, int num)
dst[num] = '\0';
return (strncpy(dst, src, num));
}
diff --git a/audio/tosha/files/patch-utils.h b/audio/tosha/files/patch-utils.h
index 32b32cbee6ab..4062a9b1daad 100644
--- a/audio/tosha/files/patch-utils.h
+++ b/audio/tosha/files/patch-utils.h
@@ -1,6 +1,6 @@
---- utils.h.orig 2009-02-24 14:41:21.000000000 +0100
-+++ utils.h 2009-02-24 14:42:08.000000000 +0100
-@@ -63,6 +63,9 @@
+--- utils.h.orig 1999-01-01 23:57:51 UTC
++++ utils.h
+@@ -63,6 +63,9 @@ void *tmalloc (size_t size);
* allocated.
*/
@@ -10,7 +10,7 @@
char *strndup (char *src, int num);
/*
* Like strdup(), but limits the string length to at most
-@@ -71,6 +74,8 @@
+@@ -71,6 +74,8 @@ char *strndup (char *src, int num);
* Always allocates <num>+1 bytes, even if less space would
* be sufficient to store <src>.
*/
diff --git a/audio/trommler/files/patch-gui.c b/audio/trommler/files/patch-gui.c
index cb6a3aceec13..7effc7cf4128 100644
--- a/audio/trommler/files/patch-gui.c
+++ b/audio/trommler/files/patch-gui.c
@@ -1,6 +1,6 @@
---- gui.c.orig Thu Feb 20 15:43:08 2003
-+++ gui.c Thu Feb 20 15:43:21 2003
-@@ -2261,7 +2261,6 @@
+--- gui.c.orig 2007-11-03 18:20:09 UTC
++++ gui.c
+@@ -2425,7 +2425,6 @@ GLOBALFUN int main(int argc, char *argv[
}
else
{
diff --git a/audio/tse3/files/patch-OSS.cpp b/audio/tse3/files/patch-OSS.cpp
deleted file mode 100644
index a30a611e97d9..000000000000
--- a/audio/tse3/files/patch-OSS.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-*** src/tse3/plt/OSS.cpp.orig 2005-07-25 20:22:56.000000000 +0900
---- src/tse3/plt/OSS.cpp 2009-04-02 21:20:35.000000000 +0900
-***************
-*** 25,30 ****
---- 25,31 ----
- #include <fcntl.h>
- #include <stdarg.h>
- #include <sys/types.h>
-+ #include <cstring>
-
- // These #includes are linux specific and I need to do some autoconf
- // magic to work out how to conditionally include them
-***************
-*** 1484,1494 ****
- #ifdef TSE3_WITH_OSS
- // Happily, if you switch -pedantic on in gcc these macros will always
- // throw up warnings. Marvel at the beauty of awe_voice.h for reasons why.
-!
- AWE_SET_CHANNEL_MODE(deviceno, AWE_PLAY_MULTI);
- AWE_SET_CHANNEL_MODE(deviceno, 1);
- AWE_DRUM_CHANNELS(deviceno, 1<<9);
- AWE_TERMINATE_ALL(deviceno);
- seqbuf_dump();
- #endif
- }
---- 1485,1496 ----
- #ifdef TSE3_WITH_OSS
- // Happily, if you switch -pedantic on in gcc these macros will always
- // throw up warnings. Marvel at the beauty of awe_voice.h for reasons why.
-! #if 0
- AWE_SET_CHANNEL_MODE(deviceno, AWE_PLAY_MULTI);
- AWE_SET_CHANNEL_MODE(deviceno, 1);
- AWE_DRUM_CHANNELS(deviceno, 1<<9);
- AWE_TERMINATE_ALL(deviceno);
-+ #endif
- seqbuf_dump();
- #endif
- }
-***************
-*** 1996,2002 ****
- // there is no soundcard
- throw TSE3::MidiSchedulerError(TSE3::MidiSchedulerCreateErr);
- }
-! ioctl(seqfd, SNDCTL_SEQ_NRMIDIS, &nomidis);
- rate = 0;
- ioctl(seqfd, SNDCTL_SEQ_CTRLRATE, &rate);
- if (rate == -1 || rate <= 0) rate = 100;
---- 1998,2005 ----
- // there is no soundcard
- throw TSE3::MidiSchedulerError(TSE3::MidiSchedulerCreateErr);
- }
-! // ioctl(seqfd, SNDCTL_SEQ_NRMIDIS, &nomidis);
-! nomidis = 0;
- rate = 0;
- ioctl(seqfd, SNDCTL_SEQ_CTRLRATE, &rate);
- if (rate == -1 || rate <= 0) rate = 100;
-***************
-*** 2044,2049 ****
---- 2047,2060 ----
- }
- std::cout << ")\n";
- }
-+ #if 1
-+ devices[n]
-+ = new OSSMidiScheduler_AWEDevice(n, synthinfo[n], seqfd,
-+ _seqbuf, _seqbuflen,
-+ _seqbufptr);
-+ }
-+ }
-+ #else
- if (synthinfo[n].synth_type == SYNTH_TYPE_SAMPLE
- && synthinfo[n].synth_subtype == SAMPLE_TYPE_AWE32)
- {
-***************
-*** 2100,2105 ****
---- 2111,2117 ----
- }
- }
-
-+ #endif
- // Now let the public API know about these devices
- for (unsigned int n = 0; n < nodevices; ++n)
- {
diff --git a/audio/tse3/files/patch-src__examples__recording__recording.cpp b/audio/tse3/files/patch-src__examples__recording__recording.cpp
deleted file mode 100644
index 83b0ed05c63c..000000000000
--- a/audio/tse3/files/patch-src__examples__recording__recording.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/examples/recording/recording.cpp.orig 2005-07-25 20:22:31.000000000 +0900
-+++ src/examples/recording/recording.cpp 2009-04-02 13:23:23.000000000 +0900
-@@ -27,6 +27,7 @@
- **************************************************************/
-
- #include <iostream>
-+#include <cstdlib>
-
- // Used in step 1
- #include "tse3/Metronome.h"
diff --git a/audio/tse3/files/patch-src__tse3__MidiFile.cpp b/audio/tse3/files/patch-src__tse3__MidiFile.cpp
deleted file mode 100644
index 15b6060c9860..000000000000
--- a/audio/tse3/files/patch-src__tse3__MidiFile.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/tse3/MidiFile.cpp.orig 2005-07-25 20:23:00.000000000 +0900
-+++ src/tse3/MidiFile.cpp 2009-04-02 13:01:31.000000000 +0900
-@@ -32,6 +32,7 @@
- #include <string>
- #include <queue>
- #include <math.h>
-+#include <cstring>
-
- using namespace TSE3;
-
diff --git a/audio/tse3/files/patch-src__tse3__Serializable.h b/audio/tse3/files/patch-src__tse3__Serializable.h
deleted file mode 100644
index 43f9c581c198..000000000000
--- a/audio/tse3/files/patch-src__tse3__Serializable.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/tse3/Serializable.h.orig 2005-07-25 20:23:00.000000000 +0900
-+++ src/tse3/Serializable.h 2009-04-02 13:01:31.000000000 +0900
-@@ -20,6 +20,7 @@
- #include <iosfwd>
- #include <iomanip>
- #include <cstddef>
-+#include <iostream>
-
- namespace TSE3
- {
diff --git a/audio/tse3/files/patch-src__tse3__TSE2MDL.cpp b/audio/tse3/files/patch-src__tse3__TSE2MDL.cpp
deleted file mode 100644
index a7ce5718054d..000000000000
--- a/audio/tse3/files/patch-src__tse3__TSE2MDL.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/tse3/TSE2MDL.cpp.orig 2005-07-25 20:23:00.000000000 +0900
-+++ src/tse3/TSE2MDL.cpp 2009-04-02 13:01:31.000000000 +0900
-@@ -38,6 +38,7 @@
- #include "tse3/Progress.h"
-
- #include <fstream>
-+#include <cstring>
-
- using namespace TSE3;
-
diff --git a/audio/tse3/files/patch-src__tse3__cmd__Phrase.h b/audio/tse3/files/patch-src__tse3__cmd__Phrase.h
deleted file mode 100644
index 5cd236343507..000000000000
--- a/audio/tse3/files/patch-src__tse3__cmd__Phrase.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/tse3/cmd/Phrase.h.orig 2005-07-25 20:22:38.000000000 +0900
-+++ src/tse3/cmd/Phrase.h 2009-04-02 13:01:31.000000000 +0900
-@@ -29,6 +29,7 @@
- class Phrase;
- class Song;
- class Part;
-+ class PhraseEdit;
-
- namespace Cmd
- {
diff --git a/audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp b/audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp
deleted file mode 100644
index b1be7df520b8..000000000000
--- a/audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
---- src/tse3/file/MidiFilter.cpp Tue Aug 23 08:32:31 2005
-+++ src/tse3/file/MidiFilter.cpp Sun Sep 11 20:33:13 2005
-@@ -11,5 +11,5 @@
-
- writer.element("Status", mf.status());
-- unsigned int c_filter = 0, p_filter = 0;
-+ size_t c_filter = 0, p_filter = 0;
- for (int n = 0; n < 16; n++) if (mf.channelFilter(n)) c_filter |= (1<<n);
- writer.element("ChannelFilter", c_filter);
diff --git a/audio/tse3/files/patch-src__tse3__file__XML.cpp b/audio/tse3/files/patch-src__tse3__file__XML.cpp
deleted file mode 100644
index bf89b641bb58..000000000000
--- a/audio/tse3/files/patch-src__tse3__file__XML.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
---- src/tse3/file/XML.cpp Tue Aug 23 08:32:53 2005
-+++ src/tse3/file/XML.cpp Sun Sep 11 20:29:22 2005
-@@ -111,5 +111,5 @@
-
-
--void TSE3::File::XmlFileWriter::element(const std::string &name, unsigned int value)
-+void TSE3::File::XmlFileWriter::element(const std::string &name, size_t value)
- {
- indent(out);
diff --git a/audio/tse3/files/patch-src__tse3__file__XML.h b/audio/tse3/files/patch-src__tse3__file__XML.h
deleted file mode 100644
index 3dffaeafef6e..000000000000
--- a/audio/tse3/files/patch-src__tse3__file__XML.h
+++ /dev/null
@@ -1,9 +0,0 @@
---- src/tse3/file/XML.h Tue Aug 23 08:37:53 2005
-+++ src/tse3/file/XML.h Sun Sep 11 20:29:45 2005
-@@ -154,5 +154,5 @@
- void element(const std::string &name, const char *value);
- void element(const std::string &name, int value);
-- void element(const std::string &name, unsigned int value);
-+ void element(const std::string &name, size_t value);
- void element(const std::string &name, bool value);
-
diff --git a/audio/tse3/files/patch-src__tse3play__tse3play.cpp b/audio/tse3/files/patch-src__tse3play__tse3play.cpp
deleted file mode 100644
index 612f0b5fb4ef..000000000000
--- a/audio/tse3/files/patch-src__tse3play__tse3play.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/tse3play/tse3play.cpp.orig 2005-08-23 21:58:35.000000000 +0900
-+++ src/tse3play/tse3play.cpp 2009-04-02 13:01:31.000000000 +0900
-@@ -32,6 +32,7 @@
- #include "tse3/Error.h"
- #include "tse3/Metronome.h"
- #include <fstream>
-+#include <cstdlib>
-
- #ifdef HAVE_CONFIG_H
- #include "config.h"
diff --git a/audio/tse3/files/patch-src_examples_recording_recording.cpp b/audio/tse3/files/patch-src_examples_recording_recording.cpp
new file mode 100644
index 000000000000..71f40c567640
--- /dev/null
+++ b/audio/tse3/files/patch-src_examples_recording_recording.cpp
@@ -0,0 +1,10 @@
+--- src/examples/recording/recording.cpp.orig 2005-07-25 11:22:31 UTC
++++ src/examples/recording/recording.cpp
+@@ -27,6 +27,7 @@
+ **************************************************************/
+
+ #include <iostream>
++#include <cstdlib>
+
+ // Used in step 1
+ #include "tse3/Metronome.h"
diff --git a/audio/tse3/files/patch-src_tse3_MidiFile.cpp b/audio/tse3/files/patch-src_tse3_MidiFile.cpp
new file mode 100644
index 000000000000..00c81ca263d1
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_MidiFile.cpp
@@ -0,0 +1,10 @@
+--- src/tse3/MidiFile.cpp.orig 2005-07-25 11:23:00 UTC
++++ src/tse3/MidiFile.cpp
+@@ -32,6 +32,7 @@
+ #include <string>
+ #include <queue>
+ #include <math.h>
++#include <cstring>
+
+ using namespace TSE3;
+
diff --git a/audio/tse3/files/patch-src_tse3_Serializable.h b/audio/tse3/files/patch-src_tse3_Serializable.h
new file mode 100644
index 000000000000..d6fa38aec24a
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_Serializable.h
@@ -0,0 +1,10 @@
+--- src/tse3/Serializable.h.orig 2005-07-25 11:23:00 UTC
++++ src/tse3/Serializable.h
+@@ -20,6 +20,7 @@
+ #include <iosfwd>
+ #include <iomanip>
+ #include <cstddef>
++#include <iostream>
+
+ namespace TSE3
+ {
diff --git a/audio/tse3/files/patch-src_tse3_TSE2MDL.cpp b/audio/tse3/files/patch-src_tse3_TSE2MDL.cpp
new file mode 100644
index 000000000000..d7d74c106ae8
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_TSE2MDL.cpp
@@ -0,0 +1,10 @@
+--- src/tse3/TSE2MDL.cpp.orig 2005-07-25 11:23:00 UTC
++++ src/tse3/TSE2MDL.cpp
+@@ -38,6 +38,7 @@
+ #include "tse3/Progress.h"
+
+ #include <fstream>
++#include <cstring>
+
+ using namespace TSE3;
+
diff --git a/audio/tse3/files/patch-src_tse3_cmd_Phrase.h b/audio/tse3/files/patch-src_tse3_cmd_Phrase.h
new file mode 100644
index 000000000000..14c9787ae066
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_cmd_Phrase.h
@@ -0,0 +1,10 @@
+--- src/tse3/cmd/Phrase.h.orig 2005-07-25 11:22:38 UTC
++++ src/tse3/cmd/Phrase.h
+@@ -29,6 +29,7 @@ namespace TSE3
+ class Phrase;
+ class Song;
+ class Part;
++ class PhraseEdit;
+
+ namespace Cmd
+ {
diff --git a/audio/tse3/files/patch-src_tse3_file_MidiFilter.cpp b/audio/tse3/files/patch-src_tse3_file_MidiFilter.cpp
new file mode 100644
index 000000000000..f89db30d8d0f
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_file_MidiFilter.cpp
@@ -0,0 +1,11 @@
+--- src/tse3/file/MidiFilter.cpp.orig 2005-08-23 12:32:31 UTC
++++ src/tse3/file/MidiFilter.cpp
+@@ -10,7 +10,7 @@ void TSE3::File::write(XmlFileWriter &wr
+ TSE3::File::XmlFileWriter::AutoElement ae(writer, "MidiFilter");
+
+ writer.element("Status", mf.status());
+- unsigned int c_filter = 0, p_filter = 0;
++ size_t c_filter = 0, p_filter = 0;
+ for (int n = 0; n < 16; n++) if (mf.channelFilter(n)) c_filter |= (1<<n);
+ writer.element("ChannelFilter", c_filter);
+ writer.element("PortFilter", p_filter);
diff --git a/audio/tse3/files/patch-src_tse3_file_XML.cpp b/audio/tse3/files/patch-src_tse3_file_XML.cpp
new file mode 100644
index 000000000000..3f732e18bf09
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_file_XML.cpp
@@ -0,0 +1,11 @@
+--- src/tse3/file/XML.cpp.orig 2005-08-23 12:32:53 UTC
++++ src/tse3/file/XML.cpp
+@@ -110,7 +110,7 @@ void TSE3::File::XmlFileWriter::element(
+ }
+
+
+-void TSE3::File::XmlFileWriter::element(const std::string &name, unsigned int value)
++void TSE3::File::XmlFileWriter::element(const std::string &name, size_t value)
+ {
+ indent(out);
+ out << "<" << name << " value=\"" << value << "\"/>\n";
diff --git a/audio/tse3/files/patch-src_tse3_file_XML.h b/audio/tse3/files/patch-src_tse3_file_XML.h
new file mode 100644
index 000000000000..0db96e629b53
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_file_XML.h
@@ -0,0 +1,11 @@
+--- src/tse3/file/XML.h.orig 2005-08-23 12:37:53 UTC
++++ src/tse3/file/XML.h
+@@ -153,7 +153,7 @@ namespace TSE3
+ void element(const std::string &name, const std::string &value);
+ void element(const std::string &name, const char *value);
+ void element(const std::string &name, int value);
+- void element(const std::string &name, unsigned int value);
++ void element(const std::string &name, size_t value);
+ void element(const std::string &name, bool value);
+
+ void comment(const std::string &comment);
diff --git a/audio/tse3/files/patch-src_tse3_plt_OSS.cpp b/audio/tse3/files/patch-src_tse3_plt_OSS.cpp
new file mode 100644
index 000000000000..b9d9ef03ea3b
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3_plt_OSS.cpp
@@ -0,0 +1,57 @@
+--- src/tse3/plt/OSS.cpp.orig 2005-07-25 11:22:56 UTC
++++ src/tse3/plt/OSS.cpp
+@@ -25,6 +25,7 @@
+ #include <fcntl.h>
+ #include <stdarg.h>
+ #include <sys/types.h>
++#include <cstring>
+
+ // These #includes are linux specific and I need to do some autoconf
+ // magic to work out how to conditionally include them
+@@ -1484,11 +1485,12 @@ OSSMidiScheduler_AWEDevice::OSSMidiSched
+ #ifdef TSE3_WITH_OSS
+ // Happily, if you switch -pedantic on in gcc these macros will always
+ // throw up warnings. Marvel at the beauty of awe_voice.h for reasons why.
+-
++#if 0
+ AWE_SET_CHANNEL_MODE(deviceno, AWE_PLAY_MULTI);
+ AWE_SET_CHANNEL_MODE(deviceno, 1);
+ AWE_DRUM_CHANNELS(deviceno, 1<<9);
+ AWE_TERMINATE_ALL(deviceno);
++#endif
+ seqbuf_dump();
+ #endif
+ }
+@@ -1996,7 +1998,8 @@ OSSMidiScheduler::OSSMidiScheduler()
+ // there is no soundcard
+ throw TSE3::MidiSchedulerError(TSE3::MidiSchedulerCreateErr);
+ }
+- ioctl(seqfd, SNDCTL_SEQ_NRMIDIS, &nomidis);
++ // ioctl(seqfd, SNDCTL_SEQ_NRMIDIS, &nomidis);
++ nomidis = 0;
+ rate = 0;
+ ioctl(seqfd, SNDCTL_SEQ_CTRLRATE, &rate);
+ if (rate == -1 || rate <= 0) rate = 100;
+@@ -2044,6 +2047,14 @@ OSSMidiScheduler::OSSMidiScheduler()
+ }
+ std::cout << ")\n";
+ }
++#if 1
++ devices[n]
++ = new OSSMidiScheduler_AWEDevice(n, synthinfo[n], seqfd,
++ _seqbuf, _seqbuflen,
++ _seqbufptr);
++ }
++ }
++#else
+ if (synthinfo[n].synth_type == SYNTH_TYPE_SAMPLE
+ && synthinfo[n].synth_subtype == SAMPLE_TYPE_AWE32)
+ {
+@@ -2100,6 +2111,7 @@ OSSMidiScheduler::OSSMidiScheduler()
+ }
+ }
+
++#endif
+ // Now let the public API know about these devices
+ for (unsigned int n = 0; n < nodevices; ++n)
+ {
diff --git a/audio/tse3/files/patch-src_tse3play_tse3play.cpp b/audio/tse3/files/patch-src_tse3play_tse3play.cpp
new file mode 100644
index 000000000000..a570ae095ed1
--- /dev/null
+++ b/audio/tse3/files/patch-src_tse3play_tse3play.cpp
@@ -0,0 +1,10 @@
+--- src/tse3play/tse3play.cpp.orig 2005-08-23 12:58:35 UTC
++++ src/tse3play/tse3play.cpp
+@@ -32,6 +32,7 @@
+ #include "tse3/Error.h"
+ #include "tse3/Metronome.h"
+ #include <fstream>
++#include <cstdlib>
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
diff --git a/audio/tuneradio/files/patch-tuneradio.c b/audio/tuneradio/files/patch-tuneradio.c
index 5532a8831aae..f8a1da33638f 100644
--- a/audio/tuneradio/files/patch-tuneradio.c
+++ b/audio/tuneradio/files/patch-tuneradio.c
@@ -1,5 +1,5 @@
---- tuneradio.c.orig Fri Oct 31 06:53:39 2003
-+++ tuneradio.c Mon Feb 9 21:40:26 2004
+--- tuneradio.c.orig 2003-10-31 05:53:39 UTC
++++ tuneradio.c
@@ -41,7 +41,12 @@
#include <unistd.h>
#include <sys/ioctl.h>
diff --git a/audio/tuxguitar/files/patch-build.properties b/audio/tuxguitar/files/patch-build.properties
index 763a91da11d1..3fcd090ccc90 100644
--- a/audio/tuxguitar/files/patch-build.properties
+++ b/audio/tuxguitar/files/patch-build.properties
@@ -1,7 +1,7 @@
---- build.properties.orig 2010-02-26 12:11:41.000000000 +0100
-+++ build.properties 2010-02-26 12:13:52.000000000 +0100
-@@ -5,15 +5,15 @@
- ant.build.javac.target=1.5
+--- build.properties.orig 2009-10-31 14:32:52 UTC
++++ build.properties
+@@ -5,15 +5,15 @@ ant.build.javac.source=1.4
+ ant.build.javac.target=1.4
########## DEFAULT LINUX BUILD PROPERTIES ##########
-lib.swt.jni=lib/
@@ -25,7 +25,7 @@
########## UBUNTU BUILD PROPERTIES ##########
#lib.swt.jni=/usr/lib/jni/
-@@ -29,15 +29,15 @@
+@@ -29,15 +29,15 @@ dist.doc.path=doc/
#dist.doc.path=${dist.prefix}/share/doc/tuxguitar/
########## FREEBSD BUILD PROPERTIES ##########
@@ -50,7 +50,7 @@
########## DEFAULT MAC BUILD PROPERTIES ##########
#lib.swt.jni=lib/
-@@ -62,4 +62,4 @@
+@@ -62,4 +62,4 @@ dist.doc.path=doc/
#dist.doc.path=doc\\
## get JanelWindows.exe from http://sourceforge.net/projects/janel/
#janel.exe=utilities\\tuxguitar.exe
diff --git a/audio/uade/files/patch-src_Makefile.in b/audio/uade/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..ff9fa6c75345
--- /dev/null
+++ b/audio/uade/files/patch-src_Makefile.in
@@ -0,0 +1,11 @@
+--- src/Makefile.in.orig 2009-10-29 21:01:12 UTC
++++ src/Makefile.in
+@@ -8,7 +8,7 @@ ARCHFLAGS = {ARCHFLAGS}
+ ARCHLIBS = {ARCHLIBS}
+ DEBUGFLAGS = {DEBUGFLAGS}
+
+-COMMONGCCOPTS = -Wall -Wno-unused -Wno-format -Wmissing-prototypes -Wstrict-prototypes -fno-exceptions -O2
++COMMONGCCOPTS = -Wno-unused -Wno-format -Wmissing-prototypes -Wstrict-prototypes -fno-exceptions
+
+ TARGETCFLAGS = -fomit-frame-pointer $(COMMONGCCOPTS) $(DEBUGFLAGS) $(ARCHFLAGS)
+ LIBRARIES = -lm $(AUDIOLIBS) $(ARCHLIBS)
diff --git a/audio/uade/files/patch-src__Makefile.in b/audio/uade/files/patch-src__Makefile.in
deleted file mode 100644
index 6120a6d8a9cc..000000000000
--- a/audio/uade/files/patch-src__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/Makefile.in.orig 2009-10-29 22:01:12.000000000 +0100
-+++ ./src/Makefile.in 2013-11-13 16:29:09.082723891 +0100
-@@ -8,7 +8,7 @@
- ARCHLIBS = {ARCHLIBS}
- DEBUGFLAGS = {DEBUGFLAGS}
-
--COMMONGCCOPTS = -Wall -Wno-unused -Wno-format -Wmissing-prototypes -Wstrict-prototypes -fno-exceptions -O2
-+COMMONGCCOPTS = -Wno-unused -Wno-format -Wmissing-prototypes -Wstrict-prototypes -fno-exceptions
-
- TARGETCFLAGS = -fomit-frame-pointer $(COMMONGCCOPTS) $(DEBUGFLAGS) $(ARCHFLAGS)
- LIBRARIES = -lm $(AUDIOLIBS) $(ARCHLIBS)
diff --git a/audio/uade/files/patch-src__frontends__audacious__Makefile.in b/audio/uade/files/patch-src__frontends__audacious__Makefile.in
deleted file mode 100644
index 262e5a3dc75b..000000000000
--- a/audio/uade/files/patch-src__frontends__audacious__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/frontends/audacious/Makefile.in.orig 2009-10-29 22:01:12.000000000 +0100
-+++ ./src/frontends/audacious/Makefile.in 2013-11-13 16:29:09.083723765 +0100
-@@ -7,7 +7,7 @@
- AUDACIOUSFLAGS={AUDACIOUSFLAGS}
- AUDACIOUSLIBS={AUDACIOUSLIBS}
- SHAREDLIBRARYFLAGS={SHAREDLIBRARYFLAGS}
--CFLAGS = -Wall -O2 $(SHAREDLIBRARYFLAGS) $(AUDACIOUSFLAGS) $(ARCHFLAGS) $(DEBUGFLAGS) -I../common -I../../include
-+CFLAGS = $(SHAREDLIBRARYFLAGS) $(AUDACIOUSFLAGS) $(ARCHFLAGS) $(DEBUGFLAGS) -I../common -I../../include
- CLIBS = $(XMLIBS) -lm
-
- all: libuade2.so
diff --git a/audio/uade/files/patch-src__frontends__uade123__Makefile.in b/audio/uade/files/patch-src__frontends__uade123__Makefile.in
deleted file mode 100644
index 0dda159f91f2..000000000000
--- a/audio/uade/files/patch-src__frontends__uade123__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/frontends/uade123/Makefile.in.orig 2009-10-29 22:01:12.000000000 +0100
-+++ ./src/frontends/uade123/Makefile.in 2013-11-13 16:29:09.084723709 +0100
-@@ -2,7 +2,7 @@
- UADE123NAME = {UADE123NAME}
-
- CC = {CC}
--CFLAGS = -Wall -O2 -I../../include -I../common {AOFLAGS} {DEBUGFLAGS} {ARCHFLAGS}
-+CFLAGS = -I../../include -I../common {AOFLAGS} {DEBUGFLAGS} {ARCHFLAGS}
- CLIBS = {AOLIBS} {ARCHLIBS} -lm
-
- all: uade123
diff --git a/audio/uade/files/patch-src__frontends__xmms__Makefile.in b/audio/uade/files/patch-src__frontends__xmms__Makefile.in
deleted file mode 100644
index 92111dcbfc8e..000000000000
--- a/audio/uade/files/patch-src__frontends__xmms__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/frontends/xmms/Makefile.in.orig 2009-10-29 22:01:12.000000000 +0100
-+++ ./src/frontends/xmms/Makefile.in 2013-11-13 16:29:09.085725693 +0100
-@@ -8,7 +8,7 @@
- XMMSFLAGS={XMMSFLAGS}
- XMMSLIBS={XMMSLIBS}
- SHAREDLIBRARYFLAGS={SHAREDLIBRARYFLAGS}
--CFLAGS = -Wall -O2 $(SHAREDLIBRARYFLAGS) $(DEBUGFLAGS) $(XMMSFLAGS) $(ARCHFLAGS) -I../common -I../../include
-+CFLAGS = $(SHAREDLIBRARYFLAGS) $(DEBUGFLAGS) $(XMMSFLAGS) $(ARCHFLAGS) -I../common -I../../include
- CLIBS = $(XMMSLIBS) -lm
-
- all: libuade2.so
diff --git a/audio/uade/files/patch-src_frontends_audacious_Makefile.in b/audio/uade/files/patch-src_frontends_audacious_Makefile.in
new file mode 100644
index 000000000000..282e78323b95
--- /dev/null
+++ b/audio/uade/files/patch-src_frontends_audacious_Makefile.in
@@ -0,0 +1,11 @@
+--- src/frontends/audacious/Makefile.in.orig 2009-10-29 21:01:12 UTC
++++ src/frontends/audacious/Makefile.in
+@@ -7,7 +7,7 @@ DEBUGFLAGS={DEBUGFLAGS}
+ AUDACIOUSFLAGS={AUDACIOUSFLAGS}
+ AUDACIOUSLIBS={AUDACIOUSLIBS}
+ SHAREDLIBRARYFLAGS={SHAREDLIBRARYFLAGS}
+-CFLAGS = -Wall -O2 $(SHAREDLIBRARYFLAGS) $(AUDACIOUSFLAGS) $(ARCHFLAGS) $(DEBUGFLAGS) -I../common -I../../include
++CFLAGS = $(SHAREDLIBRARYFLAGS) $(AUDACIOUSFLAGS) $(ARCHFLAGS) $(DEBUGFLAGS) -I../common -I../../include
+ CLIBS = $(XMLIBS) -lm
+
+ all: libuade2.so
diff --git a/audio/uade/files/patch-src_frontends_uade123_Makefile.in b/audio/uade/files/patch-src_frontends_uade123_Makefile.in
new file mode 100644
index 000000000000..dd9850d3bdc9
--- /dev/null
+++ b/audio/uade/files/patch-src_frontends_uade123_Makefile.in
@@ -0,0 +1,11 @@
+--- src/frontends/uade123/Makefile.in.orig 2009-10-29 21:01:12 UTC
++++ src/frontends/uade123/Makefile.in
+@@ -2,7 +2,7 @@ BINDIR = {PACKAGEPREFIX}{BINDIR}
+ UADE123NAME = {UADE123NAME}
+
+ CC = {CC}
+-CFLAGS = -Wall -O2 -I../../include -I../common {AOFLAGS} {DEBUGFLAGS} {ARCHFLAGS}
++CFLAGS = -I../../include -I../common {AOFLAGS} {DEBUGFLAGS} {ARCHFLAGS}
+ CLIBS = {AOLIBS} {ARCHLIBS} -lm
+
+ all: uade123
diff --git a/audio/uade/files/patch-src_frontends_xmms_Makefile.in b/audio/uade/files/patch-src_frontends_xmms_Makefile.in
new file mode 100644
index 000000000000..17186aca58c6
--- /dev/null
+++ b/audio/uade/files/patch-src_frontends_xmms_Makefile.in
@@ -0,0 +1,11 @@
+--- src/frontends/xmms/Makefile.in.orig 2009-10-29 21:01:12 UTC
++++ src/frontends/xmms/Makefile.in
+@@ -8,7 +8,7 @@ DEBUGFLAGS={DEBUGFLAGS}
+ XMMSFLAGS={XMMSFLAGS}
+ XMMSLIBS={XMMSLIBS}
+ SHAREDLIBRARYFLAGS={SHAREDLIBRARYFLAGS}
+-CFLAGS = -Wall -O2 $(SHAREDLIBRARYFLAGS) $(DEBUGFLAGS) $(XMMSFLAGS) $(ARCHFLAGS) -I../common -I../../include
++CFLAGS = $(SHAREDLIBRARYFLAGS) $(DEBUGFLAGS) $(XMMSFLAGS) $(ARCHFLAGS) -I../common -I../../include
+ CLIBS = $(XMMSLIBS) -lm
+
+ all: libuade2.so
diff --git a/audio/umix/files/patch-src__driver_oss.c b/audio/umix/files/patch-src_driver__oss.c
index 22c8776cc6e7..22c8776cc6e7 100644
--- a/audio/umix/files/patch-src__driver_oss.c
+++ b/audio/umix/files/patch-src_driver__oss.c
diff --git a/audio/umix/files/patch-src_error.c b/audio/umix/files/patch-src_error.c
index 94f1dce52998..db2c7210f070 100644
--- a/audio/umix/files/patch-src_error.c
+++ b/audio/umix/files/patch-src_error.c
@@ -1,4 +1,4 @@
---- src/error.c.orig 2016-05-03 08:56:24 UTC
+--- src/error.c.orig 2003-08-23 12:37:42 UTC
+++ src/error.c
@@ -54,7 +54,7 @@ static void error_handler(int strflag, c
fflush(stderr);
diff --git a/audio/umix/files/patch-src_error.h b/audio/umix/files/patch-src_error.h
index e2633ca475ec..b623fccab647 100644
--- a/audio/umix/files/patch-src_error.h
+++ b/audio/umix/files/patch-src_error.h
@@ -1,4 +1,4 @@
---- src/error.h.orig 2016-05-03 08:56:07 UTC
+--- src/error.h.orig 2002-12-22 15:18:57 UTC
+++ src/error.h
@@ -24,7 +24,7 @@
#ifndef MY_ERROR_H
diff --git a/audio/umodplayer/files/patch-coresound.c b/audio/umodplayer/files/patch-coresound.c
index 840eea292329..27bfee03648a 100644
--- a/audio/umodplayer/files/patch-coresound.c
+++ b/audio/umodplayer/files/patch-coresound.c
@@ -1,5 +1,5 @@
---- coresound.c.orig 2010-06-06 14:23:02.000000000 +0200
-+++ coresound.c 2010-06-06 14:23:40.000000000 +0200
+--- coresound.c.orig 2006-09-16 13:50:12 UTC
++++ coresound.c
@@ -132,6 +132,7 @@ CoreSound_InitAudio()
if (drv < 0)
return FALSE;
diff --git a/audio/umurmur/files/patch-configure.ac b/audio/umurmur/files/patch-configure.ac
index aab826e08b19..14045b5e9d7b 100644
--- a/audio/umurmur/files/patch-configure.ac
+++ b/audio/umurmur/files/patch-configure.ac
@@ -1,8 +1,8 @@
---- configure.ac.orig 2014-08-07 23:37:03.000000000 -0700
-+++ configure.ac 2014-08-15 00:54:12.000000000 -0700
-@@ -89,7 +89,7 @@
- AM_CONDITIONAL(USE_OPENSSL, test x$with_ssl = xopenssl)
- AM_CONDITIONAL(USE_GNUTLS, test x$with_ssl = xgnutls)
+--- configure.ac.orig 2015-04-07 10:01:12 UTC
++++ configure.ac
+@@ -113,7 +113,7 @@ AS_IF([test "x$enable_shmapi" != xno],
+
+
-AC_DEFINE([DEFAULT_CONFIG], ["/etc/umurmur.conf"], [Default config])
+AC_DEFINE([DEFAULT_CONFIG], ["%%PREFIX%%/etc/umurmur.conf"], [Default config])
diff --git a/audio/umurmur/files/patch-src-conf.c b/audio/umurmur/files/patch-src-conf.c
deleted file mode 100644
index 3e6d203007ff..000000000000
--- a/audio/umurmur/files/patch-src-conf.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- src/conf.c.orig 2014-08-07 23:37:03.000000000 -0700
-+++ src/conf.c 2014-08-14 11:47:27.000000000 -0700
-@@ -89,23 +89,23 @@
- case CERTIFICATE:
- setting = config_lookup(&configuration, "certificate");
- if (!setting)
-- return "/etc/umurmur/certificate.crt";
-+ return "%%PREFIX%%/etc/umurmur/certificate.crt";
- else {
- if ((strsetting = config_setting_get_string(setting)) != NULL)
- return strsetting;
- else
-- return "/etc/umurmur/certificate.crt";
-+ return "%%PREFIX%%/etc/umurmur/certificate.crt";
- }
- break;
- case KEY:
- setting = config_lookup(&configuration, "private_key");
- if (!setting)
-- return "/etc/umurmur/private_key.key";
-+ return "%%PREFIX%%/etc/umurmur/private_key.key";
- else {
- if ((strsetting = config_setting_get_string(setting)) != NULL)
- return strsetting;
- else
-- return "/etc/umurmur/private_key.key";
-+ return "%%PREFIX%%/etc/umurmur/private_key.key";
- }
- break;
- case CAPATH:
diff --git a/audio/umurmur/files/patch-src_conf.c b/audio/umurmur/files/patch-src_conf.c
new file mode 100644
index 000000000000..209de220eae0
--- /dev/null
+++ b/audio/umurmur/files/patch-src_conf.c
@@ -0,0 +1,30 @@
+--- src/conf.c.orig 2015-04-07 10:01:12 UTC
++++ src/conf.c
+@@ -89,23 +89,23 @@ const char *getStrConf(param_t param)
+ case CERTIFICATE:
+ setting = config_lookup(&configuration, "certificate");
+ if (!setting)
+- return "/etc/umurmur/certificate.crt";
++ return "%%PREFIX%%/etc/umurmur/certificate.crt";
+ else {
+ if ((strsetting = config_setting_get_string(setting)) != NULL)
+ return strsetting;
+ else
+- return "/etc/umurmur/certificate.crt";
++ return "%%PREFIX%%/etc/umurmur/certificate.crt";
+ }
+ break;
+ case KEY:
+ setting = config_lookup(&configuration, "private_key");
+ if (!setting)
+- return "/etc/umurmur/private_key.key";
++ return "%%PREFIX%%/etc/umurmur/private_key.key";
+ else {
+ if ((strsetting = config_setting_get_string(setting)) != NULL)
+ return strsetting;
+ else
+- return "/etc/umurmur/private_key.key";
++ return "%%PREFIX%%/etc/umurmur/private_key.key";
+ }
+ break;
+ case CAPATH:
diff --git a/audio/vamp-plugin-sdk/files/patch-Makefile.in b/audio/vamp-plugin-sdk/files/patch-Makefile.in
index a2141c13f6f1..aa7d079f8ffa 100644
--- a/audio/vamp-plugin-sdk/files/patch-Makefile.in
+++ b/audio/vamp-plugin-sdk/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2011-11-24 13:27:03 UTC
+--- Makefile.in.orig 2015-06-22 08:28:58 UTC
+++ Makefile.in
-@@ -87,11 +87,11 @@ INSTALL_HOSTSDK_LINK_DEV = libvamp-host
+@@ -90,11 +90,11 @@ INSTALL_HOSTSDK_LINK_DEV = libvamp-host
INSTALL_HOSTSDK_STATIC = libvamp-hostsdk.a
INSTALL_HOSTSDK_LA = libvamp-hostsdk.la
@@ -14,7 +14,7 @@
SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_SDK_LINK_ABI)
HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_HOSTSDK_LINK_ABI)
-@@ -288,18 +288,6 @@ install: $(SDK_STATIC) $(SDK_DYNAMIC) $(
+@@ -298,18 +298,6 @@ install: $(SDK_STATIC) $(SDK_DYNAMIC) $(
> $(DESTDIR)$(INSTALL_PKGCONFIG)/vamp-sdk.pc
sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(PCDIR)/vamp-hostsdk.pc.in \
> $(DESTDIR)$(INSTALL_PKGCONFIG)/vamp-hostsdk.pc
diff --git a/audio/voipong/files/patch-Makefile.bsd b/audio/voipong/files/patch-Makefile.bsd
index c05293b652e5..410b13326de8 100644
--- a/audio/voipong/files/patch-Makefile.bsd
+++ b/audio/voipong/files/patch-Makefile.bsd
@@ -1,5 +1,5 @@
---- Makefile.bsd.orig 2005-12-09 23:20:53.000000000 +0800
-+++ Makefile.bsd 2014-05-22 20:40:35.717976146 +0800
+--- Makefile.bsd.orig 2005-12-09 15:20:53 UTC
++++ Makefile.bsd
@@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
diff --git a/audio/volumeicon/files/patch-src_oss__backend.c b/audio/volumeicon/files/patch-src_oss__backend.c
index f67eb62e50d2..86cf02c355ed 100644
--- a/audio/volumeicon/files/patch-src_oss__backend.c
+++ b/audio/volumeicon/files/patch-src_oss__backend.c
@@ -1,5 +1,5 @@
---- src/oss_backend.c.orig 2013-02-25 16:52:49.000000000 +0100
-+++ src/oss_backend.c 2015-03-07 20:58:26.522101000 +0100
+--- src/oss_backend.c.orig 2013-02-25 15:52:49 UTC
++++ src/oss_backend.c
@@ -22,7 +22,7 @@
//##############################################################################
diff --git a/audio/vorbis-tools/files/patch-configure b/audio/vorbis-tools/files/patch-configure
index f3ce4550ae6e..b7cade5fb297 100644
--- a/audio/vorbis-tools/files/patch-configure
+++ b/audio/vorbis-tools/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2008-03-03 06:48:08.000000000 +0100
-+++ configure 2008-03-12 19:43:37.000000000 +0100
-@@ -27301,7 +27301,7 @@
+--- configure.orig 2010-03-26 07:07:20 UTC
++++ configure
+@@ -20398,7 +20398,7 @@ if test -z "$GCC"; then
;;
*)
DEBUG="-g"
@@ -9,7 +9,7 @@
PROFILE="-g -p"
;;
esac
-@@ -27324,8 +27324,8 @@
+@@ -20421,8 +20421,8 @@ else
;;
*)
DEBUG="-g -Wall -fsigned-char"
diff --git a/audio/vorbis-tools/files/patch-ogg123_Makefile.in b/audio/vorbis-tools/files/patch-ogg123_Makefile.in
index c3c36dbe3585..282df7d6f2e1 100644
--- a/audio/vorbis-tools/files/patch-ogg123_Makefile.in
+++ b/audio/vorbis-tools/files/patch-ogg123_Makefile.in
@@ -1,11 +1,11 @@
---- ogg123/Makefile.in.orig 2008-03-03 06:47:58.000000000 +0100
-+++ ogg123/Makefile.in 2008-03-12 19:43:37.000000000 +0100
-@@ -605,7 +605,7 @@
+--- ogg123/Makefile.in.orig 2010-03-26 07:07:18 UTC
++++ ogg123/Makefile.in
+@@ -633,7 +633,7 @@ info: info-am
info-am:
-install-data-am: install-docDATA install-man
+install-data-am: install-man
- install-dvi: install-dvi-am
+ install-exec-am: install-binPROGRAMS
diff --git a/audio/vorbis-tools/files/patch-ogg123_vorbis__comments.c b/audio/vorbis-tools/files/patch-ogg123_vorbis__comments.c
new file mode 100644
index 000000000000..5ad494448ec1
--- /dev/null
+++ b/audio/vorbis-tools/files/patch-ogg123_vorbis__comments.c
@@ -0,0 +1,11 @@
+--- ogg123/vorbis_comments.c.orig 2010-01-27 04:14:11 UTC
++++ ogg123/vorbis_comments.c
+@@ -72,7 +72,7 @@ char *lookup_comment_prettyprint (char *
+
+ /* Use default formatting */
+ j = strcspn(comment, "=");
+- if (j) {
++ if (j != strlen(comment)) {
+ *offset = j + 1;
+ s = malloc(j + 2);
+ if (s == NULL) {
diff --git a/audio/vorbis-tools/files/patch-ogg123_vorbis_comments.c b/audio/vorbis-tools/files/patch-ogg123_vorbis_comments.c
deleted file mode 100644
index ebe31605a6f6..000000000000
--- a/audio/vorbis-tools/files/patch-ogg123_vorbis_comments.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ogg123/vorbis_comments.c.orig 2010-06-05 16:48:23.000000000 +0200
-+++ ogg123/vorbis_comments.c 2010-06-05 16:55:21.000000000 +0200
-@@ -72,7 +72,7 @@ char *lookup_comment_prettyprint (char *
-
- /* Use default formatting */
- j = strcspn(comment, "=");
-- if (j) {
-+ if (j != strlen(comment)) {
- *offset = j + 1;
- s = malloc(j + 2);
- if (s == NULL) {
diff --git a/audio/vorbis-tools/files/patch-oggenc_lyrics.c b/audio/vorbis-tools/files/patch-oggenc_lyrics.c
index 60a4da0a61bc..39cf6fa26b36 100644
--- a/audio/vorbis-tools/files/patch-oggenc_lyrics.c
+++ b/audio/vorbis-tools/files/patch-oggenc_lyrics.c
@@ -1,5 +1,5 @@
---- oggenc/lyrics.c.orig 2010-06-05 17:00:07.000000000 +0200
-+++ oggenc/lyrics.c 2010-06-05 17:00:17.000000000 +0200
+--- oggenc/lyrics.c.orig 2010-01-22 06:28:06 UTC
++++ oggenc/lyrics.c
@@ -16,7 +16,7 @@
#endif
diff --git a/audio/vorbisgain/files/patch-configure b/audio/vorbisgain/files/patch-configure
index 6f419dc27d70..4c835faa8b73 100644
--- a/audio/vorbisgain/files/patch-configure
+++ b/audio/vorbisgain/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Mon Oct 13 17:05:18 2003
-+++ configure Mon Oct 13 17:05:36 2003
-@@ -2450,7 +2450,7 @@
+--- configure.orig 2005-07-14 22:50:59 UTC
++++ configure
+@@ -2838,7 +2838,7 @@ if test -z "$GCC"; then
case $host in
*)
DEBUG="-g"
@@ -9,7 +9,7 @@
PROFILE="-g -p"
;;
esac
-@@ -2458,8 +2458,8 @@
+@@ -2846,8 +2846,8 @@ else
case $host in
*)
DEBUG="-g -Wall -fsigned-char"
diff --git a/audio/vsound/files/patch-configure b/audio/vsound/files/patch-configure
index 1c484788adbf..ec5be3cc28ae 100644
--- a/audio/vsound/files/patch-configure
+++ b/audio/vsound/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Tue May 31 16:40:06 2005
-+++ configure Tue May 31 16:40:28 2005
-@@ -1183,21 +1183,21 @@
+--- configure.orig 2004-07-10 18:34:52 UTC
++++ configure
+@@ -1183,21 +1183,21 @@ fi
echo "$ac_t""$CPP" 1>&6
@@ -26,7 +26,7 @@
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
-@@ -1233,7 +1233,7 @@
+@@ -1233,7 +1233,7 @@ else
ac_cv_cpu_endian_ness="unknown"
case "$target_cpu" in
@@ -35,7 +35,7 @@
ac_cv_cpu_endian_ness="little"
;;
-@@ -1941,7 +1941,7 @@
+@@ -1941,7 +1941,7 @@ if test "$dlopen_found" = no; then
fi
if test "$ac_cv_prog_gcc" = yes ; then
diff --git a/audio/vsound/files/patch-vsound.c b/audio/vsound/files/patch-vsound.c
index 317fc6fdda2b..e24a8aebd4f9 100644
--- a/audio/vsound/files/patch-vsound.c
+++ b/audio/vsound/files/patch-vsound.c
@@ -1,6 +1,6 @@
---- vsound.c.orig Sat Jul 10 23:29:33 2004
-+++ vsound.c Tue Oct 4 00:20:25 2005
-@@ -73,11 +73,11 @@
+--- vsound.c.orig 2004-07-10 21:29:33 UTC
++++ vsound.c
+@@ -73,11 +73,11 @@ typedef int request_t;
/*------------------------------------------------------------------------------
** Macros to handle big/little endian issues.
*/
@@ -14,7 +14,7 @@
#if (__BYTE_ORDER == __LITTLE_ENDIAN)
#define CPU_IS_LITTLE_ENDIAN 1
#define CPU_IS_BIG_ENDIAN 0
-@@ -210,7 +210,7 @@
+@@ -210,7 +210,7 @@ int open (const char *pathname, int flag
dsp_init () ;
va_start (args, flags) ;
diff --git a/audio/waon/files/patch-ao-wrapper.c b/audio/waon/files/patch-ao-wrapper.c
index 4b7aeb3d77f4..df981248ff40 100644
--- a/audio/waon/files/patch-ao-wrapper.c
+++ b/audio/waon/files/patch-ao-wrapper.c
@@ -1,5 +1,5 @@
---- ao-wrapper.c.orig 2010-06-06 14:28:59.000000000 +0200
-+++ ao-wrapper.c 2010-06-06 14:29:25.000000000 +0200
+--- ao-wrapper.c.orig 2007-10-14 06:19:36 UTC
++++ ao-wrapper.c
@@ -53,6 +53,7 @@ ao_init_16_stereo (int samplerate, int v
default_driver = ao_default_driver_id ();
diff --git a/audio/wavbreaker/files/patch-src_toc.c b/audio/wavbreaker/files/patch-src_toc.c
index 8fa6abfc6531..6abad40d02b2 100644
--- a/audio/wavbreaker/files/patch-src_toc.c
+++ b/audio/wavbreaker/files/patch-src_toc.c
@@ -1,5 +1,5 @@
---- src/toc.c.orig 2008-06-04 00:20:25.000000000 +0200
-+++ src/toc.c 2008-06-04 00:20:36.000000000 +0200
+--- src/toc.c.orig 2012-01-14 00:56:54 UTC
++++ src/toc.c
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/audio/wavegain/files/patch-audio.c b/audio/wavegain/files/patch-audio.c
index 4608acad3b97..a62f45ed0d3f 100644
--- a/audio/wavegain/files/patch-audio.c
+++ b/audio/wavegain/files/patch-audio.c
@@ -1,5 +1,5 @@
---- audio.c.orig 2009-02-14 06:54:45.932023788 +0800
-+++ audio.c 2009-02-14 06:55:01.958134649 +0800
+--- audio.c.orig 2016-07-26 16:16:05 UTC
++++ audio.c
@@ -32,20 +32,8 @@
#include <sys/types.h>
#include <math.h>
diff --git a/audio/wavegain/files/patch-wavegain.c b/audio/wavegain/files/patch-wavegain.c
index 40aa6807d45a..66d7515f7932 100644
--- a/audio/wavegain/files/patch-wavegain.c
+++ b/audio/wavegain/files/patch-wavegain.c
@@ -1,5 +1,5 @@
---- wavegain.c.orig 2009-02-14 07:27:18.005266616 +0800
-+++ wavegain.c 2009-02-14 07:29:15.783066588 +0800
+--- wavegain.c.orig 2016-07-26 16:16:05 UTC
++++ wavegain.c
@@ -19,20 +19,8 @@
#include <string.h>
#include <ctype.h>
@@ -31,7 +31,7 @@
extern int write_to_log;
dither_t Dither;
double doubletmp;
-@@ -639,7 +630,14 @@
+@@ -639,7 +630,14 @@ int write_gains(const char *filename, do
goto exit;
}
@@ -47,7 +47,7 @@
fprintf(stderr, " Error renaming '" TEMP_NAME "' to '%s' (uh-oh)\n", filename);
goto exit;
}
-@@ -650,4 +648,61 @@
+@@ -650,4 +648,61 @@ exit:
return result;
}
@@ -64,7 +64,7 @@
+
+ if (strcmp(oldpath, newpath) == 0)
+ return 0;
-+
+
+#ifdef __EMX__
+ if (unlink(newpath) == -1 && errno != ENOENT)
+ return -1;
@@ -106,6 +106,6 @@
+ return -1;
+ }
+ }
-
++
+ return 0;
+}
diff --git a/audio/waveplay/files/patch-waveplay.c b/audio/waveplay/files/patch-waveplay.c
index ad6188db85f6..d0e16ca6f5e3 100644
--- a/audio/waveplay/files/patch-waveplay.c
+++ b/audio/waveplay/files/patch-waveplay.c
@@ -1,24 +1,15 @@
-*** waveplay.c~ Mon Sep 24 16:38:40 2001
---- waveplay.c Thu Jun 8 00:22:50 2006
-***************
-*** 286,293 ****
- int status;
- int arg;
-
-! if ((fd = open(devname, O_WRONLY)) == -1)
- return fd;
-
- /* ¥Á¥ã¥ó¥Í¥ë(STEREO or MONAURAL)¤òÀßÄê */
- arg = (int)(pwf->nChannels);
---- 286,296 ----
- int status;
- int arg;
-
-! if ((fd = open(devname, O_WRONLY)) == -1) {
-! fprintf(stderr, "%s - ", devname);
-! perror("openDSP");
- return fd;
-+ }
-
- /* ¥Á¥ã¥ó¥Í¥ë(STEREO or MONAURAL)¤òÀßÄê */
- arg = (int)(pwf->nChannels);
+--- waveplay.c.orig 2001-09-24 07:38:40 UTC
++++ waveplay.c
+@@ -286,8 +286,11 @@ int openDSP(const char* devname, PWAVEFO
+ int status;
+ int arg;
+
+- if ((fd = open(devname, O_WRONLY)) == -1)
++ if ((fd = open(devname, O_WRONLY)) == -1) {
++ fprintf(stderr, "%s - ", devname);
++ perror("openDSP");
+ return fd;
++ }
+
+ /* ¥Á¥ã¥ó¥Í¥ë(STEREO or MONAURAL)¤òÀßÄê */
+ arg = (int)(pwf->nChannels);
diff --git a/audio/wavpack/files/patch-src__wavpack_local.h b/audio/wavpack/files/patch-src__wavpack_local.h
deleted file mode 100644
index d86d02371062..000000000000
--- a/audio/wavpack/files/patch-src__wavpack_local.h
+++ /dev/null
@@ -1,22 +0,0 @@
---- ./src/wavpack_local.h.orig 2009-12-01 04:24:50.000000000 +0000
-+++ ./src/wavpack_local.h 2012-09-12 21:12:47.161974704 +0100
-@@ -11,6 +11,10 @@
- #ifndef WAVPACK_LOCAL_H
- #define WAVPACK_LOCAL_H
-
-+#ifndef __has_builtin
-+#define __has_builtin(x) 0
-+#endif
-+
- #if defined(WIN32)
- #define FASTCALL __fastcall
- #else
-@@ -768,7 +772,7 @@
- #define _m_paddd(m1, m2) __builtin_ia32_paddd (m1, m2)
- #define _m_pcmpeqd(m1, m2) __builtin_ia32_pcmpeqd (m1, m2)
-
--#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4
-+#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4 || __has_builtin(__builtin_ia32_pslldi)
- # define _m_pslldi(m1, m2) __builtin_ia32_pslldi ((__m64)m1, m2)
- # define _m_psradi(m1, m2) __builtin_ia32_psradi ((__m64)m1, m2)
- # define _m_psrldi(m1, m2) __builtin_ia32_psrldi ((__m64)m1, m2)
diff --git a/audio/wavpack/files/patch-src_wavpack__local.h b/audio/wavpack/files/patch-src_wavpack__local.h
new file mode 100644
index 000000000000..fb3e9cb4991a
--- /dev/null
+++ b/audio/wavpack/files/patch-src_wavpack__local.h
@@ -0,0 +1,22 @@
+--- src/wavpack_local.h.orig 2009-12-01 04:24:50 UTC
++++ src/wavpack_local.h
+@@ -11,6 +11,10 @@
+ #ifndef WAVPACK_LOCAL_H
+ #define WAVPACK_LOCAL_H
+
++#ifndef __has_builtin
++#define __has_builtin(x) 0
++#endif
++
+ #if defined(WIN32)
+ #define FASTCALL __fastcall
+ #else
+@@ -768,7 +772,7 @@ typedef short __m64_16 __attribute__ ((_
+ #define _m_paddd(m1, m2) __builtin_ia32_paddd (m1, m2)
+ #define _m_pcmpeqd(m1, m2) __builtin_ia32_pcmpeqd (m1, m2)
+
+-#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4
++#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4 || __has_builtin(__builtin_ia32_pslldi)
+ # define _m_pslldi(m1, m2) __builtin_ia32_pslldi ((__m64)m1, m2)
+ # define _m_psradi(m1, m2) __builtin_ia32_psradi ((__m64)m1, m2)
+ # define _m_psrldi(m1, m2) __builtin_ia32_psrldi ((__m64)m1, m2)
diff --git a/audio/wavplay/files/patch-Makefile b/audio/wavplay/files/patch-Makefile
index 15edb22eb07d..a89de13cd8f7 100644
--- a/audio/wavplay/files/patch-Makefile
+++ b/audio/wavplay/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sat Dec 4 09:06:42 1999
-+++ Makefile Thu Jun 22 01:50:48 2000
+--- Makefile.orig 1999-12-04 00:06:42 UTC
++++ Makefile
@@ -38,7 +38,7 @@
#----------------------------------------------------------------------
# If you are running a 386 you should comment this line out.
@@ -9,7 +9,7 @@
#----------------------------------------------------------------------
# If you are experiencing troubles (like core dumps!), then uncomment
-@@ -47,7 +47,7 @@
+@@ -47,7 +47,7 @@ CPU=-m486
# adjust the STRIP option to suit compile mode:
#
#DEBUG=-g
@@ -18,7 +18,7 @@
#----------------------------------------------------------------------
# When using 'DEBUG=-g' above, then comment out the 'strip' line:
-@@ -59,7 +59,9 @@
+@@ -59,7 +59,9 @@ STRIP=strip
# This parameter indicates where the program binaries should be
# placed (wavplay, wavrec, and xltwavplay)
#
@@ -29,7 +29,7 @@
#----------------------------------------------------------------------
# Uncomment this line if you want to install the xltwavplay.res resource
-@@ -81,14 +83,14 @@
+@@ -81,14 +83,14 @@ RESDIR=/usr/X11R6/lib/X11/app-defaults
# to disable the EDITRES facility. If you're not compiling xltwavplay
# then this setting can be left asis.
#
@@ -46,7 +46,7 @@
#----------------------------------------------------------------------
# These are the non X load options (for wavplay/wavrec)
-@@ -106,7 +108,13 @@
+@@ -106,7 +108,13 @@ XLDOPTS=-L/usr/X11R6/lib/ -L/usr/local/l
# only the standard getopt() routine. When commented out, the long options like --help
# are recognized, with the help of the getopt_long() routine.
#
@@ -61,7 +61,7 @@
#----------------------------------------------------------------------
# The next option specifies the pathname that the xltwavplay X client should exec
-@@ -133,7 +141,7 @@
+@@ -133,7 +141,7 @@ PLAYPATH= -DWAVPLAYPATH=\"$(INSTDIR)/wav
# Environment variable DSPPATH will override this value at runtime, if
# present.
#
@@ -70,7 +70,7 @@
#----------------------------------------------------------------------
# Semaphore IPC Key for the Play & Record locks (Default is 0x33333333)
-@@ -163,19 +171,19 @@
+@@ -163,19 +171,19 @@ INSTALL=install
# this should be unecessary if the appropriate symlinks are
# installed).
#
@@ -95,7 +95,7 @@
CP= g++
HDRFIL= client.h server.h wavfile.h wavplay.h xltwavplay.h xmsprint.h
-@@ -189,9 +197,9 @@
+@@ -189,9 +197,9 @@ WVDMPO= wavdump.o
.c.o:
$(CC) $(CFLAGS) $(INCL) $<
@@ -107,7 +107,7 @@
# wavdump: $(WVDMPO)
# $(CP) $(WVDMPO) $(LDOPTS) $(DEBUG) -o wavdump -lRIFF
-@@ -209,18 +217,21 @@
+@@ -209,18 +217,21 @@ xltwavplay: $(CLNOBJ) xltwavplay.o
$(STRIP) xltwavplay
ls -l xltwavplay
@@ -134,7 +134,7 @@
xltwavplay_test: wavplay xltwavplay
WAVPLAYPATH=./wavplay ./xltwavplay
-@@ -234,9 +245,9 @@
+@@ -234,9 +245,9 @@ setuid_root:
@echo
install_xltwavplay: xltwavplay
diff --git a/audio/wavplay/files/patch-client.c b/audio/wavplay/files/patch-client.c
index 4985e3bdf967..2307cc352fc9 100644
--- a/audio/wavplay/files/patch-client.c
+++ b/audio/wavplay/files/patch-client.c
@@ -1,28 +1,24 @@
-*** client.c.orig Sat Jan 15 13:05:07 2000
---- client.c Sat Jan 15 13:08:42 2000
-***************
-*** 47,53 ****
---- 47,55 ----
- #include <unistd.h>
- #include <errno.h>
- #include <time.h>
-+ #ifndef FREEBSD
- #include <malloc.h>
-+ #endif
- #include <string.h>
- #include <memory.h>
- #include <signal.h>
-***************
-*** 57,63 ****
---- 59,69 ----
- #include <sys/wait.h>
- #include <sys/stat.h>
- #include <assert.h>
-+ #ifndef FREEBSD
- #include <linux/soundcard.h>
-+ #else
-+ #include <sys/soundcard.h>
-+ #endif
- #include "wavplay.h"
- #include "client.h"
-
+--- client.c.orig 1999-12-04 00:06:42 UTC
++++ client.c
+@@ -47,7 +47,9 @@ static const char rcsid[] = "@(#)client.
+ #include <unistd.h>
+ #include <errno.h>
+ #include <time.h>
++#ifndef FREEBSD
+ #include <malloc.h>
++#endif
+ #include <string.h>
+ #include <memory.h>
+ #include <signal.h>
+@@ -57,7 +59,11 @@ static const char rcsid[] = "@(#)client.
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+ #include <assert.h>
++#ifndef FREEBSD
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+ #include "wavplay.h"
+ #include "client.h"
+
diff --git a/audio/wavplay/files/patch-file.c b/audio/wavplay/files/patch-file.c
index 97163c03f663..d2b7a29f13cc 100644
--- a/audio/wavplay/files/patch-file.c
+++ b/audio/wavplay/files/patch-file.c
@@ -1,28 +1,24 @@
-*** file.c.orig Sat Jan 15 12:55:46 2000
---- file.c Sat Jan 15 13:15:38 2000
-***************
-*** 56,62 ****
---- 56,64 ----
- #include <unistd.h>
- #include <errno.h>
- #include <fcntl.h>
-+ #ifndef FREEBSD
- #include <malloc.h>
-+ #endif
- #include <string.h>
- #include <memory.h>
- #include <signal.h>
-***************
-*** 64,70 ****
---- 66,76 ----
- #include <sys/ipc.h>
- #include <sys/ioctl.h>
- #include <assert.h>
-+ #ifndef FREEBSD
- #include <linux/soundcard.h>
-+ #else
-+ #include <sys/soundcard.h>
-+ #endif
- #include "wavplay.h"
-
- extern int clntIPC; /* Needed for message passing in PlayDSP */
+--- file.c.orig 1999-12-04 00:06:42 UTC
++++ file.c
+@@ -56,7 +56,9 @@ static const char rcsid[] = "@(#)file.c
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#ifndef FREEBSD
+ #include <malloc.h>
++#endif
+ #include <string.h>
+ #include <memory.h>
+ #include <signal.h>
+@@ -64,7 +66,11 @@ static const char rcsid[] = "@(#)file.c
+ #include <sys/ipc.h>
+ #include <sys/ioctl.h>
+ #include <assert.h>
++#ifndef FREEBSD
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+ #include "wavplay.h"
+
+ extern int clntIPC; /* Needed for message passing in PlayDSP */
diff --git a/audio/wavplay/files/patch-main.c b/audio/wavplay/files/patch-main.c
index 18cb2369239e..93df7bd55165 100644
--- a/audio/wavplay/files/patch-main.c
+++ b/audio/wavplay/files/patch-main.c
@@ -1,53 +1,45 @@
-*** main.c.orig Sat Jan 15 12:51:14 2000
---- main.c Sat Jan 15 14:14:54 2000
-***************
-*** 56,62 ****
---- 56,64 ----
- #include <unistd.h>
- #include <stdarg.h>
- #include <string.h>
-+ #ifndef FREEBSD
- #include <getopt.h>
-+ #endif
- #include <fcntl.h>
- #include <sys/types.h>
- #include <sys/ipc.h>
-***************
-*** 82,88 ****
---- 84,94 ----
- else printf("Usage:\t%s [options] [files...]\n\n",cmd);
-
- puts("Options:");
-+ #ifndef FREEBSD
- printf("\t-%c\tThis info (or use --help)\n",OPF_HELP);
-+ #else
-+ printf("\t-%c\tThis info\n",OPF_HELP);
-+ #endif
- printf("\t-%c\tQuiet mode (no messages)\n",OPF_QUIET);
- printf("\t-%c rate\tSampling rate\n",OPF_SAMPRATE);
- printf("\t-%c\tDebug mode\n",OPF_DEBUG);
-***************
-*** 105,111 ****
---- 111,121 ----
- if ( opr_mode != OprRecord )
- printf("\t-%c\tDisplay info about wav file(s) only\n",OPF_INFO);
-
-+ #ifndef FREEBSD
- printf("\n\t-%c\tDisplay version and Copyright info (or use --version)\n\n",OPF_VERSION);
-+ #else
-+ printf("\n\t-%c\tDisplay version and Copyright info\n\n",OPF_VERSION);
-+ #endif
-
- puts("\nWAV parameters are normally taken from the input file(s),\n"
- "but command line options can override them if required.");
-***************
-*** 208,213 ****
---- 218,225 ----
- int rc; /* Return code */
- int fd; /* Temporary file descriptor */
- double d; /* Temporary double value */
-+ char *cp; /* Used for env var */
-+ uid_t uid;
- static char cmdopts[] = {
- OPF_INFO, OPF_HELP, OPF_QUIET, OPF_SAMPRATE,':', OPF_STEREO, OPF_MONO,
- OPF_TIME,':', OPF_DATABITS,':', OPF_IPCKEY,':', OPF_RESET,
+--- main.c.orig 1999-12-04 00:06:42 UTC
++++ main.c
+@@ -56,7 +56,9 @@ static const char rcsid[] = "@(#)main.c
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <string.h>
++#ifndef FREEBSD
+ #include <getopt.h>
++#endif
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/ipc.h>
+@@ -82,7 +84,11 @@ usage(const char *cmd,OprMode opr_mode)
+ else printf("Usage:\t%s [options] [files...]\n\n",cmd);
+
+ puts("Options:");
++#ifndef FREEBSD
+ printf("\t-%c\tThis info (or use --help)\n",OPF_HELP);
++#else
++ printf("\t-%c\tThis info\n",OPF_HELP);
++#endif
+ printf("\t-%c\tQuiet mode (no messages)\n",OPF_QUIET);
+ printf("\t-%c rate\tSampling rate\n",OPF_SAMPRATE);
+ printf("\t-%c\tDebug mode\n",OPF_DEBUG);
+@@ -105,7 +111,11 @@ usage(const char *cmd,OprMode opr_mode)
+ if ( opr_mode != OprRecord )
+ printf("\t-%c\tDisplay info about wav file(s) only\n",OPF_INFO);
+
++#ifndef FREEBSD
+ printf("\n\t-%c\tDisplay version and Copyright info (or use --version)\n\n",OPF_VERSION);
++#else
++ printf("\n\t-%c\tDisplay version and Copyright info\n\n",OPF_VERSION);
++#endif
+
+ puts("\nWAV parameters are normally taken from the input file(s),\n"
+ "but command line options can override them if required.");
+@@ -208,6 +218,8 @@ main(int argc,char **argv) {
+ int rc; /* Return code */
+ int fd; /* Temporary file descriptor */
+ double d; /* Temporary double value */
++ char *cp; /* Used for env var */
++ uid_t uid;
+ static char cmdopts[] = {
+ OPF_INFO, OPF_HELP, OPF_QUIET, OPF_SAMPRATE,':', OPF_STEREO, OPF_MONO,
+ OPF_TIME,':', OPF_DATABITS,':', OPF_IPCKEY,':', OPF_RESET,
diff --git a/audio/wavplay/files/patch-msg.c b/audio/wavplay/files/patch-msg.c
index 22167b098d98..6d8af4a35ded 100644
--- a/audio/wavplay/files/patch-msg.c
+++ b/audio/wavplay/files/patch-msg.c
@@ -1,28 +1,24 @@
-*** msg.c.orig Sat Jan 15 12:58:40 2000
---- msg.c Sat Jan 15 13:16:12 2000
-***************
-*** 47,53 ****
---- 47,55 ----
- #include <unistd.h>
- #include <errno.h>
- #include <fcntl.h>
-+ #ifndef FREEBSD
- #include <malloc.h>
-+ #endif
- #include <string.h>
- #include <memory.h>
- #include <signal.h>
-***************
-*** 56,62 ****
---- 58,68 ----
- #include <sys/msg.h>
- #include <sys/ioctl.h>
- #include <assert.h>
-+ #ifndef FREEBSD
- #include <linux/soundcard.h>
-+ #else
-+ #include <sys/soundcard.h>
-+ #endif
- #include "wavplay.h"
-
- /*
+--- msg.c.orig 1999-12-04 00:06:42 UTC
++++ msg.c
+@@ -47,7 +47,9 @@ static const char rcsid[] = "@(#)msg.c $
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#ifndef FREEBSD
+ #include <malloc.h>
++#endif
+ #include <string.h>
+ #include <memory.h>
+ #include <signal.h>
+@@ -56,7 +58,11 @@ static const char rcsid[] = "@(#)msg.c $
+ #include <sys/msg.h>
+ #include <sys/ioctl.h>
+ #include <assert.h>
++#ifndef FREEBSD
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+ #include "wavplay.h"
+
+ /*
diff --git a/audio/wavplay/files/patch-recplay.c b/audio/wavplay/files/patch-recplay.c
index 6cb5bd7940a3..76c981ad01e8 100644
--- a/audio/wavplay/files/patch-recplay.c
+++ b/audio/wavplay/files/patch-recplay.c
@@ -1,6 +1,6 @@
---- recplay.c.orig Sat Dec 4 09:06:42 1999
-+++ recplay.c Sun Dec 11 12:56:34 2005
-@@ -52,12 +52,18 @@
+--- recplay.c.orig 1999-12-04 00:06:42 UTC
++++ recplay.c
+@@ -52,12 +52,18 @@ static const char rcsid[] = "@(#)recplay
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
@@ -19,7 +19,7 @@
#include "wavplay.h"
#include "server.h"
-@@ -184,7 +190,7 @@
+@@ -184,7 +190,7 @@ wavrecd(WavPlayOpts *wavopts,char *Pathn
wfile = svr.wfile; /* And the file is already opened */
}
diff --git a/audio/wavplay/files/patch-server.c b/audio/wavplay/files/patch-server.c
index bb362f08f92e..710fffcb8468 100644
--- a/audio/wavplay/files/patch-server.c
+++ b/audio/wavplay/files/patch-server.c
@@ -1,28 +1,24 @@
-*** server.c.orig Sat Jan 15 12:59:19 2000
---- server.c Sat Jan 15 13:17:07 2000
-***************
-*** 65,71 ****
---- 65,73 ----
- #include <unistd.h>
- #include <errno.h>
- #include <fcntl.h>
-+ #ifndef FREEBSD
- #include <malloc.h>
-+ #endif
- #include <string.h>
- #include <memory.h>
- #include <signal.h>
-***************
-*** 79,85 ****
---- 81,91 ----
- #ifdef SCHED_PRIORITY
- #include <sched.h>
- #endif
-+ #ifndef FREEBSD
- #include <linux/soundcard.h>
-+ #else
-+ #include <sys/soundcard.h>
-+ #endif
- #include "wavplay.h"
- #include "server.h"
-
+--- server.c.orig 1999-12-04 00:06:42 UTC
++++ server.c
+@@ -65,7 +65,9 @@ static const char rcsid[] = "@(#)server.
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#ifndef FREEBSD
+ #include <malloc.h>
++#endif
+ #include <string.h>
+ #include <memory.h>
+ #include <signal.h>
+@@ -79,7 +81,11 @@ static const char rcsid[] = "@(#)server.
+ #ifdef SCHED_PRIORITY
+ #include <sched.h>
+ #endif
++#ifndef FREEBSD
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+ #include "wavplay.h"
+ #include "server.h"
+
diff --git a/audio/wavplay/files/patch-wavplay.h b/audio/wavplay/files/patch-wavplay.h
index ac3a9dd7ac08..ab4b0cd8f815 100644
--- a/audio/wavplay/files/patch-wavplay.h
+++ b/audio/wavplay/files/patch-wavplay.h
@@ -1,6 +1,6 @@
---- wavplay.h.orig Thu Aug 5 17:24:45 2004
-+++ wavplay.h Thu Aug 5 17:24:49 2004
-@@ -500,7 +500,7 @@
+--- wavplay.h.orig 1999-12-04 00:06:42 UTC
++++ wavplay.h
+@@ -500,7 +500,7 @@ extern int LockDSP(int ipc,int playrecx,
extern int UnlockDSP(int ipc,int playrecx,ErrFunc erf);
extern WAVFILE *WavOpenForRead(const char *Pathname,ErrFunc erf);
diff --git a/audio/wavplay/files/patch-xltwavplay.c b/audio/wavplay/files/patch-xltwavplay.c
index a9f6e89a470e..0e87c505e646 100644
--- a/audio/wavplay/files/patch-xltwavplay.c
+++ b/audio/wavplay/files/patch-xltwavplay.c
@@ -1,14 +1,12 @@
-*** xltwavplay.c.orig Sat Jan 15 13:12:38 2000
---- xltwavplay.c Sat Jan 15 13:13:02 2000
-***************
-*** 59,65 ****
---- 59,67 ----
- #include <time.h>
- #include <signal.h>
- #include <string.h>
-+ #ifndef FREEBSD
- #include <getopt.h>
-+ #endif
- #include <errno.h>
- #include <sys/types.h>
- #include <sys/ipc.h>
+--- xltwavplay.c.orig 1999-12-04 00:06:42 UTC
++++ xltwavplay.c
+@@ -59,7 +59,9 @@
+ #include <time.h>
+ #include <signal.h>
+ #include <string.h>
++#ifndef FREEBSD
+ #include <getopt.h>
++#endif
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/ipc.h>
diff --git a/audio/whysynth/files/patch-src-Makefile.in b/audio/whysynth/files/patch-src-Makefile.in
deleted file mode 100644
index 9905f30a23ee..000000000000
--- a/audio/whysynth/files/patch-src-Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/Makefile.in.orig Thu Apr 19 06:26:21 2007
-+++ src/Makefile.in Fri Apr 20 23:54:26 2007
-@@ -257,7 +257,7 @@
-
- WhySynth_gtk_CFLAGS = -DY_GUI @GTK_CFLAGS@ $(AM_CFLAGS) $(GUI_CFLAGS)
- @DARWIN_FALSE@WhySynth_gtk_LDADD = -lm @GTK_LIBS@ $(AM_LDFLAGS) $(GUI_LIBS)
--@DARWIN_TRUE@WhySynth_gtk_LDADD = -lm -lmx @GTK_LIBS@ $(AM_LDFLAGS) $(GUI_LIBS)
-+@DARWIN_TRUE@WhySynth_gtk_LDADD = -lm @GTK_LIBS@ $(AM_LDFLAGS) $(GUI_LIBS)
- whysynth_la_SOURCES = \
- dssp_synth.c \
- dssp_synth.h \
-@@ -294,7 +294,7 @@
-
- whysynth_la_CFLAGS = -DY_PLUGIN $(AM_CFLAGS) $(PLUGIN_CFLAGS)
- @DARWIN_FALSE@whysynth_la_LIBADD = -lm $(PLUGIN_LIBS)
--@DARWIN_TRUE@whysynth_la_LIBADD = -lm -lmx $(PLUGIN_LIBS)
-+@DARWIN_TRUE@whysynth_la_LIBADD = -lm $(PLUGIN_LIBS)
- whysynth_la_LDFLAGS = -module -avoid-version
- all: all-am
-
diff --git a/audio/whysynth/files/patch-src_Makefile.in b/audio/whysynth/files/patch-src_Makefile.in
new file mode 100644
index 000000000000..66afc7505be9
--- /dev/null
+++ b/audio/whysynth/files/patch-src_Makefile.in
@@ -0,0 +1,20 @@
+--- src/Makefile.in.orig 2012-09-04 14:48:34 UTC
++++ src/Makefile.in
+@@ -280,7 +280,7 @@ WhySynth_gtk_SOURCES = \
+
+ WhySynth_gtk_CFLAGS = -DY_GUI @GTK_CFLAGS@ $(AM_CFLAGS) $(GUI_CFLAGS)
+ @DARWIN_FALSE@WhySynth_gtk_LDADD = -lm @GTK_LIBS@ $(AM_LDFLAGS) $(GUI_LIBS)
+-@DARWIN_TRUE@WhySynth_gtk_LDADD = -lm -lmx @GTK_LIBS@ $(AM_LDFLAGS) $(GUI_LIBS)
++@DARWIN_TRUE@WhySynth_gtk_LDADD = -lm @GTK_LIBS@ $(AM_LDFLAGS) $(GUI_LIBS)
+ whysynth_la_SOURCES = \
+ dssp_synth.c \
+ dssp_synth.h \
+@@ -319,7 +319,7 @@ whysynth_la_SOURCES = \
+ @DARWIN_FALSE@whysynth_la_CFLAGS = -DY_PLUGIN $(AM_CFLAGS) $(PLUGIN_CFLAGS)
+ @DARWIN_TRUE@whysynth_la_CFLAGS = -DY_PLUGIN $(AM_CFLAGS) $(PLUGIN_CFLAGS) -DY_BOGUS_MLOCKALL
+ @DARWIN_FALSE@whysynth_la_LIBADD = -lm $(PLUGIN_LIBS)
+-@DARWIN_TRUE@whysynth_la_LIBADD = -lm -lmx $(PLUGIN_LIBS)
++@DARWIN_TRUE@whysynth_la_LIBADD = -lm $(PLUGIN_LIBS)
+ whysynth_la_LDFLAGS = -module -avoid-version
+ all: all-am
+
diff --git a/audio/wmix/files/patch-mixer-oss.c b/audio/wmix/files/patch-mixer-oss.c
index 2046872c80f0..4d0cfe8a8340 100644
--- a/audio/wmix/files/patch-mixer-oss.c
+++ b/audio/wmix/files/patch-mixer-oss.c
@@ -1,6 +1,6 @@
---- mixer-oss.c.orig Wed Jul 14 18:00:14 2004
-+++ mixer-oss.c Wed Jul 14 17:58:50 2004
-@@ -94,7 +94,9 @@
+--- mixer-oss.c.orig 2004-05-13 00:27:04 UTC
++++ mixer-oss.c
+@@ -94,7 +94,9 @@ static int prev_modify_counter = -1;
static bool get_mixer_state(void)
{
@@ -10,7 +10,7 @@
int dev_lr_volume, dev_left_volume, dev_right_volume;
float left, right;
int srcmask;
-@@ -103,14 +105,16 @@
+@@ -103,14 +105,16 @@ static bool get_mixer_state(void)
/* to really keep track of updates */
static MixerChannel oldmixer[SOUND_MIXER_NRDEVICES];
@@ -28,7 +28,7 @@
/* Mixer state was changed by another program, so we need
* to update. As OSS cannot tell us specifically which
* channels changed, we read all of them in.
-@@ -157,7 +161,7 @@
+@@ -157,7 +161,7 @@ static bool get_mixer_state(void)
}
mixer[ch].is_recording = ((1 << mixer[ch].dev) & srcmask) != 0;
}
@@ -37,7 +37,7 @@
/* check if this was due to OSS stupidity or if we really changed */
if (!memcmp(&mixer, &oldmixer, sizeof(mixer))) {
memcpy(&oldmixer, &mixer, sizeof(mixer));
-@@ -224,7 +228,9 @@
+@@ -224,7 +228,9 @@ static void set_record_state(void)
void mixer_init(const char *mixer_device, bool verbose, const char * exclude[])
{
int devmask, srcmask, recmask, stmask;
@@ -47,7 +47,7 @@
int count;
int mask;
-@@ -256,15 +262,19 @@
+@@ -256,15 +262,19 @@ void mixer_init(const char *mixer_device
exit(EXIT_FAILURE);
}
diff --git a/audio/wmix/files/patch-wmix.c b/audio/wmix/files/patch-wmix.c
index 9483511f3894..293ce9b78ac1 100644
--- a/audio/wmix/files/patch-wmix.c
+++ b/audio/wmix/files/patch-wmix.c
@@ -1,5 +1,5 @@
---- wmix.c.orig Wed Jul 14 18:15:17 2004
-+++ wmix.c Wed Jul 14 18:15:26 2004
+--- wmix.c.orig 2004-05-13 00:30:53 UTC
++++ wmix.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <signal.h>
@@ -8,7 +8,7 @@
#include <unistd.h>
#include <X11/X.h>
-@@ -134,7 +133,7 @@
+@@ -134,7 +133,7 @@ int main(int argc, char **argv)
}
/* handle writing PID file, silently ignore if we can't do it */
diff --git a/audio/wmrecord/files/patch-wmrecord.c b/audio/wmrecord/files/patch-wmrecord.c
index 4a8640d4c422..b0aa6937cf81 100644
--- a/audio/wmrecord/files/patch-wmrecord.c
+++ b/audio/wmrecord/files/patch-wmrecord.c
@@ -1,30 +1,26 @@
-*** wmrecord.c.orig Mon Apr 2 03:48:28 2001
---- wmrecord.c Mon Apr 2 03:49:58 2001
-***************
-*** 320,326 ****
---- 320,330 ----
- sprintf(q, "%s%s%02d.wav",pd->pw_dir, BASEFILE, tracknum);
- /* Open the source file, where the recording has been stored. */
- p = (char *)malloc(sizeof(char)*4);
-+ #ifdef __FreeBSD__
-+ if ((fd=open(q, O_RDONLY))==-1)
-+ #else
- if ((fd=open(q, O_RDONLY|O_SYNC))==-1)
-+ #endif
- sprintf(p, "000");
- else {
- datalen = wmGetWavSettings(fd);
-***************
-*** 755,761 ****
---- 759,769 ----
- pw = getpwuid(uid);
- fres=(char *)malloc(sizeof(char)*(strlen(pw->pw_dir)+strlen(BASEFILE)+7));
- sprintf(fres, "%s%s%02d.wav",pw->pw_dir, BASEFILE, tracknum);
-+ #ifdef __FreeBSD__
-+ if ((fd=open(fres,O_RDONLY))==-1) {
-+ #else
- if ((fd=open(fres,O_RDONLY|O_SYNC))==-1) {
-+ #endif
- fprintf(stderr, "WMRECORD: Could not open source file.\n");
- free(fres);
- copyXPMArea (btn[2].x, btn[2].y, btn[2].w, btn[2].h,
+--- wmrecord.c.orig 1999-10-04 13:39:52 UTC
++++ wmrecord.c
+@@ -320,7 +320,11 @@ void wmSetTrackNum(int inc) {
+ sprintf(q, "%s%s%02d.wav",pd->pw_dir, BASEFILE, tracknum);
+ /* Open the source file, where the recording has been stored. */
+ p = (char *)malloc(sizeof(char)*4);
++#ifdef __FreeBSD__
++ if ((fd=open(q, O_RDONLY))==-1)
++#else
+ if ((fd=open(q, O_RDONLY|O_SYNC))==-1)
++#endif
+ sprintf(p, "000");
+ else {
+ datalen = wmGetWavSettings(fd);
+@@ -755,7 +759,11 @@ void wmPlay() {
+ pw = getpwuid(uid);
+ fres=(char *)malloc(sizeof(char)*(strlen(pw->pw_dir)+strlen(BASEFILE)+7));
+ sprintf(fres, "%s%s%02d.wav",pw->pw_dir, BASEFILE, tracknum);
++#ifdef __FreeBSD__
++ if ((fd=open(fres,O_RDONLY))==-1) {
++#else
+ if ((fd=open(fres,O_RDONLY|O_SYNC))==-1) {
++#endif
+ fprintf(stderr, "WMRECORD: Could not open source file.\n");
+ free(fres);
+ copyXPMArea (btn[2].x, btn[2].y, btn[2].w, btn[2].h,
diff --git a/audio/wmsmixer/files/patch-Imakefile b/audio/wmsmixer/files/patch-Imakefile
index 25b97fbf9b44..5f9b582ac665 100644
--- a/audio/wmsmixer/files/patch-Imakefile
+++ b/audio/wmsmixer/files/patch-Imakefile
@@ -1,13 +1,8 @@
-*** Imakefile.orig Mon Apr 2 03:17:43 2001
---- Imakefile Mon Apr 2 03:17:51 2001
-***************
-*** 10,13 ****
- SRCS = wmsmixer.cc
- OBJS = wmsmixer.o
-
-! ComplexProgramTarget(wmsmixer)
---- 10,13 ----
- SRCS = wmsmixer.cc
- OBJS = wmsmixer.o
-
-! ComplexProgramTargetNoMan(wmsmixer)
+--- Imakefile.orig 2003-04-12 22:08:16 UTC
++++ Imakefile
+@@ -12,4 +12,4 @@ LD = c++ -m32 -nostdlib
+ SRCS = wmsmixer.cc
+ OBJS = wmsmixer.o
+
+-ComplexProgramTarget(wmsmixer)
++ComplexProgramTargetNoMan(wmsmixer)
diff --git a/audio/wmsmixer/files/patch-mixctl.h b/audio/wmsmixer/files/patch-mixctl.h
index bab9c9cac82c..9a27cf4c6dce 100644
--- a/audio/wmsmixer/files/patch-mixctl.h
+++ b/audio/wmsmixer/files/patch-mixctl.h
@@ -1,5 +1,5 @@
---- mixctl.h.orig Tue Mar 6 07:39:43 2001
-+++ mixctl.h Thu Apr 25 21:19:40 2002
+--- mixctl.h.orig 2001-03-02 10:32:05 UTC
++++ mixctl.h
@@ -19,7 +19,7 @@
#include <soundcard.h>
#endif
diff --git a/audio/wmsmixer/files/patch-wmsmixer.cc b/audio/wmsmixer/files/patch-wmsmixer.cc
index 56125c68a1a6..dc388a529c67 100644
--- a/audio/wmsmixer/files/patch-wmsmixer.cc
+++ b/audio/wmsmixer/files/patch-wmsmixer.cc
@@ -1,6 +1,6 @@
---- wmsmixer.cc.orig Tue Mar 6 07:39:43 2001
-+++ wmsmixer.cc Sat Nov 16 14:22:26 2002
-@@ -547,7 +547,7 @@
+--- wmsmixer.cc.orig 2003-04-12 22:08:58 UTC
++++ wmsmixer.cc
+@@ -547,7 +547,7 @@ void readFile()
}
}
diff --git a/audio/workman/files/patch-Imakefile b/audio/workman/files/patch-Imakefile
index f661990904cb..2afc538c4ed3 100644
--- a/audio/workman/files/patch-Imakefile
+++ b/audio/workman/files/patch-Imakefile
@@ -1,5 +1,5 @@
---- Imakefile.orig Fri Feb 27 10:08:37 2004
-+++ Imakefile Fri Feb 27 10:09:01 2004
+--- Imakefile.orig 1995-06-05 00:10:44 UTC
++++ Imakefile
@@ -1,19 +1,19 @@
-/**/# @(#)Imakefile 1.16 04 Jun 1995
+# @(#)Imakefile 1.16 04 Jun 1995
diff --git a/audio/workman/files/patch-cdrom.c b/audio/workman/files/patch-cdrom.c
index 2b6e63f2cddf..801b462b5988 100644
--- a/audio/workman/files/patch-cdrom.c
+++ b/audio/workman/files/patch-cdrom.c
@@ -1,6 +1,6 @@
---- cdrom.c.orig 1997-06-15 10:05:03.000000000 +0200
-+++ cdrom.c 2013-10-16 13:14:49.440566031 +0200
-@@ -531,7 +531,7 @@
+--- cdrom.c.orig 1997-06-15 08:05:03 UTC
++++ cdrom.c
+@@ -531,7 +531,7 @@ find_trkind(track, index, start)
int top = 0, bottom, current, interval, ret = 0, i;
if (cur_cdmode == EJECTED || cd == NULL)
diff --git a/audio/workman/files/patch-plat__freebsd.c b/audio/workman/files/patch-plat__freebsd.c
new file mode 100644
index 000000000000..8c90722618d0
--- /dev/null
+++ b/audio/workman/files/patch-plat__freebsd.c
@@ -0,0 +1,69 @@
+--- plat_freebsd.c.orig 1995-02-20 17:29:55 UTC
++++ plat_freebsd.c
+@@ -5,6 +5,9 @@
+ *
+ * Todd Pfaff, 3/20/94
+ *
++ * 11/26/95: Modified to work under FreeBSD 2.x
++ * by Donald Burr <d_burr@ix.netcom.com>
++ *
+ */
+ static char *ident = "@(#)plat_freebsd.c 1.2 2/20/95";
+
+@@ -22,21 +25,17 @@ static char *ident = "@(#)plat_freebsd.c
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/cdio.h>
+-#include <sys/scsiio.h>
+ #ifdef __NetBSD__
+ #define MSF_MINUTES 1
+ #define MSF_SECONDS 2
+ #define MSF_FRAMES 3
+ #include "/sys/scsi/scsi_all.h"
+ #include "/sys/scsi/scsi_cd.h"
+-#else
+-#include <scsi/scsi_all.h>
+-#include <scsi/scsi_cd.h>
+ #endif
+
+ #include "struct.h"
+
+-#define DEFAULT_CD_DEVICE "/dev/rcd0d"
++#define DEFAULT_CD_DEVICE "/dev/rcd0c"
+
+ void *malloc();
+
+@@ -163,7 +162,7 @@ gen_get_drive_status(d, oldmode, mode, p
+ }
+
+ if (ioctl(d->fd, CDIOCREADSUBCHANNEL, &sc)) {
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ /* we need to release the device so the kernel will notice
+ reloaded media */
+ (void) close(d->fd);
+@@ -261,6 +260,9 @@ gen_set_volume(d, left, right)
+
+ bzero((char *)&vol, sizeof(vol));
+
++#define LEFT_PORT 0
++#define RIGHT_PORT 1
++
+ vol.vol[LEFT_PORT] = left;
+ vol.vol[RIGHT_PORT] = right;
+
+@@ -345,12 +347,12 @@ gen_eject(d)
+ if (fstatfs(stbuf.st_rdev, &buf) == 0)
+ return (-3);
+
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ rval = ioctl(d->fd, CDIOCALLOW);
+ if (rval == 0)
+ #endif
+ rval = ioctl(d->fd, CDIOCEJECT);
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ if (rval == 0)
+ rval = ioctl(d->fd, CDIOCPREVENT);
+ #endif
diff --git a/audio/workman/files/patch-plat_freebsd.c b/audio/workman/files/patch-plat_freebsd.c
deleted file mode 100644
index f73fb3a8cd5b..000000000000
--- a/audio/workman/files/patch-plat_freebsd.c
+++ /dev/null
@@ -1,69 +0,0 @@
---- plat_freebsd.c.orig Mon Feb 20 17:29:55 1995
-+++ plat_freebsd.c Tue Oct 13 03:24:22 1998
-@@ -5,6 +5,9 @@
- *
- * Todd Pfaff, 3/20/94
- *
-+ * 11/26/95: Modified to work under FreeBSD 2.x
-+ * by Donald Burr <d_burr@ix.netcom.com>
-+ *
- */
- static char *ident = "@(#)plat_freebsd.c 1.2 2/20/95";
-
-@@ -22,21 +25,17 @@
- #include <string.h>
- #include <sys/ioctl.h>
- #include <sys/cdio.h>
--#include <sys/scsiio.h>
- #ifdef __NetBSD__
- #define MSF_MINUTES 1
- #define MSF_SECONDS 2
- #define MSF_FRAMES 3
- #include "/sys/scsi/scsi_all.h"
- #include "/sys/scsi/scsi_cd.h"
--#else
--#include <scsi/scsi_all.h>
--#include <scsi/scsi_cd.h>
- #endif
-
- #include "struct.h"
-
--#define DEFAULT_CD_DEVICE "/dev/rcd0d"
-+#define DEFAULT_CD_DEVICE "/dev/rcd0c"
-
- void *malloc();
-
-@@ -163,7 +162,7 @@
- }
-
- if (ioctl(d->fd, CDIOCREADSUBCHANNEL, &sc)) {
--#ifdef __NetBSD__
-+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
- /* we need to release the device so the kernel will notice
- reloaded media */
- (void) close(d->fd);
-@@ -261,6 +260,9 @@
-
- bzero((char *)&vol, sizeof(vol));
-
-+#define LEFT_PORT 0
-+#define RIGHT_PORT 1
-+
- vol.vol[LEFT_PORT] = left;
- vol.vol[RIGHT_PORT] = right;
-
-@@ -345,12 +347,12 @@
- if (fstatfs(stbuf.st_rdev, &buf) == 0)
- return (-3);
-
--#ifdef __NetBSD__
-+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
- rval = ioctl(d->fd, CDIOCALLOW);
- if (rval == 0)
- #endif
- rval = ioctl(d->fd, CDIOCEJECT);
--#ifdef __NetBSD__
-+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
- if (rval == 0)
- rval = ioctl(d->fd, CDIOCPREVENT);
- #endif
diff --git a/audio/workman/files/patch-workman.man b/audio/workman/files/patch-workman.man
index 8bb81d7d0730..7df3be83c1a9 100644
--- a/audio/workman/files/patch-workman.man
+++ b/audio/workman/files/patch-workman.man
@@ -1,48 +1,34 @@
-diff -c --recursive ./workman.man ../workman.new/./workman.man
-*** ./workman.man Thu Jun 15 23:52:13 1995
---- ../workman.new/./workman.man Sun Nov 26 03:28:54 1995
-***************
-*** 151,157 ****
- .TP
- .I \-p file
- Write the program's process ID to a different \fIfile\fP. By default, the
-! PID is written to "/tmp/.wm_pid" to allow signals to be sent more easily
- (see the SIGNALS section below.)
- .TP
- .I \-n
---- 151,157 ----
- .TP
- .I \-p file
- Write the program's process ID to a different \fIfile\fP. By default, the
-! PID is written to "/var/run/workman.pid" to allow signals to be sent more easily
- (see the SIGNALS section below.)
- .TP
- .I \-n
-***************
-*** 510,515 ****
---- 510,516 ----
- SVR4 port by Baruch Cochavy <bcochavy@iil.intel.com>.
- .LP
- FreeBSD port by Todd Pfaff <todd@flex.eng.mcmaster.ca>.
-+ Modified to work under FreeBSD 2.x by Donald Burr <d_burr@ix.netcom.com>.
- .LP
- OSF/1 port by R.J. Edwards <rje@escact.ksc.nasa.gov>.
- .LP
-diff -c --recursive ./workman_stubs.c ../workman.new/./workman_stubs.c
-*** ./workman_stubs.c Fri Jun 16 10:44:40 1995
---- ../workman.new/./workman_stubs.c Sun Nov 26 03:26:57 1995
-***************
-*** 56,62 ****
---- 56,67 ----
- Panel_item quitbutton;
- char *getenv(), *WMstrdup();
-
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ /* FreeBSD has a special directory for pidfiles, I guess. */
-+ char *pidfile = "/var/run/workman.pid";
-+ #else
- char *pidfile = "/tmp/.wm_pid";
-+ #endif
- char * empty = "";
- extern char *cd_device;
-
+--- workman.man.orig 1995-06-16 06:52:13 UTC
++++ workman.man
+@@ -151,7 +151,7 @@ Exit automatically when the CD is ejecte
+ .TP
+ .I \-p file
+ Write the program's process ID to a different \fIfile\fP. By default, the
+-PID is written to "/tmp/.wm_pid" to allow signals to be sent more easily
++PID is written to "/var/run/workman.pid" to allow signals to be sent more easily
+ (see the SIGNALS section below.)
+ .TP
+ .I \-n
+@@ -510,6 +510,7 @@ BSD/386 port by John T. Kohl <jtk@kolvir
+ SVR4 port by Baruch Cochavy <bcochavy@iil.intel.com>.
+ .LP
+ FreeBSD port by Todd Pfaff <todd@flex.eng.mcmaster.ca>.
++Modified to work under FreeBSD 2.x by Donald Burr <d_burr@ix.netcom.com>.
+ .LP
+ OSF/1 port by R.J. Edwards <rje@escact.ksc.nasa.gov>.
+ .LP
+--- workman_stubs.c.orig 1997-06-11 18:14:01 UTC
++++ workman_stubs.c
+@@ -58,7 +58,12 @@ void show_cdinfo(),
+ Panel_item quitbutton;
+ char *getenv(), *WMstrdup();
+
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++/* FreeBSD has a special directory for pidfiles, I guess. */
++char *pidfile = "/var/run/workman.pid";
++#else
+ char *pidfile = "/tmp/.wm_pid";
++#endif
+ char * empty = "";
+ extern char *cd_device;
+
diff --git a/audio/workman/files/patch-workman__stubs.c b/audio/workman/files/patch-workman__stubs.c
new file mode 100644
index 000000000000..7eb2a475dcf8
--- /dev/null
+++ b/audio/workman/files/patch-workman__stubs.c
@@ -0,0 +1,12 @@
+--- workman_stubs.c.orig 1997-06-11 18:14:01 UTC
++++ workman_stubs.c
+@@ -158,6 +158,9 @@ main(argc, argv)
+ "Workman.Db.Shared", dbfiles);
+ if (dbfiles)
+ dbfiles = WMstrdup(dbfiles);
++ name = getenv("MUSIC_CD");
++ if (name)
++ cd_device = name;
+
+ reverse_threshold = defaults_get_integer("workman.reverseThreshold",
+ "Workman.ReverseThreshold", reverse_threshold);
diff --git a/audio/workman/files/patch-workman_stubs.c b/audio/workman/files/patch-workman_stubs.c
deleted file mode 100644
index e09eb38a8fa7..000000000000
--- a/audio/workman/files/patch-workman_stubs.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- workman_stubs.c.orig Sat Feb 14 08:47:37 1998
-+++ workman_stubs.c Sat Feb 14 08:50:16 1998
-@@ -163,6 +163,9 @@
- "Workman.Db.Shared", dbfiles);
- if (dbfiles)
- dbfiles = WMstrdup(dbfiles);
-+ name = getenv("MUSIC_CD");
-+ if (name)
-+ cd_device = name;
-
- reverse_threshold = defaults_get_integer("workman.reverseThreshold",
- "Workman.ReverseThreshold", reverse_threshold);
diff --git a/audio/xanalyser/files/patch-src-pcm-wav.cc b/audio/xanalyser/files/patch-src-pcm-wav.cc
deleted file mode 100644
index eef8cc9c2c91..000000000000
--- a/audio/xanalyser/files/patch-src-pcm-wav.cc
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/pcm-wav.cc.orig Mon Apr 16 17:30:40 2007
-+++ src/pcm-wav.cc Mon Apr 16 17:31:31 2007
-@@ -14,6 +14,16 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <iostream>
-+#ifdef __NetBSD__
-+# include <machine/byte_swap.h>
-+#elif __FreeBSD__
-+# include <sys/endian.h>
-+# define __BYTE_ORDER _BYTE_ORDER
-+# define __LITTLE_ENDIAN _LITTLE_ENDIAN
-+# define __BIG_ENDIAN _BIG_ENDIAN
-+#else
-+# include <byteswap.h>
-+#endif
-
- using std::cerr;
-
diff --git a/audio/xanalyser/files/patch-src_Makefile.in b/audio/xanalyser/files/patch-src_Makefile.in
index 95f147b5bc54..aa80d44e7e1b 100644
--- a/audio/xanalyser/files/patch-src_Makefile.in
+++ b/audio/xanalyser/files/patch-src_Makefile.in
@@ -1,6 +1,6 @@
---- src/Makefile.in.orig 2008-12-06 06:52:34.000000000 -0500
-+++ src/Makefile.in 2013-12-30 15:17:23.000000000 -0500
-@@ -194,7 +194,8 @@
+--- src/Makefile.in.orig 2008-12-06 11:52:34 UTC
++++ src/Makefile.in
+@@ -194,7 +194,8 @@ xanalyser_SOURCES = \
utils.cc utils.h \
Trans.h
@@ -10,7 +10,7 @@
$(FFTWLDADD) $(ALSALDADD)
EXTRA_DIST = XAnalyser.ad help.txt *.xpm
-@@ -474,8 +475,8 @@
+@@ -474,8 +475,8 @@ help.txt.h: help.txt
txt2c help.txt > help.txt.h
install-data-hook:
diff --git a/audio/xanalyser/files/patch-src_pcm-cdr.cc b/audio/xanalyser/files/patch-src_pcm-cdr.cc
index 2b35b1048fb5..85355bd735c4 100644
--- a/audio/xanalyser/files/patch-src_pcm-cdr.cc
+++ b/audio/xanalyser/files/patch-src_pcm-cdr.cc
@@ -1,5 +1,5 @@
---- src/pcm-cdr.cc.orig Mon Apr 16 17:23:03 2007
-+++ src/pcm-cdr.cc Mon Apr 16 17:25:16 2007
+--- src/pcm-cdr.cc.orig 2007-03-15 18:22:14 UTC
++++ src/pcm-cdr.cc
@@ -14,6 +14,16 @@
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/audio/xanalyser/files/patch-src_pcm-wav.cc b/audio/xanalyser/files/patch-src_pcm-wav.cc
new file mode 100644
index 000000000000..7992d849d6dd
--- /dev/null
+++ b/audio/xanalyser/files/patch-src_pcm-wav.cc
@@ -0,0 +1,19 @@
+--- src/pcm-wav.cc.orig 2007-03-15 18:23:10 UTC
++++ src/pcm-wav.cc
+@@ -14,6 +14,16 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <iostream>
++#ifdef __NetBSD__
++# include <machine/byte_swap.h>
++#elif __FreeBSD__
++# include <sys/endian.h>
++# define __BYTE_ORDER _BYTE_ORDER
++# define __LITTLE_ENDIAN _LITTLE_ENDIAN
++# define __BIG_ENDIAN _BIG_ENDIAN
++#else
++# include <byteswap.h>
++#endif
+
+ using std::cerr;
+
diff --git a/audio/xanalyser/files/patch-src_pcm.cc b/audio/xanalyser/files/patch-src_pcm.cc
index d9d1310da56b..88045b213b7c 100644
--- a/audio/xanalyser/files/patch-src_pcm.cc
+++ b/audio/xanalyser/files/patch-src_pcm.cc
@@ -1,5 +1,5 @@
---- src/pcm.cc.orig Mon Apr 16 17:16:58 2007
-+++ src/pcm.cc Mon Apr 16 17:26:52 2007
+--- src/pcm.cc.orig 2007-03-15 18:22:14 UTC
++++ src/pcm.cc
@@ -11,6 +11,9 @@
# include <machine/byte_swap.h>
#elif __FreeBSD__
diff --git a/audio/xanalyser/files/patch-xanalyser.spec.in b/audio/xanalyser/files/patch-xanalyser.spec.in
index 081e4ddaba60..9a70d02674ec 100644
--- a/audio/xanalyser/files/patch-xanalyser.spec.in
+++ b/audio/xanalyser/files/patch-xanalyser.spec.in
@@ -1,6 +1,6 @@
---- xanalyser.spec.in.orig 2008-12-06 06:50:02.000000000 -0500
-+++ xanalyser.spec.in 2010-05-25 13:16:27.000000000 -0400
-@@ -47,6 +47,6 @@
+--- xanalyser.spec.in.orig 2008-12-06 11:50:02 UTC
++++ xanalyser.spec.in
+@@ -47,6 +47,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr (-, root, root)
/usr/bin/xanalyser
%doc %{_mandir}/man1/xanalyser.1.gz
diff --git a/audio/xcd/files/patch-Makefile b/audio/xcd/files/patch-Makefile
index 4ac12910accf..6be4d8284533 100644
--- a/audio/xcd/files/patch-Makefile
+++ b/audio/xcd/files/patch-Makefile
@@ -1,5 +1,5 @@
---- ./Makefile.orig 1998-10-26 22:14:26.000000000 -0200
-+++ ./Makefile 2013-12-07 16:02:51.000000000 -0200
+--- Makefile.orig 1998-10-27 00:14:26 UTC
++++ Makefile
@@ -1,6 +1,6 @@
-BINDIR = /usr/local/bin
-CDDIR = /usr/local/lib/xcd
@@ -10,7 +10,7 @@
all: cdplayer xcd
xcd: xcd.in
-@@ -8,20 +8,20 @@
+@@ -8,20 +8,20 @@ xcd: xcd.in
< xcd.in > $@
chmod ugo+x xcd
cdplayer: cdplayer.cc
diff --git a/audio/xcd/files/patch-cdplayer.cc b/audio/xcd/files/patch-cdplayer.cc
index ec0923112126..bc296ffac9b4 100644
--- a/audio/xcd/files/patch-cdplayer.cc
+++ b/audio/xcd/files/patch-cdplayer.cc
@@ -1,6 +1,6 @@
---- cdplayer.cc.orig Sat Nov 27 16:20:49 1999
-+++ cdplayer.cc Sat Nov 27 16:24:02 1999
-@@ -29,7 +29,7 @@
+--- cdplayer.cc.orig 1999-02-02 23:28:24 UTC
++++ cdplayer.cc
+@@ -29,7 +29,7 @@ private:
public:
button (char *s) {state=0; strcpy (name, s);}
~button () {}
@@ -9,7 +9,7 @@
if (state != i) {
state = i;
if (state == 0)
-@@ -90,7 +90,7 @@
+@@ -90,7 +90,7 @@ button play_button ("play"), pause_butt
#define S(t) toc_buffer[t].addr.msf.second
#define F(t) toc_buffer[t].addr.msf.frame
diff --git a/audio/xcdplayer/files/patch-Imakefile b/audio/xcdplayer/files/patch-Imakefile
index b6fe6d77f321..bfc95ff0b1e2 100644
--- a/audio/xcdplayer/files/patch-Imakefile
+++ b/audio/xcdplayer/files/patch-Imakefile
@@ -1,5 +1,5 @@
---- Imakefile.orig Tue Jan 12 19:59:29 1993
-+++ Imakefile Mon Aug 25 00:47:20 2003
+--- Imakefile.orig 1993-01-12 18:59:29 UTC
++++ Imakefile
@@ -15,6 +15,11 @@
LOCAL_LIBRARIES = XawClientLibs
@@ -12,7 +12,7 @@
#ifdef SunArchitecture
SRCS = main.c top_setup.c logo_setup.c button_setup.c cdrom_callb.c\
cdrom_sun.c internals.c shuffle.c program.c leds.c debug.c
-@@ -38,5 +43,4 @@
+@@ -38,5 +43,4 @@ AllTarget(${PROGRAMS})
ComplexProgramTarget(xcdplayer)
NormalProgramTarget(cdinfo, cdinfo.o,,,)
NormalProgramTarget(cdgrab, cdgrab.o,,,)
diff --git a/audio/xcdplayer/files/patch-XCdplayer.ad b/audio/xcdplayer/files/patch-XCdplayer.ad
index 477992d8028b..d136b5a167c7 100644
--- a/audio/xcdplayer/files/patch-XCdplayer.ad
+++ b/audio/xcdplayer/files/patch-XCdplayer.ad
@@ -1,6 +1,6 @@
---- XCdplayer.ad.orig Tue Jan 12 19:59:41 1993
-+++ XCdplayer.ad Mon Aug 25 00:38:35 2003
-@@ -19,11 +19,10 @@
+--- XCdplayer.ad.orig 1993-01-12 18:59:41 UTC
++++ XCdplayer.ad
+@@ -19,11 +19,10 @@ XCdplayer*Font: -misc-fixed-bold-r-no
XCdplayer*logoLabel.foreground: Gold
XCdplayer*logoLabel.background: Black
@@ -13,7 +13,7 @@
XCdplayer*versionLabel.fromHoriz: logoLabel
! replayThreshold is the number of seconds that must be played before the
-@@ -33,16 +32,16 @@
+@@ -33,16 +32,16 @@ XCdplayer*replayThreshold: 4
! scanSkipInterval is the number of seconds skipped at each fast-forward or
! reverse.
@@ -33,7 +33,7 @@
! pausePauseInterval does the same thing when the disc is paused.
XCdplayer*pausePauseInterval: 0.5
-@@ -56,7 +55,7 @@
+@@ -56,7 +55,7 @@ XCdplayer*pausePauseInterval: 0.5
XCdplayer*Viewport.allowHoriz: True
XCdplayer*Viewport.useBottom: True
XCdplayer*Viewport.forceBars: False
@@ -42,7 +42,7 @@
XCdplayer*Viewport.height: 30
XCdplayer*Viewport*thickness: 8
XCdplayer*Viewport.resizable: False
-@@ -88,11 +87,11 @@
+@@ -88,11 +87,11 @@ XCdplayer*Toggle.left: ChainLeft
XCdplayer*Toggle.right: ChainLeft
XCdplayer*Toggle.background: Ivory
@@ -56,7 +56,7 @@
XCdplayer*trackButton.fromVert: versionLabel
XCdplayer*trackButton.fromHoriz: ledsLabel
XCdplayer*trackButton.borderWidth: 2
-@@ -108,27 +107,22 @@
+@@ -108,27 +107,22 @@ XCdplayer*timerButton.fromHoriz: trackBu
XCdplayer*timerButton.left: ChainRight
XCdplayer*timerButton.right: ChainRight
diff --git a/audio/xcdplayer/files/patch-button__setup.c b/audio/xcdplayer/files/patch-button__setup.c
index fb793da4f1d7..5a68446cb5ac 100644
--- a/audio/xcdplayer/files/patch-button__setup.c
+++ b/audio/xcdplayer/files/patch-button__setup.c
@@ -1,8 +1,8 @@
$NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ad,v 1.4 2005/12/11 20:48:46 joerg Exp $
---- button_setup.c.orig Tue Jan 12 19:59:47 1993
-+++ button_setup.c Mon Aug 25 00:38:35 2003
+--- button_setup.c.orig 1993-01-12 18:59:47 UTC
++++ button_setup.c
@@ -20,6 +20,9 @@
# include <X11/Xaw/Toggle.h>
@@ -37,11 +37,10 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ad,v 1.4 2005/12/11 20:48:46 joerg
static Widget buttons_form_widget;
static Widget play_button_widget;
-@@ -71,25 +91,6 @@
- Widget parent_widget;
+@@ -72,25 +92,6 @@ button_setup(parent_widget)
{
Arg args[1];
--
+
- extern void title_dialog_setup();
- extern void play_button_setup();
- extern void stop_button_setup();
@@ -60,6 +59,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ad,v 1.4 2005/12/11 20:48:46 joerg
- extern void pgm_button_setup();
- extern void buttons_reset();
-
-
+-
buttons_form_widget = XtCreateManagedWidget("buttonsForm",
formWidgetClass,
+ parent_widget,
diff --git a/audio/xcdplayer/files/patch-cdrom__callb.c b/audio/xcdplayer/files/patch-cdrom__callb.c
index 239354280e87..cbe70dc291d3 100644
--- a/audio/xcdplayer/files/patch-cdrom__callb.c
+++ b/audio/xcdplayer/files/patch-cdrom__callb.c
@@ -1,8 +1,8 @@
$NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ae,v 1.4 2005/12/11 20:48:46 joerg Exp $
---- cdrom_callb.c.orig Tue Jan 12 19:59:48 1993
-+++ cdrom_callb.c Mon Aug 25 00:38:35 2003
+--- cdrom_callb.c.orig 1993-01-12 18:59:48 UTC
++++ cdrom_callb.c
@@ -22,6 +22,9 @@
# include "debug.h"
@@ -22,7 +22,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ae,v 1.4 2005/12/11 20:48:46 joerg
void cdrom_new_disc();
/*
-@@ -287,7 +292,7 @@
+@@ -287,7 +292,7 @@ cb_cdrom_previous(widget, client_data, c
* if playing less than replayThreshold seconds, back up to
* previous track; otherwise start at beginning of current track:
*/
diff --git a/audio/xcdplayer/files/patch-cdrom__globs.h b/audio/xcdplayer/files/patch-cdrom__globs.h
index 31e9c186dd33..2f0d789952a8 100644
--- a/audio/xcdplayer/files/patch-cdrom__globs.h
+++ b/audio/xcdplayer/files/patch-cdrom__globs.h
@@ -1,6 +1,6 @@
---- cdrom_globs.h.orig Tue Jan 12 19:59:31 1993
-+++ cdrom_globs.h Mon Aug 25 00:38:35 2003
-@@ -99,22 +99,10 @@
+--- cdrom_globs.h.orig 1993-01-12 18:59:31 UTC
++++ cdrom_globs.h
+@@ -99,22 +99,10 @@ extern void program_cancel();
extern int cdrom_open();
extern int cdrom_init();
diff --git a/audio/xcdplayer/files/patch-debug.c b/audio/xcdplayer/files/patch-debug.c
index 28d4b6882dfb..0ed7ea36c96f 100644
--- a/audio/xcdplayer/files/patch-debug.c
+++ b/audio/xcdplayer/files/patch-debug.c
@@ -1,5 +1,5 @@
---- debug.c.orig Tue Jan 12 19:59:35 1993
-+++ debug.c Mon Aug 25 01:36:43 2003
+--- debug.c.orig 1993-01-12 18:59:35 UTC
++++ debug.c
@@ -15,28 +15,29 @@
# include <X11/Intrinsic.h>
diff --git a/audio/xcdplayer/files/patch-internals.c b/audio/xcdplayer/files/patch-internals.c
index 16b580acf7c2..e1800db9d01e 100644
--- a/audio/xcdplayer/files/patch-internals.c
+++ b/audio/xcdplayer/files/patch-internals.c
@@ -1,8 +1,8 @@
$NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $
---- internals.c.orig Tue Jan 12 19:59:45 1993
-+++ internals.c Wed May 30 19:20:48 2007
+--- internals.c.orig 1993-01-12 18:59:45 UTC
++++ internals.c
@@ -22,6 +22,9 @@
# include "debug.h"
@@ -29,7 +29,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
int
cdrom_get_curtime() {
-@@ -46,7 +50,7 @@
+@@ -46,7 +50,7 @@ cdrom_get_curtime() {
if (cdrom_open() == -1) {
debug_printf(1, "cdrom_get_curtime: error from cdrom_open\n");
@@ -38,7 +38,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
}
switch (cdrom_status()) {
-@@ -54,7 +58,7 @@
+@@ -54,7 +58,7 @@ cdrom_get_curtime() {
case CDROM_PLAYING:
if (cdrom_get_curmsf(&curmsf) == -1) {
debug_printf(1, "get_curtime: error reading location\n");
@@ -47,7 +47,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
}
if (((curtrack = cdrom_get_curtrack()) == -1) ||
-@@ -76,6 +80,7 @@
+@@ -76,6 +80,7 @@ cdrom_get_curtime() {
}
}
@@ -55,7 +55,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
/*
* we poll the cd-rom drive every TIMER_PERIOD milliseconds to see where
-@@ -83,7 +88,6 @@
+@@ -83,7 +88,6 @@ cdrom_get_curtime() {
*/
void
cdrom_timer_on() {
@@ -63,7 +63,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
if (cdi.state & CDROM_STATE_PLAY)
ivid = XtAppAddTimeOut(appc, TIMER_PERIOD, update_track, NULL);
-@@ -170,7 +174,6 @@
+@@ -170,7 +174,6 @@ cdrom_rewind () {
struct msf track_start;
struct msf start_addr, end_addr;
int curtrack;
@@ -71,7 +71,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
if (cdrom_get_curmsf(&start_addr) == -1) {
debug_printf(1, "rew: error reading location\n");
-@@ -196,11 +199,11 @@
+@@ -196,11 +199,11 @@ cdrom_rewind () {
if (((cdi.state & CDROM_STATE_PLAY) &&
((track_start.minute * 60) + track_start.second) >=
((start_addr.minute * 60) + start_addr.second -
@@ -85,7 +85,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
{
start_addr = track_start;
start_addr.second++; /* guarantee we never back up too far */
-@@ -208,9 +211,9 @@
+@@ -208,9 +211,9 @@ cdrom_rewind () {
else
{
if (cdi.state & CDROM_STATE_PAUSE) {
@@ -97,7 +97,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
}
if ((char) start_addr.second < 0)
{
-@@ -223,9 +226,9 @@
+@@ -223,9 +226,9 @@ cdrom_rewind () {
else /* normal case */
{
if (cdi.state & CDROM_STATE_PAUSE) {
@@ -109,7 +109,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
}
if ((char) start_addr.second < 0)
{
-@@ -274,7 +277,7 @@
+@@ -274,7 +277,7 @@ cdrom_rewind () {
{
if (scanivid == -1)
scanivid = XtAppAddTimeOut(appc,
@@ -118,7 +118,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
scan_update, NULL);
cdi.state &= ~CDROM_STATE_PAUSE; /* allow timer to change */
-@@ -304,7 +307,6 @@
+@@ -304,7 +307,6 @@ cdrom_ff () {
struct msf start_addr, end_addr, next_start;
char t;
int curtrack;
@@ -126,7 +126,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
if (cdrom_get_curmsf(&start_addr) == -1) {
debug_printf(1, "ff: error reading location\n");
-@@ -332,11 +334,11 @@
+@@ -332,11 +334,11 @@ cdrom_ff () {
if (((cdi.state & CDROM_STATE_PLAY) &&
((next_start.minute * 60) + next_start.second) <=
((start_addr.minute * 60) + start_addr.second +
@@ -140,7 +140,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
{
/* start at end of current track */
-@@ -346,9 +348,9 @@
+@@ -346,9 +348,9 @@ cdrom_ff () {
else
{
if (cdi.state & CDROM_STATE_PAUSE) {
@@ -152,7 +152,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
}
if (start_addr.second >= 60)
{
-@@ -360,9 +362,9 @@
+@@ -360,9 +362,9 @@ cdrom_ff () {
else
{
if (cdi.state & CDROM_STATE_PAUSE) {
@@ -164,7 +164,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
}
if (start_addr.second >= 60)
{
-@@ -413,7 +415,7 @@
+@@ -413,7 +415,7 @@ cdrom_ff () {
{
if (scanivid == -1)
scanivid = XtAppAddTimeOut(appc,
@@ -173,7 +173,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
scan_update, NULL);
cdi.state &= ~CDROM_STATE_PAUSE; /* allow timer to change */
-@@ -557,7 +559,7 @@
+@@ -557,7 +559,7 @@ scan_update(data, id)
cdi.state &= ~CDROM_STATE_STOP;
}
ivid = XtAppAddTimeOut(appc,
@@ -182,7 +182,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
scan_update, NULL);
}
else
-@@ -574,7 +576,7 @@
+@@ -574,7 +576,7 @@ scan_update(data, id)
}
ivid = XtAppAddTimeOut(appc,
@@ -191,7 +191,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
scan_update, NULL);
}
else if (scanivid != -1) {
-@@ -662,7 +664,7 @@
+@@ -662,7 +664,7 @@ update_track(data, id)
cdi.state &= ~CDROM_STATE_STOP;
}
ivid = XtAppAddTimeOut(appc,
@@ -200,7 +200,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ah,v 1.4 2005/12/11 20:48:46 joerg
update_track, NULL);
}
else
-@@ -679,7 +681,7 @@
+@@ -679,7 +681,7 @@ update_track(data, id)
}
ivid = XtAppAddTimeOut(appc,
diff --git a/audio/xcdplayer/files/patch-logo__setup.c b/audio/xcdplayer/files/patch-logo__setup.c
index 865f5ed11625..21b2346af3c3 100644
--- a/audio/xcdplayer/files/patch-logo__setup.c
+++ b/audio/xcdplayer/files/patch-logo__setup.c
@@ -1,8 +1,8 @@
$NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ai,v 1.4 2005/12/11 20:48:46 joerg Exp $
---- logo_setup.c.orig Tue Jan 12 19:59:46 1993
-+++ logo_setup.c Mon Aug 25 00:38:35 2003
+--- logo_setup.c.orig 1993-01-12 18:59:46 UTC
++++ logo_setup.c
@@ -28,6 +28,9 @@
# include <stdio.h>
@@ -22,7 +22,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ai,v 1.4 2005/12/11 20:48:46 joerg
static Widget track_button_widget;
static Widget timer_button_widget;
static Widget volume_scroll_widget;
-@@ -55,19 +60,19 @@
+@@ -55,19 +60,19 @@ Widget title_dialog_widget;
Widget title_done_widget;
static int vol;
@@ -50,7 +50,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ai,v 1.4 2005/12/11 20:48:46 joerg
Widget version_label_widget;
char version_string[80];
-@@ -126,15 +131,16 @@
+@@ -126,15 +131,16 @@ logo_setup(parent_widget)
track_button_update();
@@ -71,7 +71,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ai,v 1.4 2005/12/11 20:48:46 joerg
thumb_pixmap = XCreateBitmapFromData(XtDisplay(logo_form_widget),
rootwin(logo_form_widget),
thumb_bits,
-@@ -171,10 +177,10 @@
+@@ -171,10 +177,10 @@ logo_setup(parent_widget)
#ifdef sgi
if ((vol = cdrom_get_volume()) == 0) {
@@ -84,7 +84,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ai,v 1.4 2005/12/11 20:48:46 joerg
#endif
cdrom_volume(vol, vol);
#ifdef sgi
-@@ -356,7 +362,7 @@
+@@ -356,7 +362,7 @@ timer_button_update() {
Arg args[1];
Boolean state;
@@ -93,7 +93,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ai,v 1.4 2005/12/11 20:48:46 joerg
return;
if ((cdi.state & CDROM_STATE_PAUSE) == 0)
-@@ -413,7 +419,7 @@
+@@ -413,7 +419,7 @@ volume_jump_proc(scroll_widget, client_d
vol = PCT2VAL(*(float *)percent);
#else
vol = (*(float *) percent) * MAXVOL;
diff --git a/audio/xcdplayer/files/patch-main.c b/audio/xcdplayer/files/patch-main.c
index a7c1a7d5bc49..2d1f2b8870bc 100644
--- a/audio/xcdplayer/files/patch-main.c
+++ b/audio/xcdplayer/files/patch-main.c
@@ -1,5 +1,5 @@
---- main.c.orig Tue Jan 12 19:59:36 1993
-+++ main.c Wed May 30 19:19:53 2007
+--- main.c.orig 1993-01-12 18:59:36 UTC
++++ main.c
@@ -23,12 +23,15 @@
Widget top_form;
@@ -18,7 +18,7 @@
chk_debug(argc, argv);
-@@ -66,7 +69,7 @@
+@@ -66,7 +69,7 @@ chk_debug(argc, argv)
/* ugly hack */
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-debug") == 0) {
diff --git a/audio/xcdplayer/files/patch-program.c b/audio/xcdplayer/files/patch-program.c
index 225a6cbe1fad..2eca1f893a6b 100644
--- a/audio/xcdplayer/files/patch-program.c
+++ b/audio/xcdplayer/files/patch-program.c
@@ -1,8 +1,8 @@
$NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ak,v 1.4 2005/12/11 20:48:46 joerg Exp $
---- program.c.orig Tue Jan 12 19:59:49 1993
-+++ program.c Mon Aug 25 00:38:35 2003
+--- program.c.orig 1993-01-12 18:59:49 UTC
++++ program.c
@@ -27,10 +27,13 @@
# include <stdio.h>
@@ -18,7 +18,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ak,v 1.4 2005/12/11 20:48:46 joerg
#ifdef sun
# include "cdrom_sun.h"
#endif
-@@ -52,6 +55,15 @@
+@@ -52,6 +55,15 @@ static Widget new_track_button;
static Boolean adding_to_new_track = False;
static struct prognode *current_node = NULL;
@@ -34,11 +34,10 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ak,v 1.4 2005/12/11 20:48:46 joerg
void
program_form_setup (parent_widget)
Widget parent_widget;
-@@ -66,15 +78,6 @@
- Widget cancel_button;
+@@ -67,15 +79,6 @@ program_form_setup (parent_widget)
Widget save_button;
Widget all_button;
--
+
- extern void cb_move_program_ptr();
- extern void cb_clear_program();
- extern void cb_cancel_program();
@@ -47,6 +46,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-ak,v 1.4 2005/12/11 20:48:46 joerg
- extern void cb_add_10();
- extern void cb_new_track();
- extern void cb_program_all();
-
+-
/*
* create program form as a non-managed widget, because this
+ * form "pops up" when requested, as part of the main form, and
diff --git a/audio/xcdplayer/files/patch-shuffle.c b/audio/xcdplayer/files/patch-shuffle.c
index 62fc177f9423..7e74ac75cb82 100644
--- a/audio/xcdplayer/files/patch-shuffle.c
+++ b/audio/xcdplayer/files/patch-shuffle.c
@@ -1,8 +1,8 @@
$NetBSD: pkgsrc/audio/xcdplayer/patches/patch-al,v 1.4 2005/12/11 20:48:46 joerg Exp $
---- shuffle.c.orig Tue Jan 12 19:59:38 1993
-+++ shuffle.c Mon Aug 25 00:38:35 2003
+--- shuffle.c.orig 1993-01-12 18:59:38 UTC
++++ shuffle.c
@@ -18,6 +18,9 @@
# include "debug.h"
@@ -22,7 +22,7 @@ $NetBSD: pkgsrc/audio/xcdplayer/patches/patch-al,v 1.4 2005/12/11 20:48:46 joerg
void
shuffle_setup() {
extern char *malloc();
-@@ -97,7 +102,7 @@
+@@ -97,7 +102,7 @@ shuffle_setup() {
random_tracks[i] = try;
}
diff --git a/audio/xcdplayer/files/patch-top__setup.c b/audio/xcdplayer/files/patch-top__setup.c
index 2969a64137e3..60495c209edd 100644
--- a/audio/xcdplayer/files/patch-top__setup.c
+++ b/audio/xcdplayer/files/patch-top__setup.c
@@ -1,5 +1,5 @@
---- top_setup.c.orig Tue Jan 12 19:59:40 1993
-+++ top_setup.c Mon Aug 25 00:38:35 2003
+--- top_setup.c.orig 1993-01-12 18:59:40 UTC
++++ top_setup.c
@@ -26,18 +26,8 @@
# include "logo.xbm"
@@ -21,7 +21,7 @@
extern char *getenv();
-@@ -55,36 +45,36 @@
+@@ -55,36 +45,36 @@ static XrmOptionDescRec options[] = {
};
static XtResource resources[] = {
@@ -77,7 +77,7 @@
};
Widget
-@@ -98,6 +88,20 @@
+@@ -98,6 +88,20 @@ top_setup(argc, argv)
Arg arg;
char *s;
@@ -98,7 +98,7 @@
XtToolkitInitialize();
appc = XtCreateApplicationContext();
-@@ -123,12 +127,12 @@
+@@ -123,12 +127,12 @@ top_setup(argc, argv)
XtSetValues(top_shell, &arg, 1);
diff --git a/audio/xfce4-mixer/files/patch-configure b/audio/xfce4-mixer/files/patch-configure
index c7415503c212..097e42e14a93 100644
--- a/audio/xfce4-mixer/files/patch-configure
+++ b/audio/xfce4-mixer/files/patch-configure
@@ -1,6 +1,6 @@
---- ./configure.orig 2014-04-09 19:40:22.000000000 +0000
-+++ ./configure 2014-04-09 22:42:39.000000000 +0000
-@@ -13405,7 +13405,7 @@
+--- configure.orig 2014-04-09 19:40:22 UTC
++++ configure
+@@ -13405,7 +13405,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>
fi
fi
diff --git a/audio/ximp3/files/patch-lib_L3.h b/audio/ximp3/files/patch-lib_L3.h
new file mode 100644
index 000000000000..f141af8d74f9
--- /dev/null
+++ b/audio/ximp3/files/patch-lib_L3.h
@@ -0,0 +1,28 @@
+--- lib/L3.h.orig 2001-10-27 14:05:42 UTC
++++ lib/L3.h
+@@ -39,6 +39,16 @@ ________________________________________
+ #define GLOBAL_GAIN_SCALE (4*15)
+ /* #define GLOBAL_GAIN_SCALE 0 */
+
++#include <sys/types.h>
++
++#ifdef BYTE_ORDER
++#if BYTE_ORDER == LITTLE_ENDIAN
++#define L_ENDIAN 1
++#else
++#define L_ENDIAN 0
++#endif
++#else
++
+ #ifdef i386
+ #define L_ENDIAN 1
+ #endif
+@@ -55,6 +65,8 @@ ________________________________________
+ #define L_ENDIAN 0
+ #endif
+
++#endif
++
+ #ifndef L_ENDIAN
+ #error Layer III L_ENDIAN must be defined 0 or 1
+ #endif
diff --git a/audio/ximp3/files/patch-lib__L3.h b/audio/ximp3/files/patch-lib__L3.h
deleted file mode 100644
index 3148ca42a62e..000000000000
--- a/audio/ximp3/files/patch-lib__L3.h
+++ /dev/null
@@ -1,28 +0,0 @@
---- lib/L3.h.orig Sat Oct 27 23:05:42 2001
-+++ lib/L3.h Mon Aug 18 20:18:00 2003
-@@ -39,6 +39,16 @@
- #define GLOBAL_GAIN_SCALE (4*15)
- /* #define GLOBAL_GAIN_SCALE 0 */
-
-+#include <sys/types.h>
-+
-+#ifdef BYTE_ORDER
-+#if BYTE_ORDER == LITTLE_ENDIAN
-+#define L_ENDIAN 1
-+#else
-+#define L_ENDIAN 0
-+#endif
-+#else
-+
- #ifdef i386
- #define L_ENDIAN 1
- #endif
-@@ -53,6 +63,8 @@
-
- #ifdef sparc
- #define L_ENDIAN 0
-+#endif
-+
- #endif
-
- #ifndef L_ENDIAN
diff --git a/audio/xmcd/files/patch-Imakefile b/audio/xmcd/files/patch-Imakefile
index 68b33fc1577f..14172b03cc15 100644
--- a/audio/xmcd/files/patch-Imakefile
+++ b/audio/xmcd/files/patch-Imakefile
@@ -1,6 +1,6 @@
---- Imakefile.orig Mon Nov 4 06:44:33 2002
-+++ Imakefile Mon Nov 4 05:02:09 2002
-@@ -77,5 +77,5 @@
+--- Imakefile.orig 2004-04-21 19:27:01 UTC
++++ Imakefile
+@@ -77,5 +77,5 @@ MANSUFFIX=ManSuffix
*/
install::
@BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) MANDIR=$(MANDIR) \
diff --git a/audio/xmcd/files/patch-cda__d_Imakefile b/audio/xmcd/files/patch-cda__d_Imakefile
new file mode 100644
index 000000000000..260e485956f2
--- /dev/null
+++ b/audio/xmcd/files/patch-cda__d_Imakefile
@@ -0,0 +1,28 @@
+--- cda_d/Imakefile.orig 2004-04-21 19:27:23 UTC
++++ cda_d/Imakefile
+@@ -145,7 +145,7 @@ INCLUDES=-I..
+ /*
+ * Add needed libraries
+ */
+-CDDBLIB= -L../cddb_d -lcddb
++CDDBLIB= -L../cddb_d -lcddblocal
+ LOCAL_LIBDIR= -L/usr/freeware/lib32 -L/usr/local/lib
+ VORBLIB= -lvorbisenc -lvorbis -logg
+ FLACLIB= -lFLAC
+@@ -193,7 +193,7 @@ LOCAL_LIBRARIES=-L/usr/5lib -lcurses
+ LOCAL_LIBRARIES=-lncurses
+ #else
+ #if defined(FreeBSDArchitecture)
+-LOCAL_LIBRARIES=-lncurses -lmytinfo
++LOCAL_LIBRARIES=-lncurses
+ .if exists(/usr/include/camlib.h)
+ LOCAL_LIBRARIES+= -lcam
+ .endif
+@@ -231,6 +231,7 @@ LOCAL_LIBRARIES=-lcurses
+ #endif /* LinuxArchitecture OpenBSDArchitecture */
+ #endif /* SunArchitecture */
+
++MANSUFFIX=1
+
+ /*
+ * C Source files
diff --git a/audio/xmcd/files/patch-cda_d__Imakefile b/audio/xmcd/files/patch-cda_d__Imakefile
deleted file mode 100644
index cd6ab3e3730c..000000000000
--- a/audio/xmcd/files/patch-cda_d__Imakefile
+++ /dev/null
@@ -1,28 +0,0 @@
---- cda_d/Imakefile.orig Thu Apr 22 03:27:23 2004
-+++ cda_d/Imakefile Fri Feb 2 04:44:17 2007
-@@ -145,7 +145,7 @@
- /*
- * Add needed libraries
- */
--CDDBLIB= -L../cddb_d -lcddb
-+CDDBLIB= -L../cddb_d -lcddblocal
- LOCAL_LIBDIR= -L/usr/freeware/lib32 -L/usr/local/lib
- VORBLIB= -lvorbisenc -lvorbis -logg
- FLACLIB= -lFLAC
-@@ -193,7 +193,7 @@
- LOCAL_LIBRARIES=-lncurses
- #else
- #if defined(FreeBSDArchitecture)
--LOCAL_LIBRARIES=-lncurses -lmytinfo
-+LOCAL_LIBRARIES=-lncurses
- .if exists(/usr/include/camlib.h)
- LOCAL_LIBRARIES+= -lcam
- .endif
-@@ -231,6 +231,7 @@
- #endif /* LinuxArchitecture OpenBSDArchitecture */
- #endif /* SunArchitecture */
-
-+MANSUFFIX=1
-
- /*
- * C Source files
diff --git a/audio/xmcd/files/patch-cdda__d_Imakefile b/audio/xmcd/files/patch-cdda__d_Imakefile
new file mode 100644
index 000000000000..22be17d5067d
--- /dev/null
+++ b/audio/xmcd/files/patch-cdda__d_Imakefile
@@ -0,0 +1,15 @@
+--- cdda_d/Imakefile.orig 2004-04-21 19:27:03 UTC
++++ cdda_d/Imakefile
+@@ -143,6 +143,12 @@ DEFINES+= -DHAS_ALSA
+ endif
+ #endif
+
++#if defined(FreeBSDArchitecture)
++/* The following is BSD-make specific */
++.if exists(/usr/include/camlib.h)
++DEFINES+= -DFREEBSD_CAM -DHAS_SETEUID
++.endif
++#endif
+
+ /*
+ * POSIX threads stuff
diff --git a/audio/xmcd/files/patch-cdda__d_if__flac.c b/audio/xmcd/files/patch-cdda__d_if__flac.c
new file mode 100644
index 000000000000..cd21d7b22b0d
--- /dev/null
+++ b/audio/xmcd/files/patch-cdda__d_if__flac.c
@@ -0,0 +1,519 @@
+--- cdda_d/if_flac.c.orig 2004-04-21 19:27:05 UTC
++++ cdda_d/if_flac.c
+@@ -57,7 +57,6 @@ typedef float FLAC__real;
+ #include <FLAC/format.h>
+ #include <FLAC/metadata.h>
+ #include <FLAC/stream_encoder.h>
+-#include <FLAC/seekable_stream_encoder.h>
+
+
+ extern appdata_t app_data;
+@@ -86,7 +85,6 @@ extern char *tagcomment; /* Tag commen
+ /* Container union for encoder instance pointers */
+ typedef union {
+ FLAC__StreamEncoder *st; /* Stream encoder */
+- FLAC__SeekableStreamEncoder *sk; /* Seekable stream encoder */
+ } flac_desc_t;
+
+
+@@ -153,76 +151,10 @@ if_flac_write_callback(
+
+
+ /*
+- * if_flac_seekable_write_callback
+- * FLAC seekable stream encoder write callback function
+- *
+- * Args:
+- * skp - Seekable stream encoder instance descriptor
+- * buf - Output data buffer
+- * len - data length
+- * samples - number of samples
+- * frame - Current frame
+- * client_data - Callback data
+- *
+- * Return:
+- * FLAC__STREAM_ENCODER_WRITE_STATUS_OK - success
+- * FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR - failure
+- */
+-/*ARGSUSED*/
+-STATIC FLAC__StreamEncoderWriteStatus
+-if_flac_seekable_write_callback(
+- const FLAC__SeekableStreamEncoder *skp,
+- const FLAC__byte *buf,
+- unsigned int len,
+- unsigned int samples,
+- unsigned int frame,
+- void *client_data
+-)
+-{
+- gen_desc_t *gdp = (gen_desc_t *) client_data;
+-
+- if (buf == NULL || len == 0)
+- /* Nothing to do */
+- return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
+-
+- /* Write out the encoded data */
+- gdp->flags |= GDESC_WRITEOUT;
+- if (!gen_write_chunk(gdp, (byte_t *) buf, (size_t) len))
+- return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
+-
+- return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
+-}
+-
+-
+-/*
+ * if_flac_metadata_callback
+ * FLAC stream encoder metadata callback function
+ *
+ * Args:
+- * stp - Encoder instance descriptor
+- * data - Metadata buffer
+- * client_data - Callback data
+- *
+- * Return:
+- * Nothing.
+- */
+-/*ARGSUSED*/
+-STATIC void
+-if_flac_metadata_callback(
+- const FLAC__StreamEncoder *stp,
+- const FLAC__StreamMetadata *meta,
+- void *client_data
+-)
+-{
+- /* Do nothing: can't seek on a pipe */
+-}
+-
+-
+-/*
+- * if_flac_seek_callback
+- * FLAC seekable stream encoder seek callback function
+- *
+- * Args:
+ * skp - Encoder instance descriptor
+ * data - Metadata buffer
+ * client_data - Callback data
+@@ -231,9 +163,9 @@ if_flac_metadata_callback(
+ * Nothing.
+ */
+ /*ARGSUSED*/
+-STATIC FLAC__SeekableStreamEncoderSeekStatus
+-if_flac_seek_callback(
+- const FLAC__SeekableStreamEncoder *skp,
++STATIC FLAC__StreamEncoderSeekStatus
++if_flac_metadata_callback(
++ const FLAC__StreamEncoder *skp,
+ FLAC__uint64 offset,
+ void *client_data
+ )
+@@ -244,9 +176,9 @@ if_flac_seek_callback(
+ val = (off_t) ASSIGN32(offset);
+
+ if (gen_seek(gdp, val, SEEK_SET))
+- return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK;
++ return FLAC__STREAM_ENCODER_SEEK_STATUS_OK;
+ else
+- return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_ERROR;
++ return FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR;
+ }
+
+
+@@ -635,16 +567,9 @@ if_flac_addmeta(gen_desc_t *gdp, flac_de
+ if (flac_mblks == 0)
+ return; /* No metadata to set */
+
+- if ((gdp->flags & GDESC_ISPIPE) != 0) {
+- ret = FLAC__stream_encoder_set_metadata(
+- ufdp->st, flac_mlist, flac_mblks
+- );
+- }
+- else {
+- ret = FLAC__seekable_stream_encoder_set_metadata(
+- ufdp->sk, flac_mlist, flac_mblks
+- );
+- }
++ ret = FLAC__stream_encoder_set_metadata(
++ ufdp->st, flac_mlist, flac_mblks
++ );
+ if (!ret) {
+ (void) strcpy(gdp->cdp->i->msgbuf,
+ "if_flac_addmeta: Failed setting metadata.");
+@@ -655,7 +580,7 @@ if_flac_addmeta(gen_desc_t *gdp, flac_de
+
+ /*
+ * if_flac_encoder_setup
+- * Create and set up the FLAC stream encoder (used for pipe output).
++ * Create and set up the FLAC stream encoder.
+ *
+ * Args:
+ * gdp - Pointer to the gen_desc_t structure
+@@ -836,43 +761,12 @@ if_flac_encoder_setup(
+ /* Initialize and add metadata to FLAC output */
+ if_flac_addmeta(gdp, ufdp);
+
+- /* Register write callback function */
+- ret = FLAC__stream_encoder_set_write_callback(
+- stp, if_flac_write_callback
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_encoder_setup: "
+- "Failed setting write callback.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Register metadata callback function */
+- ret = FLAC__stream_encoder_set_metadata_callback(
+- stp, if_flac_metadata_callback
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_encoder_setup: "
+- "Failed setting metadata callback.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Set callback argument */
+- ret = FLAC__stream_encoder_set_client_data(stp, gdp);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_encoder_setup: "
+- "Failed setting client data.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+ /* Initialize FLAC encoder */
+- enc_state = FLAC__stream_encoder_init(stp);
+- if (enc_state != FLAC__STREAM_ENCODER_OK) {
++ enc_state = FLAC__stream_encoder_init_stream(
++ stp, if_flac_write_callback, NULL, NULL,
++ if_flac_metadata_callback, gdp
++ );
++ if (enc_state != FLAC__STREAM_ENCODER_INIT_STATUS_OK) {
+ (void) sprintf(gdp->cdp->i->msgbuf,
+ "if_flac_encoder_setup: Encoder init error: %s",
+ FLAC__stream_encoder_get_resolved_state_string(stp)
+@@ -908,271 +802,6 @@ if_flac_encoder_setup(
+
+
+ /*
+- * if_flac_seekable_encoder_setup
+- * Create and set up the FLAC seekable stream encoder (used for file
+- * output).
+- *
+- * Args:
+- * gdp - Pointer to the gen_desc_t structure
+- * ufdp - Pointer to the flac_desc_t structure
+- * pp - Pointer to the flac_parms_t structure
+- *
+- * Return:
+- * TRUE - success
+- * FALSE - failure
+- */
+-STATIC bool_t
+-if_flac_seekable_encoder_setup(
+- gen_desc_t *gdp,
+- flac_desc_t *ufdp,
+- flac_parms_t *pp
+-)
+-{
+- FLAC__SeekableStreamEncoder *skp;
+- FLAC__SeekableStreamEncoderState enc_state;
+- FLAC__uint64 val;
+- FLAC__bool ret;
+-
+- ufdp->sk = skp = FLAC__seekable_stream_encoder_new();
+- if (skp == NULL) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "FLAC encoder instantiation failed.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Set some basic parameters */
+-
+- ret = FLAC__seekable_stream_encoder_set_channels(skp, 2);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting channels.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_bits_per_sample(skp, 16);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting bits per sample.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_sample_rate(skp, 44100);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting sample rate.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- val = ASSIGN64(gdp->datalen >> 2);
+- ret = FLAC__seekable_stream_encoder_set_total_samples_estimate(
+- skp, val
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting samples estimate.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_streamable_subset(skp, TRUE);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting streamable subset.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(
+- skp, pp->qlp_srch
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting LP coefficient quantization search."
+- );
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Just use default for now
+- ret = FLAC__seekable_stream_encoder_set_qlp_coeff_precision(skp, 0);
+- */
+-
+- ret = FLAC__seekable_stream_encoder_set_verify(skp, pp->vfy_mode);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting verify mode.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_max_lpc_order(
+- skp, pp->lpc_order
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting max LPC order.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_blocksize(skp, pp->block_sz);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting block size.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_do_mid_side_stereo(
+- skp, pp->mid_side
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting M/S stereo.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(
+- skp, pp->adap_ms
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting adaptive M/S stereo.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- if (pp->min_rpo >= 0) {
+- ret = FLAC__seekable_stream_encoder_set_min_residual_partition_order(
+- skp, (unsigned int) pp->min_rpo
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting minimum RPO.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+- }
+-
+- if (pp->max_rpo >= 0) {
+- ret = FLAC__seekable_stream_encoder_set_max_residual_partition_order(
+- skp, (unsigned int) pp->max_rpo
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting maximum RPO.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+- }
+-
+- ret = FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(
+- skp, pp->exh_srch
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting exhaustive model search.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Initialize and add metadata to FLAC output */
+- if_flac_addmeta(gdp, ufdp);
+-
+- /* Register write callback function */
+- ret = FLAC__seekable_stream_encoder_set_write_callback(
+- skp, if_flac_seekable_write_callback
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting write callback.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Register seek callback function */
+- ret = FLAC__seekable_stream_encoder_set_seek_callback(
+- skp, if_flac_seek_callback
+- );
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting seek callback.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Set callback argument */
+- ret = FLAC__seekable_stream_encoder_set_client_data(skp, gdp);
+- if (!ret) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Failed setting client data.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Initialize FLAC encoder */
+- enc_state = FLAC__seekable_stream_encoder_init(skp);
+- if (enc_state != FLAC__SEEKABLE_STREAM_ENCODER_OK) {
+- (void) sprintf(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: Encoder init error: %s",
+- FLAC__seekable_stream_encoder_get_resolved_state_string(skp)
+- );
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- /* Allocate wide samples buffers for the two channels */
+- fenc_buf[0] = (FLAC__int32 *) MEM_ALLOC(
+- "fenc_buf0",
+- (size_t) gdp->cdp->cds->chunk_bytes
+- );
+- if (fenc_buf[0] == NULL) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Out of memory.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+- fenc_buf[1] = (FLAC__int32 *) MEM_ALLOC(
+- "fenc_buf1",
+- (size_t) gdp->cdp->cds->chunk_bytes
+- );
+- if (fenc_buf[1] == NULL) {
+- (void) strcpy(gdp->cdp->i->msgbuf,
+- "if_flac_seekable_encoder_setup: "
+- "Out of memory.");
+- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
+- return FALSE;
+- }
+-
+- return TRUE;
+-}
+-
+-
+-/*
+ * if_flac_init
+ * Initialize FLAC encoder and set up encoding parameters
+ *
+@@ -1300,10 +929,7 @@ if_flac_init(gen_desc_t *gdp)
+ }
+
+ /* Set up encoder */
+- if ((gdp->flags & GDESC_ISPIPE) != 0)
+- ret = if_flac_encoder_setup(gdp, ufdp, &parms);
+- else
+- ret = if_flac_seekable_encoder_setup(gdp, ufdp, &parms);
++ ret = if_flac_encoder_setup(gdp, ufdp, &parms);
+
+ return (ret);
+ }
+@@ -1351,16 +977,9 @@ if_flac_encode_chunk(gen_desc_t *gdp, by
+
+ DBGPRN(DBG_SND)(errfp, "\nEncoding %d samples\n", samples);
+
+- if ((gdp->flags & GDESC_ISPIPE) != 0) {
+- ret = FLAC__stream_encoder_process(
+- ufdp->st, (void *) fenc_buf, (unsigned int) samples
+- );
+- }
+- else {
+- ret = FLAC__seekable_stream_encoder_process(
+- ufdp->sk, (void *) fenc_buf, (unsigned int) samples
+- );
+- }
++ ret = FLAC__stream_encoder_process(
++ ufdp->st, (void *) fenc_buf, (unsigned int) samples
++ );
+ if (!ret) {
+ (void) strcpy(gdp->cdp->i->msgbuf,
+ "if_flac_encode_chunk: Process encoding failed.");
+@@ -1393,14 +1012,8 @@ if_flac_halt(gen_desc_t *gdp)
+
+ ufdp = (flac_desc_t *) gdp->aux;
+
+- if ((gdp->flags & GDESC_ISPIPE) != 0) {
+- FLAC__stream_encoder_finish(ufdp->st);
+- FLAC__stream_encoder_delete(ufdp->st);
+- }
+- else {
+- FLAC__seekable_stream_encoder_finish(ufdp->sk);
+- FLAC__seekable_stream_encoder_delete(ufdp->sk);
+- }
++ FLAC__stream_encoder_finish(ufdp->st);
++ FLAC__stream_encoder_delete(ufdp->st);
+
+ MEM_FREE(ufdp);
+ gdp->aux = NULL;
diff --git a/audio/xmcd/files/patch-cdda__d_pthr.c b/audio/xmcd/files/patch-cdda__d_pthr.c
new file mode 100644
index 000000000000..47327b814498
--- /dev/null
+++ b/audio/xmcd/files/patch-cdda__d_pthr.c
@@ -0,0 +1,26 @@
+--- cdda_d/pthr.c.orig 2004-04-21 19:27:03 UTC
++++ cdda_d/pthr.c
+@@ -35,6 +35,7 @@ static char *_pthr_c_ident_ = "@(#)pthr.
+
+ #ifdef CDDA_PTHREADS
+
++#include <sys/param.h>
+ #include "cdda_d/pthr.h"
+
+ /*
+@@ -889,6 +890,7 @@ cdda_pthr_play(di_dev_t *devp, curstat_t
+ pthr_sem[DATA].v = 0;
+
+ #ifndef __VMS /* VMS has no real fork, so this does not apply */
++#if __FreeBSD_version >= 502100
+ /* Register fork handler */
+ if ((ret = pthread_atfork(NULL, NULL, cdda_pthr_atfork)) != 0) {
+ (void) sprintf(errbuf,
+@@ -900,6 +902,7 @@ cdda_pthr_play(di_dev_t *devp, curstat_t
+ return FALSE;
+ }
+ #endif
++#endif
+
+ /* Ignore SIGPIPE */
+ opipe = util_signal(SIGPIPE, SIG_IGN);
diff --git a/audio/xmcd/files/patch-cdda_d__Imakefile b/audio/xmcd/files/patch-cdda_d__Imakefile
deleted file mode 100644
index 031d2e2f247e..000000000000
--- a/audio/xmcd/files/patch-cdda_d__Imakefile
+++ /dev/null
@@ -1,15 +0,0 @@
---- cdda_d/Imakefile.orig Fri Jun 7 13:33:15 2002
-+++ cdda_d/Imakefile Fri Jun 7 13:33:21 2002
-@@ -76,6 +76,12 @@
- #endif /* Linux Sun AIX Ultrix USL SVR4 */
- #endif
-
-+#if defined(FreeBSDArchitecture)
-+/* The following is BSD-make specific */
-+.if exists(/usr/include/camlib.h)
-+DEFINES+= -DFREEBSD_CAM -DHAS_SETEUID
-+.endif
-+#endif
-
- /*
- * Add local include path
diff --git a/audio/xmcd/files/patch-cdda_d__if_flac.c b/audio/xmcd/files/patch-cdda_d__if_flac.c
deleted file mode 100644
index 3dcc0de9352c..000000000000
--- a/audio/xmcd/files/patch-cdda_d__if_flac.c
+++ /dev/null
@@ -1,519 +0,0 @@
---- cdda_d/if_flac.c.orig 2008-04-06 21:14:40.000000000 +0200
-+++ cdda_d/if_flac.c 2008-04-06 22:11:17.000000000 +0200
-@@ -57,7 +57,6 @@ typedef float FLAC__real;
- #include <FLAC/format.h>
- #include <FLAC/metadata.h>
- #include <FLAC/stream_encoder.h>
--#include <FLAC/seekable_stream_encoder.h>
-
-
- extern appdata_t app_data;
-@@ -86,7 +85,6 @@ extern char *tagcomment; /* Tag commen
- /* Container union for encoder instance pointers */
- typedef union {
- FLAC__StreamEncoder *st; /* Stream encoder */
-- FLAC__SeekableStreamEncoder *sk; /* Seekable stream encoder */
- } flac_desc_t;
-
-
-@@ -153,76 +151,10 @@ if_flac_write_callback(
-
-
- /*
-- * if_flac_seekable_write_callback
-- * FLAC seekable stream encoder write callback function
-- *
-- * Args:
-- * skp - Seekable stream encoder instance descriptor
-- * buf - Output data buffer
-- * len - data length
-- * samples - number of samples
-- * frame - Current frame
-- * client_data - Callback data
-- *
-- * Return:
-- * FLAC__STREAM_ENCODER_WRITE_STATUS_OK - success
-- * FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR - failure
-- */
--/*ARGSUSED*/
--STATIC FLAC__StreamEncoderWriteStatus
--if_flac_seekable_write_callback(
-- const FLAC__SeekableStreamEncoder *skp,
-- const FLAC__byte *buf,
-- unsigned int len,
-- unsigned int samples,
-- unsigned int frame,
-- void *client_data
--)
--{
-- gen_desc_t *gdp = (gen_desc_t *) client_data;
--
-- if (buf == NULL || len == 0)
-- /* Nothing to do */
-- return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
--
-- /* Write out the encoded data */
-- gdp->flags |= GDESC_WRITEOUT;
-- if (!gen_write_chunk(gdp, (byte_t *) buf, (size_t) len))
-- return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
--
-- return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
--}
--
--
--/*
- * if_flac_metadata_callback
- * FLAC stream encoder metadata callback function
- *
- * Args:
-- * stp - Encoder instance descriptor
-- * data - Metadata buffer
-- * client_data - Callback data
-- *
-- * Return:
-- * Nothing.
-- */
--/*ARGSUSED*/
--STATIC void
--if_flac_metadata_callback(
-- const FLAC__StreamEncoder *stp,
-- const FLAC__StreamMetadata *meta,
-- void *client_data
--)
--{
-- /* Do nothing: can't seek on a pipe */
--}
--
--
--/*
-- * if_flac_seek_callback
-- * FLAC seekable stream encoder seek callback function
-- *
-- * Args:
- * skp - Encoder instance descriptor
- * data - Metadata buffer
- * client_data - Callback data
-@@ -231,9 +163,9 @@ if_flac_metadata_callback(
- * Nothing.
- */
- /*ARGSUSED*/
--STATIC FLAC__SeekableStreamEncoderSeekStatus
--if_flac_seek_callback(
-- const FLAC__SeekableStreamEncoder *skp,
-+STATIC FLAC__StreamEncoderSeekStatus
-+if_flac_metadata_callback(
-+ const FLAC__StreamEncoder *skp,
- FLAC__uint64 offset,
- void *client_data
- )
-@@ -244,9 +176,9 @@ if_flac_seek_callback(
- val = (off_t) ASSIGN32(offset);
-
- if (gen_seek(gdp, val, SEEK_SET))
-- return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK;
-+ return FLAC__STREAM_ENCODER_SEEK_STATUS_OK;
- else
-- return FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_ERROR;
-+ return FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR;
- }
-
-
-@@ -635,16 +567,9 @@ if_flac_addmeta(gen_desc_t *gdp, flac_de
- if (flac_mblks == 0)
- return; /* No metadata to set */
-
-- if ((gdp->flags & GDESC_ISPIPE) != 0) {
-- ret = FLAC__stream_encoder_set_metadata(
-- ufdp->st, flac_mlist, flac_mblks
-- );
-- }
-- else {
-- ret = FLAC__seekable_stream_encoder_set_metadata(
-- ufdp->sk, flac_mlist, flac_mblks
-- );
-- }
-+ ret = FLAC__stream_encoder_set_metadata(
-+ ufdp->st, flac_mlist, flac_mblks
-+ );
- if (!ret) {
- (void) strcpy(gdp->cdp->i->msgbuf,
- "if_flac_addmeta: Failed setting metadata.");
-@@ -655,7 +580,7 @@ if_flac_addmeta(gen_desc_t *gdp, flac_de
-
- /*
- * if_flac_encoder_setup
-- * Create and set up the FLAC stream encoder (used for pipe output).
-+ * Create and set up the FLAC stream encoder.
- *
- * Args:
- * gdp - Pointer to the gen_desc_t structure
-@@ -836,43 +761,12 @@ if_flac_encoder_setup(
- /* Initialize and add metadata to FLAC output */
- if_flac_addmeta(gdp, ufdp);
-
-- /* Register write callback function */
-- ret = FLAC__stream_encoder_set_write_callback(
-- stp, if_flac_write_callback
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_encoder_setup: "
-- "Failed setting write callback.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Register metadata callback function */
-- ret = FLAC__stream_encoder_set_metadata_callback(
-- stp, if_flac_metadata_callback
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_encoder_setup: "
-- "Failed setting metadata callback.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Set callback argument */
-- ret = FLAC__stream_encoder_set_client_data(stp, gdp);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_encoder_setup: "
-- "Failed setting client data.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
- /* Initialize FLAC encoder */
-- enc_state = FLAC__stream_encoder_init(stp);
-- if (enc_state != FLAC__STREAM_ENCODER_OK) {
-+ enc_state = FLAC__stream_encoder_init_stream(
-+ stp, if_flac_write_callback, NULL, NULL,
-+ if_flac_metadata_callback, gdp
-+ );
-+ if (enc_state != FLAC__STREAM_ENCODER_INIT_STATUS_OK) {
- (void) sprintf(gdp->cdp->i->msgbuf,
- "if_flac_encoder_setup: Encoder init error: %s",
- FLAC__stream_encoder_get_resolved_state_string(stp)
-@@ -908,271 +802,6 @@ if_flac_encoder_setup(
-
-
- /*
-- * if_flac_seekable_encoder_setup
-- * Create and set up the FLAC seekable stream encoder (used for file
-- * output).
-- *
-- * Args:
-- * gdp - Pointer to the gen_desc_t structure
-- * ufdp - Pointer to the flac_desc_t structure
-- * pp - Pointer to the flac_parms_t structure
-- *
-- * Return:
-- * TRUE - success
-- * FALSE - failure
-- */
--STATIC bool_t
--if_flac_seekable_encoder_setup(
-- gen_desc_t *gdp,
-- flac_desc_t *ufdp,
-- flac_parms_t *pp
--)
--{
-- FLAC__SeekableStreamEncoder *skp;
-- FLAC__SeekableStreamEncoderState enc_state;
-- FLAC__uint64 val;
-- FLAC__bool ret;
--
-- ufdp->sk = skp = FLAC__seekable_stream_encoder_new();
-- if (skp == NULL) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "FLAC encoder instantiation failed.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Set some basic parameters */
--
-- ret = FLAC__seekable_stream_encoder_set_channels(skp, 2);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting channels.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_bits_per_sample(skp, 16);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting bits per sample.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_sample_rate(skp, 44100);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting sample rate.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- val = ASSIGN64(gdp->datalen >> 2);
-- ret = FLAC__seekable_stream_encoder_set_total_samples_estimate(
-- skp, val
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting samples estimate.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_streamable_subset(skp, TRUE);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting streamable subset.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(
-- skp, pp->qlp_srch
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting LP coefficient quantization search."
-- );
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Just use default for now
-- ret = FLAC__seekable_stream_encoder_set_qlp_coeff_precision(skp, 0);
-- */
--
-- ret = FLAC__seekable_stream_encoder_set_verify(skp, pp->vfy_mode);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting verify mode.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_max_lpc_order(
-- skp, pp->lpc_order
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting max LPC order.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_blocksize(skp, pp->block_sz);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting block size.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_do_mid_side_stereo(
-- skp, pp->mid_side
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting M/S stereo.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(
-- skp, pp->adap_ms
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting adaptive M/S stereo.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- if (pp->min_rpo >= 0) {
-- ret = FLAC__seekable_stream_encoder_set_min_residual_partition_order(
-- skp, (unsigned int) pp->min_rpo
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting minimum RPO.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
-- }
--
-- if (pp->max_rpo >= 0) {
-- ret = FLAC__seekable_stream_encoder_set_max_residual_partition_order(
-- skp, (unsigned int) pp->max_rpo
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting maximum RPO.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
-- }
--
-- ret = FLAC__seekable_stream_encoder_set_do_exhaustive_model_search(
-- skp, pp->exh_srch
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting exhaustive model search.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Initialize and add metadata to FLAC output */
-- if_flac_addmeta(gdp, ufdp);
--
-- /* Register write callback function */
-- ret = FLAC__seekable_stream_encoder_set_write_callback(
-- skp, if_flac_seekable_write_callback
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting write callback.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Register seek callback function */
-- ret = FLAC__seekable_stream_encoder_set_seek_callback(
-- skp, if_flac_seek_callback
-- );
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting seek callback.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Set callback argument */
-- ret = FLAC__seekable_stream_encoder_set_client_data(skp, gdp);
-- if (!ret) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Failed setting client data.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Initialize FLAC encoder */
-- enc_state = FLAC__seekable_stream_encoder_init(skp);
-- if (enc_state != FLAC__SEEKABLE_STREAM_ENCODER_OK) {
-- (void) sprintf(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: Encoder init error: %s",
-- FLAC__seekable_stream_encoder_get_resolved_state_string(skp)
-- );
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- /* Allocate wide samples buffers for the two channels */
-- fenc_buf[0] = (FLAC__int32 *) MEM_ALLOC(
-- "fenc_buf0",
-- (size_t) gdp->cdp->cds->chunk_bytes
-- );
-- if (fenc_buf[0] == NULL) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Out of memory.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
-- fenc_buf[1] = (FLAC__int32 *) MEM_ALLOC(
-- "fenc_buf1",
-- (size_t) gdp->cdp->cds->chunk_bytes
-- );
-- if (fenc_buf[1] == NULL) {
-- (void) strcpy(gdp->cdp->i->msgbuf,
-- "if_flac_seekable_encoder_setup: "
-- "Out of memory.");
-- DBGPRN(DBG_SND)(errfp, "%s\n", gdp->cdp->i->msgbuf);
-- return FALSE;
-- }
--
-- return TRUE;
--}
--
--
--/*
- * if_flac_init
- * Initialize FLAC encoder and set up encoding parameters
- *
-@@ -1300,10 +929,7 @@ if_flac_init(gen_desc_t *gdp)
- }
-
- /* Set up encoder */
-- if ((gdp->flags & GDESC_ISPIPE) != 0)
-- ret = if_flac_encoder_setup(gdp, ufdp, &parms);
-- else
-- ret = if_flac_seekable_encoder_setup(gdp, ufdp, &parms);
-+ ret = if_flac_encoder_setup(gdp, ufdp, &parms);
-
- return (ret);
- }
-@@ -1351,16 +977,9 @@ if_flac_encode_chunk(gen_desc_t *gdp, by
-
- DBGPRN(DBG_SND)(errfp, "\nEncoding %d samples\n", samples);
-
-- if ((gdp->flags & GDESC_ISPIPE) != 0) {
-- ret = FLAC__stream_encoder_process(
-- ufdp->st, (void *) fenc_buf, (unsigned int) samples
-- );
-- }
-- else {
-- ret = FLAC__seekable_stream_encoder_process(
-- ufdp->sk, (void *) fenc_buf, (unsigned int) samples
-- );
-- }
-+ ret = FLAC__stream_encoder_process(
-+ ufdp->st, (void *) fenc_buf, (unsigned int) samples
-+ );
- if (!ret) {
- (void) strcpy(gdp->cdp->i->msgbuf,
- "if_flac_encode_chunk: Process encoding failed.");
-@@ -1393,14 +1012,8 @@ if_flac_halt(gen_desc_t *gdp)
-
- ufdp = (flac_desc_t *) gdp->aux;
-
-- if ((gdp->flags & GDESC_ISPIPE) != 0) {
-- FLAC__stream_encoder_finish(ufdp->st);
-- FLAC__stream_encoder_delete(ufdp->st);
-- }
-- else {
-- FLAC__seekable_stream_encoder_finish(ufdp->sk);
-- FLAC__seekable_stream_encoder_delete(ufdp->sk);
-- }
-+ FLAC__stream_encoder_finish(ufdp->st);
-+ FLAC__stream_encoder_delete(ufdp->st);
-
- MEM_FREE(ufdp);
- gdp->aux = NULL;
diff --git a/audio/xmcd/files/patch-cdda_d__pthr.c b/audio/xmcd/files/patch-cdda_d__pthr.c
deleted file mode 100644
index f58eb6bfb074..000000000000
--- a/audio/xmcd/files/patch-cdda_d__pthr.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- cdda_d/pthr.c.orig Mon Apr 5 17:41:11 2004
-+++ cdda_d/pthr.c Sun Apr 11 01:15:11 2004
-@@ -35,6 +35,7 @@
-
- #ifdef CDDA_PTHREADS
-
-+#include <sys/param.h>
- #include "cdda_d/pthr.h"
-
- /*
-@@ -889,6 +890,7 @@
- pthr_sem[DATA].v = 0;
-
- #ifndef __VMS /* VMS has no real fork, so this does not apply */
-+#if __FreeBSD_version >= 502100
- /* Register fork handler */
- if ((ret = pthread_atfork(NULL, NULL, cdda_pthr_atfork)) != 0) {
- (void) sprintf(errbuf,
-@@ -899,6 +901,7 @@
- cd->i->state = CDSTAT_COMPLETED;
- return FALSE;
- }
-+#endif
- #endif
-
- /* Ignore SIGPIPE */
diff --git a/audio/xmcd/files/patch-cddb__d_Imakefile b/audio/xmcd/files/patch-cddb__d_Imakefile
new file mode 100644
index 000000000000..c70eb9850d6e
--- /dev/null
+++ b/audio/xmcd/files/patch-cddb__d_Imakefile
@@ -0,0 +1,11 @@
+--- cddb_d/Imakefile.orig 2004-04-21 19:27:05 UTC
++++ cddb_d/Imakefile
+@@ -225,7 +225,7 @@ KOBJ= cddbkey1.o
+ /*
+ * Build rule for the CD Information Library
+ */
+-NormalLibraryTarget(cddb,$(OBJS))
++NormalLibraryTarget(cddblocal,$(OBJS))
+ NormalLibraryTarget(cddbkey1,$(KOBJ))
+ DependTarget()
+
diff --git a/audio/xmcd/files/patch-cddb_d__Imakefile b/audio/xmcd/files/patch-cddb_d__Imakefile
deleted file mode 100644
index 041fa90ca7b9..000000000000
--- a/audio/xmcd/files/patch-cddb_d__Imakefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- cddb_d/Imakefile.orig Thu May 31 12:53:57 2007
-+++ cddb_d/Imakefile Thu May 31 12:53:00 2007
-@@ -225,7 +225,7 @@
- /*
- * Build rule for the CD Information Library
- */
--NormalLibraryTarget(cddb,$(OBJS))
-+NormalLibraryTarget(cddblocal,$(OBJS))
- NormalLibraryTarget(cddbkey1,$(KOBJ))
- DependTarget()
-
diff --git a/audio/xmcd/files/patch-install.sh b/audio/xmcd/files/patch-install.sh
index 14a554f47255..ba2bc500a9d2 100644
--- a/audio/xmcd/files/patch-install.sh
+++ b/audio/xmcd/files/patch-install.sh
@@ -1,4 +1,4 @@
---- install.sh.orig 2004-04-21 19:27:01.000000000 +0000
+--- install.sh.orig 2004-04-21 19:27:01 UTC
+++ install.sh
@@ -625,7 +625,7 @@ if [ "$OS_SYS" = A/UX ]
then
diff --git a/audio/xmcd/files/patch-libdi__d_config.sh b/audio/xmcd/files/patch-libdi__d_config.sh
new file mode 100644
index 000000000000..2b3dde885470
--- /dev/null
+++ b/audio/xmcd/files/patch-libdi__d_config.sh
@@ -0,0 +1,11 @@
+--- libdi_d/config.sh.orig 2004-04-21 19:27:07 UTC
++++ libdi_d/config.sh
+@@ -744,7 +744,7 @@ ask_nonscsi_config()
+
+ if [ -z "$IOCDEF" -o "$IOCDEF" = 0 ]
+ then
+- IOCDEF=1
++ IOCDEF=2
+ fi
+
+ while :
diff --git a/audio/xmcd/files/patch-libdi_d__config.sh b/audio/xmcd/files/patch-libdi_d__config.sh
deleted file mode 100644
index c05e0b73d47a..000000000000
--- a/audio/xmcd/files/patch-libdi_d__config.sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- libdi_d/config.sh.orig Wed Apr 21 15:27:07 2004
-+++ libdi_d/config.sh Sun Mar 12 23:40:59 2006
-@@ -744,7 +744,7 @@
-
- if [ -z "$IOCDEF" -o "$IOCDEF" = 0 ]
- then
-- IOCDEF=1
-+ IOCDEF=2
- fi
-
- while :
diff --git a/audio/xmcd/files/patch-util__d_Imakefile b/audio/xmcd/files/patch-util__d_Imakefile
new file mode 100644
index 000000000000..f7bb9cb2966a
--- /dev/null
+++ b/audio/xmcd/files/patch-util__d_Imakefile
@@ -0,0 +1,11 @@
+--- util_d/Imakefile.orig 2004-04-21 19:27:24 UTC
++++ util_d/Imakefile
+@@ -43,7 +43,7 @@
+ * #include "Motif.tmpl"
+ * #include "Motif.rules"
+ */
+-LOCAL_LIBRARIES= XmClientLibs
++LOCAL_LIBRARIES= ${MOTIFLIB} XawClientLibs
+
+
+ /**** Optional defines: Change as you see fit. *****************************
diff --git a/audio/xmcd/files/patch-util_d__Imakefile b/audio/xmcd/files/patch-util_d__Imakefile
deleted file mode 100644
index 60031439f5a9..000000000000
--- a/audio/xmcd/files/patch-util_d__Imakefile
+++ /dev/null
@@ -1,19 +0,0 @@
-*** util_d/Imakefile.orig Wed May 16 15:59:16 2001
---- util_d/Imakefile Sat Jul 7 03:15:11 2001
-***************
-*** 43,49 ****
- * #include "Motif.tmpl"
- * #include "Motif.rules"
- */
-! LOCAL_LIBRARIES= XmClientLibs
-
-
- /**** Optional defines: Change as you see fit. *****************************
---- 43,49 ----
- * #include "Motif.tmpl"
- * #include "Motif.rules"
- */
-! LOCAL_LIBRARIES= ${MOTIFLIB} XawClientLibs
-
-
- /**** Optional defines: Change as you see fit. *****************************
diff --git a/audio/xmcd/files/patch-xmcd__d_Imakefile b/audio/xmcd/files/patch-xmcd__d_Imakefile
new file mode 100644
index 000000000000..16a810b9fa20
--- /dev/null
+++ b/audio/xmcd/files/patch-xmcd__d_Imakefile
@@ -0,0 +1,28 @@
+--- xmcd_d/Imakefile.orig 2004-04-21 19:27:12 UTC
++++ xmcd_d/Imakefile
+@@ -44,7 +44,7 @@
+ * #include "Motif.rules"
+ */
+
+-CDDBLIB= -L../cddb_d -lcddb
++CDDBLIB= -L../cddb_d -lcddblocal
+ LOCAL_LIBDIR= -L/usr/freeware/lib32 -L/usr/local/lib
+ VORBLIB= -lvorbisenc -lvorbis -logg
+ FLACLIB= -lFLAC
+@@ -84,7 +84,7 @@ SYS_LIBRARIES= $(CDDBLIB) $(ENCLIBS) -lm
+ #endif /* Sun5 */
+ #endif /* Linux */
+
+-LOCAL_LIBRARIES= XmClientLibs
++LOCAL_LIBRARIES= ${MOTIFLIB} XawClientLibs
+
+ #if defined(FreeBSDArchitecture)
+ .if exists(/usr/include/camlib.h)
+@@ -157,6 +157,7 @@ DEFINES=
+ #endif /* BSD/OS */
+ #endif /* Linux */
+
++MANSUFFIX=1
+
+ /*
+ * POSIX threads stuff
diff --git a/audio/xmcd/files/patch-xmcd_d__Imakefile b/audio/xmcd/files/patch-xmcd_d__Imakefile
deleted file mode 100644
index fc4f797ce280..000000000000
--- a/audio/xmcd/files/patch-xmcd_d__Imakefile
+++ /dev/null
@@ -1,28 +0,0 @@
---- xmcd_d/Imakefile.orig Mon Nov 4 06:44:44 2002
-+++ xmcd_d/Imakefile Mon Nov 4 04:44:28 2002
-@@ -44,7 +44,7 @@
- * #include "Motif.rules"
- */
-
--CDDBLIB= -L../cddb_d -lcddb
-+CDDBLIB= -L../cddb_d -lcddblocal
- LOCAL_LIBDIR= -L/usr/freeware/lib32 -L/usr/local/lib
- VORBLIB= -lvorbisenc -lvorbis -logg
- FLACLIB= -lFLAC
-@@ -82,7 +82,7 @@
- #endif /* OSF1 */
- #endif /* Linux */
-
--LOCAL_LIBRARIES= XmClientLibs
-+LOCAL_LIBRARIES= ${MOTIFLIB} XawClientLibs
-
- #if defined(FreeBSDArchitecture)
- .if exists(/usr/include/camlib.h)
-@@ -137,6 +137,7 @@
- #endif /* Linux Sun AIX Ultrix USL SVR4 */
- #endif /* BSD OSF1 sony_news Sun4 */
-
-+MANSUFFIX=1
-
- /*
- * Add local include path
diff --git a/audio/xmix/files/patch-Imakefile b/audio/xmix/files/patch-Imakefile
index 4514e9b4fabe..1fa27d42080b 100644
--- a/audio/xmix/files/patch-Imakefile
+++ b/audio/xmix/files/patch-Imakefile
@@ -1,6 +1,6 @@
---- Imakefile.orig Wed Feb 2 13:54:35 1994
-+++ Imakefile Wed Nov 1 10:25:40 2000
-@@ -14,4 +14,6 @@
+--- Imakefile.orig 1994-02-02 04:54:35 UTC
++++ Imakefile
+@@ -14,4 +14,6 @@ all:: $(PROGRAMS)
LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
diff --git a/audio/xmix/files/patch-xmix.c b/audio/xmix/files/patch-xmix.c
index bbe52114754c..0f86c06b1436 100644
--- a/audio/xmix/files/patch-xmix.c
+++ b/audio/xmix/files/patch-xmix.c
@@ -1,6 +1,6 @@
---- xmix.c.orig Wed Nov 1 10:29:04 2000
-+++ xmix.c Wed Nov 1 10:29:04 2000
-@@ -77,7 +77,7 @@
+--- xmix.c.orig 2016-07-26 16:19:49 UTC
++++ xmix.c
+@@ -77,7 +77,7 @@ to Rick! I'll call this version V2.1
#include "square_empty.bit"
#include "square_with_x.bit"
diff --git a/audio/xmixer/files/patch-Xw_Base.c b/audio/xmixer/files/patch-Xw_Base.c
new file mode 100644
index 000000000000..13a00f94a5c4
--- /dev/null
+++ b/audio/xmixer/files/patch-Xw_Base.c
@@ -0,0 +1,13 @@
+--- Xw/Base.c.orig 1999-02-05 16:30:23 UTC
++++ Xw/Base.c
+@@ -89,8 +89,8 @@ static XtActionsRec actions [] = {
+ * default translation table
+ */
+ static char defaultTranslations [] = "\
+-<FocusIn>: focus(in)
+-<FocusOut>: focus(out)
++<FocusIn>: focus(in)\n\
++<FocusOut>: focus(out)\n\
+ <Key>Tab: tab()";
+
+ /*
diff --git a/audio/xmixer/files/patch-Xw__Base.c b/audio/xmixer/files/patch-Xw__Base.c
deleted file mode 100644
index 09d7560f3f31..000000000000
--- a/audio/xmixer/files/patch-Xw__Base.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- Xw/Base.c.orig Wed Jul 23 03:56:03 2003
-+++ Xw/Base.c Wed Jul 23 03:56:43 2003
-@@ -89,8 +89,8 @@
- * default translation table
- */
- static char defaultTranslations [] = "\
--<FocusIn>: focus(in)
--<FocusOut>: focus(out)
-+<FocusIn>: focus(in)\n\
-+<FocusOut>: focus(out)\n\
- <Key>Tab: tab()";
-
- /*
diff --git a/audio/xmixer/files/patch-scf.c b/audio/xmixer/files/patch-scf.c
index 926cd2b7cea4..3dcbce4746d1 100644
--- a/audio/xmixer/files/patch-scf.c
+++ b/audio/xmixer/files/patch-scf.c
@@ -1,6 +1,6 @@
---- scf.c.orig Mon Sep 6 11:02:44 2004
-+++ scf.c Mon Sep 6 11:03:05 2004
-@@ -1009,7 +1009,7 @@
+--- scf.c.orig 2000-11-16 08:15:33 UTC
++++ scf.c
+@@ -1009,7 +1009,7 @@ key_value_pair (SCF *scf, uchar *line, s
if (*(p+1) == '\0')
break;
}
diff --git a/audio/xmixer/files/patch-xmixer.man b/audio/xmixer/files/patch-xmixer.man
index 4589d54cc581..be7a886a28e7 100644
--- a/audio/xmixer/files/patch-xmixer.man
+++ b/audio/xmixer/files/patch-xmixer.man
@@ -1,5 +1,5 @@
---- xmixer.man.orig Thu Nov 16 17:32:10 2000
-+++ xmixer.man Tue Feb 20 02:05:12 2001
+--- xmixer.man.orig 2000-11-16 08:32:10 UTC
++++ xmixer.man
@@ -4,9 +4,10 @@
.\"
.TH XMIXER 1 "Aug 1999" "GNU" "Version 0.9"
diff --git a/audio/xmmix/files/patch-Imakefile b/audio/xmmix/files/patch-Imakefile
index 79f540669263..e3e211630bb4 100644
--- a/audio/xmmix/files/patch-Imakefile
+++ b/audio/xmmix/files/patch-Imakefile
@@ -1,5 +1,5 @@
---- ./Imakefile.orig 1996-07-14 13:48:56.000000000 -0400
-+++ ./Imakefile 2012-01-07 00:24:32.000000000 -0500
+--- Imakefile.orig 1996-07-14 17:48:56 UTC
++++ Imakefile
@@ -43,7 +43,7 @@
* #include "Motif.tmpl"
* #include "Motif.rules"
diff --git a/audio/xmmix/files/patch-XMmix.ad b/audio/xmmix/files/patch-XMmix.ad
index 91df07b95d9b..7c5019e21f79 100644
--- a/audio/xmmix/files/patch-XMmix.ad
+++ b/audio/xmmix/files/patch-XMmix.ad
@@ -1,5 +1,5 @@
---- ./XMmix.ad.orig 1996-07-14 13:48:58.000000000 -0400
-+++ ./XMmix.ad 2012-01-07 00:24:32.000000000 -0500
+--- XMmix.ad.orig 1996-07-14 17:48:58 UTC
++++ XMmix.ad
@@ -26,7 +26,7 @@
!*
diff --git a/audio/xmmix/files/patch-main.c b/audio/xmmix/files/patch-main.c
index fc68a0e4b8ec..d523765c55ef 100644
--- a/audio/xmmix/files/patch-main.c
+++ b/audio/xmmix/files/patch-main.c
@@ -1,6 +1,6 @@
---- ./main.c.orig 1996-11-07 11:01:43.000000000 -0500
-+++ ./main.c 2012-01-07 00:26:29.000000000 -0500
-@@ -33,7 +33,7 @@
+--- main.c.orig 1996-11-07 16:01:43 UTC
++++ main.c
+@@ -33,7 +33,7 @@ static char *_main_c_ident_ = "@(#)main.
bool_t exit_flag; /* Flag indicating end of application */
appdata_t app_data; /* Options data */
widgets_t widgets; /* Holder of all widgets */
@@ -9,7 +9,7 @@
/***********************
-@@ -95,7 +95,7 @@
+@@ -95,7 +95,7 @@ usage(int argc, char **argv)
* main
* The main function
*/
@@ -18,7 +18,7 @@
main(int argc, char **argv)
{
XtAppContext app;
-@@ -103,6 +103,7 @@
+@@ -103,6 +103,7 @@ main(int argc, char **argv)
/* Initialize variables */
exit_flag = FALSE;
diff --git a/audio/xmmix/files/patch-mixer.c b/audio/xmmix/files/patch-mixer.c
index b25b96f1038f..051f9f9b0762 100644
--- a/audio/xmmix/files/patch-mixer.c
+++ b/audio/xmmix/files/patch-mixer.c
@@ -1,6 +1,6 @@
---- ./mixer.c.orig 1996-11-07 11:00:26.000000000 -0500
-+++ ./mixer.c 2012-01-07 00:24:32.000000000 -0500
-@@ -124,7 +124,7 @@
+--- mixer.c.orig 1996-11-07 16:00:26 UTC
++++ mixer.c
+@@ -124,7 +124,7 @@ STATIC ctlinfo_t ctlsav; /* Saved state
* Nothing
*/
STATIC void
diff --git a/audio/xmms-faad/files/patch-mp4_utils.c b/audio/xmms-faad/files/patch-mp4__utils.c
index be8e81a02534..be8e81a02534 100644
--- a/audio/xmms-faad/files/patch-mp4_utils.c
+++ b/audio/xmms-faad/files/patch-mp4__utils.c
diff --git a/audio/xmms-flac/files/patch-src_plugin__xmms_Makefile.in b/audio/xmms-flac/files/patch-src_plugin__xmms_Makefile.in
index 1f9cb005994b..67ab48074c75 100644
--- a/audio/xmms-flac/files/patch-src_plugin__xmms_Makefile.in
+++ b/audio/xmms-flac/files/patch-src_plugin__xmms_Makefile.in
@@ -1,6 +1,6 @@
---- src/plugin_xmms/Makefile.in.orig 2013-05-27 10:11:57.951933000 +0200
-+++ src/plugin_xmms/Makefile.in 2013-06-09 19:13:03.000000000 +0200
-@@ -127,8 +127,7 @@ libxmms_flac_la_DEPENDENCIES = \
+--- src/plugin_xmms/Makefile.in.orig 2014-11-27 02:47:01 UTC
++++ src/plugin_xmms/Makefile.in
+@@ -156,8 +156,7 @@ libxmms_flac_la_DEPENDENCIES = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
$(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
@@ -10,7 +10,7 @@
am__objects_1 = charset.lo configure.lo fileinfo.lo http.lo plugin.lo \
tag.lo
am_libxmms_flac_la_OBJECTS = $(am__objects_1)
-@@ -360,8 +359,7 @@ libxmms_flac_la_LIBADD = \
+@@ -413,8 +412,7 @@ libxmms_flac_la_LIBADD = \
$(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
$(top_builddir)/src/share/utf8/libutf8.la \
diff --git a/audio/xmms-ladspa/files/patch-Makefile b/audio/xmms-ladspa/files/patch-Makefile
index bb7ac1b16632..07d878750dd8 100644
--- a/audio/xmms-ladspa/files/patch-Makefile
+++ b/audio/xmms-ladspa/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig Wed Apr 7 23:52:16 2004
-+++ Makefile Wed Apr 7 23:52:50 2004
-@@ -4,7 +4,7 @@
+--- Makefile.orig 2005-03-16 02:39:32 UTC
++++ Makefile
+@@ -4,7 +4,7 @@ VER=1.1
DOCS= README PLUGINS COPYING ChangeLog
CODE= Makefile ladspa.c ladspa.h
@@ -9,7 +9,7 @@
all: ladspa.so
@echo
-@@ -24,4 +24,4 @@
+@@ -24,4 +24,4 @@ clean:
rm ladspa.so
ladspa.so: ladspa.c
diff --git a/audio/xmms-nas/files/patch-Makefile.in b/audio/xmms-nas/files/patch-Makefile.in
index cfe1efcc7626..58edb3ddc76a 100644
--- a/audio/xmms-nas/files/patch-Makefile.in
+++ b/audio/xmms-nas/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig Mon Oct 3 18:47:32 2005
-+++ Makefile.in Mon Oct 3 18:47:49 2005
-@@ -81,7 +81,7 @@
+--- Makefile.in.orig 1999-09-02 00:12:26 UTC
++++ Makefile.in
+@@ -81,7 +81,7 @@ XMMS_PATH = @XMMS_PATH@
lib_LTLIBRARIES = libnas.la
diff --git a/audio/xmms-nas/files/patch-configure b/audio/xmms-nas/files/patch-configure
index 388c59359688..bc5b15e4a010 100644
--- a/audio/xmms-nas/files/patch-configure
+++ b/audio/xmms-nas/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Mon Oct 3 18:50:19 2005
-+++ configure Mon Oct 3 18:51:58 2005
-@@ -3140,6 +3140,7 @@
+--- configure.orig 1999-09-01 22:23:19 UTC
++++ configure
+@@ -3140,6 +3140,7 @@ fi
NAS_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS -laudio -lXt -lm"
NAS_CFLAGS=$X_CFLAGS
LIBS=$NAS_LIBS
@@ -8,7 +8,7 @@
CFLAGS=$NAS_CFLAGS
echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
-@@ -3191,6 +3192,7 @@
+@@ -3191,6 +3192,7 @@ else
fi
diff --git a/audio/xmms-nas/files/patch-nas.h b/audio/xmms-nas/files/patch-nas.h
index e238d9bf7b3a..9503328535dd 100644
--- a/audio/xmms-nas/files/patch-nas.h
+++ b/audio/xmms-nas/files/patch-nas.h
@@ -1,5 +1,5 @@
---- nas.h.orig Mon Oct 3 18:53:39 2005
-+++ nas.h Mon Oct 3 18:53:51 2005
+--- nas.h.orig 1999-08-07 02:52:06 UTC
++++ nas.h
@@ -21,7 +21,6 @@
#ifndef NAS_H
#define NAS_H
diff --git a/audio/xmms-nsf/files/patch-src__nes__audiosys.c b/audio/xmms-nsf/files/patch-src__nes__audiosys.c
deleted file mode 100644
index 17b39688c636..000000000000
--- a/audio/xmms-nsf/files/patch-src__nes__audiosys.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- ./src/nes/audiosys.c.orig Sun Jan 7 05:17:57 2001
-+++ ./src/nes/audiosys.c Wed Jan 10 20:10:34 2007
-@@ -8,8 +8,11 @@
-
- static NES_AUDIO_HANDLER *nah = 0;
- static NES_VOLUME_HANDLER *nvh = 0;
--void NESAudioRender(Int16 *bufp, Uint buflen)
-+Uint32 NESAudioRender(Int16 *bufp, Uint buflen)
- {
-+ Int16 x;
-+ Uint32 count = 0;
-+
- while (buflen--)
- {
- NES_AUDIO_HANDLER *ph;
-@@ -31,9 +34,17 @@
- else
- output = accum;
- output >>= 8;
-- *bufp++ = ((Int32)output) - 0x8000;
-+ x = ((Int32)output) - 0x8000;
-+ if (abs(x) < 96)
-+ count++;
-+ else
-+ count = 0;
-+
-+ *bufp++ = x;
- }
- }
-+
-+ return count;
- }
-
- void NESVolume(Uint volume)
diff --git a/audio/xmms-nsf/files/patch-src__nes__audiosys.h b/audio/xmms-nsf/files/patch-src__nes__audiosys.h
deleted file mode 100644
index 396adb8183f0..000000000000
--- a/audio/xmms-nsf/files/patch-src__nes__audiosys.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/nes/audiosys.h.orig Sun Jan 7 05:17:56 2001
-+++ ./src/nes/audiosys.h Wed Jan 10 20:10:34 2007
-@@ -21,7 +21,7 @@
- } NES_VOLUME_HANDLER;
-
-
--void NESAudioRender(Int16 *bufp, Uint buflen);
-+Uint32 NESAudioRender(Int16 *bufp, Uint buflen);
- void NESAudioHandlerInstall(NES_AUDIO_HANDLER *ph);
- void NESAudioFrequencySet(Uint freq);
- Uint NESAudioFrequencyGet(void);
diff --git a/audio/xmms-nsf/files/patch-src__nes__handler.c b/audio/xmms-nsf/files/patch-src__nes__handler.c
deleted file mode 100644
index 8c28ac55d005..000000000000
--- a/audio/xmms-nsf/files/patch-src__nes__handler.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- ./src/nes/handler.c.orig Sun Jan 7 05:17:57 2001
-+++ ./src/nes/handler.c Wed Jan 10 20:10:34 2007
-@@ -10,9 +10,9 @@
- static NES_READ_HANDLER *(nprh[0x10]) = { 0, };
- static NES_WRITE_HANDLER *(npwh[0x10]) = { 0, };
- #define EXTREADWRITE(p) \
--static Uint __fastcall ExtRd##p##(Uint A) \
-+static Uint __fastcall ExtRd##p (Uint A) \
- { \
-- NES_READ_HANDLER *ph = nprh[0x##p##]; \
-+ NES_READ_HANDLER *ph = nprh[0x##p ]; \
- do \
- { \
- if (ph->min <= A && A <= ph->max) \
-@@ -22,9 +22,9 @@
- } while ((ph = ph->next) != 0); \
- return 0; \
- } \
--static void __fastcall ExtWr##p##(Uint A, Uint V) \
-+static void __fastcall ExtWr##p (Uint A, Uint V) \
- { \
-- NES_WRITE_HANDLER *ph = npwh[0x##p##]; \
-+ NES_WRITE_HANDLER *ph = npwh[0x##p ]; \
- do \
- { \
- if (ph->min <= A && A <= ph->max) \
diff --git a/audio/xmms-nsf/files/patch-src__nes__km6502__km6502cd.h b/audio/xmms-nsf/files/patch-src__nes__km6502__km6502cd.h
deleted file mode 100644
index 7dd3d0c0053c..000000000000
--- a/audio/xmms-nsf/files/patch-src__nes__km6502__km6502cd.h
+++ /dev/null
@@ -1,417 +0,0 @@
---- ./src/nes/km6502/km6502cd.h.orig Sun Jan 7 05:18:05 2001
-+++ ./src/nes/km6502/km6502cd.h Wed Jan 10 20:10:34 2007
-@@ -361,27 +361,27 @@
-
- /* --- ADC --- */
- #if BUILD_HUC6280
--#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KMI_ADC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
--static void OpcodeCall D_Opco##i##(__CONTEXT) \
--{ KMI_ADC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
--static void OpcodeCall T_Opco##i##(__CONTEXT) \
-+#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KMI_ADC(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
-+static void OpcodeCall D_Opco##i (__CONTEXT) \
-+{ KMI_ADC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
-+static void OpcodeCall T_Opco##i (__CONTEXT) \
- { \
- Uword saveA = KMI_PRET(__THISP); \
-- KMI_ADC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
-+ KMI_ADC(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
- KMI_POSTT(__THISP_ saveA); \
- } \
--static void OpcodeCall TD_Opc##i##(__CONTEXT) \
-+static void OpcodeCall TD_Opc##i (__CONTEXT) \
- { \
- Uword saveA = KMI_PRET(__THISP); \
-- KMI_ADC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
-+ KMI_ADC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
- KMI_POSTT(__THISP_ saveA); \
- }
- #else
--#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KMI_ADC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
--static void OpcodeCall D_Opco##i##(__CONTEXT) \
--{ KMI_ADC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KMI_ADC(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
-+static void OpcodeCall D_Opco##i (__CONTEXT) \
-+{ KMI_ADC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- #endif
- DEF_ADC(61,NP,KA_INDX) /* 61 - ADC - (Indirect,X) */
- DEF_ADC(65,ZP,KA_ZP) /* 65 - ADC - Zero Page */
-@@ -397,17 +397,17 @@
-
- /* --- AND --- */
- #if BUILD_HUC6280
--#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_AND(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
--static void OpcodeCall T_Opco##i##(__CONTEXT) \
-+#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_AND(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
-+static void OpcodeCall T_Opco##i (__CONTEXT) \
- { \
- Uword saveA = KMI_PRET(__THISP); \
-- KM_AND(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
-+ KM_AND(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
- KMI_POSTT(__THISP_ saveA); \
- }
- #else
--#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_AND(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_AND(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- #endif
- DEF_AND(21,NP,KA_INDX) /* 21 - AND - (Indirect,X) */
- DEF_AND(25,ZP,KA_ZP) /* 25 - AND - Zero Page */
-@@ -422,10 +422,10 @@
- #endif
-
- /* --- ASL --- */
--#define DEF_ASL(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_ASL(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_ASL(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_ASL(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_ASL(06,ZP,KA_ZP) /* 06 - ASL - Zero Page */
- DEF_ASL(0E,NP,KA_ABS) /* 0E - ASL - Absolute */
-@@ -436,7 +436,7 @@
-
- #if BUILD_HUC6280
- /* --- BBRi --- */
--#define DEF_BBR(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_BBR(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = KA_ZP(__THISP); \
- Uword rel = K_READ(__THISP_ KA_IMM(__THISP)); \
-@@ -451,7 +451,7 @@
- DEF_BBR(6F,6) /* 6F - BBR6 */
- DEF_BBR(7F,7) /* 7F - BBR7 */
- /* --- BBSi --- */
--#define DEF_BBS(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_BBS(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = KA_ZP(__THISP); \
- Uword rel = K_READ(__THISP_ KA_IMM(__THISP)); \
-@@ -468,8 +468,8 @@
- #endif
-
- /* --- BIT --- */
--#define DEF_BIT(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_BIT(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_BIT(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_BIT(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_BIT(24,ZP,KA_ZP) /* 24 - BIT - Zero Page */
- DEF_BIT(2C,NP,KA_ABS) /* 2C - BIT - Absolute */
- #if BUILD_HUC6280 || BUILD_M65C02
-@@ -479,7 +479,7 @@
- #endif
-
- /* --- Bcc --- */
--#define DEF_BRA(i,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_BRA(i,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword rel = K_READ(__THISP_ KA_IMM(__THISP)); \
- if (a) KM_BRA(__THISP_ rel); \
-@@ -536,8 +536,8 @@
- { __THIS__.P &= ~V_FLAG; }
-
- /* --- CMP --- */
--#define DEF_CMP(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_CMP(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_CMP(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_CMP(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_CMP(C1,NP,KA_INDX) /* C1 - CMP - (Indirect,X) */
- DEF_CMP(C5,ZP,KA_ZP) /* C5 - CMP - Zero Page */
- DEF_CMP(C9,NP,KA_IMM) /* C9 - CMP - Immediate */
-@@ -551,24 +551,24 @@
- #endif
-
- /* --- CPX --- */
--#define DEF_CPX(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_CPX(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_CPX(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_CPX(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_CPX(E0,NP,KA_IMM) /* E0 - CPX - Immediate */
- DEF_CPX(E4,ZP,KA_ZP) /* E4 - CPX - Zero Page */
- DEF_CPX(EC,NP,KA_ABS) /* EC - CPX - Absolute */
-
- /* --- CPY --- */
--#define DEF_CPY(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_CPY(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_CPY(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_CPY(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_CPY(C0,NP,KA_IMM) /* C0 - CPY - Immediate */
- DEF_CPY(C4,ZP,KA_ZP) /* C4 - CPY - Zero Page */
- DEF_CPY(CC,NP,KA_ABS) /* CC - CPY - Absolute */
-
- /* --- DEC --- */
--#define DEF_DEC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_DEC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_DEC(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_DEC(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_DEC(C6,ZP,KA_ZP) /* C6 - DEC - Zero Page */
- DEF_DEC(CE,NP,KA_ABS) /* CE - DEC - Absolute */
-@@ -585,17 +585,17 @@
-
- /* --- EOR --- */
- #if BUILD_HUC6280
--#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_EOR(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
--static void OpcodeCall T_Opco##i##(__CONTEXT) \
-+#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_EOR(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
-+static void OpcodeCall T_Opco##i (__CONTEXT) \
- { \
- Uword saveA = KMI_PRET(__THISP); \
-- KM_EOR(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
-+ KM_EOR(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
- KMI_POSTT(__THISP_ saveA); \
- }
- #else
--#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_EOR(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_EOR(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- #endif
- DEF_EOR(41,NP,KA_INDX) /* 41 - EOR - (Indirect,X) */
- DEF_EOR(45,ZP,KA_ZP) /* 45 - EOR - Zero Page */
-@@ -610,10 +610,10 @@
- #endif
-
- /* --- INC --- */
--#define DEF_INC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_INC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_INC(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_INC(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_INC(E6,ZP,KA_ZP) /* E6 - INC - Zero Page */
- DEF_INC(EE,NP,KA_ABS) /* EE - INC - Absolute */
-@@ -629,12 +629,12 @@
- { __THIS__.Y = KM_INC(__THISP_ __THIS__.Y); }
-
- /* --- JMP --- */
--#define DEF_JMP(i,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_JMP(i,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { __THIS__.PC = KI_READWORD(__THISP_ a(__THISP)); }
- #if BUILD_HUC6280 || BUILD_M65C02
- #define DEF_JMPBUG(i,a) DEF_JMP(i,a)
- #else
--#define DEF_JMPBUG(i,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_JMPBUG(i,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { __THIS__.PC = KI_READWORDBUG(__THISP_ a(__THISP)); }
- #endif
- DEF_JMP(4C,KA_IMM16) /* 4C - JMP - Immediate */
-@@ -653,8 +653,8 @@
- }
-
- /* --- LDA --- */
--#define DEF_LDA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ __THIS__.A = KM_LD(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_LDA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ __THIS__.A = KM_LD(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_LDA(A1,NP,KA_INDX) /* A1 - LDA - (Indirect,X) */
- DEF_LDA(A5,ZP,KA_ZP) /* A5 - LDA - Zero Page */
- DEF_LDA(A9,NP,KA_IMM) /* A9 - LDA - Immediate */
-@@ -668,8 +668,8 @@
- #endif
-
- /* --- LDX --- */
--#define DEF_LDX(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ __THIS__.X = KM_LD(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_LDX(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ __THIS__.X = KM_LD(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_LDX(A2,NP,KA_IMM) /* A2 - LDX - Immediate */
- DEF_LDX(A6,ZP,KA_ZP) /* A6 - LDX - Zero Page */
- DEF_LDX(AE,NP,KA_ABS) /* AE - LDX - Absolute */
-@@ -677,8 +677,8 @@
- DEF_LDX(BE,NP,KA_ABSY_) /* BE - LDX - Absolute,Y */
-
- /* --- LDY --- */
--#define DEF_LDY(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ __THIS__.Y = KM_LD(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_LDY(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ __THIS__.Y = KM_LD(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_LDY(A0,NP,KA_IMM) /* A0 - LDY - Immediate */
- DEF_LDY(A4,ZP,KA_ZP) /* A4 - LDY - Zero Page */
- DEF_LDY(AC,NP,KA_ABS) /* AC - LDY - Absolute */
-@@ -686,10 +686,10 @@
- DEF_LDY(BC,NP,KA_ABSX_) /* BC - LDY - Absolute,X */
-
- /* --- LSR --- */
--#define DEF_LSR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_LSR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_LSR(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_LSR(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_LSR(46,ZP,KA_ZP) /* 46 - LSR - Zero Page */
- DEF_LSR(4E,NP,KA_ABS) /* 4E - LSR - Absolute */
-@@ -705,17 +705,17 @@
-
- /* --- ORA --- */
- #if BUILD_HUC6280
--#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_ORA(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
--static void OpcodeCall T_Opco##i##(__CONTEXT) \
-+#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_ORA(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
-+static void OpcodeCall T_Opco##i (__CONTEXT) \
- { \
- Uword saveA = KMI_PRET(__THISP); \
-- KM_ORA(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
-+ KM_ORA(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
- KMI_POSTT(__THISP_ saveA); \
- }
- #else
--#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KM_ORA(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KM_ORA(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- #endif
- DEF_ORA(01,NP,KA_INDX) /* 01 - ORA - (Indirect,X) */
- DEF_ORA(05,ZP,KA_ZP) /* 05 - ORA - Zero Page */
-@@ -751,7 +751,7 @@
-
- #if BUILD_HUC6280
- /* --- RMBi --- */
--#define DEF_RMB(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_RMB(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = KA_ZP(__THISP); \
- K_WRITEZP(__THISP_ adr, (Uword)(K_READZP(__THISP_ adr) & (~(1 << y)))); \
-@@ -765,7 +765,7 @@
- DEF_RMB(67,6) /* 67 - RMB6 */
- DEF_RMB(77,7) /* 77 - RMB7 */
- /* --- SMBi --- */
--#define DEF_SMB(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_SMB(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = KA_ZP(__THISP); \
- K_WRITEZP(__THISP_ adr, (Uword)(K_READZP(__THISP_ adr) | (1 << y))); \
-@@ -781,10 +781,10 @@
- #endif
-
- /* --- ROL --- */
--#define DEF_ROL(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_ROL(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_ROL(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_ROL(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_ROL(26,ZP,KA_ZP) /* 26 - ROL - Zero Page */
- DEF_ROL(2E,NP,KA_ABS) /* 2E - ROL - Absolute */
-@@ -794,10 +794,10 @@
- { __THIS__.A = KM_ROL(__THISP_ __THIS__.A); }
-
- /* --- ROR --- */
--#define DEF_ROR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_ROR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_ROR(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_ROR(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_ROR(66,ZP,KA_ZP) /* 66 - ROR - Zero Page */
- DEF_ROR(6E,NP,KA_ABS) /* 6E - ROR - Absolute */
-@@ -841,10 +841,10 @@
- #endif
-
- /* --- SBC --- */
--#define DEF_SBC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ KMI_SBC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
--static void OpcodeCall D_Opco##i##(__CONTEXT) \
--{ KMI_SBC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
-+#define DEF_SBC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ KMI_SBC(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
-+static void OpcodeCall D_Opco##i (__CONTEXT) \
-+{ KMI_SBC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
- DEF_SBC(E1,NP,KA_INDX) /* E1 - SBC - (Indirect,X) */
- DEF_SBC(E5,ZP,KA_ZP) /* E5 - SBC - Zero Page */
- DEF_SBC(E9,NP,KA_IMM) /* E9 - SBC - Immediate */
-@@ -883,8 +883,8 @@
- #endif
-
- /* --- STA --- */
--#define DEF_STA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ K_WRITE##p##(__THISP_ a(__THISP), __THIS__.A); }
-+#define DEF_STA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ K_WRITE##p (__THISP_ a(__THISP), __THIS__.A); }
- DEF_STA(81,NP,KA_INDX) /* 81 - STA - (Indirect,X) */
- DEF_STA(85,ZP,KA_ZP) /* 85 - STA - Zero Page */
- DEF_STA(8D,NP,KA_ABS) /* 8D - STA - Absolute */
-@@ -897,23 +897,23 @@
- #endif
-
- /* --- STX --- */
--#define DEF_STX(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ K_WRITE##p##(__THISP_ a(__THISP), __THIS__.X); }
-+#define DEF_STX(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ K_WRITE##p (__THISP_ a(__THISP), __THIS__.X); }
- DEF_STX(86,ZP,KA_ZP) /* 86 - STX - Zero Page */
- DEF_STX(8E,NP,KA_ABS) /* 8E - STX - Absolute */
- DEF_STX(96,ZP,KA_ZPY) /* 96 - STX - Zero Page,Y */
-
- /* --- STY --- */
--#define DEF_STY(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ K_WRITE##p##(__THISP_ a(__THISP), __THIS__.Y); }
-+#define DEF_STY(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ K_WRITE##p (__THISP_ a(__THISP), __THIS__.Y); }
- DEF_STY(84,ZP,KA_ZP) /* 84 - STY - Zero Page */
- DEF_STY(8C,NP,KA_ABS) /* 8C - STY - Absolute */
- DEF_STY(94,ZP,KA_ZPX) /* 94 - STY - Zero Page,X */
-
- #if BUILD_HUC6280 || BUILD_M65C02
- /* --- STZ --- */
--#define DEF_STZ(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
--{ K_WRITE##p##(__THISP_ a(__THISP), 0); }
-+#define DEF_STZ(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
-+{ K_WRITE##p (__THISP_ a(__THISP), 0); }
- DEF_STZ(64,ZP,KA_ZP) /* 64 - STZ - Zero Page */
- DEF_STZ(9C,NP,KA_ABS) /* 9C - STZ - Absolute */
- DEF_STZ(74,ZP,KA_ZPX) /* 74 - STZ - Zero Page,X */
-@@ -931,18 +931,18 @@
-
- #if BUILD_HUC6280 || BUILD_M65C02
- /* --- TRB --- */
--#define DEF_TRB(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_TRB(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_TRB(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_TRB(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_TRB(14,ZP,KA_ZP) /* 14 - TRB - Zero Page */
- DEF_TRB(1C,NP,KA_ABS) /* 1C - TRB - Absolute */
- /* --- TSB --- */
--#define DEF_TSB(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_TSB(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword adr = a(__THISP); \
-- K_WRITE##p##(__THISP_ adr, KM_TSB(__THISP_ K_READ##p##(__THISP_ adr))); \
-+ K_WRITE##p (__THISP_ adr, KM_TSB(__THISP_ K_READ##p (__THISP_ adr))); \
- }
- DEF_TSB(04,ZP,KA_ZP) /* 04 - TSB - Zero Page */
- DEF_TSB(0C,NP,KA_ABS) /* 0C - TSB - Absolute */
-@@ -950,10 +950,10 @@
-
- #if BUILD_HUC6280
- /* --- TST --- */
--#define DEF_TST(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
-+#define DEF_TST(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
- { \
- Uword imm = K_READ(__THISP_ KA_IMM(__THISP)); \
-- KM_TST(__THISP_ imm, K_READ##p##(__THISP_ a(__THISP))); \
-+ KM_TST(__THISP_ imm, K_READ##p (__THISP_ a(__THISP))); \
- }
- DEF_TST(83,ZP,KA_ZP) /* 83 - TST - Zero Page */
- DEF_TST(93,NP,KA_ABS) /* 93 - TST - Absolute */
diff --git a/audio/xmms-nsf/files/patch-src__nes__km6502__km6502ot.h b/audio/xmms-nsf/files/patch-src__nes__km6502__km6502ot.h
deleted file mode 100644
index 2c4cfc1376cf..000000000000
--- a/audio/xmms-nsf/files/patch-src__nes__km6502__km6502ot.h
+++ /dev/null
@@ -1,51 +0,0 @@
---- ./src/nes/km6502/km6502ot.h.orig Sun Jan 7 05:18:05 2001
-+++ ./src/nes/km6502/km6502ot.h Wed Jan 10 20:10:34 2007
-@@ -1,35 +1,35 @@
- #define OPxx(i)
- #define OP__(i) \
-- case 0x##i##: \
-- Opcode##i##(__THISP); \
-+ case 0x##i : \
-+ Opcode##i (__THISP); \
- break;
- #define OP_d(i) \
-- case 0x##i##: \
-+ case 0x##i : \
- if (__THIS__.P & D_FLAG) \
-- D_Opco##i##(__THISP); \
-+ D_Opco##i (__THISP); \
- else \
-- Opcode##i##(__THISP); \
-+ Opcode##i (__THISP); \
- break;
- #if BUILD_HUC6280
- #define OPtd(i) \
-- case 0x##i##: \
-+ case 0x##i : \
- if (__THIS__.P & T_FLAG) \
- if (__THIS__.P & D_FLAG) \
-- TD_Opc##i##(__THISP); \
-+ TD_Opc##i (__THISP); \
- else \
-- T_Opco##i##(__THISP); \
-+ T_Opco##i (__THISP); \
- else \
- if (__THIS__.P & D_FLAG) \
-- D_Opco##i##(__THISP); \
-+ D_Opco##i (__THISP); \
- else \
-- Opcode##i##(__THISP); \
-+ Opcode##i (__THISP); \
- break;
- #define OPt_(i) \
-- case 0x##i##: \
-+ case 0x##i : \
- if (__THIS__.P & T_FLAG) \
-- T_Opco##i##(__THISP); \
-+ T_Opco##i (__THISP); \
- else \
-- Opcode##i##(__THISP); \
-+ Opcode##i (__THISP); \
- break;
- #else
- #define OPtd OP_d
diff --git a/audio/xmms-nsf/files/patch-src__xmms__callbacks.c b/audio/xmms-nsf/files/patch-src__xmms__callbacks.c
deleted file mode 100644
index b9f94ed7ac6c..000000000000
--- a/audio/xmms-nsf/files/patch-src__xmms__callbacks.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./src/xmms/callbacks.c.orig Sun Jul 23 12:06:43 2000
-+++ ./src/xmms/callbacks.c Wed Jan 10 20:10:34 2007
-@@ -219,7 +219,7 @@
- widget = lookup_widget(GTK_WIDGET(button), "spinbutton1");
- nsf_cfg.play_time = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
- widget = lookup_widget(GTK_WIDGET(button), "spinbutton2");
-- nsf_cfg.fadeout_time = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
-+ nsf_cfg.silence_time = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
-
- filename = g_strconcat(g_get_home_dir(), "/.xmms/config", NULL);
- cfg = xmms_cfg_open_file(filename);
-@@ -228,7 +228,7 @@
- }
-
- xmms_cfg_write_int(cfg, "NSF", "play_time",nsf_cfg.play_time);
-- xmms_cfg_write_int(cfg, "NSF", "fadeout_time",nsf_cfg.fadeout_time);
-+ xmms_cfg_write_int(cfg, "NSF", "silence_time",nsf_cfg.silence_time);
- xmms_cfg_write_file(cfg, filename);
- xmms_cfg_free(cfg);
- g_free(filename);
diff --git a/audio/xmms-nsf/files/patch-src__xmms__interface.c b/audio/xmms-nsf/files/patch-src__xmms__interface.c
deleted file mode 100644
index 010a64d54b24..000000000000
--- a/audio/xmms-nsf/files/patch-src__xmms__interface.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/xmms/interface.c.orig Sun Jul 23 11:41:14 2000
-+++ ./src/xmms/interface.c Wed Jan 10 20:10:34 2007
-@@ -106,7 +106,7 @@
- gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
- gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
-
-- label3 = gtk_label_new ("Fadeout Time:");
-+ label3 = gtk_label_new ("Silence Until Next Song:");
- gtk_widget_ref (label3);
- gtk_object_set_data_full (GTK_OBJECT (configure), "label3", label3,
- (GtkDestroyNotify) gtk_widget_unref);
diff --git a/audio/xmms-nsf/files/patch-src__xmms__nsf.c b/audio/xmms-nsf/files/patch-src__xmms__nsf.c
deleted file mode 100644
index 23a166e77a4f..000000000000
--- a/audio/xmms-nsf/files/patch-src__xmms__nsf.c
+++ /dev/null
@@ -1,85 +0,0 @@
---- ./src/xmms/nsf.c.orig Sun Jan 7 06:15:12 2001
-+++ ./src/xmms/nsf.c Wed Jan 10 20:13:26 2007
-@@ -23,7 +23,8 @@
-
- #define VERSION "0.0.3"
- #define PLAYTIME 30
--#define FADEOUTTIME 5
-+#define SILENCETIME 5
-+#define FREQ 44100
-
- #include "nsf.h"
-
-@@ -328,7 +329,7 @@
- widget = lookup_widget(nsf_configure_win, "spinbutton1");
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), nsf_cfg.play_time);
- widget = lookup_widget(nsf_configure_win, "spinbutton2");
-- gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), nsf_cfg.fadeout_time);
-+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), nsf_cfg.silence_time);
-
- gtk_widget_show(nsf_configure_win);
- }else{
-@@ -357,7 +358,7 @@
- nsf_win->dock_window_list = NULL;
-
- nsf_cfg.play_time = PLAYTIME; /* second */
-- nsf_cfg.fadeout_time = FADEOUTTIME; /* second */
-+ nsf_cfg.silence_time = SILENCETIME; /* second */
- nsf_cfg.player_shaded = FALSE;
- nsf_cfg.easy_move = FALSE;
-
-@@ -365,7 +366,7 @@
-
- if ((cfg = xmms_cfg_open_file(filename)) != 0){
- xmms_cfg_read_int(cfg, "NSF", "play_time", &nsf_cfg.play_time);
-- xmms_cfg_read_int(cfg, "NSF", "fadeout_time", &nsf_cfg.fadeout_time);
-+ xmms_cfg_read_int(cfg, "NSF", "silence_time", &nsf_cfg.silence_time);
- xmms_cfg_free(cfg);
- }
- }
-@@ -439,10 +440,11 @@
- {
- char data[2048 * 2];
- int bytes, blk_size, rate;
-+ Uint32 c = 0, count = 0;
-
- //setting NSF
- NSFSetSongNo(nsf_file->current_song);
-- NESAudioFrequencySet(44100);
-+ NESAudioFrequencySet(FREQ);
- NESReset();
-
- //16bit/8bit * 1channel * 512 sample = 1024byte
-@@ -460,7 +462,15 @@
- }
- if (bytes > 0){
- //read 1024byte = 512 sample * 2byte
-- NESAudioRender(data, bytes/2);
-+ c = NESAudioRender((Int16*)data, bytes/2);
-+ if (c < 512)
-+ count = 0;
-+ else
-+ count += c;
-+ if (count > FREQ*nsf_cfg.silence_time) {
-+ nsf_file->eos = 1;
-+ count = 0;
-+ }
- nsf_ip.add_vis_pcm(nsf_ip.output->written_time(), (nsf_file->bits_per_sample == 16) ? FMT_S16_LE : FMT_U8,
- nsf_file->channels, bytes, data);
-
-@@ -512,11 +522,14 @@
- if (!(nsf_file->file = fopen(filename, "rb"))){
- return;
- }
-+
-+ nsf_about();
-+
- fseek(nsf_file->file, 0, SEEK_END);
- count = ftell(nsf_file->file);
- fseek(nsf_file->file, 0, SEEK_SET);
-
-- (void*)buffer = g_malloc0(count);
-+ buffer = (void*)g_malloc0(count);
- for(i=0;i<count;i++){
- *(buffer+i) = fgetc(nsf_file->file);
- }
diff --git a/audio/xmms-nsf/files/patch-src__xmms__nsf.h b/audio/xmms-nsf/files/patch-src__xmms__nsf.h
deleted file mode 100644
index e67712d5a676..000000000000
--- a/audio/xmms-nsf/files/patch-src__xmms__nsf.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/xmms/nsf.h.orig Sun Jul 23 12:00:35 2000
-+++ ./src/xmms/nsf.h Wed Jan 10 20:10:34 2007
-@@ -58,7 +58,7 @@
- typedef struct
- {
- gint play_time;
-- gint fadeout_time;
-+ gint silence_time;
- // reserve
- gint resolution;
- gint channels;
diff --git a/audio/xmms-nsf/files/patch-src__xmms__nsflib.h b/audio/xmms-nsf/files/patch-src__xmms__nsflib.h
deleted file mode 100644
index 548c7eb55c1a..000000000000
--- a/audio/xmms-nsf/files/patch-src__xmms__nsflib.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- ./src/xmms/nsflib.h.orig Sun Jul 23 12:05:21 2000
-+++ ./src/xmms/nsflib.h Wed Jan 10 20:10:34 2007
-@@ -1,10 +1,11 @@
- typedef signed short Int16;
- typedef unsigned int Uint;
-+typedef unsigned int Uint32;
- typedef unsigned char Uint8;
-
- Uint NSFLoad(Uint8 *pData, Uint uSize);
- void NSFSetSongNo(Uint uSongNo);
- void NESAudioFrequencySet(Uint freq);
- void NESReset(void);
--void NESAudioRender(Int16 *bufp, Uint buflen);
-+Uint32 NESAudioRender(Int16 *bufp, Uint buflen);
- void NESTerminate(void);
diff --git a/audio/xmms-nsf/files/patch-src_nes_audiosys.c b/audio/xmms-nsf/files/patch-src_nes_audiosys.c
new file mode 100644
index 000000000000..c8213d1c7575
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_nes_audiosys.c
@@ -0,0 +1,34 @@
+--- src/nes/audiosys.c.orig 2001-01-07 04:17:57 UTC
++++ src/nes/audiosys.c
+@@ -8,8 +8,11 @@
+
+ static NES_AUDIO_HANDLER *nah = 0;
+ static NES_VOLUME_HANDLER *nvh = 0;
+-void NESAudioRender(Int16 *bufp, Uint buflen)
++Uint32 NESAudioRender(Int16 *bufp, Uint buflen)
+ {
++ Int16 x;
++ Uint32 count = 0;
++
+ while (buflen--)
+ {
+ NES_AUDIO_HANDLER *ph;
+@@ -31,9 +34,17 @@ void NESAudioRender(Int16 *bufp, Uint bu
+ else
+ output = accum;
+ output >>= 8;
+- *bufp++ = ((Int32)output) - 0x8000;
++ x = ((Int32)output) - 0x8000;
++ if (abs(x) < 96)
++ count++;
++ else
++ count = 0;
++
++ *bufp++ = x;
+ }
+ }
++
++ return count;
+ }
+
+ void NESVolume(Uint volume)
diff --git a/audio/xmms-nsf/files/patch-src_nes_audiosys.h b/audio/xmms-nsf/files/patch-src_nes_audiosys.h
new file mode 100644
index 000000000000..fd6143b26039
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_nes_audiosys.h
@@ -0,0 +1,11 @@
+--- src/nes/audiosys.h.orig 2001-01-07 04:17:56 UTC
++++ src/nes/audiosys.h
+@@ -21,7 +21,7 @@ typedef struct NES_VOLUME_HANDLER_TAG {
+ } NES_VOLUME_HANDLER;
+
+
+-void NESAudioRender(Int16 *bufp, Uint buflen);
++Uint32 NESAudioRender(Int16 *bufp, Uint buflen);
+ void NESAudioHandlerInstall(NES_AUDIO_HANDLER *ph);
+ void NESAudioFrequencySet(Uint freq);
+ Uint NESAudioFrequencyGet(void);
diff --git a/audio/xmms-nsf/files/patch-src_nes_handler.c b/audio/xmms-nsf/files/patch-src_nes_handler.c
new file mode 100644
index 000000000000..8da5cc3e93f2
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_nes_handler.c
@@ -0,0 +1,26 @@
+--- src/nes/handler.c.orig 2001-01-07 04:17:57 UTC
++++ src/nes/handler.c
+@@ -10,9 +10,9 @@
+ static NES_READ_HANDLER *(nprh[0x10]) = { 0, };
+ static NES_WRITE_HANDLER *(npwh[0x10]) = { 0, };
+ #define EXTREADWRITE(p) \
+-static Uint __fastcall ExtRd##p##(Uint A) \
++static Uint __fastcall ExtRd##p (Uint A) \
+ { \
+- NES_READ_HANDLER *ph = nprh[0x##p##]; \
++ NES_READ_HANDLER *ph = nprh[0x##p ]; \
+ do \
+ { \
+ if (ph->min <= A && A <= ph->max) \
+@@ -22,9 +22,9 @@ static Uint __fastcall ExtRd##p##(Uint A
+ } while ((ph = ph->next) != 0); \
+ return 0; \
+ } \
+-static void __fastcall ExtWr##p##(Uint A, Uint V) \
++static void __fastcall ExtWr##p (Uint A, Uint V) \
+ { \
+- NES_WRITE_HANDLER *ph = npwh[0x##p##]; \
++ NES_WRITE_HANDLER *ph = npwh[0x##p ]; \
+ do \
+ { \
+ if (ph->min <= A && A <= ph->max) \
diff --git a/audio/xmms-nsf/files/patch-src_nes_km6502_km6502cd.h b/audio/xmms-nsf/files/patch-src_nes_km6502_km6502cd.h
new file mode 100644
index 000000000000..6672373a40fe
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_nes_km6502_km6502cd.h
@@ -0,0 +1,417 @@
+--- src/nes/km6502/km6502cd.h.orig 2001-01-07 04:18:05 UTC
++++ src/nes/km6502/km6502cd.h
+@@ -361,27 +361,27 @@ static void OpsubCall KM_TST(__CONTEXT_
+
+ /* --- ADC --- */
+ #if BUILD_HUC6280
+-#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KMI_ADC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
+-static void OpcodeCall D_Opco##i##(__CONTEXT) \
+-{ KMI_ADC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
+-static void OpcodeCall T_Opco##i##(__CONTEXT) \
++#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KMI_ADC(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
++static void OpcodeCall D_Opco##i (__CONTEXT) \
++{ KMI_ADC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
++static void OpcodeCall T_Opco##i (__CONTEXT) \
+ { \
+ Uword saveA = KMI_PRET(__THISP); \
+- KMI_ADC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
++ KMI_ADC(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
+ KMI_POSTT(__THISP_ saveA); \
+ } \
+-static void OpcodeCall TD_Opc##i##(__CONTEXT) \
++static void OpcodeCall TD_Opc##i (__CONTEXT) \
+ { \
+ Uword saveA = KMI_PRET(__THISP); \
+- KMI_ADC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
++ KMI_ADC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
+ KMI_POSTT(__THISP_ saveA); \
+ }
+ #else
+-#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KMI_ADC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
+-static void OpcodeCall D_Opco##i##(__CONTEXT) \
+-{ KMI_ADC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_ADC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KMI_ADC(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
++static void OpcodeCall D_Opco##i (__CONTEXT) \
++{ KMI_ADC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ #endif
+ DEF_ADC(61,NP,KA_INDX) /* 61 - ADC - (Indirect,X) */
+ DEF_ADC(65,ZP,KA_ZP) /* 65 - ADC - Zero Page */
+@@ -397,17 +397,17 @@ DEF_ADC(72,NP,KA_IND) /* 72 - ADC - (Ind
+
+ /* --- AND --- */
+ #if BUILD_HUC6280
+-#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_AND(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
+-static void OpcodeCall T_Opco##i##(__CONTEXT) \
++#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_AND(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
++static void OpcodeCall T_Opco##i (__CONTEXT) \
+ { \
+ Uword saveA = KMI_PRET(__THISP); \
+- KM_AND(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
++ KM_AND(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
+ KMI_POSTT(__THISP_ saveA); \
+ }
+ #else
+-#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_AND(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_AND(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_AND(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ #endif
+ DEF_AND(21,NP,KA_INDX) /* 21 - AND - (Indirect,X) */
+ DEF_AND(25,ZP,KA_ZP) /* 25 - AND - Zero Page */
+@@ -422,10 +422,10 @@ DEF_AND(32,NP,KA_IND) /* 32 - AND - (Ind
+ #endif
+
+ /* --- ASL --- */
+-#define DEF_ASL(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_ASL(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_ASL(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_ASL(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_ASL(06,ZP,KA_ZP) /* 06 - ASL - Zero Page */
+ DEF_ASL(0E,NP,KA_ABS) /* 0E - ASL - Absolute */
+@@ -436,7 +436,7 @@ static void OpcodeCall Opcode0A(__CONTEX
+
+ #if BUILD_HUC6280
+ /* --- BBRi --- */
+-#define DEF_BBR(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_BBR(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = KA_ZP(__THISP); \
+ Uword rel = K_READ(__THISP_ KA_IMM(__THISP)); \
+@@ -451,7 +451,7 @@ DEF_BBR(5F,5) /* 5F - BBR5 */
+ DEF_BBR(6F,6) /* 6F - BBR6 */
+ DEF_BBR(7F,7) /* 7F - BBR7 */
+ /* --- BBSi --- */
+-#define DEF_BBS(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_BBS(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = KA_ZP(__THISP); \
+ Uword rel = K_READ(__THISP_ KA_IMM(__THISP)); \
+@@ -468,8 +468,8 @@ DEF_BBS(FF,7) /* FF - BBS7 */
+ #endif
+
+ /* --- BIT --- */
+-#define DEF_BIT(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_BIT(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_BIT(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_BIT(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_BIT(24,ZP,KA_ZP) /* 24 - BIT - Zero Page */
+ DEF_BIT(2C,NP,KA_ABS) /* 2C - BIT - Absolute */
+ #if BUILD_HUC6280 || BUILD_M65C02
+@@ -479,7 +479,7 @@ DEF_BIT(89,NP,KA_IMM) /* 89 - BIT - Imme
+ #endif
+
+ /* --- Bcc --- */
+-#define DEF_BRA(i,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_BRA(i,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword rel = K_READ(__THISP_ KA_IMM(__THISP)); \
+ if (a) KM_BRA(__THISP_ rel); \
+@@ -536,8 +536,8 @@ static void OpcodeCall OpcodeB8(__CONTEX
+ { __THIS__.P &= ~V_FLAG; }
+
+ /* --- CMP --- */
+-#define DEF_CMP(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_CMP(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_CMP(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_CMP(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_CMP(C1,NP,KA_INDX) /* C1 - CMP - (Indirect,X) */
+ DEF_CMP(C5,ZP,KA_ZP) /* C5 - CMP - Zero Page */
+ DEF_CMP(C9,NP,KA_IMM) /* C9 - CMP - Immediate */
+@@ -551,24 +551,24 @@ DEF_CMP(D2,NP,KA_IND) /* D2 - CMP - (Ind
+ #endif
+
+ /* --- CPX --- */
+-#define DEF_CPX(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_CPX(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_CPX(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_CPX(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_CPX(E0,NP,KA_IMM) /* E0 - CPX - Immediate */
+ DEF_CPX(E4,ZP,KA_ZP) /* E4 - CPX - Zero Page */
+ DEF_CPX(EC,NP,KA_ABS) /* EC - CPX - Absolute */
+
+ /* --- CPY --- */
+-#define DEF_CPY(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_CPY(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_CPY(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_CPY(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_CPY(C0,NP,KA_IMM) /* C0 - CPY - Immediate */
+ DEF_CPY(C4,ZP,KA_ZP) /* C4 - CPY - Zero Page */
+ DEF_CPY(CC,NP,KA_ABS) /* CC - CPY - Absolute */
+
+ /* --- DEC --- */
+-#define DEF_DEC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_DEC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_DEC(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_DEC(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_DEC(C6,ZP,KA_ZP) /* C6 - DEC - Zero Page */
+ DEF_DEC(CE,NP,KA_ABS) /* CE - DEC - Absolute */
+@@ -585,17 +585,17 @@ static void OpcodeCall Opcode88(__CONTEX
+
+ /* --- EOR --- */
+ #if BUILD_HUC6280
+-#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_EOR(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
+-static void OpcodeCall T_Opco##i##(__CONTEXT) \
++#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_EOR(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
++static void OpcodeCall T_Opco##i (__CONTEXT) \
+ { \
+ Uword saveA = KMI_PRET(__THISP); \
+- KM_EOR(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
++ KM_EOR(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
+ KMI_POSTT(__THISP_ saveA); \
+ }
+ #else
+-#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_EOR(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_EOR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_EOR(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ #endif
+ DEF_EOR(41,NP,KA_INDX) /* 41 - EOR - (Indirect,X) */
+ DEF_EOR(45,ZP,KA_ZP) /* 45 - EOR - Zero Page */
+@@ -610,10 +610,10 @@ DEF_EOR(52,NP,KA_IND) /* 52 - EOR - (Ind
+ #endif
+
+ /* --- INC --- */
+-#define DEF_INC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_INC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_INC(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_INC(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_INC(E6,ZP,KA_ZP) /* E6 - INC - Zero Page */
+ DEF_INC(EE,NP,KA_ABS) /* EE - INC - Absolute */
+@@ -629,12 +629,12 @@ static void OpcodeCall OpcodeC8(__CONTEX
+ { __THIS__.Y = KM_INC(__THISP_ __THIS__.Y); }
+
+ /* --- JMP --- */
+-#define DEF_JMP(i,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_JMP(i,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { __THIS__.PC = KI_READWORD(__THISP_ a(__THISP)); }
+ #if BUILD_HUC6280 || BUILD_M65C02
+ #define DEF_JMPBUG(i,a) DEF_JMP(i,a)
+ #else
+-#define DEF_JMPBUG(i,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_JMPBUG(i,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { __THIS__.PC = KI_READWORDBUG(__THISP_ a(__THISP)); }
+ #endif
+ DEF_JMP(4C,KA_IMM16) /* 4C - JMP - Immediate */
+@@ -653,8 +653,8 @@ static void OpcodeCall Opcode20(__CONTEX
+ }
+
+ /* --- LDA --- */
+-#define DEF_LDA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ __THIS__.A = KM_LD(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_LDA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ __THIS__.A = KM_LD(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_LDA(A1,NP,KA_INDX) /* A1 - LDA - (Indirect,X) */
+ DEF_LDA(A5,ZP,KA_ZP) /* A5 - LDA - Zero Page */
+ DEF_LDA(A9,NP,KA_IMM) /* A9 - LDA - Immediate */
+@@ -668,8 +668,8 @@ DEF_LDA(B2,NP,KA_IND) /* B2 - LDA - (Ind
+ #endif
+
+ /* --- LDX --- */
+-#define DEF_LDX(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ __THIS__.X = KM_LD(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_LDX(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ __THIS__.X = KM_LD(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_LDX(A2,NP,KA_IMM) /* A2 - LDX - Immediate */
+ DEF_LDX(A6,ZP,KA_ZP) /* A6 - LDX - Zero Page */
+ DEF_LDX(AE,NP,KA_ABS) /* AE - LDX - Absolute */
+@@ -677,8 +677,8 @@ DEF_LDX(B6,ZP,KA_ZPY) /* B6 - LDX - Zero
+ DEF_LDX(BE,NP,KA_ABSY_) /* BE - LDX - Absolute,Y */
+
+ /* --- LDY --- */
+-#define DEF_LDY(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ __THIS__.Y = KM_LD(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_LDY(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ __THIS__.Y = KM_LD(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_LDY(A0,NP,KA_IMM) /* A0 - LDY - Immediate */
+ DEF_LDY(A4,ZP,KA_ZP) /* A4 - LDY - Zero Page */
+ DEF_LDY(AC,NP,KA_ABS) /* AC - LDY - Absolute */
+@@ -686,10 +686,10 @@ DEF_LDY(B4,ZP,KA_ZPX) /* B4 - LDY - Zero
+ DEF_LDY(BC,NP,KA_ABSX_) /* BC - LDY - Absolute,X */
+
+ /* --- LSR --- */
+-#define DEF_LSR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_LSR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_LSR(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_LSR(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_LSR(46,ZP,KA_ZP) /* 46 - LSR - Zero Page */
+ DEF_LSR(4E,NP,KA_ABS) /* 4E - LSR - Absolute */
+@@ -705,17 +705,17 @@ static void OpcodeCall OpcodeEA(__CONTEX
+
+ /* --- ORA --- */
+ #if BUILD_HUC6280
+-#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_ORA(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
+-static void OpcodeCall T_Opco##i##(__CONTEXT) \
++#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_ORA(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
++static void OpcodeCall T_Opco##i (__CONTEXT) \
+ { \
+ Uword saveA = KMI_PRET(__THISP); \
+- KM_ORA(__THISP_ K_READ##p##(__THISP_ a(__THISP))); \
++ KM_ORA(__THISP_ K_READ##p (__THISP_ a(__THISP))); \
+ KMI_POSTT(__THISP_ saveA); \
+ }
+ #else
+-#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KM_ORA(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_ORA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KM_ORA(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ #endif
+ DEF_ORA(01,NP,KA_INDX) /* 01 - ORA - (Indirect,X) */
+ DEF_ORA(05,ZP,KA_ZP) /* 05 - ORA - Zero Page */
+@@ -751,7 +751,7 @@ static void OpcodeCall Opcode7A(__CONTEX
+
+ #if BUILD_HUC6280
+ /* --- RMBi --- */
+-#define DEF_RMB(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_RMB(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = KA_ZP(__THISP); \
+ K_WRITEZP(__THISP_ adr, (Uword)(K_READZP(__THISP_ adr) & (~(1 << y)))); \
+@@ -765,7 +765,7 @@ DEF_RMB(57,5) /* 57 - RMB5 */
+ DEF_RMB(67,6) /* 67 - RMB6 */
+ DEF_RMB(77,7) /* 77 - RMB7 */
+ /* --- SMBi --- */
+-#define DEF_SMB(i,y) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_SMB(i,y) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = KA_ZP(__THISP); \
+ K_WRITEZP(__THISP_ adr, (Uword)(K_READZP(__THISP_ adr) | (1 << y))); \
+@@ -781,10 +781,10 @@ DEF_SMB(F7,7) /* F7 - SMB7 */
+ #endif
+
+ /* --- ROL --- */
+-#define DEF_ROL(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_ROL(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_ROL(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_ROL(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_ROL(26,ZP,KA_ZP) /* 26 - ROL - Zero Page */
+ DEF_ROL(2E,NP,KA_ABS) /* 2E - ROL - Absolute */
+@@ -794,10 +794,10 @@ static void OpcodeCall Opcode2A(__CONTEX
+ { __THIS__.A = KM_ROL(__THISP_ __THIS__.A); }
+
+ /* --- ROR --- */
+-#define DEF_ROR(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_ROR(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_ROR(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_ROR(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_ROR(66,ZP,KA_ZP) /* 66 - ROR - Zero Page */
+ DEF_ROR(6E,NP,KA_ABS) /* 6E - ROR - Absolute */
+@@ -841,10 +841,10 @@ static void OpcodeCall Opcode02(__CONTEX
+ #endif
+
+ /* --- SBC --- */
+-#define DEF_SBC(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ KMI_SBC(__THISP_ K_READ##p##(__THISP_ a(__THISP))); } \
+-static void OpcodeCall D_Opco##i##(__CONTEXT) \
+-{ KMI_SBC_D(__THISP_ K_READ##p##(__THISP_ a(__THISP))); }
++#define DEF_SBC(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ KMI_SBC(__THISP_ K_READ##p (__THISP_ a(__THISP))); } \
++static void OpcodeCall D_Opco##i (__CONTEXT) \
++{ KMI_SBC_D(__THISP_ K_READ##p (__THISP_ a(__THISP))); }
+ DEF_SBC(E1,NP,KA_INDX) /* E1 - SBC - (Indirect,X) */
+ DEF_SBC(E5,ZP,KA_ZP) /* E5 - SBC - Zero Page */
+ DEF_SBC(E9,NP,KA_IMM) /* E9 - SBC - Immediate */
+@@ -883,8 +883,8 @@ static void OpcodeCall Opcode23(__CONTEX
+ #endif
+
+ /* --- STA --- */
+-#define DEF_STA(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ K_WRITE##p##(__THISP_ a(__THISP), __THIS__.A); }
++#define DEF_STA(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ K_WRITE##p (__THISP_ a(__THISP), __THIS__.A); }
+ DEF_STA(81,NP,KA_INDX) /* 81 - STA - (Indirect,X) */
+ DEF_STA(85,ZP,KA_ZP) /* 85 - STA - Zero Page */
+ DEF_STA(8D,NP,KA_ABS) /* 8D - STA - Absolute */
+@@ -897,23 +897,23 @@ DEF_STA(92,NP,KA_IND) /* 92 - STA - (Ind
+ #endif
+
+ /* --- STX --- */
+-#define DEF_STX(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ K_WRITE##p##(__THISP_ a(__THISP), __THIS__.X); }
++#define DEF_STX(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ K_WRITE##p (__THISP_ a(__THISP), __THIS__.X); }
+ DEF_STX(86,ZP,KA_ZP) /* 86 - STX - Zero Page */
+ DEF_STX(8E,NP,KA_ABS) /* 8E - STX - Absolute */
+ DEF_STX(96,ZP,KA_ZPY) /* 96 - STX - Zero Page,Y */
+
+ /* --- STY --- */
+-#define DEF_STY(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ K_WRITE##p##(__THISP_ a(__THISP), __THIS__.Y); }
++#define DEF_STY(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ K_WRITE##p (__THISP_ a(__THISP), __THIS__.Y); }
+ DEF_STY(84,ZP,KA_ZP) /* 84 - STY - Zero Page */
+ DEF_STY(8C,NP,KA_ABS) /* 8C - STY - Absolute */
+ DEF_STY(94,ZP,KA_ZPX) /* 94 - STY - Zero Page,X */
+
+ #if BUILD_HUC6280 || BUILD_M65C02
+ /* --- STZ --- */
+-#define DEF_STZ(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
+-{ K_WRITE##p##(__THISP_ a(__THISP), 0); }
++#define DEF_STZ(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
++{ K_WRITE##p (__THISP_ a(__THISP), 0); }
+ DEF_STZ(64,ZP,KA_ZP) /* 64 - STZ - Zero Page */
+ DEF_STZ(9C,NP,KA_ABS) /* 9C - STZ - Absolute */
+ DEF_STZ(74,ZP,KA_ZPX) /* 74 - STZ - Zero Page,X */
+@@ -931,18 +931,18 @@ static void OpcodeCall Opcode43(__CONTEX
+
+ #if BUILD_HUC6280 || BUILD_M65C02
+ /* --- TRB --- */
+-#define DEF_TRB(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_TRB(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_TRB(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_TRB(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_TRB(14,ZP,KA_ZP) /* 14 - TRB - Zero Page */
+ DEF_TRB(1C,NP,KA_ABS) /* 1C - TRB - Absolute */
+ /* --- TSB --- */
+-#define DEF_TSB(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_TSB(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword adr = a(__THISP); \
+- K_WRITE##p##(__THISP_ adr, KM_TSB(__THISP_ K_READ##p##(__THISP_ adr))); \
++ K_WRITE##p (__THISP_ adr, KM_TSB(__THISP_ K_READ##p (__THISP_ adr))); \
+ }
+ DEF_TSB(04,ZP,KA_ZP) /* 04 - TSB - Zero Page */
+ DEF_TSB(0C,NP,KA_ABS) /* 0C - TSB - Absolute */
+@@ -950,10 +950,10 @@ DEF_TSB(0C,NP,KA_ABS) /* 0C - TSB - Abso
+
+ #if BUILD_HUC6280
+ /* --- TST --- */
+-#define DEF_TST(i,p,a) static void OpcodeCall Opcode##i##(__CONTEXT) \
++#define DEF_TST(i,p,a) static void OpcodeCall Opcode##i (__CONTEXT) \
+ { \
+ Uword imm = K_READ(__THISP_ KA_IMM(__THISP)); \
+- KM_TST(__THISP_ imm, K_READ##p##(__THISP_ a(__THISP))); \
++ KM_TST(__THISP_ imm, K_READ##p (__THISP_ a(__THISP))); \
+ }
+ DEF_TST(83,ZP,KA_ZP) /* 83 - TST - Zero Page */
+ DEF_TST(93,NP,KA_ABS) /* 93 - TST - Absolute */
diff --git a/audio/xmms-nsf/files/patch-src_nes_km6502_km6502ot.h b/audio/xmms-nsf/files/patch-src_nes_km6502_km6502ot.h
new file mode 100644
index 000000000000..e0c40888f73b
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_nes_km6502_km6502ot.h
@@ -0,0 +1,51 @@
+--- src/nes/km6502/km6502ot.h.orig 2001-01-07 04:18:05 UTC
++++ src/nes/km6502/km6502ot.h
+@@ -1,35 +1,35 @@
+ #define OPxx(i)
+ #define OP__(i) \
+- case 0x##i##: \
+- Opcode##i##(__THISP); \
++ case 0x##i : \
++ Opcode##i (__THISP); \
+ break;
+ #define OP_d(i) \
+- case 0x##i##: \
++ case 0x##i : \
+ if (__THIS__.P & D_FLAG) \
+- D_Opco##i##(__THISP); \
++ D_Opco##i (__THISP); \
+ else \
+- Opcode##i##(__THISP); \
++ Opcode##i (__THISP); \
+ break;
+ #if BUILD_HUC6280
+ #define OPtd(i) \
+- case 0x##i##: \
++ case 0x##i : \
+ if (__THIS__.P & T_FLAG) \
+ if (__THIS__.P & D_FLAG) \
+- TD_Opc##i##(__THISP); \
++ TD_Opc##i (__THISP); \
+ else \
+- T_Opco##i##(__THISP); \
++ T_Opco##i (__THISP); \
+ else \
+ if (__THIS__.P & D_FLAG) \
+- D_Opco##i##(__THISP); \
++ D_Opco##i (__THISP); \
+ else \
+- Opcode##i##(__THISP); \
++ Opcode##i (__THISP); \
+ break;
+ #define OPt_(i) \
+- case 0x##i##: \
++ case 0x##i : \
+ if (__THIS__.P & T_FLAG) \
+- T_Opco##i##(__THISP); \
++ T_Opco##i (__THISP); \
+ else \
+- Opcode##i##(__THISP); \
++ Opcode##i (__THISP); \
+ break;
+ #else
+ #define OPtd OP_d
diff --git a/audio/xmms-nsf/files/patch-src_xmms_callbacks.c b/audio/xmms-nsf/files/patch-src_xmms_callbacks.c
new file mode 100644
index 000000000000..b8999323c7f1
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_xmms_callbacks.c
@@ -0,0 +1,20 @@
+--- src/xmms/callbacks.c.orig 2000-07-23 10:06:43 UTC
++++ src/xmms/callbacks.c
+@@ -219,7 +219,7 @@ nsf_on_ok_pressed
+ widget = lookup_widget(GTK_WIDGET(button), "spinbutton1");
+ nsf_cfg.play_time = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
+ widget = lookup_widget(GTK_WIDGET(button), "spinbutton2");
+- nsf_cfg.fadeout_time = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
++ nsf_cfg.silence_time = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
+
+ filename = g_strconcat(g_get_home_dir(), "/.xmms/config", NULL);
+ cfg = xmms_cfg_open_file(filename);
+@@ -228,7 +228,7 @@ nsf_on_ok_pressed
+ }
+
+ xmms_cfg_write_int(cfg, "NSF", "play_time",nsf_cfg.play_time);
+- xmms_cfg_write_int(cfg, "NSF", "fadeout_time",nsf_cfg.fadeout_time);
++ xmms_cfg_write_int(cfg, "NSF", "silence_time",nsf_cfg.silence_time);
+ xmms_cfg_write_file(cfg, filename);
+ xmms_cfg_free(cfg);
+ g_free(filename);
diff --git a/audio/xmms-nsf/files/patch-src_xmms_interface.c b/audio/xmms-nsf/files/patch-src_xmms_interface.c
new file mode 100644
index 000000000000..16c020d14e46
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_xmms_interface.c
@@ -0,0 +1,11 @@
+--- src/xmms/interface.c.orig 2000-07-23 09:41:14 UTC
++++ src/xmms/interface.c
+@@ -106,7 +106,7 @@ create_configure (void)
+ gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
+
+- label3 = gtk_label_new ("Fadeout Time:");
++ label3 = gtk_label_new ("Silence Until Next Song:");
+ gtk_widget_ref (label3);
+ gtk_object_set_data_full (GTK_OBJECT (configure), "label3", label3,
+ (GtkDestroyNotify) gtk_widget_unref);
diff --git a/audio/xmms-nsf/files/patch-src_xmms_nsf.c b/audio/xmms-nsf/files/patch-src_xmms_nsf.c
new file mode 100644
index 000000000000..df7f780b4776
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_xmms_nsf.c
@@ -0,0 +1,85 @@
+--- src/xmms/nsf.c.orig 2001-01-07 05:15:12 UTC
++++ src/xmms/nsf.c
+@@ -23,7 +23,8 @@
+
+ #define VERSION "0.0.3"
+ #define PLAYTIME 30
+-#define FADEOUTTIME 5
++#define SILENCETIME 5
++#define FREQ 44100
+
+ #include "nsf.h"
+
+@@ -328,7 +329,7 @@ nsf_configure()
+ widget = lookup_widget(nsf_configure_win, "spinbutton1");
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), nsf_cfg.play_time);
+ widget = lookup_widget(nsf_configure_win, "spinbutton2");
+- gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), nsf_cfg.fadeout_time);
++ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), nsf_cfg.silence_time);
+
+ gtk_widget_show(nsf_configure_win);
+ }else{
+@@ -357,7 +358,7 @@ nsf_init(void)
+ nsf_win->dock_window_list = NULL;
+
+ nsf_cfg.play_time = PLAYTIME; /* second */
+- nsf_cfg.fadeout_time = FADEOUTTIME; /* second */
++ nsf_cfg.silence_time = SILENCETIME; /* second */
+ nsf_cfg.player_shaded = FALSE;
+ nsf_cfg.easy_move = FALSE;
+
+@@ -365,7 +366,7 @@ nsf_init(void)
+
+ if ((cfg = xmms_cfg_open_file(filename)) != 0){
+ xmms_cfg_read_int(cfg, "NSF", "play_time", &nsf_cfg.play_time);
+- xmms_cfg_read_int(cfg, "NSF", "fadeout_time", &nsf_cfg.fadeout_time);
++ xmms_cfg_read_int(cfg, "NSF", "silence_time", &nsf_cfg.silence_time);
+ xmms_cfg_free(cfg);
+ }
+ }
+@@ -439,10 +440,11 @@ play_loop(void *arg)
+ {
+ char data[2048 * 2];
+ int bytes, blk_size, rate;
++ Uint32 c = 0, count = 0;
+
+ //setting NSF
+ NSFSetSongNo(nsf_file->current_song);
+- NESAudioFrequencySet(44100);
++ NESAudioFrequencySet(FREQ);
+ NESReset();
+
+ //16bit/8bit * 1channel * 512 sample = 1024byte
+@@ -460,7 +462,15 @@ play_loop(void *arg)
+ }
+ if (bytes > 0){
+ //read 1024byte = 512 sample * 2byte
+- NESAudioRender(data, bytes/2);
++ c = NESAudioRender((Int16*)data, bytes/2);
++ if (c < 512)
++ count = 0;
++ else
++ count += c;
++ if (count > FREQ*nsf_cfg.silence_time) {
++ nsf_file->eos = 1;
++ count = 0;
++ }
+ nsf_ip.add_vis_pcm(nsf_ip.output->written_time(), (nsf_file->bits_per_sample == 16) ? FMT_S16_LE : FMT_U8,
+ nsf_file->channels, bytes, data);
+
+@@ -512,11 +522,14 @@ play_file(char *filename)
+ if (!(nsf_file->file = fopen(filename, "rb"))){
+ return;
+ }
++
++ nsf_about();
++
+ fseek(nsf_file->file, 0, SEEK_END);
+ count = ftell(nsf_file->file);
+ fseek(nsf_file->file, 0, SEEK_SET);
+
+- (void*)buffer = g_malloc0(count);
++ buffer = (void*)g_malloc0(count);
+ for(i=0;i<count;i++){
+ *(buffer+i) = fgetc(nsf_file->file);
+ }
diff --git a/audio/xmms-nsf/files/patch-src_xmms_nsf.h b/audio/xmms-nsf/files/patch-src_xmms_nsf.h
new file mode 100644
index 000000000000..a80511ebce7d
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_xmms_nsf.h
@@ -0,0 +1,11 @@
+--- src/xmms/nsf.h.orig 2000-07-23 10:00:35 UTC
++++ src/xmms/nsf.h
+@@ -58,7 +58,7 @@ NsfFile;
+ typedef struct
+ {
+ gint play_time;
+- gint fadeout_time;
++ gint silence_time;
+ // reserve
+ gint resolution;
+ gint channels;
diff --git a/audio/xmms-nsf/files/patch-src_xmms_nsflib.h b/audio/xmms-nsf/files/patch-src_xmms_nsflib.h
new file mode 100644
index 000000000000..9f56581b0cd6
--- /dev/null
+++ b/audio/xmms-nsf/files/patch-src_xmms_nsflib.h
@@ -0,0 +1,15 @@
+--- src/xmms/nsflib.h.orig 2000-07-23 10:05:21 UTC
++++ src/xmms/nsflib.h
+@@ -1,10 +1,11 @@
+ typedef signed short Int16;
+ typedef unsigned int Uint;
++typedef unsigned int Uint32;
+ typedef unsigned char Uint8;
+
+ Uint NSFLoad(Uint8 *pData, Uint uSize);
+ void NSFSetSongNo(Uint uSongNo);
+ void NESAudioFrequencySet(Uint freq);
+ void NESReset(void);
+-void NESAudioRender(Int16 *bufp, Uint buflen);
++Uint32 NESAudioRender(Int16 *bufp, Uint buflen);
+ void NESTerminate(void);
diff --git a/audio/xmms-openspc/files/patch-src_id666.c b/audio/xmms-openspc/files/patch-src_id666.c
index f5c2e9a29af6..de8be624624f 100644
--- a/audio/xmms-openspc/files/patch-src_id666.c
+++ b/audio/xmms-openspc/files/patch-src_id666.c
@@ -1,6 +1,6 @@
---- src/id666.c.orig Sat Jun 11 14:13:07 2005
-+++ src/id666.c Sat Jun 11 14:13:27 2005
-@@ -100,6 +100,7 @@
+--- src/id666.c.orig 2002-10-12 01:07:41 UTC
++++ src/id666.c
+@@ -100,6 +100,7 @@ static void spc_read_ext_id666(int fd, i
break;
default: /* Who knows. Ignore it. */
diff --git a/audio/xmms-sapplug/files/patch-Makefile b/audio/xmms-sapplug/files/patch-Makefile
index 86355f8947c6..6a175a3b76b0 100644
--- a/audio/xmms-sapplug/files/patch-Makefile
+++ b/audio/xmms-sapplug/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Thu Jul 14 11:24:17 2005
-+++ Makefile Thu Jul 14 11:34:05 2005
+--- Makefile.orig 2003-10-14 23:59:50 UTC
++++ Makefile
@@ -19,15 +19,18 @@
#
##########################################################################
@@ -26,7 +26,7 @@
TARGET = libsap.so
-@@ -43,15 +46,15 @@
+@@ -43,15 +46,15 @@ all: library plugin
plugin: $(OBJS)
@./scripts/gen_symbols sap_plug.o
@echo
diff --git a/audio/xmms-timidity/files/patch-xmms-timidity.cpp b/audio/xmms-timidity/files/patch-xmms-timidity.cpp
index 0aaf2751fe0a..3b7ed2edcd9c 100644
--- a/audio/xmms-timidity/files/patch-xmms-timidity.cpp
+++ b/audio/xmms-timidity/files/patch-xmms-timidity.cpp
@@ -1,6 +1,6 @@
---- xmms-timidity.cpp.orig 2005-07-21 02:44:56.000000000 -0700
-+++ xmms-timidity.cpp 2009-07-19 22:30:38.000000000 -0700
-@@ -347,7 +347,7 @@
+--- xmms-timidity.cpp.orig 2005-07-21 09:44:56 UTC
++++ xmms-timidity.cpp
+@@ -347,7 +347,7 @@ void setSongTitle(void)
void *infoThread(void *pData)
{
diff --git a/audio/xmms-wavpack/files/patch-configure b/audio/xmms-wavpack/files/patch-configure
index ed197bbbb0d8..d385ea4aedaf 100644
--- a/audio/xmms-wavpack/files/patch-configure
+++ b/audio/xmms-wavpack/files/patch-configure
@@ -1,5 +1,5 @@
---- configure.orig 2009-10-04 22:05:31.000000000 +0200
-+++ configure 2009-10-04 22:05:38.000000000 +0200
+--- configure.orig 2009-09-28 03:40:06 UTC
++++ configure
@@ -19850,7 +19850,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
diff --git a/audio/xmms-wavpack/files/patch-src_libwavpack.cpp b/audio/xmms-wavpack/files/patch-src_libwavpack.cpp
index 198778322aca..1c9de0b2b73f 100644
--- a/audio/xmms-wavpack/files/patch-src_libwavpack.cpp
+++ b/audio/xmms-wavpack/files/patch-src_libwavpack.cpp
@@ -1,5 +1,5 @@
---- src/libwavpack.cpp.orig 2009-09-28 04:52:56.000000000 +0200
-+++ src/libwavpack.cpp 2011-06-27 13:19:20.000000000 +0200
+--- src/libwavpack.cpp.orig 2009-09-28 02:52:56 UTC
++++ src/libwavpack.cpp
@@ -40,7 +40,7 @@ extern "C" {
#define M_LN10 2.3025850929940456840179914546843642
#endif
diff --git a/audio/xmms-wavpack/files/patch-src_ui.cpp b/audio/xmms-wavpack/files/patch-src_ui.cpp
index de46d855c65e..a7f8ef452bd6 100644
--- a/audio/xmms-wavpack/files/patch-src_ui.cpp
+++ b/audio/xmms-wavpack/files/patch-src_ui.cpp
@@ -1,5 +1,5 @@
---- src/ui.cpp.orig 2009-01-12 16:16:18.000000000 +0100
-+++ src/ui.cpp 2009-01-12 16:16:26.000000000 +0100
+--- src/ui.cpp.orig 2009-09-28 02:52:56 UTC
++++ src/ui.cpp
@@ -21,7 +21,7 @@ extern "C" {
#define M_LN10 2.3025850929940456840179914546843642
#endif
diff --git a/audio/xmms-xf86audio/files/patch-xf86audio.c b/audio/xmms-xf86audio/files/patch-xf86audio.c
index 575a77ecd622..e145837f32fd 100644
--- a/audio/xmms-xf86audio/files/patch-xf86audio.c
+++ b/audio/xmms-xf86audio/files/patch-xf86audio.c
@@ -1,6 +1,6 @@
---- xf86audio.c.orig
+--- xf86audio.c.orig 2006-07-09 01:30:47 UTC
+++ xf86audio.c
-@@ -110,6 +110,7 @@
+@@ -110,6 +110,7 @@ static void plugin_cleanup()
static void plugin_about()
{
static GtkWidget *about;
@@ -8,7 +8,7 @@
gchar *s;
if (about != NULL) {
-@@ -117,8 +118,8 @@
+@@ -117,8 +118,8 @@ static void plugin_about()
return;
}
@@ -19,7 +19,7 @@
"This plugin enables the XF86Audio keysyms produced by\n"
"multimedia keyboards to control XMMS playback.\n\n"
"Note that this plugin will not set up the initial keysym\n"
-@@ -145,6 +146,11 @@
+@@ -145,6 +146,11 @@ static GtkWidget *config_window;
static void plugin_configure()
{
@@ -31,7 +31,7 @@
if (config_window) {
gdk_window_raise(config_window->window);
-@@ -163,29 +169,29 @@
+@@ -163,29 +169,29 @@ static void plugin_configure()
gtk_signal_connect(GTK_OBJECT(config_window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &config_window);
gtk_container_border_width(GTK_CONTAINER(config_window), 10);
@@ -68,7 +68,7 @@
GTK_RADIO_BUTTON(pa_pause),
_("Restart the current song"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
-@@ -198,7 +204,7 @@
+@@ -198,7 +204,7 @@ static void plugin_configure()
gtk_box_pack_start(GTK_BOX(pa_vbox), pa_pause, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(pa_vbox), pa_restart, FALSE, FALSE, 0);
@@ -77,7 +77,7 @@
_("Regardless of this setting, the current song can be restarted"
"\nby holding down Shift while pressing the Play key.")
);
-@@ -217,22 +223,22 @@
+@@ -217,22 +223,22 @@ static void plugin_configure()
/* Volume change frame */
@@ -106,7 +106,7 @@
1.0, 0);
gtk_signal_connect(GTK_OBJECT(vol_spin), "changed",
GTK_SIGNAL_FUNC(on_volume_increment_change), NULL);
-@@ -246,23 +252,23 @@
+@@ -246,23 +252,23 @@ static void plugin_configure()
/* Button box at bottom of window */
diff --git a/audio/xmms2/files/patch-src-clients-lib-xmmsclient-glib-wscript b/audio/xmms2/files/patch-src_clients_lib_xmmsclient-glib_wscript
index 782a4b98cafb..782a4b98cafb 100644
--- a/audio/xmms2/files/patch-src-clients-lib-xmmsclient-glib-wscript
+++ b/audio/xmms2/files/patch-src_clients_lib_xmmsclient-glib_wscript
diff --git a/audio/xmms2/files/patch-src-clients-lib-xmmsclient-wscript b/audio/xmms2/files/patch-src_clients_lib_xmmsclient_wscript
index a8135f56f562..a8135f56f562 100644
--- a/audio/xmms2/files/patch-src-clients-lib-xmmsclient-wscript
+++ b/audio/xmms2/files/patch-src_clients_lib_xmmsclient_wscript
diff --git a/audio/xmms2/files/patch-src-include-wscript b/audio/xmms2/files/patch-src_include_wscript
index a4e84c9edaa5..a4e84c9edaa5 100644
--- a/audio/xmms2/files/patch-src-include-wscript
+++ b/audio/xmms2/files/patch-src_include_wscript
diff --git a/audio/xmms2/files/patch-src-include-xmmsclient-xmmsclient++-coll.h b/audio/xmms2/files/patch-src_include_xmmsclient_xmmsclient++_coll.h
index f237eea4085b..f237eea4085b 100644
--- a/audio/xmms2/files/patch-src-include-xmmsclient-xmmsclient++-coll.h
+++ b/audio/xmms2/files/patch-src_include_xmmsclient_xmmsclient++_coll.h
diff --git a/audio/xmms2/files/patch-src-plugins-airplay-wscript b/audio/xmms2/files/patch-src_plugins_airplay_wscript
index 5b1e9bf87006..5b1e9bf87006 100644
--- a/audio/xmms2/files/patch-src-plugins-airplay-wscript
+++ b/audio/xmms2/files/patch-src_plugins_airplay_wscript
diff --git a/audio/xmms2/files/patch-src__plugins__cdda__cdda.c b/audio/xmms2/files/patch-src_plugins_cdda_cdda.c
index f7b55f5cf915..f7b55f5cf915 100644
--- a/audio/xmms2/files/patch-src__plugins__cdda__cdda.c
+++ b/audio/xmms2/files/patch-src_plugins_cdda_cdda.c
diff --git a/audio/xmms2/files/patch-src-plugins-file-wscript b/audio/xmms2/files/patch-src_plugins_file_wscript
index a09b4fbbd95b..a09b4fbbd95b 100644
--- a/audio/xmms2/files/patch-src-plugins-file-wscript
+++ b/audio/xmms2/files/patch-src_plugins_file_wscript
diff --git a/audio/xmms2/files/patch-src-plugins-modplug-modplug.c b/audio/xmms2/files/patch-src_plugins_modplug_modplug.c
index 4f4d24268f6e..4f4d24268f6e 100644
--- a/audio/xmms2/files/patch-src-plugins-modplug-modplug.c
+++ b/audio/xmms2/files/patch-src_plugins_modplug_modplug.c
diff --git a/audio/xmmsctrl/files/patch-Makefile b/audio/xmmsctrl/files/patch-Makefile
index 46ad25e99605..d1ffd5e12177 100644
--- a/audio/xmmsctrl/files/patch-Makefile
+++ b/audio/xmmsctrl/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig Fri Apr 2 15:00:12 2004
-+++ Makefile Sun Oct 2 01:30:57 2005
-@@ -6,17 +6,15 @@
+--- Makefile.orig 2004-04-02 13:00:12 UTC
++++ Makefile
+@@ -6,17 +6,15 @@ TARGET := xmmsctrl
VERSION := 1.8
DIRNAME := $(shell basename $(PWD))
@@ -8,9 +8,8 @@
WARN := -Wall -Wshadow -Wmissing-prototypes -W
DEFS := -DPRETTY_PRINT -D_GNU_SOURCE -DVERSION=\"$(VERSION)\"
-CFLAGS := $(WARN) -O2 $(shell xmms-config --cflags) $(DEFS)
--LDFLAGS := $(shell xmms-config --libs)
+CFLAGS += $(WARN) $(shell xmms-config --cflags) $(DEFS)
-+LDFLAGS := $(shell xmms-config --libs)
+ LDFLAGS := $(shell xmms-config --libs)
-all : $(TARGET) HELP
+all : $(TARGET)
diff --git a/audio/xmmsctrl/files/patch-removefile.c b/audio/xmmsctrl/files/patch-removefile.c
index b99afb9fdb1e..23d7de1b201d 100644
--- a/audio/xmmsctrl/files/patch-removefile.c
+++ b/audio/xmmsctrl/files/patch-removefile.c
@@ -1,6 +1,6 @@
---- removefile.c.orig Thu Apr 1 08:26:19 2004
-+++ removefile.c Thu Sep 22 13:41:04 2005
-@@ -111,7 +111,7 @@
+--- removefile.c.orig 2004-04-01 13:26:19 UTC
++++ removefile.c
+@@ -111,7 +111,7 @@ static void remove_dirname(int root_len,
DIR *dir = opendir(".");
if (dir) {
/* xmms uses absolute paths */
@@ -9,7 +9,7 @@
struct dirent *entry;
struct stat file_stat;
-@@ -189,7 +189,7 @@
+@@ -189,7 +189,7 @@ void remove_file(gint session, char *fil
gint *remove_pos = (gint*) malloc(list_size*sizeof(gint));
if (remove_pos) {
diff --git a/audio/xmradio/files/patch-Imakefile b/audio/xmradio/files/patch-Imakefile
index 35efdb7b0c94..fac2cb58fb81 100644
--- a/audio/xmradio/files/patch-Imakefile
+++ b/audio/xmradio/files/patch-Imakefile
@@ -1,5 +1,5 @@
---- Imakefile.orig Wed Nov 14 01:33:48 2001
-+++ Imakefile Tue Jul 27 10:25:29 2004
+--- Imakefile.orig 2001-11-13 22:33:48 UTC
++++ Imakefile
@@ -4,9 +4,10 @@
#endif
@@ -13,7 +13,7 @@
EXTRA_LDOPTIONS = -L/usr/local/lib -Wl,-R/usr/local/lib
INCLUDES = -I/usr/local/include
-@@ -15,7 +16,7 @@
+@@ -15,7 +16,7 @@ INCLUDES = -I/usr/local/include
SRCS = radio.c remote.c analyzer.c sample.c misc.c config.c version_check.c LiteClue.c lcd_net.c
OBJS = radio.o remote.o analyzer.o sample.o misc.o config.o version_check.o LiteClue.o lcd_net.o
diff --git a/audio/xmradio/files/patch-analyzer.c b/audio/xmradio/files/patch-analyzer.c
index bb46481553a8..35b83afaf46d 100644
--- a/audio/xmradio/files/patch-analyzer.c
+++ b/audio/xmradio/files/patch-analyzer.c
@@ -1,5 +1,5 @@
---- analyzer.c.orig Sun Sep 8 03:00:48 2002
-+++ analyzer.c Sun Sep 8 03:01:47 2002
+--- analyzer.c.orig 2001-11-13 20:42:08 UTC
++++ analyzer.c
@@ -37,7 +37,7 @@
#include <soundcard.h>
#include <sys/ioctl.h>
diff --git a/audio/xmradio/files/patch-radio.c b/audio/xmradio/files/patch-radio.c
index 1063ee92c5a8..7a94c38df433 100644
--- a/audio/xmradio/files/patch-radio.c
+++ b/audio/xmradio/files/patch-radio.c
@@ -1,5 +1,5 @@
---- radio.c.orig Tue Nov 27 13:30:42 2001
-+++ radio.c Sun Sep 8 03:13:58 2002
+--- radio.c.orig 2001-11-27 21:30:42 UTC
++++ radio.c
@@ -63,17 +63,17 @@
#ifdef __NetBSD__
#include <dev/ic/bt8xx.h>
diff --git a/audio/xmradio/files/patch-sample.c b/audio/xmradio/files/patch-sample.c
index d113d268966e..615fae476d97 100644
--- a/audio/xmradio/files/patch-sample.c
+++ b/audio/xmradio/files/patch-sample.c
@@ -1,5 +1,5 @@
---- sample.c.orig Sun Sep 8 03:00:57 2002
-+++ sample.c Sun Sep 8 03:01:20 2002
+--- sample.c.orig 2001-12-04 20:52:55 UTC
++++ sample.c
@@ -43,7 +43,7 @@
#ifdef __NetBSD__
#include <soundcard.h>
diff --git a/audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.am b/audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.am
new file mode 100644
index 000000000000..9bda8fa0f9e6
--- /dev/null
+++ b/audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.am
@@ -0,0 +1,11 @@
+--- gtkdatabox-0.6.0.0/gtk/Makefile.am.orig 2009-06-25 04:09:55 UTC
++++ gtkdatabox-0.6.0.0/gtk/Makefile.am
+@@ -30,8 +30,4 @@ INCLUDES = \
+ AM_CFLAGS =\
+ -O2\
+ -Wall -pedantic\
+- -DG_DISABLE_DEPRECATED\
+- -DGDK_DISABLE_DEPRECATED\
+- -DGDK_PIXBUF_DISABLE_DEPRECATED\
+- -DGTK_DISABLE_DEPRECATED\
+ `pkg-config gtk+-2.0 --cflags`
diff --git a/audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.in b/audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.in
new file mode 100644
index 000000000000..764b2796c4c1
--- /dev/null
+++ b/audio/xoscope/files/patch-gtkdatabox-0.6.0.0_gtk_Makefile.in
@@ -0,0 +1,13 @@
+--- gtkdatabox-0.6.0.0/gtk/Makefile.in.orig 2009-06-26 06:33:52 UTC
++++ gtkdatabox-0.6.0.0/gtk/Makefile.in
+@@ -193,10 +193,6 @@ INCLUDES = \
+ AM_CFLAGS = \
+ -O2\
+ -Wall -pedantic\
+- -DG_DISABLE_DEPRECATED\
+- -DGDK_DISABLE_DEPRECATED\
+- -DGDK_PIXBUF_DISABLE_DEPRECATED\
+- -DGTK_DISABLE_DEPRECATED\
+ `pkg-config gtk+-2.0 --cflags`
+
+ all: all-am
diff --git a/audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.am b/audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.am
deleted file mode 100644
index e87e83d5dfea..000000000000
--- a/audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
---- gtkdatabox-0.6.0.0/gtk/Makefile.am.orig 2012-11-04 10:55:25.000000000 -0500
-+++ gtkdatabox-0.6.0.0/gtk/Makefile.am 2012-11-04 10:55:48.000000000 -0500
-@@ -30,8 +30,4 @@
- AM_CFLAGS =\
- -O2\
- -Wall -pedantic\
-- -DG_DISABLE_DEPRECATED\
-- -DGDK_DISABLE_DEPRECATED\
-- -DGDK_PIXBUF_DISABLE_DEPRECATED\
-- -DGTK_DISABLE_DEPRECATED\
- `pkg-config gtk+-2.0 --cflags`
diff --git a/audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.in b/audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.in
deleted file mode 100644
index c8caf31af229..000000000000
--- a/audio/xoscope/files/patch-gtkdatabox-0.6.0_gtk_Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- gtkdatabox-0.6.0.0/gtk/Makefile.in.orig 2012-11-04 10:45:01.000000000 -0500
-+++ gtkdatabox-0.6.0.0/gtk/Makefile.in 2012-11-04 10:45:27.000000000 -0500
-@@ -193,10 +193,6 @@
- AM_CFLAGS = \
- -O2\
- -Wall -pedantic\
-- -DG_DISABLE_DEPRECATED\
-- -DGDK_DISABLE_DEPRECATED\
-- -DGDK_PIXBUF_DISABLE_DEPRECATED\
-- -DGTK_DISABLE_DEPRECATED\
- `pkg-config gtk+-2.0 --cflags`
-
- all: all-am
diff --git a/audio/xoscope/files/patch-ser__unix.c b/audio/xoscope/files/patch-ser__unix.c
new file mode 100644
index 000000000000..bee2d691f1db
--- /dev/null
+++ b/audio/xoscope/files/patch-ser__unix.c
@@ -0,0 +1,74 @@
+--- ser_unix.c.orig 2008-12-17 17:46:15 UTC
++++ ser_unix.c
+@@ -14,7 +14,14 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <string.h>
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++#ifdef BSD
++#include <termios.h>
++#else
+ #include <termio.h>
++#endif
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+@@ -24,7 +31,11 @@
+
+ char device[512] = ""; /* Serial device */
+ int sflags;
++#ifdef BSD
++struct termios stbuf, svbuf; /* termios: svbuf=saved, stbuf=set */
++#else
+ struct termio stbuf, svbuf; /* termios: svbuf=saved, stbuf=set */
++#endif
+
+ char serial_error[256];
+
+@@ -68,7 +79,11 @@ void
+ cleanup_serial(int fd)
+ {
+ if (fd > 0) {
++#ifdef BSD
++ if (tcsetattr(fd, TCSANOW, &svbuf) < 0 ) {
++#else
+ if (ioctl(fd, TCSETA, &svbuf) < 0) {
++#endif
+ /* sprintf(serial_error, "Can't ioctl set device %s", device); */
+ /* perror(error); */
+ }
+@@ -86,12 +101,20 @@ findscope(char *dev, int i)
+ sprintf(serial_error, "%s %s", dev, strerror(errno));
+ return(0);
+ }
++#ifdef BSD
++ if (tcgetattr(fd, &svbuf) < 0) { /* save settings */
++#else
+ if (ioctl(fd, TCGETA, &svbuf) < 0) { /* save settings */
++#endif
+ sprintf(serial_error, "%s Can't ioctl TCGETA", dev);
+ close(fd);
+ return(0);
+ }
++#ifdef BSD
++ if (tcsetattr(fd, TCSANOW, &stbuf) < 0) {
++#else
+ if (ioctl(fd, TCSETA, &stbuf) < 0) {
++#endif
+ sprintf(serial_error, "%s Can't ioctl TCSETA", dev);
+ close(fd);
+ return(0);
+@@ -101,7 +124,11 @@ findscope(char *dev, int i)
+ return (1); /* serial port scope found! */
+ }
+
++#ifdef BSD
++ if (tcsetattr(fd, TCSANOW, &svbuf) < 0) { /* restore settings */
++#else
+ if (ioctl(fd, TCSETA, &svbuf) < 0) { /* restore settings */
++#endif
+ #if 0
+ sprintf(serial_error, "Can't ioctl (set) %s", dev);
+ close(fd);
diff --git a/audio/xoscope/files/patch-ser_unix.c b/audio/xoscope/files/patch-ser_unix.c
deleted file mode 100644
index 24ef4dba3492..000000000000
--- a/audio/xoscope/files/patch-ser_unix.c
+++ /dev/null
@@ -1,74 +0,0 @@
---- ser_unix.c.orig 2008-12-17 12:46:15.000000000 -0500
-+++ ser_unix.c 2013-11-05 18:03:15.000000000 -0500
-@@ -14,7 +14,14 @@
- #include <errno.h>
- #include <unistd.h>
- #include <string.h>
-+#if (defined(__unix__) || defined(unix)) && !defined(USG)
-+#include <sys/param.h>
-+#endif
-+#ifdef BSD
-+#include <termios.h>
-+#else
- #include <termio.h>
-+#endif
- #include <fcntl.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
-@@ -24,7 +31,11 @@
-
- char device[512] = ""; /* Serial device */
- int sflags;
-+#ifdef BSD
-+struct termios stbuf, svbuf; /* termios: svbuf=saved, stbuf=set */
-+#else
- struct termio stbuf, svbuf; /* termios: svbuf=saved, stbuf=set */
-+#endif
-
- char serial_error[256];
-
-@@ -68,7 +79,11 @@
- cleanup_serial(int fd)
- {
- if (fd > 0) {
-+#ifdef BSD
-+ if (tcsetattr(fd, TCSANOW, &svbuf) < 0 ) {
-+#else
- if (ioctl(fd, TCSETA, &svbuf) < 0) {
-+#endif
- /* sprintf(serial_error, "Can't ioctl set device %s", device); */
- /* perror(error); */
- }
-@@ -86,12 +101,20 @@
- sprintf(serial_error, "%s %s", dev, strerror(errno));
- return(0);
- }
-+#ifdef BSD
-+ if (tcgetattr(fd, &svbuf) < 0) { /* save settings */
-+#else
- if (ioctl(fd, TCGETA, &svbuf) < 0) { /* save settings */
-+#endif
- sprintf(serial_error, "%s Can't ioctl TCGETA", dev);
- close(fd);
- return(0);
- }
-+#ifdef BSD
-+ if (tcsetattr(fd, TCSANOW, &stbuf) < 0) {
-+#else
- if (ioctl(fd, TCSETA, &stbuf) < 0) {
-+#endif
- sprintf(serial_error, "%s Can't ioctl TCSETA", dev);
- close(fd);
- return(0);
-@@ -101,7 +124,11 @@
- return (1); /* serial port scope found! */
- }
-
-+#ifdef BSD
-+ if (tcsetattr(fd, TCSANOW, &svbuf) < 0) { /* restore settings */
-+#else
- if (ioctl(fd, TCSETA, &svbuf) < 0) { /* restore settings */
-+#endif
- #if 0
- sprintf(serial_error, "Can't ioctl (set) %s", dev);
- close(fd);
diff --git a/audio/xsynth-dssi/files/patch-configure b/audio/xsynth-dssi/files/patch-configure
index 9888becc2deb..9e7f92d54be9 100644
--- a/audio/xsynth-dssi/files/patch-configure
+++ b/audio/xsynth-dssi/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2009-08-26 20:26:01.000000000 +0200
-+++ configure 2009-08-26 20:26:09.000000000 +0200
-@@ -13000,7 +13000,7 @@
+--- configure.orig 2010-09-23 19:27:28 UTC
++++ configure
+@@ -13071,7 +13071,7 @@ fi
echo "GTK support: $with_gtk"
case "${host_os}" in
diff --git a/audio/xwave/files/patch-FWF_Imakefile b/audio/xwave/files/patch-FWF_Imakefile
index 7876d1053ba3..37e7d4f5e052 100644
--- a/audio/xwave/files/patch-FWF_Imakefile
+++ b/audio/xwave/files/patch-FWF_Imakefile
@@ -13,9 +13,9 @@
to do a final 'ar' of all OBJS after all of them are build. This
can be done by adding an auxiliary target in FWF/Imakefile.
---- FWF/Imakefile.orig Mon Nov 9 00:22:54 1998
-+++ FWF/Imakefile Mon Jan 1 15:47:50 2001
-@@ -9,14 +9,25 @@
+--- FWF/Imakefile.orig 1998-11-08 23:22:54 UTC
++++ FWF/Imakefile
+@@ -9,14 +9,25 @@ ALLDIRS = $(INITIALDIRS) include/Xfwf li
MakeDirectories(all,$(ALLDIRS))
InitSubdirs($(SUBDIRS))
diff --git a/audio/xwave/files/patch-FWF_src_Imakefile b/audio/xwave/files/patch-FWF_src_Imakefile
index 67850726cd03..cb33d8e64b75 100644
--- a/audio/xwave/files/patch-FWF_src_Imakefile
+++ b/audio/xwave/files/patch-FWF_src_Imakefile
@@ -1,6 +1,6 @@
---- FWF/src/Imakefile.orig Mon Nov 9 08:22:54 1998
-+++ FWF/src/Imakefile Fri Jun 30 19:53:43 2000
-@@ -34,6 +34,7 @@
+--- FWF/src/Imakefile.orig 1998-11-08 23:22:54 UTC
++++ FWF/src/Imakefile
+@@ -34,6 +34,7 @@ SUBDIRS = Board Common Frame Group Radio
InitSubdirs($(SUBDIRS))
diff --git a/audio/xwave/files/patch-config.site b/audio/xwave/files/patch-config.site
index 8e1de6f64c46..a252d949f93e 100644
--- a/audio/xwave/files/patch-config.site
+++ b/audio/xwave/files/patch-config.site
@@ -1,5 +1,5 @@
---- config.site.orig Mon Nov 9 08:22:55 1998
-+++ config.site Fri Jun 30 19:52:45 2000
+--- config.site.orig 1998-11-08 23:22:55 UTC
++++ config.site
@@ -1,5 +1,5 @@
-EXTRA_INCLUDES=-I../ -I../include
diff --git a/audio/xwave/files/patch-src_XWave b/audio/xwave/files/patch-src_XWave
index 22dff90eecff..367696d44fca 100644
--- a/audio/xwave/files/patch-src_XWave
+++ b/audio/xwave/files/patch-src_XWave
@@ -1,5 +1,5 @@
---- src/XWave.orig Mon Nov 9 08:22:55 1998
-+++ src/XWave Fri Jun 30 20:08:56 2000
+--- src/XWave.orig 1998-11-08 23:22:55 UTC
++++ src/XWave
@@ -1,7 +1,7 @@
! My self defined Resources
diff --git a/audio/xwave/files/patch-src__record_dialog.c b/audio/xwave/files/patch-src__record_dialog.c
deleted file mode 100644
index e0b54f66cdc1..000000000000
--- a/audio/xwave/files/patch-src__record_dialog.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/record_dialog.c.orig Mon Nov 9 08:22:55 1998
-+++ src/record_dialog.c Fri Jun 30 19:49:18 2000
-@@ -524,7 +524,7 @@
- sprintf(MD->mw->messages,"%.2lf kbytes (%.2lfs)",
- (double)playsize/1024,recordtime);
- XtVaSetValues(label5,XtNlabel, MD->mw->messages, NULL);
--#if defined(linux)||defined(FreeBSD)||defined(sun)
-+#if defined(linux)||defined(__FreeBSD__)||defined(sun)
- usleep(80000);
- #elif defined(sgi)
- sginap(CLK_TCK/(ONE_SECOND/80000));
diff --git a/audio/xwave/files/patch-src_aifc.c b/audio/xwave/files/patch-src_aifc.c
index 61d3ced30a6c..0e98fb8d9672 100644
--- a/audio/xwave/files/patch-src_aifc.c
+++ b/audio/xwave/files/patch-src_aifc.c
@@ -1,5 +1,5 @@
---- src/aifc.c.orig Mon Nov 9 08:22:55 1998
-+++ src/aifc.c Fri Jun 30 19:49:15 2000
+--- src/aifc.c.orig 1998-11-08 23:22:55 UTC
++++ src/aifc.c
@@ -9,7 +9,7 @@
#ifdef linux
diff --git a/audio/xwave/files/patch-src_au.c b/audio/xwave/files/patch-src_au.c
index 7f78582f832d..f73f43ae6bee 100644
--- a/audio/xwave/files/patch-src_au.c
+++ b/audio/xwave/files/patch-src_au.c
@@ -1,5 +1,5 @@
---- src/au.c.orig Mon Nov 9 08:22:55 1998
-+++ src/au.c Fri Jun 30 19:49:15 2000
+--- src/au.c.orig 1998-11-08 23:22:55 UTC
++++ src/au.c
@@ -32,7 +32,7 @@
#ifdef linux
diff --git a/audio/xwave/files/patch-src_audio.c b/audio/xwave/files/patch-src_audio.c
index 38e4f310a2de..18637b6f82fe 100644
--- a/audio/xwave/files/patch-src_audio.c
+++ b/audio/xwave/files/patch-src_audio.c
@@ -1,5 +1,5 @@
---- src/audio.c.orig Sun Nov 8 15:22:55 1998
-+++ src/audio.c Sun Sep 8 03:35:52 2002
+--- src/audio.c.orig 1998-11-08 23:22:55 UTC
++++ src/audio.c
@@ -37,8 +37,8 @@
#ifdef linux
#include <linux/soundcard.h>
@@ -20,7 +20,7 @@
static int set_dsp(int o_mode,int res,int channels,int freq,int *buf_size);
#endif
-@@ -67,7 +67,7 @@
+@@ -67,7 +67,7 @@ extern AppResources app_resources;
static Audio_File af;
static int stop_record;
@@ -29,7 +29,7 @@
int set_dsp(int o_mode,int res, int channels, int freq, int *buf_size)
{
int check;
-@@ -369,7 +369,7 @@
+@@ -369,7 +369,7 @@ int get_samples(byte* audio_buffer,int m
void play_file(char *fname,Main_Bool *mb)
{
@@ -38,7 +38,7 @@
int audio;
#elif defined(sgi)
ALport port;
-@@ -383,7 +383,7 @@
+@@ -383,7 +383,7 @@ void play_file(char *fname,Main_Bool *mb
return;
}
@@ -47,7 +47,7 @@
if ((audio=set_dsp(O_WRONLY,af.bps,af.channels,af.freq,&buf_size))==-1) {
fprintf(stderr,"XWave: Error ! Cannot set dsp !\n");
close(af.fd);
-@@ -403,7 +403,7 @@
+@@ -403,7 +403,7 @@ void play_file(char *fname,Main_Bool *mb
if ((buffer=malloc(buf_size))==NULL) {
fprintf(stderr,"XWave: Error ! Cannot alloc mem !\n");
close(af.fd);
@@ -56,7 +56,7 @@
close(audio);
#elif defined(sgi)
ALcloseport(port);
-@@ -412,7 +412,7 @@
+@@ -412,7 +412,7 @@ void play_file(char *fname,Main_Bool *mb
return;
}
@@ -65,7 +65,7 @@
while ((length=af_read(af,buffer,buf_size))>0) {
if (write(audio, buffer, length)==-1) break;
}
-@@ -439,7 +439,7 @@
+@@ -439,7 +439,7 @@ void OLD_play_buffer(Main_Data *md)
int offset=0,playlength,length;
#ifdef sgi
ALport port;
@@ -74,7 +74,7 @@
int audio;
if ((audio=set_dsp(O_WRONLY,wd->res,wd->channels,wd->freq,&buf_size))==-1) {
-@@ -472,7 +472,7 @@
+@@ -472,7 +472,7 @@ void OLD_play_buffer(Main_Data *md)
buffer=wd->buffer+offset;
while (playlength>0) {
if (playlength<buf_size) buf_size=playlength;
@@ -83,7 +83,7 @@
if (write(audio, buffer, buf_size)==-1) {
close(audio);
kill((pid_t) getppid(),SIGUSR1);
-@@ -497,7 +497,7 @@
+@@ -497,7 +497,7 @@ void OLD_play_buffer(Main_Data *md)
wd2af(wd,&af);
af_rewind(af);
if (af_seek(af,offset,SEEK_CUR)==AF_ERROR) {
@@ -92,7 +92,7 @@
close(audio);
#elif defined(sgi)
ALcloseport(port);
-@@ -510,7 +510,7 @@
+@@ -510,7 +510,7 @@ void OLD_play_buffer(Main_Data *md)
while (playlength>0) {
if (playlength<buf_size) buf_size=playlength;
if ((length=af_read(af,(char*) md->mg->fbuf,buf_size))==-1) {
@@ -101,7 +101,7 @@
close(audio);
#elif defined(sgi)
ALcloseport(port);
-@@ -518,7 +518,7 @@
+@@ -518,7 +518,7 @@ void OLD_play_buffer(Main_Data *md)
kill((pid_t) getppid(),SIGUSR1);
return;
}
@@ -110,7 +110,7 @@
if (write(audio,(char*) md->mg->fbuf,length)==-1) {
close(audio);
kill((pid_t) getppid(),SIGUSR1);
-@@ -537,7 +537,7 @@
+@@ -537,7 +537,7 @@ void OLD_play_buffer(Main_Data *md)
}
}
@@ -119,7 +119,7 @@
close(audio);
#elif defined(sgi)
while (ALgetfilled(port)) sginap(2);
-@@ -558,7 +558,7 @@
+@@ -558,7 +558,7 @@ void play_buffer(Main_Data *md)
int offset=0,playlength,length;
#ifdef sgi
ALport port;
@@ -128,7 +128,7 @@
int audio;
if ((audio=set_dsp(O_WRONLY,wd->res,wd->channels,wd->freq,&buf_size))==-1) {
-@@ -593,7 +593,7 @@
+@@ -593,7 +593,7 @@ void play_buffer(Main_Data *md)
((int *)shared_playpos)[0] = wd->playbeg*wd->bpspl;
while (playlength>0) {
if (playlength<buf_size) buf_size=playlength;
@@ -137,7 +137,7 @@
if (write(audio, buffer, buf_size)==-1) {
((int *)shared_playpos)[0] = -1;
close(audio);
-@@ -621,7 +621,7 @@
+@@ -621,7 +621,7 @@ void play_buffer(Main_Data *md)
af_rewind(af);
if (af_seek(af,offset,SEEK_CUR)==AF_ERROR) {
((int *)shared_playpos)[0] = -1;
@@ -146,7 +146,7 @@
close(audio);
#elif defined(sgi)
ALcloseport(port);
-@@ -636,7 +636,7 @@
+@@ -636,7 +636,7 @@ void play_buffer(Main_Data *md)
if (playlength<buf_size) buf_size=playlength;
if ((length=af_read(af,(char*) md->mg->fbuf,buf_size))==-1) {
((int *)shared_playpos)[0] = -1;
@@ -155,7 +155,7 @@
close(audio);
#elif defined(sgi)
ALcloseport(port);
-@@ -644,7 +644,7 @@
+@@ -644,7 +644,7 @@ void play_buffer(Main_Data *md)
kill((pid_t) getppid(),SIGUSR1);
return;
}
@@ -164,7 +164,7 @@
if (write(audio,(char*) md->mg->fbuf,length)==-1) {
((int *)shared_playpos)[0] = -1;
close(audio);
-@@ -666,7 +666,7 @@
+@@ -666,7 +666,7 @@ void play_buffer(Main_Data *md)
}
((int *)shared_playpos)[0] = -1;
@@ -173,7 +173,7 @@
close(audio);
#elif defined(sgi)
while (ALgetfilled(port)) sginap(2);
-@@ -686,7 +686,7 @@
+@@ -686,7 +686,7 @@ void rec_file(byte res,byte mode,int fre
void write_length();
byte *data=NULL;
int abuf_size,count;
@@ -182,7 +182,7 @@
int audio;
if ((audio=set_dsp(O_RDONLY,res,mode,freq,&abuf_size))==-1) {
-@@ -707,7 +707,7 @@
+@@ -707,7 +707,7 @@ void rec_file(byte res,byte mode,int fre
if ((data = (byte *) malloc(abuf_size)) == NULL) {
fprintf(stderr,"XWave: Error while alloc mem for audio_buffer !\n");
@@ -191,7 +191,7 @@
close(audio);
#elif defined(sgi)
ALcloseport(port);
-@@ -725,7 +725,7 @@
+@@ -725,7 +725,7 @@ void rec_file(byte res,byte mode,int fre
if (af_open(fname,&af,AF_NEW)==AF_ERROR) {
free(data);
@@ -200,7 +200,7 @@
close(audio);
#elif defined(sgi)
ALcloseport(port);
-@@ -738,7 +738,7 @@
+@@ -738,7 +738,7 @@ void rec_file(byte res,byte mode,int fre
signal(SIGUSR1,write_length);
while(1) {
@@ -209,7 +209,7 @@
if ((count=read(audio, data, abuf_size))==-1) {
close(audio);
af_close(af);
-@@ -762,7 +762,7 @@
+@@ -762,7 +762,7 @@ void rec_file(byte res,byte mode,int fre
return;
}
if ((count=af_write(af,(char*)data,count))==AF_ERROR) {
diff --git a/audio/xwave/files/patch-src_button.c b/audio/xwave/files/patch-src_button.c
index 1b1c114c1280..5f84bced7d16 100644
--- a/audio/xwave/files/patch-src_button.c
+++ b/audio/xwave/files/patch-src_button.c
@@ -1,6 +1,6 @@
---- src/button.c.orig Mon Nov 9 08:22:55 1998
-+++ src/button.c Fri Jun 30 19:49:16 2000
-@@ -679,7 +679,7 @@
+--- src/button.c.orig 1998-11-08 23:22:55 UTC
++++ src/button.c
+@@ -679,7 +679,7 @@ Boolean set_playline(XtPointer client_da
now_clock=clock();
sample_time=(float)md->wd->tlength/(float)md->wd->freq;
diff --git a/audio/xwave/files/patch-src_edit.c b/audio/xwave/files/patch-src_edit.c
index 111c5802e7d1..78886ceb697b 100644
--- a/audio/xwave/files/patch-src_edit.c
+++ b/audio/xwave/files/patch-src_edit.c
@@ -1,6 +1,6 @@
---- src/edit.c.orig Mon Nov 9 08:22:55 1998
-+++ src/edit.c Fri Jun 30 20:48:28 2000
-@@ -54,6 +54,7 @@
+--- src/edit.c.orig 1998-11-08 23:22:55 UTC
++++ src/edit.c
+@@ -54,6 +54,7 @@ extern char begin_text[MAX_NUMLENGTH];
extern bool button_2;
/* these conversion routines are also in graphics.c */
@@ -8,7 +8,7 @@
int mg_sel_leftsample(float step,int x)
{
return(ceil(step*x-0.5));
-@@ -73,7 +74,7 @@
+@@ -73,7 +74,7 @@ int mg_sel_rightpixel(float step,int x)
{
return((int)(((float)x+0.5)/step));
}
diff --git a/audio/xwave/files/patch-src_effects.c b/audio/xwave/files/patch-src_effects.c
index d36c98bd3663..6f5c9d94e720 100644
--- a/audio/xwave/files/patch-src_effects.c
+++ b/audio/xwave/files/patch-src_effects.c
@@ -1,6 +1,6 @@
---- src/effects.c.orig Mon Nov 9 08:22:55 1998
-+++ src/effects.c Fri Jun 30 19:49:16 2000
-@@ -348,7 +348,7 @@
+--- src/effects.c.orig 1998-11-08 23:22:55 UTC
++++ src/effects.c
+@@ -348,7 +348,7 @@ void props_return(Sample_Return *sr)
switch (sr->res) {
case 8: {
@@ -9,7 +9,7 @@
for (i=0;i<newlength;i++) newbuf[i]=obuf[(i<<1)+1]+128;
#elif defined (sgi) || defined (sun)
for (i=0;i<newlength;i++) newbuf[i]=obuf[(i<<1)]+128;
-@@ -356,7 +356,7 @@
+@@ -356,7 +356,7 @@ void props_return(Sample_Return *sr)
break;
}
case 16: {
diff --git a/audio/xwave/files/patch-src_endian.c b/audio/xwave/files/patch-src_endian.c
deleted file mode 100644
index 4615100a8841..000000000000
--- a/audio/xwave/files/patch-src_endian.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/endian.h.orig Mon Nov 9 08:22:55 1998
-+++ src/endian.h Fri Jun 30 19:49:16 2000
-@@ -16,7 +16,7 @@
- #define big_endian 1
- #endif
-
--#elif defined (linux) || defined (sun) || defined (FreeBSD)
-+#elif defined (linux) || defined (sun) || defined (__FreeBSD__)
-
- #if BYTE_ORDER==LITTLE_ENDIAN
- #define little_endian 1
diff --git a/audio/xwave/files/patch-src_endian.h b/audio/xwave/files/patch-src_endian.h
new file mode 100644
index 000000000000..c57beff6669d
--- /dev/null
+++ b/audio/xwave/files/patch-src_endian.h
@@ -0,0 +1,11 @@
+--- src/endian.h.orig 1998-11-08 23:22:55 UTC
++++ src/endian.h
+@@ -16,7 +16,7 @@ typedef unsigned short u_int16_t;
+ #define big_endian 1
+ #endif
+
+-#elif defined (linux) || defined (sun) || defined (FreeBSD)
++#elif defined (linux) || defined (sun) || defined (__FreeBSD__)
+
+ #if BYTE_ORDER==LITTLE_ENDIAN
+ #define little_endian 1
diff --git a/audio/xwave/files/patch-src_graphics.c b/audio/xwave/files/patch-src_graphics.c
index b66afe7118f8..81bfedcc5045 100644
--- a/audio/xwave/files/patch-src_graphics.c
+++ b/audio/xwave/files/patch-src_graphics.c
@@ -1,5 +1,5 @@
---- src/graphics.c.orig Mon Nov 9 08:22:55 1998
-+++ src/graphics.c Fri Jun 30 19:49:18 2000
+--- src/graphics.c.orig 1998-11-08 23:22:55 UTC
++++ src/graphics.c
@@ -30,7 +30,7 @@
#ifdef linux
@@ -9,7 +9,7 @@
#include <machine/endian.h>
#elif defined (sgi)
#include <sys/endian.h>
-@@ -1476,7 +1476,7 @@
+@@ -1476,7 +1476,7 @@ void expose_action (Widget w, Main_Data
if (md->mb->exposing) return;
*/
@@ -18,7 +18,7 @@
if (resizing) {
resizing=FALSE;
return;
-@@ -1532,7 +1532,7 @@
+@@ -1532,7 +1532,7 @@ Next_Wave *get_nw(Main_Data *md,Widget w
void expose_canvas (Widget w, Main_Data *md, XExposeEvent *event, Boolean *flg)
{
diff --git a/audio/xwave/files/patch-src_record__dialog.c b/audio/xwave/files/patch-src_record__dialog.c
new file mode 100644
index 000000000000..2ff820c743f3
--- /dev/null
+++ b/audio/xwave/files/patch-src_record__dialog.c
@@ -0,0 +1,11 @@
+--- src/record_dialog.c.orig 1998-11-08 23:22:55 UTC
++++ src/record_dialog.c
+@@ -524,7 +524,7 @@ Boolean update_record(XtPointer client_d
+ sprintf(MD->mw->messages,"%.2lf kbytes (%.2lfs)",
+ (double)playsize/1024,recordtime);
+ XtVaSetValues(label5,XtNlabel, MD->mw->messages, NULL);
+-#if defined(linux)||defined(FreeBSD)||defined(sun)
++#if defined(linux)||defined(__FreeBSD__)||defined(sun)
+ usleep(80000);
+ #elif defined(sgi)
+ sginap(CLK_TCK/(ONE_SECOND/80000));
diff --git a/audio/xwave/files/patch-src_riff.c b/audio/xwave/files/patch-src_riff.c
index 994c277585c3..48fec19b6e6c 100644
--- a/audio/xwave/files/patch-src_riff.c
+++ b/audio/xwave/files/patch-src_riff.c
@@ -1,5 +1,5 @@
---- src/riff.c.orig Mon Nov 9 08:22:55 1998
-+++ src/riff.c Fri Jun 30 19:49:19 2000
+--- src/riff.c.orig 1998-11-08 23:22:55 UTC
++++ src/riff.c
@@ -33,7 +33,7 @@
#ifdef linux
diff --git a/audio/xwave/files/patch-src_types.h b/audio/xwave/files/patch-src_types.h
index 545954c92aa9..2c639e0818d7 100644
--- a/audio/xwave/files/patch-src_types.h
+++ b/audio/xwave/files/patch-src_types.h
@@ -1,5 +1,5 @@
---- src/types.h.orig Mon Nov 9 08:22:55 1998
-+++ src/types.h Fri Jun 30 19:49:19 2000
+--- src/types.h.orig 1998-11-08 23:22:55 UTC
++++ src/types.h
@@ -27,7 +27,7 @@
typedef unsigned char byte;
typedef byte bool;
diff --git a/audio/yell/files/patch-yell.c b/audio/yell/files/patch-yell.c
index 38472d4fcb4c..791d475bf21d 100644
--- a/audio/yell/files/patch-yell.c
+++ b/audio/yell/files/patch-yell.c
@@ -1,5 +1,5 @@
---- ./yell.c.orig 2013-05-23 04:57:00.948543624 +0200
-+++ ./yell.c 2013-05-23 04:57:26.400583853 +0200
+--- yell.c.orig 2011-03-31 15:21:37 UTC
++++ yell.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/audio/zinf/files/patch-base-Makefile.in b/audio/zinf/files/patch-base-Makefile.in
deleted file mode 100644
index 4c1924ee8d9b..000000000000
--- a/audio/zinf/files/patch-base-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- base/Makefile.in.orig Sun Feb 15 08:34:57 2004
-+++ base/Makefile.in Mon Feb 16 13:02:37 2004
-@@ -245,7 +245,7 @@
-
-
- zinf_LDADD = $(top_builddir)/io/libio.la unix/libunix.la \
-- $(ZINF_LIBS) $(GDBM_LIBS) $(THREAD_LIBS) $(GLIB_LIBS) -ldl
-+ $(ZINF_LIBS) $(GDBM_LIBS) $(THREAD_LIBS) $(GLIB_LIBS)
-
- zinf_LDFLAGS = -export-dynamic -L$(top_builddir)/mdb
-
diff --git a/audio/zinf/files/patch-base-include-event.h b/audio/zinf/files/patch-base-include-event.h
deleted file mode 100644
index 2b0741654902..000000000000
--- a/audio/zinf/files/patch-base-include-event.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- base/include/event.h.orig Wed Sep 17 02:34:53 2003
-+++ base/include/event.h Mon Feb 16 12:15:13 2004
-@@ -24,7 +24,10 @@
- #ifndef INCLUDED_EVENT_H_
- #define INCLUDED_EVENT_H_
-
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
- #include "config.h"
- #include "errors.h"
-
diff --git a/audio/zinf/files/patch-base-include-facontext.h b/audio/zinf/files/patch-base-include-facontext.h
deleted file mode 100644
index 7b5d4ba3e0ec..000000000000
--- a/audio/zinf/files/patch-base-include-facontext.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- base/include/facontext.h.orig Thu Feb 6 02:52:52 2003
-+++ base/include/facontext.h Mon Aug 18 17:34:13 2003
-@@ -25,7 +25,10 @@
- #ifndef INCLUDED_FACONTEXT_H_
- #define INCLUDED_FACONTEXT_H_
-
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
-
- #include "config.h"
- #include "preferences.h"
diff --git a/audio/zinf/files/patch-base-include-preferences.h b/audio/zinf/files/patch-base-include-preferences.h
deleted file mode 100644
index c376ad0537c3..000000000000
--- a/audio/zinf/files/patch-base-include-preferences.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- base/include/preferences.h.orig Sat Mar 15 10:01:45 2003
-+++ base/include/preferences.h Mon Aug 18 17:32:11 2003
-@@ -26,7 +26,10 @@
-
- #include <string>
- #include <vector>
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
-
- #include "config.h"
- #include "errors.h"
diff --git a/audio/zinf/files/patch-base-include-queue.h b/audio/zinf/files/patch-base-include-queue.h
deleted file mode 100644
index 659ee131ea72..000000000000
--- a/audio/zinf/files/patch-base-include-queue.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- base/include/queue.h.orig Wed Sep 17 00:34:53 2003
-+++ base/include/queue.h Fri Jun 29 17:36:37 2007
-@@ -24,6 +24,7 @@
- #ifndef INCLUDED_QUEUE_H_
- #define INCLUDED_QUEUE_H_
-
-+#include <assert.h>
- #include "config.h"
- #include "mutex.h"
-
diff --git a/audio/zinf/files/patch-base-include-swab.h b/audio/zinf/files/patch-base-include-swab.h
deleted file mode 100644
index 0a96ad997242..000000000000
--- a/audio/zinf/files/patch-base-include-swab.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- base/include/swab.h.orig Tue Mar 18 03:53:31 2003
-+++ base/include/swab.h Mon Aug 18 17:33:34 2003
-@@ -1,7 +1,10 @@
- #if !defined(_ZINF_SWAB_H)
- #define _ZINF_SWAB_H
-
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
-
- #define SWAB16(a) ( (((uint16_t)(a) << 8) & 0xFF00) | (((uint16_t)(a) >> 8) & 0x00FF) )
- #define SWAB32(a) ( (SWAB16(((a) >> 16) & 0xFFFF) << 0) | (SWAB16((a) & 0xFFFF) << 16) )
diff --git a/audio/zinf/files/patch-base-include-thread.h b/audio/zinf/files/patch-base-include-thread.h
deleted file mode 100644
index d7dc43f36ebb..000000000000
--- a/audio/zinf/files/patch-base-include-thread.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- base/include/thread.h.orig Thu Feb 6 02:52:49 2003
-+++ base/include/thread.h Mon Aug 18 17:33:09 2003
-@@ -26,7 +26,10 @@
-
- #include "config.h"
-
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
-
- typedef void (*thread_function)(void * arg);
-
diff --git a/audio/zinf/files/patch-base-src-properties.cpp b/audio/zinf/files/patch-base-src-properties.cpp
deleted file mode 100644
index 15dcafff4ac8..000000000000
--- a/audio/zinf/files/patch-base-src-properties.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- base/src/properties.cpp.orig Wed Nov 12 04:59:07 2003
-+++ base/src/properties.cpp Mon Feb 16 11:51:23 2004
-@@ -29,7 +29,9 @@
- #endif
-
-
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
- // #include <map>
- #include <vector>
- #include <string>
diff --git a/audio/zinf/files/patch-base-src-registrar.cpp b/audio/zinf/files/patch-base-src-registrar.cpp
deleted file mode 100644
index 5e34a92860d1..000000000000
--- a/audio/zinf/files/patch-base-src-registrar.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- base/src/registrar.cpp.orig Sat Mar 15 10:01:46 2003
-+++ base/src/registrar.cpp Mon Aug 18 18:54:16 2003
-@@ -28,7 +28,7 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <set>
--#include <wordexp.h>
-+#include <glob.h>
- #endif // WIN32
-
- #include <stdio.h>
-@@ -79,13 +79,13 @@
- dir = *di++;
-
- #ifndef WIN32
-- wordexp_t result;
-- if (wordexp(dir.c_str(), &result, 0) ==0){
-+ glob_t result;
-+ if (glob(dir.c_str(), 0, NULL, &result) ==0){
- //cerr << "Expanded " << dir << " in ";
-- dir = result.we_wordv[0];
-+ dir = result.gl_pathv[0];
- //cerr << dir << endl;
- }
-- wordfree(&result);
-+ globfree(&result);
-
- #if 0
- if (dir[0] == '~') {
diff --git a/audio/zinf/files/patch-base-src-utility.cpp b/audio/zinf/files/patch-base-src-utility.cpp
deleted file mode 100644
index 9875a048845a..000000000000
--- a/audio/zinf/files/patch-base-src-utility.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- base/src/utility.cpp.orig Sun May 11 15:45:31 2003
-+++ base/src/utility.cpp Mon Aug 18 18:57:01 2003
-@@ -52,7 +52,7 @@
- #include "win32impl.h"
- #include "browser.h"
- #include <unistd.h>
--#include <wordexp.h>
-+#include <glob.h>
- #define MKDIR(z) mkdir(z, 0755)
- #define _stat stat
- #ifndef _S_IFDIR
-@@ -764,13 +764,13 @@
-
- if (subpath.size()) {
- #ifndef WIN32
-- wordexp_t result;
-- if (wordexp(subpath.c_str(), &result, 0) ==0){
-+ glob_t result;
-+ if (glob(subpath.c_str(), 0, NULL, &result) ==0){
- //cerr << "Expanded " << dir << " in ";
-- subpath = result.we_wordv[0];
-+ subpath = result.gl_pathv[0];
- //cerr << dir << endl;
- }
-- wordfree(&result);
-+ globfree(&result);
- #endif
-
- dirs.push_back(subpath);
diff --git a/audio/zinf/files/patch-base-unix-include-win32impl.h b/audio/zinf/files/patch-base-unix-include-win32impl.h
deleted file mode 100644
index c9c95fe61435..000000000000
--- a/audio/zinf/files/patch-base-unix-include-win32impl.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- base/unix/include/win32impl.h.orig Thu Feb 6 02:52:42 2003
-+++ base/unix/include/win32impl.h Mon Aug 18 17:36:37 2003
-@@ -24,7 +24,10 @@
- #ifndef INCLUDED_WIN32IMPL_H_
- #define INCLUDED_WIN32IMPL_H_
-
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
- #include <limits.h>
-
- #include "config.h"
diff --git a/audio/zinf/files/patch-base_Makefile.in b/audio/zinf/files/patch-base_Makefile.in
new file mode 100644
index 000000000000..1dde106549d9
--- /dev/null
+++ b/audio/zinf/files/patch-base_Makefile.in
@@ -0,0 +1,11 @@
+--- base/Makefile.in.orig 2004-02-17 22:11:09 UTC
++++ base/Makefile.in
+@@ -245,7 +245,7 @@ zinf_SOURCES = src/log.cpp src/player.cp
+
+
+ zinf_LDADD = $(top_builddir)/io/libio.la unix/libunix.la \
+- $(ZINF_LIBS) $(GDBM_LIBS) $(THREAD_LIBS) $(GLIB_LIBS) -ldl
++ $(ZINF_LIBS) $(GDBM_LIBS) $(THREAD_LIBS) $(GLIB_LIBS)
+
+ zinf_LDFLAGS = -export-dynamic -L$(top_builddir)/mdb
+
diff --git a/audio/zinf/files/patch-base_include_event.h b/audio/zinf/files/patch-base_include_event.h
new file mode 100644
index 000000000000..6dc2c249992d
--- /dev/null
+++ b/audio/zinf/files/patch-base_include_event.h
@@ -0,0 +1,13 @@
+--- base/include/event.h.orig 2003-09-16 17:34:53 UTC
++++ base/include/event.h
+@@ -24,7 +24,10 @@ ________________________________________
+ #ifndef INCLUDED_EVENT_H_
+ #define INCLUDED_EVENT_H_
+
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+ #include "config.h"
+ #include "errors.h"
+
diff --git a/audio/zinf/files/patch-base_include_facontext.h b/audio/zinf/files/patch-base_include_facontext.h
new file mode 100644
index 000000000000..a7f34aa103fe
--- /dev/null
+++ b/audio/zinf/files/patch-base_include_facontext.h
@@ -0,0 +1,13 @@
+--- base/include/facontext.h.orig 2003-09-16 17:58:13 UTC
++++ base/include/facontext.h
+@@ -25,7 +25,10 @@ ________________________________________
+ #ifndef INCLUDED_FACONTEXT_H_
+ #define INCLUDED_FACONTEXT_H_
+
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+
+ #include "config.h"
+ #include "preferences.h"
diff --git a/audio/zinf/files/patch-base_include_preferences.h b/audio/zinf/files/patch-base_include_preferences.h
new file mode 100644
index 000000000000..048538709245
--- /dev/null
+++ b/audio/zinf/files/patch-base_include_preferences.h
@@ -0,0 +1,13 @@
+--- base/include/preferences.h.orig 2003-09-16 17:34:53 UTC
++++ base/include/preferences.h
+@@ -26,7 +26,10 @@ ________________________________________
+
+ #include <string>
+ #include <vector>
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+
+ #include "config.h"
+ #include "errors.h"
diff --git a/audio/zinf/files/patch-base_include_queue.h b/audio/zinf/files/patch-base_include_queue.h
new file mode 100644
index 000000000000..551fe16cc093
--- /dev/null
+++ b/audio/zinf/files/patch-base_include_queue.h
@@ -0,0 +1,10 @@
+--- base/include/queue.h.orig 2003-09-16 17:34:53 UTC
++++ base/include/queue.h
+@@ -24,6 +24,7 @@ ________________________________________
+ #ifndef INCLUDED_QUEUE_H_
+ #define INCLUDED_QUEUE_H_
+
++#include <assert.h>
+ #include "config.h"
+ #include "mutex.h"
+
diff --git a/audio/zinf/files/patch-base_include_swab.h b/audio/zinf/files/patch-base_include_swab.h
new file mode 100644
index 000000000000..1654a3cc6def
--- /dev/null
+++ b/audio/zinf/files/patch-base_include_swab.h
@@ -0,0 +1,13 @@
+--- base/include/swab.h.orig 2003-09-16 17:34:53 UTC
++++ base/include/swab.h
+@@ -1,7 +1,10 @@
+ #if !defined(_ZINF_SWAB_H)
+ #define _ZINF_SWAB_H
+
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+
+ #define SWAB16(a) ( (((uint16_t)(a) << 8) & 0xFF00) | (((uint16_t)(a) >> 8) & 0x00FF) )
+ #define SWAB32(a) ( (SWAB16(((a) >> 16) & 0xFFFF) << 0) | (SWAB16((a) & 0xFFFF) << 16) )
diff --git a/audio/zinf/files/patch-base_include_thread.h b/audio/zinf/files/patch-base_include_thread.h
new file mode 100644
index 000000000000..66a015ac7695
--- /dev/null
+++ b/audio/zinf/files/patch-base_include_thread.h
@@ -0,0 +1,13 @@
+--- base/include/thread.h.orig 2003-09-16 17:34:53 UTC
++++ base/include/thread.h
+@@ -26,7 +26,10 @@ ________________________________________
+
+ #include "config.h"
+
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+
+ typedef void (*thread_function)(void * arg);
+
diff --git a/audio/zinf/files/patch-base_src_properties.cpp b/audio/zinf/files/patch-base_src_properties.cpp
new file mode 100644
index 000000000000..e48bc3af48f4
--- /dev/null
+++ b/audio/zinf/files/patch-base_src_properties.cpp
@@ -0,0 +1,12 @@
+--- base/src/properties.cpp.orig 2003-11-11 19:59:07 UTC
++++ base/src/properties.cpp
+@@ -29,7 +29,9 @@ ________________________________________
+ #endif
+
+
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+ // #include <map>
+ #include <vector>
+ #include <string>
diff --git a/audio/zinf/files/patch-base_src_registrar.cpp b/audio/zinf/files/patch-base_src_registrar.cpp
new file mode 100644
index 000000000000..7622e072636e
--- /dev/null
+++ b/audio/zinf/files/patch-base_src_registrar.cpp
@@ -0,0 +1,29 @@
+--- base/src/registrar.cpp.orig 2003-09-16 17:34:54 UTC
++++ base/src/registrar.cpp
+@@ -35,7 +35,7 @@ ________________________________________
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <set>
+-#include <wordexp.h>
++#include <glob.h>
+ #endif // WIN32
+
+ #include <stdio.h>
+@@ -86,13 +86,13 @@ InitializeRegistry(Registry* registry, P
+ dir = *di++;
+
+ #ifndef WIN32
+- wordexp_t result;
+- if (wordexp(dir.c_str(), &result, 0) ==0){
++ glob_t result;
++ if (glob(dir.c_str(), 0, NULL, &result) ==0){
+ //cerr << "Expanded " << dir << " in ";
+- dir = result.we_wordv[0];
++ dir = result.gl_pathv[0];
+ //cerr << dir << endl;
+ }
+- wordfree(&result);
++ globfree(&result);
+
+ #if 0
+ if (dir[0] == '~') {
diff --git a/audio/zinf/files/patch-base_src_utility.cpp b/audio/zinf/files/patch-base_src_utility.cpp
new file mode 100644
index 000000000000..f0c73ce64a8e
--- /dev/null
+++ b/audio/zinf/files/patch-base_src_utility.cpp
@@ -0,0 +1,29 @@
+--- base/src/utility.cpp.orig 2004-02-10 18:20:22 UTC
++++ base/src/utility.cpp
+@@ -56,7 +56,7 @@ using namespace std;
+ #include "win32impl.h"
+ #include "browser.h"
+ #include <unistd.h>
+-#include <wordexp.h>
++#include <glob.h>
+ #define MKDIR(z) mkdir(z, 0755)
+ #define _stat stat
+ #ifndef _S_IFDIR
+@@ -825,13 +825,13 @@ SplitPath(const string& path)
+
+ if (subpath.size()) {
+ #ifndef WIN32
+- wordexp_t result;
+- if (wordexp(subpath.c_str(), &result, 0) ==0){
++ glob_t result;
++ if (glob(subpath.c_str(), 0, NULL, &result) ==0){
+ //cerr << "Expanded " << dir << " in ";
+- subpath = result.we_wordv[0];
++ subpath = result.gl_pathv[0];
+ //cerr << dir << endl;
+ }
+- wordfree(&result);
++ globfree(&result);
+ #endif
+
+ dirs.push_back(subpath);
diff --git a/audio/zinf/files/patch-base_unix_include_win32impl.h b/audio/zinf/files/patch-base_unix_include_win32impl.h
new file mode 100644
index 000000000000..629e61bb4f1e
--- /dev/null
+++ b/audio/zinf/files/patch-base_unix_include_win32impl.h
@@ -0,0 +1,13 @@
+--- base/unix/include/win32impl.h.orig 2003-09-16 17:34:54 UTC
++++ base/unix/include/win32impl.h
+@@ -24,7 +24,10 @@ ________________________________________
+ #ifndef INCLUDED_WIN32IMPL_H_
+ #define INCLUDED_WIN32IMPL_H_
+
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+ #include <limits.h>
+
+ #include "config.h"
diff --git a/audio/zinf/files/patch-configure b/audio/zinf/files/patch-configure
index fb4b6be15ceb..870a93b632ed 100644
--- a/audio/zinf/files/patch-configure
+++ b/audio/zinf/files/patch-configure
@@ -1,6 +1,6 @@
---- ./configure.orig 2004-02-17 17:09:31.000000000 -0500
-+++ ./configure 2012-03-06 14:46:40.000000000 -0500
-@@ -24258,6 +24258,7 @@
+--- configure.orig 2004-02-17 22:09:31 UTC
++++ configure
+@@ -24258,6 +24258,7 @@ _ACEOF
;;
freebsd*)
ZINF_OS="freebsd";
@@ -8,7 +8,7 @@
cat >>confdefs.h <<\_ACEOF
#define ZINF_OS_BSD 1
-@@ -26886,231 +26887,6 @@
+@@ -26886,231 +26887,6 @@ if test x$musicbrainz_prefix != x ; then
fi
@@ -240,7 +240,7 @@
if test "$MUSICBRAINZ_LIBS" != ""; then
have_mb=yes
else
-@@ -27120,26 +26896,6 @@
+@@ -27120,26 +26896,6 @@ fi
LIBS="$ac_orig_LIBS"
CPPFLAGS="$ac_orig_CPPFLAGS"
diff --git a/audio/zinf/files/patch-ftc-kjofol-kjofol.cpp b/audio/zinf/files/patch-ftc-kjofol-kjofol.cpp
deleted file mode 100644
index 7c59022623b5..000000000000
--- a/audio/zinf/files/patch-ftc-kjofol-kjofol.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- ftc/kjofol/kjofol.cpp.orig 2014-02-18 17:48:40.481824991 +0100
-+++ ftc/kjofol/kjofol.cpp 2014-02-18 17:49:16.578764197 +0100
-@@ -47,6 +47,7 @@
-
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <stdlib.h>
-
- #include "path_max.h"
-
diff --git a/audio/zinf/files/patch-ftc_kjofol_kjofol.cpp b/audio/zinf/files/patch-ftc_kjofol_kjofol.cpp
new file mode 100644
index 000000000000..49546b1af04e
--- /dev/null
+++ b/audio/zinf/files/patch-ftc_kjofol_kjofol.cpp
@@ -0,0 +1,10 @@
+--- ftc/kjofol/kjofol.cpp.orig 2003-09-16 17:34:56 UTC
++++ ftc/kjofol/kjofol.cpp
+@@ -47,6 +47,7 @@ using namespace std;
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <stdlib.h>
+
+ #include "path_max.h"
+
diff --git a/audio/zinf/files/patch-io-obs-obsinput.cpp b/audio/zinf/files/patch-io-obs-obsinput.cpp
deleted file mode 100644
index 0da21a444dad..000000000000
--- a/audio/zinf/files/patch-io-obs-obsinput.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
---- io/obs/obsinput.cpp-- Thu Oct 5 17:17:33 2000
-+++ io/obs/obsinput.cpp Sun Jun 9 16:13:16 2002
-@@ -193,6 +193,7 @@
-
- m_pSin = (struct sockaddr_in *)malloc(sizeof(struct sockaddr_in));
- assert(m_pSin);
-+ (void) memset(m_pSin, 0, sizeof(*m_pSin));
-
- iReuse = 1;
- m_pSin->sin_family = AF_INET;
-@@ -213,6 +214,7 @@
- else
- m_pSin->sin_addr.s_addr = htonl(INADDR_ANY);
-
-+ (void) memset(&sMreq, 0, sizeof(sMreq));
- sMreq.imr_multiaddr.s_addr = inet_addr(szAddr);
- sMreq.imr_interface.s_addr = htonl(INADDR_ANY);
- if (IN_MULTICAST(ntohl(sMreq.imr_multiaddr.s_addr)))
diff --git a/audio/zinf/files/patch-io-src-pullbuffer.cpp b/audio/zinf/files/patch-io-src-pullbuffer.cpp
deleted file mode 100644
index 6344b0d2eb3e..000000000000
--- a/audio/zinf/files/patch-io-src-pullbuffer.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- io/src/pullbuffer.cpp.orig Wed Sep 17 02:35:05 2003
-+++ io/src/pullbuffer.cpp Mon Feb 16 11:42:36 2004
-@@ -26,7 +26,10 @@
- #include <stdlib.h>
- #include <string.h>
- #include <assert.h>
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
- #ifndef WIN32
- #include <unistd.h>
- #endif
diff --git a/audio/zinf/files/patch-io-wavout-src-wavoutpmo.cpp b/audio/zinf/files/patch-io-wavout-src-wavoutpmo.cpp
deleted file mode 100644
index baa8551b8f6e..000000000000
--- a/audio/zinf/files/patch-io-wavout-src-wavoutpmo.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- io/wavout/src/wavoutpmo.cpp.orig Sat Mar 15 10:01:51 2003
-+++ io/wavout/src/wavoutpmo.cpp Mon Aug 18 17:25:07 2003
-@@ -28,7 +28,6 @@
- #endif
- #include <stdio.h>
- #include <stdlib.h>
--#include <malloc.h>
- #include <string>
-
- /* project headers */
diff --git a/audio/zinf/files/patch-io_obs_obsinput.cpp b/audio/zinf/files/patch-io_obs_obsinput.cpp
new file mode 100644
index 000000000000..5031c55dcbcb
--- /dev/null
+++ b/audio/zinf/files/patch-io_obs_obsinput.cpp
@@ -0,0 +1,18 @@
+--- io/obs/obsinput.cpp.orig 2003-09-16 17:35:02 UTC
++++ io/obs/obsinput.cpp
+@@ -198,6 +198,7 @@ Error ObsInput::Open(void)
+
+ m_pSin = (struct sockaddr_in *)malloc(sizeof(struct sockaddr_in));
+ assert(m_pSin);
++ (void) memset(m_pSin, 0, sizeof(*m_pSin));
+
+ iReuse = 1;
+ m_pSin->sin_family = AF_INET;
+@@ -218,6 +219,7 @@ Error ObsInput::Open(void)
+ else
+ m_pSin->sin_addr.s_addr = htonl(INADDR_ANY);
+
++ (void) memset(&sMreq, 0, sizeof(sMreq));
+ sMreq.imr_multiaddr.s_addr = inet_addr(szAddr);
+ sMreq.imr_interface.s_addr = htonl(INADDR_ANY);
+ if (IN_MULTICAST(ntohl(sMreq.imr_multiaddr.s_addr)))
diff --git a/audio/zinf/files/patch-io_src_pullbuffer.cpp b/audio/zinf/files/patch-io_src_pullbuffer.cpp
new file mode 100644
index 000000000000..d216b3e074dd
--- /dev/null
+++ b/audio/zinf/files/patch-io_src_pullbuffer.cpp
@@ -0,0 +1,13 @@
+--- io/src/pullbuffer.cpp.orig 2003-09-16 17:35:05 UTC
++++ io/src/pullbuffer.cpp
+@@ -26,7 +26,10 @@ ________________________________________
+ #include <stdlib.h>
+ #include <string.h>
+ #include <assert.h>
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+ #ifndef WIN32
+ #include <unistd.h>
+ #endif
diff --git a/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp b/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp
new file mode 100644
index 000000000000..6b4c6f003c6c
--- /dev/null
+++ b/audio/zinf/files/patch-io_wavout_src_wavoutpmo.cpp
@@ -0,0 +1,10 @@
+--- io/wavout/src/wavoutpmo.cpp.orig 2003-09-16 17:35:07 UTC
++++ io/wavout/src/wavoutpmo.cpp
+@@ -28,7 +28,6 @@ ________________________________________
+ #endif
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <string>
+
+ /* project headers */
diff --git a/audio/zinf/files/patch-lib-http-src-Http.cpp b/audio/zinf/files/patch-lib-http-src-Http.cpp
deleted file mode 100644
index 096dcb0cf965..000000000000
--- a/audio/zinf/files/patch-lib-http-src-Http.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib/http/src/Http.cpp.orig 2014-02-15 18:56:59.580491668 +0100
-+++ lib/http/src/Http.cpp 2014-02-15 18:57:10.490545507 +0100
-@@ -31,6 +31,7 @@
-
- #include "config.h"
- #include <stdio.h>
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #ifndef WIN32
diff --git a/audio/zinf/files/patch-lib-xml-include-Parse.h b/audio/zinf/files/patch-lib-xml-include-Parse.h
deleted file mode 100644
index 934476874c46..000000000000
--- a/audio/zinf/files/patch-lib-xml-include-Parse.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- lib/xml/include/Parse.h.orig Thu Feb 13 20:47:58 2003
-+++ lib/xml/include/Parse.h Mon Aug 18 17:37:07 2003
-@@ -31,7 +31,10 @@
- #pragma warning(disable:4786)
- #endif
-
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
- #include <string>
- #include <map>
-
diff --git a/audio/zinf/files/patch-lib_http_src_Http.cpp b/audio/zinf/files/patch-lib_http_src_Http.cpp
new file mode 100644
index 000000000000..a8c8f58fd993
--- /dev/null
+++ b/audio/zinf/files/patch-lib_http_src_Http.cpp
@@ -0,0 +1,10 @@
+--- lib/http/src/Http.cpp.orig 2003-09-16 17:35:09 UTC
++++ lib/http/src/Http.cpp
+@@ -31,6 +31,7 @@ ________________________________________
+
+ #include "config.h"
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #ifndef WIN32
diff --git a/audio/zinf/files/patch-lib_xml_include_Parse.h b/audio/zinf/files/patch-lib_xml_include_Parse.h
new file mode 100644
index 000000000000..c6165e95705b
--- /dev/null
+++ b/audio/zinf/files/patch-lib_xml_include_Parse.h
@@ -0,0 +1,13 @@
+--- lib/xml/include/Parse.h.orig 2003-09-16 17:35:11 UTC
++++ lib/xml/include/Parse.h
+@@ -31,7 +31,10 @@ ________________________________________
+ #pragma warning(disable:4786)
+ #endif
+
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+ #include <string>
+ #include <map>
+
diff --git a/audio/zinf/files/patch-plm-metadata-vorbis-vorbis.cpp b/audio/zinf/files/patch-plm-metadata-vorbis-vorbis.cpp
deleted file mode 100644
index ee07092c2801..000000000000
--- a/audio/zinf/files/patch-plm-metadata-vorbis-vorbis.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- plm/metadata/vorbis/vorbis.cpp.orig Wed Jan 1 08:29:35 2003
-+++ plm/metadata/vorbis/vorbis.cpp Sat Jan 11 05:32:18 2003
-@@ -23,6 +23,7 @@
-
- #include <stdio.h>
- #include <stdlib.h>
-+#include <unistd.h>
- #include <math.h>
- #include <assert.h>
- #include <string>
diff --git a/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp b/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp
new file mode 100644
index 000000000000..6442850bb505
--- /dev/null
+++ b/audio/zinf/files/patch-plm_metadata_vorbis_vorbis.cpp
@@ -0,0 +1,10 @@
+--- plm/metadata/vorbis/vorbis.cpp.orig 2004-02-10 18:21:14 UTC
++++ plm/metadata/vorbis/vorbis.cpp
+@@ -23,6 +23,7 @@ ________________________________________
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <math.h>
+ #include <assert.h>
+ #include <string>
diff --git a/audio/zinf/files/patch-ui-zinf-include-DialControl.h b/audio/zinf/files/patch-ui-zinf-include-DialControl.h
deleted file mode 100644
index 64a5dfea974a..000000000000
--- a/audio/zinf/files/patch-ui-zinf-include-DialControl.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- ui/zinf/include/DialControl.h.orig Wed Sep 17 02:35:32 2003
-+++ ui/zinf/include/DialControl.h Mon Feb 16 12:46:03 2004
-@@ -24,7 +24,9 @@
- #ifndef INCLUDED_DIALCONTROL_H__
- #define INCLUDED_DIALCONTROL_H__
-
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
- #include "config.h"
-
- #include <string>
diff --git a/audio/zinf/files/patch-ui-zinf-include-PixFontControl.h b/audio/zinf/files/patch-ui-zinf-include-PixFontControl.h
deleted file mode 100644
index 45ef69afbac5..000000000000
--- a/audio/zinf/files/patch-ui-zinf-include-PixFontControl.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- ui/zinf/include/PixFontControl.h.orig Thu Feb 13 21:21:37 2003
-+++ ui/zinf/include/PixFontControl.h Mon Aug 18 17:37:47 2003
-@@ -32,7 +32,10 @@
- #pragma warning(disable:4786)
- #endif
-
-+#include <inttypes.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
- #include <string>
- #include <vector>
-
diff --git a/audio/zinf/files/patch-ui-zinf-src-ThemeZip.cpp b/audio/zinf/files/patch-ui-zinf-src-ThemeZip.cpp
deleted file mode 100644
index 3c2c7f711ebd..000000000000
--- a/audio/zinf/files/patch-ui-zinf-src-ThemeZip.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
---- ui/zinf/src/ThemeZip.cpp.orig Wed Sep 17 02:36:22 2003
-+++ ui/zinf/src/ThemeZip.cpp Mon Feb 16 13:39:03 2004
-@@ -21,11 +21,12 @@
- $Id: ThemeZip.cpp,v 1.8 2003/09/16 17:36:22 kgk Exp $
- ____________________________________________________________________________*/
-
--#include <stdint.h>
- #include <time.h>
- #include <stdio.h>
- #include <ctype.h>
-+#if HAVE_STDINT_H
- #include <stdint.h>
-+#endif
-
- #ifdef WIN32
- #include <windows.h>
diff --git a/audio/zinf/files/patch-ui-zinf-tools-Makefile.in b/audio/zinf/files/patch-ui-zinf-tools-Makefile.in
deleted file mode 100644
index bbb9cc5e71ca..000000000000
--- a/audio/zinf/files/patch-ui-zinf-tools-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ui/zinf/tools/Makefile.in.orig Mon Aug 4 03:57:33 2003
-+++ ui/zinf/tools/Makefile.in Mon Aug 18 19:02:48 2003
-@@ -213,7 +213,7 @@
-
- maketheme_SOURCES = MakeTheme.cpp $(top_srcdir)/ui/zinf/src/ThemeZip.cpp
- maketheme_LDADD = $(top_builddir)/lib/unzip/libunzip.la \
-- $(top_builddir)/base/unix/libunix.la $(ZLIB_LIBS) -ldl
-+ $(top_builddir)/base/unix/libunix.la $(ZLIB_LIBS)
-
-
- AM_CPPFLAGS = $(THREAD_CFLAGS) $(base_includes) \
diff --git a/audio/zinf/files/patch-ui-zinf-unix-src-GTKFileSelector.cpp b/audio/zinf/files/patch-ui-zinf-unix-src-GTKFileSelector.cpp
deleted file mode 100644
index 022f779622c5..000000000000
--- a/audio/zinf/files/patch-ui-zinf-unix-src-GTKFileSelector.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- ui/zinf/unix/src/GTKFileSelector.cpp.orig 2003-09-16 19:36:23.000000000 +0200
-+++ ui/zinf/unix/src/GTKFileSelector.cpp 2014-02-18 17:46:56.364931015 +0100
-@@ -25,7 +25,8 @@
- #include <unistd.h>
- #include <dirent.h>
-
--#if defined(solaris)
-+#if defined(solaris) || defined(__FreeBSD__)
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <sys/param.h> /* for MAXPATHLEN */
- #include <sys/stat.h>
diff --git a/audio/zinf/files/patch-ui_zinf_include_DialControl.h b/audio/zinf/files/patch-ui_zinf_include_DialControl.h
new file mode 100644
index 000000000000..2431ccd71d3a
--- /dev/null
+++ b/audio/zinf/files/patch-ui_zinf_include_DialControl.h
@@ -0,0 +1,12 @@
+--- ui/zinf/include/DialControl.h.orig 2003-09-16 17:35:32 UTC
++++ ui/zinf/include/DialControl.h
+@@ -24,7 +24,9 @@ ________________________________________
+ #ifndef INCLUDED_DIALCONTROL_H__
+ #define INCLUDED_DIALCONTROL_H__
+
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+ #include "config.h"
+
+ #include <string>
diff --git a/audio/zinf/files/patch-ui_zinf_include_PixFontControl.h b/audio/zinf/files/patch-ui_zinf_include_PixFontControl.h
new file mode 100644
index 000000000000..ffdbc089a24e
--- /dev/null
+++ b/audio/zinf/files/patch-ui_zinf_include_PixFontControl.h
@@ -0,0 +1,13 @@
+--- ui/zinf/include/PixFontControl.h.orig 2003-09-16 17:35:32 UTC
++++ ui/zinf/include/PixFontControl.h
+@@ -32,7 +32,10 @@ ________________________________________
+ #pragma warning(disable:4786)
+ #endif
+
++#include <inttypes.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+ #include <string>
+ #include <vector>
+
diff --git a/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp b/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp
new file mode 100644
index 000000000000..6619b875cf35
--- /dev/null
+++ b/audio/zinf/files/patch-ui_zinf_src_ThemeZip.cpp
@@ -0,0 +1,16 @@
+--- ui/zinf/src/ThemeZip.cpp.orig 2003-09-16 17:36:22 UTC
++++ ui/zinf/src/ThemeZip.cpp
+@@ -21,11 +21,12 @@
+ $Id: ThemeZip.cpp,v 1.8 2003/09/16 17:36:22 kgk Exp $
+ ____________________________________________________________________________*/
+
+-#include <stdint.h>
+ #include <time.h>
+ #include <stdio.h>
+ #include <ctype.h>
++#if HAVE_STDINT_H
+ #include <stdint.h>
++#endif
+
+ #ifdef WIN32
+ #include <windows.h>
diff --git a/audio/zinf/files/patch-ui_zinf_tools_Makefile.in b/audio/zinf/files/patch-ui_zinf_tools_Makefile.in
new file mode 100644
index 000000000000..6b9186848bd4
--- /dev/null
+++ b/audio/zinf/files/patch-ui_zinf_tools_Makefile.in
@@ -0,0 +1,11 @@
+--- ui/zinf/tools/Makefile.in.orig 2004-02-17 22:45:23 UTC
++++ ui/zinf/tools/Makefile.in
+@@ -227,7 +227,7 @@ noinst_PROGRAMS = maketheme
+
+ maketheme_SOURCES = MakeTheme.cpp $(top_srcdir)/ui/zinf/src/ThemeZip.cpp
+ maketheme_LDADD = $(top_builddir)/lib/unzip/libunzip.la \
+- $(top_builddir)/base/unix/libunix.la $(ZLIB_LIBS) -ldl
++ $(top_builddir)/base/unix/libunix.la $(ZLIB_LIBS)
+
+
+ AM_CPPFLAGS = $(THREAD_CFLAGS) $(base_includes) \
diff --git a/audio/zinf/files/patch-ui_zinf_unix_src_GTKFileSelector.cpp b/audio/zinf/files/patch-ui_zinf_unix_src_GTKFileSelector.cpp
new file mode 100644
index 000000000000..79d00415a6a1
--- /dev/null
+++ b/audio/zinf/files/patch-ui_zinf_unix_src_GTKFileSelector.cpp
@@ -0,0 +1,12 @@
+--- ui/zinf/unix/src/GTKFileSelector.cpp.orig 2003-09-16 17:36:23 UTC
++++ ui/zinf/unix/src/GTKFileSelector.cpp
+@@ -25,7 +25,8 @@ ________________________________________
+ #include <unistd.h>
+ #include <dirent.h>
+
+-#if defined(solaris)
++#if defined(solaris) || defined(__FreeBSD__)
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/param.h> /* for MAXPATHLEN */
+ #include <sys/stat.h>
diff --git a/audio/zynaddsubfx/files/patch-src_CMakeLists.txt b/audio/zynaddsubfx/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..edfe1fba4f13
--- /dev/null
+++ b/audio/zynaddsubfx/files/patch-src_CMakeLists.txt
@@ -0,0 +1,30 @@
+--- src/CMakeLists.txt.orig 2012-06-16 04:22:35 UTC
++++ src/CMakeLists.txt
+@@ -127,6 +127,13 @@ set (BuildOptionsDebug
+ # From here on, the setting variables have been prepared so concentrate
+ # on the actual compiling.
+
++if(PaEnable)
++ include_directories(${PORTAUDIO_INCLUDE_DIRS})
++ add_definitions(-DPORTAUDIO=1)
++ list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES})
++ list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS})
++endif()
++
+ if(AlsaEnable)
+ list(APPEND AUDIO_LIBRARIES ${ASOUND_LIBRARY})
+ list(APPEND AUDIO_LIBRARY_DIRS ${ASOUND_LIBRARY_DIRS})
+@@ -143,13 +150,6 @@ if(OssEnable)
+ add_definitions(-DOSS=1)
+ endif(OssEnable)
+
+-if(PaEnable)
+- include_directories(${PORTAUDIO_INCLUDE_DIR})
+- add_definitions(-DPORTAUDIO=1)
+- list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES})
+- list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS})
+-endif()
+-
+ if (CompileTests)
+ ENABLE_TESTING()
+ endif()
diff --git a/audio/zynaddsubfx/files/patch-src_Misc_Config.cpp b/audio/zynaddsubfx/files/patch-src_Misc_Config.cpp
new file mode 100644
index 000000000000..040bc788f518
--- /dev/null
+++ b/audio/zynaddsubfx/files/patch-src_Misc_Config.cpp
@@ -0,0 +1,26 @@
+--- src/Misc/Config.cpp.orig 2011-12-19 21:14:30 UTC
++++ src/Misc/Config.cpp
+@@ -84,10 +84,9 @@ void Config::init()
+ //banks
+ cfg.bankRootDirList[0] = "~/banks";
+ cfg.bankRootDirList[1] = "./";
+- cfg.bankRootDirList[2] = "/usr/share/zynaddsubfx/banks";
+- cfg.bankRootDirList[3] = "/usr/local/share/zynaddsubfx/banks";
+- cfg.bankRootDirList[4] = "../banks";
+- cfg.bankRootDirList[5] = "banks";
++ cfg.bankRootDirList[2] = "%%DATADIR%%/banks";
++ cfg.bankRootDirList[3] = "../banks";
++ cfg.bankRootDirList[4] = "banks";
+ }
+
+ if(cfg.presetsDirList[0].empty()) {
+@@ -95,8 +94,7 @@ void Config::init()
+ cfg.presetsDirList[0] = "./";
+ cfg.presetsDirList[1] = "../presets";
+ cfg.presetsDirList[2] = "presets";
+- cfg.presetsDirList[3] = "/usr/share/zynaddsubfx/presets";
+- cfg.presetsDirList[4] = "/usr/local/share/zynaddsubfx/presets";
++ cfg.presetsDirList[3] = "%%DATADIR%%/presets";
+ }
+ cfg.LinuxALSAaudioDev = "default";
+ cfg.nameTag = "";
diff --git a/audio/zynaddsubfx/files/patch-src_Misc_Master.h b/audio/zynaddsubfx/files/patch-src_Misc_Master.h
new file mode 100644
index 000000000000..7c36db89677a
--- /dev/null
+++ b/audio/zynaddsubfx/files/patch-src_Misc_Master.h
@@ -0,0 +1,11 @@
+--- src/Misc/Master.h.orig 2012-06-16 04:02:12 UTC
++++ src/Misc/Master.h
+@@ -33,6 +33,8 @@
+
+ #include "../Params/Controller.h"
+
++#include <pthread.h>
++
+ typedef enum {
+ MUTEX_TRYLOCK, MUTEX_LOCK, MUTEX_UNLOCK
+ } lockset;
diff --git a/audio/zynaddsubfx/files/patch-src_Misc_Part.h b/audio/zynaddsubfx/files/patch-src_Misc_Part.h
new file mode 100644
index 000000000000..2541cc763ab5
--- /dev/null
+++ b/audio/zynaddsubfx/files/patch-src_Misc_Part.h
@@ -0,0 +1,10 @@
+--- src/Misc/Part.h.orig 2012-06-14 14:35:03 UTC
++++ src/Misc/Part.h
+@@ -30,6 +30,7 @@
+ #include "../Misc/Microtonal.h"
+
+ #include <list> // For the monomemnotes list.
++#include <pthread.h>
+
+ class EffectMgr;
+ class ADnoteParameters;
diff --git a/audio/zynaddsubfx/files/patch-src_Nio_SafeQueue.h b/audio/zynaddsubfx/files/patch-src_Nio_SafeQueue.h
new file mode 100644
index 000000000000..3199ecd63958
--- /dev/null
+++ b/audio/zynaddsubfx/files/patch-src_Nio_SafeQueue.h
@@ -0,0 +1,10 @@
+--- src/Nio/SafeQueue.h.orig 2011-12-19 21:14:30 UTC
++++ src/Nio/SafeQueue.h
+@@ -2,6 +2,7 @@
+ #ifndef SAFEQUEUE_H
+ #define SAFEQUEUE_H
+ #include <cstdlib>
++#include <pthread.h>
+ #include <semaphore.h>
+
+ /**
diff --git a/audio/zynaddsubfx/files/patch-src_UI_CMakeLists.txt b/audio/zynaddsubfx/files/patch-src_UI_CMakeLists.txt
new file mode 100644
index 000000000000..9bf450a1634c
--- /dev/null
+++ b/audio/zynaddsubfx/files/patch-src_UI_CMakeLists.txt
@@ -0,0 +1,17 @@
+CMake 2.8.12 support.
+
+It does not make sense to add MYFLTK_LIBRARIES (which translates to
+something like "-L/usr/local/lib -lfoo -lbar") to the link interface
+library of a static library like libzynaddsubfx_gui.a.
+
+Removing FLTK_LIBRARIES does not cause any problems either, as
+GUI_LIBRARIES in src/CMakeLists.txt sets all the required GUI-related
+libraries that need to be linked against the zynaddsubfx binary.
+--- src/UI/CMakeLists.txt.orig 2012-06-10 22:20:18 UTC
++++ src/UI/CMakeLists.txt
+@@ -32,5 +32,3 @@ add_library(zynaddsubfx_gui STATIC
+ NioUI.cpp
+ WidgetPDial.cpp
+ )
+-
+-target_link_libraries(zynaddsubfx_gui ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES})
diff --git a/audio/zynaddsubfx/files/patch-src__CMakeLists.txt b/audio/zynaddsubfx/files/patch-src__CMakeLists.txt
deleted file mode 100644
index 056d11c4be53..000000000000
--- a/audio/zynaddsubfx/files/patch-src__CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
---- src/CMakeLists.txt.orig 2014-10-16 15:33:19.000000000 +0200
-+++ src/CMakeLists.txt 2014-10-16 15:33:53.000000000 +0200
-@@ -127,6 +127,13 @@
- # From here on, the setting variables have been prepared so concentrate
- # on the actual compiling.
-
-+if(PaEnable)
-+ include_directories(${PORTAUDIO_INCLUDE_DIRS})
-+ add_definitions(-DPORTAUDIO=1)
-+ list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES})
-+ list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS})
-+endif()
-+
- if(AlsaEnable)
- list(APPEND AUDIO_LIBRARIES ${ASOUND_LIBRARY})
- list(APPEND AUDIO_LIBRARY_DIRS ${ASOUND_LIBRARY_DIRS})
-@@ -143,13 +150,6 @@
- add_definitions(-DOSS=1)
- endif(OssEnable)
-
--if(PaEnable)
-- include_directories(${PORTAUDIO_INCLUDE_DIR})
-- add_definitions(-DPORTAUDIO=1)
-- list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES})
-- list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS})
--endif()
--
- if (CompileTests)
- ENABLE_TESTING()
- endif()
diff --git a/audio/zynaddsubfx/files/patch-src__Misc__Config.cpp b/audio/zynaddsubfx/files/patch-src__Misc__Config.cpp
deleted file mode 100644
index ce2eed88b2f7..000000000000
--- a/audio/zynaddsubfx/files/patch-src__Misc__Config.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
---- src/Misc/Config.cpp.orig
-+++ src/Misc/Config.cpp
-@@ -84,10 +84,9 @@
- //banks
- cfg.bankRootDirList[0] = "~/banks";
- cfg.bankRootDirList[1] = "./";
-- cfg.bankRootDirList[2] = "/usr/share/zynaddsubfx/banks";
-- cfg.bankRootDirList[3] = "/usr/local/share/zynaddsubfx/banks";
-- cfg.bankRootDirList[4] = "../banks";
-- cfg.bankRootDirList[5] = "banks";
-+ cfg.bankRootDirList[2] = "%%DATADIR%%/banks";
-+ cfg.bankRootDirList[3] = "../banks";
-+ cfg.bankRootDirList[4] = "banks";
- }
-
- if(cfg.presetsDirList[0].empty()) {
-@@ -95,8 +94,7 @@
- cfg.presetsDirList[0] = "./";
- cfg.presetsDirList[1] = "../presets";
- cfg.presetsDirList[2] = "presets";
-- cfg.presetsDirList[3] = "/usr/share/zynaddsubfx/presets";
-- cfg.presetsDirList[4] = "/usr/local/share/zynaddsubfx/presets";
-+ cfg.presetsDirList[3] = "%%DATADIR%%/presets";
- }
- cfg.LinuxALSAaudioDev = "default";
- cfg.nameTag = "";
diff --git a/audio/zynaddsubfx/files/patch-src__Misc__Master.h b/audio/zynaddsubfx/files/patch-src__Misc__Master.h
deleted file mode 100644
index 67ebe230c6f9..000000000000
--- a/audio/zynaddsubfx/files/patch-src__Misc__Master.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/Misc/Master.h~ 2013-10-22 18:41:37.000000000 +0300
-+++ src/Misc/Master.h 2013-10-22 18:41:53.000000000 +0300
-@@ -33,6 +33,8 @@
-
- #include "../Params/Controller.h"
-
-+#include <pthread.h>
-+
- typedef enum {
- MUTEX_TRYLOCK, MUTEX_LOCK, MUTEX_UNLOCK
- } lockset;
diff --git a/audio/zynaddsubfx/files/patch-src__Misc__Part.h b/audio/zynaddsubfx/files/patch-src__Misc__Part.h
deleted file mode 100644
index 4fc764126d2a..000000000000
--- a/audio/zynaddsubfx/files/patch-src__Misc__Part.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/Misc/Part.h~ 2013-10-22 18:39:58.000000000 +0300
-+++ src/Misc/Part.h 2013-10-22 18:40:09.000000000 +0300
-@@ -30,6 +30,7 @@
- #include "../Misc/Microtonal.h"
-
- #include <list> // For the monomemnotes list.
-+#include <pthread.h>
-
- class EffectMgr;
- class ADnoteParameters;
diff --git a/audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h b/audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h
deleted file mode 100644
index f57ee6e94268..000000000000
--- a/audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/Nio/SafeQueue.h~ 2013-10-22 18:37:27.000000000 +0300
-+++ src/Nio/SafeQueue.h 2013-10-22 18:37:34.000000000 +0300
-@@ -2,6 +2,7 @@
- #ifndef SAFEQUEUE_H
- #define SAFEQUEUE_H
- #include <cstdlib>
-+#include <pthread.h>
- #include <semaphore.h>
-
- /**
diff --git a/audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt b/audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt
deleted file mode 100644
index 274cda37ee22..000000000000
--- a/audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-CMake 2.8.12 support.
-
-It does not make sense to add MYFLTK_LIBRARIES (which translates to
-something like "-L/usr/local/lib -lfoo -lbar") to the link interface
-library of a static library like libzynaddsubfx_gui.a.
-
-Removing FLTK_LIBRARIES does not cause any problems either, as
-GUI_LIBRARIES in src/CMakeLists.txt sets all the required GUI-related
-libraries that need to be linked against the zynaddsubfx binary.
---- src/UI/CMakeLists.txt~ 2013-10-22 18:26:35.000000000 +0300
-+++ src/UI/CMakeLists.txt 2013-10-22 18:26:39.000000000 +0300
-@@ -32,5 +32,3 @@
- NioUI.cpp
- WidgetPDial.cpp
- )
--
--target_link_libraries(zynaddsubfx_gui ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES})