aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2016-07-26 16:51:15 +0000
committerMathieu Arnold <mat@FreeBSD.org>2016-07-26 16:51:15 +0000
commit9fa9eb9ac7bf1d3de825ee25a8f0ae81b7b77896 (patch)
tree9b071a8105704e992946dcd6b801e9fcb7635142
parent5a20e7990eb544509174d617d359bf0d4ac64737 (diff)
downloadports-9fa9eb9ac7bf1d3de825ee25a8f0ae81b7b77896.tar.gz
ports-9fa9eb9ac7bf1d3de825ee25a8f0ae81b7b77896.zip
Cleanup patches, a* categories.
Rename them to follow the make makepatch naming, and regenerate them. With hat: portmgr Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=419133
-rw-r--r--accessibility/at-spi/files/patch-registryd_registry-main.c4
-rw-r--r--accessibility/dasher/files/patch-clang18
-rw-r--r--accessibility/eflite/files/patch-Makefile.in2
-rw-r--r--accessibility/gnome-mag/files/patch-docs_reference_Makefile.in6
-rw-r--r--accessibility/gnome-speech/files/patch-configure10
-rw-r--r--accessibility/speech-dispatcher/files/patch-src__clients__spdsend__server.c10
-rw-r--r--accessibility/speech-dispatcher/files/patch-src_clients_spdsend_server.c10
-rw-r--r--accessibility/speech-dispatcher/files/patch-src_server_speechd.h (renamed from accessibility/speech-dispatcher/files/patch-src__server__speechd.h)0
-rw-r--r--accessibility/yasr/Makefile1
-rw-r--r--accessibility/yasr/files/extra-patch-yasr__main.c14
-rw-r--r--accessibility/yasr/files/patch-yasr__main.c14
-rw-r--r--arabic/libitl/files/patch-Makefile.in4
-rw-r--r--arabic/libitl/files/patch-hijri_Makefile16
-rw-r--r--arabic/libitl/files/patch-hijri__Makefile16
-rw-r--r--arabic/libitl/files/patch-prayertime_Makefile16
-rw-r--r--arabic/libitl/files/patch-prayertime__Makefile16
-rw-r--r--archivers/9e/files/patch-9e.c6
-rw-r--r--archivers/advancecomp/files/patch-7z_Portable.h11
-rw-r--r--archivers/advancecomp/files/patch-Portable.h11
-rw-r--r--archivers/arc/files/patch-Makefile8
-rw-r--r--archivers/arc/files/patch-arc.c8
-rw-r--r--archivers/arc/files/patch-arc.h6
-rw-r--r--archivers/arc/files/patch-arcadd.c14
-rw-r--r--archivers/arc/files/patch-arccvt.c6
-rw-r--r--archivers/arc/files/patch-arcdata.c6
-rw-r--r--archivers/arc/files/patch-arcdos.c48
-rw-r--r--archivers/arc/files/patch-arcext.c8
-rw-r--r--archivers/arc/files/patch-arcio.c10
-rw-r--r--archivers/arc/files/patch-arclzw.c6
-rw-r--r--archivers/arc/files/patch-arcrun.c12
-rw-r--r--archivers/arc/files/patch-arcunp.c8
-rw-r--r--archivers/arj/files/patch-arj__arcv.c60
-rw-r--r--archivers/arj/files/patch-arj__proc.c80
-rw-r--r--archivers/arj/files/patch-arj__proc.h50
-rw-r--r--archivers/arj/files/patch-arj_arcv.c61
-rw-r--r--archivers/arj/files/patch-arj_proc.c80
-rw-r--r--archivers/arj/files/patch-arj_proc.h50
-rw-r--r--archivers/arj/files/patch-environ.c6
-rw-r--r--archivers/arj/files/patch-fardata.c4
-rw-r--r--archivers/ark/files/patch-git_cd8ad276
-rw-r--r--archivers/atool/files/patch-configure2
-rw-r--r--archivers/bzip/files/patch-Makefile4
-rw-r--r--archivers/bzip/files/patch-bzip.c2
-rw-r--r--archivers/bzip2/Makefile1
-rw-r--r--archivers/bzip2/files/patch-Makefile15
-rw-r--r--archivers/dact/files/patch-Makefile.in8
-rw-r--r--archivers/deutex/files/patch-src-deutex.h33
-rw-r--r--archivers/deutex/files/patch-src_deutex.h33
-rw-r--r--archivers/dpkg/files/patch-lib_compat_gettext.h2
-rw-r--r--archivers/dpkg/files/patch-scripts_Dpkg_Compression.pm2
-rw-r--r--archivers/engrampa/files/patch-src_fr-command-lrzip.c8
-rw-r--r--archivers/engrampa/files/patch-src_fr-command-tar.c6
-rw-r--r--archivers/engrampa/files/patch-src_fr-command-zip.c12
-rw-r--r--archivers/file-roller/files/patch-src_fr-command-tar.c6
-rw-r--r--archivers/file-roller/files/patch-src_fr-command-zip.c14
-rw-r--r--archivers/freeze/files/patch-Makefile.in6
-rw-r--r--archivers/freeze/files/patch-freeze.c6
-rw-r--r--archivers/freeze/files/patch-freeze.h4
-rw-r--r--archivers/ha/files/patch-nix_machine.c30
-rw-r--r--archivers/hffzip/files/patch-Makefile4
-rw-r--r--archivers/hlextract/files/patch-HLExtract-Main.c18
-rw-r--r--archivers/hpack.non-usa.only/files/patch-archive.c6
-rw-r--r--archivers/hpack.non-usa.only/files/patch-cli.c6
-rw-r--r--archivers/hpack.non-usa.only/files/patch-crypt_keymgmt.c6
-rw-r--r--archivers/hpack.non-usa.only/files/patch-defs.h6
-rw-r--r--archivers/hpack.non-usa.only/files/patch-hpacklib.h4
-rw-r--r--archivers/hpack.non-usa.only/files/patch-keycvt_keycvt.c8
-rw-r--r--archivers/hpack.non-usa.only/files/patch-keycvt_makefile18
-rw-r--r--archivers/hpack.non-usa.only/files/patch-language_language.c10
-rw-r--r--archivers/hpack.non-usa.only/files/patch-system.h10
-rw-r--r--archivers/hpack.non-usa.only/files/patch-system_unix.c12
-rw-r--r--archivers/lbzip2/files/patch-Makefile12
-rw-r--r--archivers/lha-ac/files/patch-lha.h10
-rw-r--r--archivers/lha-ac/files/patch-src_lha.h10
-rw-r--r--archivers/libarc/files/patch-Makefile9
-rw-r--r--archivers/libcabinet/files/patch-Makefile4
-rw-r--r--archivers/libcabinet/files/patch-bstring.cpp10
-rw-r--r--archivers/libcabinet/files/patch-bstring.h4
-rw-r--r--archivers/libcabinet/files/patch-cfcreate.cpp10
-rw-r--r--archivers/libcabinet/files/patch-cfcreate.h6
-rw-r--r--archivers/libcabinet/files/patch-cfdblock.cpp8
-rw-r--r--archivers/libcabinet/files/patch-cfdblock.h4
-rw-r--r--archivers/libcabinet/files/patch-cffdrmgr.cpp4
-rw-r--r--archivers/libcabinet/files/patch-cffdrmgr.h4
-rw-r--r--archivers/libcabinet/files/patch-cffile.cpp4
-rw-r--r--archivers/libcabinet/files/patch-cffile.h6
-rw-r--r--archivers/libcabinet/files/patch-cffolder.cpp8
-rw-r--r--archivers/libcabinet/files/patch-cffolder.h6
-rw-r--r--archivers/libcabinet/files/patch-cfheader.cpp10
-rw-r--r--archivers/libcabinet/files/patch-cfheader.h4
-rw-r--r--archivers/libcabinet/files/patch-cfreader.cpp4
-rw-r--r--archivers/libcabinet/files/patch-cfreader.h4
-rw-r--r--archivers/libcabinet/files/patch-cftypes.cpp8
-rw-r--r--archivers/libcabinet/files/patch-cftypes.h4
-rw-r--r--archivers/libcabinet/files/patch-darray.h6
-rw-r--r--archivers/libcabinet/files/patch-listcab.cpp8
-rw-r--r--archivers/libcomprex/files/patch-configure6
-rw-r--r--archivers/libcomprex/files/patch-header.c11
-rw-r--r--archivers/libcomprex/files/patch-modules_archive_zip_header.c11
-rw-r--r--archivers/libcomprex/files/patch-tests__extractarchive.c4
-rw-r--r--archivers/liblzxcomp/files/patch-lz__nonslide.c15
-rw-r--r--archivers/liblzxcomp/files/patch-lz_nonslide.c14
-rw-r--r--archivers/liborange/files/patch-inno.h49
-rw-r--r--archivers/liborange/files/patch-lib_inno.h49
-rw-r--r--archivers/libunrar/files/patch-dll.cpp4
-rw-r--r--archivers/libunrar/files/patch-dll.hpp4
-rw-r--r--archivers/libunrar/files/patch-extract.cpp6
-rw-r--r--archivers/libunrar/files/patch-makefile.unix10
-rw-r--r--archivers/libzip/files/patch-lib__Makefile.in6
-rw-r--r--archivers/libzip/files/patch-libzip.pc.in2
-rw-r--r--archivers/lrzip/files/patch-lrzip__private.h2
-rw-r--r--archivers/lzo2/files/patch-include__lzo__lzodefs.h4
-rw-r--r--archivers/macutils/files/patch-crc_makefile6
-rw-r--r--archivers/macutils/files/patch-hexbin_globals.h6
-rw-r--r--archivers/macutils/files/patch-macunpack_cpt.h6
-rw-r--r--archivers/macutils/files/patch-macunpack_dd.c6
-rw-r--r--archivers/macutils/files/patch-macunpack_dd.h6
-rw-r--r--archivers/macutils/files/patch-macunpack_jdw.h4
-rw-r--r--archivers/macutils/files/patch-macunpack_lzc.h4
-rw-r--r--archivers/macutils/files/patch-macunpack_lzh.c8
-rw-r--r--archivers/macutils/files/patch-macunpack_lzh.h4
-rw-r--r--archivers/macutils/files/patch-macunpack_sit.c6
-rw-r--r--archivers/macutils/files/patch-macunpack_sit.h6
-rw-r--r--archivers/macutils/files/patch-macunpack_stf.h4
-rw-r--r--archivers/macutils/files/patch-macunpack_zma.h4
-rw-r--r--archivers/macutils/files/patch-makefile6
-rw-r--r--archivers/macutils/files/patch-util_transname.c4
-rw-r--r--archivers/mscompress/files/patch-mscompress.c4
-rw-r--r--archivers/mscompress/files/patch-msexpand.c4
-rw-r--r--archivers/p5-Compress-LZO/files/patch-Makefile.PL8
-rw-r--r--archivers/p5-IO-Zlib/files/patch-Zlib.pm6
-rw-r--r--archivers/p7zip/files/patch-CPP-Windows-System.cpp11
-rw-r--r--archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp14
-rw-r--r--archivers/p7zip/files/patch-CPP_7zip_Archive_Udf_UdfIn.cpp6
-rw-r--r--archivers/p7zip/files/patch-CPP_Windows_System.cpp11
-rw-r--r--archivers/packddir/files/patch-upackddir.c8
-rw-r--r--archivers/paq/files/patch-zpaq.cpp6
-rw-r--r--archivers/paq/files/patch_zpsfx.cpp12
-rw-r--r--archivers/par2cmdline-tbb/files/patch-configure6
-rw-r--r--archivers/par2cmdline-tbb/files/patch-par2cmdline.h6
-rw-r--r--archivers/par2cmdline/files/patch-par2creatorsourcefile.cpp6
-rw-r--r--archivers/par2cmdline/files/patch-par2fileformat.h6
-rw-r--r--archivers/par2cmdline/files/patch-reedsolomon.cpp16
-rw-r--r--archivers/peazip/files/patch-peach.pas10
-rw-r--r--archivers/pecl-rar/files/patch-config.m46
-rw-r--r--archivers/php5-snappy/files/patch-config.m412
-rw-r--r--archivers/php55-phar/files/patch-config.m46
-rw-r--r--archivers/php55-phar/files/patch-phar.c6
-rw-r--r--archivers/php55-zip/files/patch-config.m46
-rw-r--r--archivers/php55-zlib/files/patch-zlib.c10
-rw-r--r--archivers/php56-phar/files/patch-config.m46
-rw-r--r--archivers/php56-phar/files/patch-phar.c6
-rw-r--r--archivers/php56-zlib/files/patch-zlib.c10
-rw-r--r--archivers/php70-phar/files/patch-config.m46
-rw-r--r--archivers/php70-phar/files/patch-phar.c6
-rw-r--r--archivers/php70-zlib/files/patch-zlib.c10
-rw-r--r--archivers/ppunpack/files/patch-depack.h4
-rw-r--r--archivers/pxz/files/patch-pxz.c16
-rw-r--r--archivers/py-lzma/files/patch-setup.py8
-rw-r--r--archivers/py-lzma/files/patch-src__compat__LzmaCompatDecode.h17
-rw-r--r--archivers/py-lzma/files/patch-src_compat_LzmaCompatDecode.h17
-rw-r--r--archivers/py-pyliblzma/files/patch-setup.py2
-rw-r--r--archivers/qpress/files/patch-qpress.cpp2
-rw-r--r--archivers/quazip-qt5/files/patch-coinstallable_with_qt4_version26
-rw-r--r--archivers/quazip/files/patch-qztest__qztest.pro14
-rw-r--r--archivers/quazip/files/patch-qztest_qztest.pro14
-rw-r--r--archivers/rpm4/files/patch-lib_backend_db3.c4
-rw-r--r--archivers/rpm4/files/patch-lib_cpio.c4
-rw-r--r--archivers/rpm4/files/patch-misc_fts.c6
-rw-r--r--archivers/rpm4/files/patch-system.h6
-rw-r--r--archivers/ruby-lha/files/patch-math-remainder26
-rw-r--r--archivers/ruby-lha/files/patch-tests8
-rw-r--r--archivers/ruby-lha/files/patch-warnings149
-rw-r--r--archivers/rubygem-bzip2-ruby/files/patch-ext__bzip2.c12
-rw-r--r--archivers/rubygem-bzip2-ruby/files/patch-ext__extconf.rb17
-rw-r--r--archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c12
-rw-r--r--archivers/rubygem-bzip2-ruby/files/patch-ext_extconf.rb17
-rw-r--r--archivers/rvm/files/patch-reporter.cc6
-rw-r--r--archivers/rvm/files/patch-vaulter.cc10
-rw-r--r--archivers/rvm/files/patch-vaulter.cpp10
-rw-r--r--archivers/rzip/files/patch-Makefile.in4
-rw-r--r--archivers/sharutils/files/patch-intl_Makefile.in22
-rw-r--r--archivers/sharutils/files/patch-intl__Makefile.in22
-rw-r--r--archivers/sharutils/files/patch-lib_Makefile.in11
-rw-r--r--archivers/sharutils/files/patch-lib__Makefile.in11
-rw-r--r--archivers/snappy-java/files/patch-likelinux6
-rw-r--r--archivers/squsq/files/patch-usq.c8
-rw-r--r--archivers/star/files/patch-rmt_Makefile2
-rw-r--r--archivers/star/files/patch-rmt_Makefile.man2
-rw-r--r--archivers/star/files/patch-star_Makefile2
-rw-r--r--archivers/star/files/patch-star_star.12
-rw-r--r--archivers/torrentzip/files/patch-src-trrntzip.c10
-rw-r--r--archivers/unace/files/patch-CVE-2015-206318
-rw-r--r--archivers/unace/files/patch-uac__crt.c4
-rw-r--r--archivers/unace/files/patch-unace.c14
-rw-r--r--archivers/unalz/files/patch-UnAlz.cpp2
-rw-r--r--archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd2
-rw-r--r--archivers/unarchiver/files/patch-XADMaster_Makefile.common4
-rw-r--r--archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd2
-rw-r--r--archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h2
-rw-r--r--archivers/unarj/files/patch-CVE-2004-094712
-rw-r--r--archivers/unarj/files/patch-CVE-2004-102758
-rw-r--r--archivers/unarj/files/patch-environ.c12
-rw-r--r--archivers/unarj/files/patch-unarj.c14
-rw-r--r--archivers/unarj/files/patch-unarj.h4
-rw-r--r--archivers/unshield/files/patch-unshield-v2-format46
-rw-r--r--archivers/untar/Makefile2
-rw-r--r--archivers/untar/files/patch-untar.c4
-rw-r--r--archivers/unzip/files/patch-crypt.c6
-rw-r--r--archivers/unzip/files/patch-extract.c14
-rw-r--r--archivers/unzoo/files/patch-unzoo.c24
-rw-r--r--archivers/upx/files/patch-src-Makefile11
-rw-r--r--archivers/upx/files/patch-src-packer.h11
-rw-r--r--archivers/upx/files/patch-src_Makefile11
-rw-r--r--archivers/upx/files/patch-src_miniacc.h (renamed from archivers/upx/files/patch-src-miniacc.h)0
-rw-r--r--archivers/upx/files/patch-src_packer.h11
-rw-r--r--archivers/xarchive/files/patch-doc-Makefile.in11
-rw-r--r--archivers/xarchive/files/patch-doc_Makefile.in11
-rw-r--r--archivers/xarchive/files/patch-src-main.c18
-rw-r--r--archivers/xarchive/files/patch-src-widgets_gtk.c13
-rw-r--r--archivers/xarchive/files/patch-src_main.c18
-rw-r--r--archivers/xarchive/files/patch-src_widgets__gtk.c13
-rw-r--r--archivers/xarchiver/files/patch-src_bzip2.c4
-rw-r--r--archivers/xarchiver/files/patch-src_tar.c14
-rw-r--r--archivers/xarchiver/files/patch-src_window.c4
-rw-r--r--archivers/xmill/files/patch-XMill+BZlib.cpp73
-rw-r--r--archivers/xmill/files/patch-XMill-CompressMan.cpp11
-rw-r--r--archivers/xmill/files/patch-XMill-PPMDI.cpp11
-rw-r--r--archivers/xmill/files/patch-XMill_BZlib.cpp73
-rw-r--r--archivers/xmill/files/patch-XMill_CompressMan.cpp11
-rw-r--r--archivers/xmill/files/patch-XMill_PPMDI.cpp11
-rw-r--r--archivers/xmill/files/patch-makefile19
-rw-r--r--archivers/xpk/files/patch-shell_xQuery.c4
-rw-r--r--archivers/zip/files/patch-man__zipcloak.111
-rw-r--r--archivers/zip/files/patch-man__zipnote.111
-rw-r--r--archivers/zip/files/patch-man__zipsplit.111
-rw-r--r--archivers/zip/files/patch-man_zipcloak.111
-rw-r--r--archivers/zip/files/patch-man_zipnote.111
-rw-r--r--archivers/zip/files/patch-man_zipsplit.111
-rw-r--r--archivers/zip/files/patch-unix_Makefile8
-rw-r--r--archivers/zip/files/patch-unix_configure12
-rw-r--r--archivers/zipmix/files/patch-zipmix.c4
-rw-r--r--archivers/zoo/files/patch-ar.h6
-rw-r--r--archivers/zoo/files/patch-bsd.c10
-rw-r--r--archivers/zoo/files/patch-makefile8
-rw-r--r--archivers/zoo/files/patch-misc.c8
-rw-r--r--archivers/zoo/files/patch-misc2.c6
-rw-r--r--archivers/zoo/files/patch-nixtime.i6
-rw-r--r--archivers/zoo/files/patch-options.h8
-rw-r--r--archivers/zoo/files/patch-zooadd2.c6
-rw-r--r--archivers/zoo/files/patch-zooext.c8
-rw-r--r--archivers/zoo/files/patch-zoofns.h6
-rw-r--r--archivers/zoo/files/patch-zoolist.c6
-rw-r--r--astro/astrometry/files/patch-cairoutils.c10
-rw-r--r--astro/astrometry/files/patch-util-permutedsort.c31
-rw-r--r--astro/astrometry/files/patch-util_cairoutils.c10
-rw-r--r--astro/astrometry/files/patch-util_permutedsort.c31
-rw-r--r--astro/boinc-astropulse/Makefile2
-rw-r--r--astro/boinc-astropulse/files/patch-Makefile.am11
-rw-r--r--astro/boinc-astropulse/files/patch-ap__client__main.cpp10
-rw-r--r--astro/boinc-astropulse/files/patch-ap__fileio.cpp10
-rw-r--r--astro/boinc-astropulse/files/patch-ap__fold.cpp10
-rw-r--r--astro/boinc-astropulse/files/patch-ap__remove__radar.cpp8
-rw-r--r--astro/boinc-astropulse/files/patch-client__Makefile.am11
-rw-r--r--astro/boinc-astropulse/files/patch-client__ap_client_main.cpp10
-rw-r--r--astro/boinc-astropulse/files/patch-client__ap_fileio.cpp10
-rw-r--r--astro/boinc-astropulse/files/patch-client__ap_fold.cpp10
-rw-r--r--astro/boinc-astropulse/files/patch-client__ap_remove_radar.cpp8
-rw-r--r--astro/boinc-astropulse/files/patch-client__configure.ac41
-rw-r--r--astro/boinc-astropulse/files/patch-client__m4__sah_check_boinc.m411
-rw-r--r--astro/boinc-astropulse/files/patch-configure.ac41
-rw-r--r--astro/boinc-astropulse/files/patch-m4_sah__check__boinc.m411
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client_Makefile.am11
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client__Makefile.am11
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_sse.cpp35
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_vector.cpp13
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_x86_64.cpp17
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client__vector__x86_float4.h25
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client__vector__x86_ops.h43
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__sse.cpp35
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__vector.cpp13
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__x86__64.cpp17
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client_vector_x86__float4.h25
-rw-r--r--astro/boinc-setiathome-v7/files/patch-client_vector_x86__ops.h43
-rw-r--r--astro/boinc-setiathome-v7/files/patch-configure.ac6
-rw-r--r--astro/boinc-setiathome-v7/files/patch-m4__sah_check_boinc.m411
-rw-r--r--astro/boinc-setiathome-v7/files/patch-m4_sah__check__boinc.m411
-rw-r--r--astro/boinc-setiathome-v7/files/patch-sah__config.h11
-rw-r--r--astro/boinc-setiathome-v7/files/patch-sah_config.h11
-rw-r--r--astro/fowsr/files/patch-fowsr-c43
-rw-r--r--astro/fowsr/files/patch-fowsr.c43
-rw-r--r--astro/foxtrotgps/files/patch-src_tracks.c2
-rw-r--r--astro/gkrellmoon2/files/patch-CalcEphem.c4
-rw-r--r--astro/gkrellmoon2/files/patch-Makefile11
-rw-r--r--astro/gmapcatcher/files/patch-gmapcatcher_mapArgs.py8
-rw-r--r--astro/gmapcatcher/files/patch-setup.py6
-rw-r--r--astro/google-earth/files/patch-bin-googleearth8
-rw-r--r--astro/gpsbabel/files/patch-Makefile.in2
-rw-r--r--astro/gpsbabel/files/patch-jeeps-gpslibusb.cc13
-rw-r--r--astro/gpsbabel/files/patch-jeeps_gpslibusb.cc13
-rw-r--r--astro/gpsbabel/files/patch-src-core-ziparchive.cc11
-rw-r--r--astro/gpsbabel/files/patch-src-core-ziparchive.h11
-rw-r--r--astro/gpsbabel/files/patch-src_core_ziparchive.cc11
-rw-r--r--astro/gpsbabel/files/patch-src_core_ziparchive.h11
-rw-r--r--astro/gpsbabel14/files/patch-libusb6
-rw-r--r--astro/gpsd/files/patch-libgps.pc.in4
-rw-r--r--astro/gpsd/files/patch-libgpsd.pc.in4
-rw-r--r--astro/gpsdrive/files/patch-src__gpsserial.c13
-rw-r--r--astro/gpsdrive/files/patch-src__splash.c60
-rw-r--r--astro/gpsdrive/files/patch-src_gpsserial.c13
-rw-r--r--astro/gpsdrive/files/patch-src_splash.c60
-rw-r--r--astro/gpsman/files/patch-gpsman.tcl11
-rw-r--r--astro/kstars/files/patch-kstars__skyobjects__kscomet.cpp11
-rw-r--r--astro/kstars/files/patch-kstars_skyobjects_kscomet.cpp11
-rw-r--r--astro/libnova/files/patch-src__utility.c13
-rw-r--r--astro/libnova/files/patch-src_hyperbolic__motion.c17
-rw-r--r--astro/libnova/files/patch-src_hyperbolic_motion.c17
-rw-r--r--astro/libnova/files/patch-src_precession.c8
-rw-r--r--astro/libnova/files/patch-src_utility.c13
-rw-r--r--astro/luna/files/patch-iprintf-iprintf.c56
-rw-r--r--astro/luna/files/patch-iprintf-isprintf.c64
-rw-r--r--astro/luna/files/patch-iprintf_iprintf.c56
-rw-r--r--astro/luna/files/patch-iprintf_isprintf.c64
-rw-r--r--astro/luna/files/patch-iprintf_makefile6
-rw-r--r--astro/luna/files/patch-luna.c10
-rw-r--r--astro/luna/files/patch-luna.h8
-rw-r--r--astro/luna/files/patch-makefile4
-rw-r--r--astro/luna/files/patch-pyramid.c8
-rw-r--r--astro/luna/files/patch-pyramid.h8
-rw-r--r--astro/merkaartor/files/patch-src_src.pro2
-rw-r--r--astro/mymoon/files/patch-configure10
-rw-r--r--astro/mymoon/files/patch-grapher.h6
-rw-r--r--astro/mymoon/files/patch-mymoon.c8
-rw-r--r--astro/openuniverse/files/patch-a12
-rw-r--r--astro/openuniverse/files/patch-b50
-rw-r--r--astro/openuniverse/files/patch-src_comet.cpp6
-rw-r--r--astro/openuniverse/files/patch-src_ou.cpp11
-rw-r--r--astro/openuniverse/files/patch-src_ou.h4
-rw-r--r--astro/openuniverse/files/patch-src_timeb.h49
-rw-r--r--astro/osmium/files/patch-test-run__tests.sh15
-rw-r--r--astro/osmium/files/patch-test_run__tests.sh15
-rw-r--r--astro/p5-Astro-FITS-CFITSIO/files/patch-Makefile.PL6
-rw-r--r--astro/phoon/files/patch-Makefile6
-rw-r--r--astro/phoon/files/patch-astro.h6
-rw-r--r--astro/phoon/files/patch-phoon.c6
-rw-r--r--astro/py-astropy/files/patch-astropy_io_fits_setup__package.py2
-rw-r--r--astro/py-astropy/files/patch-astropy_wcs_setup__package.py2
-rw-r--r--astro/qlandkartegt/files/patch-cmake_Modules_DefineInstallationPaths.cmake (renamed from astro/qlandkartegt/files/patch-cmake-Modules-DefineInstallationPaths.cmake)0
-rw-r--r--astro/qmapshack/files/patch-cmake-Modules-DefineInstallationPaths.cmake11
-rw-r--r--astro/qmapshack/files/patch-cmake_Modules_DefineInstallationPaths.cmake11
-rw-r--r--astro/rmap/files/patch-main.c6
-rw-r--r--astro/routino/files/patch-doc_Makefile2
-rw-r--r--astro/routino/files/patch-extras_find-fixme_Makefile2
-rw-r--r--astro/routino/files/patch-web_Makefile2
-rw-r--r--astro/routino/files/patch-xml_Makefile2
-rw-r--r--astro/saoimage/files/patch-btnlib_makefile6
-rw-r--r--astro/saoimage/files/patch-disppsct.c6
-rw-r--r--astro/saoimage/files/patch-gcc4692
-rw-r--r--astro/saoimage/files/patch-makefile.FreeBSD14
-rw-r--r--astro/saoimage/files/patch-rgnwrite.c6
-rw-r--r--astro/stars/files/patch-main.c8
-rw-r--r--astro/sunclock/files/patch-readpng.c6
-rw-r--r--astro/sunclock/files/patch-sunclock.c22
-rw-r--r--astro/sunclock/files/patch-sunclock.h8
-rw-r--r--astro/sunclock/files/patch-tildepath.c6
-rw-r--r--astro/sunclock/files/patch-widgets.c4
-rw-r--r--astro/wcslib/files/patch-GNUmakefile6
-rw-r--r--astro/wmmoonclock/files/patch-Makefile37
-rw-r--r--astro/wmmoonclock/files/patch-wmMoonClock.c6
-rw-r--r--astro/wmsolar/files/patch-Makefile2
-rw-r--r--astro/wmsolar/files/patch-Vsop.h2
-rw-r--r--astro/wmspaceweather/files/patch-GetKp4
-rw-r--r--astro/wmspaceweather/files/patch-Makefile8
-rw-r--r--astro/wmspaceweather/files/patch-wmSpaceWeather.c20
-rw-r--r--astro/wmsun/files/patch-Makefile6
-rw-r--r--astro/wmsun/files/patch-wmSun.c6
-rw-r--r--astro/xglobe/files/patch-Makefile4
-rw-r--r--astro/xglobe/files/patch-desktopwidget.cpp8
-rw-r--r--astro/xglobe/files/patch-desktopwidget.h4
-rw-r--r--astro/xglobe/files/patch-earthapp.cpp14
-rw-r--r--astro/xglobe/files/patch-earthapp.h4
-rw-r--r--astro/xglobe/files/patch-main.cpp6
-rw-r--r--astro/xglobe/files/patch-marker.xpm4
-rw-r--r--astro/xglobe/files/patch-markerlist.cpp6
-rw-r--r--astro/xglobe/files/patch-markerlist.h6
-rw-r--r--astro/xglobe/files/patch-renderer.cpp30
-rw-r--r--astro/xglobe/files/patch-sunpos.cpp6
-rw-r--r--astro/xmoontool/files/patch-Makefile10
-rw-r--r--astro/xphoon/files/patch-Imakefile4
-rw-r--r--astro/xphoon/files/patch-dtime.c10
-rw-r--r--astro/xphoon/files/patch-xphoon.c10
-rw-r--r--astro/xworld/files/patch-compile__world.c10
-rw-r--r--astro/xworld/files/patch-compile_world.c10
-rw-r--r--astro/xworld/files/patch-pad.c4
-rw-r--r--astro/xworld/files/patch-xworld.c140
-rw-r--r--astro/xworld/files/patch-xworld_c140
-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
1785 files changed, 17281 insertions, 17552 deletions
diff --git a/accessibility/at-spi/files/patch-registryd_registry-main.c b/accessibility/at-spi/files/patch-registryd_registry-main.c
index ac903d9f4e22..f54fa90b6b43 100644
--- a/accessibility/at-spi/files/patch-registryd_registry-main.c
+++ b/accessibility/at-spi/files/patch-registryd_registry-main.c
@@ -1,5 +1,5 @@
---- registryd/registry-main.c.orig 2010-02-27 00:19:33.000000000 -0500
-+++ registryd/registry-main.c 2010-02-27 00:21:10.000000000 -0500
+--- registryd/registry-main.c.orig 2010-09-09 02:51:14 UTC
++++ registryd/registry-main.c
@@ -198,6 +198,7 @@ main (int argc, char **argv)
* has been set. If we have not been relocated, we will exit if the
* at-spi-dbus key has been set.
diff --git a/accessibility/dasher/files/patch-clang b/accessibility/dasher/files/patch-clang
index 0f0ef1be5609..8b06f909d995 100644
--- a/accessibility/dasher/files/patch-clang
+++ b/accessibility/dasher/files/patch-clang
@@ -1,6 +1,6 @@
---- ./Src/DasherCore/DasherViewSquare.h.orig 2013-05-24 17:03:27.185956866 +0200
-+++ ./Src/DasherCore/DasherViewSquare.h 2013-05-24 17:03:36.904410678 +0200
-@@ -20,11 +20,6 @@
+--- Src/DasherCore/DasherViewSquare.h.orig 2009-04-27 15:05:29 UTC
++++ Src/DasherCore/DasherViewSquare.h
+@@ -20,11 +20,6 @@ namespace Dasher {
class CDasherNode;
}
@@ -12,9 +12,9 @@
/// \ingroup View
/// @{
---- ./Src/DasherCore/SettingsStore.h.orig 2013-05-24 16:53:08.087996232 +0200
-+++ ./Src/DasherCore/SettingsStore.h 2013-05-24 16:53:40.137994206 +0200
-@@ -18,9 +18,6 @@
+--- Src/DasherCore/SettingsStore.h.orig 2009-04-27 15:05:30 UTC
++++ Src/DasherCore/SettingsStore.h
+@@ -18,9 +18,6 @@ namespace Dasher {
class CParameterNotificationEvent;
}
@@ -24,9 +24,9 @@
// Types that are parameters can be
enum ParameterType
{
---- ./Src/DasherCore/View/DelayedDraw.h.orig 2013-05-24 17:00:06.589967502 +0200
-+++ ./Src/DasherCore/View/DelayedDraw.h 2013-05-24 16:57:01.492979337 +0200
-@@ -15,8 +15,6 @@
+--- Src/DasherCore/View/DelayedDraw.h.orig 2009-04-27 15:05:30 UTC
++++ Src/DasherCore/View/DelayedDraw.h
+@@ -15,8 +15,6 @@ namespace Dasher {
class CDasherScreen;
}
diff --git a/accessibility/eflite/files/patch-Makefile.in b/accessibility/eflite/files/patch-Makefile.in
index bc21e56e1198..e44ad0237e41 100644
--- a/accessibility/eflite/files/patch-Makefile.in
+++ b/accessibility/eflite/files/patch-Makefile.in
@@ -1,4 +1,4 @@
---- Makefile.in.orig 2007-01-19 00:01:09.000000000 +0000
+--- Makefile.in.orig 2007-01-19 00:01:09 UTC
+++ Makefile.in
@@ -34,7 +34,7 @@ eflite: fs.o es.o soccon.o sockopen.o to
$(CC) $(LDFLAGS) -o $@ $^ -lm $(LIBS) $(FLITE_LIBS) $(AUDIOLIBS)
diff --git a/accessibility/gnome-mag/files/patch-docs_reference_Makefile.in b/accessibility/gnome-mag/files/patch-docs_reference_Makefile.in
index 65bcf35805bc..421edc071b4f 100644
--- a/accessibility/gnome-mag/files/patch-docs_reference_Makefile.in
+++ b/accessibility/gnome-mag/files/patch-docs_reference_Makefile.in
@@ -1,6 +1,6 @@
---- docs/reference/Makefile.in.orig 2009-08-09 02:49:17.000000000 +0200
-+++ docs/reference/Makefile.in 2009-08-09 02:54:54.000000000 +0200
-@@ -418,8 +418,6 @@
+--- docs/reference/Makefile.in.orig 2010-10-30 14:17:09 UTC
++++ docs/reference/Makefile.in
+@@ -443,8 +443,6 @@ uninstall-am: uninstall-local
html/index.html:
-rm -rf html
diff --git a/accessibility/gnome-speech/files/patch-configure b/accessibility/gnome-speech/files/patch-configure
index 62b94639b55c..4a5934daa800 100644
--- a/accessibility/gnome-speech/files/patch-configure
+++ b/accessibility/gnome-speech/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Tue Jun 7 02:40:27 2005
-+++ configure Tue Jun 7 02:41:02 2005
-@@ -20213,8 +20213,8 @@
+--- configure.orig 2009-02-15 17:43:46 UTC
++++ configure
+@@ -21415,8 +21415,8 @@ fi
fi
if test "x$JAVAC" != "x" ; then
@@ -11,11 +11,11 @@
JAVAC="$JAVAC -source 1.4"
fi
-@@ -20423,6 +20423,7 @@
+@@ -21634,6 +21634,7 @@ fi
fi
# Find the Java Access Bridge
+JAB="no"
- # Check whether --with-jab_dir or --without-jab_dir was given.
+ # Check whether --with-jab_dir was given.
diff --git a/accessibility/speech-dispatcher/files/patch-src__clients__spdsend__server.c b/accessibility/speech-dispatcher/files/patch-src__clients__spdsend__server.c
deleted file mode 100644
index 85341558a6a4..000000000000
--- a/accessibility/speech-dispatcher/files/patch-src__clients__spdsend__server.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./src/clients/spdsend/server.c.orig 2012-07-11 11:05:05.000000000 +0200
-+++ ./src/clients/spdsend/server.c 2013-11-15 08:44:05.105354858 +0100
-@@ -33,6 +33,7 @@
-
- #include <errno.h>
- #include <netdb.h>
-+#include <sys/types.h>
- #include <netinet/in.h>
- #include <netinet/tcp.h>
- #if USE_THREADS
diff --git a/accessibility/speech-dispatcher/files/patch-src_clients_spdsend_server.c b/accessibility/speech-dispatcher/files/patch-src_clients_spdsend_server.c
new file mode 100644
index 000000000000..f8f8dc8c1d62
--- /dev/null
+++ b/accessibility/speech-dispatcher/files/patch-src_clients_spdsend_server.c
@@ -0,0 +1,10 @@
+--- src/clients/spdsend/server.c.orig 2015-05-07 23:19:02 UTC
++++ src/clients/spdsend/server.c
+@@ -33,6 +33,7 @@
+
+ #include <errno.h>
+ #include <netdb.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #if USE_THREADS
diff --git a/accessibility/speech-dispatcher/files/patch-src__server__speechd.h b/accessibility/speech-dispatcher/files/patch-src_server_speechd.h
index ae963e2f6e49..ae963e2f6e49 100644
--- a/accessibility/speech-dispatcher/files/patch-src__server__speechd.h
+++ b/accessibility/speech-dispatcher/files/patch-src_server_speechd.h
diff --git a/accessibility/yasr/Makefile b/accessibility/yasr/Makefile
index d6dbe18a4b3a..83da2d65681d 100644
--- a/accessibility/yasr/Makefile
+++ b/accessibility/yasr/Makefile
@@ -23,7 +23,6 @@ NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls
OPTIONS_DEFINE= DOCS NLS
OPTIONS_SUB= yes
-EXTRA_PATCHES= ${FILESDIR}/extra-patch-yasr__main.c
PLIST_FILES= bin/yasr \
man/man1/yasr.1.gz \
diff --git a/accessibility/yasr/files/extra-patch-yasr__main.c b/accessibility/yasr/files/extra-patch-yasr__main.c
deleted file mode 100644
index 0e773cf87663..000000000000
--- a/accessibility/yasr/files/extra-patch-yasr__main.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- ./yasr/main.c.orig 2013-11-11 18:44:59.238198747 -0500
-+++ ./yasr/main.c 2013-11-11 18:45:09.927197900 -0500
-@@ -24,11 +24,7 @@
-
- #include "yasr.h"
- #include "term.h"
--#include <utmp.h>
--#ifdef HAVE_UTMPX_H
- #include <utmpx.h>
--#endif
--#define UTMP_HACK
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/wait.h>
diff --git a/accessibility/yasr/files/patch-yasr__main.c b/accessibility/yasr/files/patch-yasr__main.c
new file mode 100644
index 000000000000..169881e78033
--- /dev/null
+++ b/accessibility/yasr/files/patch-yasr__main.c
@@ -0,0 +1,14 @@
+--- yasr/main.c.orig 2007-09-23 00:46:58 UTC
++++ yasr/main.c
+@@ -24,11 +24,7 @@
+
+ #include "yasr.h"
+ #include "term.h"
+-#include <utmp.h>
+-#ifdef HAVE_UTMPX_H
+ #include <utmpx.h>
+-#endif
+-#define UTMP_HACK
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
diff --git a/arabic/libitl/files/patch-Makefile.in b/arabic/libitl/files/patch-Makefile.in
index 4a9c37310bfa..511fc45c615a 100644
--- a/arabic/libitl/files/patch-Makefile.in
+++ b/arabic/libitl/files/patch-Makefile.in
@@ -1,5 +1,5 @@
---- Makefile.in.orig 2013-09-25 23:27:38.000000000 +0800
-+++ Makefile.in 2013-09-25 23:28:25.000000000 +0800
+--- Makefile.in.orig 2009-03-17 16:26:28 UTC
++++ Makefile.in
@@ -83,15 +83,15 @@ debinstall: components
install: build/libitl.so build/libitl.a
diff --git a/arabic/libitl/files/patch-hijri_Makefile b/arabic/libitl/files/patch-hijri_Makefile
new file mode 100644
index 000000000000..4a41aa88c035
--- /dev/null
+++ b/arabic/libitl/files/patch-hijri_Makefile
@@ -0,0 +1,16 @@
+--- hijri/Makefile.orig 2006-09-21 16:34:31 UTC
++++ hijri/Makefile
+@@ -10,10 +10,10 @@ demo_hijri:
+
+ install: all
+ @echo "==> Installing hijri component..."
+- test -d $(PREFIX)/include/itl \
+- || install -d $(PREFIX)/include/itl \
++ test -d $(DESTDIR)$(PREFIX)/include/itl \
++ || install -d $(DESTDIR)$(PREFIX)/include/itl \
+ || exit 1;
+- install src/hijri.h $(PREFIX)/include/itl
++ install src/hijri.h $(DESTDIR)$(PREFIX)/include/itl
+
+ uninstall:
+ @echo "==> Uninstalling hijri component..."
diff --git a/arabic/libitl/files/patch-hijri__Makefile b/arabic/libitl/files/patch-hijri__Makefile
deleted file mode 100644
index 60fba829a8af..000000000000
--- a/arabic/libitl/files/patch-hijri__Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
---- hijri/Makefile.orig 2013-09-25 23:36:27.000000000 +0800
-+++ hijri/Makefile 2013-09-25 23:36:43.000000000 +0800
-@@ -10,10 +10,10 @@ demo_hijri:
-
- install: all
- @echo "==> Installing hijri component..."
-- test -d $(PREFIX)/include/itl \
-- || install -d $(PREFIX)/include/itl \
-+ test -d $(DESTDIR)$(PREFIX)/include/itl \
-+ || install -d $(DESTDIR)$(PREFIX)/include/itl \
- || exit 1;
-- install src/hijri.h $(PREFIX)/include/itl
-+ install src/hijri.h $(DESTDIR)$(PREFIX)/include/itl
-
- uninstall:
- @echo "==> Uninstalling hijri component..."
diff --git a/arabic/libitl/files/patch-prayertime_Makefile b/arabic/libitl/files/patch-prayertime_Makefile
new file mode 100644
index 000000000000..632f656f50fb
--- /dev/null
+++ b/arabic/libitl/files/patch-prayertime_Makefile
@@ -0,0 +1,16 @@
+--- prayertime/Makefile.orig 2006-09-21 16:37:51 UTC
++++ prayertime/Makefile
+@@ -10,10 +10,10 @@ demo_prayer:
+
+ install: all
+ @echo "==> Installing prayertime component..."
+- test -d $(PREFIX)/include/itl \
+- || install $(PREFIX)/include/itl \
++ test -d $(DESTDIR)$(PREFIX)/include/itl \
++ || install $(DESTDIR)$(PREFIX)/include/itl \
+ || exit 1;
+- install src/prayer.h $(PREFIX)/include/itl
++ install src/prayer.h $(DESTDIR)$(PREFIX)/include/itl
+
+ uninstall:
+ @echo "==> Uninstalling prayertime component..."
diff --git a/arabic/libitl/files/patch-prayertime__Makefile b/arabic/libitl/files/patch-prayertime__Makefile
deleted file mode 100644
index d1bb99d170fe..000000000000
--- a/arabic/libitl/files/patch-prayertime__Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
---- prayertime/Makefile.orig 2013-09-25 23:35:59.000000000 +0800
-+++ prayertime/Makefile 2013-09-25 23:36:20.000000000 +0800
-@@ -10,10 +10,10 @@ demo_prayer:
-
- install: all
- @echo "==> Installing prayertime component..."
-- test -d $(PREFIX)/include/itl \
-- || install $(PREFIX)/include/itl \
-+ test -d $(DESTDIR)$(PREFIX)/include/itl \
-+ || install $(DESTDIR)$(PREFIX)/include/itl \
- || exit 1;
-- install src/prayer.h $(PREFIX)/include/itl
-+ install src/prayer.h $(DESTDIR)$(PREFIX)/include/itl
-
- uninstall:
- @echo "==> Uninstalling prayertime component..."
diff --git a/archivers/9e/files/patch-9e.c b/archivers/9e/files/patch-9e.c
index 6333e3868512..2f7eefa8257c 100644
--- a/archivers/9e/files/patch-9e.c
+++ b/archivers/9e/files/patch-9e.c
@@ -1,6 +1,6 @@
---- 9e.c.orig Thu Jun 15 13:40:52 2000
-+++ 9e.c Fri Jun 23 04:16:00 2000
-@@ -139,17 +139,16 @@
+--- 9e.c.orig 2000-06-15 13:40:52 UTC
++++ 9e.c
+@@ -139,17 +139,16 @@ void do_file(char *file, FILE *fin) {
}
if(Hdrs) {
diff --git a/archivers/advancecomp/files/patch-7z_Portable.h b/archivers/advancecomp/files/patch-7z_Portable.h
new file mode 100644
index 000000000000..e19b52f9c7de
--- /dev/null
+++ b/archivers/advancecomp/files/patch-7z_Portable.h
@@ -0,0 +1,11 @@
+--- 7z/Portable.h.orig 2012-12-08 22:16:47 UTC
++++ 7z/Portable.h
+@@ -2,7 +2,7 @@
+ #define __PORTABLE_H
+
+ #include <string.h>
+-#include <stdint.h>
++#include <inttypes.h>
+
+ typedef signed char INT8;
+ typedef unsigned char UINT8;
diff --git a/archivers/advancecomp/files/patch-Portable.h b/archivers/advancecomp/files/patch-Portable.h
deleted file mode 100644
index e4ae77909198..000000000000
--- a/archivers/advancecomp/files/patch-Portable.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- 7z/Portable.h.org Mon Aug 7 10:54:35 2006
-+++ 7z/Portable.h Mon Aug 7 10:54:55 2006
-@@ -2,7 +2,7 @@
- #define __PORTABLE_H
-
- #include <string.h>
--#include <stdint.h>
-+#include <inttypes.h>
-
- typedef signed char INT8;
- typedef unsigned char UINT8;
diff --git a/archivers/arc/files/patch-Makefile b/archivers/arc/files/patch-Makefile
index 39dc54bd7d4a..bc67c7a69791 100644
--- a/archivers/arc/files/patch-Makefile
+++ b/archivers/arc/files/patch-Makefile
@@ -1,7 +1,7 @@
---- Makefile.orig Fri Oct 31 05:32:51 2003
-+++ Makefile Wed Nov 5 13:53:51 2003
-@@ -38,14 +38,14 @@
- OPT = -O
+--- Makefile.orig 2010-08-07 13:06:42 UTC
++++ Makefile
+@@ -44,14 +44,14 @@ SYSTEM = -DSYSV=1
+ OPT = -O -Wall
# For MWC 3.0 on the Atari ST, use:
#CFLAGS = -VCOMPAC -VPEEP
-CFLAGS = $(OPT) $(SYSTEM)
diff --git a/archivers/arc/files/patch-arc.c b/archivers/arc/files/patch-arc.c
index 63954d8d2317..446149131503 100644
--- a/archivers/arc/files/patch-arc.c
+++ b/archivers/arc/files/patch-arc.c
@@ -1,6 +1,6 @@
---- arc.c.orig Sun Oct 9 03:38:22 2005
-+++ arc.c Fri Oct 14 14:22:38 2005
-@@ -290,7 +290,7 @@
+--- arc.c.orig 2010-08-07 13:06:42 UTC
++++ arc.c
+@@ -298,7 +298,7 @@ main(num, arg) /* system entry point *
keepbak = 1;
else if (*a == 'W') /* suppress warnings */
@@ -9,7 +9,7 @@
#if !DOS
else if (*a == 'I') /* image mode, no ASCII/EBCDIC x-late */
image = !image;
-@@ -426,7 +426,7 @@
+@@ -434,7 +434,7 @@ static VOID
expandlst(n) /* expand an indirect reference */
int n; /* number of entry to expand */
{
diff --git a/archivers/arc/files/patch-arc.h b/archivers/arc/files/patch-arc.h
index a228e9d11dfd..0ba371b9f874 100644
--- a/archivers/arc/files/patch-arc.h
+++ b/archivers/arc/files/patch-arc.h
@@ -1,6 +1,6 @@
---- ./arc.h.orig Tue Aug 10 23:03:24 1999
-+++ ./arc.h Tue Aug 10 23:01:55 1999
-@@ -106,7 +106,7 @@
+--- arc.h.orig 2010-08-07 13:06:42 UTC
++++ arc.h
+@@ -106,7 +106,7 @@ extern char tmpchr[2]; /* Temporary
#if GEMDOS
extern int hold; /* hold screen before exiting */
#endif
diff --git a/archivers/arc/files/patch-arcadd.c b/archivers/arc/files/patch-arcadd.c
index 8a5597cfc6f5..2c10334c08a0 100644
--- a/archivers/arc/files/patch-arcadd.c
+++ b/archivers/arc/files/patch-arcadd.c
@@ -1,6 +1,6 @@
---- ./arcadd.c.orig Tue Aug 10 23:03:24 1999
-+++ ./arcadd.c Tue Aug 10 23:01:55 1999
-@@ -119,7 +119,7 @@
+--- arcadd.c.orig 2010-08-07 13:06:42 UTC
++++ arcadd.c
+@@ -119,7 +119,7 @@ int fresh; /* true if fresh
}
#endif
}
@@ -9,7 +9,7 @@
printf("No files match: %s\n", arg[n]);
}
-@@ -133,7 +133,7 @@
+@@ -133,7 +133,7 @@ int fresh; /* true if fresh
free(path);
free(name);
}
@@ -18,7 +18,7 @@
printf("No files were added.\n");
}
-@@ -227,7 +227,7 @@
+@@ -227,7 +227,7 @@ addbunch(nfiles, path, name, move, updat
if (move) { /* if this was a move */
for (n = 0; n < nfiles; n++) { /* then delete each file
* added */
@@ -27,7 +27,7 @@
printf("Cannot unsave %s\n", path[n]);
nerrs++;
}
-@@ -259,7 +259,7 @@
+@@ -259,7 +259,7 @@ addfile(path, name, update, fresh) /* ad
if (!f)
#endif
{
@@ -36,7 +36,7 @@
printf("Cannot read file: %s\n", path);
nerrs++;
}
-@@ -267,7 +267,7 @@
+@@ -267,7 +267,7 @@ addfile(path, name, update, fresh) /* ad
}
#if !DOS
if (strlen(name) >= FNLEN) {
diff --git a/archivers/arc/files/patch-arccvt.c b/archivers/arc/files/patch-arccvt.c
index 1f496113cbb2..54fe714c5b57 100644
--- a/archivers/arc/files/patch-arccvt.c
+++ b/archivers/arc/files/patch-arccvt.c
@@ -1,6 +1,6 @@
---- ./arccvt.c.orig Tue Aug 10 23:03:24 1999
-+++ ./arccvt.c Tue Aug 10 23:01:55 1999
-@@ -120,7 +120,7 @@
+--- arccvt.c.orig 2010-08-07 13:06:42 UTC
++++ arccvt.c
+@@ -120,7 +120,7 @@ cvtfile(hdr) /* convert a file */
writehdr(hdr, new); /* write out real header */
fseek(new, hdr->size, 1); /* skip over data to next header */
fclose(tmp); /* all done with the file */
diff --git a/archivers/arc/files/patch-arcdata.c b/archivers/arc/files/patch-arcdata.c
index f9e7a9067de8..386eb235c141 100644
--- a/archivers/arc/files/patch-arcdata.c
+++ b/archivers/arc/files/patch-arcdata.c
@@ -1,6 +1,6 @@
---- ./arcdata.c.orig Tue Aug 10 23:03:24 1999
-+++ ./arcdata.c Tue Aug 10 23:01:56 1999
-@@ -35,7 +35,7 @@
+--- arcdata.c.orig 2010-08-07 13:06:42 UTC
++++ arcdata.c
+@@ -35,7 +35,7 @@ char tmpchr[2] = "-";/* Tempo
#if GEMDOS
int hold = 0; /* true to pause before exit */
#endif
diff --git a/archivers/arc/files/patch-arcdos.c b/archivers/arc/files/patch-arcdos.c
index 52bf11b472f3..28cec121b0f3 100644
--- a/archivers/arc/files/patch-arcdos.c
+++ b/archivers/arc/files/patch-arcdos.c
@@ -1,25 +1,23 @@
-*** arcdos.c.old Wed Apr 15 02:58:21 1992
---- arcdos.c Sat Dec 31 20:32:25 1994
-***************
-*** 173,186 ****
---- 173,192 ----
- struct tm tm;
- struct timeval tvp[2];
- int utimes();
-+ #if !defined(__FreeBSD__) && !defined(__OpenBSD__)
- long tmclock();
-+ #endif
- tm.tm_sec = (time & 31) * 2;
- tm.tm_min = (time >> 5) & 63;
- tm.tm_hour = (time >> 11);
- tm.tm_mday = date & 31;
- tm.tm_mon = ((date >> 5) & 15) - 1;
- tm.tm_year = (date >> 9) + 80;
-+ #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
- tvp[0].tv_sec = tmclock(&tm);
-+ #else
-+ tvp[0].tv_sec = timelocal(&tm);
-+ #endif
- tvp[1].tv_sec = tvp[0].tv_sec;
- tvp[0].tv_usec = tvp[1].tv_usec = 0;
- utimes(f, tvp);
+--- arcdos.c.orig 2010-08-07 13:06:42 UTC
++++ arcdos.c
+@@ -175,14 +175,20 @@ setstamp(f, date, time) /* set a file's
+ struct tm tm;
+ struct timeval tvp[2];
+ int utimes();
++#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
+ long tmclock();
++#endif
+ tm.tm_sec = (time & 31) * 2;
+ tm.tm_min = (time >> 5) & 63;
+ tm.tm_hour = (time >> 11);
+ tm.tm_mday = date & 31;
+ tm.tm_mon = ((date >> 5) & 15) - 1;
+ tm.tm_year = (date >> 9) + 80;
++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ tvp[0].tv_sec = tmclock(&tm);
++#else
++ tvp[0].tv_sec = timelocal(&tm);
++#endif
+ tvp[1].tv_sec = tvp[0].tv_sec;
+ tvp[0].tv_usec = tvp[1].tv_usec = 0;
+ utimes(f, tvp);
diff --git a/archivers/arc/files/patch-arcext.c b/archivers/arc/files/patch-arcext.c
index eae8495ed002..7e8f1434ea04 100644
--- a/archivers/arc/files/patch-arcext.c
+++ b/archivers/arc/files/patch-arcext.c
@@ -1,6 +1,6 @@
---- arcext.c.orig Sat Oct 8 22:24:37 2005
-+++ arcext.c Fri Oct 14 00:52:14 2005
-@@ -143,7 +143,7 @@
+--- arcext.c.orig 2010-08-07 13:06:42 UTC
++++ arcext.c
+@@ -143,7 +143,7 @@ extfile(hdr, path, prt) /* extract a fi
if (note)
printf("Extracting file: %s\n", fix);
@@ -9,7 +9,7 @@
if ((f = fopen(fix, "r"))) { /* see if it exists */
fclose(f);
printf("WARNING: File %s already exists!", fix);
-@@ -190,7 +190,7 @@
+@@ -191,7 +191,7 @@ extfile(hdr, path, prt) /* extract a fi
if (!f)
#endif
{
diff --git a/archivers/arc/files/patch-arcio.c b/archivers/arc/files/patch-arcio.c
index 7034aeaf6cb0..be27ece679a4 100644
--- a/archivers/arc/files/patch-arcio.c
+++ b/archivers/arc/files/patch-arcio.c
@@ -1,6 +1,6 @@
---- arcio.c.orig Wed Apr 15 02:58:26 1992
-+++ arcio.c Sat Aug 11 22:10:55 2001
-@@ -46,7 +46,7 @@
+--- arcio.c.orig 2010-08-07 13:06:42 UTC
++++ arcio.c
+@@ -46,7 +46,7 @@ readhdr(hdr, f) /* read a header from
return 0; /* then signal end of archive */
if (hdrver != ARCMARK) { /* check archive validity */
@@ -9,7 +9,7 @@
printf("An entry in %s has a bad header.\n", arcname);
nerrs++;
}
-@@ -63,10 +63,10 @@
+@@ -67,10 +67,10 @@ readhdr(hdr, f) /* read a header from
if (feof(f) && first)
arcdie("%s is not an archive", arcname);
@@ -22,7 +22,7 @@
printf(" %d bytes skipped.\n", try);
if (feof(f))
-@@ -110,7 +110,8 @@
+@@ -118,7 +118,8 @@ readhdr(hdr, f) /* read a header from
hdr->crc = (short) ((dummy[22] << 8) + dummy[21]);
for (i = 0, hdr->length=0; i<4; hdr->length<<=8, hdr->length += dummy[26-i], i++);
#endif
diff --git a/archivers/arc/files/patch-arclzw.c b/archivers/arc/files/patch-arclzw.c
index 7933c26409d1..c0f1c8996403 100644
--- a/archivers/arc/files/patch-arclzw.c
+++ b/archivers/arc/files/patch-arclzw.c
@@ -1,6 +1,6 @@
---- ./arclzw.c.orig Tue Aug 10 23:03:25 1999
-+++ ./arclzw.c Tue Aug 10 23:01:57 1999
-@@ -546,7 +546,7 @@
+--- arclzw.c.orig 2010-08-07 13:06:42 UTC
++++ arclzw.c
+@@ -560,7 +560,7 @@ decomp(squash, f, t) /* decompress a fi
*/
if (code >= free_ent) {
if (code > free_ent) {
diff --git a/archivers/arc/files/patch-arcrun.c b/archivers/arc/files/patch-arcrun.c
index 207e33531b82..42b1985b4bd8 100644
--- a/archivers/arc/files/patch-arcrun.c
+++ b/archivers/arc/files/patch-arcrun.c
@@ -1,6 +1,6 @@
---- arcrun.c.orig Wed Oct 12 19:22:18 2005
-+++ arcrun.c Sat May 27 03:47:30 2006
-@@ -98,7 +98,7 @@
+--- arcrun.c.orig 2010-08-07 13:06:42 UTC
++++ arcrun.c
+@@ -98,7 +98,7 @@ runfile(hdr, num, arg) /* run a file */
strcpy(sys, buf);
else {
@@ -9,7 +9,7 @@
printf("File %s is not a .BAS, .BAT, .COM, or .EXE\n",
hdr->name);
nerrs++;
-@@ -112,7 +112,7 @@
+@@ -112,7 +112,7 @@ runfile(hdr, num, arg) /* run a file */
&& strcmp(i, ".TTP")
&& strcmp(i, ".TOS"))
{
@@ -18,7 +18,7 @@
printf("File %s is not a .PRG, .TOS, or .TTP\n",
hdr->name);
nerrs++;
-@@ -122,7 +122,7 @@
+@@ -122,7 +122,7 @@ runfile(hdr, num, arg) /* run a file */
}
#endif
@@ -27,7 +27,7 @@
if ((tmp = fopen(buf, "r")))
arcdie("Temporary file %s already exists", buf);
if (!(tmp = tmpopen(buf)))
-@@ -146,7 +146,7 @@
+@@ -146,7 +146,7 @@ runfile(hdr, num, arg) /* run a file */
if (system(buf)) /* try to invoke it */
arcdie("Execution failed for %s", buf);
#endif
diff --git a/archivers/arc/files/patch-arcunp.c b/archivers/arc/files/patch-arcunp.c
index 08e091f2462e..ed3f7191d744 100644
--- a/archivers/arc/files/patch-arcunp.c
+++ b/archivers/arc/files/patch-arcunp.c
@@ -1,6 +1,6 @@
---- ./arcunp.c.orig Tue Aug 10 23:03:25 1999
-+++ ./arcunp.c Tue Aug 10 23:01:57 1999
-@@ -123,7 +123,7 @@
+--- arcunp.c.orig 2010-08-07 13:06:42 UTC
++++ arcunp.c
+@@ -122,7 +122,7 @@ unpack(f, t, hdr) /* unpack an archive
break;
default: /* unknown method */
@@ -9,7 +9,7 @@
printf("I don't know how to unpack file %s\n", hdr->name);
printf("I think you need a newer version of ARC\n");
nerrs++;
-@@ -135,7 +135,7 @@
+@@ -134,7 +134,7 @@ unpack(f, t, hdr) /* unpack an archive
/* cleanups common to all methods */
if (crcval != hdr->crc) {
diff --git a/archivers/arj/files/patch-arj__arcv.c b/archivers/arj/files/patch-arj__arcv.c
new file mode 100644
index 000000000000..2bfbab86c1e0
--- /dev/null
+++ b/archivers/arj/files/patch-arj__arcv.c
@@ -0,0 +1,60 @@
+--- arj_arcv.c.orig 2005-06-21 19:53:12 UTC
++++ arj_arcv.c
+@@ -59,27 +59,27 @@ static char idxid_fault[]="?";
+ #define setup_hput(ptr) (tmp_hptr=(ptr))
+
+ #define hget_byte() (*(tmp_hptr++)&0xFF)
+-#define hput_byte(c) (*(tmp_hptr++)=(char) (c))
++#define hput_byte(c) (*(tmp_hptr++)=(uint8_t) (c))
+
+ /* Reads two bytes from the header, incrementing the pointer */
+
+-static unsigned int hget_word()
++static uint16_t hget_word()
+ {
+- unsigned int result;
++ uint16_t result;
+
+ result=mget_word(tmp_hptr);
+- tmp_hptr+=sizeof(short);
++ tmp_hptr+=sizeof(uint16_t);
+ return result;
+ }
+
+ /* Reads four bytes from the header, incrementing the pointer */
+
+-static unsigned long hget_longword()
++static uint32_t hget_longword()
+ {
+- unsigned long result;
++ uint32_t result;
+
+ result=mget_dword(tmp_hptr);
+- tmp_hptr+=sizeof(unsigned long);
++ tmp_hptr+=sizeof(uint32_t);
+ return result;
+ }
+
+@@ -87,18 +87,18 @@ static unsigned long hget_longword()
+
+ /* Writes two bytes to the header, incrementing the pointer */
+
+-static void hput_word(unsigned int w)
++static void hput_word(uint16_t w)
+ {
+ mput_word(w,tmp_hptr);
+- tmp_hptr+=sizeof(unsigned short);
++ tmp_hptr+=sizeof(uint16_t);
+ }
+
+ /* Writes four bytes to the header, incrementing the pointer */
+
+-static void hput_longword(unsigned long l)
++static void hput_longword(uint32_t l)
+ {
+ mput_dword(l,tmp_hptr);
+- tmp_hptr+=sizeof(unsigned long);
++ tmp_hptr+=sizeof(uint32_t);
+ }
+
+ /* Calculates and stores the basic header size */
diff --git a/archivers/arj/files/patch-arj__proc.c b/archivers/arj/files/patch-arj__proc.c
new file mode 100644
index 000000000000..b6b733254d00
--- /dev/null
+++ b/archivers/arj/files/patch-arj__proc.c
@@ -0,0 +1,80 @@
+--- arj_proc.c.orig 2005-06-21 19:53:12 UTC
++++ arj_proc.c
+@@ -585,7 +585,7 @@ int search_for_extension(char *name, cha
+ /* Returns the exact amount of data that could be safely written to the
+ destination volume */
+
+-unsigned long get_volfree(unsigned int increment)
++unsigned long get_volfree(unsigned long increment)
+ {
+ unsigned long pvol;
+ unsigned int arjsec_overhead;
+@@ -605,7 +605,7 @@ unsigned long get_volfree(unsigned int i
+ remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead-
+ (long)out_bytes-(long)cpos-(long)ext_voldata-
+ MULTIVOLUME_RESERVE-t_volume_offset;
+- return((unsigned long)min(remain, (unsigned long)increment));
++ return((unsigned long)min(remain, increment));
+ }
+
+ /* Performs various checks when multivolume data is packed to predict an
+@@ -2466,14 +2466,14 @@ static int get_str_from_jq()
+ *tsptr='\0';
+ endptr=tsptr;
+ tsptr=sptr;
+- while((unsigned int)tsptr<(unsigned int)endptr&&patterns<SEARCH_STR_MAX)
++ while((intptr_t)tsptr<(intptr_t)endptr&&patterns<SEARCH_STR_MAX)
+ {
+ while(*tsptr=='\0')
+ tsptr++;
+- if((unsigned int)tsptr<(unsigned int)endptr)
++ if((intptr_t)tsptr<(intptr_t)endptr)
+ {
+ search_str[patterns++]=tsptr;
+- while(*tsptr!='\0'&&(unsigned int)tsptr<(unsigned int)endptr)
++ while(*tsptr!='\0'&&(intptr_t)tsptr<(intptr_t)endptr)
+ tsptr++;
+ }
+ }
+@@ -2901,9 +2901,9 @@ char *ltrim(char *str)
+ #if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER)
+ /* Model-independent routine to get 2 bytes from far RAM */
+
+-unsigned int mget_word(char FAR *p)
++uint16_t mget_word(char FAR *p)
+ {
+- unsigned int b0, b1;
++ uint16_t b0, b1;
+
+ b0=mget_byte(p);
+ b1=mget_byte(p+1);
+@@ -2912,9 +2912,9 @@ unsigned int mget_word(char FAR *p)
+
+ /* Model-independent routine to get 4 bytes from far RAM */
+
+-unsigned long mget_dword(char FAR *p)
++uint32_t mget_dword(char FAR *p)
+ {
+- unsigned long w0, w1;
++ uint32_t w0, w1;
+
+ w0=mget_word(p);
+ w1=mget_word(p+2);
+@@ -2923,7 +2923,7 @@ unsigned long mget_dword(char FAR *p)
+
+ /* Model-independent routine to store 2 bytes in far RAM */
+
+-void mput_word(unsigned int w, char FAR *p)
++void mput_word(uint16_t w, char FAR *p)
+ {
+ mput_byte(w&0xFF, p);
+ mput_byte(w>>8 , p+1);
+@@ -2931,7 +2931,7 @@ void mput_word(unsigned int w, char FAR
+
+ /* Model-independent routine to store 4 bytes in far RAM */
+
+-void mput_dword(unsigned long d, char FAR *p)
++void mput_dword(uint32_t d, char FAR *p)
+ {
+ mput_word(d&0xFFFF, p);
+ mput_word(d>>16 , p+2);
diff --git a/archivers/arj/files/patch-arj__proc.h b/archivers/arj/files/patch-arj__proc.h
new file mode 100644
index 000000000000..11dda85fa14d
--- /dev/null
+++ b/archivers/arj/files/patch-arj__proc.h
@@ -0,0 +1,50 @@
+--- arj_proc.h.orig 2004-01-25 10:39:30 UTC
++++ arj_proc.h
+@@ -8,15 +8,17 @@
+ #ifndef ARJ_PROC_INCLUDED
+ #define ARJ_PROC_INCLUDED
+
++#include <stdint.h>
++
+ /* Helper macros */
+
+-#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
+-#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
++#define mget_byte(p) (*(uint8_t FAR *)(p)&0xFF)
++#define mput_byte(c, p) *(uint8_t FAR *)(p)=(uint8_t)(c)
+ #ifndef WORDS_BIGENDIAN
+-#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
+-#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
+-#define mget_dword(p) (*(unsigned long *)(p))
+-#define mput_dword(w,p) (*(unsigned long *)(p)=(unsigned long)(w))
++#define mget_word(p) (*(uint16_t *)(p)&0xFFFF)
++#define mput_word(w,p) (*(uint16_t *)(p)=(uint16_t)(w))
++#define mget_dword(p) (*(uint32_t *)(p))
++#define mput_dword(w,p) (*(uint32_t *)(p)=(uint32_t)(w))
+ #endif
+
+ /* Prototypes */
+@@ -31,7 +33,7 @@ void copy_bytes(unsigned long nbytes);
+ int translate_path(char *name);
+ void restart_proc(char *dest);
+ int search_for_extension(char *name, char *ext_list);
+-unsigned long get_volfree(unsigned int increment);
++unsigned long get_volfree(unsigned long increment);
+ unsigned int check_multivolume(unsigned int increment);
+ void store();
+ void hollow_encode();
+@@ -61,10 +63,10 @@ void unpack_mem(struct mempack *mempack)
+ void strip_lf(char *str);
+ char *ltrim(char *str);
+ #ifdef WORDS_BIGENDIAN
+-unsigned int mget_word(char FAR *p);
+-unsigned long mget_dword(char FAR *p);
+-void mput_word(unsigned int w, char FAR *p);
+-void mput_dword(unsigned long d, char FAR *p);
++uint16_t mget_word(char FAR *p);
++uint32_t mget_dword(char FAR *p);
++void mput_word(uint16_t w, char FAR *p);
++void mput_dword(uint32_t d, char FAR *p);
+ #endif
+
+ #endif
diff --git a/archivers/arj/files/patch-arj_arcv.c b/archivers/arj/files/patch-arj_arcv.c
deleted file mode 100644
index e65faa41f9cc..000000000000
--- a/archivers/arj/files/patch-arj_arcv.c
+++ /dev/null
@@ -1,61 +0,0 @@
---- arj_arcv.c 2005-06-21 22:53:12.000000000 +0300
-+++ arj_arcv.c 2005-11-24 02:50:31.000000000 +0200
-@@ -59,27 +59,27 @@
- #define setup_hput(ptr) (tmp_hptr=(ptr))
-
- #define hget_byte() (*(tmp_hptr++)&0xFF)
--#define hput_byte(c) (*(tmp_hptr++)=(char) (c))
-+#define hput_byte(c) (*(tmp_hptr++)=(uint8_t) (c))
-
- /* Reads two bytes from the header, incrementing the pointer */
-
--static unsigned int hget_word()
-+static uint16_t hget_word()
- {
-- unsigned int result;
-+ uint16_t result;
-
- result=mget_word(tmp_hptr);
-- tmp_hptr+=sizeof(short);
-+ tmp_hptr+=sizeof(uint16_t);
- return result;
- }
-
- /* Reads four bytes from the header, incrementing the pointer */
-
--static unsigned long hget_longword()
-+static uint32_t hget_longword()
- {
-- unsigned long result;
-+ uint32_t result;
-
- result=mget_dword(tmp_hptr);
-- tmp_hptr+=sizeof(unsigned long);
-+ tmp_hptr+=sizeof(uint32_t);
- return result;
- }
-
-@@ -87,18 +87,18 @@
-
- /* Writes two bytes to the header, incrementing the pointer */
-
--static void hput_word(unsigned int w)
-+static void hput_word(uint16_t w)
- {
- mput_word(w,tmp_hptr);
-- tmp_hptr+=sizeof(unsigned short);
-+ tmp_hptr+=sizeof(uint16_t);
- }
-
- /* Writes four bytes to the header, incrementing the pointer */
-
--static void hput_longword(unsigned long l)
-+static void hput_longword(uint32_t l)
- {
- mput_dword(l,tmp_hptr);
-- tmp_hptr+=sizeof(unsigned long);
-+ tmp_hptr+=sizeof(uint32_t);
- }
-
- /* Calculates and stores the basic header size */
-diff -Naur -x .svn -x CVS arj-3.10.22.orig/arj_proc.c arj-3.10.22/arj_proc.c
diff --git a/archivers/arj/files/patch-arj_proc.c b/archivers/arj/files/patch-arj_proc.c
deleted file mode 100644
index c8a27fcf44cc..000000000000
--- a/archivers/arj/files/patch-arj_proc.c
+++ /dev/null
@@ -1,80 +0,0 @@
---- arj_proc.c 2005-11-24 02:50:19.000000000 +0200
-+++ arj_proc.c 2005-11-24 02:50:31.000000000 +0200
-@@ -585,7 +585,7 @@
- /* Returns the exact amount of data that could be safely written to the
- destination volume */
-
--unsigned long get_volfree(unsigned int increment)
-+unsigned long get_volfree(unsigned long increment)
- {
- unsigned long pvol;
- unsigned int arjsec_overhead;
-@@ -605,7 +605,7 @@
- remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead-
- (long)out_bytes-(long)cpos-(long)ext_voldata-
- MULTIVOLUME_RESERVE-t_volume_offset;
-- return((unsigned long)min(remain, (unsigned long)increment));
-+ return((unsigned long)min(remain, increment));
- }
-
- /* Performs various checks when multivolume data is packed to predict an
-@@ -2466,14 +2466,14 @@
- *tsptr='\0';
- endptr=tsptr;
- tsptr=sptr;
-- while((unsigned int)tsptr<(unsigned int)endptr&&patterns<SEARCH_STR_MAX)
-+ while((intptr_t)tsptr<(intptr_t)endptr&&patterns<SEARCH_STR_MAX)
- {
- while(*tsptr=='\0')
- tsptr++;
-- if((unsigned int)tsptr<(unsigned int)endptr)
-+ if((intptr_t)tsptr<(intptr_t)endptr)
- {
- search_str[patterns++]=tsptr;
-- while(*tsptr!='\0'&&(unsigned int)tsptr<(unsigned int)endptr)
-+ while(*tsptr!='\0'&&(intptr_t)tsptr<(intptr_t)endptr)
- tsptr++;
- }
- }
-@@ -2901,9 +2901,9 @@
- #if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && !defined(ARJDISP) && !defined(REGISTER)
- /* Model-independent routine to get 2 bytes from far RAM */
-
--unsigned int mget_word(char FAR *p)
-+uint16_t mget_word(char FAR *p)
- {
-- unsigned int b0, b1;
-+ uint16_t b0, b1;
-
- b0=mget_byte(p);
- b1=mget_byte(p+1);
-@@ -2912,9 +2912,9 @@
-
- /* Model-independent routine to get 4 bytes from far RAM */
-
--unsigned long mget_dword(char FAR *p)
-+uint32_t mget_dword(char FAR *p)
- {
-- unsigned long w0, w1;
-+ uint32_t w0, w1;
-
- w0=mget_word(p);
- w1=mget_word(p+2);
-@@ -2923,7 +2923,7 @@
-
- /* Model-independent routine to store 2 bytes in far RAM */
-
--void mput_word(unsigned int w, char FAR *p)
-+void mput_word(uint16_t w, char FAR *p)
- {
- mput_byte(w&0xFF, p);
- mput_byte(w>>8 , p+1);
-@@ -2931,7 +2931,7 @@
-
- /* Model-independent routine to store 4 bytes in far RAM */
-
--void mput_dword(unsigned long d, char FAR *p)
-+void mput_dword(uint32_t d, char FAR *p)
- {
- mput_word(d&0xFFFF, p);
- mput_word(d>>16 , p+2);
diff --git a/archivers/arj/files/patch-arj_proc.h b/archivers/arj/files/patch-arj_proc.h
deleted file mode 100644
index 9501e70c08af..000000000000
--- a/archivers/arj/files/patch-arj_proc.h
+++ /dev/null
@@ -1,50 +0,0 @@
---- arj_proc.h.orig 2004-01-25 08:39:30.000000000 -0200
-+++ arj_proc.h 2010-02-19 08:35:05.000000000 -0200
-@@ -8,15 +8,17 @@
- #ifndef ARJ_PROC_INCLUDED
- #define ARJ_PROC_INCLUDED
-
-+#include <stdint.h>
-+
- /* Helper macros */
-
--#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
--#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
-+#define mget_byte(p) (*(uint8_t FAR *)(p)&0xFF)
-+#define mput_byte(c, p) *(uint8_t FAR *)(p)=(uint8_t)(c)
- #ifndef WORDS_BIGENDIAN
--#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
--#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
--#define mget_dword(p) (*(unsigned long *)(p))
--#define mput_dword(w,p) (*(unsigned long *)(p)=(unsigned long)(w))
-+#define mget_word(p) (*(uint16_t *)(p)&0xFFFF)
-+#define mput_word(w,p) (*(uint16_t *)(p)=(uint16_t)(w))
-+#define mget_dword(p) (*(uint32_t *)(p))
-+#define mput_dword(w,p) (*(uint32_t *)(p)=(uint32_t)(w))
- #endif
-
- /* Prototypes */
-@@ -31,7 +33,7 @@
- int translate_path(char *name);
- void restart_proc(char *dest);
- int search_for_extension(char *name, char *ext_list);
--unsigned long get_volfree(unsigned int increment);
-+unsigned long get_volfree(unsigned long increment);
- unsigned int check_multivolume(unsigned int increment);
- void store();
- void hollow_encode();
-@@ -61,10 +63,10 @@
- void strip_lf(char *str);
- char *ltrim(char *str);
- #ifdef WORDS_BIGENDIAN
--unsigned int mget_word(char FAR *p);
--unsigned long mget_dword(char FAR *p);
--void mput_word(unsigned int w, char FAR *p);
--void mput_dword(unsigned long d, char FAR *p);
-+uint16_t mget_word(char FAR *p);
-+uint32_t mget_dword(char FAR *p);
-+void mput_word(uint16_t w, char FAR *p);
-+void mput_dword(uint32_t d, char FAR *p);
- #endif
-
- #endif
diff --git a/archivers/arj/files/patch-environ.c b/archivers/arj/files/patch-environ.c
index f4cbb1d89387..d1bedb05e458 100644
--- a/archivers/arj/files/patch-environ.c
+++ b/archivers/arj/files/patch-environ.c
@@ -1,6 +1,6 @@
---- environ.c.orig 2010-10-28 13:11:54.000000000 -0200
-+++ environ.c 2010-10-28 13:13:10.000000000 -0200
-@@ -2058,7 +2058,7 @@
+--- environ.c.orig 2004-06-18 16:19:36 UTC
++++ environ.c
+@@ -2058,7 +2058,7 @@ FILE *file_open(char *name, char *mode)
/* ASR fix 01/10/2003 -- re-fix to handle umask 022 correctly */
if((handle=open(name, oflag, 0644))==-1)
return(NULL);
diff --git a/archivers/arj/files/patch-fardata.c b/archivers/arj/files/patch-fardata.c
index 0b9163f954f2..1ce033fd6123 100644
--- a/archivers/arj/files/patch-fardata.c
+++ b/archivers/arj/files/patch-fardata.c
@@ -1,5 +1,5 @@
---- fardata.c.orig 2010-01-18 10:06:57.000000000 -0200
-+++ fardata.c 2010-01-18 10:08:24.000000000 -0200
+--- fardata.c.orig 2004-04-17 11:39:42 UTC
++++ fardata.c
@@ -190,7 +190,7 @@ int msg_sprintf(char *str, FMSG *fmt, ..
/* Length-limited strlen() */
diff --git a/archivers/ark/files/patch-git_cd8ad27 b/archivers/ark/files/patch-git_cd8ad27
index 229d8cd202c4..058d208c0c68 100644
--- a/archivers/ark/files/patch-git_cd8ad27
+++ b/archivers/ark/files/patch-git_cd8ad27
@@ -31,7 +31,7 @@ Date: Mon Nov 24 01:37:06 2014 +0200
Conflicts:
part/part.cpp
---- app/mainwindow.cpp
+--- app/mainwindow.cpp.orig 2014-10-25 12:53:24 UTC
+++ app/mainwindow.cpp
@@ -38,6 +38,7 @@
#include <KDebug>
@@ -50,7 +50,7 @@ Date: Mon Nov 24 01:37:06 2014 +0200
delete m_part;
m_part = 0;
}
---- part/part.cpp
+--- part/part.cpp.orig 2014-10-25 12:53:24 UTC
+++ part/part.cpp
@@ -53,7 +53,6 @@
#include <KStandardGuiItem>
@@ -60,7 +60,7 @@ Date: Mon Nov 24 01:37:06 2014 +0200
#include <QAction>
#include <QCursor>
-@@ -138,8 +137,6 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList& args)
+@@ -138,8 +137,6 @@ Part::Part(QWidget *parentWidget, QObjec
Part::~Part()
{
diff --git a/archivers/atool/files/patch-configure b/archivers/atool/files/patch-configure
index 3460043639a9..c065424bc1c9 100644
--- a/archivers/atool/files/patch-configure
+++ b/archivers/atool/files/patch-configure
@@ -1,6 +1,6 @@
--- configure.orig 2012-02-21 18:14:06 UTC
+++ configure
-@@ -2261,7 +2261,7 @@
+@@ -2261,7 +2261,7 @@ fi
eval `$PERL -V:startperl`
diff --git a/archivers/bzip/files/patch-Makefile b/archivers/bzip/files/patch-Makefile
index 69b52ae7048c..071211dc6cd0 100644
--- a/archivers/bzip/files/patch-Makefile
+++ b/archivers/bzip/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sat Aug 31 09:50:33 1996
-+++ Makefile Fri Sep 27 13:57:55 1996
+--- Makefile.orig 1996-08-31 07:50:33 UTC
++++ Makefile
@@ -1,29 +1,17 @@
-
-CC = gcc
diff --git a/archivers/bzip/files/patch-bzip.c b/archivers/bzip/files/patch-bzip.c
index ea9513a90511..cba7ce00e711 100644
--- a/archivers/bzip/files/patch-bzip.c
+++ b/archivers/bzip/files/patch-bzip.c
@@ -1,4 +1,4 @@
---- bzip.c.orig 1996-08-30 20:35:28.000000000 +0000
+--- bzip.c.orig 1996-08-30 20:35:28 UTC
+++ bzip.c
@@ -114,9 +114,13 @@
--*/
diff --git a/archivers/bzip2/Makefile b/archivers/bzip2/Makefile
index efec0cf588fd..60c6eb2645ac 100644
--- a/archivers/bzip2/Makefile
+++ b/archivers/bzip2/Makefile
@@ -13,7 +13,6 @@ COMMENT= Block-sorting file compressor
USES= cpe
CPE_VENDOR= bzip
USE_LDCONFIG= yes
-PATCH_STRIP= -p3
OPTIONS_DEFINE= DOCS
diff --git a/archivers/bzip2/files/patch-Makefile b/archivers/bzip2/files/patch-Makefile
index 3cb244c9242e..59d34dd2a38c 100644
--- a/archivers/bzip2/files/patch-Makefile
+++ b/archivers/bzip2/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Tue Jan 2 22:49:21 2007
-+++ Makefile Sat Jan 27 12:02:14 2007
+--- Makefile.orig 2010-09-10 22:46:02 UTC
++++ Makefile
@@ -15,13 +15,15 @@
SHELL=/bin/sh
@@ -18,7 +18,7 @@
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
-@@ -35,10 +37,18 @@
+@@ -35,10 +37,18 @@ OBJS= blocksort.o \
decompress.o \
bzlib.o
@@ -40,7 +40,7 @@
bzip2recover: bzip2recover.o
$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
-@@ -52,6 +62,10 @@
+@@ -52,6 +62,10 @@ libbz2.a: $(OBJS)
$(RANLIB) libbz2.a ; \
fi
@@ -51,7 +51,7 @@
check: test
test: bzip2
@cat words1
-@@ -109,9 +123,25 @@
+@@ -109,10 +123,26 @@ install: bzip2 bzip2recover
echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
clean:
@@ -59,7 +59,7 @@
+ rm -f *.o *.so libbz2.a libbz2.so.1 bzip2 bzip2recover \
sample1.rb2 sample2.rb2 sample3.rb2 \
sample1.tst sample2.tst sample3.tst
-+
+
+blocksort.so: blocksort.c
+ @cat words0
+ $(CC) $(CFLAGS) $(SOFLAGS) -c blocksort.c -o blocksort.so
@@ -75,6 +75,7 @@
+ $(CC) $(CFLAGS) $(SOFLAGS) -c decompress.c -o decompress.so
+bzlib.so: bzlib.c
+ $(CC) $(CFLAGS) $(SOFLAGS) -c bzlib.c -o bzlib.so
-
++
blocksort.o: blocksort.c
@cat words0
+ $(CC) $(CFLAGS) -c blocksort.c
diff --git a/archivers/dact/files/patch-Makefile.in b/archivers/dact/files/patch-Makefile.in
index 8ff5925b635b..34b4e903adbd 100644
--- a/archivers/dact/files/patch-Makefile.in
+++ b/archivers/dact/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2006-03-25 16:15:04.000000000 +0300
-+++ Makefile.in 2015-02-25 22:26:51.000000000 +0300
-@@ -24,8 +24,8 @@
+--- Makefile.in.orig 2006-03-25 13:15:04 UTC
++++ Makefile.in
+@@ -24,8 +24,8 @@ INSTALL = @INSTALL@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -11,7 +11,7 @@
sysconfdir = @sysconfdir@
mandir = @mandir@
datadir = @datadir@
-@@ -41,13 +41,14 @@
+@@ -41,13 +41,14 @@ OBJS += dact_common.o comp_fail.o comp_p
# be kept in sync with OBJS
SHLIBOBJS += dact_common_shr.o comp_fail_shr.o comp_plain_shr.o buffer_shr.o header_shr.o sort_shr.o module_shr.o parse_shr.o dendian_shr.o crc_shr.o net_shr.o ui_shr.o sfx_shr.o libdact_shr.o @SHLIBOBJS@
ALGO = comp_snibble.c comp_delta.c comp_text.c comp_rle.c cipher_chaos.c cipher_sub.c cipher_psub.c @ALGO@
diff --git a/archivers/deutex/files/patch-src-deutex.h b/archivers/deutex/files/patch-src-deutex.h
deleted file mode 100644
index 20e713558adb..000000000000
--- a/archivers/deutex/files/patch-src-deutex.h
+++ /dev/null
@@ -1,33 +0,0 @@
---- src/deutex.h.orig 1999-12-31 07:20:22.000000000 +0800
-+++ src/deutex.h 2012-02-12 16:53:51.000000000 +0800
-@@ -31,23 +31,13 @@
- #define DeuSF for DOS .EXE Unix Linux OS/2
- *********************************************/
-
--#if defined (__alpha) /*__ALPHA__ for Alpha processor?*/
--/*long = int64 on a 64bit processor*/
--typedef char Int8;
--typedef short Int16;
--typedef int Int32;
--typedef unsigned char UInt8;
--typedef unsigned short UInt16;
--typedef unsigned int UInt32;
--#else
--/*long = Int32 on a 32 bit processor*/
--typedef char Int8;
--typedef short Int16;
--typedef long Int32;
--typedef unsigned char UInt8;
--typedef unsigned short UInt16;
--typedef unsigned long UInt32;
--#endif
-+#include <stdint.h>
-+typedef int8_t Int8;
-+typedef int16_t Int16;
-+typedef int32_t Int32;
-+typedef uint8_t UInt8;
-+typedef uint16_t UInt16;
-+typedef uint32_t UInt32;
-
- #if defined DeuTex
- #if defined DeuSF
diff --git a/archivers/deutex/files/patch-src_deutex.h b/archivers/deutex/files/patch-src_deutex.h
new file mode 100644
index 000000000000..e410fcd1e6ed
--- /dev/null
+++ b/archivers/deutex/files/patch-src_deutex.h
@@ -0,0 +1,33 @@
+--- src/deutex.h.orig 1999-12-30 23:20:22 UTC
++++ src/deutex.h
+@@ -31,23 +31,13 @@ Place, Suite 330, Boston, MA 02111-1307,
+ #define DeuSF for DOS .EXE Unix Linux OS/2
+ *********************************************/
+
+-#if defined (__alpha) /*__ALPHA__ for Alpha processor?*/
+-/*long = int64 on a 64bit processor*/
+-typedef char Int8;
+-typedef short Int16;
+-typedef int Int32;
+-typedef unsigned char UInt8;
+-typedef unsigned short UInt16;
+-typedef unsigned int UInt32;
+-#else
+-/*long = Int32 on a 32 bit processor*/
+-typedef char Int8;
+-typedef short Int16;
+-typedef long Int32;
+-typedef unsigned char UInt8;
+-typedef unsigned short UInt16;
+-typedef unsigned long UInt32;
+-#endif
++#include <stdint.h>
++typedef int8_t Int8;
++typedef int16_t Int16;
++typedef int32_t Int32;
++typedef uint8_t UInt8;
++typedef uint16_t UInt16;
++typedef uint32_t UInt32;
+
+ #if defined DeuTex
+ #if defined DeuSF
diff --git a/archivers/dpkg/files/patch-lib_compat_gettext.h b/archivers/dpkg/files/patch-lib_compat_gettext.h
index 9598958acaee..807480c33a2c 100644
--- a/archivers/dpkg/files/patch-lib_compat_gettext.h
+++ b/archivers/dpkg/files/patch-lib_compat_gettext.h
@@ -1,4 +1,4 @@
---- lib/compat/gettext.h.orig 2015-05-03 14:52:33 UTC
+--- lib/compat/gettext.h.orig 2015-11-25 21:45:14 UTC
+++ lib/compat/gettext.h
@@ -53,7 +53,6 @@
<libintl.h>, which chokes if dcgettext is defined as a macro. So include
diff --git a/archivers/dpkg/files/patch-scripts_Dpkg_Compression.pm b/archivers/dpkg/files/patch-scripts_Dpkg_Compression.pm
index ad8ce0893d9f..cad07bc2b42c 100644
--- a/archivers/dpkg/files/patch-scripts_Dpkg_Compression.pm
+++ b/archivers/dpkg/files/patch-scripts_Dpkg_Compression.pm
@@ -1,4 +1,4 @@
---- scripts/Dpkg/Compression.pm.orig 2015-06-11 20:28:56 UTC
+--- scripts/Dpkg/Compression.pm.orig 2016-07-03 19:02:23 UTC
+++ scripts/Dpkg/Compression.pm
@@ -55,7 +55,7 @@ interact with the set of supported compr
my $COMP = {
diff --git a/archivers/engrampa/files/patch-src_fr-command-lrzip.c b/archivers/engrampa/files/patch-src_fr-command-lrzip.c
index ae2d7d440482..3c17dd13d7c0 100644
--- a/archivers/engrampa/files/patch-src_fr-command-lrzip.c
+++ b/archivers/engrampa/files/patch-src_fr-command-lrzip.c
@@ -1,11 +1,11 @@
---- src/fr-command-lrzip.c.orig 2010-08-26 12:40:56.000000000 -0400
-+++ src/fr-command-lrzip.c 2010-08-26 12:41:41.000000000 -0400
+--- src/fr-command-lrzip.c.orig 2015-10-14 17:33:41 UTC
++++ src/fr-command-lrzip.c
@@ -53,7 +53,7 @@ list__process_line (char *line,
struct stat st;
- time_t tt;
+
if (stat (comm->filename, &st) == 0)
- fdata->modified = st.st_mtim.tv_sec;
+ fdata->modified = st.st_mtime;
else
time(&(fdata->modified));
- fdata->modified;
+
diff --git a/archivers/engrampa/files/patch-src_fr-command-tar.c b/archivers/engrampa/files/patch-src_fr-command-tar.c
index f80cbce7b080..8733b0399966 100644
--- a/archivers/engrampa/files/patch-src_fr-command-tar.c
+++ b/archivers/engrampa/files/patch-src_fr-command-tar.c
@@ -1,6 +1,6 @@
---- src/fr-command-tar.c.orig 2014-11-19 15:44:09.000000000 +0100
-+++ src/fr-command-tar.c 2014-12-04 18:28:31.998497849 +0100
-@@ -245,6 +245,10 @@
+--- src/fr-command-tar.c.orig 2015-10-14 17:33:41 UTC
++++ src/fr-command-tar.c
+@@ -245,6 +245,10 @@ begin_tar_command (FrCommand *comm)
g_free (command);
command = g_strdup ("/usr/sfw/bin/gtar");
}
diff --git a/archivers/engrampa/files/patch-src_fr-command-zip.c b/archivers/engrampa/files/patch-src_fr-command-zip.c
index ee9ec93de8c1..f650086b4d7c 100644
--- a/archivers/engrampa/files/patch-src_fr-command-zip.c
+++ b/archivers/engrampa/files/patch-src_fr-command-zip.c
@@ -1,5 +1,5 @@
---- src/fr-command-zip.c.orig 2010-01-02 17:02:44.000000000 -0500
-+++ src/fr-command-zip.c 2010-01-02 17:08:03.000000000 -0500
+--- src/fr-command-zip.c.orig 2015-10-14 17:33:41 UTC
++++ src/fr-command-zip.c
@@ -187,7 +187,11 @@ fr_command_zip_list (FrCommand *comm)
{
fr_process_set_out_line_func (comm->process, list__process_line, comm);
@@ -11,8 +11,8 @@
+#endif
fr_process_set_begin_func (comm->process, list__begin, comm);
fr_process_add_arg (comm->process, "-ZTs");
- fr_process_add_arg (comm->process, comm->filename);
-@@ -302,7 +306,11 @@ fr_command_zip_extract (FrCommand *comm
+ fr_process_add_arg (comm->process, "--");
+@@ -307,7 +311,11 @@ fr_command_zip_extract (FrCommand *comm
process_line__common,
comm);
@@ -24,7 +24,7 @@
if (dest_dir != NULL) {
fr_process_add_arg (comm->process, "-d");
-@@ -334,7 +342,11 @@ fr_command_zip_extract (FrCommand *comm
+@@ -341,7 +349,11 @@ fr_command_zip_extract (FrCommand *comm
static void
fr_command_zip_test (FrCommand *comm)
{
@@ -36,4 +36,4 @@
+#endif
fr_process_add_arg (comm->process, "-t");
add_password_arg (comm, comm->password);
- fr_process_add_arg (comm->process, comm->filename);
+ fr_process_add_arg (comm->process, "--");
diff --git a/archivers/file-roller/files/patch-src_fr-command-tar.c b/archivers/file-roller/files/patch-src_fr-command-tar.c
index 78843a28c6e9..c61478e72453 100644
--- a/archivers/file-roller/files/patch-src_fr-command-tar.c
+++ b/archivers/file-roller/files/patch-src_fr-command-tar.c
@@ -1,6 +1,6 @@
---- src/fr-command-tar.c.orig Sun Oct 15 12:33:56 2006
-+++ src/fr-command-tar.c Mon Oct 16 19:18:03 2006
-@@ -231,6 +231,9 @@
+--- src/fr-command-tar.c.orig 2014-08-13 05:21:20 UTC
++++ src/fr-command-tar.c
+@@ -236,6 +236,9 @@ begin_tar_command (FrCommand *comm)
#if defined (__SVR4) && defined (__sun)
if (g_file_test ("/usr/sfw/bin/gtar", G_FILE_TEST_IS_EXECUTABLE))
command = g_strdup ("/usr/sfw/bin/gtar");
diff --git a/archivers/file-roller/files/patch-src_fr-command-zip.c b/archivers/file-roller/files/patch-src_fr-command-zip.c
index 5995813eb3b6..d55515487711 100644
--- a/archivers/file-roller/files/patch-src_fr-command-zip.c
+++ b/archivers/file-roller/files/patch-src_fr-command-zip.c
@@ -1,6 +1,6 @@
---- src/fr-command-zip.c.orig 2010-11-16 08:32:18.000000000 +0000
-+++ src/fr-command-zip.c 2011-01-20 16:55:45.000000000 +0000
-@@ -186,7 +186,11 @@ fr_command_zip_list (FrCommand *comm)
+--- src/fr-command-zip.c.orig 2015-02-15 10:13:10 UTC
++++ src/fr-command-zip.c
+@@ -179,7 +179,11 @@ fr_command_zip_list (FrCommand *comm)
{
fr_process_set_out_line_func (comm->process, list__process_line, comm);
@@ -11,8 +11,8 @@
+#endif
fr_process_set_begin_func (comm->process, list__begin, comm);
fr_process_add_arg (comm->process, "-ZTs");
- fr_process_add_arg (comm->process, comm->filename);
-@@ -301,7 +305,11 @@ fr_command_zip_extract (FrCommand *comm
+ fr_process_add_arg (comm->process, "--");
+@@ -299,7 +303,11 @@ fr_command_zip_extract (FrCommand *comm
process_line__common,
comm);
@@ -34,5 +34,5 @@
fr_process_begin_command (comm->process, "unzip");
+#endif
fr_process_add_arg (comm->process, "-t");
- add_password_arg (comm, comm->password);
- fr_process_add_arg (comm->process, comm->filename);
+ add_password_arg (comm, FR_ARCHIVE (comm)->password);
+ fr_process_add_arg (comm->process, "--");
diff --git a/archivers/freeze/files/patch-Makefile.in b/archivers/freeze/files/patch-Makefile.in
index cb1a903c5805..52507b44f19c 100644
--- a/archivers/freeze/files/patch-Makefile.in
+++ b/archivers/freeze/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- ./Makefile.in.orig 1993-02-24 14:36:56.000000000 +0100
-+++ ./Makefile.in 2014-02-13 12:44:47.785972991 +0100
-@@ -18,9 +18,9 @@
+--- Makefile.in.orig 1993-02-24 13:36:56 UTC
++++ Makefile.in
+@@ -18,9 +18,9 @@ EXE =
default: prog
# Added the prefix macro, so that it was easier to change installation place.
diff --git a/archivers/freeze/files/patch-freeze.c b/archivers/freeze/files/patch-freeze.c
index e11bfc56fc92..128d63b03597 100644
--- a/archivers/freeze/files/patch-freeze.c
+++ b/archivers/freeze/files/patch-freeze.c
@@ -1,6 +1,6 @@
---- ./freeze.c.orig 1993-02-24 14:36:55.000000000 +0100
-+++ ./freeze.c 2014-02-13 12:43:34.946976981 +0100
-@@ -176,7 +176,7 @@
+--- freeze.c.orig 1993-02-24 13:36:55 UTC
++++ freeze.c
+@@ -176,7 +176,7 @@ void writeerr(), copystat(), version(
/* From compress.c. Replace .Z --> .F etc */
diff --git a/archivers/freeze/files/patch-freeze.h b/archivers/freeze/files/patch-freeze.h
index 10f052a8ab53..222843bb821d 100644
--- a/archivers/freeze/files/patch-freeze.h
+++ b/archivers/freeze/files/patch-freeze.h
@@ -1,5 +1,5 @@
---- ./freeze.h.orig 1993-02-24 14:36:58.000000000 +0100
-+++ ./freeze.h 2014-02-13 12:43:34.947977110 +0100
+--- freeze.h.orig 1993-02-24 13:36:58 UTC
++++ freeze.h
@@ -5,21 +5,6 @@
# include <sys/stdtypes.h>
#endif
diff --git a/archivers/ha/files/patch-nix_machine.c b/archivers/ha/files/patch-nix_machine.c
index 0bdd3610fb1a..735343ea7fd5 100644
--- a/archivers/ha/files/patch-nix_machine.c
+++ b/archivers/ha/files/patch-nix_machine.c
@@ -1,19 +1,11 @@
-*** nix/machine.c.bak Thu Jan 12 09:53:00 1995
---- nix/machine.c Tue Jan 24 19:38:07 1995
-***************
-*** 417,423 ****
- if (plainname!=NULL) free(plainname),plainname=NULL;
- if ((plainname=malloc(strlen(mdfullpath)+1))==NULL)
- error(1,ERR_MEM,"md_stripname()");
-! for (i=strlen(mdfullpath)-1;i>0;i--) {
- if (mdfullpath[i]=='/') {
- i++;
- break;
---- 417,423 ----
- if (plainname!=NULL) free(plainname),plainname=NULL;
- if ((plainname=malloc(strlen(mdfullpath)+1))==NULL)
- error(1,ERR_MEM,"md_stripname()");
-! for (i=strlen(mdfullpath)-1;i>=0;i--) {
- if (mdfullpath[i]=='/') {
- i++;
- break;
+--- nix/machine.c.orig 1995-01-12 06:53:00 UTC
++++ nix/machine.c
+@@ -417,7 +417,7 @@ char *md_stripname(char *mdfullpath) {
+ if (plainname!=NULL) free(plainname),plainname=NULL;
+ if ((plainname=malloc(strlen(mdfullpath)+1))==NULL)
+ error(1,ERR_MEM,"md_stripname()");
+- for (i=strlen(mdfullpath)-1;i>0;i--) {
++ for (i=strlen(mdfullpath)-1;i>=0;i--) {
+ if (mdfullpath[i]=='/') {
+ i++;
+ break;
diff --git a/archivers/hffzip/files/patch-Makefile b/archivers/hffzip/files/patch-Makefile
index 4e275885d3ee..b8b4263a1fce 100644
--- a/archivers/hffzip/files/patch-Makefile
+++ b/archivers/hffzip/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Wed Jun 11 07:59:00 2003
-+++ Makefile Wed Jun 11 08:00:47 2003
+--- Makefile.orig 2003-06-05 14:38:33 UTC
++++ Makefile
@@ -1,16 +1,19 @@
-opzioni=-O3
+CFLAGS ?= ${CFLAGS}
diff --git a/archivers/hlextract/files/patch-HLExtract-Main.c b/archivers/hlextract/files/patch-HLExtract-Main.c
index c278a81f2bd8..5775195c39a4 100644
--- a/archivers/hlextract/files/patch-HLExtract-Main.c
+++ b/archivers/hlextract/files/patch-HLExtract-Main.c
@@ -1,6 +1,5 @@
-diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
---- ../orig/HLExtract/Main.c 2011-09-17 00:41:54.000000000 -0300
-+++ ./HLExtract/Main.c 2013-02-11 18:29:02.880217165 -0200
+--- HLExtract/Main.c.orig 2016-07-26 11:59:22 UTC
++++ HLExtract/Main.c
@@ -52,7 +52,7 @@
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -10,7 +9,7 @@ diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
# define MAX_PATH PATH_MAX
# define FOREGROUND_BLUE 0x0001
-@@ -618,15 +618,15 @@
+@@ -618,15 +618,15 @@ hlVoid PrintUsage()
printf("\n");
printf("Example HLExtract usage:\n");
#ifdef _WIN32
@@ -34,7 +33,7 @@ diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
#endif
}
-@@ -657,6 +657,8 @@
+@@ -657,6 +657,8 @@ hlVoid List(FILE *pFile, HLDirectoryItem
fprintf(pFile, "%s\n", lpPath);
}
break;
@@ -43,7 +42,7 @@ diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
}
}
-@@ -843,6 +845,8 @@
+@@ -843,6 +845,8 @@ HLValidation Validate(HLDirectoryItem *p
PrintValidation(eValidation);
printf("\n");
break;
@@ -52,7 +51,7 @@ diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
}
}
else
-@@ -851,6 +855,8 @@
+@@ -851,6 +855,8 @@ HLValidation Validate(HLDirectoryItem *p
printf(" \n");
}
break;
@@ -61,7 +60,7 @@ diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
}
return eValidation;
-@@ -882,6 +888,8 @@
+@@ -882,6 +888,8 @@ hlVoid PrintAttribute(hlChar *lpPrefix,
case HL_ATTRIBUTE_STRING:
printf("%s%s: %s%s\n", lpPrefix, pAttribute->lpName, pAttribute->Value.String.lpValue, lpPostfix);
break;
@@ -70,7 +69,7 @@ diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
}
}
-@@ -1151,6 +1159,8 @@
+@@ -1151,6 +1159,8 @@ hlVoid EnterConsole(hlUInt uiPackage, hl
printf(" Size: %u B\n", hlFileGetSize(pSubItem));
printf(" Size On Disk: %u B\n", hlFileGetSizeOnDisk(pSubItem));
break;
@@ -79,4 +78,3 @@ diff -ru ../orig/HLExtract/Main.c ./HLExtract/Main.c
}
uiItemCount = hlPackageGetItemAttributeCount();
-Only in ./HLExtract: Main.c.bak
diff --git a/archivers/hpack.non-usa.only/files/patch-archive.c b/archivers/hpack.non-usa.only/files/patch-archive.c
index 31c668f04727..7d7c6bd93ae7 100644
--- a/archivers/hpack.non-usa.only/files/patch-archive.c
+++ b/archivers/hpack.non-usa.only/files/patch-archive.c
@@ -1,6 +1,6 @@
---- archive.c.orig Tue Jun 29 05:27:52 1993
-+++ archive.c Tue Dec 28 20:01:38 1999
-@@ -326,12 +326,22 @@
+--- archive.c.orig 1993-06-29 10:27:52 UTC
++++ archive.c
+@@ -326,12 +326,22 @@ BOOLEAN confirmSkip( const char *str1, c
void getFileName( char *fileName )
{
diff --git a/archivers/hpack.non-usa.only/files/patch-cli.c b/archivers/hpack.non-usa.only/files/patch-cli.c
index 92f804937070..0693258803b3 100644
--- a/archivers/hpack.non-usa.only/files/patch-cli.c
+++ b/archivers/hpack.non-usa.only/files/patch-cli.c
@@ -1,6 +1,6 @@
---- cli.c.orig Sat Sep 4 22:23:48 1993
-+++ cli.c Tue Dec 28 20:01:38 1999
-@@ -724,12 +724,18 @@
+--- cli.c.orig 1993-09-05 03:23:48 UTC
++++ cli.c
+@@ -724,12 +724,18 @@ static BOOLEAN checkStealthMode( char *a
void doConfigFile( void )
{
diff --git a/archivers/hpack.non-usa.only/files/patch-crypt_keymgmt.c b/archivers/hpack.non-usa.only/files/patch-crypt_keymgmt.c
index 689ba37f6b94..9c951c3e4b48 100644
--- a/archivers/hpack.non-usa.only/files/patch-crypt_keymgmt.c
+++ b/archivers/hpack.non-usa.only/files/patch-crypt_keymgmt.c
@@ -1,6 +1,6 @@
---- crypt/keymgmt.c.orig Tue Aug 17 16:56:14 1993
-+++ crypt/keymgmt.c Tue Dec 28 20:01:38 1999
-@@ -495,11 +495,24 @@
+--- crypt/keymgmt.c.orig 1993-08-17 21:56:14 UTC
++++ crypt/keymgmt.c
+@@ -495,11 +495,24 @@ BOOLEAN getKey( const BOOLEAN isPemKey,
FD keyFileFD, savedInFD = getInputFD();
BOOLEAN matched, firstTime = TRUE;
char *matchID, firstChar;
diff --git a/archivers/hpack.non-usa.only/files/patch-defs.h b/archivers/hpack.non-usa.only/files/patch-defs.h
index c993b1058dba..4b885846d019 100644
--- a/archivers/hpack.non-usa.only/files/patch-defs.h
+++ b/archivers/hpack.non-usa.only/files/patch-defs.h
@@ -1,6 +1,6 @@
---- defs.h.orig Mon May 31 10:17:00 1993
-+++ defs.h Tue Dec 28 20:01:38 1999
-@@ -43,7 +43,7 @@
+--- defs.h.orig 1993-05-31 15:17:00 UTC
++++ defs.h
+@@ -43,7 +43,7 @@ typedef int BOOLEAN;
/* 'inline' patch for compilers which can't handle this */
diff --git a/archivers/hpack.non-usa.only/files/patch-hpacklib.h b/archivers/hpack.non-usa.only/files/patch-hpacklib.h
index cc178b89f5d3..5779136c41fb 100644
--- a/archivers/hpack.non-usa.only/files/patch-hpacklib.h
+++ b/archivers/hpack.non-usa.only/files/patch-hpacklib.h
@@ -1,5 +1,5 @@
---- hpacklib.h.orig Thu Aug 5 04:10:40 1993
-+++ hpacklib.h Tue Dec 28 20:01:38 1999
+--- hpacklib.h.orig 1993-08-05 09:10:40 UTC
++++ hpacklib.h
@@ -26,12 +26,12 @@
#include <stdio.h> /* Prototypes for generic functions */
diff --git a/archivers/hpack.non-usa.only/files/patch-keycvt_keycvt.c b/archivers/hpack.non-usa.only/files/patch-keycvt_keycvt.c
index 2ef0a9d78471..3a601cc17dbd 100644
--- a/archivers/hpack.non-usa.only/files/patch-keycvt_keycvt.c
+++ b/archivers/hpack.non-usa.only/files/patch-keycvt_keycvt.c
@@ -1,6 +1,6 @@
---- keycvt/keycvt.c.orig Fri Aug 13 15:06:28 1993
-+++ keycvt/keycvt.c Tue Dec 28 20:01:38 1999
-@@ -582,11 +582,21 @@
+--- keycvt/keycvt.c.orig 1993-08-13 20:06:28 UTC
++++ keycvt/keycvt.c
+@@ -582,11 +582,21 @@ static void byteReverse( BYTE *regPtr, i
static void getPassword( void )
{
@@ -22,7 +22,7 @@
}
void initCrypt( void )
-@@ -1020,27 +1030,46 @@
+@@ -1020,27 +1030,46 @@ int main( const int argc, const char *ar
/* Try and find the PGP seed file */
if( ( pgpPath = getenv( "PGPPATH" ) ) == NULL )
diff --git a/archivers/hpack.non-usa.only/files/patch-keycvt_makefile b/archivers/hpack.non-usa.only/files/patch-keycvt_makefile
index 7d6de4115cda..09e76e370464 100644
--- a/archivers/hpack.non-usa.only/files/patch-keycvt_makefile
+++ b/archivers/hpack.non-usa.only/files/patch-keycvt_makefile
@@ -1,6 +1,6 @@
---- keycvt/makefile.orig Tue May 18 00:43:30 1993
-+++ keycvt/makefile Sun Jul 21 17:32:13 2002
-@@ -48,7 +48,7 @@
+--- keycvt/makefile.orig 1993-05-17 21:43:30 UTC
++++ keycvt/makefile
+@@ -48,7 +48,7 @@ DEFINES = $(OS)
PROJ = keycvt
@@ -9,7 +9,7 @@
LFLAGS = -o $(PROJ) $(CMDL) # Flags for linker
-@@ -60,6 +60,7 @@
+@@ -60,6 +60,7 @@ LD = $(CC) # Linker (just use the C
LS = ls -l # Directory command
ECHO = echo # Echo to screen command
MAKE = make # The make command
@@ -17,7 +17,7 @@
#****************************************************************************
#* *
-@@ -71,7 +72,7 @@
+@@ -71,7 +72,7 @@ default:
@$(ECHO)
@$(ECHO) "To create KEYCVT you have to enter the Unix system type you want to build"
@$(ECHO) "KEYCVT for. Possible options are: aix (RS6000), aix370, aix386, convex,"
@@ -26,16 +26,16 @@
@$(ECHO) "(Ultrix 3.x or earlier), and uts4. If none of the above fit, try"
@$(ECHO) "'make generic', and send a copy of any changes necessary to the author,"
@$(ECHO) "pgut1@cs.aukuni.ac.nz"
-@@ -128,6 +129,12 @@
-
+@@ -129,6 +130,12 @@ aix386:
convex:
@$(MAKE) keycvt CC="cc"
-+
+
+freebsd:
+ @$(MAKE) $(PROJ)
+
+freebsd.install:
+ $(BSD_INSTALL_PROGRAM) $(PROJ) $(PREFIX)/bin
-
++
# Generic: Generic BSD-ish system running gcc. Can't continue, we really
# need user intervention here.
+
diff --git a/archivers/hpack.non-usa.only/files/patch-language_language.c b/archivers/hpack.non-usa.only/files/patch-language_language.c
index c4d33be961a9..c052f184d3ad 100644
--- a/archivers/hpack.non-usa.only/files/patch-language_language.c
+++ b/archivers/hpack.non-usa.only/files/patch-language_language.c
@@ -1,6 +1,6 @@
---- language/language.c.orig Wed Sep 22 21:23:20 1993
-+++ language/language.c Tue Dec 28 20:01:38 1999
-@@ -188,7 +188,7 @@
+--- language/language.c.orig 1993-09-23 02:23:20 UTC
++++ language/language.c
+@@ -188,7 +188,7 @@ void showHelp( void )
/* Process user response */
response = hgetch();
response = toupper( response ); /* Damn macros */
@@ -9,7 +9,7 @@
if( response == RESPONSE_QUIT )
return;
lineNo -= ( response == ' ' ) ? screenHeight : 1;
-@@ -268,6 +268,9 @@
+@@ -268,6 +268,9 @@ int initMessages( const char *path, cons
if( ( inFD = hopen( fileNamePtr, O_RDONLY | S_DENYWR | A_RANDSEQ ) ) == ERROR )
return( ERROR );
#elif defined( __UNIX__ )
@@ -19,7 +19,7 @@
/* Build path to language file and try and process it */
fileNamePtr = getFirstKeyPath( getenv( "PATH" ), DATA_FILENAME );
while( fileNamePtr != NULL )
-@@ -290,6 +293,9 @@
+@@ -290,6 +293,9 @@ int initMessages( const char *path, cons
return( ERROR ); /* Couldn't find/open input file */
}
#endif /* System-specific handling of how to find language defn.file */
diff --git a/archivers/hpack.non-usa.only/files/patch-system.h b/archivers/hpack.non-usa.only/files/patch-system.h
index 5988653572d8..91bba18dd6d5 100644
--- a/archivers/hpack.non-usa.only/files/patch-system.h
+++ b/archivers/hpack.non-usa.only/files/patch-system.h
@@ -1,6 +1,6 @@
---- system.h.orig Fri Aug 27 12:16:40 1993
-+++ system.h Tue Dec 28 20:01:38 1999
-@@ -788,7 +788,10 @@
+--- system.h.orig 1993-08-27 17:16:40 UTC
++++ system.h
+@@ -788,7 +788,10 @@ void strlwr( char *string );
#elif defined( CONVEX )
#define MAX_PATH ( _POSIX_PATH_MAX + 1 )
#define MAX_FILENAME ( 254 + 1 )
@@ -12,7 +12,7 @@
#define MAX_PATH ( _POSIX_PATH_MAX + 1 )
#define MAX_FILENAME ( NAME_MAX + 1 )
#elif defined( SVR4 )
-@@ -875,7 +878,8 @@
+@@ -875,7 +878,8 @@ typedef struct {
#if defined( AIX ) || defined( AIX386 ) || defined( AIX370 ) || \
defined( BSD386 ) || defined( GENERIC ) || defined( HPUX ) || \
defined( IRIX ) || defined( NEXT ) || defined( OSF1 ) || \
@@ -22,7 +22,7 @@
#define SPACE_OK TRUE
#else
#define SPACE_OK FALSE
-@@ -948,6 +952,13 @@
+@@ -948,6 +952,13 @@ typedef struct {
#elif defined( UTS4 ) /* Amdahl UTS4 */
#define NEED_STRLWR
#define NEED_STRICMP
diff --git a/archivers/hpack.non-usa.only/files/patch-system_unix.c b/archivers/hpack.non-usa.only/files/patch-system_unix.c
index 0e67e42e5cb6..bedab817934e 100644
--- a/archivers/hpack.non-usa.only/files/patch-system_unix.c
+++ b/archivers/hpack.non-usa.only/files/patch-system_unix.c
@@ -1,6 +1,6 @@
---- system/unix.c.orig Fri Aug 27 12:20:56 1993
-+++ system/unix.c Tue Dec 28 20:01:38 1999
-@@ -123,7 +123,7 @@
+--- system/unix.c.orig 1993-08-27 17:20:56 UTC
++++ system/unix.c
+@@ -123,7 +123,7 @@ static int randomBufferPos = 0;
#if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \
defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \
@@ -9,7 +9,7 @@
#include <termios.h>
-@@ -144,7 +144,7 @@
+@@ -144,7 +144,7 @@ int hgetch( void )
tcgetattr( ttyFD, &ttyInfo );
#if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \
defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \
@@ -18,7 +18,7 @@
ttyInfo.c_lflag &= ~ECHO;
ttyInfo.c_lflag &= ~ICANON;
#else
-@@ -183,7 +183,7 @@
+@@ -183,7 +183,7 @@ int hgetch( void )
tcgetattr( ttyFD, &ttyInfo );
#if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \
defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \
@@ -27,7 +27,7 @@
ttyInfo.c_lflag |= ECHO;
ttyInfo.c_lflag |= ICANON;
#else
-@@ -728,7 +728,7 @@
+@@ -728,7 +728,7 @@ int getCountry( void )
defined( HPUX ) || defined( IRIX ) || defined( LINUX ) || \
defined( NEXT ) || defined( OSF1 ) || defined( SUNOS ) || \
defined( SVR4 ) || defined( ULTRIX ) || defined( ULTRIX_OLD ) || \
diff --git a/archivers/lbzip2/files/patch-Makefile b/archivers/lbzip2/files/patch-Makefile
index c0ff177ee3de..2d1b1c5ccb51 100644
--- a/archivers/lbzip2/files/patch-Makefile
+++ b/archivers/lbzip2/files/patch-Makefile
@@ -1,18 +1,18 @@
---- Makefile.orig 2009-01-25 18:27:52.000000000 +0100
-+++ Makefile 2009-02-07 18:56:15.000000000 +0100
+--- Makefile.orig 2009-04-03 22:33:49 UTC
++++ Makefile
@@ -1,15 +1,10 @@
- # Makefile,v 1.8 2009-01-25 17:27:52 lacos Exp
+ # Makefile,v 1.9 2009/04/03 22:33:49 lacos Exp
.POSIX:
-CC=gcc
-CFLAGS=$$($(SHELL) lfs.sh CFLAGS) -D _XOPEN_SOURCE=500 -pipe -ansi -pedantic \
- -O2
-+LDFLAGS+= -s
-+LIBS+= -l pthread -l bz2
-
-
-
-
++LDFLAGS+= -s
++LIBS+= -l pthread -l bz2
+
-LDFLAGS=-s $$($(SHELL) lfs.sh LDFLAGS)
-LIBS=-l pthread -l bz2 $$($(SHELL) lfs.sh LIBS)
+all: lbzip2
diff --git a/archivers/lha-ac/files/patch-lha.h b/archivers/lha-ac/files/patch-lha.h
deleted file mode 100644
index 56cf5ba4b970..000000000000
--- a/archivers/lha-ac/files/patch-lha.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/lha.h.orig Sun Sep 21 15:58:52 2003
-+++ src/lha.h Thu Sep 23 07:10:33 2004
-@@ -16,6 +16,7 @@
- #endif
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <errno.h>
- #include <ctype.h>
- #include <sys/types.h>
diff --git a/archivers/lha-ac/files/patch-src_lha.h b/archivers/lha-ac/files/patch-src_lha.h
new file mode 100644
index 000000000000..808692bab78c
--- /dev/null
+++ b/archivers/lha-ac/files/patch-src_lha.h
@@ -0,0 +1,10 @@
+--- src/lha.h.orig 2006-10-10 16:27:51 UTC
++++ src/lha.h
+@@ -16,6 +16,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <errno.h>
+ #include <ctype.h>
+ #include <sys/types.h>
diff --git a/archivers/libarc/files/patch-Makefile b/archivers/libarc/files/patch-Makefile
index 6601419ad2df..50787c4184f1 100644
--- a/archivers/libarc/files/patch-Makefile
+++ b/archivers/libarc/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile Tue Jun 13 07:21:19 2000
-+++ Makefile Tue Jun 20 17:44:24 2000
-@@ -14,20 +15,30 @@
+--- Makefile.orig 2000-06-13 04:21:19 UTC
++++ Makefile
+@@ -14,23 +14,33 @@ OBJS = inflate.o url.o url_file.o url_in
url_hqxdecode.o url_qsdecode.o url_news.o url_newsgroup.o url_cgiesc.o \
arc_mime.o
@@ -36,3 +36,6 @@
+
+.c.so:
+ $(CC) $(CFLAGS) -fPIC -fpic -DPIC -c $(.IMPSRC) -o $(.TARGET)
+ install::
+ test -d $(PREFIX)/lib || mkdir -p $(PREFIX)/lib
+ $(INSTALL) -m 444 $(LIB) $(PREFIX)/lib
diff --git a/archivers/libcabinet/files/patch-Makefile b/archivers/libcabinet/files/patch-Makefile
index 01e67ad0e9fc..cdf7152ad4fc 100644
--- a/archivers/libcabinet/files/patch-Makefile
+++ b/archivers/libcabinet/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Tue Aug 19 18:15:11 2003
-+++ Makefile Tue Aug 19 18:33:06 2003
+--- Makefile.orig 2016-07-26 12:03:27 UTC
++++ Makefile
@@ -0,0 +1,16 @@
+NO_PROFILE= true
+CXXFLAGS+= -Wno-deprecated
diff --git a/archivers/libcabinet/files/patch-bstring.cpp b/archivers/libcabinet/files/patch-bstring.cpp
index c4f88c8138f2..b37512ddc7b3 100644
--- a/archivers/libcabinet/files/patch-bstring.cpp
+++ b/archivers/libcabinet/files/patch-bstring.cpp
@@ -1,5 +1,5 @@
---- bstring.cpp.orig 2014-07-27 11:17:34.000000000 -0400
-+++ bstring.cpp 2014-07-27 11:17:37.000000000 -0400
+--- bstring.cpp.orig 1999-10-24 11:29:53 UTC
++++ bstring.cpp
@@ -15,7 +15,7 @@
#include "bstring.h"
@@ -9,7 +9,7 @@
///////////////////////////////////////***************************************
-@@ -91,7 +91,7 @@
+@@ -91,7 +91,7 @@ b_string& b_string::operator += (const c
b_string b_string::operator + (const char* s)
{
@@ -18,7 +18,7 @@
return temp += s;
}
-@@ -150,7 +150,7 @@
+@@ -150,7 +150,7 @@ b_string& b_string::StpCpy(const char* s
if(strlen(str) < strlen(s)) // If more memory is needed
*this = s; // Use assign function
else // If stpcpy can be used
@@ -27,7 +27,7 @@
}
return *this; // Return a refrence to this object
-@@ -217,4 +217,4 @@
+@@ -217,4 +217,4 @@ istream& operator >> (istream& input, b_
//*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
diff --git a/archivers/libcabinet/files/patch-bstring.h b/archivers/libcabinet/files/patch-bstring.h
index 77047321f149..ff19e14260b7 100644
--- a/archivers/libcabinet/files/patch-bstring.h
+++ b/archivers/libcabinet/files/patch-bstring.h
@@ -1,5 +1,5 @@
---- bstring.h.orig 1999-10-24 07:29:53.000000000 -0400
-+++ bstring.h 2014-02-21 16:09:56.194556928 -0500
+--- bstring.h.orig 1999-10-24 11:29:53 UTC
++++ bstring.h
@@ -21,13 +21,15 @@
#ifndef __BSTRING_HPP__
#define __BSTRING_HPP__
diff --git a/archivers/libcabinet/files/patch-cfcreate.cpp b/archivers/libcabinet/files/patch-cfcreate.cpp
index 029861262d78..2dd4b65325d6 100644
--- a/archivers/libcabinet/files/patch-cfcreate.cpp
+++ b/archivers/libcabinet/files/patch-cfcreate.cpp
@@ -1,5 +1,5 @@
---- cfcreate.cpp.orig 1999-10-24 07:29:53.000000000 -0400
-+++ cfcreate.cpp 2014-02-21 15:48:26.812268415 -0500
+--- cfcreate.cpp.orig 1999-10-24 11:29:53 UTC
++++ cfcreate.cpp
@@ -29,6 +29,10 @@
#include <unistd.h>
#endif
@@ -11,7 +11,7 @@
///////////////////////////////////////***************************************
int cfc_fileinfo::write_entry(ostream& out)
-@@ -129,7 +133,7 @@
+@@ -129,7 +133,7 @@ int cfc_folderinfo::add_file(const char*
}
}
@@ -20,7 +20,7 @@
#ifndef unix
if(getftime(in.rdbuf()->fd(), &datetime) != 0) return GETTIME_FAILURE;
#endif
-@@ -194,7 +198,7 @@
+@@ -194,7 +198,7 @@ int cfc_folderinfo::read_block(istream&
unprocessed_data = NULL; // Reset buffer holder
unprocessed_data_len = 0u;
@@ -29,7 +29,7 @@
{
delete[] buf;
buf = NULL;
-@@ -272,7 +276,7 @@
+@@ -272,7 +276,7 @@ int cfc_folderinfo::process_block(const
return WRITE_ERROR;
}
diff --git a/archivers/libcabinet/files/patch-cfcreate.h b/archivers/libcabinet/files/patch-cfcreate.h
index 023e4a6b9602..de0dc7e5ed41 100644
--- a/archivers/libcabinet/files/patch-cfcreate.h
+++ b/archivers/libcabinet/files/patch-cfcreate.h
@@ -1,5 +1,5 @@
---- cfcreate.h.orig 1999-10-24 07:29:53.000000000 -0400
-+++ cfcreate.h 2014-02-21 15:47:18.116272433 -0500
+--- cfcreate.h.orig 1999-10-24 11:29:53 UTC
++++ cfcreate.h
@@ -20,6 +20,8 @@
#include "cffile.h"
#include "zlib.h"
@@ -9,7 +9,7 @@
#ifdef unix
#include <unistd.h>
#endif
-@@ -211,7 +213,7 @@
+@@ -211,7 +213,7 @@ class cfc_folderinfo : public ObjectBase
int process_block(const byte* data, word datalen);
int read_block(istream& in, byte* &buf, int& bytesread);
int compress_block(byte* &dest, word &destlen, byte* src, word srclen);
diff --git a/archivers/libcabinet/files/patch-cfdblock.cpp b/archivers/libcabinet/files/patch-cfdblock.cpp
index 63e1ebde2a80..b11eb74a96db 100644
--- a/archivers/libcabinet/files/patch-cfdblock.cpp
+++ b/archivers/libcabinet/files/patch-cfdblock.cpp
@@ -1,5 +1,5 @@
---- cfdblock.cpp.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cfdblock.cpp 2014-02-21 15:49:13.695264850 -0500
+--- cfdblock.cpp.orig 1999-10-24 06:13:29 UTC
++++ cfdblock.cpp
@@ -17,7 +17,7 @@
#ifndef __CFDBLOCK_CPP__
#define __CFDBLOCK_CPP__
@@ -9,7 +9,7 @@
#include "cftypes.h"
#include "cfdblock.h"
#include "cfheader.h"
-@@ -124,7 +124,7 @@
+@@ -124,7 +124,7 @@ int cabinet_datablock::read(istream& in,
ra_size = cab_header.get_datablock_ra_size();
reserved_area = new byte[ra_size];
@@ -18,7 +18,7 @@
{
return (in.fail()) ? READ_ERROR : UNEXPECTED_EOF;
}
-@@ -154,7 +154,7 @@
+@@ -154,7 +154,7 @@ int cabinet_datablock::write(ostream& ou
if(ra_size) // If reserve area, write it
{
diff --git a/archivers/libcabinet/files/patch-cfdblock.h b/archivers/libcabinet/files/patch-cfdblock.h
index 05fa803caccd..7de70e3720fb 100644
--- a/archivers/libcabinet/files/patch-cfdblock.h
+++ b/archivers/libcabinet/files/patch-cfdblock.h
@@ -1,5 +1,5 @@
---- cfdblock.h.orig 2014-02-21 15:49:53.526262379 -0500
-+++ cfdblock.h 2014-02-21 15:50:02.511261600 -0500
+--- cfdblock.h.orig 1999-10-24 06:13:29 UTC
++++ cfdblock.h
@@ -14,7 +14,7 @@
#ifndef __CFDBLOCK_H__
#define __CFDBLOCK_H__
diff --git a/archivers/libcabinet/files/patch-cffdrmgr.cpp b/archivers/libcabinet/files/patch-cffdrmgr.cpp
index 88210e589287..a592124c1f34 100644
--- a/archivers/libcabinet/files/patch-cffdrmgr.cpp
+++ b/archivers/libcabinet/files/patch-cffdrmgr.cpp
@@ -1,5 +1,5 @@
---- cffdrmgr.cpp.orig 2014-02-21 15:50:45.048258834 -0500
-+++ cffdrmgr.cpp 2014-02-21 15:50:53.033257685 -0500
+--- cffdrmgr.cpp.orig 1999-10-24 11:29:53 UTC
++++ cffdrmgr.cpp
@@ -12,7 +12,7 @@
#ifndef __CFFDRMGR_CPP__
#define __CFFDRMGR_CPP__
diff --git a/archivers/libcabinet/files/patch-cffdrmgr.h b/archivers/libcabinet/files/patch-cffdrmgr.h
index 5d44fcd11ad5..9c879ee68c8e 100644
--- a/archivers/libcabinet/files/patch-cffdrmgr.h
+++ b/archivers/libcabinet/files/patch-cffdrmgr.h
@@ -1,5 +1,5 @@
---- cffdrmgr.h.orig 2014-02-21 15:51:05.912257936 -0500
-+++ cffdrmgr.h 2014-02-21 15:51:13.426256130 -0500
+--- cffdrmgr.h.orig 1999-10-24 06:13:29 UTC
++++ cffdrmgr.h
@@ -9,7 +9,7 @@
#ifndef __CFFDRMGR_H__
#define __CFFDRMGR_H__
diff --git a/archivers/libcabinet/files/patch-cffile.cpp b/archivers/libcabinet/files/patch-cffile.cpp
index 4ccda8e072fe..b9c2414d93df 100644
--- a/archivers/libcabinet/files/patch-cffile.cpp
+++ b/archivers/libcabinet/files/patch-cffile.cpp
@@ -1,5 +1,5 @@
---- cffile.cpp.orig 2014-02-21 15:52:54.235249989 -0500
-+++ cffile.cpp 2014-02-21 15:53:02.965814752 -0500
+--- cffile.cpp.orig 1999-10-24 06:13:29 UTC
++++ cffile.cpp
@@ -17,7 +17,7 @@
#ifndef __CFFILE_CPP__
#define __CFFILE_CPP__
diff --git a/archivers/libcabinet/files/patch-cffile.h b/archivers/libcabinet/files/patch-cffile.h
index 6bbe343a01e8..9be0bb42337f 100644
--- a/archivers/libcabinet/files/patch-cffile.h
+++ b/archivers/libcabinet/files/patch-cffile.h
@@ -1,5 +1,5 @@
---- cffile.h.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cffile.h 2014-02-21 16:12:05.824389036 -0500
+--- cffile.h.orig 1999-10-24 06:13:29 UTC
++++ cffile.h
@@ -15,7 +15,7 @@
#define __CFFILE_H__
@@ -9,7 +9,7 @@
#include "bstring.h"
#include "cftypes.h"
-@@ -161,4 +161,4 @@
+@@ -161,4 +161,4 @@ class cabinet_file_header : public cabin
////////////////////////////////////////////////////////////////////////////////
diff --git a/archivers/libcabinet/files/patch-cffolder.cpp b/archivers/libcabinet/files/patch-cffolder.cpp
index 8eed0dea64a9..d9b15c0fbb17 100644
--- a/archivers/libcabinet/files/patch-cffolder.cpp
+++ b/archivers/libcabinet/files/patch-cffolder.cpp
@@ -1,5 +1,5 @@
---- cffolder.cpp.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cffolder.cpp 2014-02-21 15:53:49.255245183 -0500
+--- cffolder.cpp.orig 1999-10-24 06:13:29 UTC
++++ cffolder.cpp
@@ -17,7 +17,7 @@
#ifndef __CFFOLDER_CPP__
#define __CFFOLDER_CPP__
@@ -9,7 +9,7 @@
#include "cftypes.h"
#include "cfheader.h"
#include "cffolder.h"
-@@ -70,7 +70,7 @@
+@@ -70,7 +70,7 @@ Error cabinet_folder_header::read(istrea
ra_size = cab_header.get_folder_ra_size();
reserved_area = new byte[ra_size];
@@ -18,7 +18,7 @@
{
return (in.fail()) ? READ_ERROR : UNEXPECTED_EOF;
}
-@@ -90,7 +90,7 @@
+@@ -90,7 +90,7 @@ Error cabinet_folder_header::write(ostre
if(ra_size) // If reserved area present
{
diff --git a/archivers/libcabinet/files/patch-cffolder.h b/archivers/libcabinet/files/patch-cffolder.h
index 8aeac9d936e2..513bbdebaba0 100644
--- a/archivers/libcabinet/files/patch-cffolder.h
+++ b/archivers/libcabinet/files/patch-cffolder.h
@@ -1,5 +1,5 @@
---- cffolder.h.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cffolder.h 2014-02-21 15:52:05.724747639 -0500
+--- cffolder.h.orig 1999-10-24 06:13:29 UTC
++++ cffolder.h
@@ -15,7 +15,7 @@
#define __CFFOLDER_H__
@@ -9,7 +9,7 @@
#include "cftypes.h"
#include "cfheader.h"
-@@ -89,4 +89,5 @@
+@@ -89,4 +89,5 @@ class cabinet_folder_header : public cab
////////////////////////////////////////////////////////////////////////////////
diff --git a/archivers/libcabinet/files/patch-cfheader.cpp b/archivers/libcabinet/files/patch-cfheader.cpp
index 4d026b5e760a..ffa18a9dbde2 100644
--- a/archivers/libcabinet/files/patch-cfheader.cpp
+++ b/archivers/libcabinet/files/patch-cfheader.cpp
@@ -1,5 +1,5 @@
---- cfheader.cpp.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cfheader.cpp 2014-02-21 16:02:37.285291121 -0500
+--- cfheader.cpp.orig 1999-10-24 06:13:29 UTC
++++ cfheader.cpp
@@ -18,17 +18,23 @@
#define __CFHEADER_CPP__
@@ -26,7 +26,7 @@
////////////////////////////////////////****************************************
// Initializes a valid fixed cabinet header
-@@ -127,7 +133,7 @@
+@@ -127,7 +133,7 @@ Error cabinet_header::read(istream& in)
{
reserved_area = new byte[cabinet_ra_size];
@@ -35,7 +35,7 @@
{
return (in.fail()) ? READ_ERROR : UNEXPECTED_EOF;
}
-@@ -172,7 +178,7 @@
+@@ -172,7 +178,7 @@ Error cabinet_header::write(ostream& out
if(cabinet_ra_size > 0) // If has cabinet reserved area
{
@@ -44,7 +44,7 @@
{
return WRITE_ERROR;
}
-@@ -210,4 +216,4 @@
+@@ -210,4 +216,4 @@ Error cabinet_header::write(ostream& out
////////////////////////////////////////****************************************
diff --git a/archivers/libcabinet/files/patch-cfheader.h b/archivers/libcabinet/files/patch-cfheader.h
index 9baa26596835..c794c265e38c 100644
--- a/archivers/libcabinet/files/patch-cfheader.h
+++ b/archivers/libcabinet/files/patch-cfheader.h
@@ -1,5 +1,5 @@
---- cfheader.h.orig 2014-02-21 15:42:52.379291286 -0500
-+++ cfheader.h 2014-02-21 16:02:51.918208148 -0500
+--- cfheader.h.orig 1999-10-24 06:13:29 UTC
++++ cfheader.h
@@ -15,10 +15,12 @@
#define __CFHEADER_H__
diff --git a/archivers/libcabinet/files/patch-cfreader.cpp b/archivers/libcabinet/files/patch-cfreader.cpp
index e68813fdf8a1..bebea6172356 100644
--- a/archivers/libcabinet/files/patch-cfreader.cpp
+++ b/archivers/libcabinet/files/patch-cfreader.cpp
@@ -1,5 +1,5 @@
---- cfreader.cpp.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cfreader.cpp 2014-02-21 15:55:15.698239494 -0500
+--- cfreader.cpp.orig 1999-10-24 06:13:29 UTC
++++ cfreader.cpp
@@ -22,7 +22,7 @@
#include <errno.h>
#include <stdlib.h>
diff --git a/archivers/libcabinet/files/patch-cfreader.h b/archivers/libcabinet/files/patch-cfreader.h
index 1dba9a5085b8..af8c9703b4e3 100644
--- a/archivers/libcabinet/files/patch-cfreader.h
+++ b/archivers/libcabinet/files/patch-cfreader.h
@@ -1,5 +1,5 @@
---- cfreader.h.orig 2014-02-21 16:11:11.770180090 -0500
-+++ cfreader.h 2014-02-21 16:10:41.259844074 -0500
+--- cfreader.h.orig 1999-10-24 06:13:29 UTC
++++ cfreader.h
@@ -11,7 +11,7 @@
#ifndef __CFREADER_H__
#define __CFREADER_H__
diff --git a/archivers/libcabinet/files/patch-cftypes.cpp b/archivers/libcabinet/files/patch-cftypes.cpp
index 437a41632e84..c3285a7b4951 100644
--- a/archivers/libcabinet/files/patch-cftypes.cpp
+++ b/archivers/libcabinet/files/patch-cftypes.cpp
@@ -1,5 +1,5 @@
---- cftypes.cpp.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cftypes.cpp 2014-02-21 16:06:43.971192116 -0500
+--- cftypes.cpp.orig 1999-10-24 06:13:29 UTC
++++ cftypes.cpp
@@ -10,11 +10,20 @@
#ifndef __CFTYPES_CPP__
#define __CFTYPES_CPP__
@@ -23,7 +23,7 @@
/******************************************************************************/
int convert_z_error_code(int code)
-@@ -138,15 +147,20 @@
+@@ -138,15 +147,20 @@ const char* get_cabinet_error_string(int
int io_read(istream& in, byte* buf, word len)
{
@@ -49,7 +49,7 @@
? (in.fail()) ? READ_ERROR : UNEXPECTED_EOF : OK;
}
-@@ -154,14 +168,19 @@
+@@ -154,14 +168,19 @@ int io_read(istream& in, byte* buf, word
int io_write(ostream& out, const byte* buf, word len)
{
diff --git a/archivers/libcabinet/files/patch-cftypes.h b/archivers/libcabinet/files/patch-cftypes.h
index dd814b0dfab1..0c393d281208 100644
--- a/archivers/libcabinet/files/patch-cftypes.h
+++ b/archivers/libcabinet/files/patch-cftypes.h
@@ -1,5 +1,5 @@
---- cftypes.h.orig 1999-10-24 02:13:29.000000000 -0400
-+++ cftypes.h 2014-02-21 15:42:11.491293648 -0500
+--- cftypes.h.orig 1999-10-24 06:13:29 UTC
++++ cftypes.h
@@ -16,7 +16,10 @@
#ifndef __CFTYPES_H__
#define __CFTYPES_H__
diff --git a/archivers/libcabinet/files/patch-darray.h b/archivers/libcabinet/files/patch-darray.h
index 2e28f3f879f1..3687c2748494 100644
--- a/archivers/libcabinet/files/patch-darray.h
+++ b/archivers/libcabinet/files/patch-darray.h
@@ -1,6 +1,6 @@
---- darray.h.orig Sun Aug 31 05:55:31 2003
-+++ darray.h Sun Aug 31 05:55:32 2003
-@@ -155,4 +155,4 @@
+--- darray.h.orig 1999-10-24 11:29:53 UTC
++++ darray.h
+@@ -155,4 +155,4 @@ void dynamic_array<ObjectType>::reset(si
///////////////////////////////////////***************************************
diff --git a/archivers/libcabinet/files/patch-listcab.cpp b/archivers/libcabinet/files/patch-listcab.cpp
index b8c491785904..c46f051b7ae8 100644
--- a/archivers/libcabinet/files/patch-listcab.cpp
+++ b/archivers/libcabinet/files/patch-listcab.cpp
@@ -1,5 +1,5 @@
---- listcab.cpp.orig 1999-10-24 08:11:38.000000000 -0400
-+++ listcab.cpp 2014-02-21 16:14:29.246853465 -0500
+--- listcab.cpp.orig 1999-10-24 12:11:38 UTC
++++ listcab.cpp
@@ -8,8 +8,8 @@
#include <stdio.h>
#include <string.h>
@@ -22,7 +22,7 @@
////////////////////////////////////////****************************************
void display_header_info(cabinet_header& cfh);
-@@ -47,13 +51,19 @@
+@@ -47,13 +51,19 @@ int main(int argc, char *argv[])
cerr << "New Folder Error: " << retval << endl;
return 1;
}
@@ -46,7 +46,7 @@
if((retval = cab.add_file(filename)) != OK)
{
perror("read");
-@@ -62,10 +72,13 @@
+@@ -62,10 +72,13 @@ int main(int argc, char *argv[])
return 1;
}
}
diff --git a/archivers/libcomprex/files/patch-configure b/archivers/libcomprex/files/patch-configure
index e89ad6403c2e..1e0f894717fc 100644
--- a/archivers/libcomprex/files/patch-configure
+++ b/archivers/libcomprex/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2003-03-06 07:31:05.000000000 +0300
-+++ configure 2009-11-04 07:04:24.000000000 +0300
-@@ -9263,7 +9263,7 @@
+--- configure.orig 2003-03-06 04:31:05 UTC
++++ configure
+@@ -9263,7 +9263,7 @@ if test "x$static_scheme_curl" = "xyes";
extern_scheme_init="$extern_scheme_init CxSchemeOps *init_curl_scheme_module(void);"
load_scheme_mod="$load_scheme_mod init_curl_scheme_module();"
else
diff --git a/archivers/libcomprex/files/patch-header.c b/archivers/libcomprex/files/patch-header.c
deleted file mode 100644
index 5a6fd4b4c673..000000000000
--- a/archivers/libcomprex/files/patch-header.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- modules/archive/zip/header.c.orig Sun Aug 15 18:08:32 2004
-+++ modules/archive/zip/header.c Sun Aug 15 18:08:34 2004
-@@ -25,7 +25,7 @@
- #include "zip.h"
-
-
--ZipStatus
-+CxStatus
- cxZipReadLocalHeader(ZipLocalHeader *header, CxFP *fp)
- {
- char buffer[ZIP_LOCAL_HEADER_SIZE];
diff --git a/archivers/libcomprex/files/patch-modules_archive_zip_header.c b/archivers/libcomprex/files/patch-modules_archive_zip_header.c
new file mode 100644
index 000000000000..f138702ea211
--- /dev/null
+++ b/archivers/libcomprex/files/patch-modules_archive_zip_header.c
@@ -0,0 +1,11 @@
+--- modules/archive/zip/header.c.orig 2003-01-01 06:22:34 UTC
++++ modules/archive/zip/header.c
+@@ -25,7 +25,7 @@
+ #include "zip.h"
+
+
+-ZipStatus
++CxStatus
+ cxZipReadLocalHeader(ZipLocalHeader *header, CxFP *fp)
+ {
+ char buffer[ZIP_LOCAL_HEADER_SIZE];
diff --git a/archivers/libcomprex/files/patch-tests__extractarchive.c b/archivers/libcomprex/files/patch-tests__extractarchive.c
index 559dcb67af68..8cf7bd09640a 100644
--- a/archivers/libcomprex/files/patch-tests__extractarchive.c
+++ b/archivers/libcomprex/files/patch-tests__extractarchive.c
@@ -1,5 +1,5 @@
---- tests/extractarchive.c.orig Fri Dec 20 08:03:40 2002
-+++ tests/extractarchive.c Mon Jun 23 13:16:14 2003
+--- tests/extractarchive.c.orig 2002-12-19 23:03:40 UTC
++++ tests/extractarchive.c
@@ -37,7 +37,9 @@
void
__extractprogress(CxArchive *archive, CxFile *file, size_t onFile, size_t fileCount)
diff --git a/archivers/liblzxcomp/files/patch-lz__nonslide.c b/archivers/liblzxcomp/files/patch-lz__nonslide.c
new file mode 100644
index 000000000000..a44a9f2b67c2
--- /dev/null
+++ b/archivers/liblzxcomp/files/patch-lz__nonslide.c
@@ -0,0 +1,15 @@
+--- lz_nonslide.c.orig 2005-07-06 02:17:46 UTC
++++ lz_nonslide.c
+@@ -19,10 +19,11 @@
+ /*
+ * Document here
+ */
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <assert.h>
+-#include <strings.h>
++#include <string.h>
+ #ifdef DEBUG_PERF
+ #include <sys/time.h>
+ #include <sys/resource.h>
diff --git a/archivers/liblzxcomp/files/patch-lz_nonslide.c b/archivers/liblzxcomp/files/patch-lz_nonslide.c
deleted file mode 100644
index 339cb29f2737..000000000000
--- a/archivers/liblzxcomp/files/patch-lz_nonslide.c
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: lz_nonslide.c
-@@ -19,10 +19,11 @@
- /*
- * Document here
- */
-+#include <sys/types.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <assert.h>
--#include <strings.h>
-+#include <string.h>
- #ifdef DEBUG_PERF
- #include <sys/time.h>
- #include <sys/resource.h>
diff --git a/archivers/liborange/files/patch-inno.h b/archivers/liborange/files/patch-inno.h
deleted file mode 100644
index e34969a54f5e..000000000000
--- a/archivers/liborange/files/patch-inno.h
+++ /dev/null
@@ -1,49 +0,0 @@
---- lib/inno.h.orig 2008-05-22 15:55:23.000000000 +1000
-+++ lib/inno.h 2008-05-22 15:57:49.000000000 +1000
-@@ -3,7 +3,7 @@
- #define __inno_h__
-
- #include <stdbool.h>
--#include <stdint.h>
-+#include <inttypes.h>
- #include <stdio.h>
- #include <zlib.h>
-
-@@ -99,7 +99,7 @@
- uint32_t NumUninstallDeleteEntries;
- uint32_t NumRunEntries;
- uint32_t NumUninstallRunEntries;
-- P uint8_t stuff[0x35];
-+ uint8_t P stuff[0x35];
- } TSetupHeader;
-
- #define SETUP_HEADER_SIZE 0xd9
-@@ -143,9 +143,9 @@
-
- typedef struct
- {
-- P uint32_t WinVersion;
-- P uint32_t NTVersion;
-- P uint16_t Word;
-+ uint32_t P WinVersion;
-+ uint32_t P NTVersion;
-+ uint16_t P Word;
- } TSetupVersionData;
-
- #if 0
-@@ -172,12 +172,12 @@
- char* InstallFontName;
- char* Components;
- char* Tasks;
-- P TSetupVersionData MinVersion;
-- P TSetupVersionData OnlyBelowVersion;
-+ TSetupVersionData P MinVersion;
-+ TSetupVersionData P OnlyBelowVersion;
- uint32_t LocationEntry;
- uint32_t Attribs;
- uint32_t ExternalSize;
-- P char stuff[4];
-+ char P stuff[4];
- #if 0
- Options: set of (foConfirmOverwrite, foUninsNeverUninstall, foRestartReplace,
- foDeleteAfterInstall, foRegisterServer, foRegisterTypeLib, foSharedFile,
diff --git a/archivers/liborange/files/patch-lib_inno.h b/archivers/liborange/files/patch-lib_inno.h
new file mode 100644
index 000000000000..c9e262e5258e
--- /dev/null
+++ b/archivers/liborange/files/patch-lib_inno.h
@@ -0,0 +1,49 @@
+--- lib/inno.h.orig 2007-11-29 13:50:20 UTC
++++ lib/inno.h
+@@ -3,7 +3,7 @@
+ #define __inno_h__
+
+ #include <stdbool.h>
+-#include <stdint.h>
++#include <inttypes.h>
+ #include <stdio.h>
+ #include <zlib.h>
+
+@@ -99,7 +99,7 @@ typedef struct
+ uint32_t NumUninstallDeleteEntries;
+ uint32_t NumRunEntries;
+ uint32_t NumUninstallRunEntries;
+- P uint8_t stuff[0x35];
++ uint8_t P stuff[0x35];
+ } TSetupHeader;
+
+ #define SETUP_HEADER_SIZE 0xd9
+@@ -143,9 +143,9 @@ typedef enum
+
+ typedef struct
+ {
+- P uint32_t WinVersion;
+- P uint32_t NTVersion;
+- P uint16_t Word;
++ uint32_t P WinVersion;
++ uint32_t P NTVersion;
++ uint16_t P Word;
+ } TSetupVersionData;
+
+ #if 0
+@@ -172,12 +172,12 @@ typedef struct
+ char* InstallFontName;
+ char* Components;
+ char* Tasks;
+- P TSetupVersionData MinVersion;
+- P TSetupVersionData OnlyBelowVersion;
++ TSetupVersionData P MinVersion;
++ TSetupVersionData P OnlyBelowVersion;
+ uint32_t LocationEntry;
+ uint32_t Attribs;
+ uint32_t ExternalSize;
+- P char stuff[4];
++ char P stuff[4];
+ #if 0
+ Options: set of (foConfirmOverwrite, foUninsNeverUninstall, foRestartReplace,
+ foDeleteAfterInstall, foRegisterServer, foRegisterTypeLib, foSharedFile,
diff --git a/archivers/libunrar/files/patch-dll.cpp b/archivers/libunrar/files/patch-dll.cpp
index a09c78f074f9..1751b68cd735 100644
--- a/archivers/libunrar/files/patch-dll.cpp
+++ b/archivers/libunrar/files/patch-dll.cpp
@@ -1,6 +1,6 @@
-diff -ruN unrar.orig/dll.cpp unrar/dll.cpp
+--- dll.cpp.orig 2010-03-15 06:30:52 UTC
+++ dll.cpp
-@@ -272,7 +272,9 @@
+@@ -281,7 +281,9 @@ int PASCAL ProcessFile(HANDLE hArcData,i
strcpy(Data->Cmd.Command,Operation==RAR_EXTRACT ? "X":"T");
Data->Cmd.Test=Operation!=RAR_EXTRACT;
bool Repeat=false;
diff --git a/archivers/libunrar/files/patch-dll.hpp b/archivers/libunrar/files/patch-dll.hpp
index d78aea5bb571..9a075eb41c89 100644
--- a/archivers/libunrar/files/patch-dll.hpp
+++ b/archivers/libunrar/files/patch-dll.hpp
@@ -1,5 +1,5 @@
---- dll.hpp 2008-11-06 01:37:37.000000000 +0100
-+++ dll.hpp 2008-11-06 01:38:47.000000000 +0100
+--- dll.hpp.orig 2010-03-15 06:30:53 UTC
++++ dll.hpp
@@ -28,14 +28,14 @@
#define RAR_DLL_VERSION 4
diff --git a/archivers/libunrar/files/patch-extract.cpp b/archivers/libunrar/files/patch-extract.cpp
index d52b2842361f..3343c6255c49 100644
--- a/archivers/libunrar/files/patch-extract.cpp
+++ b/archivers/libunrar/files/patch-extract.cpp
@@ -1,6 +1,6 @@
---- extract.cpp.orig 2009-06-30 09:18:53.000000000 +0300
-+++ extract.cpp 2009-07-09 10:02:21.000000000 +0300
-@@ -354,6 +354,7 @@
+--- extract.cpp.orig 2010-03-15 06:30:52 UTC
++++ extract.cpp
+@@ -354,6 +354,7 @@ bool CmdExtract::ExtractCurrentFile(Comm
char CurVolName[NM];
strcpy(CurVolName,ArcName);
diff --git a/archivers/libunrar/files/patch-makefile.unix b/archivers/libunrar/files/patch-makefile.unix
index 436368432457..66ff4e0854db 100644
--- a/archivers/libunrar/files/patch-makefile.unix
+++ b/archivers/libunrar/files/patch-makefile.unix
@@ -1,5 +1,5 @@
---- makefile.unix.orig 2008-10-09 15:43:06.000000000 +0200
-+++ makefile.unix 2008-11-06 01:43:52.000000000 +0100
+--- makefile.unix.orig 2009-05-03 05:18:45 UTC
++++ makefile.unix
@@ -7,10 +7,11 @@
# Linux using GCC
@@ -14,16 +14,16 @@
# Linux using LCC
#CXX=lcc
-@@ -100,7 +101,7 @@
+@@ -100,7 +101,7 @@ LINK=$(CXX)
WHAT=UNRAR
UNRAR_OBJ=filestr.o recvol.o rs.o scantree.o
-LIB_OBJ=filestr.o scantree.o dll.o
+LIB_OBJ=dll.o
- OBJECTS=rar.o strlist.o strfn.o pathfn.o int64.o savepos.o global.o file.o filefn.o filcreat.o \
+ OBJECTS=rar.o strlist.o strfn.o pathfn.o savepos.o smallfn.o global.o file.o filefn.o filcreat.o \
archive.o arcread.o unicode.o system.o isnt.o crypt.o crc.o rawread.o encname.o \
-@@ -131,9 +132,15 @@
+@@ -131,9 +132,15 @@ sfx: $(OBJECTS)
$(STRIP) default.sfx
lib: WHAT=RARDLL
diff --git a/archivers/libzip/files/patch-lib__Makefile.in b/archivers/libzip/files/patch-lib__Makefile.in
index cd4d7ffaad5d..eaebfcc94cc3 100644
--- a/archivers/libzip/files/patch-lib__Makefile.in
+++ b/archivers/libzip/files/patch-lib__Makefile.in
@@ -1,6 +1,6 @@
---- lib/Makefile.in.orig 2015-08-26 18:39:20 UTC
+--- lib/Makefile.in.orig 2016-02-19 14:21:44 UTC
+++ lib/Makefile.in
-@@ -355,8 +355,8 @@ AM_CFLAGS = @CFLAG_VISIBILITY@
+@@ -367,8 +367,8 @@ AM_CFLAGS = @CFLAG_VISIBILITY@
libincludedir = ${libdir}/@PACKAGE@/include
lib_LTLIBRARIES = libzip.la
noinst_HEADERS = zipint.h
@@ -11,7 +11,7 @@
# also update CMakeLists.txt when changing version
libzip_la_LDFLAGS = -no-undefined -version-info 4:0:0
-@@ -869,8 +869,7 @@ info: info-am
+@@ -882,8 +882,7 @@ info: info-am
info-am:
diff --git a/archivers/libzip/files/patch-libzip.pc.in b/archivers/libzip/files/patch-libzip.pc.in
index 4c6607709e47..7a9a58210a00 100644
--- a/archivers/libzip/files/patch-libzip.pc.in
+++ b/archivers/libzip/files/patch-libzip.pc.in
@@ -1,4 +1,4 @@
---- libzip.pc.in.orig 2014-03-08 20:13:21 UTC
+--- libzip.pc.in.orig 2014-08-12 12:48:41 UTC
+++ libzip.pc.in
@@ -2,7 +2,6 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
diff --git a/archivers/lrzip/files/patch-lrzip__private.h b/archivers/lrzip/files/patch-lrzip__private.h
index 0d0a20e66993..6cbd129a04e5 100644
--- a/archivers/lrzip/files/patch-lrzip__private.h
+++ b/archivers/lrzip/files/patch-lrzip__private.h
@@ -1,4 +1,4 @@
---- lrzip_private.h.orig 2015-03-10 09:25:42 UTC
+--- lrzip_private.h.orig 2016-06-09 05:01:44 UTC
+++ lrzip_private.h
@@ -47,7 +47,7 @@
#ifdef HAVE_ALLOCA_H
diff --git a/archivers/lzo2/files/patch-include__lzo__lzodefs.h b/archivers/lzo2/files/patch-include__lzo__lzodefs.h
index f72388541adc..b836430e338a 100644
--- a/archivers/lzo2/files/patch-include__lzo__lzodefs.h
+++ b/archivers/lzo2/files/patch-include__lzo__lzodefs.h
@@ -1,5 +1,5 @@
---- ./include/lzo/lzodefs.h.orig 2014-06-25 15:47:13.000000000 +0200
-+++ ./include/lzo/lzodefs.h 2014-06-27 06:31:33.000000000 +0200
+--- include/lzo/lzodefs.h.orig 2015-02-04 11:24:51 UTC
++++ include/lzo/lzodefs.h
@@ -29,6 +29,8 @@
#ifndef __LZODEFS_H_INCLUDED
#define __LZODEFS_H_INCLUDED 1
diff --git a/archivers/macutils/files/patch-crc_makefile b/archivers/macutils/files/patch-crc_makefile
index c053bcbb1716..aa88fd6aa67e 100644
--- a/archivers/macutils/files/patch-crc_makefile
+++ b/archivers/macutils/files/patch-crc_makefile
@@ -1,12 +1,12 @@
---- crc/makefile.orig Sun Oct 19 01:17:42 2003
-+++ crc/makefile Sun Oct 19 01:18:15 2003
+--- crc/makefile.orig 1993-10-02 20:16:00 UTC
++++ crc/makefile
@@ -1,4 +1,4 @@
-CFLAGS = -O $(CF)
+CFLAGS += $(CF)
CRCC = arc.c ccitt.c kermit.c binhex.c ccitt32.c zip.c
CRCO = arc.o ccitt.o kermit.o binhex.o ccitt32.o zip.o
-@@ -16,7 +16,7 @@
+@@ -16,7 +16,7 @@ $(CRCC): makecrc
./makecrc
makecrc: makecrc.o
diff --git a/archivers/macutils/files/patch-hexbin_globals.h b/archivers/macutils/files/patch-hexbin_globals.h
index b5ec39483f06..7fb9c127602e 100644
--- a/archivers/macutils/files/patch-hexbin_globals.h
+++ b/archivers/macutils/files/patch-hexbin_globals.h
@@ -1,6 +1,6 @@
---- hexbin/globals.h.orig Fri Apr 16 00:28:16 1999
-+++ hexbin/globals.h Fri Apr 16 00:28:25 1999
-@@ -13,7 +13,7 @@
+--- hexbin/globals.h.orig 1993-10-02 20:16:00 UTC
++++ hexbin/globals.h
+@@ -13,7 +13,7 @@ extern void transname();
extern char info[];
extern char trname[];
diff --git a/archivers/macutils/files/patch-macunpack_cpt.h b/archivers/macutils/files/patch-macunpack_cpt.h
index 0fbd808f7db8..94a77a576eed 100644
--- a/archivers/macutils/files/patch-macunpack_cpt.h
+++ b/archivers/macutils/files/patch-macunpack_cpt.h
@@ -1,5 +1,5 @@
---- macunpack/cpt.h.orig Fri Apr 16 00:31:28 1999
-+++ macunpack/cpt.h Fri Apr 16 00:32:07 1999
+--- macunpack/cpt.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/cpt.h
@@ -31,7 +31,7 @@
typedef long OSType;
@@ -9,7 +9,7 @@
unsigned char signature; /* = 1 -- for verification */
unsigned char volume; /* for multi-file archives */
unsigned short xmagic; /* verification multi-file consistency*/
-@@ -42,7 +42,7 @@
+@@ -42,7 +42,7 @@ typedef struct cptHdr { /* 8 bytes */
unsigned char commentsize; /* number of bytes comment that follow*/
};
diff --git a/archivers/macutils/files/patch-macunpack_dd.c b/archivers/macutils/files/patch-macunpack_dd.c
index 83ae8b721f64..953e85584db3 100644
--- a/archivers/macutils/files/patch-macunpack_dd.c
+++ b/archivers/macutils/files/patch-macunpack_dd.c
@@ -1,6 +1,6 @@
---- macunpack/dd.c.orig Fri Apr 16 00:26:39 1999
-+++ macunpack/dd.c Fri Apr 16 00:26:45 1999
-@@ -45,7 +45,7 @@
+--- macunpack/dd.c.orig 1993-10-02 20:16:00 UTC
++++ macunpack/dd.c
+@@ -45,7 +45,7 @@ static int dd_getbits();
#endif /* UNTESTED */
static void dd_cpt_compat();
diff --git a/archivers/macutils/files/patch-macunpack_dd.h b/archivers/macutils/files/patch-macunpack_dd.h
index 1e60f45f1515..dff85ca8f99d 100644
--- a/archivers/macutils/files/patch-macunpack_dd.h
+++ b/archivers/macutils/files/patch-macunpack_dd.h
@@ -1,5 +1,5 @@
---- macunpack/dd.h.orig Fri Apr 16 00:25:41 1999
-+++ macunpack/dd.h Fri Apr 16 00:25:55 1999
+--- macunpack/dd.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/dd.h
@@ -52,7 +52,7 @@
typedef long OSType;
@@ -9,7 +9,7 @@
unsigned char magic[4]; /* "DDAR" */
unsigned char fill1[4]; /* ??? */
unsigned char fName[64]; /* a STR63 */
-@@ -73,7 +73,7 @@
+@@ -73,7 +73,7 @@ typedef struct fileHdr { /* 124 bytes *
unsigned short hdrcrc; /* true crc */
};
diff --git a/archivers/macutils/files/patch-macunpack_jdw.h b/archivers/macutils/files/patch-macunpack_jdw.h
index 4eca92c2636b..8699e8fd2e26 100644
--- a/archivers/macutils/files/patch-macunpack_jdw.h
+++ b/archivers/macutils/files/patch-macunpack_jdw.h
@@ -1,5 +1,5 @@
---- macunpack/jdw.h.orig Fri Apr 16 00:13:34 1999
-+++ macunpack/jdw.h Fri Apr 16 00:13:37 1999
+--- macunpack/jdw.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/jdw.h
@@ -8,7 +8,7 @@
#define J_MTIME 34
#define J_FLENGTH 38
diff --git a/archivers/macutils/files/patch-macunpack_lzc.h b/archivers/macutils/files/patch-macunpack_lzc.h
index d68cac214f63..2141a2a8e85c 100644
--- a/archivers/macutils/files/patch-macunpack_lzc.h
+++ b/archivers/macutils/files/patch-macunpack_lzc.h
@@ -1,5 +1,5 @@
---- macunpack/lzc.h.orig Fri Apr 16 00:29:28 1999
-+++ macunpack/lzc.h Fri Apr 16 00:29:36 1999
+--- macunpack/lzc.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/lzc.h
@@ -12,7 +12,7 @@
#define C_AUTHOFF 36
#define C_FLAGOFF 40
diff --git a/archivers/macutils/files/patch-macunpack_lzh.c b/archivers/macutils/files/patch-macunpack_lzh.c
index d52b1ed742e7..95db98290162 100644
--- a/archivers/macutils/files/patch-macunpack_lzh.c
+++ b/archivers/macutils/files/patch-macunpack_lzh.c
@@ -1,6 +1,6 @@
---- macunpack/lzh.c.orig 2014-07-27 11:11:36.000000000 -0400
-+++ macunpack/lzh.c 2014-07-27 11:11:39.000000000 -0400
-@@ -23,7 +23,7 @@
+--- macunpack/lzh.c.orig 1993-10-02 20:16:00 UTC
++++ macunpack/lzh.c
+@@ -23,7 +23,7 @@ extern void de_lzah();
extern unsigned char (*lzah_getbyte)();
extern void de_lzh();
@@ -9,7 +9,7 @@
char *name;
int number;
};
-@@ -40,13 +40,13 @@
+@@ -40,13 +40,13 @@ static struct methodinfo methods[] = {
{"-lzs-", lzs}
};
static char *lzh_archive;
diff --git a/archivers/macutils/files/patch-macunpack_lzh.h b/archivers/macutils/files/patch-macunpack_lzh.h
index 902138b785ff..bdd51ad9da3c 100644
--- a/archivers/macutils/files/patch-macunpack_lzh.h
+++ b/archivers/macutils/files/patch-macunpack_lzh.h
@@ -1,5 +1,5 @@
---- macunpack/lzh.h.orig Fri Apr 16 00:24:44 1999
-+++ macunpack/lzh.h Fri Apr 16 00:24:58 1999
+--- macunpack/lzh.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/lzh.h
@@ -30,7 +30,7 @@
#define L_EEXTENDSZ 0
#define L_EEXTEND 1
diff --git a/archivers/macutils/files/patch-macunpack_sit.c b/archivers/macutils/files/patch-macunpack_sit.c
index b5574ae7b748..c1000b9a779f 100644
--- a/archivers/macutils/files/patch-macunpack_sit.c
+++ b/archivers/macutils/files/patch-macunpack_sit.c
@@ -1,6 +1,6 @@
---- macunpack/sit.c.orig Fri Apr 16 00:18:28 1999
-+++ macunpack/sit.c Fri Apr 16 00:18:34 1999
-@@ -19,7 +19,7 @@
+--- macunpack/sit.c.orig 1993-10-02 20:16:00 UTC
++++ macunpack/sit.c
+@@ -19,7 +19,7 @@ extern void set_huffman();
extern void de_lzah();
extern unsigned char (*lzah_getbyte)();
diff --git a/archivers/macutils/files/patch-macunpack_sit.h b/archivers/macutils/files/patch-macunpack_sit.h
index 8cfc5459da91..fcf1f0878ae9 100644
--- a/archivers/macutils/files/patch-macunpack_sit.h
+++ b/archivers/macutils/files/patch-macunpack_sit.h
@@ -1,5 +1,5 @@
---- macunpack/sit.h.orig Fri Apr 16 00:15:41 1999
-+++ macunpack/sit.h Fri Apr 16 00:15:56 1999
+--- macunpack/sit.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/sit.h
@@ -24,7 +24,7 @@
typedef long OSType;
@@ -9,7 +9,7 @@
OSType signature; /* = 'SIT!' -- for verification */
unsigned short numFiles; /* number of files in archive */
unsigned long arcLength; /* length of entire archive incl.
-@@ -34,7 +34,7 @@
+@@ -34,7 +34,7 @@ typedef struct sitHdr { /* 22 bytes */
char reserved[7];
};
diff --git a/archivers/macutils/files/patch-macunpack_stf.h b/archivers/macutils/files/patch-macunpack_stf.h
index 20c7d02dea73..19f4404b2506 100644
--- a/archivers/macutils/files/patch-macunpack_stf.h
+++ b/archivers/macutils/files/patch-macunpack_stf.h
@@ -1,5 +1,5 @@
---- macunpack/stf.h.orig Fri Apr 16 00:22:12 1999
-+++ macunpack/stf.h Fri Apr 16 00:22:19 1999
+--- macunpack/stf.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/stf.h
@@ -5,7 +5,7 @@
#define S_RSRCLNGTH 3 /* + NAMELENGTH */
#define S_DATALNGTH 7 /* + NAMELENGTH */
diff --git a/archivers/macutils/files/patch-macunpack_zma.h b/archivers/macutils/files/patch-macunpack_zma.h
index 6dac05bda456..05db6614ef29 100644
--- a/archivers/macutils/files/patch-macunpack_zma.h
+++ b/archivers/macutils/files/patch-macunpack_zma.h
@@ -1,5 +1,5 @@
---- macunpack/zma.h.orig Fri Apr 16 01:04:19 1999
-+++ macunpack/zma.h Fri Apr 16 01:04:29 1999
+--- macunpack/zma.h.orig 1993-10-02 20:16:00 UTC
++++ macunpack/zma.h
@@ -20,7 +20,7 @@
#define Z_RCRC 44 /* Resource crc */
#define Z_FNAME 46 /* File name length and name */
diff --git a/archivers/macutils/files/patch-makefile b/archivers/macutils/files/patch-makefile
index 080da53c7ae2..0c381564f8d5 100644
--- a/archivers/macutils/files/patch-makefile
+++ b/archivers/macutils/files/patch-makefile
@@ -1,12 +1,12 @@
---- makefile.orig Sun Oct 3 05:16:00 1993
-+++ makefile Sat Jun 10 13:35:16 2000
+--- makefile.orig 1993-10-02 20:16:00 UTC
++++ makefile
@@ -1,5 +1,4 @@
SHELL = /bin/sh
-BINDIR = /ufs/dik/tmpbin
# Use the following flags on the CF macro definition as needed.
#
# -DBSD if you are on a BSD system
-@@ -24,44 +23,44 @@
+@@ -24,44 +23,44 @@ BINDIR = /ufs/dik/tmpbin
#
# -DAPPLEDOUBLE if you want to be able to use an AppleDouble file system
#
diff --git a/archivers/macutils/files/patch-util_transname.c b/archivers/macutils/files/patch-util_transname.c
index 325ecdab60bd..22d615288a20 100644
--- a/archivers/macutils/files/patch-util_transname.c
+++ b/archivers/macutils/files/patch-util_transname.c
@@ -1,5 +1,5 @@
---- util/transname.c.orig Fri Apr 16 00:02:36 1999
-+++ util/transname.c Fri Apr 16 00:02:38 1999
+--- util/transname.c.orig 1993-10-02 20:16:00 UTC
++++ util/transname.c
@@ -1,5 +1,5 @@
#include <sys/types.h>
-#include <sys/dir.h>
diff --git a/archivers/mscompress/files/patch-mscompress.c b/archivers/mscompress/files/patch-mscompress.c
index 5184992ab5dc..6b2181be9ac9 100644
--- a/archivers/mscompress/files/patch-mscompress.c
+++ b/archivers/mscompress/files/patch-mscompress.c
@@ -1,5 +1,5 @@
---- mscompress.c.orig 2011-12-22 00:20:22.000000000 +0800
-+++ mscompress.c 2011-12-22 00:20:29.000000000 +0800
+--- mscompress.c.orig 2000-04-15 13:15:38 UTC
++++ mscompress.c
@@ -306,7 +306,7 @@ usage (char *progname)
exit (0);
}
diff --git a/archivers/mscompress/files/patch-msexpand.c b/archivers/mscompress/files/patch-msexpand.c
index fe4eb61de5aa..781a778fd7c4 100644
--- a/archivers/mscompress/files/patch-msexpand.c
+++ b/archivers/mscompress/files/patch-msexpand.c
@@ -1,5 +1,5 @@
---- msexpand.c.orig 2011-12-22 00:20:38.000000000 +0800
-+++ msexpand.c 2011-12-22 00:20:44.000000000 +0800
+--- msexpand.c.orig 2000-04-15 13:15:45 UTC
++++ msexpand.c
@@ -215,7 +215,7 @@ usage (char *progname)
exit (0);
}
diff --git a/archivers/p5-Compress-LZO/files/patch-Makefile.PL b/archivers/p5-Compress-LZO/files/patch-Makefile.PL
index 058110fee105..e96c66e5cf58 100644
--- a/archivers/p5-Compress-LZO/files/patch-Makefile.PL
+++ b/archivers/p5-Compress-LZO/files/patch-Makefile.PL
@@ -1,6 +1,6 @@
---- Makefile.PL.orig 1998-08-23 18:14:41.000000000 +0800
-+++ Makefile.PL 2011-12-06 09:11:59.832206442 +0800
-@@ -14,6 +14,8 @@
+--- Makefile.PL.orig 1998-08-23 10:14:41 UTC
++++ Makefile.PL
+@@ -14,6 +14,8 @@ use Config;
# installed.
#$LZO_LIB = '-L/usr/local/lib';
@@ -9,7 +9,7 @@
# It shouldn't be necessary to change anything from here on.
-@@ -21,7 +23,7 @@
+@@ -21,7 +23,7 @@ use Config;
WriteMakefile(
NAME => 'Compress::LZO',
VERSION_FROM => 'LZO.pm',
diff --git a/archivers/p5-IO-Zlib/files/patch-Zlib.pm b/archivers/p5-IO-Zlib/files/patch-Zlib.pm
index 0fa9323ccb77..4ff6310c14c7 100644
--- a/archivers/p5-IO-Zlib/files/patch-Zlib.pm
+++ b/archivers/p5-IO-Zlib/files/patch-Zlib.pm
@@ -1,6 +1,6 @@
---- Zlib.pm.orig Sun Feb 13 00:43:08 2005
-+++ Zlib.pm Sun Feb 13 00:43:30 2005
-@@ -297,7 +297,7 @@
+--- Zlib.pm.orig 2009-07-14 21:30:41 UTC
++++ Zlib.pm
+@@ -289,7 +289,7 @@ use strict;
use vars qw($VERSION $AUTOLOAD @ISA);
use Carp;
diff --git a/archivers/p7zip/files/patch-CPP-Windows-System.cpp b/archivers/p7zip/files/patch-CPP-Windows-System.cpp
deleted file mode 100644
index 467aceaccba2..000000000000
--- a/archivers/p7zip/files/patch-CPP-Windows-System.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- CPP/Windows/System.cpp.orig 2015-09-26 08:47:01 UTC
-+++ CPP/Windows/System.cpp
-@@ -44,7 +44,7 @@ namespace NWindows
- #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
- UInt32 GetNumberOfProcessors() {
- int nbcpu = 1;
-- size_t value;
-+ int value;
- size_t len = sizeof(value);
- if (sysctlbyname("hw.ncpu", &value, &len, NULL, 0) == 0)
- nbcpu = value;
diff --git a/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp b/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp
index 2ff5cd79e848..e01719cb0514 100644
--- a/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp
+++ b/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp
@@ -1,9 +1,9 @@
Patch for CVE-2016-2334.
Obtained from: https://sourceforge.net/p/p7zip/discussion/383043/thread/9d0fb86b/
---- CPP/7zip/Archive/HfsHandler.cpp.orig Fri Jun 19 06:52:08 2015
-+++ CPP/7zip/Archive/HfsHandler.cpp Mon May 23 20:37:42 2016
-@@ -987,7 +987,9 @@ HRESULT CDatabase::LoadCatalog(const CFork &fork, cons
+--- CPP/7zip/Archive/HfsHandler.cpp.orig 2015-06-19 10:52:08 UTC
++++ CPP/7zip/Archive/HfsHandler.cpp
+@@ -987,7 +987,9 @@ HRESULT CDatabase::LoadCatalog(const CFo
item.GroupID = Get32(r + 0x24);
item.AdminFlags = r[0x28];
item.OwnerFlags = r[0x29];
@@ -13,13 +13,13 @@ Obtained from: https://sourceforge.net/p/p7zip/discussion/383043/thread/9d0fb86b
item.special.iNodeNum = Get16(r + 0x2C); // or .linkCount
item.FileType = Get32(r + 0x30);
item.FileCreator = Get32(r + 0x34);
-@@ -1571,6 +1573,9 @@ HRESULT CHandler::ExtractZlibFile(
- blockSize = (UInt32)rem;
+@@ -1572,6 +1574,9 @@ HRESULT CHandler::ExtractZlibFile(
UInt32 size = GetUi32(tableBuf + i * 8 + 4);
-+
+
+ if (size > buf.Size() || size > kCompressionBlockSize + 1)
+ return S_FALSE;
-
++
RINOK(ReadStream_FALSE(inStream, buf, size));
+ if ((buf[0] & 0xF) == 0xF)
diff --git a/archivers/p7zip/files/patch-CPP_7zip_Archive_Udf_UdfIn.cpp b/archivers/p7zip/files/patch-CPP_7zip_Archive_Udf_UdfIn.cpp
index 54c50066a2ef..a8e754d18f17 100644
--- a/archivers/p7zip/files/patch-CPP_7zip_Archive_Udf_UdfIn.cpp
+++ b/archivers/p7zip/files/patch-CPP_7zip_Archive_Udf_UdfIn.cpp
@@ -1,9 +1,9 @@
Patch for CVE-2016-2335.
Obtained from: https://sourceforge.net/p/p7zip/discussion/383043/thread/9d0fb86b/
---- CPP/7zip/Archive/Udf/UdfIn.cpp.orig Fri Nov 20 15:40:08 2015
-+++ CPP/7zip/Archive/Udf/UdfIn.cpp Mon May 23 20:37:46 2016
-@@ -389,7 +389,11 @@ HRESULT CInArchive::ReadFileItem(int volIndex, int fsI
+--- CPP/7zip/Archive/Udf/UdfIn.cpp.orig 2015-11-20 20:40:08 UTC
++++ CPP/7zip/Archive/Udf/UdfIn.cpp
+@@ -389,7 +389,11 @@ HRESULT CInArchive::ReadFileItem(int vol
return S_FALSE;
CFile &file = Files.Back();
const CLogVol &vol = LogVols[volIndex];
diff --git a/archivers/p7zip/files/patch-CPP_Windows_System.cpp b/archivers/p7zip/files/patch-CPP_Windows_System.cpp
new file mode 100644
index 000000000000..4214f0888b95
--- /dev/null
+++ b/archivers/p7zip/files/patch-CPP_Windows_System.cpp
@@ -0,0 +1,11 @@
+--- CPP/Windows/System.cpp.orig 2015-11-20 21:33:04 UTC
++++ CPP/Windows/System.cpp
+@@ -44,7 +44,7 @@ namespace NWindows
+ #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
+ UInt32 GetNumberOfProcessors() {
+ int nbcpu = 1;
+- size_t value;
++ int value;
+ size_t len = sizeof(value);
+ if (sysctlbyname("hw.ncpu", &value, &len, NULL, 0) == 0)
+ nbcpu = value;
diff --git a/archivers/packddir/files/patch-upackddir.c b/archivers/packddir/files/patch-upackddir.c
index 64a51e301916..8972f60fa251 100644
--- a/archivers/packddir/files/patch-upackddir.c
+++ b/archivers/packddir/files/patch-upackddir.c
@@ -1,6 +1,6 @@
---- upackddir.c.orig 2009-08-22 04:48:16.000000000 +0900
-+++ upackddir.c 2009-08-22 04:48:39.000000000 +0900
-@@ -253,7 +253,7 @@
+--- upackddir.c.orig 2004-01-17 12:08:52 UTC
++++ upackddir.c
+@@ -253,7 +253,7 @@ int packfile_extract(char *packfile, int
}
/* Let's jump to the beginning of our sweet data */
@@ -9,7 +9,7 @@
for (i = 0; i < pack->numfiles; i++) {
fprintf(stderr, "%s\n", mapped->name);
-@@ -297,7 +297,7 @@
+@@ -297,7 +297,7 @@ int packfile_extract_filename(char *pack
}
/* Let's jump to the beginning of our sweet data */
diff --git a/archivers/paq/files/patch-zpaq.cpp b/archivers/paq/files/patch-zpaq.cpp
index 4b39843d73af..56b513320dc4 100644
--- a/archivers/paq/files/patch-zpaq.cpp
+++ b/archivers/paq/files/patch-zpaq.cpp
@@ -1,6 +1,6 @@
---- zpaq.cpp.orig 2013-02-07 12:39:36.000000000 -0500
-+++ zpaq.cpp 2013-02-07 12:39:51.000000000 -0500
-@@ -1089,24 +1089,7 @@
+--- zpaq.cpp.orig 2016-07-26 12:11:37 UTC
++++ zpaq.cpp
+@@ -1236,24 +1236,7 @@ int numberOfProcessors() {
int rc=0; // result
#ifdef unix
diff --git a/archivers/paq/files/patch_zpsfx.cpp b/archivers/paq/files/patch_zpsfx.cpp
index a23211719c1c..5f6031b53128 100644
--- a/archivers/paq/files/patch_zpsfx.cpp
+++ b/archivers/paq/files/patch_zpsfx.cpp
@@ -1,6 +1,6 @@
---- zpsfx.cpp.orig 2012-04-09 04:01:23.000000000 -0400
-+++ zpsfx.cpp 2012-04-09 04:02:25.000000000 -0400
-@@ -16,19 +16,38 @@
+--- zpsfx.cpp.orig 2016-07-26 12:10:41 UTC
++++ zpsfx.cpp
+@@ -16,19 +16,38 @@ Or use appropriate optimization options.
the executable smaller. -DNDEBUG turns off run time checks.
To convert a ZPAQ archive to a self extracting archive:
@@ -39,7 +39,7 @@
The program reads itself and decompresses the appended archive.
You must enter the .exe extension as shown. If the file is not in
the current folder then you need to specify the path. The PATH environment
-@@ -44,7 +63,11 @@
+@@ -44,7 +63,11 @@ stored filename. SHA-1 checksums are not
#include <stdio.h>
#include <stdlib.h>
#include <string>
@@ -51,7 +51,7 @@
// An error handler is required as shown in this example. libzpaq will
// call it with an English language message in case of a fatal error.
-@@ -96,7 +119,11 @@
+@@ -96,7 +119,11 @@ struct Buf: public libzpaq::Writer {
// Return '/' in Linux or '\' in Windows
char slash() {
@@ -63,7 +63,7 @@
}
// Create directories as needed. For example if path="/tmp/foo/bar"
-@@ -106,7 +133,11 @@
+@@ -106,7 +133,11 @@ void makepath(std::string& path) {
for (int i=0; i<path.size(); ++i) {
if (path[i]=='\\' || path[i]=='/') {
path[i]=0;
diff --git a/archivers/par2cmdline-tbb/files/patch-configure b/archivers/par2cmdline-tbb/files/patch-configure
index 8022ce18c3c8..4b77ca91ed59 100644
--- a/archivers/par2cmdline-tbb/files/patch-configure
+++ b/archivers/par2cmdline-tbb/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2009-02-09 06:07:02.000000000 +0100
-+++ configure 2009-02-09 06:09:27.000000000 +0100
-@@ -4113,7 +4113,7 @@
+--- configure.orig 2009-02-03 05:15:30 UTC
++++ configure
+@@ -4113,7 +4113,7 @@ _ACEOF
case "$host_cpu" in
diff --git a/archivers/par2cmdline-tbb/files/patch-par2cmdline.h b/archivers/par2cmdline-tbb/files/patch-par2cmdline.h
index e63c118471df..b58d2e5109f7 100644
--- a/archivers/par2cmdline-tbb/files/patch-par2cmdline.h
+++ b/archivers/par2cmdline-tbb/files/patch-par2cmdline.h
@@ -1,6 +1,6 @@
---- par2cmdline.h.orig 2010-08-28 00:21:07.730518551 +0200
-+++ par2cmdline.h 2010-08-28 00:21:42.779186595 +0200
-@@ -428,6 +428,7 @@
+--- par2cmdline.h.orig 2009-02-03 05:14:49 UTC
++++ par2cmdline.h
+@@ -428,6 +428,7 @@ typedef enum Result
#include <vector>
#include <map>
#include <algorithm>
diff --git a/archivers/par2cmdline/files/patch-par2creatorsourcefile.cpp b/archivers/par2cmdline/files/patch-par2creatorsourcefile.cpp
index b275a374dfb6..60de68ab300e 100644
--- a/archivers/par2cmdline/files/patch-par2creatorsourcefile.cpp
+++ b/archivers/par2cmdline/files/patch-par2creatorsourcefile.cpp
@@ -1,6 +1,6 @@
---- par2creatorsourcefile.cpp.orig 2009-03-10 07:10:35.860499029 +0000
-+++ par2creatorsourcefile.cpp 2009-03-10 07:12:53.111712521 +0000
-@@ -224,6 +224,10 @@
+--- par2creatorsourcefile.cpp.orig 2004-04-15 13:45:23 UTC
++++ par2creatorsourcefile.cpp
+@@ -224,6 +224,10 @@ bool Par2CreatorSourceFile::Open(Command
cout << newfraction/10 << '.' << newfraction%10 << "%\r" << flush;
}
}
diff --git a/archivers/par2cmdline/files/patch-par2fileformat.h b/archivers/par2cmdline/files/patch-par2fileformat.h
index 8b2a7642cddf..b89635e08205 100644
--- a/archivers/par2cmdline/files/patch-par2fileformat.h
+++ b/archivers/par2cmdline/files/patch-par2fileformat.h
@@ -1,6 +1,6 @@
---- par2fileformat.h.orig 2011-06-23 08:31:37.639455018 +0200
-+++ par2fileformat.h 2011-06-23 08:38:29.287362503 +0200
-@@ -84,7 +84,7 @@
+--- par2fileformat.h.orig 2003-08-01 23:43:40 UTC
++++ par2fileformat.h
+@@ -84,7 +84,7 @@ struct FILEVERIFICATIONPACKET
PACKET_HEADER header;
// Body
MD5Hash fileid; // MD5hash of file_hash_16k, file_length, file_name
diff --git a/archivers/par2cmdline/files/patch-reedsolomon.cpp b/archivers/par2cmdline/files/patch-reedsolomon.cpp
index 279479af1dc5..8738aec6479a 100644
--- a/archivers/par2cmdline/files/patch-reedsolomon.cpp
+++ b/archivers/par2cmdline/files/patch-reedsolomon.cpp
@@ -1,6 +1,6 @@
---- ./reedsolomon.cpp.orig Tue May 27 02:01:31 2003
-+++ ./reedsolomon.cpp Fri Mar 23 00:49:59 2007
-@@ -51,7 +51,7 @@
+--- reedsolomon.cpp.orig 2003-05-26 18:01:31 UTC
++++ reedsolomon.cpp
+@@ -51,7 +51,7 @@ u32 gcd(u32 a, u32 b)
}
}
@@ -9,7 +9,7 @@
{
inputcount = (u32)present.size();
-@@ -80,7 +80,7 @@
+@@ -80,7 +80,7 @@ bool ReedSolomon<Galois8>::SetInput(cons
return true;
}
@@ -18,7 +18,7 @@
{
inputcount = count;
-@@ -101,7 +101,7 @@
+@@ -101,7 +101,7 @@ bool ReedSolomon<Galois8>::SetInput(u32
return true;
}
@@ -27,7 +27,7 @@
{
// Look up the appropriate element in the RS matrix
Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex];
-@@ -189,7 +189,7 @@
+@@ -189,7 +189,7 @@ bool ReedSolomon<Galois8>::Process(size_
// Set which of the source files are present and which are missing
// and compute the base values to use for the vandermonde matrix.
@@ -36,7 +36,7 @@
{
inputcount = (u32)present.size();
-@@ -233,7 +233,7 @@
+@@ -233,7 +233,7 @@ bool ReedSolomon<Galois16>::SetInput(con
// Record that the specified number of source files are all present
// and compute the base values to use for the vandermonde matrix.
@@ -45,7 +45,7 @@
{
inputcount = count;
-@@ -267,7 +267,7 @@
+@@ -267,7 +267,7 @@ bool ReedSolomon<Galois16>::SetInput(u32
return true;
}
diff --git a/archivers/peazip/files/patch-peach.pas b/archivers/peazip/files/patch-peach.pas
index ceb82e41270b..35a5bc967c7d 100644
--- a/archivers/peazip/files/patch-peach.pas
+++ b/archivers/peazip/files/patch-peach.pas
@@ -1,6 +1,6 @@
---- peach.pas 2016-01-27 13:08:24.382120000 -0500
-+++ peach.pas 2016-01-27 13:17:34.207034000 -0500
-@@ -4445,6 +4445,7 @@
+--- peach.pas.orig 2016-07-26 12:13:05 UTC
++++ peach.pas
+@@ -4468,6 +4468,7 @@ const
APPLICATION5 = '';
APPLICATION6 = '';
APPLICATION7 = '';
@@ -8,7 +8,7 @@
{$ENDIF}
{$IFDEF NETBSD}
EXEEXT = '';
-@@ -4455,6 +4456,7 @@
+@@ -4478,6 +4479,7 @@ const
APPLICATION5 = '';
APPLICATION6 = '';
APPLICATION7 = '';
@@ -16,7 +16,7 @@
{$ENDIF}
{$IFDEF DARWIN}
EXEEXT = '';
-@@ -4465,6 +4467,7 @@
+@@ -4488,6 +4490,7 @@ const
APPLICATION5 = '';
APPLICATION6 = '';
APPLICATION7 = '';
diff --git a/archivers/pecl-rar/files/patch-config.m4 b/archivers/pecl-rar/files/patch-config.m4
index cb5a85fa4790..2144e19820aa 100644
--- a/archivers/pecl-rar/files/patch-config.m4
+++ b/archivers/pecl-rar/files/patch-config.m4
@@ -1,6 +1,6 @@
---- config.m4.orgi 2013-05-28 16:35:29.000000000 +0800
-+++ config.m4 2013-05-28 16:35:47.000000000 +0800
-@@ -27,6 +27,6 @@
+--- config.m4.orig 2013-10-14 15:30:44 UTC
++++ config.m4
+@@ -27,6 +27,6 @@ if test "$PHP_RAR" != "no"; then
PHP_REQUIRE_CXX()
PHP_ADD_LIBRARY_WITH_PATH(stdc++, "", RAR_SHARED_LIBADD)
diff --git a/archivers/php5-snappy/files/patch-config.m4 b/archivers/php5-snappy/files/patch-config.m4
index fef0debcffc5..ee75b443f980 100644
--- a/archivers/php5-snappy/files/patch-config.m4
+++ b/archivers/php5-snappy/files/patch-config.m4
@@ -1,6 +1,6 @@
---- config.m4.orig 2011-09-07 10:27:21.000000000 +0200
-+++ config.m4 2014-05-17 13:31:39.000000000 +0200
-@@ -53,7 +53,7 @@
+--- config.m4.orig 2011-09-07 08:27:21 UTC
++++ config.m4
+@@ -53,7 +53,7 @@ if test "$PHP_SNAPPY" != "no"; then
if test "$PHP_SNAPPY_INCLUDEDIR" != "no" && test "$PHP_SNAPPY_INCLUDEDIR" != "yes"; then
if test -r "$PHP_SNAPPY_INCLUDEDIR/snappy.h"; then
@@ -9,7 +9,7 @@
else
AC_MSG_ERROR([Can't find snappy headers under "$PHP_SNAPPY_INCLUDEDIR"])
fi
-@@ -61,12 +61,12 @@
+@@ -61,12 +61,12 @@ if test "$PHP_SNAPPY" != "no"; then
SEARCH_PATH="/usr/local /usr" # you might want to change this
SEARCH_FOR="/include/snappy-c.h" # you most likely want to change this
if test -r $PHP_SNAPPY/$SEARCH_FOR; then # path given as parameter
@@ -24,7 +24,7 @@
AC_MSG_RESULT(found in $i)
fi
done
-@@ -80,7 +80,7 @@
+@@ -80,7 +80,7 @@ if test "$PHP_SNAPPY" != "no"; then
dnl # add include path
@@ -33,7 +33,7 @@
dnl # check for lib
-@@ -90,7 +90,7 @@
+@@ -90,7 +90,7 @@ if test "$PHP_SNAPPY" != "no"; then
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE(
[
diff --git a/archivers/php55-phar/files/patch-config.m4 b/archivers/php55-phar/files/patch-config.m4
index 1a981bfefdc1..5e5d281265b7 100644
--- a/archivers/php55-phar/files/patch-config.m4
+++ b/archivers/php55-phar/files/patch-config.m4
@@ -1,6 +1,6 @@
---- config.m4.orig 2011-11-25 15:31:20.000000000 +0100
-+++ config.m4 2011-11-25 15:47:45.000000000 +0100
-@@ -4,8 +4,38 @@
+--- config.m4.orig 2016-06-21 11:11:59 UTC
++++ config.m4
+@@ -4,8 +4,38 @@ dnl config.m4 for extension phar
PHP_ARG_ENABLE(phar, for phar archive support,
[ --disable-phar Disable phar support], yes)
diff --git a/archivers/php55-phar/files/patch-phar.c b/archivers/php55-phar/files/patch-phar.c
index 231ec40a8423..ae3b3230e526 100644
--- a/archivers/php55-phar/files/patch-phar.c
+++ b/archivers/php55-phar/files/patch-phar.c
@@ -1,6 +1,6 @@
---- phar.c.orig 2011-11-25 15:38:44.000000000 +0100
-+++ phar.c 2011-11-25 15:39:01.000000000 +0100
-@@ -3716,7 +3716,7 @@
+--- phar.c.orig 2016-06-21 11:11:59 UTC
++++ phar.c
+@@ -3651,7 +3651,7 @@ static const zend_module_dep phar_deps[]
ZEND_MOD_OPTIONAL("openssl")
ZEND_MOD_OPTIONAL("zlib")
ZEND_MOD_OPTIONAL("standard")
diff --git a/archivers/php55-zip/files/patch-config.m4 b/archivers/php55-zip/files/patch-config.m4
index a87640ff160d..fdcaae50fbc0 100644
--- a/archivers/php55-zip/files/patch-config.m4
+++ b/archivers/php55-zip/files/patch-config.m4
@@ -1,6 +1,6 @@
---- config.m4.orig 2009-04-09 16:16:30.000000000 +0200
-+++ config.m4 2009-04-09 16:17:02.000000000 +0200
-@@ -65,6 +65,7 @@
+--- config.m4.orig 2016-06-21 11:11:59 UTC
++++ config.m4
+@@ -65,6 +65,7 @@ yes
#endif
],[
PHP_PCRE_REGEX=pecl
diff --git a/archivers/php55-zlib/files/patch-zlib.c b/archivers/php55-zlib/files/patch-zlib.c
index 0e88fee9c5bf..62d5d711db17 100644
--- a/archivers/php55-zlib/files/patch-zlib.c
+++ b/archivers/php55-zlib/files/patch-zlib.c
@@ -1,10 +1,10 @@
---- zlib.c.orig 2012-07-09 15:25:31.000000000 +0200
-+++ zlib.c 2012-07-09 15:26:07.000000000 +0200
-@@ -957,6 +957,7 @@
+--- zlib.c.orig 2016-06-21 11:11:59 UTC
++++ zlib.c
+@@ -977,6 +977,7 @@ static PHP_MSHUTDOWN_FUNCTION(zlib)
/* {{{ PHP_RINIT_FUNCTION */
static PHP_RINIT_FUNCTION(zlib)
{
+ ZLIBG(output_compression) = 0;
ZLIBG(compression_coding) = 0;
-
- php_zlib_output_compression_start(TSRMLS_C);
+ if (!ZLIBG(handler_registered)) {
+ ZLIBG(output_compression) = ZLIBG(output_compression_default);
diff --git a/archivers/php56-phar/files/patch-config.m4 b/archivers/php56-phar/files/patch-config.m4
index 1a981bfefdc1..d83591d88076 100644
--- a/archivers/php56-phar/files/patch-config.m4
+++ b/archivers/php56-phar/files/patch-config.m4
@@ -1,6 +1,6 @@
---- config.m4.orig 2011-11-25 15:31:20.000000000 +0100
-+++ config.m4 2011-11-25 15:47:45.000000000 +0100
-@@ -4,8 +4,38 @@
+--- config.m4.orig 2016-06-22 01:50:40 UTC
++++ config.m4
+@@ -4,8 +4,38 @@ dnl config.m4 for extension phar
PHP_ARG_ENABLE(phar, for phar archive support,
[ --disable-phar Disable phar support], yes)
diff --git a/archivers/php56-phar/files/patch-phar.c b/archivers/php56-phar/files/patch-phar.c
index 231ec40a8423..5a5f2fc9b755 100644
--- a/archivers/php56-phar/files/patch-phar.c
+++ b/archivers/php56-phar/files/patch-phar.c
@@ -1,6 +1,6 @@
---- phar.c.orig 2011-11-25 15:38:44.000000000 +0100
-+++ phar.c 2011-11-25 15:39:01.000000000 +0100
-@@ -3716,7 +3716,7 @@
+--- phar.c.orig 2016-06-22 01:50:40 UTC
++++ phar.c
+@@ -3630,7 +3630,7 @@ static const zend_module_dep phar_deps[]
ZEND_MOD_OPTIONAL("openssl")
ZEND_MOD_OPTIONAL("zlib")
ZEND_MOD_OPTIONAL("standard")
diff --git a/archivers/php56-zlib/files/patch-zlib.c b/archivers/php56-zlib/files/patch-zlib.c
index 0e88fee9c5bf..894ccdc71a29 100644
--- a/archivers/php56-zlib/files/patch-zlib.c
+++ b/archivers/php56-zlib/files/patch-zlib.c
@@ -1,10 +1,10 @@
---- zlib.c.orig 2012-07-09 15:25:31.000000000 +0200
-+++ zlib.c 2012-07-09 15:26:07.000000000 +0200
-@@ -957,6 +957,7 @@
+--- zlib.c.orig 2016-06-22 01:50:40 UTC
++++ zlib.c
+@@ -977,6 +977,7 @@ static PHP_MSHUTDOWN_FUNCTION(zlib)
/* {{{ PHP_RINIT_FUNCTION */
static PHP_RINIT_FUNCTION(zlib)
{
+ ZLIBG(output_compression) = 0;
ZLIBG(compression_coding) = 0;
-
- php_zlib_output_compression_start(TSRMLS_C);
+ if (!ZLIBG(handler_registered)) {
+ ZLIBG(output_compression) = ZLIBG(output_compression_default);
diff --git a/archivers/php70-phar/files/patch-config.m4 b/archivers/php70-phar/files/patch-config.m4
index 07ff4a59962f..1aba3bd9a5a8 100644
--- a/archivers/php70-phar/files/patch-config.m4
+++ b/archivers/php70-phar/files/patch-config.m4
@@ -1,6 +1,6 @@
---- config.m4.orig 2015-12-10 14:23:55.176546745 +0300
-+++ config.m4 2015-12-10 14:29:14.284524651 +0300
-@@ -4,8 +4,38 @@
+--- config.m4.orig 2016-06-21 19:56:50 UTC
++++ config.m4
+@@ -4,8 +4,38 @@ dnl config.m4 for extension phar
PHP_ARG_ENABLE(phar, for phar archive support,
[ --disable-phar Disable phar support], yes)
diff --git a/archivers/php70-phar/files/patch-phar.c b/archivers/php70-phar/files/patch-phar.c
index 7897a70585fa..e7ae6cb3328d 100644
--- a/archivers/php70-phar/files/patch-phar.c
+++ b/archivers/php70-phar/files/patch-phar.c
@@ -1,6 +1,6 @@
---- phar.c.orig 2015-12-10 14:18:59.933565343 +0300
-+++ phar.c 2015-12-10 14:19:28.787563292 +0300
-@@ -3578,7 +3578,7 @@
+--- phar.c.orig 2016-06-21 19:56:49 UTC
++++ phar.c
+@@ -3589,7 +3589,7 @@ static const zend_module_dep phar_deps[]
ZEND_MOD_OPTIONAL("openssl")
ZEND_MOD_OPTIONAL("zlib")
ZEND_MOD_OPTIONAL("standard")
diff --git a/archivers/php70-zlib/files/patch-zlib.c b/archivers/php70-zlib/files/patch-zlib.c
index 0e88fee9c5bf..be02c50d1df6 100644
--- a/archivers/php70-zlib/files/patch-zlib.c
+++ b/archivers/php70-zlib/files/patch-zlib.c
@@ -1,10 +1,10 @@
---- zlib.c.orig 2012-07-09 15:25:31.000000000 +0200
-+++ zlib.c 2012-07-09 15:26:07.000000000 +0200
-@@ -957,6 +957,7 @@
+--- zlib.c.orig 2016-06-21 19:57:08 UTC
++++ zlib.c
+@@ -1480,6 +1480,7 @@ static PHP_MSHUTDOWN_FUNCTION(zlib)
/* {{{ PHP_RINIT_FUNCTION */
static PHP_RINIT_FUNCTION(zlib)
{
+ ZLIBG(output_compression) = 0;
ZLIBG(compression_coding) = 0;
-
- php_zlib_output_compression_start(TSRMLS_C);
+ if (!ZLIBG(handler_registered)) {
+ ZLIBG(output_compression) = ZLIBG(output_compression_default);
diff --git a/archivers/ppunpack/files/patch-depack.h b/archivers/ppunpack/files/patch-depack.h
index 358db5625743..75e11383c299 100644
--- a/archivers/ppunpack/files/patch-depack.h
+++ b/archivers/ppunpack/files/patch-depack.h
@@ -1,5 +1,5 @@
---- depack.h.orig Sat May 22 21:55:32 1999
-+++ depack.h Sat May 22 21:56:18 1999
+--- depack.h.orig 1995-03-03 14:25:04 UTC
++++ depack.h
@@ -4,8 +4,10 @@
* see accompanying file README for distribution information
*/
diff --git a/archivers/pxz/files/patch-pxz.c b/archivers/pxz/files/patch-pxz.c
index 8878d8ea28c5..4f09c008714b 100644
--- a/archivers/pxz/files/patch-pxz.c
+++ b/archivers/pxz/files/patch-pxz.c
@@ -1,26 +1,24 @@
---- pxz.c.orig 2010-11-23 10:35:25.720939440 +0100
-+++ pxz.c 2010-11-23 10:46:28.910235910 +0100
-@@ -21,11 +21,17 @@
+--- pxz.c.orig 2014-10-18 17:06:27 UTC
++++ pxz.c
+@@ -23,11 +23,17 @@
#include <string.h>
#include <stdio.h>
--#include <stdio_ext.h>
+#ifndef __FreeBSD__
-+#include <stdio_ext.h>
+ #include <stdio_ext.h>
+#endif
#include <stdlib.h>
#include <inttypes.h>
#include <unistd.h>
--#include <error.h>
+#ifdef __FreeBSD__
+#include <err.h>
+#else
-+#include <error.h>
+ #include <error.h>
+#endif
#include <errno.h>
#include <sys/stat.h>
#include <sys/mman.h>
-@@ -40,6 +46,10 @@
+@@ -42,6 +48,10 @@
#include <omp.h>
#endif
@@ -31,7 +29,7 @@
#ifndef XZ_BINARY
#define XZ_BINARY "xz"
#endif
-@@ -119,6 +129,13 @@
+@@ -121,6 +131,13 @@ const struct option long_opts[] = {
{ NULL, 0, NULL, 0 }
};
diff --git a/archivers/py-lzma/files/patch-setup.py b/archivers/py-lzma/files/patch-setup.py
index b3dbbc6dd3fa..f37d6a85ff34 100644
--- a/archivers/py-lzma/files/patch-setup.py
+++ b/archivers/py-lzma/files/patch-setup.py
@@ -1,8 +1,8 @@
---- ./setup.py.orig 2010-10-23 22:50:04.000000000 +0200
-+++ ./setup.py 2011-01-27 02:30:39.000000000 +0100
-@@ -27,13 +27,10 @@
- from distutils import log
+--- setup.py.orig 2016-07-26 12:20:39 UTC
++++ setup.py
+@@ -28,13 +28,10 @@ from distutils import log
from distutils.command.build_ext import build_ext as _build_ext
+ from version import get_git_version
-try:
- from setuptools import setup, Extension
diff --git a/archivers/py-lzma/files/patch-src__compat__LzmaCompatDecode.h b/archivers/py-lzma/files/patch-src__compat__LzmaCompatDecode.h
deleted file mode 100644
index 0b606faa6022..000000000000
--- a/archivers/py-lzma/files/patch-src__compat__LzmaCompatDecode.h
+++ /dev/null
@@ -1,17 +0,0 @@
---- ./src/compat/LzmaCompatDecode.h.orig 2010-04-24 00:26:40.000000000 +0200
-+++ ./src/compat/LzmaCompatDecode.h 2011-01-27 02:30:39.000000000 +0100
-@@ -39,14 +39,6 @@
- # define LZMACALL
- #endif
-
--#ifndef malloc
--# ifdef __APPLE__
--#include <malloc/malloc.h>
--# else
--#include <malloc.h>
--# endif
--#endif
--
- #ifndef UInt32
- #ifdef _LZMA_UINT32_IS_ULONG
- #define UInt32 unsigned long
diff --git a/archivers/py-lzma/files/patch-src_compat_LzmaCompatDecode.h b/archivers/py-lzma/files/patch-src_compat_LzmaCompatDecode.h
new file mode 100644
index 000000000000..38ab031e533b
--- /dev/null
+++ b/archivers/py-lzma/files/patch-src_compat_LzmaCompatDecode.h
@@ -0,0 +1,17 @@
+--- src/compat/LzmaCompatDecode.h.orig 2016-07-26 12:20:39 UTC
++++ src/compat/LzmaCompatDecode.h
+@@ -39,14 +39,6 @@ extern "C" {
+ # define LZMACALL
+ #endif
+
+-#ifndef malloc
+-# ifdef __APPLE__
+-#include <malloc/malloc.h>
+-# else
+-#include <malloc.h>
+-# endif
+-#endif
+-
+ #ifndef UInt32
+ #ifdef _LZMA_UINT32_IS_ULONG
+ #define UInt32 unsigned long
diff --git a/archivers/py-pyliblzma/files/patch-setup.py b/archivers/py-pyliblzma/files/patch-setup.py
index 7cd8df3fc6ec..d4baf46700b1 100644
--- a/archivers/py-pyliblzma/files/patch-setup.py
+++ b/archivers/py-pyliblzma/files/patch-setup.py
@@ -2,7 +2,7 @@
# https://bugs.launchpad.net/pyliblzma/+bug/613837
# https://bazaar.launchpad.net/~proyvind/pyliblzma/trunk/revision/494
---- setup.py.orig 2015-11-14 02:51:37 UTC
+--- setup.py.orig 2010-04-13 21:06:43 UTC
+++ setup.py
@@ -24,6 +24,7 @@
import sys, os, subprocess
diff --git a/archivers/qpress/files/patch-qpress.cpp b/archivers/qpress/files/patch-qpress.cpp
index 3e32fb406934..6c90357027d1 100644
--- a/archivers/qpress/files/patch-qpress.cpp
+++ b/archivers/qpress/files/patch-qpress.cpp
@@ -1,4 +1,4 @@
---- qpress.cpp.orig 2013-11-02 00:43:30.451058000 +0000
+--- qpress.cpp.orig 2016-07-26 12:20:52 UTC
+++ qpress.cpp
@@ -88,6 +88,7 @@ and finally outputs an UPDIR:
diff --git a/archivers/quazip-qt5/files/patch-coinstallable_with_qt4_version b/archivers/quazip-qt5/files/patch-coinstallable_with_qt4_version
index 5793b3937c92..5e034c3c458b 100644
--- a/archivers/quazip-qt5/files/patch-coinstallable_with_qt4_version
+++ b/archivers/quazip-qt5/files/patch-coinstallable_with_qt4_version
@@ -23,9 +23,9 @@ Patch #25 (Make devel packages coinstallable too)
Index: CMakeLists.txt
===================================================================
---- CMakeLists.txt (revision 250)
-+++ CMakeLists.txt (working copy)
-@@ -10,10 +10,11 @@
+--- CMakeLists.txt.orig 2013-11-18 17:37:54 UTC
++++ CMakeLists.txt
+@@ -10,10 +10,11 @@ endif()
if (Qt5Core_FOUND)
set(QTCORE_LIBRARIES ${Qt5Core_LIBRARIES})
@@ -38,7 +38,7 @@ Index: CMakeLists.txt
include_directories(${Qt5Core_INCLUDE_DIRS})
macro(qt_wrap_cpp)
-@@ -48,7 +49,9 @@
+@@ -48,7 +49,9 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_D
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
set(LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE)
@@ -49,11 +49,9 @@ Index: CMakeLists.txt
-install(FILES FindQuaZip.cmake DESTINATION ${CMAKE_ROOT}/Modules)
+install(FILES FindQuaZip.cmake RENAME FindQuaZip${QUAZIP_LIB_VERSION_SUFFIX}.cmake DESTINATION ${CMAKE_ROOT}/Modules)
-Index: FindQuaZip.cmake
-===================================================================
---- FindQuaZip.cmake (revision 250)
-+++ FindQuaZip.cmake (working copy)
-@@ -9,14 +9,17 @@
+--- FindQuaZip.cmake.orig 2012-02-26 06:46:10 UTC
++++ FindQuaZip.cmake
+@@ -9,14 +9,17 @@ IF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRA
# in cache already
SET(QUAZIP_FOUND TRUE)
ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
@@ -73,7 +71,7 @@ Index: FindQuaZip.cmake
FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip)
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR NAMES zlib.h)
ELSE(WIN32)
-@@ -25,12 +28,12 @@
+@@ -25,12 +28,12 @@ ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIB
pkg_check_modules(PC_QUAZIP quazip)
FIND_LIBRARY(QUAZIP_LIBRARIES
WIN32_DEBUG_POSTFIX d
@@ -88,11 +86,9 @@ Index: FindQuaZip.cmake
)
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR zlib.h HINTS /usr/include /usr/local/include)
ENDIF (WIN32)
-Index: quazip/CMakeLists.txt
-===================================================================
---- quazip/CMakeLists.txt (revision 250)
-+++ quazip/CMakeLists.txt (working copy)
-@@ -14,10 +14,10 @@
+--- quazip/CMakeLists.txt.orig 2013-08-10 16:00:00 UTC
++++ quazip/CMakeLists.txt
+@@ -14,10 +14,10 @@ ADD_DEFINITIONS(-DQUAZIP_BUILD)
qt_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS})
set(SRCS ${SRCS} ${MOC_SRCS})
diff --git a/archivers/quazip/files/patch-qztest__qztest.pro b/archivers/quazip/files/patch-qztest__qztest.pro
deleted file mode 100644
index 1161e1dbecc2..000000000000
--- a/archivers/quazip/files/patch-qztest__qztest.pro
+++ /dev/null
@@ -1,14 +0,0 @@
---- ./qztest/qztest.pro.orig 2014-02-09 12:36:57.000000000 +0100
-+++ ./qztest/qztest.pro 2014-03-30 05:01:44.000000000 +0200
-@@ -39,7 +39,10 @@
-
- win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../quazip/release/ -lquazip
- else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/debug/ -lquazip
--else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip
-+else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip $$join(QMAKE_LIBDIR, " -L", -L) -L$$QMAKE_LIBDIR_QT
-+
-+QMAKE_LIBDIR=
-+QMAKE_LIBDIR_QT=
-
- INCLUDEPATH += $$PWD/..
- DEPENDPATH += $$PWD/../quazip
diff --git a/archivers/quazip/files/patch-qztest_qztest.pro b/archivers/quazip/files/patch-qztest_qztest.pro
new file mode 100644
index 000000000000..9b1960fad4be
--- /dev/null
+++ b/archivers/quazip/files/patch-qztest_qztest.pro
@@ -0,0 +1,14 @@
+--- qztest/qztest.pro.orig 2014-02-10 18:04:08 UTC
++++ qztest/qztest.pro
+@@ -40,7 +40,10 @@ MOC_DIR = .moc
+
+ win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../quazip/release/ -lquazip
+ else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/debug/ -lquazip
+-else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip
++else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip $$join(QMAKE_LIBDIR, " -L", -L) -L$$QMAKE_LIBDIR_QT
++
++QMAKE_LIBDIR=
++QMAKE_LIBDIR_QT=
+
+ INCLUDEPATH += $$PWD/..
+ DEPENDPATH += $$PWD/../quazip
diff --git a/archivers/rpm4/files/patch-lib_backend_db3.c b/archivers/rpm4/files/patch-lib_backend_db3.c
index 9a88011ab7ce..8c33b429986c 100644
--- a/archivers/rpm4/files/patch-lib_backend_db3.c
+++ b/archivers/rpm4/files/patch-lib_backend_db3.c
@@ -1,5 +1,5 @@
---- lib/backend/db3.c.orig 2011-03-02 07:40:10.000000000 +0100
-+++ lib/backend/db3.c 2011-06-10 15:21:12.000000000 +0200
+--- lib/backend/db3.c.orig 2014-06-30 08:47:13 UTC
++++ lib/backend/db3.c
@@ -8,6 +8,8 @@ static int _debug = 1; /* XXX if < 0 deb
#include <errno.h>
diff --git a/archivers/rpm4/files/patch-lib_cpio.c b/archivers/rpm4/files/patch-lib_cpio.c
index a06895394295..692e5657a6ae 100644
--- a/archivers/rpm4/files/patch-lib_cpio.c
+++ b/archivers/rpm4/files/patch-lib_cpio.c
@@ -1,8 +1,8 @@
Fix for CVE-2014-8118 as found at
https://bugzilla.redhat.com/show_bug.cgi?id=1168715
---- lib/cpio.c.orig 2015-03-22 19:29:29.000000000 +0100
-+++ lib/cpio.c 2015-03-22 19:29:30.000000000 +0100
+--- lib/cpio.c.orig 2014-06-30 08:47:13 UTC
++++ lib/cpio.c
@@ -399,6 +399,9 @@ int rpmcpioHeaderRead(rpmcpio_t cpio, ch
GET_NUM_FIELD(hdr.filesize, fsize);
diff --git a/archivers/rpm4/files/patch-misc_fts.c b/archivers/rpm4/files/patch-misc_fts.c
index 3a36a6b2cf40..f6c633ef28a7 100644
--- a/archivers/rpm4/files/patch-misc_fts.c
+++ b/archivers/rpm4/files/patch-misc_fts.c
@@ -1,5 +1,5 @@
---- misc/fts.c 2012-04-03 15:53:59.000000000 +0200
-+++ misc/fts.c 2012-05-30 14:07:33.000000000 +0200
+--- misc/fts.c.orig 2014-06-30 08:47:14 UTC
++++ misc/fts.c
@@ -31,13 +31,14 @@
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#endif /* LIBC_SCCS and not lint */
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-@@ -61,11 +62,9 @@
+@@ -61,11 +62,9 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
# define _STAT_VER 0
# define __fxstat64(_stat_ver, _fd, _sbp) fstat64((_fd), (_sbp))
#endif
diff --git a/archivers/rpm4/files/patch-system.h b/archivers/rpm4/files/patch-system.h
index 087025591e2a..7d119aaaa7ef 100644
--- a/archivers/rpm4/files/patch-system.h
+++ b/archivers/rpm4/files/patch-system.h
@@ -1,6 +1,6 @@
---- system.h.orig 2011-06-10 15:27:05.000000000 +0200
-+++ system.h 2011-06-10 15:27:09.000000000 +0200
-@@ -39,6 +39,13 @@ char * stpncpy(char * dest, const char *
+--- system.h.orig 2014-06-30 08:47:14 UTC
++++ system.h
+@@ -41,6 +41,13 @@ char * stpncpy(char * dest, const char *
#define getenv(_s) __secure_getenv(_s)
#endif
diff --git a/archivers/ruby-lha/files/patch-math-remainder b/archivers/ruby-lha/files/patch-math-remainder
index 2e440d04917b..fbcf5c58d7bc 100644
--- a/archivers/ruby-lha/files/patch-math-remainder
+++ b/archivers/ruby-lha/files/patch-math-remainder
@@ -4,37 +4,46 @@ and allow this code to compile with Ruby-2.x
-mi
---- ext/slide.c 2006-09-17 13:45:51.000000000 -0400
-+++ ext/slide.c 2015-03-23 10:27:10.000000000 -0400
-@@ -88,5 +88,5 @@
+--- ext/slide.c.orig 2006-09-17 17:45:51 UTC
++++ ext/slide.c
+@@ -87,7 +87,7 @@ static struct decode_option decode_set;
+
static unsigned int txtsiz;
static unsigned long dicsiz;
-static unsigned int remainder;
+static unsigned int iremainder;
struct matchdata {
-@@ -163,5 +163,5 @@
+ int len;
+@@ -162,7 +162,7 @@ update_dict(pos, crc)
+
n = fread_crc(crc, &text[txtsiz - dicsiz], dicsiz, infile);
- remainder += n;
+ iremainder += n;
*pos -= dicsiz;
-@@ -271,5 +271,5 @@
+ for (i = 0; i < HSHSIZ; i++) {
+@@ -270,7 +270,7 @@ search_dict(token, pos, min, m)
+ /* re-search */
search_dict_1(token, pos, 0, off+2, m);
- if (m->len > remainder) m->len = remainder;
+ if (m->len > iremainder) m->len = iremainder;
}
-@@ -281,5 +281,5 @@
+ /* slide dictionary */
+@@ -280,7 +280,7 @@ next_token(token, pos, crc)
+ unsigned int *pos;
unsigned int *crc;
{
- remainder--;
+ iremainder--;
if (++*pos >= txtsiz - maxmatch) {
update_dict(pos, crc);
-@@ -317,9 +317,9 @@
+ #ifdef DEBUG
+@@ -316,17 +316,17 @@ encode(intf)
+ encode_set.encode_start();
memset(text, ' ', TXTSIZ);
- remainder = fread_crc(&crc, &text[dicsiz], txtsiz-dicsiz, infile);
@@ -46,10 +55,11 @@ and allow this code to compile with Ruby-2.x
+ if (match.len > iremainder) match.len = iremainder;
pos = dicsiz;
-@@ -327,5 +327,5 @@
+ token = INIT_HASH(pos);
insert_hash(token, pos); /* associate token and pos */
- while (remainder > 0 && ! unpackable) {
+ while (iremainder > 0 && ! unpackable) {
last = match;
+ next_token(&token, &pos, &crc);
diff --git a/archivers/ruby-lha/files/patch-tests b/archivers/ruby-lha/files/patch-tests
index bc81d47baad9..2607ce19a616 100644
--- a/archivers/ruby-lha/files/patch-tests
+++ b/archivers/ruby-lha/files/patch-tests
@@ -1,9 +1,11 @@
---- test/test.rb 2006-09-17 14:32:52.000000000 -0400
-+++ test/test.rb 2015-03-23 11:18:00.000000000 -0400
-@@ -21,5 +21,5 @@
+--- test/test.rb.orig 2006-09-17 18:32:52 UTC
++++ test/test.rb
+@@ -20,7 +20,7 @@ class TestLhaLib < Test::Unit::TestCase
+ assert(File.exist?('test.dat'))
obuff = ' ' * 256
(0..255).each do |x|
- obuff[x] = x
+ obuff[x] = x.chr
end
nbuff = nil
+ File.open('test.dat', 'rb') do |f|
diff --git a/archivers/ruby-lha/files/patch-warnings b/archivers/ruby-lha/files/patch-warnings
index 458060927389..75da76ac771a 100644
--- a/archivers/ruby-lha/files/patch-warnings
+++ b/archivers/ruby-lha/files/patch-warnings
@@ -1,6 +1,7 @@
---- ext/crcio.c 2006-09-17 12:38:22.000000000 -0400
-+++ ext/crcio.c 2015-03-23 10:29:59.000000000 -0400
-@@ -34,9 +34,11 @@
+--- ext/crcio.c.orig 2006-09-17 16:38:22 UTC
++++ ext/crcio.c
+@@ -33,11 +33,13 @@ make_crctable( /* void */ )
+
/* ------------------------------------------------------------------------ */
unsigned int
-calccrc(crc, p, n)
@@ -14,14 +15,18 @@
+
while (n-- > 0)
crc = UPDATE_CRC(crc, *p++);
-@@ -68,5 +70,5 @@
+ return crc;
+@@ -67,7 +69,7 @@ fread_crc(crcp, p, n, fp)
+ void
fwrite_crc(crcp, p, n, fp)
unsigned int *crcp;
- unsigned char *p;
+ const unsigned char *p;
int n;
FILE *fp;
-@@ -139,9 +141,11 @@
+ {
+@@ -138,11 +140,13 @@ putc_euc(c, fd)
+
/* ------------------------------------------------------------------------ */
int
-fwrite_txt(p, n, fp)
@@ -35,7 +40,9 @@
+
while (--n >= 0) {
if (*p != '\015' && *p != '\032') {
-@@ -161,6 +165,6 @@
+ #ifdef EUC
+@@ -160,13 +164,14 @@ fwrite_txt(p, n, fp)
+
/* ------------------------------------------------------------------------ */
int
-fread_txt(p, n, fp)
@@ -44,24 +51,28 @@
+ void *_p;
int n;
FILE *fp;
-@@ -168,4 +172,5 @@
+ {
int c;
int cnt = 0;
+ unsigned char *p = _p;
while (cnt < n) {
---- ext/extract.c 2006-09-17 13:45:51.000000000 -0400
-+++ ext/extract.c 2015-03-23 10:42:48.000000000 -0400
-@@ -15,5 +15,5 @@
+ if (getc_euc_cache != EOF) {
+--- ext/extract.c.orig 2006-09-17 17:45:51 UTC
++++ ext/extract.c
+@@ -14,7 +14,7 @@ decode_lzhuf(infp, outfp, original_size,
+ FILE *outfp;
size_t original_size;
size_t packed_size;
- char *name;
+ const char *name;
int method;
size_t *read_sizep;
---- ext/header.c 2006-09-17 12:38:22.000000000 -0400
-+++ ext/header.c 2015-03-23 10:54:36.000000000 -0400
-@@ -49,10 +49,11 @@
+ {
+--- ext/header.c.orig 2006-09-17 16:38:22 UTC
++++ ext/header.c
+@@ -48,12 +48,13 @@ int default_system_kanji_code = MULTIBYT
+ int default_system_kanji_code = NONE;
#endif
-int
@@ -76,42 +87,54 @@
+ const char *p = _p;
while (len--) sum += *p++;
-@@ -68,5 +69,5 @@
+
+@@ -67,7 +68,7 @@ dump_get_byte()
+ int c;
if (verbose_listing && verbose > 1)
- printf("%02d %2d: ", get_ptr - start_ptr, 1);
+ printf("%02td %2d: ", get_ptr - start_ptr, 1);
c = GET_BYTE();
if (verbose_listing && verbose > 1) {
-@@ -85,5 +86,5 @@
+ if (isprint(c))
+@@ -84,7 +85,7 @@ dump_skip_bytes(len)
+ {
if (len == 0) return;
if (verbose_listing && verbose > 1) {
- printf("%02d %2d: ", get_ptr - start_ptr, len);
+ printf("%02td %2d: ", get_ptr - start_ptr, len);
while (len--)
printf("0x%02x ", GET_BYTE());
-@@ -103,5 +104,5 @@
+ printf("... ignored\n");
+@@ -102,7 +103,7 @@ get_word()
+
#if DUMP_HEADER
if (verbose_listing && verbose > 1)
- printf("%02d %2d: ", get_ptr - start_ptr, 2);
+ printf("%02td %2d: ", get_ptr - start_ptr, 2);
#endif
b0 = GET_BYTE();
-@@ -131,5 +132,5 @@
+ b1 = GET_BYTE();
+@@ -130,7 +131,7 @@ get_longword()
+
#if DUMP_HEADER
if (verbose_listing && verbose > 1)
- printf("%02d %2d: ", get_ptr - start_ptr, 4);
+ printf("%02td %2d: ", get_ptr - start_ptr, 4);
#endif
b0 = GET_BYTE();
-@@ -164,5 +165,5 @@
+ b1 = GET_BYTE();
+@@ -163,7 +164,7 @@ get_bytes(buf, len, size)
+
#if DUMP_HEADER
if (verbose_listing && verbose > 1)
- printf("%02d %2d: \"", get_ptr - start_ptr, len);
+ printf("%02td %2d: \"", get_ptr - start_ptr, len);
for (i = 0; i < len; i++) {
-@@ -1172,9 +1173,9 @@
+ if (i < size) buf[i] = get_ptr[i];
+@@ -1171,11 +1172,11 @@ seek_lha_header(fp)
+
/* remove leading `xxxx/..' */
-static char *
@@ -125,16 +148,20 @@
+ const char *ptr = NULL;
if (strcmp(first, "..") == 0) {
-@@ -1201,5 +1202,5 @@
+ warning("Removing leading `..' from member name.");
+@@ -1200,7 +1201,7 @@ remove_leading_dots(char *path)
+ }
if (ptr) {
- warning("Removing leading `%.*s' from member name.", ptr-first, first);
+ warning("Removing leading `%.*s' from member name.", (int)(ptr - first), first);
return ptr;
}
---- ext/huf.c 2006-09-17 12:38:22.000000000 -0400
-+++ ext/huf.c 2015-03-23 10:37:51.000000000 -0400
-@@ -235,7 +235,5 @@
+
+--- ext/huf.c.orig 2006-09-17 16:38:22 UTC
++++ ext/huf.c
+@@ -234,9 +234,7 @@ send_block( /* void */ )
+ /* ------------------------------------------------------------------------ */
/* lh4, 5, 6, 7 */
void
-output_st1(c, p)
@@ -143,16 +170,20 @@
+output_st1(unsigned short c, unsigned short p)
{
static unsigned short cpos;
---- ext/lha.h 2006-09-18 04:53:29.000000000 -0400
-+++ ext/lha.h 2015-03-23 11:03:01.000000000 -0400
-@@ -212,4 +212,6 @@
+
+--- ext/lha.h.orig 2006-09-18 08:53:29 UTC
++++ ext/lha.h
+@@ -211,6 +211,8 @@ int fnmatch(const char *pattern, const c
+
#include "lha_macro.h"
+unsigned char *alloc_buf(void);
+
#define exit(n) lha_exit(n)
-@@ -301,32 +303,34 @@
+ struct encode_option {
+@@ -300,41 +302,56 @@ LHALIB_EXTERN void cmd_extract(const cha
+ LHALIB_EXTERN FILE * open_old_archive(const char* archive);
LHALIB_EXTERN boolean need_file(const char*);
LHALIB_EXTERN boolean archive_is_msdos_sfx1(const char*);
-LHALIB_EXTERN void output_dyn();
@@ -214,7 +245,8 @@
+LHALIB_EXTERN void init_code_cache(void);
LHALIB_EXTERN void putcode(unsigned char n, unsigned short x);
LHALIB_EXTERN void putbits(unsigned char n, unsigned short x);
-@@ -335,5 +339,18 @@
+ LHALIB_EXTERN unsigned short getbits(unsigned char n);
+ LHALIB_EXTERN void fillbuf(unsigned char n);
LHALIB_EXTERN void encode_p_st0(unsigned short j);
-
@@ -234,34 +266,42 @@
+PRINTF_ARGS(int xsnprintf(char *dst, size_t size, const char *fmt, ...), 3, 4);
#define start_indicator(name, size, ing, len) 0
---- ext/lhalib.c 2006-09-18 05:11:35.000000000 -0400
-+++ ext/lhalib.c 2015-03-23 11:00:35.000000000 -0400
-@@ -19,5 +19,5 @@
+ #define finish_indicator(name, ed) 0
+--- ext/lhalib.c.orig 2006-09-18 09:11:35 UTC
++++ ext/lhalib.c
+@@ -18,7 +18,7 @@
+ #define LHALIB_VERSION "0.8.1"
#include "lha.h"
-#include "st.h"
+#include <ruby/st.h>
static VALUE lhalib;
-@@ -76,5 +76,5 @@
+
+@@ -75,7 +75,7 @@ static VALUE s_ex(int argc, VALUE* argv,
+ VALUE file;
proc = Qnil;
rb_scan_args(argc, argv, "1&", &file, &proc);
- rb_check_safe_str(file);
+ SafeStringValue(file);
rb_secure(4);
---- ext/lharc.c 2006-09-17 12:38:22.000000000 -0400
-+++ ext/lharc.c 2015-03-23 10:58:33.000000000 -0400
-@@ -53,5 +53,5 @@
+ file_count = 0;
+--- ext/lharc.c.orig 2006-09-17 16:38:22 UTC
++++ ext/lharc.c
+@@ -52,7 +52,7 @@ static int error_occurred;
+ /* ------------------------------------------------------------------------ */
static boolean
open_old_archive_1(name, v_fp)
- char *name;
+ const char *name;
FILE **v_fp;
{
---- ext/lhext.c 2006-09-17 12:38:22.000000000 -0400
-+++ ext/lhext.c 2015-03-23 10:41:48.000000000 -0400
-@@ -27,6 +27,7 @@
+ FILE *fp;
+--- ext/lhext.c.orig 2006-09-17 16:38:22 UTC
++++ ext/lhext.c
+@@ -26,8 +26,9 @@ static char *methods[] =
+ NULL
};
-static void add_dirinfo(char* name, LzHeader* hdr);
@@ -271,7 +311,9 @@
+static int is_directory_traversal(const char *path);
/* ------------------------------------------------------------------------ */
-@@ -396,6 +397,6 @@
+ static boolean
+@@ -395,8 +396,8 @@ cmd_extract(const char* archive_name, ad
+ return;
}
-int
@@ -280,16 +322,20 @@
+is_directory_traversal(const char *path)
{
int state = 0;
-@@ -437,5 +438,5 @@
+
+@@ -436,7 +437,7 @@ typedef struct lhdDirectoryInfo_t {
+
static LzHeaderList *dirinfo;
-static void add_dirinfo(char *name, LzHeader *hdr)
+static void add_dirinfo(const char *name, LzHeader *hdr)
{
LzHeaderList *p;
---- ext/maketbl.c 2006-09-17 12:38:22.000000000 -0400
-+++ ext/maketbl.c 2015-03-23 10:32:06.000000000 -0400
-@@ -10,9 +10,6 @@
+
+--- ext/maketbl.c.orig 2006-09-17 16:38:22 UTC
++++ ext/maketbl.c
+@@ -9,11 +9,8 @@
+ #include "lha.h"
void
-make_table(nchar, bitlen, tablebits, table)
@@ -301,18 +347,22 @@
+ unsigned short table[])
{
unsigned short count[17]; /* count of bitlen */
---- ext/maketree.c 2006-09-17 13:36:33.000000000 -0400
-+++ ext/maketree.c 2015-03-23 11:02:50.000000000 -0400
-@@ -96,5 +96,5 @@
+ unsigned short weight[17]; /* 0x10000ul >> bitlen */
+--- ext/maketree.c.orig 2006-09-17 17:36:33 UTC
++++ ext/maketree.c
+@@ -95,7 +95,7 @@ downheap(i, heap, heapsize, freq)
+ int i;
short *heap;
size_t heapsize;
- unsigned short *freq;
+ const unsigned short *freq;
{
short j, k;
---- ext/util.c 2006-09-18 04:53:29.000000000 -0400
-+++ ext/util.c 2015-03-23 10:57:53.000000000 -0400
-@@ -115,8 +115,9 @@
+
+--- ext/util.c.orig 2006-09-18 08:53:29 UTC
++++ ext/util.c
+@@ -114,10 +114,11 @@ archive_is_msdos_sfx1(const char* name)
+
int
#if STDC_HEADERS
-xsnprintf(char *dest, size_t size, char *fmt, ...)
@@ -324,3 +374,4 @@
+ const char *fmt;
size_t size;
va_dcl
+ #endif
diff --git a/archivers/rubygem-bzip2-ruby/files/patch-ext__bzip2.c b/archivers/rubygem-bzip2-ruby/files/patch-ext__bzip2.c
deleted file mode 100644
index bf3684c0d271..000000000000
--- a/archivers/rubygem-bzip2-ruby/files/patch-ext__bzip2.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./ext/bzip2.c.orig 2014-08-23 18:00:07.743290567 +0000
-+++ ./ext/bzip2.c 2014-08-23 18:00:07.790289811 +0000
-@@ -247,9 +247,6 @@
-
- Get_BZ2(obj, bzf);
- res = bz_writer_internal_close(bzf);
-- if (!NIL_P(res) && (bzf->flags & BZ2_RB_INTERNAL)) {
-- RBASIC(res)->klass = rb_cString;
-- }
- return res;
- }
-
diff --git a/archivers/rubygem-bzip2-ruby/files/patch-ext__extconf.rb b/archivers/rubygem-bzip2-ruby/files/patch-ext__extconf.rb
deleted file mode 100644
index e0d93697504f..000000000000
--- a/archivers/rubygem-bzip2-ruby/files/patch-ext__extconf.rb
+++ /dev/null
@@ -1,17 +0,0 @@
---- ./ext/extconf.rb.orig 2013-12-12 21:55:36.054257218 +0000
-+++ ./ext/extconf.rb 2013-12-12 21:55:51.579256255 +0000
-@@ -11,11 +11,9 @@
- $static = nil
- end
-
-- if RUBY_VERSION =~ /1.9/
-- $CFLAGS << ' -DRUBY_19_COMPATIBILITY'
-- end
-+ $CFLAGS << ' -DRUBY_19_COMPATIBILITY'
-
- create_makefile('bzip2_ext')
- else
- puts "libbz2 not found, maybe try manually specifying --with-bz2-dir to find it?"
--end
-\ No newline at end of file
-+end
diff --git a/archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c b/archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c
new file mode 100644
index 000000000000..05384a6fbdda
--- /dev/null
+++ b/archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c
@@ -0,0 +1,12 @@
+--- ext/bzip2.c.orig 2016-07-26 12:25:25 UTC
++++ ext/bzip2.c
+@@ -247,9 +247,6 @@ static VALUE bz_writer_close(VALUE obj)
+
+ Get_BZ2(obj, bzf);
+ res = bz_writer_internal_close(bzf);
+- if (!NIL_P(res) && (bzf->flags & BZ2_RB_INTERNAL)) {
+- RBASIC(res)->klass = rb_cString;
+- }
+ return res;
+ }
+
diff --git a/archivers/rubygem-bzip2-ruby/files/patch-ext_extconf.rb b/archivers/rubygem-bzip2-ruby/files/patch-ext_extconf.rb
new file mode 100644
index 000000000000..f64c6649612e
--- /dev/null
+++ b/archivers/rubygem-bzip2-ruby/files/patch-ext_extconf.rb
@@ -0,0 +1,17 @@
+--- ext/extconf.rb.orig 2016-07-26 12:25:25 UTC
++++ ext/extconf.rb
+@@ -11,11 +11,9 @@ if have_library("bz2", "BZ2_bzWriteOpen"
+ $static = nil
+ end
+
+- if RUBY_VERSION =~ /1.9/
+- $CFLAGS << ' -DRUBY_19_COMPATIBILITY'
+- end
++ $CFLAGS << ' -DRUBY_19_COMPATIBILITY'
+
+ create_makefile('bzip2_ext')
+ else
+ puts "libbz2 not found, maybe try manually specifying --with-bz2-dir to find it?"
+-end
+\ No newline at end of file
++end
diff --git a/archivers/rvm/files/patch-reporter.cc b/archivers/rvm/files/patch-reporter.cc
index 129bf7fd6529..f2886daae0b4 100644
--- a/archivers/rvm/files/patch-reporter.cc
+++ b/archivers/rvm/files/patch-reporter.cc
@@ -1,10 +1,10 @@
---- reporter.cc.orig Thu Mar 25 00:28:09 2004
-+++ reporter.cc Sat Apr 3 21:26:51 2004
+--- reporter.cc.orig 2014-01-07 20:30:56 UTC
++++ reporter.cc
@@ -4,6 +4,7 @@
#include <string>
#include <vector>
#include <algorithm>
+#include <cassert>
- #include "debug.h"
+ #include "asserts.h"
#include "error.h"
diff --git a/archivers/rvm/files/patch-vaulter.cc b/archivers/rvm/files/patch-vaulter.cc
new file mode 100644
index 000000000000..479fe9942810
--- /dev/null
+++ b/archivers/rvm/files/patch-vaulter.cc
@@ -0,0 +1,10 @@
+--- vaulter.cc.orig 2014-11-12 13:09:24 UTC
++++ vaulter.cc
+@@ -4,6 +4,7 @@
+ #include <vector>
+ #include <map>
+ #include <string>
++#include <cassert>
+
+ #include "asserts.h"
+ #include "error.h"
diff --git a/archivers/rvm/files/patch-vaulter.cpp b/archivers/rvm/files/patch-vaulter.cpp
deleted file mode 100644
index ba57d2db207a..000000000000
--- a/archivers/rvm/files/patch-vaulter.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- vaulter.cc.orig Wed Mar 24 05:03:42 2004
-+++ vaulter.cc Sat Apr 3 21:24:37 2004
-@@ -4,6 +4,7 @@
- #include <vector>
- #include <map>
- #include <string>
-+#include <cassert>
-
- #include "debug.h"
- #include "error.h"
diff --git a/archivers/rzip/files/patch-Makefile.in b/archivers/rzip/files/patch-Makefile.in
index 31c6ad48cef4..5d76bac31eac 100644
--- a/archivers/rzip/files/patch-Makefile.in
+++ b/archivers/rzip/files/patch-Makefile.in
@@ -1,5 +1,5 @@
---- ./Makefile.in.orig 2013-11-15 10:34:18.246331970 +0100
-+++ ./Makefile.in 2013-11-15 10:34:38.383364598 +0100
+--- Makefile.in.orig 2006-02-14 00:38:23 UTC
++++ Makefile.in
@@ -3,8 +3,8 @@
prefix=@prefix@
diff --git a/archivers/sharutils/files/patch-intl_Makefile.in b/archivers/sharutils/files/patch-intl_Makefile.in
new file mode 100644
index 000000000000..723c5e53268c
--- /dev/null
+++ b/archivers/sharutils/files/patch-intl_Makefile.in
@@ -0,0 +1,22 @@
+--- intl/Makefile.in.orig 2015-05-30 15:35:20 UTC
++++ intl/Makefile.in
+@@ -451,7 +451,6 @@ install-exec: all
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+- $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ else \
+ : ; \
+@@ -559,11 +558,6 @@ uninstall:
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-del.sed $$dest > $$temp; \
+- if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+- rm -f $$dest; \
+- else \
+- $(INSTALL_DATA) $$temp $$dest; \
+- fi; \
+ rm -f $$temp; \
+ fi; \
+ else \
diff --git a/archivers/sharutils/files/patch-intl__Makefile.in b/archivers/sharutils/files/patch-intl__Makefile.in
deleted file mode 100644
index b88aa5df3f18..000000000000
--- a/archivers/sharutils/files/patch-intl__Makefile.in
+++ /dev/null
@@ -1,22 +0,0 @@
---- intl/Makefile.in.orig 2013-06-11 08:30:00.000000000 -0300
-+++ intl/Makefile.in 2013-06-11 08:31:11.000000000 -0300
-@@ -447,7 +447,6 @@
- temp=$(DESTDIR)$(localedir)/t-locale.alias; \
- dest=$(DESTDIR)$(localedir)/locale.alias; \
- sed -f ref-add.sed $$orig > $$temp; \
-- $(INSTALL_DATA) $$temp $$dest; \
- rm -f $$temp; \
- else \
- : ; \
-@@ -556,11 +555,6 @@
- temp=$(DESTDIR)$(localedir)/t-locale.alias; \
- dest=$(DESTDIR)$(localedir)/locale.alias; \
- sed -f ref-del.sed $$dest > $$temp; \
-- if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
-- rm -f $$dest; \
-- else \
-- $(INSTALL_DATA) $$temp $$dest; \
-- fi; \
- rm -f $$temp; \
- fi; \
- else \
diff --git a/archivers/sharutils/files/patch-lib_Makefile.in b/archivers/sharutils/files/patch-lib_Makefile.in
new file mode 100644
index 000000000000..3dfc30ed5eeb
--- /dev/null
+++ b/archivers/sharutils/files/patch-lib_Makefile.in
@@ -0,0 +1,11 @@
+--- lib/Makefile.in.orig 2015-05-30 15:35:32 UTC
++++ lib/Makefile.in
+@@ -2126,7 +2126,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ freebsd* | darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/archivers/sharutils/files/patch-lib__Makefile.in b/archivers/sharutils/files/patch-lib__Makefile.in
deleted file mode 100644
index 5d48eed40a6b..000000000000
--- a/archivers/sharutils/files/patch-lib__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/Makefile.in.orig 2010-03-04 12:31:24.000000000 -0300
-+++ lib/Makefile.in 2010-03-04 12:31:35.000000000 -0300
-@@ -1592,7 +1592,7 @@
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ freebsd* | darwin* | cygwin* | mingw* | pw32* | cegcc*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/archivers/snappy-java/files/patch-likelinux b/archivers/snappy-java/files/patch-likelinux
index e2cbea524c08..8c674a37d205 100644
--- a/archivers/snappy-java/files/patch-likelinux
+++ b/archivers/snappy-java/files/patch-likelinux
@@ -1,6 +1,6 @@
---- Makefile.common.orig 2011-10-05 03:29:42.000000000 +0200
-+++ Makefile.common 2013-05-13 02:19:31.000000000 +0200
-@@ -50,8 +50,8 @@
+--- Makefile.common.orig 2011-10-05 01:29:42 UTC
++++ Makefile.common
+@@ -50,8 +50,8 @@ endif
Default_CXX := g++
Default_STRIP := strip
diff --git a/archivers/squsq/files/patch-usq.c b/archivers/squsq/files/patch-usq.c
index 496a192ae68f..c1287d023034 100644
--- a/archivers/squsq/files/patch-usq.c
+++ b/archivers/squsq/files/patch-usq.c
@@ -1,6 +1,6 @@
---- usq.c.orig Sun Jan 17 01:54:04 1988
-+++ usq.c Sun Jan 17 01:54:05 1988
-@@ -215,7 +215,7 @@
+--- usq.c.orig 1988-01-17 00:54:04 UTC
++++ usq.c
+@@ -215,7 +215,7 @@ char *infile;
goto closein;
}
@@ -9,7 +9,7 @@
filecrc = getx16(inbuff);
#else
filecrc = getw16(inbuff);
-@@ -239,7 +239,7 @@
+@@ -239,7 +239,7 @@ char *infile;
printf("%s -> %s: ", infile, outfile);
#endif
diff --git a/archivers/star/files/patch-rmt_Makefile b/archivers/star/files/patch-rmt_Makefile
index 0d97110a8ec6..6affa15542a3 100644
--- a/archivers/star/files/patch-rmt_Makefile
+++ b/archivers/star/files/patch-rmt_Makefile
@@ -1,4 +1,4 @@
---- rmt/Makefile.orig 2016-02-10 20:47:23 UTC
+--- rmt/Makefile.orig 2011-04-15 20:06:22 UTC
+++ rmt/Makefile
@@ -6,13 +6,13 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
###########################################################################
diff --git a/archivers/star/files/patch-rmt_Makefile.man b/archivers/star/files/patch-rmt_Makefile.man
index 9243d0e8ef38..5898f2547021 100644
--- a/archivers/star/files/patch-rmt_Makefile.man
+++ b/archivers/star/files/patch-rmt_Makefile.man
@@ -1,4 +1,4 @@
---- rmt/Makefile.man.orig 2016-02-10 20:47:23 UTC
+--- rmt/Makefile.man.orig 2000-12-04 21:25:51 UTC
+++ rmt/Makefile.man
@@ -8,10 +8,10 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
###########################################################################
diff --git a/archivers/star/files/patch-star_Makefile b/archivers/star/files/patch-star_Makefile
index 42e4205fd3b1..84179542d96c 100644
--- a/archivers/star/files/patch-star_Makefile
+++ b/archivers/star/files/patch-star_Makefile
@@ -1,4 +1,4 @@
---- star/Makefile.orig 2016-02-10 20:47:23 UTC
+--- star/Makefile.orig 2010-05-13 19:47:27 UTC
+++ star/Makefile
@@ -15,7 +15,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
INSDIR= bin
diff --git a/archivers/star/files/patch-star_star.1 b/archivers/star/files/patch-star_star.1
index 5c459c9297c0..e4cd5c224792 100644
--- a/archivers/star/files/patch-star_star.1
+++ b/archivers/star/files/patch-star_star.1
@@ -1,4 +1,4 @@
---- star/star.1.orig 2016-02-10 20:47:23 UTC
+--- star/star.1.orig 2011-04-12 17:34:22 UTC
+++ star/star.1
@@ -32,14 +32,6 @@ star \- unique standard tape archiver
.I file1 .\|.\|. filen
diff --git a/archivers/torrentzip/files/patch-src-trrntzip.c b/archivers/torrentzip/files/patch-src-trrntzip.c
index e54c5b305054..ee9c83c33731 100644
--- a/archivers/torrentzip/files/patch-src-trrntzip.c
+++ b/archivers/torrentzip/files/patch-src-trrntzip.c
@@ -1,6 +1,6 @@
---- src/trrntzip.c-orig Mon May 2 08:38:40 2005
-+++ src/trrntzip.c Sat May 7 02:51:55 2005
-@@ -716,7 +716,7 @@
+--- src/trrntzip.c.orig 2005-05-02 13:38:40 UTC
++++ src/trrntzip.c
+@@ -716,7 +716,7 @@ RecursiveMigrate (const char *pszPath, W
if (dirp)
{
@@ -9,7 +9,7 @@
// our new zipfiles if they are returned by readdir() a second time.
while (direntp = readdir (dirp))
{
-@@ -732,7 +732,7 @@
+@@ -732,7 +732,7 @@ RecursiveMigrate (const char *pszPath, W
if (strstr (szTmpBuf, ".zip\0"))
{
@@ -18,7 +18,7 @@
}
}
// Zip file is actually a dir
-@@ -780,9 +780,9 @@
+@@ -780,9 +780,9 @@ RecursiveMigrate (const char *pszPath, W
sprintf (szTmpBuf, "%s", direntp->d_name);
strlwr (szTmpBuf);
diff --git a/archivers/unace/files/patch-CVE-2015-2063 b/archivers/unace/files/patch-CVE-2015-2063
index 72c0fb38e707..046844c6e261 100644
--- a/archivers/unace/files/patch-CVE-2015-2063
+++ b/archivers/unace/files/patch-CVE-2015-2063
@@ -10,13 +10,9 @@ Bug-Debian: https://bugs.debian.org/775003
Forwarded: no
Last-Update: 2015-02-24
----
- unace.c | 25 +++++++++++++++++++++++--
- 1 file changed, 23 insertions(+), 2 deletions(-)
-
---- unace.c
+--- unace.c.orig 1998-07-01 08:29:00 UTC
+++ unace.c
-@@ -113,6 +113,7 @@ INT read_header(INT print_err)
+@@ -111,6 +111,7 @@ INT read_header(INT print_err)
{
USHORT rd,
head_size,
@@ -24,7 +20,7 @@ Last-Update: 2015-02-24
crc_ok;
LONG crc;
UCHAR *tp=readbuf;
-@@ -128,6 +129,9 @@ INT read_header(INT print_err)
+@@ -126,6 +127,9 @@ INT read_header(INT print_err)
#endif
// read size_headrdb bytes into
head_size = head.HEAD_SIZE; // header structure
@@ -34,7 +30,7 @@ Last-Update: 2015-02-24
rd = (head_size > size_headrdb) ? size_headrdb : head_size;
if (read(archan, readbuf, rd) < rd)
return 0;
-@@ -147,7 +151,12 @@ INT read_header(INT print_err)
+@@ -145,7 +149,12 @@ INT read_header(INT print_err)
head.HEAD_FLAGS=BUFP2WORD(tp);
if (head.HEAD_FLAGS & ACE_ADDSIZE)
@@ -47,7 +43,7 @@ Last-Update: 2015-02-24
else
skipsize = 0;
-@@ -158,6 +167,9 @@ INT read_header(INT print_err)
+@@ -156,6 +165,9 @@ INT read_header(INT print_err)
switch (head.HEAD_TYPE) // specific buffer to head conversion
{
case MAIN_BLK:
@@ -57,7 +53,7 @@ Last-Update: 2015-02-24
memcpy(mhead.ACESIGN, tp, acesign_len); tp+=acesign_len;
mhead.VER_MOD=*tp++;
mhead.VER_CR =*tp++;
-@@ -168,9 +180,15 @@ INT read_header(INT print_err)
+@@ -166,9 +178,15 @@ INT read_header(INT print_err)
mhead.RES2 =BUFP2WORD(tp);
mhead.RES =BUFP2LONG(tp);
mhead.AV_SIZE=*tp++;
@@ -74,7 +70,7 @@ Last-Update: 2015-02-24
fhead.PSIZE =BUFP2LONG(tp);
fhead.SIZE =BUFP2LONG(tp);
fhead.FTIME =BUFP2LONG(tp);
-@@ -181,7 +199,10 @@ INT read_header(INT print_err)
+@@ -179,7 +197,10 @@ INT read_header(INT print_err)
fhead.TECH.PARM =BUFP2WORD(tp);
fhead.RESERVED =BUFP2WORD(tp);
fhead.FNAME_SIZE=BUFP2WORD(tp);
diff --git a/archivers/unace/files/patch-uac__crt.c b/archivers/unace/files/patch-uac__crt.c
index 0502e49a5d01..857c44127b16 100644
--- a/archivers/unace/files/patch-uac__crt.c
+++ b/archivers/unace/files/patch-uac__crt.c
@@ -1,4 +1,4 @@
---- uac_crt.c.orig
+--- uac_crt.c.orig 1998-07-01 08:29:00 UTC
+++ uac_crt.c
@@ -33,12 +33,15 @@
@@ -19,7 +19,7 @@
s[i] = 0;
if (nopath)
-@@ -56,22 +59,72 @@
+@@ -56,22 +59,72 @@ CHAR *ace_fname(CHAR * s, thead * head,
}
#endif
diff --git a/archivers/unace/files/patch-unace.c b/archivers/unace/files/patch-unace.c
index 77a8bf769f81..398895e2213e 100644
--- a/archivers/unace/files/patch-unace.c
+++ b/archivers/unace/files/patch-unace.c
@@ -1,6 +1,6 @@
---- unace.c.orig
+--- unace.c.orig 1998-07-01 08:29:00 UTC
+++ unace.c
-@@ -240,6 +240,7 @@
+@@ -240,6 +240,7 @@ INT read_arc_head(void) // searc
INT open_archive(INT print_err) // opens archive (or volume)
{
CHAR av_str[80];
@@ -8,7 +8,7 @@
archan = open(aname, O_RDONLY | O_BINARY); // open file
-@@ -263,8 +264,11 @@
+@@ -263,8 +264,11 @@ INT open_archive(INT print_err)
sprintf(av_str, "\ncreated on %d.%d.%d by ",
ts_day(adat.time_cr), ts_month(adat.time_cr), ts_year(adat.time_cr));
printf(av_str);
@@ -22,7 +22,7 @@
printf("%s\n\n", av_str);
}
comment_out("Main comment:"); // print main comment
-@@ -300,7 +304,7 @@
+@@ -300,7 +304,7 @@ void get_next_volname(void)
INT proc_vol(void) // opens volume
{
INT i;
@@ -31,7 +31,7 @@
// if f_allvol_pr is 2 we have -y and should never ask
if ((!fileexists_insense(aname) && f_allvol_pr != 2) || !f_allvol_pr)
-@@ -428,7 +432,7 @@
+@@ -428,7 +432,7 @@ void extract_files(int nopath, int test)
if (head.HEAD_TYPE == FILE_BLK)
{
comment_out("File comment:"); // show file comment
@@ -40,7 +40,7 @@
printf("\n%s", file);
flush;
dcpr_init_file(); // initialize decompression of file
-@@ -496,7 +500,7 @@
+@@ -496,7 +500,7 @@ void list_files(int verbose)
if (head.HEAD_TYPE == FILE_BLK)
{
ULONG ti=fhead.FTIME;
@@ -49,7 +49,7 @@
size += fhead.SIZE;
psize +=
-@@ -588,7 +592,8 @@
+@@ -588,7 +592,8 @@ int main(INT argc, CHAR * argv[])
init_unace(); // initialize unace
diff --git a/archivers/unalz/files/patch-UnAlz.cpp b/archivers/unalz/files/patch-UnAlz.cpp
index d440e9108cc0..627cce0c8cbe 100644
--- a/archivers/unalz/files/patch-UnAlz.cpp
+++ b/archivers/unalz/files/patch-UnAlz.cpp
@@ -1,4 +1,4 @@
---- UnAlz.cpp.orig 2014-07-07 10:40:53.000000000 +0000
+--- UnAlz.cpp.orig 2016-07-26 12:39:47 UTC
+++ UnAlz.cpp
@@ -37,7 +37,7 @@
# include <errno.h>
diff --git a/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd b/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd
index 021d56a92c93..1552fbb68434 100644
--- a/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd
+++ b/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd
@@ -1,4 +1,4 @@
---- UniversalDetector/Makefile.freebsd.orig 2015-09-23 20:24:59 UTC
+--- UniversalDetector/Makefile.freebsd.orig 2016-05-17 06:39:04 UTC
+++ UniversalDetector/Makefile.freebsd
@@ -1,10 +1,7 @@
# Compilers and linkers
diff --git a/archivers/unarchiver/files/patch-XADMaster_Makefile.common b/archivers/unarchiver/files/patch-XADMaster_Makefile.common
index 353e5576da1d..d6ea2a344371 100644
--- a/archivers/unarchiver/files/patch-XADMaster_Makefile.common
+++ b/archivers/unarchiver/files/patch-XADMaster_Makefile.common
@@ -1,6 +1,6 @@
---- XADMaster/Makefile.common.orig 2015-09-23 20:24:59 UTC
+--- XADMaster/Makefile.common.orig 2016-05-17 06:39:04 UTC
+++ XADMaster/Makefile.common
-@@ -206,12 +206,6 @@ LIBRARY_C_FILES = BWT.c \
+@@ -209,12 +209,6 @@ LIBRARY_C_FILES = BWT.c \
PPMd/VariantG.c \
PPMd/VariantH.c \
PPMd/VariantI.c \
diff --git a/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd b/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd
index 1bb2b350c391..b2f911d28c3f 100644
--- a/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd
+++ b/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd
@@ -1,4 +1,4 @@
---- XADMaster/Makefile.freebsd.orig 2015-09-23 20:24:59 UTC
+--- XADMaster/Makefile.freebsd.orig 2016-05-17 06:39:04 UTC
+++ XADMaster/Makefile.freebsd
@@ -1,10 +1,7 @@
# Compilers and linkers
diff --git a/archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h b/archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h
index 97c304b11734..a58dd5f5a5dd 100644
--- a/archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h
+++ b/archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h
@@ -1,4 +1,4 @@
---- XADMaster/XADWinZipWavPackHandle.h.orig 2015-09-23 20:24:59 UTC
+--- XADMaster/XADWinZipWavPackHandle.h.orig 2016-05-17 06:39:04 UTC
+++ XADMaster/XADWinZipWavPackHandle.h
@@ -1,6 +1,6 @@
#import "CSBlockStreamHandle.h"
diff --git a/archivers/unarj/files/patch-CVE-2004-0947 b/archivers/unarj/files/patch-CVE-2004-0947
index b66db317b198..317d595de984 100644
--- a/archivers/unarj/files/patch-CVE-2004-0947
+++ b/archivers/unarj/files/patch-CVE-2004-0947
@@ -1,6 +1,8 @@
- Fix buffer overflow problem in filename handling (CAN-2004-0947)
-Index: unarj.c
-@@ -217,7 +217,7 @@ static uchar arj_flags;
+
+--- unarj.c.orig 2002-06-05 08:28:06 UTC
++++ unarj.c
+@@ -213,7 +213,7 @@ static uchar arj_flags;
static short method;
static uint file_mode;
static ulong time_stamp;
@@ -9,7 +11,7 @@ Index: unarj.c
static ushort host_data;
static uchar *get_ptr;
static UCRC file_crc;
-@@ -608,6 +608,7 @@ char *name;
+@@ -604,6 +604,7 @@ char *name;
error(M_BADHEADR, "");
crc = CRC_MASK;
@@ -17,7 +19,7 @@ Index: unarj.c
fread_crc(header, (int) headersize, fd);
header_crc = fget_crc(fd);
if ((crc ^ CRC_MASK) != header_crc)
-@@ -632,9 +633,13 @@ char *name;
+@@ -628,9 +629,13 @@ char *name;
if (origsize < 0 || compsize < 0)
error(M_HEADRCRC, "");
@@ -31,7 +33,7 @@ Index: unarj.c
if (host_os != OS)
strparity((uchar *)filename);
if ((arj_flags & PATHSYM_FLAG) != 0)
-@@ -733,11 +738,11 @@ extract()
+@@ -727,11 +732,11 @@ extract()
no_output = 0;
if (command == 'E')
diff --git a/archivers/unarj/files/patch-CVE-2004-1027 b/archivers/unarj/files/patch-CVE-2004-1027
index 7a236040cc09..28b54b85f922 100644
--- a/archivers/unarj/files/patch-CVE-2004-1027
+++ b/archivers/unarj/files/patch-CVE-2004-1027
@@ -1,30 +1,8 @@
- Fix unchecked path extraction problem (CAN-2004-1027)
-Index: unarj.c
-@@ -235,6 +235,8 @@ static UCRC crctable[UCHAR_MAX + 1];
-
- /* Functions */
-
-+void copy_path_relative(char *dest, char *src, size_t len);
-+
- static void
- make_crctable()
- {
-@@ -738,11 +740,11 @@ extract()
-
- no_output = 0;
- if (command == 'E')
-- strncopy(name, &filename[entry_pos], sizeof(name));
-+ copy_path_relative(name, &filename[entry_pos], sizeof(name));
- else
- {
- strcpy(name, DEFAULT_DIR);
-- strncopy(name+strlen(name), filename, sizeof(name)-strlen(name));
-+ copy_path_relative(name+strlen(name), filename, sizeof(name)-strlen(name));
- }
-
- if (host_os != OS)
-Index: Makefile
-@@ -9,7 +9,9 @@
+
+--- Makefile.orig 2004-11-29 13:47:24 UTC
++++ Makefile
+@@ -9,7 +9,9 @@ environ.o: environ.c unarj.h
decode.o: decode.c unarj.h
@@ -35,7 +13,8 @@ Index: Makefile
unarj: $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o unarj
-Index: sanitize.c
+--- sanitize.c.orig 2016-07-26 12:41:37 UTC
++++ sanitize.c
@@ -0,0 +1,81 @@
+/*
+ * Path sanitation code by Ludwig Nussel <ludwig.nussel@suse.de>. Public Domain.
@@ -118,3 +97,28 @@ Index: sanitize.c
+ }
+ o[len?0:-1] = '\0';
+}
+--- unarj.c.orig 2016-07-26 12:41:37 UTC
++++ unarj.c
+@@ -231,6 +231,8 @@ static UCRC crctable[UCHAR_MAX + 1];
+
+ /* Functions */
+
++void copy_path_relative(char *dest, char *src, size_t len);
++
+ static void
+ make_crctable()
+ {
+@@ -732,11 +734,11 @@ extract()
+
+ no_output = 0;
+ if (command == 'E')
+- strncopy(name, &filename[entry_pos], sizeof(name));
++ copy_path_relative(name, &filename[entry_pos], sizeof(name));
+ else
+ {
+ strcpy(name, DEFAULT_DIR);
+- strncopy(name+strlen(name), filename, sizeof(name)-strlen(name));
++ copy_path_relative(name+strlen(name), filename, sizeof(name)-strlen(name));
+ }
+
+ if (host_os != OS)
diff --git a/archivers/unarj/files/patch-environ.c b/archivers/unarj/files/patch-environ.c
index 43f2e4c66c96..ed827668c968 100644
--- a/archivers/unarj/files/patch-environ.c
+++ b/archivers/unarj/files/patch-environ.c
@@ -1,6 +1,6 @@
---- environ.c.orig Mon Sep 29 14:00:24 1997
-+++ environ.c Thu Feb 18 01:14:35 1999
-@@ -430,16 +430,24 @@
+--- environ.c.orig 2002-06-05 08:28:06 UTC
++++ environ.c
+@@ -430,16 +430,24 @@ uint host;
#define SUBS_DEFINED
@@ -28,7 +28,7 @@
FILE *
file_open(name, mode)
-@@ -535,8 +543,12 @@
+@@ -535,8 +543,12 @@ uint mode;
}
long
@@ -42,7 +42,7 @@
#define NOONOFFSET 43200L
#define SEC_IN_DAY (24L * 60L * 60L)
#define INV_VALUE (SEC_IN_DAY + 1L)
-@@ -552,6 +564,7 @@
+@@ -552,6 +564,7 @@ gettz() /* returns the offset fr
noontm = localtime(&noon);
retval = NOONOFFSET - 60 * (60 * noontm->tm_hour - noontm->tm_min);
return retval;
@@ -50,7 +50,7 @@
}
long
-@@ -600,19 +613,29 @@
+@@ -600,19 +613,29 @@ uint host;
{
time_t m_time;
struct utimbuf
diff --git a/archivers/unarj/files/patch-unarj.c b/archivers/unarj/files/patch-unarj.c
index 5b683946234c..d348abe13792 100644
--- a/archivers/unarj/files/patch-unarj.c
+++ b/archivers/unarj/files/patch-unarj.c
@@ -1,5 +1,5 @@
---- unarj.c.orig Wed Jun 5 12:28:06 2002
-+++ unarj.c Mon Nov 29 17:48:27 2004
+--- unarj.c.orig 2002-06-05 08:28:06 UTC
++++ unarj.c
@@ -54,6 +54,10 @@
#include <stdlib.h>
#include <string.h>
@@ -11,7 +11,7 @@
#else /* !MODERN */
extern void free();
extern void exit();
-@@ -718,6 +722,8 @@
+@@ -718,6 +722,8 @@ static int
extract()
{
char name[FNAME_MAX];
@@ -20,11 +20,10 @@
if (check_flags())
{
-@@ -736,6 +742,21 @@
-
+@@ -737,6 +743,21 @@ extract()
if (host_os != OS)
default_case_path(name);
-+
+
+
+ /*
+ 8/8/2000 Phil Knirsch: Bugfix to create subdirectories. Unarj didn't
@@ -39,6 +38,7 @@
+ mkdir(dir, 0777);
+ pos = strchr(pos+1, PATH_CHAR);
+ }
-
++
if (file_exists(name))
{
+ printf(M_FEXISTS, name);
diff --git a/archivers/unarj/files/patch-unarj.h b/archivers/unarj/files/patch-unarj.h
index 42d3e4a23b6c..79c120416fbb 100644
--- a/archivers/unarj/files/patch-unarj.h
+++ b/archivers/unarj/files/patch-unarj.h
@@ -1,5 +1,5 @@
---- unarj.h.orig Mon Sep 29 14:00:24 1997
-+++ unarj.h Thu Feb 18 01:06:10 1999
+--- unarj.h.orig 2002-06-05 08:28:06 UTC
++++ unarj.h
@@ -106,8 +106,12 @@
#endif
diff --git a/archivers/unshield/files/patch-unshield-v2-format b/archivers/unshield/files/patch-unshield-v2-format
index 85a7ce9b0b7a..fae6714ebbcb 100644
--- a/archivers/unshield/files/patch-unshield-v2-format
+++ b/archivers/unshield/files/patch-unshield-v2-format
@@ -1,6 +1,6 @@
---- lib/component.c.orig
+--- lib/component.c.orig 2005-06-28 18:49:36 UTC
+++ lib/component.c
-@@ -40,11 +40,13 @@
+@@ -40,11 +40,13 @@ UnshieldComponent* unshield_component_ne
case 7:
case 8:
case 9:
@@ -17,9 +17,9 @@
}
self->file_group_count = READ_UINT16(p); p += 2;
---- lib/file.c.orig
+--- lib/file.c.orig 2007-01-06 14:34:57 UTC
+++ lib/file.c
-@@ -77,6 +77,11 @@
+@@ -77,6 +77,11 @@ static FileDescriptor* unshield_read_fil
case 7:
case 8:
case 9:
@@ -31,7 +31,7 @@
saved_p = p = header->data +
header->common.cab_descriptor_offset +
header->cab.file_table_offset +
-@@ -117,10 +122,6 @@
+@@ -117,10 +122,6 @@ static FileDescriptor* unshield_read_fil
assert((p - saved_p) == 0x57);
break;
@@ -42,7 +42,7 @@
}
if (!(fd->flags & FILE_COMPRESSED) &&
-@@ -363,6 +364,11 @@
+@@ -363,6 +364,11 @@ static bool unshield_reader_open_volume(
case 7:
case 8:
case 9:
@@ -54,7 +54,7 @@
{
uint8_t six_header[VOLUME_HEADER_SIZE_V6];
uint8_t* p = six_header;
-@@ -389,10 +395,6 @@
+@@ -389,10 +395,6 @@ static bool unshield_reader_open_volume(
reader->volume_header.last_file_size_compressed_high = READ_UINT32(p); p += 4;
}
break;
@@ -65,9 +65,9 @@
}
#if VERBOSE >= 2
---- lib/libunshield.c.orig
+--- lib/libunshield.c.orig 2004-08-24 06:10:27 UTC
+++ lib/libunshield.c
-@@ -205,7 +205,7 @@
+@@ -205,7 +205,7 @@ static bool unshield_header_get_file_gro
/**
Read all header files
*/
@@ -76,7 +76,7 @@
{
int i;
bool iterate = true;
-@@ -268,8 +268,21 @@
+@@ -268,8 +268,21 @@ static bool unshield_read_headers(Unshie
unshield_error("Failed to read common header from header file %i", i);
goto error;
}
@@ -100,7 +100,7 @@
#if 0
if (header->major_version < 5)
-@@ -326,6 +339,11 @@
+@@ -326,6 +339,11 @@ error:
Unshield* unshield_open(const char* filename)/*{{{*/
{
@@ -112,7 +112,7 @@
Unshield* unshield = NEW1(Unshield);
if (!unshield)
{
-@@ -339,7 +357,7 @@
+@@ -339,7 +357,7 @@ Unshield* unshield_open(const char* file
goto error;
}
@@ -121,9 +121,9 @@
{
unshield_error("Failed to read header files");
goto error;
---- lib/libunshield.h.orig
+--- lib/libunshield.h.orig 2007-01-06 14:34:57 UTC
+++ lib/libunshield.h
-@@ -33,6 +33,7 @@
+@@ -33,6 +33,7 @@ void unshield_set_log_level(int level);
*/
Unshield* unshield_open(const char* filename);
@@ -131,7 +131,7 @@
void unshield_close(Unshield* unshield);
/*
---- man/unshield.1.orig
+--- man/unshield.1.orig 2008-02-15 16:36:33 UTC
+++ man/unshield.1
@@ -2,7 +2,7 @@
.SH NAME
@@ -142,7 +142,7 @@
.SH DESCRIPTION
Unshield extracts CAB files from InstallShield installers, used to
install software on Microsoft Windows based machines.
-@@ -27,6 +27,11 @@
+@@ -27,6 +27,11 @@ Only list/extract this file group
\fB\-h\fR
Show help message
.TP
@@ -154,9 +154,9 @@
\fB\-j\fR
Junk paths (do not make directories)
.TP
---- src/unshield.c.orig
+--- src/unshield.c.orig 2009-06-18 05:11:31 UTC
+++ src/unshield.c
-@@ -58,6 +58,7 @@
+@@ -58,6 +58,7 @@ static OVERWRITE overwrite =
static int log_level = UNSHIELD_LOG_LEVEL_LOWEST;
static int exit_status = 0;
static FORMAT format = FORMAT_NEW;
@@ -164,7 +164,7 @@
static bool make_sure_directory_exists(const char* directory)/*{{{*/
{
-@@ -108,7 +109,7 @@
+@@ -108,7 +109,7 @@ static void show_usage(const char* name)
fprintf(stderr,
"Syntax:\n"
"\n"
@@ -173,7 +173,7 @@
"\n"
"Options:\n"
"\t-c COMPONENT Only list/extract this component\n"
-@@ -120,6 +121,7 @@
+@@ -120,6 +121,7 @@ static void show_usage(const char* name)
"\t 3 - Errors, warnings and debug messages\n"
"\t-g GROUP Only list/extract this file group\n"
"\t-h Show this help message\n"
@@ -181,7 +181,7 @@
"\t-j Junk paths (do not make directories)\n"
"\t-L Make file and directory names lowercase\n"
"\t-O Use old compression\n"
-@@ -152,7 +154,7 @@
+@@ -152,7 +154,7 @@ static bool handle_parameters(
{
int c;
@@ -190,7 +190,7 @@
{
switch (c)
{
-@@ -172,6 +174,10 @@
+@@ -172,6 +174,10 @@ static bool handle_parameters(
file_group_name = optarg;
break;
@@ -201,7 +201,7 @@
case 'j':
junk_paths = true;
break;
-@@ -532,7 +538,7 @@
+@@ -532,7 +538,7 @@ int main(int argc, char** argv)
cabfile = argv[last_optind];
diff --git a/archivers/untar/Makefile b/archivers/untar/Makefile
index 2bf88c071798..bf4b366f2e23 100644
--- a/archivers/untar/Makefile
+++ b/archivers/untar/Makefile
@@ -21,7 +21,7 @@ MAKE_ENV+= PROG=untar NO_MAN=yes
MAKE_ARGS+= CFLAGS="${CFLAGS} -D_POSIX_SOURCE" \
LDFLAGS="${LDFLAGS} -static"
-pre-patch:
+post-extract:
@${CP} ${DISTDIR}/untar.c ${WRKSRC}
do-install:
diff --git a/archivers/untar/files/patch-untar.c b/archivers/untar/files/patch-untar.c
index 760b6819c7a1..f65415ba1c2c 100644
--- a/archivers/untar/files/patch-untar.c
+++ b/archivers/untar/files/patch-untar.c
@@ -1,5 +1,5 @@
---- untar.c.old 2010-03-19 22:39:55.000000000 +0100
-+++ untar.c 2010-03-19 22:36:01.000000000 +0100
+--- untar.c.orig 2016-07-26 12:43:54 UTC
++++ untar.c
@@ -48,6 +48,9 @@
*/
diff --git a/archivers/unzip/files/patch-crypt.c b/archivers/unzip/files/patch-crypt.c
index 96d1c071a7a2..82fde67fda12 100644
--- a/archivers/unzip/files/patch-crypt.c
+++ b/archivers/unzip/files/patch-crypt.c
@@ -1,6 +1,6 @@
---- crypt.c.orig 2007-01-05 16:47:36.000000000 +0100
-+++ crypt.c 2016-01-04 14:39:27.300502995 +0100
-@@ -465,7 +465,17 @@
+--- crypt.c.orig 2007-01-05 15:47:36 UTC
++++ crypt.c
+@@ -465,7 +465,17 @@ int decrypt(__G__ passwrd)
GLOBAL(pInfo->encrypted) = FALSE;
defer_leftover_input(__G);
for (n = 0; n < RAND_HEAD_LEN; n++) {
diff --git a/archivers/unzip/files/patch-extract.c b/archivers/unzip/files/patch-extract.c
index 63ad0548ad83..2d93b1c58b8e 100644
--- a/archivers/unzip/files/patch-extract.c
+++ b/archivers/unzip/files/patch-extract.c
@@ -1,5 +1,5 @@
---- extract.c.orig 2009-03-14 02:32:52.000000000 +0100
-+++ extract.c 2016-01-04 14:43:11.813488458 +0100
+--- extract.c.orig 2009-03-14 01:32:52 UTC
++++ extract.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 1990-2009 Info-ZIP. All rights reserved.
@@ -7,7 +7,7 @@
See the accompanying file LICENSE, version 2009-Jan-02 or later
(the contents of which are also included in unzip.h) for terms of use.
-@@ -298,6 +298,8 @@
+@@ -298,6 +298,8 @@ char ZCONST Far TruncNTSD[] =
#ifndef SFX
static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \
EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n";
@@ -16,7 +16,7 @@
static ZCONST char Far InvalidComprDataEAs[] =
" invalid compressed data for EAs\n";
# if (defined(WIN32) && defined(NTSD_EAS))
-@@ -2023,7 +2025,8 @@
+@@ -2023,7 +2025,8 @@ static int TestExtraField(__G__ ef, ef_l
ebID = makeword(ef);
ebLen = (unsigned)makeword(ef+EB_LEN);
@@ -26,7 +26,7 @@
/* Discovered some extra field inconsistency! */
if (uO.qflag)
Info(slide, 1, ((char *)slide, "%-22s ",
-@@ -2032,6 +2035,16 @@
+@@ -2032,6 +2035,16 @@ static int TestExtraField(__G__ ef, ef_l
ebLen, (ef_len - EB_HEADSIZE)));
return PK_ERR;
}
@@ -43,7 +43,7 @@
switch (ebID) {
case EF_OS2:
-@@ -2217,14 +2230,28 @@
+@@ -2217,14 +2230,28 @@ static int test_compr_eb(__G__ eb, eb_si
ulg eb_ucsize;
uch *eb_ucptr;
int r;
@@ -75,7 +75,7 @@
if (
#ifdef INT_16BIT
-@@ -2701,6 +2728,12 @@
+@@ -2701,6 +2728,12 @@ __GDEF
int repeated_buf_err;
bz_stream bstrm;
diff --git a/archivers/unzoo/files/patch-unzoo.c b/archivers/unzoo/files/patch-unzoo.c
index c111a57e6c0e..71c65ca53ec3 100644
--- a/archivers/unzoo/files/patch-unzoo.c
+++ b/archivers/unzoo/files/patch-unzoo.c
@@ -1,20 +1,20 @@
---- unzoo.c.orig Sat Nov 25 00:53:57 2006
-+++ unzoo.c Sat Nov 25 01:00:42 2006
-@@ -2590,20 +2590,20 @@
+--- unzoo.c.orig 2016-07-26 12:44:10 UTC
++++ unzoo.c
+@@ -2590,20 +2590,20 @@ int ExtrArch ( bim, out, ovr
/* but only if the user did not request otherwise */
-
+
/* building the universal path of this member */
+ int found_trav = 0;
char patu [sizeof(Entry.diru) + sizeof(Entry.namu) + 2];
strcpy( patu, Entry.diru );
if ( strlen(patu) && patu[strlen(patu)-1] != '/') strcat( patu, "/" );
strcat( patu, (Entry.lnamu ? Entry.namu : Entry.nams) );
-
+
- int found_trav = 0;
-
+
if ( strstr( patu, "/../" )) {
- found_trav = 1;
-
+
/* remove "/../" from the path */
char tmp [sizeof(patu)];
char *p;
@@ -22,25 +22,25 @@
+ found_trav = 1;
memset(tmp, 0, sizeof(tmp));
q = patu;
-
-@@ -2625,10 +2625,10 @@
+
+@@ -2625,10 +2625,10 @@ int ExtrArch ( bim, out, ovr
printf("unzoo: skipped \"/../\" path component(s) in '%s'\n", Entry.patl);
}
if ( *patu == '/' && !strlen( pre ) ) {
- found_trav = 1;
-
+
char *p = malloc(sizeof(patu));
char *q = p;
+ found_trav = 1;
memset(p, 0, sizeof(patu));
strcpy(p, patu);
while ( q[0] == '/' ) q++;
-@@ -2638,9 +2638,9 @@
+@@ -2638,9 +2638,9 @@ int ExtrArch ( bim, out, ovr
printf("unzoo: skipped root directory path component in '%s'\n", patl);
}
if ( !strncmp( patu, "../", 3 )) {
- found_trav = 1;
-
+
char tmp [sizeof(patu)];
+ found_trav = 1;
memset(tmp, 0, sizeof(tmp));
diff --git a/archivers/upx/files/patch-src-Makefile b/archivers/upx/files/patch-src-Makefile
deleted file mode 100644
index ff98a0bb4671..000000000000
--- a/archivers/upx/files/patch-src-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/Makefile.orig Fri Apr 27 15:00:00 2007
-+++ src/Makefile Wed May 9 22:55:18 2007
-@@ -52,7 +52,7 @@
- # we need UCL and zlib - you can set envvar UPX_UCLDIR
- ifneq ($(wildcard $(UPX_UCLDIR)/include/ucl/ucl.h),)
- INCLUDES += -I$(UPX_UCLDIR)/include
--LIBS += $(addprefix -L,$(dir $(wildcard $(UPX_UCLDIR)/libucl$(libext) $(UPX_UCLDIR)/src/.libs/libucl$(libext))))
-+LIBS += -L$(UPX_UCLDIR)/lib
- endif
- LIBS += -lucl -lz
- # you should set envvar UPX_LZMADIR to point to your unpacked lzma443.tar.bz2
diff --git a/archivers/upx/files/patch-src-packer.h b/archivers/upx/files/patch-src-packer.h
deleted file mode 100644
index c16901d55891..000000000000
--- a/archivers/upx/files/patch-src-packer.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/packer.h.orig 2011-12-13 00:08:00.000000000 +0800
-+++ src/packer.h 2012-01-06 04:41:44.771998330 +0800
-@@ -235,7 +235,7 @@
- void addLoader(C,C,C,C,C,C,C,C); void addLoader(C,C,C,C,C,C,C,C,C);
- void addLoader(C,C,C,C,C,C,C,C,C,C);
- #undef C
--#if 1 && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x040100))
-+#if 0 && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x040100))
- void __acc_cdecl_va addLoaderVA(const char *s, ...) __attribute__((__sentinel__));
- #else
- void __acc_cdecl_va addLoaderVA(const char *s, ...);
diff --git a/archivers/upx/files/patch-src_Makefile b/archivers/upx/files/patch-src_Makefile
new file mode 100644
index 000000000000..17c9907cfea8
--- /dev/null
+++ b/archivers/upx/files/patch-src_Makefile
@@ -0,0 +1,11 @@
+--- src/Makefile.orig 2013-09-30 15:51:00 UTC
++++ src/Makefile
+@@ -55,7 +55,7 @@ upx_OBJECTS := $(notdir $(upx_SOURCES:.c
+ # we need UCL and zlib - you can set envvar UPX_UCLDIR
+ ifneq ($(wildcard $(UPX_UCLDIR)/include/ucl/ucl.h),)
+ INCLUDES += -I$(UPX_UCLDIR)/include
+-LIBS += $(addprefix -L,$(dir $(wildcard $(UPX_UCLDIR)/libucl$(libext) $(UPX_UCLDIR)/src/.libs/libucl$(libext))))
++LIBS += -L$(UPX_UCLDIR)/lib
+ endif
+ LIBS += -lucl -lz
+ # you should set envvar UPX_LZMADIR to point to your unpacked LZMA SDK
diff --git a/archivers/upx/files/patch-src-miniacc.h b/archivers/upx/files/patch-src_miniacc.h
index 38622598a89e..38622598a89e 100644
--- a/archivers/upx/files/patch-src-miniacc.h
+++ b/archivers/upx/files/patch-src_miniacc.h
diff --git a/archivers/upx/files/patch-src_packer.h b/archivers/upx/files/patch-src_packer.h
new file mode 100644
index 000000000000..d99e08bd955b
--- /dev/null
+++ b/archivers/upx/files/patch-src_packer.h
@@ -0,0 +1,11 @@
+--- src/packer.h.orig 2013-09-30 15:51:00 UTC
++++ src/packer.h
+@@ -238,7 +238,7 @@ protected:
+ void addLoader(C,C,C,C,C,C,C,C); void addLoader(C,C,C,C,C,C,C,C,C);
+ void addLoader(C,C,C,C,C,C,C,C,C,C);
+ #undef C
+-#if 1 && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x040100))
++#if 0 && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x040100))
+ void __acc_cdecl_va addLoaderVA(const char *s, ...) __attribute__((__sentinel__));
+ #else
+ void __acc_cdecl_va addLoaderVA(const char *s, ...);
diff --git a/archivers/xarchive/files/patch-doc-Makefile.in b/archivers/xarchive/files/patch-doc-Makefile.in
deleted file mode 100644
index 538f1296b1f8..000000000000
--- a/archivers/xarchive/files/patch-doc-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./doc/Makefile.in.orig Wed May 17 08:42:06 2006
-+++ ./doc/Makefile.in Wed May 17 08:42:32 2006
-@@ -234,7 +234,7 @@
-
- info-am:
-
--install-data-am: install-docDATA install-man
-+install-data-am: install-man
-
- install-exec-am:
-
diff --git a/archivers/xarchive/files/patch-doc_Makefile.in b/archivers/xarchive/files/patch-doc_Makefile.in
new file mode 100644
index 000000000000..1e9bc5a21a1a
--- /dev/null
+++ b/archivers/xarchive/files/patch-doc_Makefile.in
@@ -0,0 +1,11 @@
+--- doc/Makefile.in.orig 2006-02-27 17:29:16 UTC
++++ doc/Makefile.in
+@@ -234,7 +234,7 @@ info: info-am
+
+ info-am:
+
+-install-data-am: install-docDATA install-man
++install-data-am: install-man
+
+ install-exec-am:
+
diff --git a/archivers/xarchive/files/patch-src-main.c b/archivers/xarchive/files/patch-src-main.c
deleted file mode 100644
index 0e1363951367..000000000000
--- a/archivers/xarchive/files/patch-src-main.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/main.c.orig Sun Nov 6 21:26:45 2005
-+++ src/main.c Sun Nov 13 02:57:57 2005
-@@ -115,6 +115,7 @@
- WrapperEntry *wrapent = NULL;
-
- home = g_strdup_printf("%s/.xarchive/wrappers", getenv("HOME"));
-+ {
- char *dir[] =
- {
- home,
-@@ -145,6 +146,7 @@
- if (WRAPPER_ARRAY == NULL)
- {
- g_print("No wrappers found\n");
-+ }
- }
- }
-
diff --git a/archivers/xarchive/files/patch-src-widgets_gtk.c b/archivers/xarchive/files/patch-src-widgets_gtk.c
deleted file mode 100644
index 58beeb2624d5..000000000000
--- a/archivers/xarchive/files/patch-src-widgets_gtk.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/widgets_gtk.c.orig Tue Nov 8 20:39:01 2005
-+++ src/widgets_gtk.c Sun Nov 13 03:03:53 2005
-@@ -1022,8 +1022,9 @@
-
- if (wrapper_cmd(AR_EXTRACT, wrapper->argv, wrapper->dir) == 0)
- {
-+ gchar *viewcmd;
- fname = my_strescape(wrapper->argv[FIRST_FILE_INDEX]);
-- gchar *viewcmd = g_strconcat(command, " ", wrapper->dir,
-+ viewcmd = g_strconcat(command, " ", wrapper->dir,
- "/", fname, NULL);
- g_free(fname);
- printf("viewcmd: %s\n",viewcmd);
diff --git a/archivers/xarchive/files/patch-src_main.c b/archivers/xarchive/files/patch-src_main.c
new file mode 100644
index 000000000000..7138e8a0c1f1
--- /dev/null
+++ b/archivers/xarchive/files/patch-src_main.c
@@ -0,0 +1,18 @@
+--- src/main.c.orig 2006-02-23 17:25:47 UTC
++++ src/main.c
+@@ -115,6 +115,7 @@ setup_wrappers(void)
+ WrapperEntry *wrapent = NULL;
+
+ home = g_strdup_printf("%s/.xarchive/wrappers", getenv("HOME"));
++ {
+ char *dir[] =
+ {
+ home,
+@@ -146,6 +147,7 @@ setup_wrappers(void)
+ {
+ g_print("No wrappers found\n");
+ }
++ }
+ }
+
+ extern gchar *
diff --git a/archivers/xarchive/files/patch-src_widgets__gtk.c b/archivers/xarchive/files/patch-src_widgets__gtk.c
new file mode 100644
index 000000000000..b0125309f4b4
--- /dev/null
+++ b/archivers/xarchive/files/patch-src_widgets__gtk.c
@@ -0,0 +1,13 @@
+--- src/widgets_gtk.c.orig 2006-02-27 14:00:30 UTC
++++ src/widgets_gtk.c
+@@ -1131,8 +1131,9 @@ open_one_file(WrapperData *wrapper, gcha
+
+ if (wrapper_cmd(AR_EXTRACT, wrapper->argv, wrapper->dir) == 0)
+ {
++ gchar *viewcmd;
+ fname = my_strescape(wrapper->argv[FIRST_FILE_INDEX]);
+- gchar *viewcmd = g_strconcat(command, " ", wrapper->dir,
++ viewcmd = g_strconcat(command, " ", wrapper->dir,
+ "/", fname, NULL);
+ g_free(fname);
+ printf("viewcmd: %s\n",viewcmd);
diff --git a/archivers/xarchiver/files/patch-src_bzip2.c b/archivers/xarchiver/files/patch-src_bzip2.c
index 4471a049a328..debaa115fbfe 100644
--- a/archivers/xarchiver/files/patch-src_bzip2.c
+++ b/archivers/xarchiver/files/patch-src_bzip2.c
@@ -1,6 +1,6 @@
---- src/bzip2.c.orig 2014-02-09 15:26:24 UTC
+--- src/bzip2.c.orig 2016-07-19 21:54:07 UTC
+++ src/bzip2.c
-@@ -171,11 +171,11 @@ void xa_open_tar_compressed_file(XArchiv
+@@ -176,11 +176,11 @@ void xa_open_tar_compressed_file(XArchiv
if (archive->type == XARCHIVETYPE_TAR_BZ2)
command = g_strconcat(tar," tfjv ",archive->escaped_path,NULL);
else if (archive->type == XARCHIVETYPE_TAR_LZMA)
diff --git a/archivers/xarchiver/files/patch-src_tar.c b/archivers/xarchiver/files/patch-src_tar.c
index 1e97ef7408b8..3722360be86b 100644
--- a/archivers/xarchiver/files/patch-src_tar.c
+++ b/archivers/xarchiver/files/patch-src_tar.c
@@ -1,6 +1,6 @@
---- src/tar.c.orig 2016-03-09 15:25:48 UTC
+--- src/tar.c.orig 2016-07-19 21:54:07 UTC
+++ src/tar.c
-@@ -330,7 +330,7 @@ gboolean xa_tar_extract(XArchive *archiv
+@@ -334,7 +334,7 @@ gboolean xa_tar_extract(XArchive *archiv
#else
archive->overwrite ? " --overwrite" : " --keep-old-files",
#endif
@@ -9,7 +9,7 @@
" -C ",archive->extraction_path," ",names->str,NULL);
}
else
-@@ -349,7 +349,7 @@ gboolean xa_tar_extract(XArchive *archiv
+@@ -353,7 +353,7 @@ gboolean xa_tar_extract(XArchive *archiv
#else
archive->overwrite ? " --overwrite" : " --keep-old-files",
#endif
@@ -18,7 +18,7 @@
" -C ",archive->extraction_path," ",names->str,NULL);
}
else
-@@ -368,7 +368,7 @@ gboolean xa_tar_extract(XArchive *archiv
+@@ -372,7 +372,7 @@ gboolean xa_tar_extract(XArchive *archiv
#else
archive->overwrite ? " --overwrite" : " --keep-old-files",
#endif
@@ -27,7 +27,7 @@
" -C ",archive->extraction_path," ",names->str,NULL);
}
else
-@@ -387,7 +387,7 @@ gboolean xa_tar_extract(XArchive *archiv
+@@ -391,7 +391,7 @@ gboolean xa_tar_extract(XArchive *archiv
#else
archive->overwrite ? " --overwrite" : " --keep-old-files",
#endif
@@ -36,7 +36,7 @@
" -C ",archive->extraction_path," ",names->str,NULL);
}
else
-@@ -406,7 +406,7 @@ gboolean xa_tar_extract(XArchive *archiv
+@@ -410,7 +410,7 @@ gboolean xa_tar_extract(XArchive *archiv
#else
archive->overwrite ? " --overwrite" : " --keep-old-files",
#endif
@@ -45,7 +45,7 @@
" -C ",archive->extraction_path," ",names->str,NULL);
}
else
-@@ -425,7 +425,7 @@ gboolean xa_tar_extract(XArchive *archiv
+@@ -429,7 +429,7 @@ gboolean xa_tar_extract(XArchive *archiv
#else
archive->overwrite ? " --overwrite" : " --keep-old-files",
#endif
diff --git a/archivers/xarchiver/files/patch-src_window.c b/archivers/xarchiver/files/patch-src_window.c
index 9b2fe011bf0f..6d7f91b64490 100644
--- a/archivers/xarchiver/files/patch-src_window.c
+++ b/archivers/xarchiver/files/patch-src_window.c
@@ -1,6 +1,6 @@
---- src/window.c.orig 2014-09-28 20:42:37 UTC
+--- src/window.c.orig 2016-07-19 21:54:07 UTC
+++ src/window.c
-@@ -1130,7 +1130,7 @@ XArchiveType xa_detect_archive_type (gch
+@@ -1181,7 +1181,7 @@ XArchiveType xa_detect_archive_type (gch
xx = XARCHIVETYPE_BZIP2;
else if (memcmp ( magic,"\x1f\x8b",2) == 0 || memcmp ( magic,"\x1f\x9d",2) == 0)
xx = XARCHIVETYPE_GZIP;
diff --git a/archivers/xmill/files/patch-XMill+BZlib.cpp b/archivers/xmill/files/patch-XMill+BZlib.cpp
deleted file mode 100644
index 24c25114c64e..000000000000
--- a/archivers/xmill/files/patch-XMill+BZlib.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
---- XMill/BZlib.cpp.orig 2008-07-26 04:10:15.000000000 +0700
-+++ XMill/BZlib.cpp 2008-07-26 04:20:22.000000000 +0700
-@@ -44,7 +44,7 @@
-
- void BZip::initCompress()
- {
-- if(bzCompressInit(&bzstate,7,0,0) != BZ_OK) {
-+ if(BZ2_bzCompressInit(&bzstate,7,0,0) != BZ_OK) {
- throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!");
- }
- }
-@@ -60,19 +60,19 @@
- {
- if (flag == -1)
- flag = BZ_FINISH;
-- return bzCompress(&bzstate,flag);
-+ return BZ2_bzCompress(&bzstate,flag);
- }
-
- void BZip::endCompress()
- {
-- if(bzCompressEnd(&bzstate) != BZ_OK) {
-+ if(BZ2_bzCompressEnd(&bzstate) != BZ_OK) {
- throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!");
- }
- }
-
- void BZip::initUncompress()
- {
-- if(bzDecompressInit(&bzstate,0,0) != BZ_OK) {
-+ if(BZ2_bzDecompressInit(&bzstate,0,0) != BZ_OK) {
- throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!");
- }
- }
-@@ -106,7 +106,7 @@
-
- void BZip::endUncompress()
- {
-- if(bzDecompressEnd(&bzstate) != BZ_OK) {
-+ if(BZ2_bzDecompressEnd(&bzstate) != BZ_OK) {
- throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!");
- }
- }
-@@ -138,22 +138,24 @@
-
- int BZip::getTotalOut()
- {
-- return bzstate.total_out;
-+ return bzstate.total_out_lo32;
- }
-
- int BZip::getTotalIn()
- {
-- return bzstate.total_in;
-+ return bzstate.total_in_lo32;
- }
-
- void BZip::resetTotals()
- {
-- bzstate.total_in = 0;
-- bzstate.total_out = 0;
-+ bzstate.total_in_lo32 = 0;
-+ bzstate.total_in_hi32 = 0;
-+ bzstate.total_out_lo32 = 0;
-+ bzstate.total_out_hi32 = 0;
- }
-
- int BZip::doUncompress()
- {
-- return bzDecompress(&bzstate);
-+ return BZ2_bzDecompress(&bzstate);
- }
-
diff --git a/archivers/xmill/files/patch-XMill-CompressMan.cpp b/archivers/xmill/files/patch-XMill-CompressMan.cpp
deleted file mode 100644
index 4e281515351e..000000000000
--- a/archivers/xmill/files/patch-XMill-CompressMan.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- XMill/CompressMan.cpp.orig 2009-03-13 19:11:05.000000000 +0100
-+++ XMill/CompressMan.cpp 2009-03-13 19:11:08.000000000 +0100
-@@ -423,7 +423,7 @@
- UserCompressorFactory *compressor=compressorlist;
- while(compressor!=NULL)
- {
-- printf("%lu =>",(unsigned int)compressor);
-+ printf("%lu =>",(unsigned)(intptr_t)compressor);
- printf("%s\n",compressor->GetName());
- compressor=compressor->next;
- }
diff --git a/archivers/xmill/files/patch-XMill-PPMDI.cpp b/archivers/xmill/files/patch-XMill-PPMDI.cpp
deleted file mode 100644
index a2b72a53cc78..000000000000
--- a/archivers/xmill/files/patch-XMill-PPMDI.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- XMill/PPMDI.cpp.orig 2009-03-13 19:12:05.000000000 +0100
-+++ XMill/PPMDI.cpp 2009-03-13 19:12:29.000000000 +0100
-@@ -245,7 +245,7 @@
-
- cleanup:
- *outused = j;
-- *inused = inlen - (int)endptr + (int)src;
-+ *inused = inlen - (intptr_t)endptr + (intptr_t)src;
- return ret;
- }
-
diff --git a/archivers/xmill/files/patch-XMill_BZlib.cpp b/archivers/xmill/files/patch-XMill_BZlib.cpp
new file mode 100644
index 000000000000..95cd778a6d35
--- /dev/null
+++ b/archivers/xmill/files/patch-XMill_BZlib.cpp
@@ -0,0 +1,73 @@
+--- XMill/BZlib.cpp.orig 2016-07-26 12:48:05 UTC
++++ XMill/BZlib.cpp
+@@ -44,7 +44,7 @@ BZip::~BZip()
+
+ void BZip::initCompress()
+ {
+- if(bzCompressInit(&bzstate,7,0,0) != BZ_OK) {
++ if(BZ2_bzCompressInit(&bzstate,7,0,0) != BZ_OK) {
+ throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!");
+ }
+ }
+@@ -60,19 +60,19 @@ int BZip::doCompress(int flag)
+ {
+ if (flag == -1)
+ flag = BZ_FINISH;
+- return bzCompress(&bzstate,flag);
++ return BZ2_bzCompress(&bzstate,flag);
+ }
+
+ void BZip::endCompress()
+ {
+- if(bzCompressEnd(&bzstate) != BZ_OK) {
++ if(BZ2_bzCompressEnd(&bzstate) != BZ_OK) {
+ throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!");
+ }
+ }
+
+ void BZip::initUncompress()
+ {
+- if(bzDecompressInit(&bzstate,0,0) != BZ_OK) {
++ if(BZ2_bzDecompressInit(&bzstate,0,0) != BZ_OK) {
+ throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!");
+ }
+ }
+@@ -106,7 +106,7 @@ char **BZip::getNextInPtr()
+
+ void BZip::endUncompress()
+ {
+- if(bzDecompressEnd(&bzstate) != BZ_OK) {
++ if(BZ2_bzDecompressEnd(&bzstate) != BZ_OK) {
+ throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!");
+ }
+ }
+@@ -138,22 +138,24 @@ int* BZip::getAvailOutPtr()
+
+ int BZip::getTotalOut()
+ {
+- return bzstate.total_out;
++ return bzstate.total_out_lo32;
+ }
+
+ int BZip::getTotalIn()
+ {
+- return bzstate.total_in;
++ return bzstate.total_in_lo32;
+ }
+
+ void BZip::resetTotals()
+ {
+- bzstate.total_in = 0;
+- bzstate.total_out = 0;
++ bzstate.total_in_lo32 = 0;
++ bzstate.total_in_hi32 = 0;
++ bzstate.total_out_lo32 = 0;
++ bzstate.total_out_hi32 = 0;
+ }
+
+ int BZip::doUncompress()
+ {
+- return bzDecompress(&bzstate);
++ return BZ2_bzDecompress(&bzstate);
+ }
+
diff --git a/archivers/xmill/files/patch-XMill_CompressMan.cpp b/archivers/xmill/files/patch-XMill_CompressMan.cpp
new file mode 100644
index 000000000000..c64b68dd77ef
--- /dev/null
+++ b/archivers/xmill/files/patch-XMill_CompressMan.cpp
@@ -0,0 +1,11 @@
+--- XMill/CompressMan.cpp.orig 2016-07-26 12:48:05 UTC
++++ XMill/CompressMan.cpp
+@@ -423,7 +423,7 @@ void BothCompressMan::DebugPrint()
+ UserCompressorFactory *compressor=compressorlist;
+ while(compressor!=NULL)
+ {
+- printf("%lu =>",(unsigned int)compressor);
++ printf("%lu =>",(unsigned)(intptr_t)compressor);
+ printf("%s\n",compressor->GetName());
+ compressor=compressor->next;
+ }
diff --git a/archivers/xmill/files/patch-XMill_PPMDI.cpp b/archivers/xmill/files/patch-XMill_PPMDI.cpp
new file mode 100644
index 000000000000..0340d73155f1
--- /dev/null
+++ b/archivers/xmill/files/patch-XMill_PPMDI.cpp
@@ -0,0 +1,11 @@
+--- XMill/PPMDI.cpp.orig 2016-07-26 12:48:05 UTC
++++ XMill/PPMDI.cpp
+@@ -245,7 +245,7 @@ int PPMDI::uncompress(unsigned char *dst
+
+ cleanup:
+ *outused = j;
+- *inused = inlen - (int)endptr + (int)src;
++ *inused = inlen - (intptr_t)endptr + (intptr_t)src;
+ return ret;
+ }
+
diff --git a/archivers/xmill/files/patch-makefile b/archivers/xmill/files/patch-makefile
index 7a9d3b94641d..fd8d9379de09 100644
--- a/archivers/xmill/files/patch-makefile
+++ b/archivers/xmill/files/patch-makefile
@@ -1,22 +1,21 @@
---- makefile.orig 2008-07-26 04:10:14.000000000 +0700
-+++ makefile 2008-07-26 04:08:44.000000000 +0700
-@@ -43,25 +43,18 @@
+--- makefile.orig 2016-07-26 12:48:05 UTC
++++ makefile
+@@ -43,25 +43,18 @@ INSPECTSRC = ./xmillinspect
PPMZIPSRC = ./ppmzip
PPMSRC = ./ppmdi
-CPP = g++
-CC = gcc
-LINK = g++
--
++CPP = $(CXX)
++CC = $(CC)
++LINK = $(CPP)
+
-CFLAGS = -O3 -c -w
-CPPFLAGS_XMILL = $(CFLAGS) -DXMILL -Izlib -Ibzlib -IXMill -Ippmdi
-CPPFLAGS_XDEMILL = $(CFLAGS) -Izlib -Ibzlib -DXDEMILL -Ippmdi
-CPPFLAGS_XMILLTEST = $(CFLAGS) -IXMill
-CPPFLAGS_PPMZIP = $(CFLAGS) -Ippmdi
-+CPP = $(CXX)
-+CC = $(CC)
-+LINK = $(CPP)
-+
+CPPFLAGS = $(CXXFLAGS) -c -w
+CPPFLAGS_XMILL = $(CPPFLAGS) -DXMILL -IXMill -Ippmdi
+CPPFLAGS_XDEMILL = $(CPPFLAGS) -DXDEMILL -Ippmdi
@@ -35,7 +34,7 @@
XMILLLIB_MISC = \
$(TMP)/CompressMan.o $(TMP)/ContMan.o $(TMP)/PathDict.o \
$(TMP)/UnCompCont.o \
-@@ -120,9 +113,9 @@
+@@ -120,9 +113,9 @@ XMILL_OBJSPART = $(TMP)/realmain.o $(TMP
XDEMILL_OBJSPART = $(TMP)/realmain_u.o $(TMP)/Options_u.o
XMILLTEST_OBJSPART = $(TMP)/testset.o $(TMP)/xmilltest.o
@@ -48,7 +47,7 @@
XMILLINSPECTOBJS = $(TMP)/containers.o $(TMP)/exprinfo.o \
$(TMP)/globals.o \
-@@ -131,27 +124,27 @@
+@@ -131,27 +124,27 @@ XMILLINSPECTOBJS = $(TMP)/containers.o $
$(TMP)/lists.o \
$(TMP)/main.o \
$(TMP)/xmillinspect.o \
diff --git a/archivers/xpk/files/patch-shell_xQuery.c b/archivers/xpk/files/patch-shell_xQuery.c
index 99c50170eb10..81b00012d456 100644
--- a/archivers/xpk/files/patch-shell_xQuery.c
+++ b/archivers/xpk/files/patch-shell_xQuery.c
@@ -1,5 +1,5 @@
---- shell/xQuery.c.orig 2011-12-22 00:24:32.000000000 +0800
-+++ shell/xQuery.c 2011-12-22 00:24:43.000000000 +0800
+--- shell/xQuery.c.orig 2000-04-15 00:37:42 UTC
++++ shell/xQuery.c
@@ -83,7 +83,7 @@ void packerquery(unsigned int packerid)
printf("\n");
}
diff --git a/archivers/zip/files/patch-man__zipcloak.1 b/archivers/zip/files/patch-man__zipcloak.1
deleted file mode 100644
index 98726b738dc4..000000000000
--- a/archivers/zip/files/patch-man__zipcloak.1
+++ /dev/null
@@ -1,11 +0,0 @@
---- man/zipcloak.1.orig 2008-05-08 08:18:46 UTC
-+++ man/zipcloak.1
-@@ -12,8 +12,6 @@
- zipfile
-
- .SH ARGUMENTS
--.in +13
--.ti -13
- zipfile Zipfile to encrypt entries in
-
- .SH OPTIONS
diff --git a/archivers/zip/files/patch-man__zipnote.1 b/archivers/zip/files/patch-man__zipnote.1
deleted file mode 100644
index 15d2b1c85f25..000000000000
--- a/archivers/zip/files/patch-man__zipnote.1
+++ /dev/null
@@ -1,11 +0,0 @@
---- man/zipnote.1.orig 2008-05-08 08:17:56 UTC
-+++ man/zipnote.1
-@@ -12,8 +12,6 @@
- zipfile
-
- .SH ARGUMENTS
--.in +13
--.ti -13
- zipfile Zipfile to read comments from or edit.
-
- .SH OPTIONS
diff --git a/archivers/zip/files/patch-man__zipsplit.1 b/archivers/zip/files/patch-man__zipsplit.1
deleted file mode 100644
index 196a53b6d89d..000000000000
--- a/archivers/zip/files/patch-man__zipsplit.1
+++ /dev/null
@@ -1,11 +0,0 @@
---- man/zipsplit.1.orig 2008-05-08 08:17:48 UTC
-+++ man/zipsplit.1
-@@ -17,8 +17,6 @@
- zipfile
-
- .SH ARGUMENTS
--.in +13
--.ti -13
- zipfile Zipfile to split.
-
- .SH OPTIONS
diff --git a/archivers/zip/files/patch-man_zipcloak.1 b/archivers/zip/files/patch-man_zipcloak.1
new file mode 100644
index 000000000000..21d0c1906c11
--- /dev/null
+++ b/archivers/zip/files/patch-man_zipcloak.1
@@ -0,0 +1,11 @@
+--- man/zipcloak.1.orig 2008-05-08 08:18:46 UTC
++++ man/zipcloak.1
+@@ -12,8 +12,6 @@ zipcloak \- encrypt entries in a zipfile
+ zipfile
+
+ .SH ARGUMENTS
+-.in +13
+-.ti -13
+ zipfile Zipfile to encrypt entries in
+
+ .SH OPTIONS
diff --git a/archivers/zip/files/patch-man_zipnote.1 b/archivers/zip/files/patch-man_zipnote.1
new file mode 100644
index 000000000000..612f292e17a1
--- /dev/null
+++ b/archivers/zip/files/patch-man_zipnote.1
@@ -0,0 +1,11 @@
+--- man/zipnote.1.orig 2008-05-08 08:17:56 UTC
++++ man/zipnote.1
+@@ -12,8 +12,6 @@ zipnote \- write the comments in zipfile
+ zipfile
+
+ .SH ARGUMENTS
+-.in +13
+-.ti -13
+ zipfile Zipfile to read comments from or edit.
+
+ .SH OPTIONS
diff --git a/archivers/zip/files/patch-man_zipsplit.1 b/archivers/zip/files/patch-man_zipsplit.1
new file mode 100644
index 000000000000..5006951e9cc2
--- /dev/null
+++ b/archivers/zip/files/patch-man_zipsplit.1
@@ -0,0 +1,11 @@
+--- man/zipsplit.1.orig 2008-05-08 08:17:48 UTC
++++ man/zipsplit.1
+@@ -17,8 +17,6 @@ zipsplit \- split a zipfile into smaller
+ zipfile
+
+ .SH ARGUMENTS
+-.in +13
+-.ti -13
+ zipfile Zipfile to split.
+
+ .SH OPTIONS
diff --git a/archivers/zip/files/patch-unix_Makefile b/archivers/zip/files/patch-unix_Makefile
index c466c97973f2..f60637ff31d0 100644
--- a/archivers/zip/files/patch-unix_Makefile
+++ b/archivers/zip/files/patch-unix_Makefile
@@ -1,6 +1,6 @@
---- unix/Makefile.orig 2008-05-07 02:33:56.000000000 +0400
-+++ unix/Makefile 2008-08-03 06:36:20.000000000 +0400
-@@ -22,7 +22,6 @@
+--- unix/Makefile.orig 2008-05-07 06:33:56 UTC
++++ unix/Makefile
+@@ -22,7 +22,6 @@ SHELL = /bin/sh
LN = ln -s
# (to use the GNU compiler, change cc to gcc in CC)
@@ -8,7 +8,7 @@
BIND = $(CC)
AS = $(CC) -c
CPP = /lib/cpp
-@@ -57,8 +56,7 @@
+@@ -57,8 +56,7 @@ IZ_OUR_BZIP2_DIR = bzip2
# CFLAGS flags for C compile
# LFLAGS1 flags after output file spec, before obj file list
# LFLAGS2 flags after obj file list (libraries, etc)
diff --git a/archivers/zip/files/patch-unix_configure b/archivers/zip/files/patch-unix_configure
index adcc2c41e3cf..3e421f3ffba6 100644
--- a/archivers/zip/files/patch-unix_configure
+++ b/archivers/zip/files/patch-unix_configure
@@ -1,6 +1,6 @@
---- unix/configure.orig 2008-06-19 23:32:20.000000000 +0400
-+++ unix/configure 2008-08-03 06:35:03.000000000 +0400
-@@ -98,7 +98,6 @@
+--- unix/configure.orig 2008-06-20 03:32:20 UTC
++++ unix/configure
+@@ -98,7 +98,6 @@ int main()
_EOF_
$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
if test $? -eq 0; then
@@ -8,7 +8,7 @@
echo " GNU C ($CFLAGS_OPT)"
# Special Mac OS X shared library "ld" option?
if test ` uname -s 2> /dev/null ` = 'Darwin'; then
-@@ -110,7 +109,6 @@
+@@ -110,7 +109,6 @@ _EOF_
rm -f conftest
fi
else
@@ -16,7 +16,7 @@
echo " Other-unknown C ($CFLAGS_OPT)"
fi
fi
-@@ -224,7 +222,6 @@
+@@ -224,7 +222,6 @@ CPP="${CC} -E"
[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
[ -f /lib/cpp ] && CPP=/lib/cpp
@@ -24,7 +24,7 @@
[ -f /xenix ] && CPP="${CC} -E"
[ -f /lynx.os ] && CPP="${CC} -E"
-@@ -244,7 +241,7 @@
+@@ -244,7 +241,7 @@ if eval "$CPP match.S > _match.s 2>/dev/
echo "int foo() { return 0;}" > conftest.c
$CC -c conftest.c >/dev/null 2>/dev/null
echo Check if compiler generates underlines
diff --git a/archivers/zipmix/files/patch-zipmix.c b/archivers/zipmix/files/patch-zipmix.c
index bbf0d282f065..a27591fa426d 100644
--- a/archivers/zipmix/files/patch-zipmix.c
+++ b/archivers/zipmix/files/patch-zipmix.c
@@ -1,5 +1,5 @@
---- zipmix.c.orig 2013-05-27 12:33:32.795062151 +0200
-+++ zipmix.c 2013-05-27 12:33:52.048486869 +0200
+--- zipmix.c.orig 2016-07-26 12:48:42 UTC
++++ zipmix.c
@@ -4,6 +4,17 @@ zipmix.exe: zipmix.c; cl zipmix.c /O1 /G
!if 0
#endif
diff --git a/archivers/zoo/files/patch-ar.h b/archivers/zoo/files/patch-ar.h
index fbc3ec644a2d..0acf929a0b65 100644
--- a/archivers/zoo/files/patch-ar.h
+++ b/archivers/zoo/files/patch-ar.h
@@ -1,6 +1,6 @@
---- ./ar.h.orig 1993-05-01 06:04:22.000000000 +0200
-+++ ./ar.h 2011-12-22 14:00:55.000000000 +0100
-@@ -15,10 +15,12 @@
+--- ar.h.orig 1993-05-01 04:04:22 UTC
++++ ar.h
+@@ -15,10 +15,12 @@ Adapted from "ar" archiver written by Ha
/* uchar should be 8 bits or more */
/* typedef unsigned char uchar; -- already in zoo.h */
diff --git a/archivers/zoo/files/patch-bsd.c b/archivers/zoo/files/patch-bsd.c
index bcb7712b7f3f..bc76a076e8a6 100644
--- a/archivers/zoo/files/patch-bsd.c
+++ b/archivers/zoo/files/patch-bsd.c
@@ -1,6 +1,6 @@
---- ./bsd.c.orig 1993-05-01 06:21:53.000000000 +0200
-+++ ./bsd.c 2011-12-22 14:00:55.000000000 +0100
-@@ -69,8 +69,12 @@
+--- bsd.c.orig 1993-05-01 04:21:53 UTC
++++ bsd.c
+@@ -69,8 +69,12 @@ ZOOFILE f;
}
/* Function gettz() returns the offset from GMT in seconds */
@@ -14,7 +14,7 @@
#define SEC_IN_DAY (24L * 60L * 60L)
#define INV_VALUE (SEC_IN_DAY + 1L)
static long retval = INV_VALUE; /* cache, init to impossible value */
-@@ -95,6 +99,7 @@
+@@ -95,6 +99,7 @@ long gettz()
retval = -tm->tm_gmtoff;
#endif
return retval;
@@ -22,7 +22,7 @@
}
/* Standard UNIX-compatible time routines */
-@@ -103,15 +108,19 @@
+@@ -103,15 +108,19 @@ long gettz()
/* Standard UNIX-specific file attribute routines */
#include "nixmode.i"
diff --git a/archivers/zoo/files/patch-makefile b/archivers/zoo/files/patch-makefile
index 18ec3e7caabd..50ddafa118df 100644
--- a/archivers/zoo/files/patch-makefile
+++ b/archivers/zoo/files/patch-makefile
@@ -1,5 +1,5 @@
---- ./makefile.orig 1991-07-16 17:52:08.000000000 +0200
-+++ ./makefile 2011-12-22 14:00:55.000000000 +0100
+--- makefile.orig 1991-07-16 15:52:08 UTC
++++ makefile
@@ -18,13 +18,13 @@
MAKE = make # needed for some systems e.g. older BSD
@@ -18,7 +18,7 @@
#List of all object files created for Zoo
ZOOOBJS = addbfcrc.o addfname.o basename.o comment.o crcdefs.o \
-@@ -67,7 +67,7 @@
+@@ -67,7 +67,7 @@ help :
@echo "lint_turboc: Run lint under **IX for checking Turbo C/MSDOS code"
# install alpha zoo as "tzoo"
@@ -27,7 +27,7 @@
mv zoo $(DESTDIR)/tzoo
# install beta zoo as "bzoo"
-@@ -75,8 +75,9 @@
+@@ -75,8 +75,9 @@ inst_beta:
mv zoo $(DESTDIR)/bzoo
# install production zoo as "zoo"
diff --git a/archivers/zoo/files/patch-misc.c b/archivers/zoo/files/patch-misc.c
index a613087b3a10..65d744f73632 100644
--- a/archivers/zoo/files/patch-misc.c
+++ b/archivers/zoo/files/patch-misc.c
@@ -1,6 +1,6 @@
---- ./misc.c.orig 1991-07-16 17:52:54.000000000 +0200
-+++ ./misc.c 2011-12-22 14:02:23.000000000 +0100
-@@ -135,11 +135,16 @@
+--- misc.c.orig 1991-07-16 15:52:54 UTC
++++ misc.c
+@@ -135,11 +135,16 @@ if available, else the short filename is
char *fullpath (direntry)
struct direntry *direntry;
{
@@ -18,7 +18,7 @@
return (result);
}
-@@ -172,7 +177,11 @@
+@@ -172,7 +177,11 @@ int preserve;
frd_zooh (header, zoo_file);
diff --git a/archivers/zoo/files/patch-misc2.c b/archivers/zoo/files/patch-misc2.c
index de3595ab5713..b4be82fc4f96 100644
--- a/archivers/zoo/files/patch-misc2.c
+++ b/archivers/zoo/files/patch-misc2.c
@@ -1,6 +1,6 @@
---- ./misc2.c.orig 1991-07-16 17:53:02.000000000 +0200
-+++ ./misc2.c 2011-12-22 14:00:55.000000000 +0100
-@@ -314,10 +314,12 @@
+--- misc2.c.orig 1991-07-16 15:53:02 UTC
++++ misc2.c
+@@ -314,10 +314,12 @@ struct direntry *direntry;
{
long diff_tz;
long longtime;
diff --git a/archivers/zoo/files/patch-nixtime.i b/archivers/zoo/files/patch-nixtime.i
index d536387bd063..2c1d2c1e1859 100644
--- a/archivers/zoo/files/patch-nixtime.i
+++ b/archivers/zoo/files/patch-nixtime.i
@@ -1,6 +1,6 @@
---- ./nixtime.i.orig 1991-07-16 17:53:46.000000000 +0200
-+++ ./nixtime.i 2011-12-22 14:00:55.000000000 +0100
-@@ -52,7 +52,8 @@
+--- nixtime.i.orig 1991-07-16 15:53:46 UTC
++++ nixtime.i
+@@ -52,7 +52,8 @@ unsigned int date, time;
long mstonix();
long gettz();
long utimbuf[2];
diff --git a/archivers/zoo/files/patch-options.h b/archivers/zoo/files/patch-options.h
index 3749d82708d3..5dad8f4b2f74 100644
--- a/archivers/zoo/files/patch-options.h
+++ b/archivers/zoo/files/patch-options.h
@@ -1,6 +1,6 @@
---- ./options.h.orig 1993-05-01 06:27:59.000000000 +0200
-+++ ./options.h 2011-12-22 14:00:55.000000000 +0100
-@@ -96,7 +96,6 @@
+--- options.h.orig 1993-05-01 04:27:59 UTC
++++ options.h
+@@ -96,7 +96,6 @@ For documentation about this file, see o
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
@@ -8,7 +8,7 @@
#define REN_STDC
#define SETBUF
#define GETTZ
-@@ -110,6 +109,7 @@
+@@ -110,6 +109,7 @@ For documentation about this file, see o
#define ANSI_PROTO
#define VOIDPTR void *
#else
diff --git a/archivers/zoo/files/patch-zooadd2.c b/archivers/zoo/files/patch-zooadd2.c
index 247acb84de6c..be9cc6d6cff1 100644
--- a/archivers/zoo/files/patch-zooadd2.c
+++ b/archivers/zoo/files/patch-zooadd2.c
@@ -1,6 +1,6 @@
---- ./zooadd2.c.orig 1991-07-20 01:38:10.000000000 +0200
-+++ ./zooadd2.c 2011-12-22 14:00:55.000000000 +0100
-@@ -258,12 +258,15 @@
+--- zooadd2.c.orig 1991-07-19 23:38:10 UTC
++++ zooadd2.c
+@@ -258,12 +258,15 @@ void newdir (direntry)
register struct direntry *direntry;
{
#ifdef GETTZ
diff --git a/archivers/zoo/files/patch-zooext.c b/archivers/zoo/files/patch-zooext.c
index 1553286201f9..a8c85f2b682e 100644
--- a/archivers/zoo/files/patch-zooext.c
+++ b/archivers/zoo/files/patch-zooext.c
@@ -1,6 +1,6 @@
---- ./zooext.c.orig 1993-05-01 05:58:50.000000000 +0200
-+++ ./zooext.c 2011-12-22 14:03:37.000000000 +0100
-@@ -163,7 +163,11 @@
+--- zooext.c.orig 1993-05-01 03:58:50 UTC
++++ zooext.c
+@@ -163,7 +163,11 @@ if (fiz_ofs != 0L) { /* i
} else {
/* read header */
frd_zooh (&zoo_header, zoo_file);
@@ -12,7 +12,7 @@
prterror ('w', failed_consistency);
bad_header++;
exit_status = 1;
-@@ -184,7 +188,8 @@
+@@ -184,7 +188,8 @@ if (null_device) {
this_file = STDOUT; /* standard output */
while (1) {
diff --git a/archivers/zoo/files/patch-zoofns.h b/archivers/zoo/files/patch-zoofns.h
index c51cfcb3dbed..693da9df2cf4 100644
--- a/archivers/zoo/files/patch-zoofns.h
+++ b/archivers/zoo/files/patch-zoofns.h
@@ -1,6 +1,6 @@
---- ./zoofns.h.orig 1993-05-01 05:57:35.000000000 +0200
-+++ ./zoofns.h 2011-12-22 14:00:55.000000000 +0100
-@@ -94,7 +94,11 @@
+--- zoofns.h.orig 1993-05-01 03:57:35 UTC
++++ zoofns.h
+@@ -94,7 +94,11 @@ void exit PARMS ((int));
void fixslash PARMS ((char *));
void makelist PARMS ((int, char *[], char *[], int, char *, char *, char *, int *));
void memerr PARMS ((unsigned int));
diff --git a/archivers/zoo/files/patch-zoolist.c b/archivers/zoo/files/patch-zoolist.c
index 339b3bdb14c6..b61d9938297f 100644
--- a/archivers/zoo/files/patch-zoolist.c
+++ b/archivers/zoo/files/patch-zoolist.c
@@ -1,6 +1,6 @@
---- ./zoolist.c.orig 1991-07-20 00:57:27.000000000 +0200
-+++ ./zoolist.c 2011-12-22 14:00:55.000000000 +0100
-@@ -539,10 +539,12 @@
+--- zoolist.c.orig 1991-07-19 22:57:27 UTC
++++ zoolist.c
+@@ -539,10 +539,12 @@ int file_tz;
{
long gettz();
int diff_tz; /* timezone difference */
diff --git a/astro/astrometry/files/patch-cairoutils.c b/astro/astrometry/files/patch-cairoutils.c
deleted file mode 100644
index 65255ecab452..000000000000
--- a/astro/astrometry/files/patch-cairoutils.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- util/cairoutils.c.orig 2012-04-25 05:33:34.000000000 +0200
-+++ util/cairoutils.c 2012-04-25 05:35:29.000000000 +0200
-@@ -25,6 +25,7 @@
-
- #include <cairo.h>
- #include <png.h>
-+#include <zlib.h>
- #include <jpeglib.h>
-
- #include "an-bool.h"
diff --git a/astro/astrometry/files/patch-util-permutedsort.c b/astro/astrometry/files/patch-util-permutedsort.c
deleted file mode 100644
index 66c756326b97..000000000000
--- a/astro/astrometry/files/patch-util-permutedsort.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- util/permutedsort.c.orig 2013-10-29 22:08:09 +0800
-+++ util/permutedsort.c
-@@ -105,6 +105,12 @@ int* permuted_sort(const void* realarray
- if (isnan(d2)) return -1; \
- assert(0); return 0;
-
-+#define COMPARE_INT(d1, d2, op1, op2) \
-+ if (d1 op1 d2) return -1; \
-+ if (d1 op2 d2) return 1; \
-+ if (d1 == d2) return 0; \
-+ assert(0); return 0;
-+
- //printf("d1=%g, d2=%g\n", d1, d2);
-
- int compare_doubles_asc(const void* v1, const void* v2) {
-@@ -135,13 +141,13 @@ int compare_floats_desc(const void* v1,
- int compare_int64_asc(const void* v1, const void* v2) {
- int64_t f1 = *(int64_t*)v1;
- int64_t f2 = *(int64_t*)v2;
-- COMPARE(f1, f2, <, >);
-+ COMPARE_INT(f1, f2, <, >);
- }
-
- int compare_int64_desc(const void* v1, const void* v2) {
- int64_t f1 = *(int64_t*)v1;
- int64_t f2 = *(int64_t*)v2;
-- COMPARE(f1, f2, >, <);
-+ COMPARE_INT(f1, f2, >, <);
- }
-
-
diff --git a/astro/astrometry/files/patch-util_cairoutils.c b/astro/astrometry/files/patch-util_cairoutils.c
new file mode 100644
index 000000000000..16552f3a577a
--- /dev/null
+++ b/astro/astrometry/files/patch-util_cairoutils.c
@@ -0,0 +1,10 @@
+--- util/cairoutils.c.orig 2015-12-12 19:02:27 UTC
++++ util/cairoutils.c
+@@ -12,6 +12,7 @@
+
+ #include <cairo.h>
+ #include <png.h>
++#include <zlib.h>
+ #include <jpeglib.h>
+ #include <zlib.h>
+
diff --git a/astro/astrometry/files/patch-util_permutedsort.c b/astro/astrometry/files/patch-util_permutedsort.c
new file mode 100644
index 000000000000..82962a23a40e
--- /dev/null
+++ b/astro/astrometry/files/patch-util_permutedsort.c
@@ -0,0 +1,31 @@
+--- util/permutedsort.c.orig 2015-12-12 19:02:27 UTC
++++ util/permutedsort.c
+@@ -92,6 +92,12 @@ int* permuted_sort(const void* realarray
+ if (isnan(d2)) return -1; \
+ assert(0); return 0;
+
++#define COMPARE_INT(d1, d2, op1, op2) \
++ if (d1 op1 d2) return -1; \
++ if (d1 op2 d2) return 1; \
++ if (d1 == d2) return 0; \
++ assert(0); return 0;
++
+ //printf("d1=%g, d2=%g\n", d1, d2);
+
+ int compare_doubles_asc(const void* v1, const void* v2) {
+@@ -122,13 +128,13 @@ int compare_floats_desc(const void* v1,
+ int compare_int64_asc(const void* v1, const void* v2) {
+ int64_t f1 = *(int64_t*)v1;
+ int64_t f2 = *(int64_t*)v2;
+- COMPARE(f1, f2, <, >);
++ COMPARE_INT(f1, f2, <, >);
+ }
+
+ int compare_int64_desc(const void* v1, const void* v2) {
+ int64_t f1 = *(int64_t*)v1;
+ int64_t f2 = *(int64_t*)v2;
+- COMPARE(f1, f2, >, <);
++ COMPARE_INT(f1, f2, >, <);
+ }
+
+ // Versions for use with QSORT_R
diff --git a/astro/boinc-astropulse/Makefile b/astro/boinc-astropulse/Makefile
index 330a6bdeb48e..2771a86a4226 100644
--- a/astro/boinc-astropulse/Makefile
+++ b/astro/boinc-astropulse/Makefile
@@ -21,7 +21,7 @@ LIB_DEPENDS= libfftw3f.so:math/fftw3-float
GNU_CONFIGURE= yes
USES= autoreconf gmake libtool pkgconfig tar:xz
-WRKSRC= ${WRKDIR}/${DISTNAME}/client
+WRKSRC_SUBDIR= client
CPPFLAGS+= -I${LOCALBASE}/include/boinc -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib
diff --git a/astro/boinc-astropulse/files/patch-Makefile.am b/astro/boinc-astropulse/files/patch-Makefile.am
new file mode 100644
index 000000000000..9083bb5b2dda
--- /dev/null
+++ b/astro/boinc-astropulse/files/patch-Makefile.am
@@ -0,0 +1,11 @@
+--- Makefile.am.orig 2009-06-11 17:35:16 UTC
++++ Makefile.am
+@@ -31,7 +31,7 @@ if ENABLE_GUI
+ GUI_C_FLAGS = $(CLIENT_C_FLAGS) $(GRAPHICS_CFLAGS)
+ GUI_LD_FLAGS = $(CLIENT_LD_FLAGS)
+ GUI_LD_ADD = -L$(BOINCDIR)/api -L$(BOINCDIR)/lib $(BOINC_LIBS) $(GRAPHICS_LIBS_RAW) $(APP_LIBS)
+- CLIENT_LD_FLAGS += $(LDSTATIC) -nodefaultlibs
++ CLIENT_LD_FLAGS += $(LDSTATIC)
+ CLIENT_LD_ADD += -L$(BOINCDIR)/api -L$(BOINCDIR)/lib $(BOINC_LIBS) $(AM_LIBS) $(APP_LIBS)
+ AP_GRX_SOURCES = ap_gfx_main.cpp
+ else
diff --git a/astro/boinc-astropulse/files/patch-ap__client__main.cpp b/astro/boinc-astropulse/files/patch-ap__client__main.cpp
new file mode 100644
index 000000000000..8c8b3d28a70f
--- /dev/null
+++ b/astro/boinc-astropulse/files/patch-ap__client__main.cpp
@@ -0,0 +1,10 @@
+--- ap_client_main.cpp.orig 2012-08-14 00:07:20 UTC
++++ ap_client_main.cpp
+@@ -1288,7 +1288,6 @@ void Science::mainloop() {
+ * used to inform the core client GUI of the % complete.
+ */
+ boinc_fraction_done(state.frac_done);
+- boinc_ops_cumulative(state.frac_done*FLOPS_PER_DM*(state.dm_hi-state.dm_low)*log((float)state.fft_len)/log(32768.0),0);
+ debug_loop(5, 2, debug_loop_msg);
+
+ /* This is the size of the power array.
diff --git a/astro/boinc-astropulse/files/patch-ap__fileio.cpp b/astro/boinc-astropulse/files/patch-ap__fileio.cpp
new file mode 100644
index 000000000000..649bf4b31e33
--- /dev/null
+++ b/astro/boinc-astropulse/files/patch-ap__fileio.cpp
@@ -0,0 +1,10 @@
+--- ap_fileio.cpp.orig 2012-02-27 23:01:04 UTC
++++ ap_fileio.cpp
+@@ -22,6 +22,7 @@
+ #include "windows.h"
+ #endif
+
++#include <cmath>
+ #include <cstdio>
+ #include <cstdlib>
+ #include <vector>
diff --git a/astro/boinc-astropulse/files/patch-ap__fold.cpp b/astro/boinc-astropulse/files/patch-ap__fold.cpp
new file mode 100644
index 000000000000..23d13a925dfd
--- /dev/null
+++ b/astro/boinc-astropulse/files/patch-ap__fold.cpp
@@ -0,0 +1,10 @@
+--- ap_fold.cpp.orig 2009-04-01 00:11:24 UTC
++++ ap_fold.cpp
+@@ -283,7 +283,6 @@ int Science::ffa(float *data, int num_su
+ * used to inform the core client GUI of the % complete.
+ */
+ boinc_fraction_done(state.frac_done);
+- boinc_ops_cumulative(state.frac_done*FLOPS_PER_DM*(state.dm_hi-state.dm_low)*log((double)state.fft_len)/log(32768.0),0);
+
+ freq_count++;
+ /* Report to stdout if we have reached a new "milestone" frequency. */
diff --git a/astro/boinc-astropulse/files/patch-ap__remove__radar.cpp b/astro/boinc-astropulse/files/patch-ap__remove__radar.cpp
new file mode 100644
index 000000000000..ee531cec87f4
--- /dev/null
+++ b/astro/boinc-astropulse/files/patch-ap__remove__radar.cpp
@@ -0,0 +1,8 @@
+--- ap_remove_radar.cpp.orig 2012-01-26 06:53:16 UTC
++++ ap_remove_radar.cpp
+@@ -1,5 +1,4 @@
+ #include "astropulse.h"
+-#include "ap_graphics.h"
+ #include "fftw3.h"
+ #include "sbtf.h"
+ #include "ap_debug.h"
diff --git a/astro/boinc-astropulse/files/patch-client__Makefile.am b/astro/boinc-astropulse/files/patch-client__Makefile.am
deleted file mode 100644
index ff5a32b8fd46..000000000000
--- a/astro/boinc-astropulse/files/patch-client__Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.am (revision 633)
-+++ Makefile.am (working copy)
-@@ -31,7 +31,7 @@
- GUI_C_FLAGS = $(CLIENT_C_FLAGS) $(GRAPHICS_CFLAGS)
- GUI_LD_FLAGS = $(CLIENT_LD_FLAGS)
- GUI_LD_ADD = -L$(BOINCDIR)/api -L$(BOINCDIR)/lib $(BOINC_LIBS) $(GRAPHICS_LIBS_RAW) $(APP_LIBS)
-- CLIENT_LD_FLAGS += $(LDSTATIC) -nodefaultlibs
-+ CLIENT_LD_FLAGS += $(LDSTATIC)
- CLIENT_LD_ADD += -L$(BOINCDIR)/api -L$(BOINCDIR)/lib $(BOINC_LIBS) $(AM_LIBS) $(APP_LIBS)
- AP_GRX_SOURCES = ap_gfx_main.cpp
- else
diff --git a/astro/boinc-astropulse/files/patch-client__ap_client_main.cpp b/astro/boinc-astropulse/files/patch-client__ap_client_main.cpp
deleted file mode 100644
index 6c21d7b9330a..000000000000
--- a/astro/boinc-astropulse/files/patch-client__ap_client_main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- ap_client_main.cpp.orig 2012-08-14 02:07:20.000000000 +0200
-+++ ap_client_main.cpp 2013-08-06 18:41:38.000000000 +0200
-@@ -1288,7 +1288,6 @@
- * used to inform the core client GUI of the % complete.
- */
- boinc_fraction_done(state.frac_done);
-- boinc_ops_cumulative(state.frac_done*FLOPS_PER_DM*(state.dm_hi-state.dm_low)*log((float)state.fft_len)/log(32768.0),0);
- debug_loop(5, 2, debug_loop_msg);
-
- /* This is the size of the power array.
diff --git a/astro/boinc-astropulse/files/patch-client__ap_fileio.cpp b/astro/boinc-astropulse/files/patch-client__ap_fileio.cpp
deleted file mode 100644
index 7a0929cb3dad..000000000000
--- a/astro/boinc-astropulse/files/patch-client__ap_fileio.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- ap_fileio.cpp.orig 2012-02-28 00:01:04.000000000 +0100
-+++ ap_fileio.cpp 2013-08-05 22:45:10.000000000 +0200
-@@ -22,6 +22,7 @@
- #include "windows.h"
- #endif
-
-+#include <cmath>
- #include <cstdio>
- #include <cstdlib>
- #include <vector>
diff --git a/astro/boinc-astropulse/files/patch-client__ap_fold.cpp b/astro/boinc-astropulse/files/patch-client__ap_fold.cpp
deleted file mode 100644
index 1b37fa85c797..000000000000
--- a/astro/boinc-astropulse/files/patch-client__ap_fold.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- ap_fold.cpp.orig 2009-04-01 02:11:24.000000000 +0200
-+++ ap_fold.cpp 2013-08-06 18:42:02.000000000 +0200
-@@ -283,7 +283,6 @@
- * used to inform the core client GUI of the % complete.
- */
- boinc_fraction_done(state.frac_done);
-- boinc_ops_cumulative(state.frac_done*FLOPS_PER_DM*(state.dm_hi-state.dm_low)*log((double)state.fft_len)/log(32768.0),0);
-
- freq_count++;
- /* Report to stdout if we have reached a new "milestone" frequency. */
diff --git a/astro/boinc-astropulse/files/patch-client__ap_remove_radar.cpp b/astro/boinc-astropulse/files/patch-client__ap_remove_radar.cpp
deleted file mode 100644
index 102c63b9839b..000000000000
--- a/astro/boinc-astropulse/files/patch-client__ap_remove_radar.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
---- ap_remove_radar.cpp.orig 2012-01-26 07:53:16.000000000 +0100
-+++ ap_remove_radar.cpp 2012-08-12 00:14:40.000000000 +0200
-@@ -1,5 +1,4 @@
- #include "astropulse.h"
--#include "ap_graphics.h"
- #include "fftw3.h"
- #include "sbtf.h"
- #include "ap_debug.h"
diff --git a/astro/boinc-astropulse/files/patch-client__configure.ac b/astro/boinc-astropulse/files/patch-client__configure.ac
deleted file mode 100644
index e91d5942cc49..000000000000
--- a/astro/boinc-astropulse/files/patch-client__configure.ac
+++ /dev/null
@@ -1,41 +0,0 @@
---- configure.ac.orig 2009-06-11 19:35:16.000000000 +0200
-+++ configure.ac 2010-11-28 11:40:22.000000000 +0100
-@@ -7,17 +7,9 @@
- dnl Process this file with autoconf to produce a configure script.
- AC_INIT(astropulse, 5.06)
-
--svnrev="`svn info | grep Revision:`"
--
--if test -n "${svnrev}" ; then
-- AC_REVISION("${svnrev}")
-- AC_DEFINE_UNQUOTED(SVN_REV,"${svnrev}",
-- [Define to be the subversion revision number])
--else
-- AC_REVISION([$Revision: 1190 $])
-- AC_DEFINE(SVN_REV,"$Revision: 1190 $",
-+ AC_REVISION([$Revision: 1702 $])
-+ AC_DEFINE(SVN_REV,"$Revision: 1702 $",
- [Define to be the subversion revision number])
--fi
-
-
- echo "--- Configuring Astropulse $AC_PACKAGE_VERSION ---"
-@@ -262,9 +254,7 @@
- dnl AC_CHECK_LIB([stdc++], [main])
- SAH_GRX_LIBS
- AC_LANG(C++)
--SAH_CHECK_BOINC
- SAH_CHECK_SAH
--SAH_FIND_SETILIB
- AC_CACHE_SAVE
-
- if test "${ac_cv_cxx_compiler_gnu}" = "yes" ; then
-@@ -378,7 +368,7 @@
- AM_CONDITIONAL(ENABLE_GUI, [test "${enable_graphics}" = yes])
- AM_CONDITIONAL(LINUX, [test -n "`echo ${target} | grep linux`"])
- AM_CONDITIONAL(I386, [test -n "`echo ${target} | grep i.86`"])
--AM_CONDITIONAL(X86_64, [test -n "`echo ${target} | grep 'x86_64'`"])
-+AM_CONDITIONAL(X86_64, [test -n "`echo ${target} | ${EGREP} 'x86_64|amd64'`"])
- AM_CONDITIONAL(PPC, [test -n "`echo ${target} | grep 'powerpc'`" -o -n "`echo ${target} | grep 'ppc'`" ])
-
-
diff --git a/astro/boinc-astropulse/files/patch-client__m4__sah_check_boinc.m4 b/astro/boinc-astropulse/files/patch-client__m4__sah_check_boinc.m4
deleted file mode 100644
index d1996c0de03d..000000000000
--- a/astro/boinc-astropulse/files/patch-client__m4__sah_check_boinc.m4
+++ /dev/null
@@ -1,11 +0,0 @@
---- m4/sah_check_boinc.m4.orig 2010-03-23 22:00:23.000000000 +0100
-+++ m4/sah_check_boinc.m4 2011-03-13 16:32:29.000000000 +0100
-@@ -30,7 +30,7 @@
- cd $thisdir
- break
- else
-- if $FIND $boinc_dir -name "std_fixes.h" >& /dev/null
-+ if $FIND $boinc_dir -name "std_fixes.h" > /dev/null
- then
- BOINCDIR=`$FIND $boinc_dir -name "std_fixes.h" -print | $HEAD -1 | sed 's/\/std_fixes.h//'`
- cd $BOINCDIR/..
diff --git a/astro/boinc-astropulse/files/patch-configure.ac b/astro/boinc-astropulse/files/patch-configure.ac
new file mode 100644
index 000000000000..f02cac4fe642
--- /dev/null
+++ b/astro/boinc-astropulse/files/patch-configure.ac
@@ -0,0 +1,41 @@
+--- configure.ac.orig 2012-08-14 00:07:20 UTC
++++ configure.ac
+@@ -10,17 +10,9 @@ AC_INIT(astropulse, 6.01)
+ dnl tell libtool the location of the m4 macros
+ AC_CONFIG_MACRO_DIR([m4])
+
+-svnrev="`svn info | grep Revision:`"
+-
+-if test -n "${svnrev}" ; then
+- AC_REVISION("${svnrev}")
+- AC_DEFINE_UNQUOTED(SVN_REV,"${svnrev}",
+- [Define to be the subversion revision number])
+-else
+- AC_REVISION([$Revision: 1190 $])
+- AC_DEFINE(SVN_REV,"$Revision: 1190 $",
++ AC_REVISION([$Revision: 1702 $])
++ AC_DEFINE(SVN_REV,"$Revision: 1702 $",
+ [Define to be the subversion revision number])
+-fi
+
+
+ echo "--- Configuring Astropulse $AC_PACKAGE_VERSION ---"
+@@ -267,9 +259,7 @@ dnl AC_CHECK_LIB([z], [uncompress])
+ dnl AC_CHECK_LIB([stdc++], [main])
+ SAH_GRX_LIBS
+ AC_LANG(C++)
+-SAH_CHECK_BOINC
+ SAH_CHECK_SAH
+-SAH_FIND_SETILIB
+ AC_CACHE_SAVE
+
+ if test "${ac_cv_cxx_compiler_gnu}" = "yes" ; then
+@@ -383,7 +373,7 @@ AM_CONDITIONAL(ENABLE_CLIENT, [test "${e
+ AM_CONDITIONAL(ENABLE_GUI, [test "${enable_graphics}" = yes])
+ AM_CONDITIONAL(LINUX, [test -n "`echo ${target} | grep linux`"])
+ AM_CONDITIONAL(I386, [test -n "`echo ${target} | grep i.86`"])
+-AM_CONDITIONAL(X86_64, [test -n "`echo ${target} | grep 'x86_64'`"])
++AM_CONDITIONAL(X86_64, [test -n "`echo ${target} | ${EGREP} 'x86_64|amd64'`"])
+ AM_CONDITIONAL(PPC, [test -n "`echo ${target} | grep 'powerpc'`" -o -n "`echo ${target} | grep 'ppc'`" ])
+
+
diff --git a/astro/boinc-astropulse/files/patch-m4_sah__check__boinc.m4 b/astro/boinc-astropulse/files/patch-m4_sah__check__boinc.m4
new file mode 100644
index 000000000000..6cbf7ca91f6f
--- /dev/null
+++ b/astro/boinc-astropulse/files/patch-m4_sah__check__boinc.m4
@@ -0,0 +1,11 @@
+--- m4/sah_check_boinc.m4.orig 2010-03-23 21:00:23 UTC
++++ m4/sah_check_boinc.m4
+@@ -30,7 +30,7 @@ AC_DEFUN([SAH_CHECK_BOINC],[
+ cd $thisdir
+ break
+ else
+- if $FIND $boinc_dir -name "std_fixes.h" >& /dev/null
++ if $FIND $boinc_dir -name "std_fixes.h" > /dev/null
+ then
+ BOINCDIR=`$FIND $boinc_dir -name "std_fixes.h" -print | $HEAD -1 | sed 's/\/std_fixes.h//'`
+ cd $BOINCDIR/..
diff --git a/astro/boinc-setiathome-v7/files/patch-client_Makefile.am b/astro/boinc-setiathome-v7/files/patch-client_Makefile.am
new file mode 100644
index 000000000000..fe1245fe5f86
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-client_Makefile.am
@@ -0,0 +1,11 @@
+--- client/Makefile.am.orig 2013-06-26 17:01:48 UTC
++++ client/Makefile.am
+@@ -199,7 +199,7 @@ if PPC
+ seti_boinc-analyzeFuncs_altivec.o: vector/analyzeFuncs_altivec.cpp
+ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) -DUSE_ALTIVEC \
+- -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -faltivec \
++ -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -maltivec -mabi=altivec \
+ -c -o $@ $<; then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ seti_boinc-analyzeFuncs_vector.o: vector/analyzeFuncs_vector.cpp
diff --git a/astro/boinc-setiathome-v7/files/patch-client__Makefile.am b/astro/boinc-setiathome-v7/files/patch-client__Makefile.am
deleted file mode 100644
index 8bf2690d6c2b..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-client__Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
---- client/Makefile.am.orig 2009-09-23 01:50:50.000000000 +0200
-+++ client/Makefile.am 2011-12-04 17:19:18.000000000 +0100
-@@ -165,7 +165,7 @@
- seti_boinc-analyzeFuncs_altivec.o: vector/analyzeFuncs_altivec.cpp
- if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) -DUSE_ALTIVEC \
-- -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -faltivec \
-+ -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -maltivec -mabi=altivec \
- -c -o $@ $<; then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
- seti_boinc-analyzeFuncs_vector.o: vector/analyzeFuncs_vector.cpp
diff --git a/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_sse.cpp b/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_sse.cpp
deleted file mode 100644
index 162d1cb8509f..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_sse.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
---- client/vector/analyzeFuncs_sse.cpp.origin 2013-08-02 01:08:24.000000000 +0400
-+++ client/vector/analyzeFuncs_sse.cpp 2013-08-02 01:18:33.000000000 +0400
-@@ -191,7 +191,7 @@
- prefetcht0(out+3*yline);
- // TODO: figure out why the intrinsic version crashes for MinGW build
- // not critical, but shuffle-only _MM_TRANSPOSE4_PS is optimal on some
--#if defined(USE_INTRINSICS) && defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__)
-+#if defined(USE_INTRINSICS) && (defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) || defined(__clang__))
- register float4 row0=*(__m128 *)in;
- register float4 row1=*(__m128 *)(in+xline);
- register float4 row2=*(__m128 *)(in+2*xline);
-@@ -273,7 +273,7 @@
-
- // TODO: figure out why the intrinsic version crashes for MinGW build
- // not critical, but the shuffle-only _MM_TRANSPOSE4_PS is optimal on some
--#if defined(USE_INTRINSICS) && defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__)
-+#if defined(USE_INTRINSICS) && (defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) || defined(__clang__))
- register float4 row0=*(__m128 *)in;
- register float4 row1=*(__m128 *)(in+xline);
- register float4 row2=*(__m128 *)(in+2*xline);
-@@ -1592,8 +1592,14 @@
- return ( tMax );
- }
-
-+#ifdef __clang__
-+#define s_getU( aaaa, ptr ) \
-+ aaaa = _mm_loadl_pi(aaaa, (__m64 *)ptr); \
-+ aaaa = _mm_loadh_pi(aaaa, ((__m64 *)(ptr))+1 )
-+#else
- #define s_getU( aaaa, ptr ) \
- aaaa = _mm_loadh_pi( _mm_loadl_pi(aaaa, (__m64 *)ptr), ((__m64 *)(ptr))+1 )
-+#endif
-
- #define s_putU( ptr, aaaa ) \
- _mm_storel_pi((__m64 *)ptr, aaaa), _mm_storeh_pi( ((__m64 *)ptr)+1 , aaaa)
diff --git a/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_vector.cpp b/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_vector.cpp
deleted file mode 100644
index 1a418db27f3e..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_vector.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- client/vector/analyzeFuncs_vector.cpp.orig 2013-07-11 22:32:37.000000000 +0200
-+++ client/vector/analyzeFuncs_vector.cpp 2013-07-11 22:41:59.000000000 +0200
-@@ -98,9 +98,7 @@
-
-
- #ifndef __APPLE_CC__
--#ifdef HAVE___ISNAN
--#define isnotnan(x) (!__isnan(x))
--#elif defined(HAVE__ISNAN)
-+#if defined(HAVE__ISNAN)
- #define isnotnan(x) (!_isnan(x))
- #elif defined(HAVE_ISNAN)
- #define isnotnan(x) (!isnan(x))
diff --git a/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_x86_64.cpp b/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_x86_64.cpp
deleted file mode 100644
index beb6e2abfc7a..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-client__vector__analyzeFuncs_x86_64.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
---- client/vector/analyzeFuncs_x86_64.cpp.orig 2011-04-03 07:25:53.000000000 +0200
-+++ client/vector/analyzeFuncs_x86_64.cpp 2013-07-29 17:41:37.000000000 +0200
-@@ -61,8 +61,14 @@
- static const int as [4] __attribute__((aligned(16)))= {INT_MIN, 0, INT_MIN, 0} ; // {-, +, -, +}
- char *cblock = (char *)alloca(11*16);
- cblock+=(16-((ssize_t)cblock % 16));
-+#ifdef __clang__
-+ __m128 *fblock=reinterpret_cast<__m128 *>(cblock);
-+ __m128d *dblock=reinterpret_cast<__m128d *>(cblock);
-+#else
- x86_m128 *fblock=reinterpret_cast<x86_m128 *>(cblock);
- x86_m128d *dblock=reinterpret_cast<x86_m128d *>(cblock);
-+#endif
-+
- #define CC dblock[0]
- #define DD dblock[1]
- #define cc fblock[2]
diff --git a/astro/boinc-setiathome-v7/files/patch-client__vector__x86_float4.h b/astro/boinc-setiathome-v7/files/patch-client__vector__x86_float4.h
deleted file mode 100644
index e8e426206164..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-client__vector__x86_float4.h
+++ /dev/null
@@ -1,25 +0,0 @@
---- client/vector/x86_float4.h.orig 2011-05-22 21:08:50.000000000 +0200
-+++ client/vector/x86_float4.h 2013-07-29 18:52:18.000000000 +0200
-@@ -58,11 +58,15 @@
-
- ALIGNED(static const int sign_bits[4],16)={INT_MIN, INT_MIN, INT_MIN, INT_MIN};
- ALIGNED(static const int other_bits[4],16)={INT_MAX, INT_MAX, INT_MAX, INT_MAX};
-+
-+#ifdef __clang__
-+#ifndef __EMMINTRIN_H
-+typedef long long __m128i __attribute__((__vector_size__(16)));
-+#endif
-+#endif
- #define SIGN_BITS (*(__m128i *)sign_bits)
- #define OTHER_BITS (*(__m128i *)other_bits)
-
--
--
- struct float4 {
- float4() {};
- float4(const __m128 b) { m=b; };
-@@ -263,4 +267,3 @@
-
- #endif
- #endif
--
diff --git a/astro/boinc-setiathome-v7/files/patch-client__vector__x86_ops.h b/astro/boinc-setiathome-v7/files/patch-client__vector__x86_ops.h
deleted file mode 100644
index 27c17f4493cd..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-client__vector__x86_ops.h
+++ /dev/null
@@ -1,43 +0,0 @@
---- client/vector/x86_ops.h.orig 2011-05-22 21:08:50.000000000 +0200
-+++ client/vector/x86_ops.h 2013-07-29 17:42:54.000000000 +0200
-@@ -135,7 +135,11 @@
-
- #if defined(__SSE2__)
- // SSE2 specific functions/macros here.
--#ifdef _MSC_VER
-+#ifdef __clang__
-+#ifndef __EMMINTRIN_H
-+#include <emmintrin.h>
-+#endif
-+#elif defined _MSC_VER
- typedef __m128d x86_m128d;
- #else
- typedef double x86_m128d __attribute__ ((mode(V2DF))) __attribute__((aligned(16)));
-@@ -144,7 +148,11 @@
-
- #if defined(__SSE__)
- // SSE specific functions/macros here.
--#ifdef _MSC_VER
-+#ifdef __clang__
-+#ifndef __XMMINTRIN_H
-+#include <xmmintrin.h>
-+#endif
-+#elif defined _MSC_VER
- typedef __m128 x86_m128;
- typedef __m128i x86_m128i;
- #else
-@@ -186,6 +194,7 @@
-
- #endif
-
-+#ifndef __clang__
- #ifndef __m128d
- #define __m128d x86_m128d
- #endif
-@@ -197,5 +206,6 @@
- #ifndef __m128
- #define __m128 x86_m128
- #endif
-+#endif
-
- #endif
diff --git a/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__sse.cpp b/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__sse.cpp
new file mode 100644
index 000000000000..65ac60317069
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__sse.cpp
@@ -0,0 +1,35 @@
+--- client/vector/analyzeFuncs_sse.cpp.orig 2013-06-26 16:56:49 UTC
++++ client/vector/analyzeFuncs_sse.cpp
+@@ -191,7 +191,7 @@ inline void v_vsubTranspose4(float *in,
+ prefetcht0(out+3*yline);
+ // TODO: figure out why the intrinsic version crashes for MinGW build
+ // not critical, but shuffle-only _MM_TRANSPOSE4_PS is optimal on some
+-#if defined(USE_INTRINSICS) && defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__)
++#if defined(USE_INTRINSICS) && (defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) || defined(__clang__))
+ register float4 row0=*(__m128 *)in;
+ register float4 row1=*(__m128 *)(in+xline);
+ register float4 row2=*(__m128 *)(in+2*xline);
+@@ -273,7 +273,7 @@ inline void v_vsubTranspose4np(float *in
+
+ // TODO: figure out why the intrinsic version crashes for MinGW build
+ // not critical, but the shuffle-only _MM_TRANSPOSE4_PS is optimal on some
+-#if defined(USE_INTRINSICS) && defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__)
++#if defined(USE_INTRINSICS) && (defined(_MM_TRANSPOSE4_PS) && !defined(__GNUC__) || defined(__clang__))
+ register float4 row0=*(__m128 *)in;
+ register float4 row1=*(__m128 *)(in+xline);
+ register float4 row2=*(__m128 *)(in+2*xline);
+@@ -1592,8 +1592,14 @@ inline float s_maxp2f( __m128 max1 ) {
+ return ( tMax );
+ }
+
++#ifdef __clang__
++#define s_getU( aaaa, ptr ) \
++ aaaa = _mm_loadl_pi(aaaa, (__m64 *)ptr); \
++ aaaa = _mm_loadh_pi(aaaa, ((__m64 *)(ptr))+1 )
++#else
+ #define s_getU( aaaa, ptr ) \
+ aaaa = _mm_loadh_pi( _mm_loadl_pi(aaaa, (__m64 *)ptr), ((__m64 *)(ptr))+1 )
++#endif
+
+ #define s_putU( ptr, aaaa ) \
+ _mm_storel_pi((__m64 *)ptr, aaaa), _mm_storeh_pi( ((__m64 *)ptr)+1 , aaaa)
diff --git a/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__vector.cpp b/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__vector.cpp
new file mode 100644
index 000000000000..f047dc9898ca
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__vector.cpp
@@ -0,0 +1,13 @@
+--- client/vector/analyzeFuncs_vector.cpp.orig 2011-08-04 00:35:40 UTC
++++ client/vector/analyzeFuncs_vector.cpp
+@@ -98,9 +98,7 @@
+
+
+ #ifndef __APPLE_CC__
+-#ifdef HAVE___ISNAN
+-#define isnotnan(x) (!__isnan(x))
+-#elif defined(HAVE__ISNAN)
++#if defined(HAVE__ISNAN)
+ #define isnotnan(x) (!_isnan(x))
+ #elif defined(HAVE_ISNAN)
+ #define isnotnan(x) (!isnan(x))
diff --git a/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__x86__64.cpp b/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__x86__64.cpp
new file mode 100644
index 000000000000..82b9b0df5fff
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-client_vector_analyzeFuncs__x86__64.cpp
@@ -0,0 +1,17 @@
+--- client/vector/analyzeFuncs_x86_64.cpp.orig 2011-04-03 05:25:53 UTC
++++ client/vector/analyzeFuncs_x86_64.cpp
+@@ -61,8 +61,14 @@ int v_vChirpData_x86_64(
+ static const int as [4] __attribute__((aligned(16)))= {INT_MIN, 0, INT_MIN, 0} ; // {-, +, -, +}
+ char *cblock = (char *)alloca(11*16);
+ cblock+=(16-((ssize_t)cblock % 16));
++#ifdef __clang__
++ __m128 *fblock=reinterpret_cast<__m128 *>(cblock);
++ __m128d *dblock=reinterpret_cast<__m128d *>(cblock);
++#else
+ x86_m128 *fblock=reinterpret_cast<x86_m128 *>(cblock);
+ x86_m128d *dblock=reinterpret_cast<x86_m128d *>(cblock);
++#endif
++
+ #define CC dblock[0]
+ #define DD dblock[1]
+ #define cc fblock[2]
diff --git a/astro/boinc-setiathome-v7/files/patch-client_vector_x86__float4.h b/astro/boinc-setiathome-v7/files/patch-client_vector_x86__float4.h
new file mode 100644
index 000000000000..75316f94e46c
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-client_vector_x86__float4.h
@@ -0,0 +1,25 @@
+--- client/vector/x86_float4.h.orig 2011-05-22 19:08:50 UTC
++++ client/vector/x86_float4.h
+@@ -58,11 +58,15 @@ extern const_float4 INDGEN[2];
+
+ ALIGNED(static const int sign_bits[4],16)={INT_MIN, INT_MIN, INT_MIN, INT_MIN};
+ ALIGNED(static const int other_bits[4],16)={INT_MAX, INT_MAX, INT_MAX, INT_MAX};
++
++#ifdef __clang__
++#ifndef __EMMINTRIN_H
++typedef long long __m128i __attribute__((__vector_size__(16)));
++#endif
++#endif
+ #define SIGN_BITS (*(__m128i *)sign_bits)
+ #define OTHER_BITS (*(__m128i *)other_bits)
+
+-
+-
+ struct float4 {
+ float4() {};
+ float4(const __m128 b) { m=b; };
+@@ -263,4 +267,3 @@ struct const_float4 : public float4 {
+
+ #endif
+ #endif
+-
diff --git a/astro/boinc-setiathome-v7/files/patch-client_vector_x86__ops.h b/astro/boinc-setiathome-v7/files/patch-client_vector_x86__ops.h
new file mode 100644
index 000000000000..f84ade69d655
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-client_vector_x86__ops.h
@@ -0,0 +1,43 @@
+--- client/vector/x86_ops.h.orig 2011-05-22 19:08:50 UTC
++++ client/vector/x86_ops.h
+@@ -135,7 +135,11 @@
+
+ #if defined(__SSE2__)
+ // SSE2 specific functions/macros here.
+-#ifdef _MSC_VER
++#ifdef __clang__
++#ifndef __EMMINTRIN_H
++#include <emmintrin.h>
++#endif
++#elif defined _MSC_VER
+ typedef __m128d x86_m128d;
+ #else
+ typedef double x86_m128d __attribute__ ((mode(V2DF))) __attribute__((aligned(16)));
+@@ -144,7 +148,11 @@ typedef double x86_m128d __attribute__ (
+
+ #if defined(__SSE__)
+ // SSE specific functions/macros here.
+-#ifdef _MSC_VER
++#ifdef __clang__
++#ifndef __XMMINTRIN_H
++#include <xmmintrin.h>
++#endif
++#elif defined _MSC_VER
+ typedef __m128 x86_m128;
+ typedef __m128i x86_m128i;
+ #else
+@@ -186,6 +194,7 @@ static inline void prefetchnta(const voi
+
+ #endif
+
++#ifndef __clang__
+ #ifndef __m128d
+ #define __m128d x86_m128d
+ #endif
+@@ -197,5 +206,6 @@ static inline void prefetchnta(const voi
+ #ifndef __m128
+ #define __m128 x86_m128
+ #endif
++#endif
+
+ #endif
diff --git a/astro/boinc-setiathome-v7/files/patch-configure.ac b/astro/boinc-setiathome-v7/files/patch-configure.ac
index 34287cc90ad3..5cb2366b2ef7 100644
--- a/astro/boinc-setiathome-v7/files/patch-configure.ac
+++ b/astro/boinc-setiathome-v7/files/patch-configure.ac
@@ -1,5 +1,5 @@
---- configure.ac.orig 2013-07-02 22:51:54.000000000 +0200
-+++ configure.ac 2013-07-11 21:40:55.000000000 +0200
+--- configure.ac.orig 2013-07-02 20:51:54 UTC
++++ configure.ac
@@ -5,17 +5,10 @@
AC_PREREQ(2.57)
@@ -21,7 +21,7 @@
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(dist-zip)
-@@ -55,8 +48,6 @@
+@@ -55,8 +48,6 @@ if test -z "`echo ${LDFLAGS} | grep ${tm
fi
# set posix source on linux
diff --git a/astro/boinc-setiathome-v7/files/patch-m4__sah_check_boinc.m4 b/astro/boinc-setiathome-v7/files/patch-m4__sah_check_boinc.m4
deleted file mode 100644
index 821d7e296845..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-m4__sah_check_boinc.m4
+++ /dev/null
@@ -1,11 +0,0 @@
---- m4/sah_check_boinc.m4.orig 2008-09-09 18:55:19.000000000 +0200
-+++ m4/sah_check_boinc.m4 2011-03-13 16:24:18.000000000 +0100
-@@ -30,7 +30,7 @@
- cd $thisdir
- break
- else
-- if $FIND $boinc_dir -name "std_fixes.h" >& /dev/null
-+ if $FIND $boinc_dir -name "std_fixes.h" > /dev/null
- then
- BOINCDIR=`$FIND $boinc_dir -name "std_fixes.h" -print | $HEAD -1 | sed 's/\/std_fixes.h//'`
- cd $BOINCDIR/..
diff --git a/astro/boinc-setiathome-v7/files/patch-m4_sah__check__boinc.m4 b/astro/boinc-setiathome-v7/files/patch-m4_sah__check__boinc.m4
new file mode 100644
index 000000000000..762f6c940204
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-m4_sah__check__boinc.m4
@@ -0,0 +1,11 @@
+--- m4/sah_check_boinc.m4.orig 2008-09-09 16:55:19 UTC
++++ m4/sah_check_boinc.m4
+@@ -30,7 +30,7 @@ AC_DEFUN([SAH_CHECK_BOINC],[
+ cd $thisdir
+ break
+ else
+- if $FIND $boinc_dir -name "std_fixes.h" >& /dev/null
++ if $FIND $boinc_dir -name "std_fixes.h" > /dev/null
+ then
+ BOINCDIR=`$FIND $boinc_dir -name "std_fixes.h" -print | $HEAD -1 | sed 's/\/std_fixes.h//'`
+ cd $BOINCDIR/..
diff --git a/astro/boinc-setiathome-v7/files/patch-sah__config.h b/astro/boinc-setiathome-v7/files/patch-sah__config.h
new file mode 100644
index 000000000000..b88bf5b419df
--- /dev/null
+++ b/astro/boinc-setiathome-v7/files/patch-sah__config.h
@@ -0,0 +1,11 @@
+--- sah_config.h.orig 2012-09-18 22:45:14 UTC
++++ sah_config.h
+@@ -21,7 +21,7 @@
+ #define AVX_MASKSTORE_TYPECAST(x) reinterpret_cast<__m256i>(x)
+
+ /* Define to 1 to build a graphical application */
+-#define BOINC_APP_GRAPHICS 1
++/* #undef BOINC_APP_GRAPHICS */
+
+ /* Define to a string identifying your compiler */
+ #define COMPILER_STRING "g++ (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)"
diff --git a/astro/boinc-setiathome-v7/files/patch-sah_config.h b/astro/boinc-setiathome-v7/files/patch-sah_config.h
deleted file mode 100644
index c24b82c8a6c6..000000000000
--- a/astro/boinc-setiathome-v7/files/patch-sah_config.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- sah_config.h.orig 2012-09-19 00:45:14.000000000 +0200
-+++ sah_config.h 2013-07-19 18:35:22.000000000 +0200
-@@ -21,7 +21,7 @@
- #define AVX_MASKSTORE_TYPECAST(x) reinterpret_cast<__m256i>(x)
-
- /* Define to 1 to build a graphical application */
--#define BOINC_APP_GRAPHICS 1
-+/* #undef BOINC_APP_GRAPHICS */
-
- /* Define to a string identifying your compiler */
- #define COMPILER_STRING "g++ (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)"
diff --git a/astro/fowsr/files/patch-fowsr-c b/astro/fowsr/files/patch-fowsr-c
deleted file mode 100644
index d7eb95d15757..000000000000
--- a/astro/fowsr/files/patch-fowsr-c
+++ /dev/null
@@ -1,43 +0,0 @@
---- fowsr.c.orig 2010-07-18 18:06:30.000000000 +0200
-+++ fowsr.c 2010-09-01 10:59:58.004518772 +0200
-@@ -110,13 +110,17 @@
-
- signal(SIGTERM, release_usb_device);
-
-+#ifdef LIBUSB_HAS_GET_DRIVER_NP
- ret = usb_get_driver_np(devh, 0, buf, sizeof(buf));
- printf("usb_get_driver_np returned %d\n", ret);
- if (ret == 0) {
- printf("interface 0 already claimed by driver \\'%s\\', attempting to detach it\n", buf);
-+#ifdef LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP
- ret = usb_detach_kernel_driver_np(devh, 0);
- printf("usb_detach_kernel_driver_np returned %d\n", ret);
-+#endif
- }
-+#endif
- ret = usb_claim_interface(devh, 0);
- if (ret != 0) {
- printf("claim failed with error %d\n", ret);
-@@ -159,12 +163,14 @@
- FILE* f;
- if (isStoring == ISREADING) {
- if (f=fopen(fname,"rb")) {
-+ printf("using cache file %s\n", fname);
- n=fread(&m_previous_timestamp,sizeof(m_previous_timestamp),1,f);
- n=fread(m_buf,sizeof(m_buf[0]),WS_BUFFER_SIZE,f);
- }
- print_bytes((char *)&m_previous_timestamp, sizeof(time_t));
- } else { // ISWRITING
- if (f=fopen(fname,"wb")) {
-+ printf("updating cache file %s\n", fname);
- n=fwrite(&m_timestamp,sizeof(m_timestamp),1,f);
- n=fwrite(m_buf,sizeof(m_buf[0]),WS_BUFFER_SIZE,f);
- }
-@@ -566,6 +572,7 @@
-
- FILE* f;
- if (f=fopen(fname,"a+s")) {
-+ printf("writing to %s\n", fname);
-
- // Header
- switch (arg) {
diff --git a/astro/fowsr/files/patch-fowsr.c b/astro/fowsr/files/patch-fowsr.c
new file mode 100644
index 000000000000..9e312de81977
--- /dev/null
+++ b/astro/fowsr/files/patch-fowsr.c
@@ -0,0 +1,43 @@
+--- fowsr.c.orig 2016-07-26 12:57:00 UTC
++++ fowsr.c
+@@ -110,13 +110,17 @@ int CUSB_Open(int vendor, int product)
+
+ signal(SIGTERM, release_usb_device);
+
++#ifdef LIBUSB_HAS_GET_DRIVER_NP
+ ret = usb_get_driver_np(devh, 0, buf, sizeof(buf));
+ printf("usb_get_driver_np returned %d\n", ret);
+ if (ret == 0) {
+ printf("interface 0 already claimed by driver \\'%s\\', attempting to detach it\n", buf);
++#ifdef LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP
+ ret = usb_detach_kernel_driver_np(devh, 0);
+ printf("usb_detach_kernel_driver_np returned %d\n", ret);
++#endif
+ }
++#endif
+ ret = usb_claim_interface(devh, 0);
+ if (ret != 0) {
+ printf("claim failed with error %d\n", ret);
+@@ -159,12 +163,14 @@ void CWS_Cache(char isStoring)
+ FILE* f;
+ if (isStoring == ISREADING) {
+ if (f=fopen(fname,"rb")) {
++ printf("using cache file %s\n", fname);
+ n=fread(&m_previous_timestamp,sizeof(m_previous_timestamp),1,f);
+ n=fread(m_buf,sizeof(m_buf[0]),WS_BUFFER_SIZE,f);
+ }
+ print_bytes((char *)&m_previous_timestamp, sizeof(time_t));
+ } else { // ISWRITING
+ if (f=fopen(fname,"wb")) {
++ printf("updating cache file %s\n", fname);
+ n=fwrite(&m_timestamp,sizeof(m_timestamp),1,f);
+ n=fwrite(m_buf,sizeof(m_buf[0]),WS_BUFFER_SIZE,f);
+ }
+@@ -566,6 +572,7 @@ int CWF_Write(char arg,char* fname)
+
+ FILE* f;
+ if (f=fopen(fname,"a+s")) {
++ printf("writing to %s\n", fname);
+
+ // Header
+ switch (arg) {
diff --git a/astro/foxtrotgps/files/patch-src_tracks.c b/astro/foxtrotgps/files/patch-src_tracks.c
index b31601124a4b..bb6d6f0aed5f 100644
--- a/astro/foxtrotgps/files/patch-src_tracks.c
+++ b/astro/foxtrotgps/files/patch-src_tracks.c
@@ -1,4 +1,4 @@
---- src/tracks.c.orig 2015-05-21 11:26:32 UTC
+--- src/tracks.c.orig 2014-10-24 04:57:10 UTC
+++ src/tracks.c
@@ -41,8 +41,10 @@ bbox_t get_track_bbox(GSList *track);
GSList * load_log_file_into_list(char *file);
diff --git a/astro/gkrellmoon2/files/patch-CalcEphem.c b/astro/gkrellmoon2/files/patch-CalcEphem.c
index 780aa1d2a3be..7d65e0d68381 100644
--- a/astro/gkrellmoon2/files/patch-CalcEphem.c
+++ b/astro/gkrellmoon2/files/patch-CalcEphem.c
@@ -1,5 +1,5 @@
---- CalcEphem.c.orig Thu Aug 15 20:41:03 2002
-+++ CalcEphem.c Thu Aug 15 20:41:23 2002
+--- CalcEphem.c.orig 2002-12-11 03:36:06 UTC
++++ CalcEphem.c
@@ -8,6 +8,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/astro/gkrellmoon2/files/patch-Makefile b/astro/gkrellmoon2/files/patch-Makefile
index 66c053c20eab..e08f52ee9eb3 100644
--- a/astro/gkrellmoon2/files/patch-Makefile
+++ b/astro/gkrellmoon2/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig Wed Dec 11 04:36:06 2002
-+++ Makefile Wed Aug 25 13:09:01 2004
-@@ -4,11 +4,9 @@
+--- Makefile.orig 2002-12-11 03:36:06 UTC
++++ Makefile
+@@ -4,12 +4,10 @@ GTK_LIB = `pkg-config gtk+-2.0 --libs`
INSTALLDIR = ${DESTDIR}/usr/lib/gkrellm2/plugins
@@ -8,8 +8,9 @@
+CFLAGS += -Wall -fPIC $(GTK_INCLUDE)
LIBS = $(GTK_LIB)
LFLAGS = -shared
--
--CC = gcc $(CFLAGS) $(FLAGS)
+-CC = gcc $(CFLAGS) $(FLAGS)
+-
OBJS = gkrellmoon.o MoonRise.o CalcEphem.o Moon.o
+ gkrellmoon.so: $(OBJS)
diff --git a/astro/gmapcatcher/files/patch-gmapcatcher_mapArgs.py b/astro/gmapcatcher/files/patch-gmapcatcher_mapArgs.py
index 5d06dd885401..f922dd520bf2 100644
--- a/astro/gmapcatcher/files/patch-gmapcatcher_mapArgs.py
+++ b/astro/gmapcatcher/files/patch-gmapcatcher_mapArgs.py
@@ -1,6 +1,6 @@
---- gmapcatcher/mapArgs.py.orig 2012-10-17 02:09:15.000000000 +0800
-+++ gmapcatcher/mapArgs.py 2012-12-12 13:58:33.000000000 +0800
-@@ -46,10 +46,10 @@
+--- gmapcatcher/mapArgs.py.orig 2013-07-19 08:20:47 UTC
++++ gmapcatcher/mapArgs.py
+@@ -46,10 +46,10 @@ class MapArgs():
print ' very useful to download maps of entire world'
print ' '
print 'SAMPLE USAGE'
@@ -15,7 +15,7 @@
def __init__(self, arrArgs=()):
if len(arrArgs) > 1:
-@@ -99,7 +99,7 @@
+@@ -99,7 +99,7 @@ class MapArgs():
self.lng_range = 179
def __str__(self):
diff --git a/astro/gmapcatcher/files/patch-setup.py b/astro/gmapcatcher/files/patch-setup.py
index ba5a82f6741b..7f6d4a342b8c 100644
--- a/astro/gmapcatcher/files/patch-setup.py
+++ b/astro/gmapcatcher/files/patch-setup.py
@@ -1,6 +1,6 @@
---- setup.py.orig 2012-10-17 02:09:15.000000000 +0800
-+++ setup.py 2012-12-12 13:13:04.000000000 +0800
-@@ -13,15 +13,13 @@
+--- setup.py.orig 2013-07-19 08:20:47 UTC
++++ setup.py
+@@ -13,15 +13,13 @@ if os.name == "posix":
description = 'Offline Map Viewer',
version = VERSION,
url = WEB_ADDRESS,
diff --git a/astro/google-earth/files/patch-bin-googleearth b/astro/google-earth/files/patch-bin-googleearth
index a56aeb9494d6..0a3428911691 100644
--- a/astro/google-earth/files/patch-bin-googleearth
+++ b/astro/google-earth/files/patch-bin-googleearth
@@ -1,6 +1,6 @@
---- ./bin/googleearth.orig 2011-05-17 10:42:02.000000000 +0300
-+++ ./bin/googleearth 2014-03-13 08:59:26.456795260 +0200
-@@ -8,6 +8,17 @@
+--- bin/googleearth.orig 2011-05-17 07:42:02 UTC
++++ bin/googleearth
+@@ -8,6 +8,17 @@ if [ "${GOOGLEEARTH_DATA_PATH}" = "" ];
GOOGLEEARTH_DATA_PATH="$(dirname "$(readlink -f "$0")")"
fi
@@ -18,7 +18,7 @@
LD_LIBRARY_PATH=.:${GOOGLEEARTH_DATA_PATH}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
-@@ -15,10 +26,11 @@
+@@ -15,10 +26,11 @@ export LD_LIBRARY_PATH
if [ -x "${GOOGLEEARTH_DATA_PATH}/googleearth-bin" ]
then
cd "${GOOGLEEARTH_DATA_PATH}/"
diff --git a/astro/gpsbabel/files/patch-Makefile.in b/astro/gpsbabel/files/patch-Makefile.in
index 218684aeab3a..c83b242e4b2e 100644
--- a/astro/gpsbabel/files/patch-Makefile.in
+++ b/astro/gpsbabel/files/patch-Makefile.in
@@ -1,4 +1,4 @@
---- Makefile.in.orig
+--- Makefile.in.orig 2016-01-03 02:09:17 UTC
+++ Makefile.in
@@ -148,10 +148,10 @@ toolinfo
all: gpsbabel$(EXEEXT)
diff --git a/astro/gpsbabel/files/patch-jeeps-gpslibusb.cc b/astro/gpsbabel/files/patch-jeeps-gpslibusb.cc
deleted file mode 100644
index 60f7859af9dc..000000000000
--- a/astro/gpsbabel/files/patch-jeeps-gpslibusb.cc
+++ /dev/null
@@ -1,13 +0,0 @@
---- jeeps/gpslibusb.cc.orig
-+++ jeeps/gpslibusb.cc
-@@ -20,8 +20,8 @@
- */
-
-
--#include <stdio.h>
--#include <stdlib.h>
-+#include <cstdio>
-+#include <cstdlib>
- #include <ctype.h>
- #if HAVE_CONFIG_H
- #include "config.h"
diff --git a/astro/gpsbabel/files/patch-jeeps_gpslibusb.cc b/astro/gpsbabel/files/patch-jeeps_gpslibusb.cc
new file mode 100644
index 000000000000..6995a8224c48
--- /dev/null
+++ b/astro/gpsbabel/files/patch-jeeps_gpslibusb.cc
@@ -0,0 +1,13 @@
+--- jeeps/gpslibusb.cc.orig 2016-01-03 02:09:17 UTC
++++ jeeps/gpslibusb.cc
+@@ -20,8 +20,8 @@
+ */
+
+
+-#include <stdio.h>
+-#include <stdlib.h>
++#include <cstdio>
++#include <cstdlib>
+ #include <ctype.h>
+ #if HAVE_CONFIG_H
+ #include "config.h"
diff --git a/astro/gpsbabel/files/patch-src-core-ziparchive.cc b/astro/gpsbabel/files/patch-src-core-ziparchive.cc
deleted file mode 100644
index 283b5a6ddd2e..000000000000
--- a/astro/gpsbabel/files/patch-src-core-ziparchive.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/core/ziparchive.cc.orig
-+++ src/core/ziparchive.cc
-@@ -23,7 +23,7 @@
-
- #include "defs.h"
- #include "src/core/logging.h"
--#include "zlib/contrib/minizip/zip.h"
-+#include <minizip/zip.h>
-
- #include <QtCore/QFile>
- #include <QtCore/QDebug>
diff --git a/astro/gpsbabel/files/patch-src-core-ziparchive.h b/astro/gpsbabel/files/patch-src-core-ziparchive.h
deleted file mode 100644
index 3a2165d7be69..000000000000
--- a/astro/gpsbabel/files/patch-src-core-ziparchive.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/core/ziparchive.h.orig
-+++ src/core/ziparchive.h
-@@ -21,7 +21,7 @@
-
- #include <QtCore/QString>
- #include <QtCore/QStringList>
--#include "zlib/contrib/minizip/zip.h"
-+#include <minizip/zip.h>
-
- class ZipArchive
- {
diff --git a/astro/gpsbabel/files/patch-src_core_ziparchive.cc b/astro/gpsbabel/files/patch-src_core_ziparchive.cc
new file mode 100644
index 000000000000..718db70a6496
--- /dev/null
+++ b/astro/gpsbabel/files/patch-src_core_ziparchive.cc
@@ -0,0 +1,11 @@
+--- src/core/ziparchive.cc.orig 2016-01-03 02:09:17 UTC
++++ src/core/ziparchive.cc
+@@ -23,7 +23,7 @@
+
+ #include "defs.h"
+ #include "src/core/logging.h"
+-#include "zlib/contrib/minizip/zip.h"
++#include <minizip/zip.h>
+
+ #include <QtCore/QFile>
+ #include <QtCore/QDebug>
diff --git a/astro/gpsbabel/files/patch-src_core_ziparchive.h b/astro/gpsbabel/files/patch-src_core_ziparchive.h
new file mode 100644
index 000000000000..b6816189892f
--- /dev/null
+++ b/astro/gpsbabel/files/patch-src_core_ziparchive.h
@@ -0,0 +1,11 @@
+--- src/core/ziparchive.h.orig 2016-01-03 02:09:17 UTC
++++ src/core/ziparchive.h
+@@ -21,7 +21,7 @@
+
+ #include <QtCore/QString>
+ #include <QtCore/QStringList>
+-#include "zlib/contrib/minizip/zip.h"
++#include <minizip/zip.h>
+
+ class ZipArchive
+ {
diff --git a/astro/gpsbabel14/files/patch-libusb b/astro/gpsbabel14/files/patch-libusb
index 4bf7613de5d0..99caa8136d9c 100644
--- a/astro/gpsbabel14/files/patch-libusb
+++ b/astro/gpsbabel14/files/patch-libusb
@@ -1,6 +1,6 @@
---- configure.in.orig 2008-10-31 15:43:21.000000000 +0300
-+++ configure.in 2009-03-07 01:08:46.000000000 +0300
-@@ -170,6 +169,28 @@
+--- configure.in.orig 2012-09-03 22:09:52 UTC
++++ configure.in
+@@ -189,6 +189,28 @@ case "$target" in
AC_DEFINE(HAVE_LIBUSB, 1)
CFLAGS="$CFLAGS -Imac/libusb/"
;;
diff --git a/astro/gpsd/files/patch-libgps.pc.in b/astro/gpsd/files/patch-libgps.pc.in
index 2a0106e99fcf..3242278e458f 100644
--- a/astro/gpsd/files/patch-libgps.pc.in
+++ b/astro/gpsd/files/patch-libgps.pc.in
@@ -1,5 +1,5 @@
---- libgps.pc.in.orig 2015-01-25 12:09:01.000000000 +0000
-+++ libgps.pc.in 2015-05-21 02:11:05.192169497 +0000
+--- libgps.pc.in.orig 2015-01-25 12:09:01 UTC
++++ libgps.pc.in
@@ -1,6 +1,6 @@
prefix=@prefix@
exec_prefix=${prefix}
diff --git a/astro/gpsd/files/patch-libgpsd.pc.in b/astro/gpsd/files/patch-libgpsd.pc.in
index 913feef4b813..1f716e4d7ba4 100644
--- a/astro/gpsd/files/patch-libgpsd.pc.in
+++ b/astro/gpsd/files/patch-libgpsd.pc.in
@@ -1,5 +1,5 @@
---- libgpsd.pc.in.orig 2015-01-23 18:48:09.000000000 +0000
-+++ libgpsd.pc.in 2015-05-21 02:11:05.192169497 +0000
+--- libgpsd.pc.in.orig 2015-01-23 18:48:09 UTC
++++ libgpsd.pc.in
@@ -1,6 +1,6 @@
prefix=@prefix@
exec_prefix=${prefix}
diff --git a/astro/gpsdrive/files/patch-src__gpsserial.c b/astro/gpsdrive/files/patch-src__gpsserial.c
deleted file mode 100644
index 531570d64224..000000000000
--- a/astro/gpsdrive/files/patch-src__gpsserial.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/gpsserial.c.orig Thu Feb 12 18:42:53 2004
-+++ src/gpsserial.c Mon Sep 6 00:44:34 2004
-@@ -178,7 +178,9 @@
- CLOCAL : local connection, no modem contol
- CREAD : enable receiving characters
- */
-- newtio.c_cflag = (11 + serialspeed) | CS8 | CLOCAL | CREAD;
-+ { int t[] = { 2400, 4800, 9600, 19200, 38400 };
-+ newtio.c_ispeed = newtio.c_ospeed = t[serialspeed]; }
-+ newtio.c_cflag = CS8 | CLOCAL | CREAD;
- newtio.c_cflag &= ~(PARENB | CRTSCTS);
- /*
- IGNPAR : ignore bytes with parity errors
diff --git a/astro/gpsdrive/files/patch-src__splash.c b/astro/gpsdrive/files/patch-src__splash.c
deleted file mode 100644
index 22e57ada2d77..000000000000
--- a/astro/gpsdrive/files/patch-src__splash.c
+++ /dev/null
@@ -1,60 +0,0 @@
---- src/splash.c.orig Mon Jun 7 09:55:30 2004
-+++ src/splash.c Mon Jun 7 09:56:28 2004
-@@ -529,6 +529,24 @@
- {
- GtkTextIter iter;
- GtkTextIter start, end;
-+ gchar *t1 =
-+ _
-+ ("Left mouse button : Set position (usefull in simulation mode)\n"
-+ "Right mouse button : Set target directly on the map\n"
-+ "Middle mouse button : Display position again\n"
-+ "Shift left mouse button : smaller map\n"
-+ "Shift right mouse button : larger map\n"
-+ "Control left mouse button : Set a waypoint (mouse position) on the map\n"
-+ "Control right mouse button: Set a waypoint at current position on the map\n\n");
-+ gchar *t2 = _("j : switch to next waypoint in route mode\n"
-+ "x : add waypoint at current position\n"
-+ "y : add waypoint at mouse cursor position\n");
-+ gchar *t3 =
-+ _("Press the underlined key together with the ALT-key.\n\n"
-+ "You can move on the map by selecting the Position-Mode"
-+ " in the menu. A blue rectangle shows this mode, you can set this cursor by clicking on the map."
-+ " If you click on the border of the map (the outer 20%) then the map switches to the next area.\n\n"
-+ "Suggestions welcome.\n\n");
-
- /* demo_find_file() looks in the the current directory first,
- * so you can run gtk-demo without installing GTK, then looks
-@@ -564,19 +582,7 @@
- -1, "blue_foreground", NULL);
-
- gtk_text_buffer_insert (buffer, &iter, "\n", -1);
-- gchar *t1 =
-- _
-- ("Left mouse button : Set position (usefull in simulation mode)\n"
-- "Right mouse button : Set target directly on the map\n"
-- "Middle mouse button : Display position again\n"
-- "Shift left mouse button : smaller map\n"
-- "Shift right mouse button : larger map\n"
-- "Control left mouse button : Set a waypoint (mouse position) on the map\n"
-- "Control right mouse button: Set a waypoint at current position on the map\n\n");
-
-- gchar *t2 = _("j : switch to next waypoint in route mode\n"
-- "x : add waypoint at current position\n"
-- "y : add waypoint at mouse cursor position\n");
- gtk_text_buffer_insert (buffer, &iter, t1, -1);
-
- gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
-@@ -592,12 +598,6 @@
- -1, "underline", NULL);
- gtk_text_buffer_insert (buffer, &iter, _(" letters in the button text.\n"),
- -1);
-- gchar *t3 =
-- _("Press the underlined key together with the ALT-key.\n\n"
-- "You can move on the map by selecting the Position-Mode"
-- " in the menu. A blue rectangle shows this mode, you can set this cursor by clicking on the map."
-- " If you click on the border of the map (the outer 20%) then the map switches to the next area.\n\n"
-- "Suggestions welcome.\n\n");
- gtk_text_buffer_insert (buffer, &iter, t3, -1);
- gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
- _("Have a lot of fun!"), -1,
diff --git a/astro/gpsdrive/files/patch-src_gpsserial.c b/astro/gpsdrive/files/patch-src_gpsserial.c
new file mode 100644
index 000000000000..208613e2d91c
--- /dev/null
+++ b/astro/gpsdrive/files/patch-src_gpsserial.c
@@ -0,0 +1,13 @@
+--- src/gpsserial.c.orig 2004-02-12 17:42:53 UTC
++++ src/gpsserial.c
+@@ -178,7 +178,9 @@ readinput_init (void)
+ CLOCAL : local connection, no modem contol
+ CREAD : enable receiving characters
+ */
+- newtio.c_cflag = (11 + serialspeed) | CS8 | CLOCAL | CREAD;
++ { int t[] = { 2400, 4800, 9600, 19200, 38400 };
++ newtio.c_ispeed = newtio.c_ospeed = t[serialspeed]; }
++ newtio.c_cflag = CS8 | CLOCAL | CREAD;
+ newtio.c_cflag &= ~(PARENB | CRTSCTS);
+ /*
+ IGNPAR : ignore bytes with parity errors
diff --git a/astro/gpsdrive/files/patch-src_splash.c b/astro/gpsdrive/files/patch-src_splash.c
new file mode 100644
index 000000000000..5f12a99db103
--- /dev/null
+++ b/astro/gpsdrive/files/patch-src_splash.c
@@ -0,0 +1,60 @@
+--- src/splash.c.orig 2004-03-02 03:07:17 UTC
++++ src/splash.c
+@@ -529,6 +529,24 @@ insert_text (GtkTextBuffer * buffer)
+ {
+ GtkTextIter iter;
+ GtkTextIter start, end;
++ gchar *t1 =
++ _
++ ("Left mouse button : Set position (usefull in simulation mode)\n"
++ "Right mouse button : Set target directly on the map\n"
++ "Middle mouse button : Display position again\n"
++ "Shift left mouse button : smaller map\n"
++ "Shift right mouse button : larger map\n"
++ "Control left mouse button : Set a waypoint (mouse position) on the map\n"
++ "Control right mouse button: Set a waypoint at current position on the map\n\n");
++ gchar *t2 = _("j : switch to next waypoint in route mode\n"
++ "x : add waypoint at current position\n"
++ "y : add waypoint at mouse cursor position\n");
++ gchar *t3 =
++ _("Press the underlined key together with the ALT-key.\n\n"
++ "You can move on the map by selecting the Position-Mode"
++ " in the menu. A blue rectangle shows this mode, you can set this cursor by clicking on the map."
++ " If you click on the border of the map (the outer 20%) then the map switches to the next area.\n\n"
++ "Suggestions welcome.\n\n");
+
+ /* demo_find_file() looks in the the current directory first,
+ * so you can run gtk-demo without installing GTK, then looks
+@@ -564,19 +582,7 @@ insert_text (GtkTextBuffer * buffer)
+ -1, "blue_foreground", NULL);
+
+ gtk_text_buffer_insert (buffer, &iter, "\n", -1);
+- gchar *t1 =
+- _
+- ("Left mouse button : Set position (usefull in simulation mode)\n"
+- "Right mouse button : Set target directly on the map\n"
+- "Middle mouse button : Display position again\n"
+- "Shift left mouse button : smaller map\n"
+- "Shift right mouse button : larger map\n"
+- "Control left mouse button : Set a waypoint (mouse position) on the map\n"
+- "Control right mouse button: Set a waypoint at current position on the map\n\n");
+
+- gchar *t2 = _("j : switch to next waypoint in route mode\n"
+- "x : add waypoint at current position\n"
+- "y : add waypoint at mouse cursor position\n");
+ gtk_text_buffer_insert (buffer, &iter, t1, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
+@@ -592,12 +598,6 @@ insert_text (GtkTextBuffer * buffer)
+ -1, "underline", NULL);
+ gtk_text_buffer_insert (buffer, &iter, _(" letters in the button text.\n"),
+ -1);
+- gchar *t3 =
+- _("Press the underlined key together with the ALT-key.\n\n"
+- "You can move on the map by selecting the Position-Mode"
+- " in the menu. A blue rectangle shows this mode, you can set this cursor by clicking on the map."
+- " If you click on the border of the map (the outer 20%) then the map switches to the next area.\n\n"
+- "Suggestions welcome.\n\n");
+ gtk_text_buffer_insert (buffer, &iter, t3, -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
+ _("Have a lot of fun!"), -1,
diff --git a/astro/gpsman/files/patch-gpsman.tcl b/astro/gpsman/files/patch-gpsman.tcl
index 260fa54fea1f..34ba22be299a 100644
--- a/astro/gpsman/files/patch-gpsman.tcl
+++ b/astro/gpsman/files/patch-gpsman.tcl
@@ -1,20 +1,19 @@
-diff -ruN gpsman.tcl gpsman.tcl
---- gpsman.tcl Tue May 9 02:37:24 2006
-+++ gpsman.tcl Wed May 10 17:56:02 2006
+--- gpsman.tcl.orig 2013-10-06 21:12:47 UTC
++++ gpsman.tcl
@@ -1,6 +1,6 @@
#!/bin/sh
# This is a Tcl/Tk script to be interpreted by wish (Tk8.3 or better): \
-exec wish "$0" -- "$@"
+exec %%WISH%% "$0" -- "$@"
+ # This is the main file of:
#
- # gpsman --- GPS Manager: a manager for GPS receiver data
-@@ -247,7 +247,7 @@
+@@ -247,7 +247,7 @@ switch $tcl_platform(platform) {
}
# path to directory containing program files
-set SRCDIR gmsrc
+set SRCDIR %%GPSMANDIR%%/gmsrc
- # all other defaults configuration is now done in file $SRCDIR/config.tcl
+ # all other default configuration is now done in file $SRCDIR/config.tcl
diff --git a/astro/kstars/files/patch-kstars__skyobjects__kscomet.cpp b/astro/kstars/files/patch-kstars__skyobjects__kscomet.cpp
deleted file mode 100644
index 9b06ba84006e..000000000000
--- a/astro/kstars/files/patch-kstars__skyobjects__kscomet.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- kstars/skyobjects/kscomet.cpp.orig 2014-09-15 23:02:14.160209962 +0200
-+++ kstars/skyobjects/kscomet.cpp 2014-09-15 23:03:33.261204279 +0200
-@@ -119,7 +119,7 @@
- qint64 fragment = letterDesigToN( rePro.cap(6) );
-
- uidPart =
-- 1 << 43 |
-+ 1ull << 43 |
- type << 40 | // Bits 40-42 (3)
- halfMonth << 33 | // Bits 33-39 (7) Hope this is enough
- nHalfMonth << 28 | // Bits 28-32 (5)
diff --git a/astro/kstars/files/patch-kstars_skyobjects_kscomet.cpp b/astro/kstars/files/patch-kstars_skyobjects_kscomet.cpp
new file mode 100644
index 000000000000..85037a9c3a6e
--- /dev/null
+++ b/astro/kstars/files/patch-kstars_skyobjects_kscomet.cpp
@@ -0,0 +1,11 @@
+--- kstars/skyobjects/kscomet.cpp.orig 2014-09-19 05:39:42 UTC
++++ kstars/skyobjects/kscomet.cpp
+@@ -119,7 +119,7 @@ KSComet::KSComet( const QString &_s, con
+ qint64 fragment = letterDesigToN( rePro.cap(6) );
+
+ uidPart =
+- 1 << 43 |
++ 1ull << 43 |
+ type << 40 | // Bits 40-42 (3)
+ halfMonth << 33 | // Bits 33-39 (7) Hope this is enough
+ nHalfMonth << 28 | // Bits 28-32 (5)
diff --git a/astro/libnova/files/patch-src__utility.c b/astro/libnova/files/patch-src__utility.c
deleted file mode 100644
index 2a9161955e31..000000000000
--- a/astro/libnova/files/patch-src__utility.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/utility.c.orig Wed Jan 17 08:16:02 2007
-+++ src/utility.c Sat Feb 10 12:08:36 2007
-@@ -45,10 +45,6 @@
- #include <ctype.h>
- #include <libnova/utility.h>
-
--#ifndef __APPLE__
--#include <malloc.h>
--#endif
--
- /* Include unistd.h only if not on a Win32 platform */
- /* Include Win32 Headers sys/types.h and sys/timeb.h if on Win32 */
- #ifndef __WIN32__
diff --git a/astro/libnova/files/patch-src_hyperbolic__motion.c b/astro/libnova/files/patch-src_hyperbolic__motion.c
new file mode 100644
index 000000000000..70492aa02d1a
--- /dev/null
+++ b/astro/libnova/files/patch-src_hyperbolic__motion.c
@@ -0,0 +1,17 @@
+--- src/hyperbolic_motion.c.orig 2011-07-28 11:02:50 UTC
++++ src/hyperbolic_motion.c
+@@ -70,12 +70,12 @@ next_z:
+ F = Z1 * G1;
+ Q3 = Q3 + F;
+ if (Z > 100 || fabs(F) > 10000)
+- return nan("0");
++ return strtod("NAN(0)", NULL);
+ if (fabs(F) > PREC)
+ goto next_z;
+ L++;
+ if (L > 100)
+- return nan("0");
++ return strtod("NAN(0)", NULL);
+ do
+ {
+ S1 = S;
diff --git a/astro/libnova/files/patch-src_hyperbolic_motion.c b/astro/libnova/files/patch-src_hyperbolic_motion.c
deleted file mode 100644
index f5af5ce7154c..000000000000
--- a/astro/libnova/files/patch-src_hyperbolic_motion.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/hyperbolic_motion.c.orig Tue Jul 5 11:09:22 2005
-+++ src/hyperbolic_motion.c Sat Feb 18 02:17:12 2006
-@@ -69,12 +69,12 @@
- F = Z1 * G1;
- Q3 = Q3 + F;
- if (Z > 100 || fabs(F) > 10000)
-- return nan("0");
-+ return strtod("NAN(0)", NULL);
- if (fabs(F) > PREC)
- goto next_z;
- L++;
- if (L > 100)
-- return nan("0");
-+ return strtod("NAN(0)", NULL);
- do
- {
- S1 = S;
diff --git a/astro/libnova/files/patch-src_precession.c b/astro/libnova/files/patch-src_precession.c
index 0f7784f12cef..78d8c407d871 100644
--- a/astro/libnova/files/patch-src_precession.c
+++ b/astro/libnova/files/patch-src_precession.c
@@ -1,6 +1,6 @@
---- src/precession.c.orig Tue Jan 10 23:35:08 2006
-+++ src/precession.c Tue Aug 15 18:03:50 2006
-@@ -56,21 +56,21 @@
+--- src/precession.c.orig 2011-07-28 11:02:50 UTC
++++ src/precession.c
+@@ -82,21 +82,21 @@ void ln_get_equ_prec (struct ln_equ_posn
theta = ln_deg_to_rad (theta);
/* calc A,B,C equ 20.4 */
@@ -28,7 +28,7 @@
}
/* change to degrees */
-@@ -114,21 +114,21 @@
+@@ -140,21 +140,21 @@ void ln_get_equ_prec2 (struct ln_equ_pos
theta = ln_deg_to_rad (theta);
/* calc A,B,C equ 20.4 */
diff --git a/astro/libnova/files/patch-src_utility.c b/astro/libnova/files/patch-src_utility.c
new file mode 100644
index 000000000000..5b77ca6862a4
--- /dev/null
+++ b/astro/libnova/files/patch-src_utility.c
@@ -0,0 +1,13 @@
+--- src/utility.c.orig 2012-04-28 09:41:42 UTC
++++ src/utility.c
+@@ -44,10 +44,6 @@
+ #include <ctype.h>
+ #include <libnova/libnova.h>
+
+-#ifndef __APPLE__
+-#include <malloc.h>
+-#endif
+-
+ /* Include unistd.h only if not on a Win32 platform */
+ /* Include Win32 Headers sys/types.h and sys/timeb.h if on Win32 */
+ #ifndef __WIN32__
diff --git a/astro/luna/files/patch-iprintf-iprintf.c b/astro/luna/files/patch-iprintf-iprintf.c
deleted file mode 100644
index fa449c78759d..000000000000
--- a/astro/luna/files/patch-iprintf-iprintf.c
+++ /dev/null
@@ -1,56 +0,0 @@
---- iprintf/iprintf.c.orig Thu Apr 23 16:23:14 1992
-+++ iprintf/iprintf.c Sat Nov 22 04:11:33 2003
-@@ -13,7 +13,7 @@
- #if defined(ANSI)
- # include <stdarg.h>
- #elif defined(UNIX)
--# include <varargs.h>
-+# include <stdarg.h>
- #else
- Error : varargs.h or stdarg.h is required to compile this.
- #endif /* ANSI or UNIX */
-@@ -52,44 +52,21 @@
- }
-
-
--#if defined(ANSI)
- int
- iprintf(char *format, ...)
--#elif defined(UNIX)
--int
--iprintf(format, va_alist)
-- char *format;
-- va_dcl
--#endif /* ANSI or UNIX */
- {
- va_list args;
-
--#if defined(ANSI)
- va_start (args, format);
--#elif defined(UNIX)
-- va_start(args);
--#endif /* ANSI or UNIX */
- return (ivprintf(format, args));
- }
-
-
--#if defined(ANSI)
- int
- ifprintf(FILE *stream, char *format, ...)
--#elif defined(UNIX)
--int
--ifprintf(stream, format, va_alist)
-- FILE *stream;
-- char *format;
-- va_dcl
--#endif /* UNIX */
- {
- va_list args;
-
--#if defined(ANSI)
- va_start (args, format);
--#elif defined(UNIX)
-- va_start(args);
--#endif /* ANSI or UNIX */
- return (ivfprintf(stream, format, args));
- }
diff --git a/astro/luna/files/patch-iprintf-isprintf.c b/astro/luna/files/patch-iprintf-isprintf.c
deleted file mode 100644
index e1b3835574fb..000000000000
--- a/astro/luna/files/patch-iprintf-isprintf.c
+++ /dev/null
@@ -1,64 +0,0 @@
---- iprintf/isprintf.c.orig Thu Apr 23 16:23:16 1992
-+++ iprintf/isprintf.c Sat Nov 22 04:13:54 2003
-@@ -8,13 +8,7 @@
-
-
- #include <stdio.h>
--#if defined(ANSI)
- # include <stdarg.h>
--#elif defined(UNIX)
--# include <varargs.h>
--#else
-- Error : varargs.h or stdarg.h is required to compile this.
--#endif /* ANSI or UNIX */
-
-
- #if defined(ANSI)
-@@ -49,47 +43,22 @@
- }
-
-
--#if defined(ANSI)
- int
- isprintf(char *buf, char *format, ...)
--#elif defined(UNIX)
--int
--isprintf(buf, format, va_alist)
-- char *buf;
-- char *format;
-- va_dcl
--#endif /* ANSI or UNIX */
- {
- int n;
- va_list args;
-
--#if defined(ANSI)
- va_start (args, format);
--#elif defined(UNIX)
-- va_start(args);
--#endif /* ANSI or UNIX */
- buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
- return (n);
- }
-
-
--#if defined(ANSI)
- int
- ivsprintf(char *buf, char *format, va_list args)
--#elif defined(UNIX)
--int
--ivsprintf(buf, format, va_alist)
-- char *buf;
-- char *format;
-- va_dcl
--#endif /* ANSI or UNIX */
- {
- int n;
--#if defined(UNIX)
-- va_list args;
--
-- va_start(args);
--#endif /* UNIX */
- buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
- return (n);
- }
diff --git a/astro/luna/files/patch-iprintf_iprintf.c b/astro/luna/files/patch-iprintf_iprintf.c
new file mode 100644
index 000000000000..7f0a5f4f6cf0
--- /dev/null
+++ b/astro/luna/files/patch-iprintf_iprintf.c
@@ -0,0 +1,56 @@
+--- iprintf/iprintf.c.orig 2016-07-26 13:07:24 UTC
++++ iprintf/iprintf.c
+@@ -13,7 +13,7 @@
+ #if defined(ANSI)
+ # include <stdarg.h>
+ #elif defined(UNIX)
+-# include <varargs.h>
++# include <stdarg.h>
+ #else
+ Error : varargs.h or stdarg.h is required to compile this.
+ #endif /* ANSI or UNIX */
+@@ -52,44 +52,21 @@ i_fputn(stream, string, count, total_cou
+ }
+
+
+-#if defined(ANSI)
+ int
+ iprintf(char *format, ...)
+-#elif defined(UNIX)
+-int
+-iprintf(format, va_alist)
+- char *format;
+- va_dcl
+-#endif /* ANSI or UNIX */
+ {
+ va_list args;
+
+-#if defined(ANSI)
+ va_start (args, format);
+-#elif defined(UNIX)
+- va_start(args);
+-#endif /* ANSI or UNIX */
+ return (ivprintf(format, args));
+ }
+
+
+-#if defined(ANSI)
+ int
+ ifprintf(FILE *stream, char *format, ...)
+-#elif defined(UNIX)
+-int
+-ifprintf(stream, format, va_alist)
+- FILE *stream;
+- char *format;
+- va_dcl
+-#endif /* UNIX */
+ {
+ va_list args;
+
+-#if defined(ANSI)
+ va_start (args, format);
+-#elif defined(UNIX)
+- va_start(args);
+-#endif /* ANSI or UNIX */
+ return (ivfprintf(stream, format, args));
+ }
diff --git a/astro/luna/files/patch-iprintf_isprintf.c b/astro/luna/files/patch-iprintf_isprintf.c
new file mode 100644
index 000000000000..487cb4be9061
--- /dev/null
+++ b/astro/luna/files/patch-iprintf_isprintf.c
@@ -0,0 +1,64 @@
+--- iprintf/isprintf.c.orig 2016-07-26 13:07:24 UTC
++++ iprintf/isprintf.c
+@@ -8,13 +8,7 @@
+
+
+ #include <stdio.h>
+-#if defined(ANSI)
+ # include <stdarg.h>
+-#elif defined(UNIX)
+-# include <varargs.h>
+-#else
+- Error : varargs.h or stdarg.h is required to compile this.
+-#endif /* ANSI or UNIX */
+
+
+ #if defined(ANSI)
+@@ -49,47 +43,22 @@ i_sputn(dest, string, count, total_count
+ }
+
+
+-#if defined(ANSI)
+ int
+ isprintf(char *buf, char *format, ...)
+-#elif defined(UNIX)
+-int
+-isprintf(buf, format, va_alist)
+- char *buf;
+- char *format;
+- va_dcl
+-#endif /* ANSI or UNIX */
+ {
+ int n;
+ va_list args;
+
+-#if defined(ANSI)
+ va_start (args, format);
+-#elif defined(UNIX)
+- va_start(args);
+-#endif /* ANSI or UNIX */
+ buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
+ return (n);
+ }
+
+
+-#if defined(ANSI)
+ int
+ ivsprintf(char *buf, char *format, va_list args)
+-#elif defined(UNIX)
+-int
+-ivsprintf(buf, format, va_alist)
+- char *buf;
+- char *format;
+- va_dcl
+-#endif /* ANSI or UNIX */
+ {
+ int n;
+-#if defined(UNIX)
+- va_list args;
+-
+- va_start(args);
+-#endif /* UNIX */
+ buf[n = idoprnt(i_sputn, buf, format, args)] = '\0';
+ return (n);
+ }
diff --git a/astro/luna/files/patch-iprintf_makefile b/astro/luna/files/patch-iprintf_makefile
index 941d222dd192..5171952303ad 100644
--- a/astro/luna/files/patch-iprintf_makefile
+++ b/astro/luna/files/patch-iprintf_makefile
@@ -1,5 +1,5 @@
---- iprintf/makefile.orig Sun May 10 03:03:06 1992
-+++ iprintf/makefile Sat Feb 12 23:27:55 2000
+--- iprintf/makefile.orig 2016-07-26 13:07:24 UTC
++++ iprintf/makefile
@@ -3,11 +3,11 @@
#
@@ -16,7 +16,7 @@
#
# All modules
-@@ -15,9 +15,9 @@
+@@ -15,9 +15,9 @@ CFLAGS = -Ox -AS -DANSI -W4
SRCS = iansilib.c idoprnt.c iprintf.c isprintf.c
# MSDOS
diff --git a/astro/luna/files/patch-luna.c b/astro/luna/files/patch-luna.c
index 2936f2cd56ec..4fd5e681ab80 100644
--- a/astro/luna/files/patch-luna.c
+++ b/astro/luna/files/patch-luna.c
@@ -1,5 +1,5 @@
---- luna.c.orig 1992-05-25 01:01:32.000000000 +0200
-+++ luna.c 2011-12-20 19:57:51.404175556 +0100
+--- luna.c.orig 2016-07-26 13:07:24 UTC
++++ luna.c
@@ -25,27 +25,43 @@
#include "luna.h"
@@ -51,7 +51,7 @@
if (numonly) {
printf(" ");
-@@ -62,10 +78,11 @@
+@@ -62,10 +78,11 @@ main(argc, argv)
today = FALSE;
tomorrow(localtmp);
@@ -64,7 +64,7 @@
}
-@@ -177,18 +194,15 @@
+@@ -177,18 +194,15 @@ usage()
void
@@ -86,7 +86,7 @@
struct tm *localtmp;
argnumcnt = 0;
-@@ -375,20 +389,7 @@
+@@ -375,20 +389,7 @@ getoptions(argc, argv, localtmpp, algotm
localtmp -> tm_yday
= ymd2yday(localtmp -> tm_year, localtmp -> tm_mon,
localtmp -> tm_mday);
diff --git a/astro/luna/files/patch-luna.h b/astro/luna/files/patch-luna.h
index 6467f053a898..2f4d6f6940b0 100644
--- a/astro/luna/files/patch-luna.h
+++ b/astro/luna/files/patch-luna.h
@@ -1,6 +1,6 @@
---- luna.h~ 1992-05-25 00:48:34.000000000 +0200
-+++ luna.h 2011-12-20 19:57:27.963178999 +0100
-@@ -32,7 +32,7 @@
+--- luna.h.orig 2016-07-26 13:07:24 UTC
++++ luna.h
+@@ -32,7 +32,7 @@ typedef enum {
#if defined(ANSI)
@@ -9,7 +9,7 @@
extern void drawluna(int aotmoon);
extern void usage(void);
extern void getoptions(int argc, char **argv,
-@@ -40,7 +40,7 @@
+@@ -40,7 +40,7 @@ typedef enum {
extern int getext(int year, int mon, int day);
extern void printextstate(int age);
#else
diff --git a/astro/luna/files/patch-makefile b/astro/luna/files/patch-makefile
index 39a3160d5029..ca6043bdf551 100644
--- a/astro/luna/files/patch-makefile
+++ b/astro/luna/files/patch-makefile
@@ -1,5 +1,5 @@
---- makefile.orig 2013-10-25 16:28:17.000000000 +0800
-+++ makefile 2013-10-25 16:28:43.000000000 +0800
+--- makefile.orig 2016-07-26 13:07:24 UTC
++++ makefile
@@ -2,23 +2,24 @@
# Makefile for luna using BSD cc
#
diff --git a/astro/luna/files/patch-pyramid.c b/astro/luna/files/patch-pyramid.c
index da829614cf00..4fda198a43a5 100644
--- a/astro/luna/files/patch-pyramid.c
+++ b/astro/luna/files/patch-pyramid.c
@@ -1,6 +1,6 @@
---- pyramid.c.orig Mon May 25 01:26:10 1992
-+++ pyramid.c Mon Feb 21 02:23:51 2000
-@@ -67,7 +67,7 @@
+--- pyramid.c.orig 2016-07-26 13:07:24 UTC
++++ pyramid.c
+@@ -67,7 +67,7 @@ getlocaltm()
Time_t ltime;
time(&ltime);
@@ -9,7 +9,7 @@
#endif /* MSDOS or UNIX */
}
-@@ -197,19 +197,14 @@
+@@ -197,19 +197,14 @@ char *
Asctime(struct tm *tmp)
{
static char s[LASCTIME];
diff --git a/astro/luna/files/patch-pyramid.h b/astro/luna/files/patch-pyramid.h
index 06ad88e9511a..c34bf77c4d2a 100644
--- a/astro/luna/files/patch-pyramid.h
+++ b/astro/luna/files/patch-pyramid.h
@@ -1,5 +1,5 @@
---- pyramid.h.orig Mon May 25 01:24:12 1992
-+++ pyramid.h Mon Feb 21 02:23:55 2000
+--- pyramid.h.orig 2016-07-26 13:07:24 UTC
++++ pyramid.h
@@ -14,13 +14,16 @@
# include <dos.h>
# include <stdlib.h>
@@ -20,7 +20,7 @@
#endif /* MSDOS or not */
typedef long ABDATE;
-@@ -52,15 +55,6 @@
+@@ -52,15 +55,6 @@ typedef long ABDATE;
# if defined(MSDOS)
extern char *Asctime(struct tm *tmp);
extern char *capitalize(char *chp);
@@ -36,7 +36,7 @@
# endif /* ANSI and MSDOS */
#else /* ANSI */
-@@ -69,3 +63,16 @@
+@@ -69,3 +63,16 @@ typedef long ABDATE;
extern void tzconv();
extern void tomorrow();
#endif /* ANSI or not */
diff --git a/astro/merkaartor/files/patch-src_src.pro b/astro/merkaartor/files/patch-src_src.pro
index 28afade9d899..0319e85e7eb6 100644
--- a/astro/merkaartor/files/patch-src_src.pro
+++ b/astro/merkaartor/files/patch-src_src.pro
@@ -1,5 +1,5 @@
Link against the right library name for archivers/quazip-qt5.
---- src/src.pro.orig 2015-12-28 22:27:47 UTC
+--- src/src.pro.orig 2015-07-19 14:50:09 UTC
+++ src/src.pro
@@ -15,7 +15,7 @@ isEmpty(SYSTEM_QUAZIP) {
DEFINES += QUAZIP_STATIC
diff --git a/astro/mymoon/files/patch-configure b/astro/mymoon/files/patch-configure
index 4e83da2d07f8..0efe65afcc50 100644
--- a/astro/mymoon/files/patch-configure
+++ b/astro/mymoon/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Sat May 24 06:09:38 2003
-+++ configure Fri Oct 14 19:51:18 2005
-@@ -849,7 +849,7 @@
+--- configure.orig 2003-05-23 20:09:38 UTC
++++ configure
+@@ -849,7 +849,7 @@ done
PACKAGE=mymoon
VERSION=1.0
@@ -9,7 +9,7 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-@@ -890,9 +890,9 @@
+@@ -890,9 +890,9 @@ fi
done
LNOVA_LIB_NAME=""
@@ -22,7 +22,7 @@
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
-@@ -904,10 +904,10 @@
+@@ -904,10 +904,10 @@ cat > conftest.$ac_ext <<EOF
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
diff --git a/astro/mymoon/files/patch-grapher.h b/astro/mymoon/files/patch-grapher.h
index b4828f9420b0..de59606dcb68 100644
--- a/astro/mymoon/files/patch-grapher.h
+++ b/astro/mymoon/files/patch-grapher.h
@@ -1,6 +1,6 @@
---- grapher.h.orig Wed Jul 16 21:24:46 2003
-+++ grapher.h Fri Oct 14 20:08:52 2005
-@@ -13,15 +13,14 @@
+--- grapher.h.orig 2003-07-16 11:24:46 UTC
++++ grapher.h
+@@ -13,15 +13,14 @@ memset(&arrow, 0, sizeof(arrow));
for (z=0;z<=progress;z++) {arrow[z]=bar;}for (k=z;k<=max/4;k++) {arrow[k]=empty;}
mvprintw(row/4,0,
diff --git a/astro/mymoon/files/patch-mymoon.c b/astro/mymoon/files/patch-mymoon.c
index 2288dffaa3c1..e6a83da14aa6 100644
--- a/astro/mymoon/files/patch-mymoon.c
+++ b/astro/mymoon/files/patch-mymoon.c
@@ -1,12 +1,12 @@
---- mymoon.c.orig Wed Jul 16 21:13:55 2003
-+++ mymoon.c Fri Oct 14 19:55:31 2005
+--- mymoon.c.orig 2003-07-16 11:13:55 UTC
++++ mymoon.c
@@ -1,4 +1,4 @@
-#include <libnova.h>
+#include <libnova/libnova.h>
#include <curses.h>
#include <time.h>
#include <stdlib.h>
-@@ -59,7 +59,7 @@
+@@ -59,7 +59,7 @@ memset(&date2, 0, sizeof(date2));
memset(&date3, 0, sizeof(date3));
while (1) {
@@ -15,7 +15,7 @@
age=moonphase();
-@@ -67,12 +67,12 @@
+@@ -67,12 +67,12 @@ if ( (latitude != 0) || (longitude != 0
observer.lng=latitude;
observer.lat=longitude;
} else {observer.lng=45.12;observer.lat=8.42;}
diff --git a/astro/openuniverse/files/patch-a b/astro/openuniverse/files/patch-a
deleted file mode 100644
index 76b6ad6ad7f1..000000000000
--- a/astro/openuniverse/files/patch-a
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN src/ou.cpp.orig src/ou.cpp
---- src/ou.cpp.orig Sun Jun 4 21:29:29 2000
-+++ src/ou.cpp Sat Jun 10 07:37:23 2000
-@@ -22,7 +22,7 @@
- #include <string.h>
- #include <math.h>
- #include <time.h>
--#include <sys/timeb.h>
-+#include "timeb.h"
- #include <setjmp.h>
- #include "ou.h"
- #include "gui.h"
diff --git a/astro/openuniverse/files/patch-b b/astro/openuniverse/files/patch-b
deleted file mode 100644
index f87af09f7600..000000000000
--- a/astro/openuniverse/files/patch-b
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -ruN src/timeb.h.orig src/timeb.h
---- src/timeb.h.orig Thu Jan 1 00:00:00 1970
-+++ src/timeb.h Sat Jun 10 07:37:45 2000
-@@ -0,0 +1,46 @@
-+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Library General Public License as
-+ published by the Free Software Foundation; either version 2 of the
-+ License, or (at your option) any later version.
-+
-+ The GNU C Library 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
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with the GNU C Library; see the file COPYING.LIB. If not,
-+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ Boston, MA 02111-1307, USA. */
-+
-+#ifndef _SYS_TIMEB_H
-+#define _SYS_TIMEB_H 1
-+
-+//#include <features.h>
-+
-+#define __need_time_t
-+#include <time.h>
-+
-+
-+__BEGIN_DECLS
-+
-+/* Structure returned by the `ftime' function. */
-+
-+struct timeb
-+ {
-+ time_t time; /* Seconds since epoch, as from `time'. */
-+ unsigned short int millitm; /* Additional milliseconds. */
-+ short int timezone; /* Minutes west of GMT. */
-+ short int dstflag; /* Nonzero if Daylight Savings Time used. */
-+ };
-+
-+/* Fill in TIMEBUF with information about the current time. */
-+
-+extern int ftime __P ((struct timeb *__timebuf));
-+
-+__END_DECLS
-+
-+#endif /* sys/timeb.h */
diff --git a/astro/openuniverse/files/patch-src_comet.cpp b/astro/openuniverse/files/patch-src_comet.cpp
index 2396b6492f5d..a8dd2baec728 100644
--- a/astro/openuniverse/files/patch-src_comet.cpp
+++ b/astro/openuniverse/files/patch-src_comet.cpp
@@ -1,6 +1,6 @@
---- src/comet.cpp.orig Sat May 13 15:48:51 2000
-+++ src/comet.cpp Fri Mar 23 19:49:12 2001
-@@ -52,7 +52,7 @@
+--- src/comet.cpp.orig 2000-05-13 22:48:51 UTC
++++ src/comet.cpp
+@@ -52,7 +52,7 @@ void CometTail(int body)
#ifdef WIN32
wglPointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT, quad);
#else
diff --git a/astro/openuniverse/files/patch-src_ou.cpp b/astro/openuniverse/files/patch-src_ou.cpp
new file mode 100644
index 000000000000..38cc3f4d10f4
--- /dev/null
+++ b/astro/openuniverse/files/patch-src_ou.cpp
@@ -0,0 +1,11 @@
+--- src/ou.cpp.orig 2000-06-04 21:29:29 UTC
++++ src/ou.cpp
+@@ -22,7 +22,7 @@
+ #include <string.h>
+ #include <math.h>
+ #include <time.h>
+-#include <sys/timeb.h>
++#include "timeb.h"
+ #include <setjmp.h>
+ #include "ou.h"
+ #include "gui.h"
diff --git a/astro/openuniverse/files/patch-src_ou.h b/astro/openuniverse/files/patch-src_ou.h
index fbadc8fa3863..098eee0407e7 100644
--- a/astro/openuniverse/files/patch-src_ou.h
+++ b/astro/openuniverse/files/patch-src_ou.h
@@ -1,5 +1,5 @@
---- src/ou.h.orig Sun Jun 4 12:35:09 2000
-+++ src/ou.h Tue Nov 5 12:17:24 2002
+--- src/ou.h.orig 2000-06-04 19:35:09 UTC
++++ src/ou.h
@@ -19,6 +19,7 @@
#include <stdio.h>
diff --git a/astro/openuniverse/files/patch-src_timeb.h b/astro/openuniverse/files/patch-src_timeb.h
new file mode 100644
index 000000000000..8c2f67c51eae
--- /dev/null
+++ b/astro/openuniverse/files/patch-src_timeb.h
@@ -0,0 +1,49 @@
+--- src/timeb.h.orig 2016-07-26 13:11:57 UTC
++++ src/timeb.h
+@@ -0,0 +1,46 @@
++/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public License as
++ published by the Free Software Foundation; either version 2 of the
++ License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++#ifndef _SYS_TIMEB_H
++#define _SYS_TIMEB_H 1
++
++//#include <features.h>
++
++#define __need_time_t
++#include <time.h>
++
++
++__BEGIN_DECLS
++
++/* Structure returned by the `ftime' function. */
++
++struct timeb
++ {
++ time_t time; /* Seconds since epoch, as from `time'. */
++ unsigned short int millitm; /* Additional milliseconds. */
++ short int timezone; /* Minutes west of GMT. */
++ short int dstflag; /* Nonzero if Daylight Savings Time used. */
++ };
++
++/* Fill in TIMEBUF with information about the current time. */
++
++extern int ftime __P ((struct timeb *__timebuf));
++
++__END_DECLS
++
++#endif /* sys/timeb.h */
diff --git a/astro/osmium/files/patch-test-run__tests.sh b/astro/osmium/files/patch-test-run__tests.sh
deleted file mode 100644
index 8a7f46bcdd1d..000000000000
--- a/astro/osmium/files/patch-test-run__tests.sh
+++ /dev/null
@@ -1,15 +0,0 @@
---- test/run_tests.sh.orig 2013-05-09 19:20:50.000000000 +0400
-+++ test/run_tests.sh 2013-05-23 00:01:42.140354335 +0400
-@@ -10,8 +10,10 @@
-
- set -e
-
--CXX="g++"
--CXXFLAGS="-g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long"
-+if [ -z "$CXX" ]; then
-+ CXX="g++"
-+fi
-+CXXFLAGS="$CXXFLAGS -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long"
- COMPILE="$CXX -I../include -I. $CXXFLAGS -o tests"
-
- if [ "x$1" = "x-v" ]; then
diff --git a/astro/osmium/files/patch-test_run__tests.sh b/astro/osmium/files/patch-test_run__tests.sh
new file mode 100644
index 000000000000..388e09a86eac
--- /dev/null
+++ b/astro/osmium/files/patch-test_run__tests.sh
@@ -0,0 +1,15 @@
+--- test/run_tests.sh.orig 2013-05-09 15:20:50 UTC
++++ test/run_tests.sh
+@@ -10,8 +10,10 @@
+
+ set -e
+
+-CXX="g++"
+-CXXFLAGS="-g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long"
++if [ -z "$CXX" ]; then
++ CXX="g++"
++fi
++CXXFLAGS="$CXXFLAGS -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long"
+ COMPILE="$CXX -I../include -I. $CXXFLAGS -o tests"
+
+ if [ "x$1" = "x-v" ]; then
diff --git a/astro/p5-Astro-FITS-CFITSIO/files/patch-Makefile.PL b/astro/p5-Astro-FITS-CFITSIO/files/patch-Makefile.PL
index 8c7ba9a34c2d..b81c298f07d0 100644
--- a/astro/p5-Astro-FITS-CFITSIO/files/patch-Makefile.PL
+++ b/astro/p5-Astro-FITS-CFITSIO/files/patch-Makefile.PL
@@ -1,6 +1,6 @@
---- Makefile.PL.orig 2012-01-22 01:52:49.000000000 -0500
-+++ Makefile.PL 2012-01-22 01:53:32.000000000 -0500
-@@ -22,9 +22,9 @@
+--- Makefile.PL.orig 2012-01-19 19:18:45 UTC
++++ Makefile.PL
+@@ -22,9 +22,9 @@ FOUND_IT: {
}
}
diff --git a/astro/phoon/files/patch-Makefile b/astro/phoon/files/patch-Makefile
index f01683bd8fab..65fb53888e8c 100644
--- a/astro/phoon/files/patch-Makefile
+++ b/astro/phoon/files/patch-Makefile
@@ -1,5 +1,5 @@
---- ./Makefile.orig 2003-01-21 04:04:36.000000000 +0100
-+++ ./Makefile 2014-02-12 22:39:19.404018490 +0100
+--- Makefile.orig 2003-01-21 03:04:36 UTC
++++ Makefile
@@ -1,15 +1,15 @@
# Makefile for phoon
@@ -21,7 +21,7 @@
all: phoon
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,7 @@ date_parse.o: date_parse.h
astro.o: astro.h
install: all
diff --git a/astro/phoon/files/patch-astro.h b/astro/phoon/files/patch-astro.h
index 22929650029c..74e0d9ab242c 100644
--- a/astro/phoon/files/patch-astro.h
+++ b/astro/phoon/files/patch-astro.h
@@ -1,6 +1,6 @@
---- ./astro.h.orig 2003-01-28 01:55:32.000000000 +0100
-+++ ./astro.h 2014-02-12 22:38:52.437019902 +0100
-@@ -43,4 +43,4 @@
+--- astro.h.orig 2003-01-28 00:55:32 UTC
++++ astro.h
+@@ -43,4 +43,4 @@ extern void phasehunt2( double sdate, do
*/
extern double phase( double pdate, double* pphase, double* mage, double* dist, double* angdia, double* sudist, double* suangdia );
diff --git a/astro/phoon/files/patch-phoon.c b/astro/phoon/files/patch-phoon.c
index b59e6679f2cf..5922fc4271cd 100644
--- a/astro/phoon/files/patch-phoon.c
+++ b/astro/phoon/files/patch-phoon.c
@@ -1,6 +1,6 @@
---- ./phoon.c.orig 2005-05-20 21:10:24.000000000 +0200
-+++ ./phoon.c 2014-02-12 22:38:52.438019914 +0100
-@@ -354,7 +354,7 @@
+--- phoon.c.orig 2005-05-20 19:10:24 UTC
++++ phoon.c
+@@ -354,7 +354,7 @@ putmoon( time_t t, int numlines, char* a
struct tm* tmP;
double jd, pctphase, angphase, cphase, aom, cdist, cangdia, csund, csuang;
double phases[2], which[2];
diff --git a/astro/py-astropy/files/patch-astropy_io_fits_setup__package.py b/astro/py-astropy/files/patch-astropy_io_fits_setup__package.py
index 6926c24440a4..e1fa9457aea1 100644
--- a/astro/py-astropy/files/patch-astropy_io_fits_setup__package.py
+++ b/astro/py-astropy/files/patch-astropy_io_fits_setup__package.py
@@ -1,4 +1,4 @@
---- astropy/io/fits/setup_package.py.orig 2016-07-02 18:54:36 UTC
+--- astropy/io/fits/setup_package.py.orig 2016-03-10 22:20:43 UTC
+++ astropy/io/fits/setup_package.py
@@ -39,7 +39,7 @@ def _get_compression_extension():
'-Wno-uninitialized', '-Wno-format',
diff --git a/astro/py-astropy/files/patch-astropy_wcs_setup__package.py b/astro/py-astropy/files/patch-astropy_wcs_setup__package.py
index b4b0629e40e8..a2a12f28f3d8 100644
--- a/astro/py-astropy/files/patch-astropy_wcs_setup__package.py
+++ b/astro/py-astropy/files/patch-astropy_wcs_setup__package.py
@@ -1,4 +1,4 @@
---- astropy/wcs/setup_package.py.orig 2016-07-02 18:53:24 UTC
+--- astropy/wcs/setup_package.py.orig 2016-03-10 22:20:43 UTC
+++ astropy/wcs/setup_package.py
@@ -244,8 +244,7 @@ def get_wcslib_cfg(cfg, wcslib_files, in
'-Wno-strict-prototypes',
diff --git a/astro/qlandkartegt/files/patch-cmake-Modules-DefineInstallationPaths.cmake b/astro/qlandkartegt/files/patch-cmake_Modules_DefineInstallationPaths.cmake
index 2605a2b9f15a..2605a2b9f15a 100644
--- a/astro/qlandkartegt/files/patch-cmake-Modules-DefineInstallationPaths.cmake
+++ b/astro/qlandkartegt/files/patch-cmake_Modules_DefineInstallationPaths.cmake
diff --git a/astro/qmapshack/files/patch-cmake-Modules-DefineInstallationPaths.cmake b/astro/qmapshack/files/patch-cmake-Modules-DefineInstallationPaths.cmake
deleted file mode 100644
index c384115378a0..000000000000
--- a/astro/qmapshack/files/patch-cmake-Modules-DefineInstallationPaths.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
---- cmake/Modules/DefineInstallationPaths.cmake.orig 2015-05-22 16:29:44 UTC
-+++ cmake/Modules/DefineInstallationPaths.cmake
-@@ -101,7 +101,7 @@ if (UNIX)
- FORCE
- )
- SET(MAN_INSTALL_DIR
-- "${SHARE_INSTALL_PREFIX}/man"
-+ "${CMAKE_INSTALL_PREFIX}/man"
- CACHE PATH "The ${_APPLICATION_NAME} man install dir (default prefix/man)"
- FORCE
- )
diff --git a/astro/qmapshack/files/patch-cmake_Modules_DefineInstallationPaths.cmake b/astro/qmapshack/files/patch-cmake_Modules_DefineInstallationPaths.cmake
new file mode 100644
index 000000000000..ad5a5abd31a5
--- /dev/null
+++ b/astro/qmapshack/files/patch-cmake_Modules_DefineInstallationPaths.cmake
@@ -0,0 +1,11 @@
+--- cmake/Modules/DefineInstallationPaths.cmake.orig 2014-08-18 10:08:14 UTC
++++ cmake/Modules/DefineInstallationPaths.cmake
+@@ -101,7 +101,7 @@ if (UNIX)
+ FORCE
+ )
+ SET(MAN_INSTALL_DIR
+- "${SHARE_INSTALL_PREFIX}/man"
++ "${CMAKE_INSTALL_PREFIX}/man"
+ CACHE PATH "The ${_APPLICATION_NAME} man install dir (default prefix/man)"
+ FORCE
+ )
diff --git a/astro/rmap/files/patch-main.c b/astro/rmap/files/patch-main.c
index 781a7b095d17..4e08e2d79a44 100644
--- a/astro/rmap/files/patch-main.c
+++ b/astro/rmap/files/patch-main.c
@@ -1,6 +1,6 @@
---- main.c.orig Tue Mar 28 17:01:17 2000
-+++ main.c Thu Mar 30 02:43:08 2000
-@@ -154,7 +154,7 @@
+--- main.c.orig 2000-03-28 16:01:17 UTC
++++ main.c
+@@ -154,7 +154,7 @@ int main (int argc, char **argv) {
case 'h':
printf("Usage: rmap [--zoom=VALUE] [--xrot=VALUE] [--yrot=VALUE] [--zrot=VALUE]\n");
printf(" [--datafile=FILENAME] [--continent=LIST] [--category=LIST]\n");
diff --git a/astro/routino/files/patch-doc_Makefile b/astro/routino/files/patch-doc_Makefile
index a4ac4da5356e..7e9b02313dd2 100644
--- a/astro/routino/files/patch-doc_Makefile
+++ b/astro/routino/files/patch-doc_Makefile
@@ -1,4 +1,4 @@
---- doc/Makefile.orig 2016-06-04 17:01:05 UTC
+--- doc/Makefile.orig 2014-03-22 11:28:26 UTC
+++ doc/Makefile
@@ -43,19 +43,19 @@ install: install-txt install-html
install-txt:
diff --git a/astro/routino/files/patch-extras_find-fixme_Makefile b/astro/routino/files/patch-extras_find-fixme_Makefile
index 32ef40c00de8..11c825c8a07e 100644
--- a/astro/routino/files/patch-extras_find-fixme_Makefile
+++ b/astro/routino/files/patch-extras_find-fixme_Makefile
@@ -1,4 +1,4 @@
---- extras/find-fixme/Makefile.orig 2016-06-04 17:12:29 UTC
+--- extras/find-fixme/Makefile.orig 2016-02-09 19:05:19 UTC
+++ extras/find-fixme/Makefile
@@ -52,8 +52,8 @@ all-bin: $(EXE)
@[ -d $(WEBBINDIR) ] || mkdir -p $(WEBBINDIR)
diff --git a/astro/routino/files/patch-web_Makefile b/astro/routino/files/patch-web_Makefile
index e87a7becd44d..68360567777f 100644
--- a/astro/routino/files/patch-web_Makefile
+++ b/astro/routino/files/patch-web_Makefile
@@ -1,4 +1,4 @@
---- web/Makefile.orig 2016-06-04 17:03:11 UTC
+--- web/Makefile.orig 2015-09-30 18:22:28 UTC
+++ web/Makefile
@@ -64,8 +64,8 @@ all-bin: all-exe
@[ -d $(WEBBINDIR) ] || mkdir -p $(WEBBINDIR)
diff --git a/astro/routino/files/patch-xml_Makefile b/astro/routino/files/patch-xml_Makefile
index 690b3093f495..bea51b99e0a2 100644
--- a/astro/routino/files/patch-xml_Makefile
+++ b/astro/routino/files/patch-xml_Makefile
@@ -1,4 +1,4 @@
---- xml/Makefile.orig 2016-06-04 17:08:07 UTC
+--- xml/Makefile.orig 2015-05-28 18:03:07 UTC
+++ xml/Makefile
@@ -56,12 +56,12 @@ test:
install: all
diff --git a/astro/saoimage/files/patch-btnlib_makefile b/astro/saoimage/files/patch-btnlib_makefile
index a556ab3fe672..d65f0aad01c0 100644
--- a/astro/saoimage/files/patch-btnlib_makefile
+++ b/astro/saoimage/files/patch-btnlib_makefile
@@ -1,5 +1,5 @@
---- btnlib/makefile.orig Wed Dec 6 14:51:17 1995
-+++ btnlib/makefile Thu Sep 24 15:54:53 1998
+--- btnlib/makefile.orig 1995-12-06 20:51:17 UTC
++++ btnlib/makefile
@@ -8,7 +8,7 @@
# the library would build. It is preferable to build btnlib as part of the
# make procedure in the parent SAOimage directory.
@@ -9,7 +9,7 @@
LINT = lint
RANLIB = ranlib
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,7 @@ OBJS = attach.o draw.o event.o border.
press.o remote.o resize.o util.o
LIB = libbtn.a
diff --git a/astro/saoimage/files/patch-disppsct.c b/astro/saoimage/files/patch-disppsct.c
index 159f9586512c..0aa347de9877 100644
--- a/astro/saoimage/files/patch-disppsct.c
+++ b/astro/saoimage/files/patch-disppsct.c
@@ -1,6 +1,6 @@
---- disppsct.c.orig Sun Jan 16 23:45:17 2000
-+++ disppsct.c Sun Jan 16 23:53:18 2000
-@@ -598,7 +598,7 @@
+--- disppsct.c.orig 2003-09-03 18:23:08 UTC
++++ disppsct.c
+@@ -599,7 +599,7 @@ static char *make_label()
char *getenv();
#endif
diff --git a/astro/saoimage/files/patch-gcc4 b/astro/saoimage/files/patch-gcc4
index 64cc64a6bf7e..4483e5e976c3 100644
--- a/astro/saoimage/files/patch-gcc4
+++ b/astro/saoimage/files/patch-gcc4
@@ -1,6 +1,6 @@
---- btnlib/border.c.orig Fri May 5 00:21:13 1995
-+++ btnlib/border.c Fri Jun 29 11:08:51 2007
-@@ -35,6 +35,10 @@
+--- btnlib/border.c.orig 1995-05-04 17:21:13 UTC
++++ btnlib/border.c
+@@ -35,6 +35,10 @@ static char SccsId[] = "%W% %G%";
* Note: For each byte, bit 0 (0x01) appears on the left.
* Note: For each byte, bit 7 (0x80) appears on the right.
*/
@@ -11,7 +11,7 @@
void btn_MakeBdrBitmap ( buttonmap, width, height, byte_width, form, inverse )
unsigned char *buttonmap; /* i,o: pointer to bitmap of button */
int width, height; /* i: dimensions of button window (to cover) */
-@@ -52,8 +56,6 @@
+@@ -52,8 +56,6 @@ void btn_MakeBdrBitmap ( buttonmap, widt
int right_form_bit; /* l: bit in first right form byte to use */
int right_bdr_byte; /* l: index of first line byte for right bdr */
int right_bdr_bit; /* l: bit in first line byte for right bdr */
@@ -20,7 +20,7 @@
/* portion of pattern form used (clip overlap if button very small) */
/* middle overlap on odd size counted for height, omitted for width */
-@@ -119,6 +121,9 @@
+@@ -119,6 +121,9 @@ void btn_MakeBdrBitmap ( buttonmap, widt
* Subroutine: btn_MakeBdrLine
* Purpose: set the bits for one line of the button's border
*/
@@ -30,7 +30,7 @@
static void btn_MakeBdrLine ( line, form, byte_width, inverse,
right_bdr_byte, right_bdr_bit,
right_form_byte, right_form_bit )
-@@ -131,7 +136,6 @@
+@@ -131,7 +136,6 @@ static void btn_MakeBdrLine ( line, form
int right_bdr_byte; /* l: index of first line byte for right bdr */
int right_bdr_bit; /* l: bit in first line byte for right bdr */
{
@@ -38,9 +38,9 @@
/* copy in top left, store reverse for top right */
*line = *form;
*(line+1) = *(++form);
---- btnlib/create.c.orig Sun Apr 29 04:17:46 1990
-+++ btnlib/create.c Fri Jun 29 11:09:21 2007
-@@ -53,6 +53,9 @@
+--- btnlib/create.c.orig 1990-04-28 20:17:46 UTC
++++ btnlib/create.c
+@@ -53,6 +53,9 @@ static GC def_gc = NULL;
* Note: Buttonboxes must later be combined into menus and panels
* Note: Call TouchButton to activate buttons and submenus when ready
*/
@@ -50,7 +50,7 @@
ButtonBox MakeButtonBox ( parent, gc, visual, background, geo, defs, borders )
BoxParent *parent; /* i: Parent window info */
GC gc; /* i: graphics context for drawing labels */
-@@ -70,7 +73,6 @@
+@@ -70,7 +73,6 @@ ButtonBox MakeButtonBox ( parent, gc, vi
int x, y; /* l: coordinates of box in parent */
int i; /* l: loop counter */
char *btn_Alloc();
@@ -58,9 +58,9 @@
void btn_LabelButtons(), btn_Dimensions();
/* allocate the space for the new record */
---- btnlib/draw.c.orig Sat Jun 22 06:40:21 1991
-+++ btnlib/draw.c Fri Jun 29 11:06:53 2007
-@@ -103,11 +103,13 @@
+--- btnlib/draw.c.orig 1991-06-21 23:40:21 UTC
++++ btnlib/draw.c
+@@ -103,11 +103,13 @@ void btn_PutImage ( button, phase )
* Xlib calls: none
* Method: Dim this box and all co-menu boxes
*/
@@ -75,7 +75,7 @@
btn_DimButtons(buttonbox);
for( i=0; i < buttonbox->co_menu_count; i++ ) {
-@@ -153,11 +155,13 @@
+@@ -153,11 +155,13 @@ static void btn_DimButtons ( buttonbox )
* Uses: btn_LightButtons() below
* Xlib calls: none
*/
@@ -90,9 +90,9 @@
btn_LightButtons(buttonbox);
for( i=0; i < buttonbox->co_menu_count; i++ ) {
---- btnlib/event.c.orig Fri May 5 00:27:33 1995
-+++ btnlib/event.c Fri Jun 29 11:07:53 2007
-@@ -52,12 +52,14 @@
+--- btnlib/event.c.orig 1995-05-04 17:27:33 UTC
++++ btnlib/event.c
+@@ -52,12 +52,14 @@ static int select_size=0;
* with their active submenus.
* Note: Must be called with a buttonbox at the base of the menu tree
*/
@@ -108,7 +108,7 @@
/* is the event in the primary buttonbox (or its sub-menus) */
if( btn_Event(buttonbox, event) != 0 ) {
-@@ -139,6 +141,10 @@
+@@ -139,6 +141,10 @@ static int btn_Event ( buttonbox, event
* with their active submenus.
* Note: Must be called with a buttonbox at the base of the menu tree
*/
@@ -119,7 +119,7 @@
int ButtonControl ( buttonbox, event, response )
ButtonBox buttonbox; /* i: top handle for button menu group */
XEvent *event; /* i: pointer to filled event record */
-@@ -147,8 +153,6 @@
+@@ -147,8 +153,6 @@ int ButtonControl ( buttonbox, event, re
int status; /* o: reason for return code (-1,0,1) */
int not_found; /* l: event search status */
int i; /* l: loop counter */
@@ -128,7 +128,7 @@
status = 1;
*response = NULL;
-@@ -206,6 +210,9 @@
+@@ -206,6 +210,9 @@ int ButtonControl ( buttonbox, event, re
* until one fields it. If still not, return NULL, else (it
* was fielded) get the next event and loop again.
*/
@@ -138,7 +138,7 @@
static int btn_Control ( buttonbox, event, response )
ButtonBox buttonbox; /* i: top handle for button menu tree */
XEvent *event; /* i: pointer to filled event record */
-@@ -218,7 +225,6 @@
+@@ -218,7 +225,6 @@ static int btn_Control ( buttonbox, even
int type; /* l: temp for button response type */
int id; /* l: temp for button id */
int mask[2]; /* l: temp store for select mask (select changes it) */
@@ -146,9 +146,9 @@
int btn_PushButton();
void btn_PutImage(), btn_DrawButton(), btn_ReleaseButton();
---- btnlib/image.c.orig Sun Aug 4 05:42:11 1991
-+++ btnlib/image.c Fri Jun 29 11:10:36 2007
-@@ -38,6 +38,9 @@
+--- btnlib/image.c.orig 1991-08-03 22:42:11 UTC
++++ btnlib/image.c
+@@ -38,6 +38,9 @@ static char SccsId[] = "%W% %G%";
* Post-state: off_out, off_in, on_out, on_in XImage's set in button record.
* Exception: Only labels present are installed.
*/
@@ -158,7 +158,7 @@
void btn_MakeXImages ( button, width, height, byte_width, visual,
off_out, off_in, on_out, on_in, mapsz, off, on, motf )
ButtonRecord *button; /* i: main structure describing button */
-@@ -56,7 +59,6 @@
+@@ -56,7 +59,6 @@ void btn_MakeXImages ( button, width, he
unsigned char *data; /* l: pointer to bitmap currently processing */
XImage *ximage;
char *btn_Alloc();
@@ -166,7 +166,7 @@
#ifdef ALLIANT
extern int nbutton;
-@@ -173,6 +175,9 @@
+@@ -173,6 +175,9 @@ void btn_MakeXImages ( button, width, he
* Exception: Label is not stenciled if one dimension would be zero.
* Method: Get basic alignment parameters and call btn_StencilLabel();
*/
@@ -176,7 +176,7 @@
static void btn_AddLabel ( label, width, height, byte_width, bitmap, inverse )
ButtonLabel *label; /* i: record of label bitmap to stencil in */
int width; /* i: width in pixels of button */
-@@ -185,7 +190,6 @@
+@@ -185,7 +190,6 @@ static void btn_AddLabel ( label, width,
int dst_x, dst_y; /* l: coords of start of stencil in dst (button) */
int xwdth; /* l: width (cols) to stencil */
int yhght; /* l: number of lines (rows) to stencil */
@@ -184,9 +184,9 @@
void btn_StencilLabel();
if( ((xwdth = btn_LabelX(label, width, &src_x, &dst_x)) > 0) &&
---- btnlib/label.c.orig Fri May 5 00:19:37 1995
-+++ btnlib/label.c Fri Jun 29 11:09:45 2007
-@@ -42,6 +42,10 @@
+--- btnlib/label.c.orig 1995-05-04 17:19:37 UTC
++++ btnlib/label.c
+@@ -42,6 +42,10 @@ static unsigned char lmask[8] = { 0x01,0
* Note: For each byte, bit 0 (0x01) appears on the left.
* Note: For each byte, bit 7 (0x80) appears on the right.
*/
@@ -197,19 +197,19 @@
void btn_StencilLabel ( src, msk, dst, src_byte_width, dst_byte_width,
src_x, src_y, dst_x, dst_y, width, height, inverse )
unsigned char *src; /* i: ptr to first byte of pattern */
-@@ -65,9 +69,6 @@
- unsigned char *last_dst; /* l: ptr to last byte used in first line */
+@@ -66,9 +70,6 @@ void btn_StencilLabel ( src, msk, dst, s
int first_mask; /* l: bit mask, with coded sign (see above) */
int last_mask; /* l: bit mask, with coded sign (see above) */
--
+
- static void btn_Stencil(), btn_StencilInv();
- static void btn_StencilAlligned(),btn_StencilAllignedInv();
-
+-
/* advance src and msk to their first used bytes */
byte_offset = (src_y * src_byte_width) + (src_x / 8);
---- btnlib/mount.c.orig Sat Apr 21 05:56:27 1990
-+++ btnlib/mount.c Fri Jun 29 11:11:16 2007
-@@ -35,11 +35,13 @@
+ src += byte_offset;
+--- btnlib/mount.c.orig 1990-04-20 21:56:27 UTC
++++ btnlib/mount.c
+@@ -35,11 +35,13 @@ static char SccsId[] = "%W% %G%";
* Xlib calls: none
* Note: This routine moves latterally to cover co-menus
*/
@@ -224,7 +224,7 @@
btn_MapButtonbox(buttonbox);
for( i = 0; i < buttonbox->co_menu_count; i++ )
-@@ -109,6 +111,9 @@
+@@ -109,6 +111,9 @@ static void btn_UnmapButtonbox ( buttonb
* map submenus of new button.
* Note: Unmapping submenus is harmless if they were not mapped.
*/
@@ -234,7 +234,7 @@
void btn_ReplaceSubmenus ( buttonbox, btn, op_num, mapping )
ButtonBox buttonbox;
int btn;
-@@ -116,7 +121,6 @@
+@@ -116,7 +121,6 @@ void btn_ReplaceSubmenus ( buttonbox, bt
int mapping; /* i: switch allows suppression of mapping */
{
int i;
@@ -242,7 +242,7 @@
/* clear out the old submenus */
for( i=0; i < buttonbox->submenu_count; i++ )
-@@ -149,6 +153,9 @@
+@@ -149,6 +153,9 @@ void btn_ReplaceSubmenus ( buttonbox, bt
* Note: Requires search through co-menus
* Note: Unmapping cosubmenus is harmless if they were not mapped.
*/
@@ -252,7 +252,7 @@
void btn_ReplaceCosubmenus ( buttonbox, btn, op_num, mapping )
ButtonBox buttonbox;
int btn;
-@@ -156,7 +163,6 @@
+@@ -156,7 +163,6 @@ void btn_ReplaceCosubmenus ( buttonbox,
int mapping; /* i: switch allows suppression of mapping */
{
int i, j;
@@ -260,9 +260,9 @@
/* check to see if we have the co-mode submenus */
if( buttonbox->cosubmenu_count > 0 ) {
---- btnlib/resize.c.orig Sat Apr 21 06:15:57 1990
-+++ btnlib/resize.c Fri Jun 29 11:11:35 2007
-@@ -33,12 +33,14 @@
+--- btnlib/resize.c.orig 1990-04-20 22:15:57 UTC
++++ btnlib/resize.c
+@@ -33,12 +33,14 @@ static char SccsId[] = "%W% %G%";
* Post-state: All buttonboxes having given parent are resized to fill
* Method: Call btn_ChkResize with this menu and then its co-menus.
*/
@@ -278,9 +278,9 @@
/* check this buttonbox */
btn_ChkResize(buttonbox, parent);
---- clralloc.c.orig Thu May 13 01:40:45 1999
-+++ clralloc.c Fri Jun 29 11:12:28 2007
-@@ -39,12 +39,14 @@
+--- clralloc.c.orig 1999-05-12 18:40:45 UTC
++++ clralloc.c
+@@ -39,12 +39,14 @@ static unsigned long overlay_mask; /* fo
* Method: Try for at least min cells in default colormap, if failed
* try to create a private colormap.
*/
@@ -297,9 +297,9 @@
if( (color->map.default_permit != NO) &&
(color->map.default_enable == YES) &&
---- clrctrl.c.orig Fri Apr 20 22:43:37 1990
-+++ clrctrl.c Fri Jun 29 11:13:02 2007
-@@ -36,13 +36,15 @@
+--- clrctrl.c.orig 1990-04-20 14:43:37 UTC
++++ clrctrl.c
+@@ -36,13 +36,15 @@ extern struct cgraphRec cgraph;
* Subroutine: select_color
* Purpose: Things to do when a buttonbox color menu button is selected
*/
@@ -316,7 +316,7 @@
if( control.response[0] == VOP ) {
switch( control.response[1] ) {
-@@ -218,10 +220,12 @@
+@@ -218,10 +220,12 @@ static void new_color_table ( map_code )
* Purpose: Reverse all colors at once (respond to invert button)
* Xlib call: XStoreColors()
*/
@@ -330,9 +330,9 @@
/* invert color tables and remake storemap */
invert_table(&color.ctable.red);
---- clrhard.c.orig Fri Apr 20 21:54:21 1990
-+++ clrhard.c Fri Jun 29 11:30:10 2007
-@@ -29,11 +29,13 @@
+--- clrhard.c.orig 1990-04-20 13:54:21 UTC
++++ clrhard.c
+@@ -29,11 +29,13 @@ static char SccsId[] = "%W% %G%";
* Subroutine: init_hard_colors
* Purpose: Set up basic hardware colors
*/
@@ -347,7 +347,7 @@
color->hard.red =
get_hard_color(color->display, colormap, "red", 63000, 0, 0);
-@@ -58,12 +60,14 @@
+@@ -58,12 +60,14 @@ void init_hard_colors ( color, colormap
* Subroutine: lookup_cursor_colors
* Purpose: Get color parameters from named cursor colors
*/
@@ -363,7 +363,7 @@
/* update xcolor structs if needed */
if( init || (color->cur.desired_cur != NULL) ) {
-@@ -90,12 +94,14 @@
+@@ -90,12 +94,14 @@ void lookup_cursor_colors ( color, color
* Pre-state: XColor for cur, one, and two, initialized
* Post-state: Pixel values for one and two set, that for cur returned.
*/
@@ -379,7 +379,7 @@
if( (color->cur.disp_one =
alloc_hard_color(color->display, colormap, &color->cur.color_one)) < 0 )
-@@ -113,10 +119,12 @@
+@@ -113,10 +119,12 @@ int alloc_cursor_cell_color ( color, col
* Subroutine: free_cursor_cell_color
* Purpose: Free cell color overlay colors
*/
@@ -393,9 +393,9 @@
free_readonly_color(color, (int)color->cur.color_one.pixel);
free_readonly_color(color, (int)color->cur.color_two.pixel);
---- clrinit.c.orig Sat Dec 15 05:17:55 2001
-+++ clrinit.c Fri Jun 29 11:30:25 2007
-@@ -38,6 +38,9 @@
+--- clrinit.c.orig 2001-12-14 23:17:55 UTC
++++ clrinit.c
+@@ -38,6 +38,9 @@ static Display *display;
* Subroutine: init_color
* Purpose: Claim and set up colors (and do any needed initial work)
*/
@@ -405,7 +405,7 @@
void init_color ( color, init )
struct colorRec *color;
int init;
-@@ -46,7 +49,6 @@
+@@ -46,7 +49,6 @@ void init_color ( color, init )
void exit_errmsg(), init_hard_colors(), init_halftone();
void free_color_cells(), lookup_cursor_colors(), free_cursor_cell_color();
void init_overlay_color(), init_cell_color(), init_halftone_color();
@@ -413,9 +413,9 @@
if( init ) {
display = color->display;
---- clrmenu.c.orig Sun Apr 29 06:40:14 1990
-+++ clrmenu.c Fri Jun 29 11:31:13 2007
-@@ -35,14 +35,16 @@
+--- clrmenu.c.orig 1990-04-28 22:40:14 UTC
++++ clrmenu.c
+@@ -35,14 +35,16 @@ EditStruct *color_edit; /* key to popup
* Purpose: Get a new pre-defined color table and load it for use
* Returns: 1 if succeeded, else 0
*/
@@ -434,7 +434,7 @@
switch( table_code ) {
case MOP_Init_A:
-@@ -111,13 +113,15 @@
+@@ -111,13 +113,15 @@ static ColorTable *read_color_file ( )
* Subroutine: write_color_file
* Purpose: Open and write a color table file
*/
@@ -451,7 +451,7 @@
EditStruct *init_edit_popup();
int open_output_file();
void timestamp();
-@@ -189,11 +193,13 @@
+@@ -189,11 +193,13 @@ static void print_one_color ( fp, table
* Subroutine: load_newtable
* Purpose: Load an internally stored color table for use
*/
@@ -466,9 +466,9 @@
load_subtable(&ctable->red, &new->red);
load_subtable(&ctable->green, &new->green);
---- clrread.c.orig Sun Apr 29 07:30:35 1990
-+++ clrread.c Fri Jun 29 11:31:49 2007
-@@ -25,6 +25,9 @@
+--- clrread.c.orig 1990-04-28 23:30:35 UTC
++++ clrread.c
+@@ -25,6 +25,9 @@ static char SccsId[] = "%W% %G%";
* Subroutine: parse_color_file
* Purpose: Parse values after color identifier
*/
@@ -478,7 +478,7 @@
int parse_color_file ( fp, ctable, max_entries )
ColorTable *ctable;
int max_entries;
-@@ -35,7 +38,6 @@
+@@ -35,7 +38,6 @@ int parse_color_file ( fp, ctable, max_e
char line[SZ_LINE];
char cbuf[SZ_LINE];
struct SubTable *table;
@@ -486,7 +486,7 @@
line_num = 0;
/* advance to first non-comment line */
-@@ -95,6 +97,9 @@
+@@ -95,6 +97,9 @@ int parse_color_file ( fp, ctable, max_e
* Purpose: Read color table entries for one color
* Note: Values may start with word "gamma" and its value
*/
@@ -496,7 +496,7 @@
static int parse_color_table ( fp, line, cbuf, i, len, line_num,
farb, max_entries, color_cnt )
FILE *fp;
-@@ -110,7 +115,6 @@
+@@ -110,7 +115,6 @@ static int parse_color_table ( fp, line,
float level, intensity;
char *level_token, *intensity_token;
int status, entry;
@@ -504,7 +504,7 @@
int check_parens();
char *next_token();
-@@ -227,6 +231,9 @@
+@@ -227,6 +231,9 @@ static int parse_color_table ( fp, line,
* Negative val if string starts with a number or paren
* 0 if file ended, or first character was neither char nor num
*/
@@ -514,7 +514,7 @@
static int advance_to_ascii ( fp, line, scratch, len, line_num, dont_end )
FILE *fp; /* i: file descriptor */
char *line; /* i: buffer to get entire line */
-@@ -236,7 +243,6 @@
+@@ -236,7 +243,6 @@ static int advance_to_ascii ( fp, line,
int dont_end; /* flag that more is definitely expected */
{
int i;
@@ -522,9 +522,9 @@
int check_parens();
/* advance to first non-comment line */
---- clrsetup.c.orig Sun Jun 3 12:07:29 1990
-+++ clrsetup.c Fri Jun 29 11:32:20 2007
-@@ -29,12 +29,14 @@
+--- clrsetup.c.orig 1990-06-03 04:07:29 UTC
++++ clrsetup.c
+@@ -29,12 +29,14 @@ static char SccsId[] = "%W% %G%";
* Purpose: Set up color parameters unique to overlay type usage
* Xlib calls: XStoreColors()
*/
@@ -540,7 +540,7 @@
init_cellstore(color->cellstore, color->pixvalmap, color->ncolors);
/* color in the cursor range of the color map */
-@@ -75,12 +77,14 @@
+@@ -75,12 +77,14 @@ void init_overlay_color ( color )
* Purpose: Set up color parameters unique to cell usage without overlay
* Xlib calls: XStoreColors()
*/
@@ -556,9 +556,9 @@
init_cellstore(color->cellstore, color->pixvalmap, color->ncolors);
/* Not cursor plane */
---- clrvary.c.orig Fri Apr 20 21:57:20 1990
-+++ clrvary.c Fri Jun 29 11:32:33 2007
-@@ -130,6 +130,9 @@
+--- clrvary.c.orig 1990-04-20 13:57:20 UTC
++++ clrvary.c
+@@ -130,6 +130,9 @@ void vary_colors ( event, mode, track, x
* Subroutine: vary_contrast_and_bias
* Purpose: change color table cell_levels as per new contrast and bias
*/
@@ -568,7 +568,7 @@
void vary_contrast_and_bias ( table, contrast, bias )
struct subtableRec *table;
double contrast; /* i: normal = 1.0 */
-@@ -137,7 +140,6 @@
+@@ -137,7 +140,6 @@ void vary_contrast_and_bias ( table, con
{
double *base_level, *cell_level;
int vertex_cnt;
@@ -576,9 +576,9 @@
base_level = table->base_level;
cell_level = table->cell_level;
---- cmdnew.c.orig Fri Jun 6 21:52:04 1997
-+++ cmdnew.c Fri Jun 29 11:33:12 2007
-@@ -73,9 +73,11 @@
+--- cmdnew.c.orig 1997-06-06 14:52:04 UTC
++++ cmdnew.c
+@@ -73,9 +73,11 @@ static char *prompt = "Enter new image f
* Called by: key_response() in MainKey.c
* Called by: select_environment() in MainSelect.c
*/
@@ -591,7 +591,7 @@
int get_edit_input();
EditStruct *init_edit_popup();
-@@ -95,6 +97,11 @@
+@@ -95,6 +97,11 @@ void get_new_cmd ( )
* Purpose: Given a new command line, parse it and do what is called for
* Returns: 1 = success, 0 = user decided not to do anything, -1 = error
*/
@@ -603,7 +603,7 @@
static int new_command ( input_line )
char *input_line;
{
-@@ -104,9 +111,6 @@
+@@ -104,9 +111,6 @@ static int new_command ( input_line )
int headersize;
int parse_cmdline(), check_image();
void reinit_color(), redraw_magnifier(), touch_submenu_button();
@@ -613,9 +613,9 @@
/* store some key initial values */
headersize = img.headersize;
---- cmdparse.c.orig Tue Apr 9 02:26:55 2002
-+++ cmdparse.c Fri Jun 29 11:33:24 2007
-@@ -47,6 +47,9 @@
+--- cmdparse.c.orig 2002-04-08 19:26:55 UTC
++++ cmdparse.c
+@@ -47,6 +47,9 @@ extern int bad_buttons;
* Purpose: Process options to set filename and change defaults
* Returns: -1 on error, 0 OK but no filename, 1 OK and new filename given
*/
@@ -625,7 +625,7 @@
int parse_cmdline ( argc, argv, displayname )
int argc;
char *argv[];
-@@ -58,7 +61,6 @@
+@@ -58,7 +61,6 @@ int parse_cmdline ( argc, argv, displayn
int parse_rotate(), parse_scale(), parse_color(), parse_fileread(), usage();
int parse_cursor();
void init_cmdline();
@@ -633,9 +633,9 @@
if( displayname != NULL ) {
/* if initial program command line, strip off program name, store line */
---- crdinvrt.c.orig Fri Apr 20 22:00:26 1990
-+++ crdinvrt.c Fri Jun 29 11:33:51 2007
-@@ -28,12 +28,14 @@
+--- crdinvrt.c.orig 1990-04-20 14:00:26 UTC
++++ crdinvrt.c
+@@ -28,12 +28,14 @@ static char SccsId[] = "%W% %G%";
* Purpose: Compute parameters of the inverse transform
* Method: Uses LU decomposition method
*/
@@ -651,7 +651,7 @@
scratch[0][0] = old->inx_outx;
scratch[1][0] = old->iny_outx;
-@@ -65,13 +67,15 @@
+@@ -65,13 +67,15 @@ void invert_matrix ( old, new )
* Purpose: Compute the offsets used for integer transforms
* Method: Uses matrix inversion
*/
@@ -668,9 +668,9 @@
/* set transform equations in matrix form */
scratch[0][0] = old->inx_outx;
---- crdrot.c.orig Fri Apr 20 22:00:51 1990
-+++ crdrot.c Fri Jun 29 11:35:13 2007
-@@ -55,6 +55,9 @@
+--- crdrot.c.orig 1990-04-20 14:00:51 UTC
++++ crdrot.c
+@@ -55,6 +55,9 @@ static char SccsId[] = "%W% %G%";
* As each transform is applied to the front, we apply them in reverse order
* the result is, from img->A,B,C,imgtofile(as given)->file
*/
@@ -680,7 +680,7 @@
void rotate_transform ( img, imgtofile, flip, rotcode )
Coordsys *img;
Transform *imgtofile;
-@@ -63,7 +66,6 @@
+@@ -63,7 +66,6 @@ void rotate_transform ( img, imgtofile,
{
double xmove, ymove;
int angle;
@@ -688,7 +688,7 @@
/* if no rotation, do nothing */
if( (rotcode == 0) && (flip == 0) ) return;
-@@ -93,6 +95,9 @@
+@@ -93,6 +95,9 @@ void rotate_transform ( img, imgtofile,
* Note: ioff is not used for turn or flip, as it is assumed that both
* will be bracketed between two moves (to place origin at center)
*/
@@ -698,7 +698,7 @@
static void move_mtrx ( mtrx, xtran, ytran, ioff, prior )
Transform *mtrx;
double xtran, ytran;
-@@ -100,7 +105,6 @@
+@@ -100,7 +105,6 @@ static void move_mtrx ( mtrx, xtran, ytr
int prior;
{
Transform translate;
@@ -706,7 +706,7 @@
bzero((char *)(&translate), sizeof(Transform));
translate.inx_outx = 1.0;
-@@ -119,12 +123,14 @@
+@@ -119,12 +123,14 @@ static void move_mtrx ( mtrx, xtran, ytr
* Subroutine: flip_mtrx
* Purpose: Apply a mirror reflection to the passed Transform
*/
@@ -722,7 +722,7 @@
bzero((char *)(&reflect), sizeof(Transform));
reflect.inx_outx = 1.0;
-@@ -141,6 +147,9 @@
+@@ -141,6 +147,9 @@ static void flip_mtrx ( mtrx, prior )
* Note: the pivot is 0,0 of the passed Transform's coordinate system
* Exception: only multiples of 90 degrees are allowed
*/
@@ -732,7 +732,7 @@
static void turn_mtrx ( mtrx, angle, prior )
Transform *mtrx;
int angle;
-@@ -148,7 +157,6 @@
+@@ -148,7 +157,6 @@ static void turn_mtrx ( mtrx, angle, pri
{
Transform rotate;
void exit_errmsg();
@@ -740,9 +740,9 @@
while( angle >= 360 ) angle -= 360;
while( angle < 0 ) angle += 360;
---- crdsynth.c.orig Fri Apr 20 22:01:55 1990
-+++ crdsynth.c Fri Jun 29 11:35:34 2007
-@@ -147,11 +147,13 @@
+--- crdsynth.c.orig 1990-04-20 14:01:55 UTC
++++ crdsynth.c
+@@ -147,11 +147,13 @@ void combine_transform ( new, first, sec
* Subroutine: set_trans_speed
* Purpose: Set parameters for fast integer computation
*/
@@ -757,9 +757,9 @@
trans->ixzoom = 0;
trans->iyzoom = 0;
---- crdtemp.c.orig Tue Feb 27 02:14:19 1996
-+++ crdtemp.c Fri Jun 29 11:35:55 2007
-@@ -126,6 +126,9 @@
+--- crdtemp.c.orig 1996-02-26 20:14:19 UTC
++++ crdtemp.c
+@@ -126,6 +126,9 @@ void set_disptran ( coord )
* Purpose: set up zoom given edges of desired display and
* appropriate img transform
*/
@@ -769,7 +769,7 @@
void panedge_zoom ( coord, wintoimgtrans, win_x, win_y )
struct coordRec *coord; /* i: collected coords */
Transform *wintoimgtrans; /* i: transform from mouse's window to img */
-@@ -134,7 +137,6 @@
+@@ -134,7 +137,6 @@ void panedge_zoom ( coord, wintoimgtrans
float imgX, imgY;
int box_width, box_height;
void i_transform();
@@ -777,9 +777,9 @@
/* calculate image coordinates of win_x and win_y */
i_transform(wintoimgtrans, win_x, win_y, &imgX, &imgY);
---- csrarea.c.orig Fri Apr 20 22:07:03 1990
-+++ csrarea.c Fri Jun 29 11:36:28 2007
-@@ -28,13 +28,15 @@
+--- csrarea.c.orig 1990-04-20 14:07:03 UTC
++++ csrarea.c
+@@ -28,13 +28,15 @@ static char SccsId[] = "%W% %G%";
* Purpose: Calculate area, in float units file pixels, enclosed by cursor
* Method: Use mathematical formula appropriate to cursor type
*/
@@ -796,7 +796,7 @@
switch( cursor->type ) {
case COP_Circle:
-@@ -83,13 +85,15 @@
+@@ -83,13 +85,15 @@ static double x11, y11, x12, y12;
* are not tested since neighbors cannot cross but neighbors do
* share a common point.
*/
@@ -813,9 +813,9 @@
if( (i+2) >= cnt ) {
return( 0 );
---- csrgrab.c.orig Fri Apr 20 22:08:42 1990
-+++ csrgrab.c Fri Jun 29 11:37:13 2007
-@@ -38,12 +38,14 @@
+--- csrgrab.c.orig 1990-04-20 14:08:42 UTC
++++ csrgrab.c
+@@ -38,12 +38,14 @@ extern struct colorRec color; /* need to
* Purpose: Change size of cursor to intersect current mouse cursor
* while keeping aspect ratio of cursor constant
*/
@@ -831,7 +831,7 @@
/* if this event is initiating tracking, don't erase the cursor */
if( event->type == MotionNotify )
-@@ -64,13 +66,15 @@
+@@ -64,13 +66,15 @@ void size_annuli ( cursor, event )
* Purpose: Respond to a mouse request to delete an annulus
*
*/
@@ -849,7 +849,7 @@
/* if there are two or more annuli */
if( (cursor->next_annulus != 0) &&
-@@ -169,14 +173,16 @@
+@@ -169,14 +173,16 @@ static void remove_annulus ( parent )
* Purpose: Set up cursor to for a size annulus interaction
* Called by: size_annuli()
*/
@@ -868,9 +868,9 @@
code = on_annulus(cursor, &parent);
/* decide what to draw */
---- csrpoly1.c.orig Fri Apr 20 22:11:54 1990
-+++ csrpoly1.c Fri Jun 29 11:37:39 2007
-@@ -36,6 +36,9 @@
+--- csrpoly1.c.orig 1990-04-20 14:11:54 UTC
++++ csrpoly1.c
+@@ -36,6 +36,9 @@ extern struct colorRec color; /* need to
* Used when initiating a move or size action
* Called by: control_cursor() in CursorCtrl.c
*/
@@ -880,7 +880,7 @@
void grab_polygon_vertex ( cursor, event, size )
struct cursorRec *cursor;
XEvent *event; /* i: XbuttonEvent (ButtonPress) for x & y */
-@@ -45,7 +48,6 @@
+@@ -45,7 +48,6 @@ void grab_polygon_vertex ( cursor, event
int pt; /* l: index of polygon vertex */
int closest_polygon_line();
void draw_cursor(), add_polygon_vertex();
@@ -888,7 +888,7 @@
/* erase existing cursor */
draw_cursor(cursor, &color.gcset.undraw);
-@@ -84,13 +86,15 @@
+@@ -84,13 +86,15 @@ void grab_polygon_vertex ( cursor, event
* Returns: 1 if image must be redrawn, else 0
* Called by: control_cursor() in CursorCtrl.c
*/
@@ -905,9 +905,9 @@
i = on_polygon_vertex((int)event->xbutton.x, (int)event->xbutton.y,
cursor->points, cursor->poly_cnt);
---- csrpoly2.c.orig Thu Jul 9 23:29:27 1998
-+++ csrpoly2.c Fri Jun 29 11:37:55 2007
-@@ -72,12 +72,14 @@
+--- csrpoly2.c.orig 1998-07-09 16:29:27 UTC
++++ csrpoly2.c
+@@ -72,12 +72,14 @@ void collapse_polygon ( cursor )
* Subroutine: start_polygon
* Purpose: Install polygon drawing stuff for the active cursor
*/
@@ -923,9 +923,9 @@
if( polysz == 0 )
init_polygon();
---- csrpoly3.c.orig Fri Apr 20 22:11:40 1990
-+++ csrpoly3.c Fri Jun 29 11:38:09 2007
-@@ -28,6 +28,9 @@
+--- csrpoly3.c.orig 1990-04-20 14:11:40 UTC
++++ csrpoly3.c
+@@ -28,6 +28,9 @@ static char SccsId[] = "%W% %G%";
* vector from pointer to closest point on segment
* Method: top down search
*/
@@ -935,7 +935,7 @@
int closest_polygon_line ( x, y, vertex, cnt )
int x, y;
XPoint *vertex;
-@@ -38,7 +41,6 @@
+@@ -38,7 +41,6 @@ int closest_polygon_line ( x, y, vertex,
int min_endpoint, endpoint;
int min_j;
int i, j;
@@ -943,9 +943,9 @@
min_distance = 1.0E30;
min_j = 0;
---- csrshape.c.orig Tue Oct 20 01:46:41 1998
-+++ csrshape.c Fri Jun 29 11:40:32 2007
-@@ -31,9 +31,6 @@
+--- csrshape.c.orig 1998-10-19 18:46:41 UTC
++++ csrshape.c
+@@ -31,9 +31,6 @@ static char SccsId[] = "%W% %G%";
#include "defs/circle.def" /* Define Unit_circles */
@@ -955,7 +955,7 @@
void make_cursor( struct cursorRec *cursor);
static int make_arrow( double xtip, double ytip, double xray,
double rotsin, double rotcos, XPoint *points);
-@@ -41,28 +38,20 @@
+@@ -41,28 +38,20 @@ static int make_boxcur( double xcen, dou
double xray, double yray,
double rotsin, double rotcos, XPoint *points);
static int make_circur( double xcen, double ycen, double radius,
@@ -990,9 +990,9 @@
/* Declare and initialize drawing tools */
double *UnitPieX = Circle12X;
---- ctrlcntn.c.orig Thu Jul 9 23:29:00 1998
-+++ ctrlcntn.c Fri Jun 29 11:41:15 2007
-@@ -61,6 +61,9 @@
+--- ctrlcntn.c.orig 1998-07-09 16:29:00 UTC
++++ ctrlcntn.c
+@@ -61,6 +61,9 @@ void init_connections ()
* Purpose: Open a connection to a remote process and update event handlers
* Returns: -1 on failure, else IPC number
*/
@@ -1002,7 +1002,7 @@
int open_connection ( connection )
struct connectRec *connection;
{
-@@ -71,7 +74,6 @@
+@@ -71,7 +74,6 @@ int open_connection ( connection )
extern int ButtonSelectMask(), open_pipe();
extern int open_socket_listener();
extern struct connectRec *accept_socket_connection();
@@ -1010,9 +1010,9 @@
#endif
#ifdef NOPIPEFLUSH
---- ctrlfile.c.orig Fri Apr 20 21:49:12 1990
-+++ ctrlfile.c Fri Jun 29 11:41:47 2007
-@@ -40,6 +40,9 @@
+--- ctrlfile.c.orig 1990-04-20 13:49:12 UTC
++++ ctrlfile.c
+@@ -40,6 +40,9 @@ extern int errno;
* Post state: Sets pointer to file, open and ready for writing
* Returns: 2 = append, 1 = new file, 0 = user decided not to, -1 = error
*/
@@ -1022,7 +1022,7 @@
int open_output_file ( fd, edit, one_popup_row, prompt )
FILE **fd;
EditStruct *edit;
-@@ -56,7 +59,6 @@
+@@ -56,7 +59,6 @@ int open_output_file ( fd, edit, one_pop
int get_edit_input();
EditStruct *init_edit_popup();
void clear_edit_buf(), unmap_popwin();
@@ -1030,7 +1030,7 @@
open_type[0] = 0;
if( (get_edit_input(edit, one_popup_row, 1, 0, prompt) <= 0) ||
-@@ -137,6 +139,9 @@
+@@ -137,6 +139,9 @@ int open_output_file ( fd, edit, one_pop
* Note: Sets pointer of file open and ready for reading
* Returns: 1 on success, 0 if user decided not to, -1 on error
*/
@@ -1040,7 +1040,7 @@
int open_input_file ( fd, edit, one_popup_row, prompt )
FILE **fd;
EditStruct *edit;
-@@ -146,7 +151,6 @@
+@@ -146,7 +151,6 @@ int open_input_file ( fd, edit, one_popu
char filename[132];
int exist;
int get_edit_input();
@@ -1048,9 +1048,9 @@
if( get_edit_input(edit, one_popup_row, 1, 1, prompt) <= 0 )
return( 0 );
---- ctrlgc.c.orig Wed May 2 16:19:55 1990
-+++ ctrlgc.c Fri Jun 29 11:42:09 2007
-@@ -237,10 +237,12 @@
+--- ctrlgc.c.orig 1990-05-02 08:19:55 UTC
++++ ctrlgc.c
+@@ -237,10 +237,12 @@ GC set_edit_gc ( font, foreground, backg
* Subroutine: get_fontstruct
* Returns: Pointer to the specified fontstruct
*/
@@ -1064,7 +1064,7 @@
if( (app_font[app_code] == NULL) && (init_font(app_code) == NULL) )
return( NULL );
-@@ -253,11 +255,13 @@
+@@ -253,11 +255,13 @@ XFontStruct *get_fontstruct ( app_code )
* Purpose: Load the fonts used by this program
* Returns: Font on success, else 0
*/
@@ -1079,9 +1079,9 @@
for( i=0; i<OPTION_COUNT; i++ ) {
name_index = preference[app_code][i];
---- dispblnk.c.orig Fri Apr 20 22:23:14 1990
-+++ dispblnk.c Fri Jun 29 11:42:36 2007
-@@ -181,13 +181,15 @@
+--- dispblnk.c.orig 1990-04-20 14:23:14 UTC
++++ dispblnk.c
+@@ -181,13 +181,15 @@ static int display_blink ( index )
* For each button release, if it is on top of stack, release it and display
* one below, else just release it
*/
@@ -1098,9 +1098,9 @@
if( control.event.type == ButtonPress ) {
/* don't respond if it's with a meta key (window resize) */
---- dispbtmp.c.orig Sat Jun 22 05:58:15 1991
-+++ dispbtmp.c Fri Jun 29 11:42:53 2007
-@@ -55,9 +55,11 @@
+--- dispbtmp.c.orig 1991-06-21 22:58:15 UTC
++++ dispbtmp.c
+@@ -55,9 +55,11 @@ void init_halftone ()
* Subroutine: select_halftone
* Purpose: Respond to halftone selection command
*/
@@ -1113,9 +1113,9 @@
switch( control.response[1] ) {
case 0:
---- editctrl.c.orig Sun Jun 3 12:07:48 1990
-+++ editctrl.c Fri Jun 29 11:44:00 2007
-@@ -61,6 +61,9 @@
+--- editctrl.c.orig 1990-06-03 04:07:48 UTC
++++ editctrl.c
+@@ -61,6 +61,9 @@ extern int XZ_efn;
* Subroutine: init_edit_popup
* Purpose: Get everything ready for running editor sessions
*/
@@ -1125,7 +1125,7 @@
EditStruct *init_edit_popup ( string, max_chars )
char *string;
int max_chars;
-@@ -69,7 +72,6 @@
+@@ -69,7 +72,6 @@ EditStruct *init_edit_popup ( string, ma
int len;
EditStruct *get_edit_struct();
void init_edit_struct(), load_edit_struct();
@@ -1133,7 +1133,7 @@
if( init_window ) {
init_popwin(color.gcset.menu.foreground, color.gcset.menu.background);
-@@ -91,6 +93,9 @@
+@@ -91,6 +93,9 @@ EditStruct *init_edit_popup ( string, ma
* (but expose is fielded and configure is saved for end).
* Returns: 1 if user returns with a response, 0 if user cancels session
*/
@@ -1143,7 +1143,7 @@
int get_edit_input ( edit, one_row, map, unmap, prompt )
EditStruct *edit;
int one_row; /* i: put-edit-after-prompt-on-same-line */
-@@ -104,7 +109,6 @@
+@@ -104,7 +109,6 @@ int get_edit_input ( edit, one_row, map,
int emacs_response();
void draw_new_string(), redraw_edit_string();
void adjust_desktop(), redraw_window(), unmap_popwin();
@@ -1151,9 +1151,9 @@
map_popwin(edit, one_row, prompt, map);
if( !map ) {
---- grphbtmp.c.orig Fri Apr 20 22:31:04 1990
-+++ grphbtmp.c Fri Jun 29 11:44:16 2007
-@@ -27,6 +27,9 @@
+--- grphbtmp.c.orig 1990-04-20 14:31:04 UTC
++++ grphbtmp.c
+@@ -27,6 +27,9 @@ extern struct colorRec color;
* Subroutine: make_halftone_panimage
* Purpose: Make halftone bitmap for pan window (panbox)
*/
@@ -1163,7 +1163,7 @@
void make_halftone_colorbar ( bytedata, bitdata,
width, height, bytes_per_line )
unsigned char *bytedata;
-@@ -34,7 +37,6 @@
+@@ -34,7 +37,6 @@ void make_halftone_colorbar ( bytedata,
int width, height;
int bytes_per_line;
{
@@ -1171,9 +1171,9 @@
bzero((char *)bitdata, bytes_per_line * height);
if( color.halftone.mode == BOP_Dither ) {
---- grphgrab.c.orig Fri Apr 20 22:33:27 1990
-+++ grphgrab.c Fri Jun 29 11:45:43 2007
-@@ -30,10 +30,12 @@
+--- grphgrab.c.orig 1990-04-20 14:33:27 UTC
++++ grphgrab.c
+@@ -30,10 +30,12 @@ extern struct cgraphRec cgraph;
* Subroutine: grab_cgraph_vertex
* Purpose: When a mouse button is pressed, assign a vertex to that button
*/
@@ -1187,7 +1187,7 @@
switch( event->xbutton.button ) {
case Button1:
-@@ -58,10 +60,12 @@
+@@ -58,10 +60,12 @@ void get_cgraph_vertex ( event )
* event
* Returns: 1 if a vertex was dropped, else 0
*/
@@ -1201,7 +1201,7 @@
switch( event->xbutton.button ) {
case Button1:
-@@ -83,13 +87,15 @@
+@@ -83,13 +87,15 @@ int drop_cgraph_vertex ( event )
* Purpose: Handle grab vertex event for single color
* Method: Grab old vertex or make new vertex - under mouse pointer
*/
@@ -1219,7 +1219,7 @@
/* clip against limits */
if( x < cgraph.graph.xzero )
-@@ -151,6 +157,9 @@
+@@ -151,6 +157,9 @@ static int grab_old_color_vertex ( x, y,
* Subroutine: install_new_color_vertex
* Purpose: Given hash position, install a new vertex, and make active
*/
@@ -1229,7 +1229,7 @@
static void install_new_color_vertex ( x, y, col )
int x, y; /* i: position of ULcorner of new hash mark */
struct colgRec *col; /* i: color info structure for one color */
-@@ -158,7 +167,6 @@
+@@ -158,7 +167,6 @@ static void install_new_color_vertex ( x
double intensity, cell_level;
int match;
int select_best_hash_position();
@@ -1237,7 +1237,7 @@
col->active_hash = select_best_hash_position(x, y, col->hash, col->hash_cnt,
&match, cgraph.vertical);
-@@ -251,11 +259,13 @@
+@@ -251,11 +259,13 @@ static void add_color_vertex_hash ( col,
* Purpose: Delete a color table vertex if one is under the mouse position
* Returns: 1 if vertex was dropped, else 0
*/
@@ -1252,9 +1252,9 @@
/* hash mark positions are upper left corner of hash box */
x -= HASH_RAY;
---- grphinit.c.orig Fri Apr 20 22:40:44 1990
-+++ grphinit.c Fri Jun 29 11:46:50 2007
-@@ -46,9 +46,11 @@
+--- grphinit.c.orig 1990-04-20 14:40:44 UTC
++++ grphinit.c
+@@ -46,9 +46,11 @@ extern int XZ_efn;
* Subroutine: init_colorbox
* Purpose: Handle program init-time color bar and graph initialization
*/
@@ -1267,7 +1267,7 @@
cgraph.ncolors = color.ncolors;
cgraph.red.table = &color.ctable.red;
-@@ -68,10 +70,12 @@
+@@ -68,10 +70,12 @@ void init_colorbox ( )
* Purpose: Initialize color bar and related params
* Xlib calls: XCreateSimpleWindow(), XMapSubwindows()
*/
@@ -1281,7 +1281,7 @@
colorbar.display = colorbox.display;
colorbar.ref_width = colorbox.width;
-@@ -92,10 +96,12 @@
+@@ -92,10 +96,12 @@ static void init_main_colorbar ( )
* Subroutine: adjust_main_colorbar
* Purpose: Adjust color bar size params and/or color data if needed
*/
@@ -1295,7 +1295,7 @@
if( (colorbox.width != colorbar.ref_width) ||
(colorbox.height != colorbar.ref_height) ) {
-@@ -113,11 +119,13 @@
+@@ -113,11 +119,13 @@ void adjust_main_colorbar ( )
* Purpose: Initialize color bar and related params
* Xlib calls: XMapSubwindows()
*/
@@ -1310,7 +1310,7 @@
cgraph.bar.display = graphbox.display;
cgraph.bar.ref_width = graphbox.width;
-@@ -149,11 +157,13 @@
+@@ -149,11 +157,13 @@ void init_graph_colorbar ( )
* Subroutine: adjust_graph_colorbar
* Purpose: Adjust color bar size params and/or color data if needed
*/
@@ -1325,9 +1325,9 @@
if( cgraph.vertical ) {
if( graphbox.height != cgraph.bar.ref_height ) {
---- grphmove.c.orig Fri Apr 20 22:37:26 1990
-+++ grphmove.c Fri Jun 29 11:47:08 2007
-@@ -26,12 +26,14 @@
+--- grphmove.c.orig 1990-04-20 14:37:26 UTC
++++ grphmove.c
+@@ -26,12 +26,14 @@ extern struct cgraphRec cgraph;
* Purpose: Change values (and position) of designated vertices in
* response to mouse movement
*/
@@ -1343,9 +1343,9 @@
/* clip against limits */
if( x < cgraph.graph.xzero )
---- grpholap.c.orig Fri Apr 20 22:36:00 1990
-+++ grpholap.c Fri Jun 29 11:47:22 2007
-@@ -28,13 +28,15 @@
+--- grpholap.c.orig 1990-04-20 14:36:00 UTC
++++ grpholap.c
+@@ -28,13 +28,15 @@ extern struct cgraphRec cgraph;
* Subroutine: mark_colorline_overlap
* Purpose: Make line representing more than one color black (or white)
*/
@@ -1362,9 +1362,9 @@
j = 0;
if( cgraph.vertical ) {
---- grphtext.c.orig Fri Apr 20 22:39:37 1990
-+++ grphtext.c Fri Jun 29 11:49:42 2007
-@@ -33,6 +33,9 @@
+--- grphtext.c.orig 1990-04-20 14:39:37 UTC
++++ grphtext.c
+@@ -33,6 +33,9 @@ extern struct cgraphRec cgraph;
* Purpose: Set labeling pieces according to the graph window size
* Xlib calls: XMoveWindow(), XResizeWindow(), XMapWindow()
*/
@@ -1374,7 +1374,7 @@
void init_color_graph_label ( )
{
int new = 0;
-@@ -40,7 +43,6 @@
+@@ -40,7 +43,6 @@ void init_color_graph_label ( )
int resize = 0;
Window create_cgraph_box();
void init_color_graph_label();
@@ -1382,9 +1382,9 @@
if( cgraph.graphlabel.active == 0 )
return;
---- histdist.c.orig Wed Jul 29 01:56:45 1998
-+++ histdist.c Fri Jun 29 11:51:37 2007
-@@ -24,6 +24,9 @@
+--- histdist.c.orig 1998-07-28 18:56:45 UTC
++++ histdist.c
+@@ -24,6 +24,9 @@ static char SccsId[] = "%W% %G%";
* Purpose: Distribute the levels among histogram sub-groups
* Returns: number of groups with no assigned color levels
*/
@@ -1394,7 +1394,7 @@
int distribute_levels ( linklist, pixel_area, color_levels,
pmin, pmax, ncolor )
SubrangeLink *linklist;
-@@ -39,7 +42,6 @@
+@@ -39,7 +42,6 @@ int distribute_levels ( linklist, pixel_
#ifdef DEBUG
int census = 0;
#endif
@@ -1402,9 +1402,9 @@
/* if all one group (no strong peaks), allocation is simple */
if( linklist->next == 0 ) {
---- histeql.c.orig Fri Apr 20 22:59:27 1990
-+++ histeql.c Fri Jun 29 11:51:55 2007
-@@ -24,6 +24,10 @@
+--- histeql.c.orig 1990-04-20 14:59:27 UTC
++++ histeql.c
+@@ -24,6 +24,10 @@ static char SccsId[] = "%W% %G%";
* output level optimization accounts for large cell counts
* for single levels (e.g. half of all pixels with value 0)
*/
@@ -1415,7 +1415,7 @@
void histogram_equalize ( scalemap, histogram, area, pmin, pmax,
color_levels, pixels )
unsigned char *scalemap; /* i/o: scalemap (for signed indexing) */
-@@ -42,8 +46,6 @@
+@@ -42,8 +46,6 @@ void histogram_equalize ( scalemap, hist
char *calloc_errchk();
int distribute_levels();
void generate_scalemap(), scan_histogram_for_peaks(), resolve_zeroes();
@@ -1424,9 +1424,9 @@
/* initialize link list */
linklist = (SubrangeLink *)calloc_errchk(10, sizeof(int), "HElink");
---- histlist.c.orig Sat Jun 22 05:58:44 1991
-+++ histlist.c Fri Jun 29 11:52:24 2007
-@@ -29,6 +29,12 @@
+--- histlist.c.orig 1991-06-21 22:58:44 UTC
++++ histlist.c
+@@ -29,6 +29,12 @@ static char SccsId[] = "%W% %G%";
* Subroutine: make_equalized_list
* Purpose: Distributing levels for a subrange section of the histogram
*/
@@ -1439,7 +1439,7 @@
void make_equalized_list ( histogram, list, low_entry, high_entry,
pixel_area, color_levels )
int *histogram;
-@@ -47,10 +53,6 @@
+@@ -47,10 +53,6 @@ void make_equalized_list ( histogram, li
int best_levels_under;
int best_average_over = 0; /* average_area used to get best_levels */
int best_average_under = 0;
@@ -1450,9 +1450,9 @@
/* else allocation distribution must first be determined */
/* run through histgram section making basic allocation and taking notes */
---- histmap.c.orig Fri Apr 20 23:00:13 1990
-+++ histmap.c Fri Jun 29 11:53:06 2007
-@@ -28,6 +28,9 @@
+--- histmap.c.orig 1990-04-20 15:00:13 UTC
++++ histmap.c
+@@ -28,6 +28,9 @@ static char SccsId[] = "%W% %G%";
* safely be applied.
* Note: The original link-list of groups is freed.
*/
@@ -1462,7 +1462,7 @@
void generate_scalemap ( hist, subrange, scalemap, pixels )
int *hist; /* i: histogram (for signed offsets) */
SubrangeLink *subrange; /* i: linklist of subranges */
-@@ -36,7 +39,6 @@
+@@ -36,7 +39,6 @@ void generate_scalemap ( hist, subrange,
{
int baselevel;
SubrangeLink *trash;
@@ -1470,7 +1470,7 @@
baselevel = 0;
while( subrange != 0 ) {
-@@ -54,6 +56,9 @@
+@@ -54,6 +56,9 @@ void generate_scalemap ( hist, subrange,
* Purpose: Make a section of scale map using histgroup link as guide
* Called by: make_HE_scalemap() in HistEqual.c
*/
@@ -1480,7 +1480,7 @@
static void
make_subrange_scalemap ( histogram, subrange, scalemap, baselevel, pixels )
int *histogram;
-@@ -67,7 +72,6 @@
+@@ -67,7 +72,6 @@ static void
unsigned char dispval;
char *calloc_errchk();
void make_equalized_list();
@@ -1488,7 +1488,7 @@
/* if only one level, make map section */
if( subrange->color_levels <= 1 ) {
-@@ -135,6 +139,10 @@
+@@ -135,6 +139,10 @@ static void list_to_map ( scalemap, hist
* Purpose: Allocate levels for a histogram subrange. Special process
* for situation when more levels than actually used values.
*/
@@ -1499,7 +1499,7 @@
static void make_gapped_list ( histogram, list, low, high, levels )
int *histogram;
SubrangeList *list;
-@@ -142,8 +150,6 @@
+@@ -142,8 +150,6 @@ static void make_gapped_list ( histogram
{
int range_j, max_range;
int levels_used;
@@ -1508,9 +1508,9 @@
levels_used =
first_shortlist_pass(histogram, list, low, high, levels,
---- histscan.c.orig Fri Apr 20 23:00:36 1990
-+++ histscan.c Fri Jun 29 11:53:29 2007
-@@ -21,6 +21,10 @@
+--- histscan.c.orig 1990-04-20 15:00:36 UTC
++++ histscan.c
+@@ -21,6 +21,10 @@ static char SccsId[] = "%W% %G%";
* Purpose: Scan the image histogram picking out large cell count values
* make sub-groups of the histogram between the large count levels
*/
@@ -1521,7 +1521,7 @@
void scan_histogram_for_peaks ( subrange, histogram,
pixel_area, map_levels, average )
SubrangeLink *subrange; /* i/o: link (initially covers range) */
-@@ -36,8 +40,6 @@
+@@ -36,8 +40,6 @@ void scan_histogram_for_peaks ( subrange
int sr_nzentries; /* l: number of non-zero entries in subrange */
int sr_pixel_area; /* l: number of pixels in current subrange */
int sr_max_peak; /* l: highest peak within current subrange */
@@ -1530,9 +1530,9 @@
/* set initial pixel_count values */
sr_pixel_area = 0;
---- histzero.c.orig Fri Apr 20 23:01:03 1990
-+++ histzero.c Fri Jun 29 11:53:39 2007
-@@ -23,13 +23,15 @@
+--- histzero.c.orig 1990-04-20 15:01:03 UTC
++++ histzero.c
+@@ -23,13 +23,15 @@ static char SccsId[] = "%W% %G%";
* Note: Adjoining groups are large count single level groups
* Called by: histrogram_equalize() above
*/
@@ -1549,9 +1549,9 @@
/* if very first entry is a zero allocated link */
if( PriorLink->color_levels == 0 ) {
---- imgcheck.c.orig Tue Mar 13 03:31:30 2001
-+++ imgcheck.c Fri Jun 29 11:54:08 2007
-@@ -46,13 +46,15 @@
+--- imgcheck.c.orig 2001-03-12 21:31:30 UTC
++++ imgcheck.c
+@@ -46,13 +46,15 @@ static char SccsId[] = "%W% %G%";
* Purpose: Do some consistency checks on image type and size
* Returns: 0 if no errors found, else -1
*/
@@ -1568,7 +1568,7 @@
extern int isfits();
ext = NULL;
-@@ -148,6 +150,9 @@
+@@ -148,6 +150,9 @@ int check_image ( img, got_status )
* Purpose: Check array size vs file size etc
* Returns: 0 if size determined and/or OK, else -1
*/
@@ -1578,7 +1578,7 @@
static int check_array ( img )
struct imageRec *img;
{
-@@ -156,7 +161,6 @@
+@@ -156,7 +161,6 @@ static int check_array ( img )
float posdim; /* possible dimension */
int headersize; /* size in bytes of header */
int rawsize;
@@ -1586,9 +1586,9 @@
/* get header size */
headersize = img->headersize;
---- imglogo.c.orig Fri Apr 27 00:31:48 1990
-+++ imglogo.c Fri Jun 29 11:54:27 2007
-@@ -372,13 +372,15 @@
+--- imglogo.c.orig 1990-04-26 16:31:48 UTC
++++ imglogo.c
+@@ -372,13 +372,15 @@ static unsigned char logo[LOGO_SZ] = {
* Subroutine: load_logo
* Purpose: place logo image in image buffer
*/
@@ -1605,9 +1605,9 @@
/* fill buffer with background color */
bufpt = shortbuf;
---- imgnew.c.orig Thu Oct 15 06:01:58 1998
-+++ imgnew.c Fri Jun 29 11:54:42 2007
-@@ -52,6 +52,9 @@
+--- imgnew.c.orig 1998-10-14 23:01:58 UTC
++++ imgnew.c
+@@ -52,6 +52,9 @@ extern struct windowRec desktop;
* Purpose: Create all image coordinate parameters from the beginning
* and take care of all that might be affected
*/
@@ -1617,7 +1617,7 @@
void new_display ( dispnow, clear, load, scale )
int dispnow; /* i: put-display-in-window-now flag */
int clear; /* i: clear img buf before reading flag */
-@@ -61,7 +64,6 @@
+@@ -61,7 +64,6 @@ void new_display ( dispnow, clear, load,
void set_disptran(), new_pancursor(), new_scalemap();
void combine_transform(), set_edges(), set_dispoff(), set_magnifier();
void adjust_cursor_coords(), map_dispbox(), disp_dispbox();
@@ -1625,9 +1625,9 @@
/* Set disp to img and disp to file transforms */
set_disptran(&coord);
---- imgtrans.c.orig Fri Apr 20 23:13:46 1990
-+++ imgtrans.c Fri Jun 29 11:55:10 2007
-@@ -26,6 +26,9 @@
+--- imgtrans.c.orig 1990-04-20 15:13:46 UTC
++++ imgtrans.c
+@@ -26,6 +26,9 @@ static char SccsId[] = "%W% %G%";
* 4-7 = flip y axis then rotate clockwise by (code - 4) * 90 degrees
* Called by: load_image() in ImageRead.c
*/
@@ -1637,7 +1637,7 @@
void rotate_buf ( buf, flip, rotcode, width, height, buf_squared, buf_doubled )
short *buf;
int flip;
-@@ -36,7 +39,6 @@
+@@ -36,7 +39,6 @@ void rotate_buf ( buf, flip, rotcode, wi
int maxdim;
void xflip_buf(), yflip_buf(), zflip_buf(), cwturn_buf(), ccwturn_buf();
void transfer_buf();
@@ -1645,9 +1645,9 @@
if( flip )
rotcode += 4;
---- irafcrd.c.orig Fri Apr 20 23:16:02 1990
-+++ irafcrd.c Fri Jun 29 11:55:49 2007
-@@ -45,13 +45,15 @@
+--- irafcrd.c.orig 1990-04-20 15:16:02 UTC
++++ irafcrd.c
+@@ -45,13 +45,15 @@ static char SccsId[] = "%W% %G%";
* If found and parsed, compute new transform for file coord.
* Returns: 1 if subsection found and parsed successfully, else 0
*/
@@ -1664,7 +1664,7 @@
void set_trans_speed(), combine_transform(), clear_coord_area();
if( parse_iraf_subsection(title, &xoff, &yoff, &block) == 0 ) {
-@@ -92,6 +94,10 @@
+@@ -92,6 +94,10 @@ int guess_true_file_coords ( title )
* Purpose: Parse for subsection and blocking from the image name
* Returns: 1 if subsection or blocking was used, else 0
*/
@@ -1675,7 +1675,7 @@
static int parse_iraf_subsection ( s, xoff, yoff, block )
char *s; /* i: file name */
int *xoff; /* o: x offset */
-@@ -99,8 +105,6 @@
+@@ -99,8 +105,6 @@ static int parse_iraf_subsection ( s, xo
int *block; /* o: block */
{
char *t, *u; /* temp char pointers */
@@ -1684,7 +1684,7 @@
/* seed the default values */
*xoff = 1;
-@@ -139,6 +143,9 @@
+@@ -139,6 +143,9 @@ static int parse_iraf_subsection ( s, xo
* Subroutine: get_subsection_offsets
* Purpose: parse subsection syntax for x and y offsets of subsection
*/
@@ -1694,7 +1694,7 @@
static void get_subsection_offsets ( s, xoff, yoff, is_qp )
char *s;
int *xoff, *yoff;
-@@ -147,7 +154,6 @@
+@@ -147,7 +154,6 @@ static void get_subsection_offsets ( s,
int x1, x2;
int y1, y2;
char *sy, *s2, *st;
@@ -1702,9 +1702,9 @@
/* if not qp, grab the initial x offset right after the '[' */
sy = fn_substr(s, ",");
---- irafimtl.c.orig Thu Feb 26 01:52:37 1998
-+++ irafimtl.c Fri Jun 29 11:56:14 2007
-@@ -46,6 +46,9 @@
+--- irafimtl.c.orig 1998-02-25 19:52:37 UTC
++++ irafimtl.c
+@@ -46,6 +46,9 @@ static char wcsbuf[SZ_WCSBUF];
* Subroutine: imtool_response
* Purpose: Read imtool messages from iraf (return 1 if pipe trouble)
*/
@@ -1714,7 +1714,7 @@
void imtool_response ( port, imhead, ndatabytes )
struct connectRec *port; /* i: struct of port for IRAF input */
struct imtoolRec *imhead; /* i: packet header, already read in */
-@@ -60,7 +63,6 @@
+@@ -60,7 +63,6 @@ void imtool_response ( port, imhead, nda
void set_curpos_to_iraf_trigger(), set_cursor_from_iraf(), imtool_output();
void set_imtool_scale(), set_cursor_to_iraf(), disp_subpiece();
void map_panbox(), disp_panbox(), send_curpos_to_iraf(), flush_connection();
@@ -1722,7 +1722,7 @@
switch( imhead->subunit & 077 ) {
case FEEDBACK:
-@@ -189,6 +191,9 @@
+@@ -189,6 +191,9 @@ void imtool_response ( port, imhead, nda
* Purpose: Reset buffer sizes, coordinate systems and parameters as
* needed.
*/
@@ -1732,7 +1732,7 @@
void imtool_newimage ( is_wcs, imhead )
int is_wcs;
struct imtoolRec *imhead;
-@@ -199,7 +204,6 @@
+@@ -199,7 +204,6 @@ void imtool_newimage ( is_wcs, imhead )
void set_disptran(), combine_transform(), set_edges(), set_dispoff();
void adjust_cursor_coords(), set_magnifier(), disp_subpiece(), set_tdisp();
void set_imtool_scale(), imtool_reinit(), new_pancursor();
@@ -1740,9 +1740,9 @@
/* set size and frame */
if( is_wcs )
---- irafio.c.orig Tue Oct 13 00:17:50 1992
-+++ irafio.c Fri Jun 29 11:56:48 2007
-@@ -102,6 +102,9 @@
+--- irafio.c.orig 1992-10-12 17:17:50 UTC
++++ irafio.c
+@@ -102,6 +102,9 @@ void rename_imtool_connection ( name, in
* Subroutine: imtool_output
* Purpose: Write image data back to iraf device channel
*/
@@ -1752,7 +1752,7 @@
void imtool_output ( imhead, odev, imagebuf, width, height )
struct imtoolRec *imhead;
struct connectRec *odev;
-@@ -116,7 +119,6 @@
+@@ -116,7 +119,6 @@ void imtool_output ( imhead, odev, image
int buferr = 0;
char fifobuf[SZ_FIFOBUF + 4];
int write_connection();
@@ -1760,7 +1760,7 @@
ndatabytes = -(int)imhead->thingct;
x = imhead->x & 077777;
-@@ -153,6 +155,9 @@
+@@ -153,6 +155,9 @@ void imtool_output ( imhead, odev, image
* Called by: imtool_response() in RemoteImtool.c
* Returns: -1 if read no bytes, 1 if trouble, else 0
*/
@@ -1770,7 +1770,7 @@
int imtool_input ( imhead, idev, readbuf, iwdth, owdth, y1, y2,
imagebuf, imbufsz )
struct imtoolRec *imhead;
-@@ -171,7 +176,6 @@
+@@ -171,7 +176,6 @@ int imtool_input ( imhead, idev, readbuf
int got, try, gotten;
short *obuf;
int read_connection();
@@ -1778,9 +1778,9 @@
/* get data count and packing type */
ndatavals = -(int)imhead->thingct;
---- irafpipe.c.orig Thu Feb 26 01:52:26 1998
-+++ irafpipe.c Fri Jun 29 11:57:01 2007
-@@ -33,6 +33,9 @@
+--- irafpipe.c.orig 1998-02-25 19:52:26 UTC
++++ irafpipe.c
+@@ -33,6 +33,9 @@ static char SccsId[] = "%W% %G%";
* Subroutine: read_imtool_packet()
* Purpose: event handler for packet input from iraf
*/
@@ -1790,7 +1790,7 @@
void read_imtool_packet( port )
struct connectRec *port;
{
-@@ -48,7 +51,6 @@
+@@ -48,7 +51,6 @@ void read_imtool_packet( port )
#endif
int read_connection();
void imtool_response(), swap_bytes();
@@ -1798,9 +1798,9 @@
/* read the header */
bytes = read_connection(port, (char *)&imhead, sizeof(struct imtoolRec));
---- maininit.c.orig Tue Dec 2 05:21:35 2003
-+++ maininit.c Fri Jun 29 11:57:26 2007
-@@ -76,11 +76,13 @@
+--- maininit.c.orig 2003-12-01 23:21:35 UTC
++++ maininit.c
+@@ -76,11 +76,13 @@ Display *display; /* display connection
* Xlib calls: XSetErrorHandler()
* UNIX calls: setrlimit()
*/
@@ -1815,7 +1815,7 @@
void crash_on_error(), control_event_loop();
void say_goodbye();
-@@ -141,13 +143,15 @@
+@@ -141,13 +143,15 @@ void say_goodbye ( code )
* Purpose: Initialize parameters in the records
* Note: Resource or default file not yet used
*/
@@ -1832,9 +1832,9 @@
int parse_cmdline(), check_image();
void say_goodbye(), init_connections();
---- mainkey.c.orig Thu Sep 25 05:38:25 2003
-+++ mainkey.c Fri Jun 29 11:58:47 2007
-@@ -87,6 +87,9 @@
+--- mainkey.c.orig 2003-09-24 22:38:25 UTC
++++ mainkey.c
+@@ -87,6 +87,9 @@ static double oldypix = 0.0;
static double oldxpos, oldypos;
@@ -1844,7 +1844,7 @@
void
key_response()
{
-@@ -110,7 +113,6 @@
+@@ -110,7 +113,6 @@ key_response()
void print_center(), print_cursor();
void move_pointer();
void get_cursor_pos();
@@ -1852,9 +1852,9 @@
void toggle_region_visibility(), toggle_region_labeling();
double xbuf, ybuf, xfile, yfile;
double newxpos, newypos, distance;
---- mgfyctrl.c.orig Fri May 7 02:47:12 1999
-+++ mgfyctrl.c Fri Jun 29 11:59:53 2007
-@@ -45,12 +45,14 @@
+--- mgfyctrl.c.orig 1999-05-06 19:47:12 UTC
++++ mgfyctrl.c
+@@ -45,12 +45,14 @@ extern struct magRec magset;
* Purpose: Magnify location of a dispbox event
* Xlib calls: XCheckWindowEvent(), XSync()
*/
@@ -1870,7 +1870,7 @@
/* get only the most recent mouse moved event */
XSync(dispbox.display, 0);
-@@ -132,6 +134,9 @@
+@@ -132,6 +134,9 @@ void redraw_magnifier ( )
* Purpose: Show pointer coordinates and image value in display window
* Xlib calls: XDrawImageString()
*/
@@ -1880,7 +1880,7 @@
static void label_file_coords ( bufX, bufY )
double bufX, bufY;
{
-@@ -142,7 +147,6 @@
+@@ -142,7 +147,6 @@ static void label_file_coords ( bufX, bu
float fileX, fileY;
GC gc, set_edit_gc();
void d_transform();
@@ -1888,7 +1888,7 @@
static int lwcs0 = 0;
static int lpix0 = 0;
int i;
-@@ -289,6 +293,9 @@
+@@ -289,6 +293,9 @@ void clear_coord_area ()
* but has not been refined for the val section.
* Xlib call: XDrawImageString()
*/
@@ -1898,7 +1898,7 @@
static void label_file_coords_proportional ( bufX, bufY )
double bufX, bufY;
{
-@@ -297,7 +304,6 @@
+@@ -297,7 +304,6 @@ static void label_file_coords_proportion
float fileX, fileY;
GC gc, set_edit_gc();
void d_transform();
@@ -1906,9 +1906,9 @@
gc = set_edit_gc(magset.text.font,
magset.text.foreground, magset.text.background);
---- mgfytabl.c.orig Thu Jul 9 23:28:28 1998
-+++ mgfytabl.c Fri Jun 29 12:00:33 2007
-@@ -30,6 +30,10 @@
+--- mgfytabl.c.orig 1998-07-09 16:28:28 UTC
++++ mgfytabl.c
+@@ -30,6 +30,10 @@ static char SccsId[] = "%W% %G%";
* coordinates
* Note: Uses event coords in control struct (control.event.xkey)
*/
@@ -1919,7 +1919,7 @@
void print_table ()
{
int bufx, bufy;
-@@ -39,8 +43,6 @@
+@@ -39,8 +43,6 @@ void print_table ()
int table_size;
int col_width;
int rot;
@@ -1928,9 +1928,9 @@
/* determine the buffer coordinates of the event */
if( get_key_buf_coords(&control.event.xkey, &bufx, &bufy) == 0 ) {
---- pancrsr.c.orig Wed May 2 14:49:17 1990
-+++ pancrsr.c Fri Jun 29 12:01:31 2007
-@@ -45,13 +45,15 @@
+--- pancrsr.c.orig 1990-05-02 06:49:17 UTC
++++ pancrsr.c
+@@ -45,13 +45,15 @@ void draw_pancursor ( )
* Subroutine: new_pancursor
* Purpose: Create and draw panbox cursor given image coordinates
*/
@@ -1947,9 +1947,9 @@
if( pancur_present ) {
/* erase the old box if it was visible */
---- panimage.c.orig Sat Apr 21 00:17:38 1990
-+++ panimage.c Fri Jun 29 12:01:53 2007
-@@ -45,12 +45,14 @@
+--- panimage.c.orig 1990-04-20 16:17:38 UTC
++++ panimage.c
+@@ -45,12 +45,14 @@ void disp_panbox ( )
* Subroutine: map_panbox
* Purpose: Fill the panbox display buffer, mapping from its short buffer
*/
@@ -1968,9 +1968,9 @@
void panimage_halftone();
if( color.ncolors <= 1 ) {
---- prntcent.c.orig Sat Aug 21 05:18:40 1999
-+++ prntcent.c Fri Jun 29 12:41:46 2007
-@@ -36,6 +36,11 @@
+--- prntcent.c.orig 1999-08-20 22:18:40 UTC
++++ prntcent.c
+@@ -36,6 +36,11 @@ static char SccsId[] = "%W% %G%";
* Returns 1 if successful, else 0
* Note: Uses event coords in control struct (control.event.xkey)
*/
@@ -1982,7 +1982,7 @@
void
print_center ( xc, yc )
-@@ -59,9 +64,6 @@
+@@ -59,9 +64,6 @@ double *xc, *yc; /* Returned centroided
int xfile, yfile;
char string[64];
int lstr = 48;
@@ -1992,9 +1992,9 @@
void d_trans();
int iswcs();
---- prntcurs.c.orig Thu Jan 17 04:54:18 2002
-+++ prntcurs.c Fri Jun 29 12:41:28 2007
-@@ -31,12 +31,14 @@
+--- prntcurs.c.orig 2002-01-16 22:54:18 UTC
++++ prntcurs.c
+@@ -31,12 +31,14 @@ static char SccsId[] = "%W% %G%";
* Subroutine: print_cursor
* Purpose: print location of a dispbox event
*/
@@ -2010,9 +2010,9 @@
(void)get_cursor_pos (event, &bufx, &bufy, &filex, &filey );
(void)print_file_value ( bufx, bufy, filex, filey );
---- readarr.c.orig Tue Feb 23 20:05:41 1999
-+++ readarr.c Fri Jun 29 12:02:06 2007
-@@ -28,6 +28,9 @@
+--- readarr.c.orig 1999-02-23 14:05:41 UTC
++++ readarr.c
+@@ -28,6 +28,9 @@ static char SccsId[] = "%W% %G%";
* Purpose: Read array data from a file
* Note: Assumes file was tested benignly, exits here if trouble
*/
@@ -2022,7 +2022,7 @@
void read_array ( fd, img, imgbuf, filebuf, width, height, X, Y, block,
verbose )
int fd; /* if >=0 handle to open & ready image file */
-@@ -40,7 +43,6 @@
+@@ -40,7 +43,6 @@ void read_array ( fd, img, imgbuf, fileb
int verbose; /* whether to print explanatory messages */
{
int vals;
@@ -2030,9 +2030,9 @@
int image_start;
int open_disk(), lseek_disk();
void close_disk();
---- readfith.c.orig Tue Sep 29 22:40:06 1998
-+++ readfith.c Fri Jun 29 12:02:34 2007
-@@ -46,6 +46,9 @@
+--- readfith.c.orig 1998-09-29 15:40:06 UTC
++++ readfith.c
+@@ -46,6 +46,9 @@ static char SccsId[] = "%W% %G%";
* Purpose: Find important FITS parameters in FITS header
* Returns: 1 if success, else 0
*/
@@ -2042,7 +2042,7 @@
int read_fitsheader ( header, length, bitpix, naxis, naxes, scale, bias )
char *header;
int length;
-@@ -55,7 +58,6 @@
+@@ -55,7 +58,6 @@ int read_fitsheader ( header, length, bi
float *scale;
float *bias;
{
@@ -2050,7 +2050,7 @@
struct WorldCoor *wcsinit();
char *header0;
header0 = header;
-@@ -144,6 +146,9 @@
+@@ -144,6 +146,9 @@ static int get_keyint ( header, keyword,
* Purpose: Return the float value in the data field for a given FITS
* header keyword. If key not found, return 0.
*/
@@ -2060,7 +2060,7 @@
static int get_keyfloat ( header, keyword, length, val, report_error)
char *header; /* buffer start */
char *keyword; /* keyword to match */
-@@ -153,7 +158,6 @@
+@@ -153,7 +158,6 @@ static int get_keyfloat ( header, keywor
{
int key_not_end;
int i;
@@ -2068,9 +2068,9 @@
void no_fitscomment();
key_not_end = (strncmp(keyword, "END ", 8) != 0);
---- rgnanli.c.orig Sat Apr 21 00:25:03 1990
-+++ rgnanli.c Fri Jun 29 12:02:53 2007
-@@ -89,14 +89,16 @@
+--- rgnanli.c.orig 1990-04-20 16:25:03 UTC
++++ rgnanli.c
+@@ -89,14 +89,16 @@ void new_annulus_edge ( cursor )
* Note: "vala valb valc ..." and "val1 val2 n=int" are both
* permitted syntax forms
*/
@@ -2089,9 +2089,9 @@
char *next_token();
i = 0;
---- rgndraw.c.orig Tue Dec 1 03:46:40 1998
-+++ rgndraw.c Fri Jun 29 12:04:06 2007
-@@ -115,12 +115,14 @@
+--- rgndraw.c.orig 1998-11-30 21:46:40 UTC
++++ rgndraw.c
+@@ -115,12 +115,14 @@ void disp_regions ( cursor )
* Subroutine: disp_region
* Purpose: Draw one saved cursor region and its labels
*/
@@ -2108,7 +2108,7 @@
if( rgdraw.visible && (region != NULL) ) {
gc = set_region_gc(region);
-@@ -215,11 +217,13 @@
+@@ -215,11 +217,13 @@ static void draw_region_label ( string,
* Purpose: Draw one saved cursor region outline or point index
* Note: gc is already set, hence NULL GCspec in draw calls
*/
@@ -2123,7 +2123,7 @@
void draw_annuli(), draw_cursor();
if( region->type != COP_Point ) {
-@@ -246,12 +250,14 @@
+@@ -246,12 +250,14 @@ static void draw_region ( region, gc )
/*
* Subroutine: label_annuli
*/
@@ -2139,7 +2139,7 @@
/* apply label to outer annulus */
annulus = region;
-@@ -268,6 +274,10 @@
+@@ -268,6 +274,10 @@ static void label_annuli ( region, gc )
* Purpose: Draw one region's label line and text for center and edge
* Xlib calls: XDrawLine()
*/
@@ -2150,7 +2150,7 @@
static void label_region ( region, gc )
struct cursorRec *region;
GC gc;
-@@ -277,8 +287,6 @@
+@@ -277,8 +287,6 @@ static void label_region ( region, gc )
char edge_string[132];
int len;
int exclude;
@@ -2159,9 +2159,9 @@
/* if label not requested or don't know how to label or will another part */
if( (!rgdraw.label) || (region->type == COP_Polygon) )
---- rgndrop.c.orig Sat Apr 21 00:31:38 1990
-+++ rgndrop.c Fri Jun 29 12:04:34 2007
-@@ -64,14 +64,16 @@
+--- rgndrop.c.orig 1990-04-20 16:31:38 UTC
++++ rgndrop.c
+@@ -64,14 +64,16 @@ void unsave_region ( cursor, dead_meat )
* cursors enclose one or two digit label but have 0 area).
* In case of equal areas (i.e. points), closer center is used.
*/
@@ -2180,7 +2180,7 @@
chosen = NULL;
region = cursor->next_region;
-@@ -115,13 +117,15 @@
+@@ -115,13 +117,15 @@ static int closer_to_center ( challenger
* Subroutine: is_inside_region
* Purpose: Determine if mouse is within a region
*/
@@ -2197,9 +2197,9 @@
if( region->type == COP_Polygon )
return( pointer_is_inside_polygon((double)x, (double)y,
---- rgnwpros.c.orig Wed Jan 9 10:57:30 1991
-+++ rgnwpros.c Fri Jun 29 12:29:12 2007
-@@ -45,11 +45,13 @@
+--- rgnwpros.c.orig 1991-01-09 03:57:30 UTC
++++ rgnwpros.c
+@@ -45,11 +45,13 @@ static char SccsId[] = "%W% %G%";
* Purpose: Write ROSAT PROS style region description to file
* Method: Recurse first to start writing from end of link list
*/
@@ -2214,7 +2214,7 @@
/* Check for pointer before doing anything */
if( region == NULL )
-@@ -84,13 +86,15 @@
+@@ -84,13 +86,15 @@ void write_region_pros ( fd, region )
/* Subroutine: cat_shape
* Purpose: Put simple PROS description of given cursor in line buffer
*/
@@ -2231,7 +2231,7 @@
switch( region->type ) {
case COP_Box:
-@@ -205,12 +209,14 @@
+@@ -205,12 +209,14 @@ static void cat_cen ( region, line )
* Subroutine: cat_polypts
* Purpose: Add list of point coordinates to line buffer (for polygon)
*/
@@ -2247,7 +2247,7 @@
cat_pt((double)region->poly[0].fileX, (double)region->poly[0].fileY,
line, 0);
-@@ -254,12 +260,14 @@
+@@ -254,12 +260,14 @@ static void cat_pt ( x, y, line, comma )
* Purpose: Put a PROS style description of circular annuli on the
* line buffer
*/
@@ -2263,7 +2263,7 @@
(void)strcat(line, "ANNULUS(");
cat_cen(region, line);
-@@ -275,14 +283,16 @@
+@@ -275,14 +283,16 @@ static void cat_annulus ( region, line )
* Subroutine: write_annuli
* Purpose: Write PROS type description to produce annuli of given shapes
*/
@@ -2282,7 +2282,7 @@
/* annuli start with next_annulus (base region is not one of them) */
if( (annulus = region->next_annulus) != NULL ) {
-@@ -309,11 +319,13 @@
+@@ -309,11 +319,13 @@ static void write_annuli ( region, line,
* Purpose: Add outer shape anded with not of inner shape to make
* an annular ring
*/
@@ -2297,9 +2297,9 @@
if( region->next_annulus != NULL ) {
if( region->exclude_region )
---- rgnwrite.c.orig Fri Jun 29 12:42:50 2007
-+++ rgnwrite.c Fri Jun 29 12:29:47 2007
-@@ -58,6 +58,9 @@
+--- rgnwrite.c.orig 1995-09-08 22:29:19 UTC
++++ rgnwrite.c
+@@ -58,6 +58,9 @@ EditStruct *region_edit;
* Subroutine: write_regions
* Purpose: Write region info to a file
*/
@@ -2309,7 +2309,7 @@
void write_regions ( cursor, image, output_type )
struct cursorRec *cursor;
struct imageRec *image;
-@@ -66,7 +69,6 @@
+@@ -66,7 +69,6 @@ void write_regions ( cursor, image, outp
FILE *fd;
static int last_output_type = 0;
char fname[SZ_FNAME];
@@ -2317,7 +2317,7 @@
int open_output_file();
EditStruct *init_edit_popup();
void set_path_iraf(), write_region_pros(), load_edit_struct(), timestamp();
-@@ -146,13 +148,15 @@
+@@ -146,13 +148,15 @@ static void write_region_imtool ( fd, re
* Subroutine: timestamp
* Purpose: Write date and filename (if known) to region file
*/
@@ -2334,9 +2334,9 @@
/* timestamp the first entry in the output file. */
set_time_string (line);
---- sclctrl.c.orig Thu Oct 10 22:55:57 1996
-+++ sclctrl.c Fri Jun 29 12:30:24 2007
-@@ -70,6 +70,9 @@
+--- sclctrl.c.orig 1996-10-10 15:55:57 UTC
++++ sclctrl.c
+@@ -70,6 +70,9 @@ void select_scalemap ()
* Subroutine: new_scalemap
* Purpose: Scalemap calculation for a new image
*/
@@ -2346,7 +2346,7 @@
void new_scalemap ( )
{
static double cmdMin = 0.0;
-@@ -78,7 +81,6 @@
+@@ -78,7 +81,6 @@ void new_scalemap ( )
static int max_given = 0;
static int imtool_200 = 0;
static int init = 1; /* identify first time called */
@@ -2354,9 +2354,9 @@
void make_scalemap(), color_logo();
#ifdef IMTOOL
void set_imtool_colors();
---- sclmap.c.orig Tue Oct 25 21:25:02 1994
-+++ sclmap.c Fri Jun 29 12:30:47 2007
-@@ -36,11 +36,13 @@
+--- sclmap.c.orig 1994-10-25 15:25:02 UTC
++++ sclmap.c
+@@ -36,11 +36,13 @@ static char SccsId[] = "%W% %G%";
* Note: Map goes from image value to hardware value (through ideal
* map value using pixels array from XAllocColors)
*/
@@ -2371,7 +2371,7 @@
/* note the range of data for which mapping is to be calculated */
if( image_max == image_min )
-@@ -105,6 +107,9 @@
+@@ -105,6 +107,9 @@ void make_scalemap ( image_min, image_ma
* Subroutine: linear_scale
* Purpose: Distribute color levels in the map evenly
*/
@@ -2381,7 +2381,7 @@
static void linear_scale ( image_min, image_max )
int image_min, image_max; /* i: limits of values in display */
{
-@@ -118,7 +123,6 @@
+@@ -118,7 +123,6 @@ static void linear_scale ( image_min, im
register int imageval;
register int pixval;
register int imagelim;
@@ -2389,9 +2389,9 @@
range_min = image_min;
range_max = image_max;
---- wndwconf.c.orig Sat Jan 21 06:27:13 1995
-+++ wndwconf.c Fri Jun 29 12:40:29 2007
-@@ -55,9 +55,11 @@
+--- wndwconf.c.orig 1995-01-21 00:27:13 UTC
++++ wndwconf.c
+@@ -55,9 +55,11 @@ static unsigned int geo_width, geo_heigh
* Method: The size can be given or set to norm. If given but less
* than min (i.e. 0,0) it becomes the minimum configuration.
*/
@@ -2404,9 +2404,9 @@
desktop.hints.min_width =
(2 * desktop.xzero) + (2 * dispbox.bdrwidth) + dispbox.hints.min_width;
---- wndwinit.c.orig Sat Dec 15 05:19:23 2001
-+++ wndwinit.c Fri Jun 29 12:41:01 2007
-@@ -53,11 +53,13 @@
+--- wndwinit.c.orig 2001-12-14 23:19:23 UTC
++++ wndwinit.c
+@@ -53,11 +53,13 @@ static char **cmd_argv; /* i: command l
* Uses: create_window() in WndwCreate.c
* Xlib calls: DisplayWidth(), DisplayHeight();
*/
@@ -2421,7 +2421,7 @@
void init_desktop(), create_window();
/* set display screen parameters for all to see */
-@@ -81,9 +83,11 @@
+@@ -81,9 +83,11 @@ void init_windows1 ( argc, argv )
* Uses: configure_windows() in WndwConfig.c
* Uses: get_window_dimensions(), create_window() in WndwCreate.c
*/
@@ -2434,7 +2434,7 @@
void get_window_dimensions(), configure_windowgroup(), create_window();
/* install runtime environment parameters for all windows */
-@@ -175,11 +179,13 @@
+@@ -175,11 +179,13 @@ void raise_windows ( )
* Subroutine: init_window_basics, set_window_basics
* Purpose: Set the runtime environment parameters
*/
@@ -2449,9 +2449,9 @@
ximage = XCreateImage(desktop.display, color.visual, color.screen_depth,
dispbox.image.format, 0, malloc(4), 2, 2,
---- wndwmaus.c.orig Thu Dec 20 04:06:46 2001
-+++ wndwmaus.c Fri Jun 29 12:41:12 2007
-@@ -61,11 +61,13 @@
+--- wndwmaus.c.orig 2001-12-19 22:06:46 UTC
++++ wndwmaus.c
+@@ -61,11 +61,13 @@ static Cursor keycursor;
* Subroutine: init_mousepointers
* Purpose: Set up the various mouse pointer icons for all windows
*/
diff --git a/astro/saoimage/files/patch-makefile.FreeBSD b/astro/saoimage/files/patch-makefile.FreeBSD
index d897bf4e5ea1..b9c3ad9da248 100644
--- a/astro/saoimage/files/patch-makefile.FreeBSD
+++ b/astro/saoimage/files/patch-makefile.FreeBSD
@@ -1,5 +1,5 @@
---- makefile.FreeBSD.orig Thu Sep 20 06:27:49 2001
-+++ makefile.FreeBSD Wed Jul 24 01:12:35 2002
+--- makefile.FreeBSD.orig 2003-04-01 17:34:57 UTC
++++ makefile.FreeBSD
@@ -36,9 +36,9 @@
# FBCONFIG_2, which is set to the value of IMTOOLRC in the definition of
# the CFLAGS macro below.)
@@ -13,7 +13,7 @@
IMTOOLRC = $(IMTRCDIR)imtoolrc
FIFO_I = $(ROOT)/dev/imt1i
-@@ -46,7 +46,7 @@
+@@ -46,7 +46,7 @@ FIFO_O = $(ROOT)/dev/imt1o
FIFO_LN = $(ROOT)/dev/imt1
# Compiler specification.
@@ -22,7 +22,7 @@
# Uncomment these two lines to compile with gcc (add any optimizers you wish).
#CC = gcc -finline-functions -fdelayed-branch -fstrength-reduce
# Delayed branches could win big on RISC: many inner loops have branches
-@@ -76,12 +76,12 @@
+@@ -76,12 +76,12 @@ MFLAGS = -DLSB -DSUN -DPSCRIPT -DQUIT
# OFLAGS: compiler optimization/debug options.
#OFLAGS = -g -DDEBUG
@@ -37,7 +37,7 @@
# Libraries that move about or may require special specification.
#
-@@ -89,7 +89,7 @@
+@@ -89,7 +89,7 @@ ADFLAGS = -I/usr/X11R6/include
# usual link search path, i.e., it is not in /usr/lib, it may be necessary
# to specify its path fully in XLIB.
@@ -46,7 +46,7 @@
#XLIB = -L/usr/X11R6/lib -lX11 # ATTENTION: OpenWindows users...
#F77LIB = -lF77 -lI77 -lU77
F77LIB = -lf2c
-@@ -307,7 +307,7 @@
+@@ -307,7 +307,7 @@ tape:
$(MAKE) ARCFILE=$(TAPEDEV) tar
@@ -55,7 +55,7 @@
STRUCT = hfiles/struct.h hfiles/buffer.h hfiles/color.h hfiles/control.h \
hfiles/coord.h hfiles/cursor.h hfiles/image.h hfiles/window.h
WORKS = $(XLIBH) $(STRUCT) hfiles/constant.h hfiles/extern.h $(WCSH)
-@@ -419,8 +419,8 @@
+@@ -419,8 +419,8 @@ maininit.o : $(XLIBH) $(STRUCT) hfiles/c
defs/dispbox.def defs/magnibox.def defs/panbox.def \
defs/btnbox.def defs/colorbox.def defs/graphbox.def \
defs/desktop.def defs/cursor.def
diff --git a/astro/saoimage/files/patch-rgnwrite.c b/astro/saoimage/files/patch-rgnwrite.c
index 6ea9d650d091..7ec00f613021 100644
--- a/astro/saoimage/files/patch-rgnwrite.c
+++ b/astro/saoimage/files/patch-rgnwrite.c
@@ -1,6 +1,6 @@
---- rgnwrite.c.orig Sun Jan 16 23:54:54 2000
-+++ rgnwrite.c Sun Jan 16 23:55:51 2000
-@@ -183,7 +183,7 @@
+--- rgnwrite.c.orig 1995-09-08 22:29:19 UTC
++++ rgnwrite.c
+@@ -183,7 +183,7 @@ static void set_time_string ( time_strin
#ifdef LONG64
int time();
#else
diff --git a/astro/stars/files/patch-main.c b/astro/stars/files/patch-main.c
index 96b2fb126efc..104f04f04bac 100644
--- a/astro/stars/files/patch-main.c
+++ b/astro/stars/files/patch-main.c
@@ -1,6 +1,6 @@
---- main.c.orig 1996-04-10 12:58:49.000000000 +0200
-+++ main.c 2011-12-20 20:04:16.146176426 +0100
-@@ -48,7 +48,7 @@
+--- main.c.orig 1996-04-10 10:58:49 UTC
++++ main.c
+@@ -48,7 +48,7 @@ void setup();
void events();
void shutdn();
@@ -9,7 +9,7 @@
{
setup();
events();
-@@ -241,37 +241,37 @@
+@@ -241,37 +241,37 @@ void events()
XQueryKeymap(xgh.display, keys);
diff --git a/astro/sunclock/files/patch-readpng.c b/astro/sunclock/files/patch-readpng.c
index 1481473bc696..9b3ce86736c2 100644
--- a/astro/sunclock/files/patch-readpng.c
+++ b/astro/sunclock/files/patch-readpng.c
@@ -1,6 +1,6 @@
---- readpng.c.orig 2005-10-23 21:36:29.000000000 +0200
-+++ readpng.c 2010-03-29 14:14:22.000000000 +0200
-@@ -57,7 +57,7 @@
+--- readpng.c.orig 2005-10-23 19:36:29 UTC
++++ readpng.c
+@@ -57,7 +57,7 @@ TestPNG(char *file) /* gets called a LO
fread(header, 1, 8, fp);
fclose(fp);
diff --git a/astro/sunclock/files/patch-sunclock.c b/astro/sunclock/files/patch-sunclock.c
index c3e9135f0983..c103f3cea252 100644
--- a/astro/sunclock/files/patch-sunclock.c
+++ b/astro/sunclock/files/patch-sunclock.c
@@ -1,4 +1,4 @@
---- sunclock.c
+--- sunclock.c.orig 2008-08-07 12:40:24 UTC
+++ sunclock.c
@@ -113,7 +113,6 @@
#include <stdlib.h>
@@ -16,7 +16,7 @@
#ifdef NEW_CTIME
extern char * timezone();
#endif
-@@ -2197,8 +2195,8 @@
+@@ -2197,8 +2195,8 @@ struct Sundata * Context;
if (!Context->mark1.city) return;
@@ -27,7 +27,7 @@
/* Get local time at given location */
setTZ(Context->mark1.city);
-@@ -2335,20 +2333,11 @@
+@@ -2335,20 +2333,11 @@ struct Sundata * Context;
char s[128];
char slat[20], slon[20], slatp[20], slonp[20];
double dist;
@@ -50,7 +50,7 @@
if (!Context->wintype) {
char num[80];
-@@ -2696,7 +2685,7 @@
+@@ -2696,7 +2685,7 @@ int build;
Context->bits = 0;
Context->flags.update = 4;
@@ -59,7 +59,7 @@
Context->projtime = -1L;
Context->roottime = -1L;
Context->animtime = -1L;
-@@ -3918,7 +3907,7 @@
+@@ -3918,7 +3907,7 @@ struct Sundata * Context;
if (button_pressed) return;
@@ -68,7 +68,7 @@
erase_obj = 1;
if (Context->flags.colorlevel == MONOCHROME ||
-@@ -3926,10 +3915,10 @@
+@@ -3926,10 +3915,10 @@ struct Sundata * Context;
drawSunAndMoon(Context);
erase_obj = 0;
@@ -81,7 +81,7 @@
&Context->moondec, &Context->moonlon,
&junk, &junk, &junk, &junk, &junk, &junk );
Context->moonlon = fixangle(Context->moonlon+180.0) - 180.0;
-@@ -3946,10 +3935,10 @@
+@@ -3946,10 +3935,10 @@ struct Sundata * Context;
update the illuminated area on the screen. */
if (Context->projtime < 0 ||
@@ -94,7 +94,7 @@
Context->noon = noon;
Context->fnoon = fnoon;
moveNightArea(Context);
-@@ -4557,8 +4546,8 @@
+@@ -4557,8 +4546,8 @@ int dy[5] = { 0, 1, -1, 0, 0};
hw = Context->geom.height;
if (do_root == 2) hw += Context->hstrip;
@@ -105,7 +105,7 @@
else
if (do_root == 2 && mode==0 && rootpix) update = 0;
-@@ -4569,7 +4558,7 @@
+@@ -4569,7 +4558,7 @@ int dy[5] = { 0, 1, -1, 0, 0};
XSetForeground(dpy, Context->gdata->wingc,
Context->gdata->pixel[ROOTCOLOR]);
XFillRectangle(dpy, rootpix, Context->gdata->wingc, 0, 0, wr, hr);
@@ -114,7 +114,7 @@
if (random_rootpos) {
rootdx = (double)(random() % 10001)/10000.0;
rootdy = (double)(random() % 10001)/10000.0;
-@@ -5542,7 +5531,7 @@
+@@ -5542,7 +5531,7 @@ KeySym keysym;
Context->flags.update = 2;
break;
case XK_w:
@@ -123,7 +123,7 @@
if (do_menu) do_menu = -1;
if (do_filesel) do_filesel = -1;
if (do_zoom) do_zoom = -1;
-@@ -5958,9 +5947,9 @@
+@@ -5958,9 +5947,9 @@ struct Sundata * Context;
drawImageToRootWindow(Context, 0);
XFlush(dpy);
if (Context->flags.animate) {
diff --git a/astro/sunclock/files/patch-sunclock.h b/astro/sunclock/files/patch-sunclock.h
index 5c74ebaf16ea..1136c9a724e0 100644
--- a/astro/sunclock/files/patch-sunclock.h
+++ b/astro/sunclock/files/patch-sunclock.h
@@ -1,8 +1,8 @@
---- sunclock.h.orig Sat Jul 21 11:49:41 2001
-+++ sunclock.h Sat Dec 8 21:28:41 2001
-@@ -224,7 +224,7 @@
- unsigned char * daypixel; /* pointer to day pixels */
+--- sunclock.h.orig 2006-10-14 14:25:18 UTC
++++ sunclock.h
+@@ -238,7 +238,7 @@ typedef struct Sundata {
unsigned char * nightpixel; /* pointer to night pixels */
+ Pixel *vmfpixels; /* list of additional vmf pixels */
int ncolors; /* number of colors in day pixels */
- long time; /* time - real or fake, see flags */
+ time_t footime; /* time - real or fake, see flags */
diff --git a/astro/sunclock/files/patch-tildepath.c b/astro/sunclock/files/patch-tildepath.c
index ba98770cd368..4be22d0792b3 100644
--- a/astro/sunclock/files/patch-tildepath.c
+++ b/astro/sunclock/files/patch-tildepath.c
@@ -1,6 +1,6 @@
---- tildepath.c.orig Fri Aug 24 07:06:53 2001
-+++ tildepath.c Fri Aug 24 07:06:59 2001
-@@ -38,7 +38,6 @@
+--- tildepath.c.orig 2000-09-01 15:34:51 UTC
++++ tildepath.c
+@@ -38,7 +38,6 @@ T* AUTHOR
#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>
diff --git a/astro/sunclock/files/patch-widgets.c b/astro/sunclock/files/patch-widgets.c
index e15c78a91f13..82bb0345b739 100644
--- a/astro/sunclock/files/patch-widgets.c
+++ b/astro/sunclock/files/patch-widgets.c
@@ -1,5 +1,5 @@
---- widgets.c.orig 2011-07-09 18:51:18.000000000 +0900
-+++ widgets.c 2012-08-14 04:13:36.000000000 +0900
+--- widgets.c.orig 2011-07-09 09:51:18 UTC
++++ widgets.c
@@ -1,6 +1,5 @@
#include <unistd.h>
#include <sys/types.h>
diff --git a/astro/wcslib/files/patch-GNUmakefile b/astro/wcslib/files/patch-GNUmakefile
index a8e7c2b92dca..4d68d7f7293f 100644
--- a/astro/wcslib/files/patch-GNUmakefile
+++ b/astro/wcslib/files/patch-GNUmakefile
@@ -1,6 +1,6 @@
---- GNUmakefile.orig 2012-03-14 13:40:38.000000000 +0600
-+++ GNUmakefile 2012-05-05 17:48:54.102866059 +0600
-@@ -81,26 +81,14 @@
+--- GNUmakefile.orig 2016-04-05 12:55:12 UTC
++++ GNUmakefile
+@@ -81,26 +81,14 @@ install :
$(MAKE) -k -C $$DIR $@ ; \
done
$(INSTALL) -m 444 wcsconfig.h wcsconfig_f77.h $(INCDIR)
diff --git a/astro/wmmoonclock/files/patch-Makefile b/astro/wmmoonclock/files/patch-Makefile
index 82c272ebcf27..90f3f3c0b3b8 100644
--- a/astro/wmmoonclock/files/patch-Makefile
+++ b/astro/wmmoonclock/files/patch-Makefile
@@ -1,21 +1,16 @@
-*** Makefile.orig Tue Mar 23 11:20:32 1999
---- Makefile Sun Nov 28 18:20:02 1999
-***************
-*** 1,8 ****
-! CC = gcc
-! CFLAGS = -O2
-! INCDIR = -I/usr/X11R6/include/X11
-! DESTDIR= /usr/X11R6
-! LIBDIR = -L/usr/X11R6/lib
-
- # for Linux
- LIBS = -lXpm -lX11 -lXext
---- 1,8 ----
-! CC ?= gcc
-! CFLAGS ?= -O2
-! INCDIR = -I${LOCALBASE}/include
-! DESTDIR= ${PREFIX}
-! LIBDIR = -L${LOCALBASE}/lib
-
- # for Linux
- LIBS = -lXpm -lX11 -lXext
+--- Makefile.orig 1999-03-23 02:20:32 UTC
++++ Makefile
+@@ -1,8 +1,8 @@
+-CC = gcc
+-CFLAGS = -O2
+-INCDIR = -I/usr/X11R6/include/X11
+-DESTDIR= /usr/X11R6
+-LIBDIR = -L/usr/X11R6/lib
++CC ?= gcc
++CFLAGS ?= -O2
++INCDIR = -I${LOCALBASE}/include
++DESTDIR= ${PREFIX}
++LIBDIR = -L${LOCALBASE}/lib
+
+ # for Linux
+ LIBS = -lXpm -lX11 -lXext
diff --git a/astro/wmmoonclock/files/patch-wmMoonClock.c b/astro/wmmoonclock/files/patch-wmMoonClock.c
index edec5c503d21..0370a73fd733 100644
--- a/astro/wmmoonclock/files/patch-wmMoonClock.c
+++ b/astro/wmmoonclock/files/patch-wmMoonClock.c
@@ -1,6 +1,6 @@
---- wmMoonClock.c.orig Thu Aug 15 18:15:26 2002
-+++ wmMoonClock.c Thu Aug 15 18:15:51 2002
-@@ -162,7 +162,8 @@
+--- wmMoonClock.c.orig 1999-06-07 14:27:18 UTC
++++ wmMoonClock.c
+@@ -162,7 +162,8 @@ int main(int argc, char *argv[]) {
int i, n, k, j, ImageNumber;
int Year, Month, DayOfWeek, DayOfMonth;
int Hours, Mins, Secs, OldSecs, digit, xoff, xsize;
diff --git a/astro/wmsolar/files/patch-Makefile b/astro/wmsolar/files/patch-Makefile
index 4e76bbdfb27b..872ea28528bb 100644
--- a/astro/wmsolar/files/patch-Makefile
+++ b/astro/wmsolar/files/patch-Makefile
@@ -1,4 +1,4 @@
---- Makefile.orig 2016-06-20 12:40:27 UTC
+--- Makefile.orig 2016-07-26 13:20:30 UTC
+++ Makefile
@@ -1,8 +1,6 @@
-CC = g++
diff --git a/astro/wmsolar/files/patch-Vsop.h b/astro/wmsolar/files/patch-Vsop.h
index b43c3e292aa0..91ec3fd03f1c 100644
--- a/astro/wmsolar/files/patch-Vsop.h
+++ b/astro/wmsolar/files/patch-Vsop.h
@@ -1,4 +1,4 @@
---- Vsop.h.orig 2016-06-20 12:40:27 UTC
+--- Vsop.h.orig 2016-07-26 13:20:30 UTC
+++ Vsop.h
@@ -12,6 +12,7 @@
#define VSOP__H
diff --git a/astro/wmspaceweather/files/patch-GetKp b/astro/wmspaceweather/files/patch-GetKp
index 55c2633e1c05..e65e1700318d 100644
--- a/astro/wmspaceweather/files/patch-GetKp
+++ b/astro/wmspaceweather/files/patch-GetKp
@@ -1,5 +1,5 @@
---- ./GetKp.orig 1999-02-12 06:42:01.000000000 +0100
-+++ ./GetKp 2014-04-04 21:55:15.059689500 +0200
+--- GetKp.orig 1999-02-12 05:42:01 UTC
++++ GetKp
@@ -5,7 +5,7 @@
#
diff --git a/astro/wmspaceweather/files/patch-Makefile b/astro/wmspaceweather/files/patch-Makefile
index 67dd3990d14d..6a985e4f4eea 100644
--- a/astro/wmspaceweather/files/patch-Makefile
+++ b/astro/wmspaceweather/files/patch-Makefile
@@ -1,5 +1,5 @@
---- ./Makefile.orig 1999-01-04 22:20:45.000000000 +0100
-+++ ./Makefile 2014-04-04 21:55:35.196529518 +0200
+--- Makefile.orig 1999-01-04 21:20:45 UTC
++++ Makefile
@@ -1,8 +1,7 @@
-CC = gcc
-CFLAGS = -O2 -Wall
@@ -13,7 +13,7 @@
# for linux
LIBS = -lXpm -lX11 -lXext
# for Solaris
-@@ -12,14 +11,14 @@
+@@ -12,14 +11,14 @@ OBJS = wmSpaceWeather.o \
.c.o:
@@ -30,7 +30,7 @@
clean:
for i in $(OBJS) ; do \
-@@ -28,7 +27,7 @@
+@@ -28,7 +27,7 @@ clean:
rm -f wmSpaceWeather
install:: wmSpaceWeather
diff --git a/astro/wmspaceweather/files/patch-wmSpaceWeather.c b/astro/wmspaceweather/files/patch-wmSpaceWeather.c
index 5834dac43ff8..6f22d3ac4693 100644
--- a/astro/wmspaceweather/files/patch-wmSpaceWeather.c
+++ b/astro/wmspaceweather/files/patch-wmSpaceWeather.c
@@ -1,6 +1,6 @@
---- ./wmSpaceWeather.c.orig 1999-02-18 18:57:45.000000000 +0100
-+++ ./wmSpaceWeather.c 2014-04-04 21:55:15.061690087 +0200
-@@ -115,7 +115,7 @@
+--- wmSpaceWeather.c.orig 1999-02-18 17:57:45 UTC
++++ wmSpaceWeather.c
+@@ -115,7 +115,7 @@ XEvent event;
int i, n, s, k, m, dt1, dt2;
int Year, Month, Day, DayOfMonth, OldDayOfMonth;
int Hours, Mins, Secs, OldSecs, xoff, D[10], xsize;
@@ -9,7 +9,7 @@
int height, UpToDate, LEDOn;
double UT, TU, TU2, TU3, T0, gmst, hour24();
-@@ -126,6 +126,7 @@
+@@ -126,6 +126,7 @@ int Kp[8] = { -1, -1, -1, -1, -1, -1,
double E1, E2, P1, P2, P3;
char Xray[10], digit[2];
FILE *fp;
@@ -17,7 +17,7 @@
-@@ -249,13 +250,13 @@
+@@ -249,13 +250,13 @@ FILE *fp;
/*
@@ -33,7 +33,7 @@
dt2 = 0;
-@@ -272,13 +273,13 @@
+@@ -272,13 +273,13 @@ FILE *fp;
Secs = Time->tm_sec;
UT = (double)Hours + (double)Mins/60.0 + (double)Secs/3600.0;
CurrentJD = jd(Year, Month, Day, UT);
@@ -49,7 +49,7 @@
for (i=0; i<8; ++i){
fscanf(fp, "%ld %d", &TimeTag[i], &Kp[i]);
-@@ -289,7 +290,7 @@
+@@ -289,7 +290,7 @@ FILE *fp;
fscanf(fp, "%lf", &P3);
fscanf(fp, "%lf", &E1);
fscanf(fp, "%lf", &E2);
@@ -58,7 +58,7 @@
fclose(fp);
} else {
-@@ -318,7 +319,7 @@
+@@ -318,7 +319,7 @@ FILE *fp;
LatestAvailJD = jd(Year, Month, Day, UT);
DeltaT = (CurrentJD - LatestAvailJD)*24.0;
@@ -67,7 +67,7 @@
if (!UpToDate){
-@@ -560,7 +561,7 @@
+@@ -560,7 +561,7 @@ void ParseCMDLine(int argc, char *argv[]
} else if ((!strcmp(argv[i], "-url"))||(!strcmp(argv[i], "-u"))){
@@ -76,7 +76,7 @@
} else {
-@@ -651,7 +652,7 @@
+@@ -651,7 +652,7 @@ void pressEvent(XButtonEvent *xev){
if (GotDoubleClick1) {
GotFirstClick1 = 0;
GotDoubleClick1 = 0;
diff --git a/astro/wmsun/files/patch-Makefile b/astro/wmsun/files/patch-Makefile
index 20562229be26..d21e0a79ec8e 100644
--- a/astro/wmsun/files/patch-Makefile
+++ b/astro/wmsun/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig Wed Jan 6 11:28:39 1999
-+++ Makefile Thu Aug 3 21:28:34 2000
-@@ -18,12 +18,12 @@
+--- Makefile.orig 2015-04-01 21:05:45 UTC
++++ Makefile
+@@ -18,12 +18,12 @@ LIBS = -lXpm -lX11 -lXext -lm
OBJS = wmSun.o SunRise.o ../wmgeneral/wmgeneral.o
.c.o:
diff --git a/astro/wmsun/files/patch-wmSun.c b/astro/wmsun/files/patch-wmSun.c
index 45b0541943da..7f5293d03e28 100644
--- a/astro/wmsun/files/patch-wmSun.c
+++ b/astro/wmsun/files/patch-wmSun.c
@@ -1,6 +1,6 @@
---- wmSun.c.orig Thu Aug 15 18:04:04 2002
-+++ wmSun.c Thu Aug 15 18:06:24 2002
-@@ -76,7 +76,8 @@
+--- wmSun.c.orig 2015-04-01 21:07:58 UTC
++++ wmSun.c
+@@ -76,7 +76,8 @@ int main(int argc, char *argv[]) {
int LocalDayOfMonth, DayOfMonth;
int Hours, Mins, Secs, OldSecs, digit, xoff, xsize;
int OldMins;
diff --git a/astro/xglobe/files/patch-Makefile b/astro/xglobe/files/patch-Makefile
index c408904c8fcb..e1d88a8e4bc2 100644
--- a/astro/xglobe/files/patch-Makefile
+++ b/astro/xglobe/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 1999-07-19 05:56:27.000000000 -0700
-+++ Makefile 2011-01-19 09:39:21.000000000 -0800
+--- Makefile.orig 1999-07-19 12:56:27 UTC
++++ Makefile
@@ -4,43 +4,44 @@
####### Installation directory
diff --git a/astro/xglobe/files/patch-desktopwidget.cpp b/astro/xglobe/files/patch-desktopwidget.cpp
index 9ef3e1498445..b1100d7e911c 100644
--- a/astro/xglobe/files/patch-desktopwidget.cpp
+++ b/astro/xglobe/files/patch-desktopwidget.cpp
@@ -1,5 +1,5 @@
---- desktopwidget.cpp.orig 1998-12-09 10:15:52.000000000 -0800
-+++ desktopwidget.cpp 2011-01-18 22:40:26.000000000 -0800
+--- desktopwidget.cpp.orig 1998-12-09 18:15:52 UTC
++++ desktopwidget.cpp
@@ -18,10 +18,14 @@
*/
@@ -16,7 +16,7 @@
{
haveImage = FALSE;
currentImage = new QPixmap(width(), height());
-@@ -43,6 +47,7 @@
+@@ -43,6 +47,7 @@ void DesktopWidget::paintEvent(QPaintEve
{
QPainter p(this);
@@ -24,7 +24,7 @@
if(!haveImage)
{
p.setFont(QFont("helvetica", 35));
-@@ -62,7 +67,8 @@
+@@ -62,7 +67,8 @@ void DesktopWidget::paintEvent(QPaintEve
void DesktopWidget::updateDisplay(QImage *image)
{
diff --git a/astro/xglobe/files/patch-desktopwidget.h b/astro/xglobe/files/patch-desktopwidget.h
index 1824d35063a0..10f19eddd27b 100644
--- a/astro/xglobe/files/patch-desktopwidget.h
+++ b/astro/xglobe/files/patch-desktopwidget.h
@@ -1,5 +1,5 @@
---- desktopwidget.h.orig 1998-12-09 10:16:54.000000000 -0800
-+++ desktopwidget.h 2011-01-18 14:22:52.000000000 -0800
+--- desktopwidget.h.orig 1998-12-09 18:16:54 UTC
++++ desktopwidget.h
@@ -23,6 +23,8 @@
#include <qwidget.h>
#include <qpixmap.h>
diff --git a/astro/xglobe/files/patch-earthapp.cpp b/astro/xglobe/files/patch-earthapp.cpp
index 76941cf6958e..0ada8e01a975 100644
--- a/astro/xglobe/files/patch-earthapp.cpp
+++ b/astro/xglobe/files/patch-earthapp.cpp
@@ -1,5 +1,5 @@
---- earthapp.cpp.orig 1999-12-06 08:14:10.000000000 -0800
-+++ earthapp.cpp 2011-01-19 09:28:15.000000000 -0800
+--- earthapp.cpp.orig 1999-12-06 16:14:10 UTC
++++ earthapp.cpp
@@ -69,6 +69,12 @@
#include "config.h"
#include "earthapp.h"
@@ -13,7 +13,7 @@
/* ------------------------------------------------------------------------*/
-@@ -334,7 +340,7 @@
+@@ -334,7 +340,7 @@ EarthApplication::EarthApplication(int &
if(use_kde)
{
dwidget = new DesktopWidget();
@@ -22,7 +22,7 @@
dwidget->update();
}
}
-@@ -343,9 +349,9 @@
+@@ -343,9 +349,9 @@ EarthApplication::EarthApplication(int &
EarthApplication::~EarthApplication(void)
{
@@ -34,7 +34,7 @@
timer->stop();
delete timer;
-@@ -937,8 +943,8 @@
+@@ -937,8 +943,8 @@ void EarthApplication::readOutFileName(i
void EarthApplication::randomPosition()
{
@@ -45,7 +45,7 @@
}
/* ------------------------------------------------------------------------*/
-@@ -1233,7 +1239,7 @@
+@@ -1233,7 +1239,7 @@ void EarthApplication::init()
r->setRotation(rotation);
timer = new QTimer(this);
@@ -54,7 +54,7 @@
connect(timer, SIGNAL(timeout()), this, SLOT(recalc()));
QTimer::singleShot(1, this, SLOT(recalc())); // this will start rendering
-@@ -1307,7 +1313,19 @@
+@@ -1307,7 +1313,19 @@ void EarthApplication::recalc()
{
QPixmap pm;
pm.convertFromImage(*(r->getImage()));
diff --git a/astro/xglobe/files/patch-earthapp.h b/astro/xglobe/files/patch-earthapp.h
index ad7ba6e0662a..bfbc68eca831 100644
--- a/astro/xglobe/files/patch-earthapp.h
+++ b/astro/xglobe/files/patch-earthapp.h
@@ -1,5 +1,5 @@
---- earthapp.h.orig 1999-12-06 08:14:23.000000000 -0800
-+++ earthapp.h 2011-01-18 14:22:52.000000000 -0800
+--- earthapp.h.orig 1999-12-06 16:14:23 UTC
++++ earthapp.h
@@ -54,6 +54,8 @@
#define _EARTHAPP_H
diff --git a/astro/xglobe/files/patch-main.cpp b/astro/xglobe/files/patch-main.cpp
index 505b961f3df7..9e207ebd2d55 100644
--- a/astro/xglobe/files/patch-main.cpp
+++ b/astro/xglobe/files/patch-main.cpp
@@ -1,5 +1,5 @@
---- main.cpp.orig 1999-07-13 10:32:55.000000000 -0700
-+++ main.cpp 2011-01-18 14:22:52.000000000 -0800
+--- main.cpp.orig 1999-07-13 17:32:55 UTC
++++ main.cpp
@@ -24,6 +24,7 @@
*/
@@ -8,7 +8,7 @@
#include <string.h>
#include <qstring.h>
#include "config.h"
-@@ -37,6 +38,8 @@
+@@ -37,6 +38,8 @@ int main(int argc, char **argv)
{
EarthApplication myApp(argc, argv);
diff --git a/astro/xglobe/files/patch-marker.xpm b/astro/xglobe/files/patch-marker.xpm
index 4cfec031a041..96bc338cef45 100644
--- a/astro/xglobe/files/patch-marker.xpm
+++ b/astro/xglobe/files/patch-marker.xpm
@@ -1,5 +1,5 @@
---- marker.xpm.orig 1998-11-20 09:16:30.000000000 -0800
-+++ marker.xpm 2011-01-19 09:32:52.000000000 -0800
+--- marker.xpm.orig 1998-11-20 17:16:30 UTC
++++ marker.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * marker_xpm[] = {
diff --git a/astro/xglobe/files/patch-markerlist.cpp b/astro/xglobe/files/patch-markerlist.cpp
index 16e6d3e45e02..574670a0b654 100644
--- a/astro/xglobe/files/patch-markerlist.cpp
+++ b/astro/xglobe/files/patch-markerlist.cpp
@@ -1,5 +1,5 @@
---- markerlist.cpp.orig 1999-07-13 11:13:41.000000000 -0700
-+++ markerlist.cpp 2011-01-18 14:22:52.000000000 -0800
+--- markerlist.cpp.orig 1999-07-13 18:13:41 UTC
++++ markerlist.cpp
@@ -28,7 +28,7 @@
#include "markerlist.h"
@@ -9,7 +9,7 @@
/* ------------------------------------------------------------------------ */
-@@ -94,11 +94,11 @@
+@@ -94,11 +94,11 @@ bool MarkerList::loadMarkerFile(const ch
int pos1;
int pos2;
QFile f(filename);
diff --git a/astro/xglobe/files/patch-markerlist.h b/astro/xglobe/files/patch-markerlist.h
index 82cb67d79370..8c1c648cdee0 100644
--- a/astro/xglobe/files/patch-markerlist.h
+++ b/astro/xglobe/files/patch-markerlist.h
@@ -1,6 +1,6 @@
---- markerlist.h.orig 1999-07-13 11:14:07.000000000 -0700
-+++ markerlist.h 2011-01-18 14:22:52.000000000 -0800
-@@ -56,21 +56,23 @@
+--- markerlist.h.orig 1999-07-13 18:14:07 UTC
++++ markerlist.h
+@@ -56,21 +56,23 @@ private:
class MarkerList
{
public:
diff --git a/astro/xglobe/files/patch-renderer.cpp b/astro/xglobe/files/patch-renderer.cpp
index 49e57136982f..ea7375cae596 100644
--- a/astro/xglobe/files/patch-renderer.cpp
+++ b/astro/xglobe/files/patch-renderer.cpp
@@ -1,6 +1,6 @@
---- renderer.cpp.orig 1999-12-06 08:13:35.000000000 -0800
-+++ renderer.cpp 2011-01-18 14:22:52.000000000 -0800
-@@ -123,7 +123,7 @@
+--- renderer.cpp.orig 1999-12-06 16:13:35 UTC
++++ renderer.cpp
+@@ -123,7 +123,7 @@ Renderer::Renderer(const QSize &size, co
this->ambientGreen = 0.15;
this->ambientBlue = 0.15;
this->markerpixmap = new QPixmap((const char **)marker_xpm);
@@ -9,7 +9,7 @@
this->show_label = TRUE;
this->gridtype = NO_GRID;
this->d_gridline = 15.0*PI/180.;
-@@ -448,7 +448,7 @@
+@@ -448,7 +448,7 @@ double Renderer::getZoom()
void Renderer::setMarkerList(MarkerList *l)
{
@@ -18,7 +18,7 @@
markerlist = l;
}
-@@ -1136,7 +1136,7 @@
+@@ -1136,7 +1136,7 @@ void Renderer::drawMarkers()
Location **visible_locations;
visible_locations = new Location*[markerlist->count()];
@@ -27,7 +27,7 @@
// Matrix M of renderFrame, but transposed
m11 = cos(rot)*cos(view_long)-sin(view_lat)*sin(view_long)*sin(rot);
-@@ -1151,8 +1151,9 @@
+@@ -1151,8 +1151,9 @@ void Renderer::drawMarkers()
visible_angle = radius/center_dist;
@@ -38,7 +38,7 @@
lon = l->getLongitude()*PI/180.;
lat = l->getLatitude()*PI/180.;
-@@ -1185,12 +1186,9 @@
+@@ -1185,12 +1186,9 @@ void Renderer::drawMarkers()
l->x = screen_x + shift_x;
l->y = screen_y + shift_y;
@@ -52,7 +52,7 @@
// sort the markers according to depth
qsort(visible_locations, num, sizeof(Location *),
Renderer::compareLocations);
-@@ -1208,8 +1206,8 @@
+@@ -1208,8 +1206,8 @@ int Renderer::compareLocations(const voi
{
double c1, c2;
@@ -63,7 +63,7 @@
if(c1 > c2)
return 1;
-@@ -1364,7 +1362,7 @@
+@@ -1364,7 +1362,7 @@ QImage *Renderer::getImage()
QImage *clonedImage = NULL;
clonedImage = new QImage(*renderedImage);
@@ -72,7 +72,7 @@
return clonedImage;
}
-@@ -1391,7 +1389,7 @@
+@@ -1391,7 +1389,7 @@ void Renderer::paintMarker(int x, int y,
#if QT_VERSION >= 200
p.setPen(Qt::black);
#else
@@ -81,7 +81,7 @@
#endif
wx = -br.x()+markerpixmap->width()+2;
wy = -br.y();
-@@ -1434,7 +1432,7 @@
+@@ -1434,7 +1432,7 @@ void Renderer::paintMarker(int x, int y,
for(wx=0 ; wx<visiblerect.width(); wx++)
{
@@ -90,7 +90,7 @@
{
case 0x00000000:
*dest++ = 0;
-@@ -1483,8 +1481,8 @@
+@@ -1483,8 +1481,8 @@ void Renderer::drawLabel()
labelstring.sprintf("%s, %s %d. %d, %d:%02d %s\n"
"View pos %2.2f° %c %2.2f° %c\n"
"Sun pos %2.2f° %c %2.2f° %c",
@@ -101,7 +101,7 @@
dt.date().day(), dt.date().year(),
dt.time().hour(), dt.time().minute(),
tzname[tm->tm_isdst],
-@@ -1499,7 +1497,7 @@
+@@ -1499,7 +1497,7 @@ void Renderer::drawLabel()
QRect br = fm.boundingRect(0, 0, 0, 0, Qt::AlignLeft|Qt::AlignTop,
labelstring);
#else
@@ -110,7 +110,7 @@
#endif
QPixmap pm(br.width()+10, br.height()+10);
-@@ -1512,8 +1510,8 @@
+@@ -1512,8 +1510,8 @@ void Renderer::drawLabel()
p.drawText(5, 5, br.width(), br.height(), Qt::AlignLeft|Qt::AlignTop,
labelstring);
#else
@@ -121,7 +121,7 @@
#endif
p.end();
-@@ -1562,9 +1560,9 @@
+@@ -1562,9 +1560,9 @@ void Renderer::drawStars()
for(int i=0; i<numstars; i++)
{
diff --git a/astro/xglobe/files/patch-sunpos.cpp b/astro/xglobe/files/patch-sunpos.cpp
index f63f28e08013..d8ab21daac11 100644
--- a/astro/xglobe/files/patch-sunpos.cpp
+++ b/astro/xglobe/files/patch-sunpos.cpp
@@ -1,6 +1,6 @@
---- sunpos.cpp.orig 1998-12-09 10:51:09.000000000 -0800
-+++ sunpos.cpp 2011-01-18 14:22:52.000000000 -0800
-@@ -203,7 +203,7 @@
+--- sunpos.cpp.orig 1998-12-09 18:51:09 UTC
++++ sunpos.cpp
+@@ -203,7 +203,7 @@ double SunPos::julian_date(int y, int m,
double JD;
/* lazy test to ensure gregorian calendar */
diff --git a/astro/xmoontool/files/patch-Makefile b/astro/xmoontool/files/patch-Makefile
index c63f45a762b7..8b105a88c629 100644
--- a/astro/xmoontool/files/patch-Makefile
+++ b/astro/xmoontool/files/patch-Makefile
@@ -1,8 +1,8 @@
---- ./Makefile.orig Fri Feb 24 23:00:24 2006
-+++ ./Makefile Fri Mar 24 10:55:01 2006
-@@ -8,9 +8,9 @@
+--- Makefile.orig 2006-02-24 22:00:24 UTC
++++ Makefile
+@@ -8,9 +8,9 @@ INSTALL?= install
LOCALBASE?= /usr/local
- X11BASE?= /usr/local
+ X11BASE?= /usr/X11R6
-CC= gcc
-CFLAGS= -O2 -Wall
@@ -11,5 +11,5 @@
+#CFLAGS= -O2 -Wall
+LDFLAGS+= -lXm -lXt -lX11 -lm
DEFINES?= -DDEFAULT_COLOR
- ALL_CFLAGS= $(CFLAGS) $(DEFINES) -I$(LOCALBASE)/include -L$(LOCALBASE)/lib
+ ALL_CFLAGS= $(CFLAGS) $(DEFINES) -I$(X11BASE)/include -L$(X11BASE)/lib
diff --git a/astro/xphoon/files/patch-Imakefile b/astro/xphoon/files/patch-Imakefile
index 671c9a868d9f..d607d8420b3c 100644
--- a/astro/xphoon/files/patch-Imakefile
+++ b/astro/xphoon/files/patch-Imakefile
@@ -1,5 +1,5 @@
---- ./Imakefile.org Wed Sep 18 12:57:31 1991
-+++ ./Imakefile Tue Feb 14 18:44:28 1995
+--- Imakefile.orig 2000-06-13 21:55:44 UTC
++++ Imakefile
@@ -11,7 +11,7 @@
diff --git a/astro/xphoon/files/patch-dtime.c b/astro/xphoon/files/patch-dtime.c
index e5e35cd66b77..2841a5514ea0 100644
--- a/astro/xphoon/files/patch-dtime.c
+++ b/astro/xphoon/files/patch-dtime.c
@@ -1,6 +1,6 @@
---- dtime.c.orig Sat Sep 14 14:15:25 1991
-+++ dtime.c Sun Jan 3 18:36:48 1999
-@@ -26,13 +26,20 @@
+--- dtime.c.orig 1991-09-14 05:15:25 UTC
++++ dtime.c
+@@ -26,13 +26,20 @@ extern long timezone;
#include <sys/timeb.h>
#endif /*SYS5*/
@@ -22,7 +22,7 @@
(void) time( &clock );
return dlocaltime( &clock );
-@@ -40,7 +47,7 @@
+@@ -40,7 +47,7 @@ dtwstime()
struct tws*
dlocaltime( clock )
@@ -31,7 +31,7 @@
{
register struct tm* tm;
#ifndef SYS5
-@@ -48,7 +55,7 @@
+@@ -48,7 +55,7 @@ dlocaltime( clock )
#endif not SYS5
static struct tws tw;
diff --git a/astro/xphoon/files/patch-xphoon.c b/astro/xphoon/files/patch-xphoon.c
index e09711110328..8d430fa70c00 100644
--- a/astro/xphoon/files/patch-xphoon.c
+++ b/astro/xphoon/files/patch-xphoon.c
@@ -1,6 +1,6 @@
---- xphoon.c.orig Thu Sep 19 04:57:37 1991
-+++ xphoon.c Sun Jan 3 18:30:29 1999
-@@ -20,7 +20,6 @@
+--- xphoon.c.orig 2000-06-13 21:50:16 UTC
++++ xphoon.c
+@@ -20,7 +20,6 @@ static char rcsid[] =
#include "vroot.h"
#include <stdio.h>
#include <stdlib.h> /* added by David Frey */
@@ -8,8 +8,8 @@
#include <time.h> /* added by David Frey */
#include <math.h>
#include <limits.h> /* added by Lalo Martins */
-@@ -65,7 +74,7 @@
- int blackflag, demoflag;
+@@ -65,7 +64,7 @@ main( argc, argv )
+ int blackflag, demoflag, southflag;
int printpid;
char* display_name;
- long clock;
diff --git a/astro/xworld/files/patch-compile__world.c b/astro/xworld/files/patch-compile__world.c
new file mode 100644
index 000000000000..9404597d3a7f
--- /dev/null
+++ b/astro/xworld/files/patch-compile__world.c
@@ -0,0 +1,10 @@
+--- compile_world.c.orig 1999-07-28 13:13:51 UTC
++++ compile_world.c
+@@ -33,6 +33,7 @@
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "Sphere.h"
+ #include "SphereDim.h"
+
diff --git a/astro/xworld/files/patch-compile_world.c b/astro/xworld/files/patch-compile_world.c
deleted file mode 100644
index 9c457be19215..000000000000
--- a/astro/xworld/files/patch-compile_world.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- compile_world.c.orig 2009-03-27 17:51:01.000000000 +0100
-+++ compile_world.c 2009-03-27 17:51:15.000000000 +0100
-@@ -33,6 +33,7 @@
- #include <sys/types.h>
- #include <sys/mman.h>
- #include <stdio.h>
-+#include <stdlib.h>
- #include "Sphere.h"
- #include "SphereDim.h"
-
diff --git a/astro/xworld/files/patch-pad.c b/astro/xworld/files/patch-pad.c
index f132d1983ae8..a5d98ea9271b 100644
--- a/astro/xworld/files/patch-pad.c
+++ b/astro/xworld/files/patch-pad.c
@@ -1,5 +1,5 @@
---- pad.c.orig 2009-03-27 17:49:37.000000000 +0100
-+++ pad.c 2009-03-27 17:50:01.000000000 +0100
+--- pad.c.orig 1999-07-28 13:31:27 UTC
++++ pad.c
@@ -35,6 +35,7 @@
#include <fcntl.h>
#include <unistd.h>
diff --git a/astro/xworld/files/patch-xworld.c b/astro/xworld/files/patch-xworld.c
new file mode 100644
index 000000000000..8a81ab6dc5e0
--- /dev/null
+++ b/astro/xworld/files/patch-xworld.c
@@ -0,0 +1,140 @@
+--- xworld.c.orig 1999-07-28 15:39:11 UTC
++++ xworld.c
+@@ -63,6 +63,8 @@
+ #define BORDER 5
+ #define SLEEP 120
+
++#define MIN(x,y) (((x)<(y))?(x):(y))
++
+ char *MainTitle[] = {"Hello, world"};
+ char *IconTitle[] = {"xworld"};
+
+@@ -92,6 +94,26 @@ usage()
+ exit(1);
+ }
+
++
++static char *
++alloc_image(XImage *image)
++{
++ char *Map;
++ int ix, iy, j;
++ Map = (char *)malloc(image->height * image->bytes_per_line);
++ if (Map == NULL) {
++ fprintf(stderr, "xworld: not enough memory\n");
++ exit(1);
++ }
++ image->data = Map;
++
++ for(j = 0, ix = 0; ix < image->width; ix++)
++ for (iy = 0; iy < image->height; iy++)
++ XPutPixel(image, ix, iy, j++ % NCOLORS);
++
++ return Map;
++}
++
+ int
+ main(int argc, char **argv)
+ {
+@@ -305,29 +327,16 @@ main(int argc, char **argv)
+ xcolor[i].blue = color[i].blue;
+ if (XAllocColor(display, cmap, &xcolor[i]) == 0) {
+ fprintf(stderr, "xworld: can't allocate colors\n");
++#if 0
+ exit(-1);
++#endif
+ }
+ }
+
+ /*
+ * generate startup image
+ */
+- Map = (char *)malloc(size*size*sizeof(char));
+- if (Map == NULL) {
+- fprintf(stderr, "xworld: not enough memory\n");
+- exit(1);
+- }
+-
+- j = 0;
+- for (iy = 0; iy < size; iy++) {
+- i = iy % (NCOLORS + 1);
+- for (ix = 0; ix < size; ix++) {
+- *(Map + j++) = xcolor[i].pixel;
+- if (i++ >= NCOLORS) i = 0;
+- }
+- }
+-
+- image->data = Map;
++ Map = alloc_image(image);
+
+ gc = XCreateGC(display, win, 0, 0);
+
+@@ -414,21 +423,21 @@ main(int argc, char **argv)
+ * Map elevations to colors
+ */
+ if (i != SOK) {
+- *(Map + j) = xcolor[BLACK].pixel;
++ XPutPixel(image, ix, iy, xcolor[BLACK].pixel);
+ continue;
+ }
+ if (Value > level[NLEVELS - 1]) {
+- *(Map + j) = xcolor[HIGH].pixel;
++ XPutPixel(image, ix, iy, xcolor[HIGH].pixel);
+ continue;
+ }
+ for (i = 0; i <= NLEVELS - 1; i++) {
+ if (Value <= level[i]) {
+- *(Map + j) = xcolor[i].pixel;
++ XPutPixel(image, ix, iy, xcolor[i].pixel);
+ break;
+ }
+ }
+ } else
+- *(Map + j) = xcolor[BLACK].pixel;
++ XPutPixel(image, ix, iy, xcolor[BLACK].pixel);
+ }
+ }
+ XPutImage(display, win, gc, image, 0, 0, 0, 0, size, size);
+@@ -444,8 +453,12 @@ main(int argc, char **argv)
+ ConfigureEvent = (XConfigureEvent *)&event;
+ size = ConfigureEvent->width;
+ if (ConfigureEvent->height != size) {
++#if 0
+ fprintf(stderr, "xworld: error: width != height\n");
+ exit(1);
++#else
++ size = MIN(size, ConfigureEvent->height);
++#endif
+ }
+ if (size != old_size) {
+ old_size = size;
+@@ -453,28 +466,14 @@ main(int argc, char **argv)
+ r1 = n/2;
+ r2 = size/2;
+ XDestroyImage(image);
+- free(Map);
+ image = XCreateImage(display, visual, depth, format,
+ 0, 0, size, size, bitmap_pad, 0);
+ if (image == NULL) {
+ fprintf(stderr, "xworld: can't create XImage\n");
+ exit(1);
+ }
+- Map = (char *)malloc(size*size*sizeof(char));
+- if (Map == NULL) {
+- fprintf(stderr, "xworld: not enough memory\n");
+- exit(1);
+- }
+- image->data = Map;
++ Map = alloc_image(image);
+
+- j = 0;
+- for (iy = 0; iy < size; iy++) {
+- i = iy % (NCOLORS + 1);
+- for (ix = 0; ix < size; ix++) {
+- *(Map + j++) = xcolor[i].pixel;
+- if (i++ >= NCOLORS) i = 0;
+- }
+- }
+ XPutImage(display, win, gc, image, 0, 0, 0, 0,
+ size, size);
+ break;
diff --git a/astro/xworld/files/patch-xworld_c b/astro/xworld/files/patch-xworld_c
deleted file mode 100644
index 63cc59e8a531..000000000000
--- a/astro/xworld/files/patch-xworld_c
+++ /dev/null
@@ -1,140 +0,0 @@
---- xworld.c.orig Wed Jul 28 17:39:11 1999
-+++ xworld.c Sat Aug 11 21:23:01 2001
-@@ -63,6 +63,8 @@
- #define BORDER 5
- #define SLEEP 120
-
-+#define MIN(x,y) (((x)<(y))?(x):(y))
-+
- char *MainTitle[] = {"Hello, world"};
- char *IconTitle[] = {"xworld"};
-
-@@ -92,6 +94,26 @@ usage()
- exit(1);
- }
-
-+
-+static char *
-+alloc_image(XImage *image)
-+{
-+ char *Map;
-+ int ix, iy, j;
-+ Map = (char *)malloc(image->height * image->bytes_per_line);
-+ if (Map == NULL) {
-+ fprintf(stderr, "xworld: not enough memory\n");
-+ exit(1);
-+ }
-+ image->data = Map;
-+
-+ for(j = 0, ix = 0; ix < image->width; ix++)
-+ for (iy = 0; iy < image->height; iy++)
-+ XPutPixel(image, ix, iy, j++ % NCOLORS);
-+
-+ return Map;
-+}
-+
- int
- main(int argc, char **argv)
- {
-@@ -305,29 +327,16 @@ main(int argc, char **argv)
- xcolor[i].blue = color[i].blue;
- if (XAllocColor(display, cmap, &xcolor[i]) == 0) {
- fprintf(stderr, "xworld: can't allocate colors\n");
-+#if 0
- exit(-1);
-+#endif
- }
- }
-
- /*
- * generate startup image
- */
-- Map = (char *)malloc(size*size*sizeof(char));
-- if (Map == NULL) {
-- fprintf(stderr, "xworld: not enough memory\n");
-- exit(1);
-- }
--
-- j = 0;
-- for (iy = 0; iy < size; iy++) {
-- i = iy % (NCOLORS + 1);
-- for (ix = 0; ix < size; ix++) {
-- *(Map + j++) = xcolor[i].pixel;
-- if (i++ >= NCOLORS) i = 0;
-- }
-- }
--
-- image->data = Map;
-+ Map = alloc_image(image);
-
- gc = XCreateGC(display, win, 0, 0);
-
-@@ -414,21 +423,21 @@ main(int argc, char **argv)
- * Map elevations to colors
- */
- if (i != SOK) {
-- *(Map + j) = xcolor[BLACK].pixel;
-+ XPutPixel(image, ix, iy, xcolor[BLACK].pixel);
- continue;
- }
- if (Value > level[NLEVELS - 1]) {
-- *(Map + j) = xcolor[HIGH].pixel;
-+ XPutPixel(image, ix, iy, xcolor[HIGH].pixel);
- continue;
- }
- for (i = 0; i <= NLEVELS - 1; i++) {
- if (Value <= level[i]) {
-- *(Map + j) = xcolor[i].pixel;
-+ XPutPixel(image, ix, iy, xcolor[i].pixel);
- break;
- }
- }
- } else
-- *(Map + j) = xcolor[BLACK].pixel;
-+ XPutPixel(image, ix, iy, xcolor[BLACK].pixel);
- }
- }
- XPutImage(display, win, gc, image, 0, 0, 0, 0, size, size);
-@@ -444,8 +453,12 @@ main(int argc, char **argv)
- ConfigureEvent = (XConfigureEvent *)&event;
- size = ConfigureEvent->width;
- if (ConfigureEvent->height != size) {
-+#if 0
- fprintf(stderr, "xworld: error: width != height\n");
- exit(1);
-+#else
-+ size = MIN(size, ConfigureEvent->height);
-+#endif
- }
- if (size != old_size) {
- old_size = size;
-@@ -453,28 +466,14 @@ main(int argc, char **argv)
- r1 = n/2;
- r2 = size/2;
- XDestroyImage(image);
-- free(Map);
- image = XCreateImage(display, visual, depth, format,
- 0, 0, size, size, bitmap_pad, 0);
- if (image == NULL) {
- fprintf(stderr, "xworld: can't create XImage\n");
- exit(1);
- }
-- Map = (char *)malloc(size*size*sizeof(char));
-- if (Map == NULL) {
-- fprintf(stderr, "xworld: not enough memory\n");
-- exit(1);
-- }
-- image->data = Map;
-+ Map = alloc_image(image);
-
-- j = 0;
-- for (iy = 0; iy < size; iy++) {
-- i = iy % (NCOLORS + 1);
-- for (ix = 0; ix < size; ix++) {
-- *(Map + j++) = xcolor[i].pixel;
-- if (i++ >= NCOLORS) i = 0;
-- }
-- }
- XPutImage(display, win, gc, image, 0, 0, 0, 0,
- size, size);
- break;
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})