aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2012-12-20 14:55:56 +0100
committerMatteo Bernardini <ponce@slackbuilds.org>2012-12-20 14:56:16 +0100
commit59c25301a23a9a8f7ba45593884765ccd8fa2844 (patch)
tree8fba66d48714d245c259b2872300781fa5451dbe /audio
parenta2025c755982864d19eb5c77d70c8b878741d496 (diff)
audio/TiMidity++: Updated for version 2.14.0.
Autodetect instrument patch files Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r--audio/TiMidity++/README10
-rw-r--r--audio/TiMidity++/TiMidity++.SlackBuild48
-rw-r--r--audio/TiMidity++/TiMidity++.info8
-rw-r--r--audio/TiMidity++/patches/autoconf.diff481
-rw-r--r--audio/TiMidity++/patches/man_pages.diff122
-rw-r--r--audio/TiMidity++/patches/other.diff1008
-rw-r--r--audio/TiMidity++/patches/patch-tclbitmaps135
-rw-r--r--audio/TiMidity++/patches/patch-tclsh139
-rw-r--r--audio/TiMidity++/patches/scripts.diff41
-rw-r--r--audio/TiMidity++/patches/speex.diff38
10 files changed, 471 insertions, 1559 deletions
diff --git a/audio/TiMidity++/README b/audio/TiMidity++/README
index 305dc68822ee1..0e799fff8aa69 100644
--- a/audio/TiMidity++/README
+++ b/audio/TiMidity++/README
@@ -7,11 +7,15 @@ JACK=yes ./TiMidity++.SlackBuild
To add speex support, install speex and build with:
SPEEX=yes ./TiMidity++.SlackBuild
+To use Xaw3d in Xaw interface, build with:
+XAW3D=yes ./TiMidity++.SlackBuild
+
TiMidity++ can also be run as an ALSA sequencer client. To do this, make
/etc/rc.d/rc.timidity executable and add this line to /etc/rc.d/rc.local:
/etc/rc.d/rc.timidity start
-You will need a set of instrument patch files for TiMidity++ to be of any
-use. The freepats and eawpats packages both provide a set of patch files,
-so one of those will be needed.
+You will need a set of instrument patch files or soundbank fonts for
+TiMidity++ to be of any use. The freepats and eawpats packages both provide
+a set of patch files, as well as the fluid-soundfont package, so one of those
+will be needed.
diff --git a/audio/TiMidity++/TiMidity++.SlackBuild b/audio/TiMidity++/TiMidity++.SlackBuild
index 6d3249a205aa0..fd9f813ca71bd 100644
--- a/audio/TiMidity++/TiMidity++.SlackBuild
+++ b/audio/TiMidity++/TiMidity++.SlackBuild
@@ -4,10 +4,11 @@
# Written by Kyle Guinn <elyk03@gmail.com>
# Changes for Slackware 12.1 by Richard Hoyle <hoyle.richard@gmail.com>
# Modified by Michiel van Wessem. <michiel.van.wessem@gmail.com>
+# Modified by Yair Kalvariski. <cesium2@gmail.com>
-PRGNAM="TiMidity++"
-VERSION="2.13.2"
-BUILD=${BUILD:-6}
+PRGNAM=TiMidity++
+VERSION=2.14.0
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -25,7 +26,7 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="AUTHORS COPYING ChangeLog* INSTALL* NEWS README* TODO doc/C/README* doc/C/FAQ doc/C/CHANGES.02i"
ENABLE_AUDIO="alsa,oss,esd,ao,vorbis,flac"
-ENABLE_DYNAMIC="gtk,ncurses,motif,tcltk,emacs,vt100"
+ENABLE_DYNAMIC="gtk,ncurses,motif,tcltk,emacs,vt100,xaw"
# Support JACK. Requires JACK, of course.
# Disabled by default for those who don't want to install/configure it.
@@ -40,6 +41,14 @@ if [ "$SPEEX" = "yes" ]; then
ENABLE_AUDIO="$ENABLE_AUDIO,speex"
fi
+# Use xaw3d library in xaw interface module. Disabled by default.
+XAW3D=${XAW3D:-no}
+if [ "$XAW3D" = "yes" ]; then
+ WITH_XAW="xaw3d"
+else
+ WITH_XAW="xaw"
+fi
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -60,26 +69,24 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# The patches here include most of those in Debian's 2.13.2-19
-# patch set, minus some gross (in both senses of the word) changes
-# to the autoconf build scripts to reflect merges of libOggFLAC
-# into libFLAC++ since FLAC-1.1.3. ===RAH
+# Patches:
+# Include tcl's bitmaps in interface to reduce clutter (from git)
+# Use tclsh (from git)
+# Remove liboggflac autoconf clutter, as it has been merged into flac
+# since FLAC-1.1.3
for patch in $CWD/patches/* ; do
patch -p1 < $patch
done
# Regenerate files for automake/autoconf.
-# This removes much of the cruft in Debian's patch set.
+# Required for --docdir
autoreconf
-# Uncomment /etc/timidity.cfg as the default config file location
-sed -i "s|/\* #define CONFIG_FILE \"/etc/timidity.cfg\" \*/|#define CONFIG_FILE \"/etc/timidity.cfg\"|" timidity/timidity.h
-
EXTRACFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -89,22 +96,23 @@ EXTRACFLAGS="$SLKCFLAGS" \
--infodir=/usr/info \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --with-module-dir=/usr/lib${LIBDIRSUFFIX}/timidity \
--enable-audio=${ENABLE_AUDIO} \
--enable-dynamic=${ENABLE_DYNAMIC} \
--enable-alsaseq \
--enable-server \
--enable-network \
--enable-spectrogram \
+ --enable-xdnd \
+ --with-default-path=/etc \
+ --with-module-dir=/usr/lib${LIBDIRSUFFIX}/timidity \
+ --with-xaw-resource-prefix=/etc/X11 \
+ --with-xawlib=${WITH_XAW} \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
# Create a default timidity.cfg
# TiMidity++ will complain if this file is missing.
@@ -112,6 +120,10 @@ mkdir -p $PKG/etc
cat > $PKG/etc/timidity.cfg.new << EOF
# This is the default configuration file for TiMidity++.
# See timidity.cfg(5) for details.
+trysource /etc/timidity/crude.cfg
+trysource /etc/timidity/freepats.cfg
+trysource /etc/timidity/eawpats.cfg
+trysource /etc/timidity/fluid.cfg
EOF
# Copy the startup script
diff --git a/audio/TiMidity++/TiMidity++.info b/audio/TiMidity++/TiMidity++.info
index 6f6fb1921ae2f..9d98ec75b5353 100644
--- a/audio/TiMidity++/TiMidity++.info
+++ b/audio/TiMidity++/TiMidity++.info
@@ -1,10 +1,10 @@
PRGNAM="TiMidity++"
-VERSION="2.13.2"
+VERSION="2.14.0"
HOMEPAGE="http://timidity.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/timidity/TiMidity%2B%2B-2.13.2.tar.bz2"
-MD5SUM="a82ceeb2245e22f4de2b41da21eaee32"
+DOWNLOAD="http://downloads.sourceforge.net/timidity/TiMidity%2B%2B-2.14.0.tar.xz"
+MD5SUM="27927182d62ba24abbf447a9e9919c53"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="eawpats"
+REQUIRES="%README%"
MAINTAINER="Kyle Guinn"
EMAIL="elyk03@gmail.com"
diff --git a/audio/TiMidity++/patches/autoconf.diff b/audio/TiMidity++/patches/autoconf.diff
index 351304a64bb58..587df035da826 100644
--- a/audio/TiMidity++/patches/autoconf.diff
+++ b/audio/TiMidity++/patches/autoconf.diff
@@ -1,328 +1,173 @@
-diff --git a/autoconf/Makefile.am b/autoconf/Makefile.am
-index e943a79..b983bc7 100644
---- a/autoconf/Makefile.am
-+++ b/autoconf/Makefile.am
-@@ -25,7 +25,6 @@ EXTRA_DIST = \
+diff -Nur a/autoconf/libOggFLAC.m4 b/autoconf/libOggFLAC.m4
+--- a/autoconf/libOggFLAC.m4 2012-06-01 06:45:45.000000000 +0300
++++ b/autoconf/libOggFLAC.m4 1970-01-01 02:00:00.000000000 +0200
+@@ -1,116 +0,0 @@
+-# Configure paths for libOggFLAC
+-# "Inspired" by ogg.m4
+-
+-dnl AM_PATH_LIBOGGFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+-dnl Test for libOggFLAC, and define LIBOGGFLAC_CFLAGS and LIBOGGFLAC_LIBS
+-dnl
+-AC_DEFUN([AM_PATH_LIBOGGFLAC],
+-[dnl
+-dnl Get the cflags and libraries
+-dnl
+-AC_ARG_WITH(libOggFLAC,
+- AS_HELP_STRING([--with-libOggFLAC=PFX],
+- [Prefix where libOggFLAC is installed (optional)]),
+- [libOggFLAC_prefix="$withval"], [libOggFLAC_prefix=""])
+-AC_ARG_WITH(libOggFLAC-libraries,
+- AS_HELP_STRING([--with-libOggFLAC-libraries=DIR],
+- [Directory where libOggFLAC library is installed (optional)]),
+- [libOggFLAC_libraries="$withval"], [libOggFLAC_libraries=""])
+-AC_ARG_WITH(libOggFLAC-includes,
+- AS_HELP_STRING([--with-libOggFLAC-includes=DIR],
+- [Directory where libOggFLAC header files are installed (optional)]),
+- [libOggFLAC_includes="$withval"], [libOggFLAC_includes=""])
+-AC_ARG_ENABLE(libOggFLACtest,
+- AS_HELP_STRING([--disable-libOggFLACtest],
+- [Do not try to compile and run a test libOggFLAC program]),,
+- [enable_libOggFLACtest=yes])
+-
+- if test "x$libOggFLAC_libraries" != "x" ; then
+- LIBOGGFLAC_LIBS="-L$libOggFLAC_libraries"
+- elif test "x$libOggFLAC_prefix" != "x" ; then
+- LIBOGGFLAC_LIBS="-L$libOggFLAC_prefix/lib"
+- elif test "x$prefix" != "xNONE" ; then
+- LIBOGGFLAC_LIBS="-L$prefix/lib"
+- fi
+-
+- LIBOGGFLAC_LIBS="$LIBOGGFLAC_LIBS -lOggFLAC -lFLAC -lm"
+-
+- if test "x$libOggFLAC_includes" != "x" ; then
+- LIBOGGFLAC_CFLAGS="-I$libOggFLAC_includes"
+- elif test "x$libOggFLAC_prefix" != "x" ; then
+- LIBOGGFLAC_CFLAGS="-I$libOggFLAC_prefix/include"
+- elif test "$prefix" != "xNONE"; then
+- LIBOGGFLAC_CFLAGS="-I$prefix/include"
+- fi
+-
+- AC_MSG_CHECKING(for libOggFLAC)
+- no_libOggFLAC=""
+-
+-
+- if test "x$enable_libOggFLACtest" = "xyes" ; then
+- ac_save_CFLAGS="$CFLAGS"
+- ac_save_CXXFLAGS="$CXXFLAGS"
+- ac_save_LIBS="$LIBS"
+- CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
+- CXXFLAGS="$CXXFLAGS $LIBOGGFLAC_CFLAGS"
+- LIBS="$LIBS $LIBOGGFLAC_LIBS"
+-dnl
+-dnl Now check if the installed libOggFLAC is sufficiently new.
+-dnl
+- rm -f conf.libOggFLACtest
+- AC_TRY_RUN([
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <OggFLAC/stream_decoder.h>
+-
+-int main ()
+-{
+- system("touch conf.libOggFLACtest");
+- return 0;
+-}
+-
+-],, no_libOggFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+- CFLAGS="$ac_save_CFLAGS"
+- LIBS="$ac_save_LIBS"
+- fi
+-
+- if test "x$no_libOggFLAC" = "x" ; then
+- AC_MSG_RESULT(yes)
+- ifelse([$1], , :, [$1])
+- else
+- AC_MSG_RESULT(no)
+- if test -f conf.libOggFLACtest ; then
+- :
+- else
+- echo "*** Could not run libOggFLAC test program, checking why..."
+- CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
+- LIBS="$LIBS $LIBOGGFLAC_LIBS"
+- AC_TRY_LINK([
+-#include <stdio.h>
+-#include <OggFLAC/stream_decoder.h>
+-], [ return 0; ],
+- [ echo "*** The test program compiled, but did not run. This usually means"
+- echo "*** that the run-time linker is not finding libOggFLAC or finding the wrong"
+- echo "*** version of libOggFLAC. If it is not finding libOggFLAC, you'll need to set your"
+- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+- echo "*** to the installed location Also, make sure you have run ldconfig if that"
+- echo "*** is required on your system"
+- echo "***"
+- echo "*** If you have an old version installed, it is best to remove it, although"
+- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+- [ echo "*** The test program failed to compile or link. See the file config.log for the"
+- echo "*** exact error that occured. This usually means libOggFLAC was incorrectly installed"
+- echo "*** or that you have moved libOggFLAC since it was installed. In the latter case, you"
+- echo "*** may want to edit the libOggFLAC-config script: $LIBOGGFLAC_CONFIG" ])
+- CFLAGS="$ac_save_CFLAGS"
+- LIBS="$ac_save_LIBS"
+- fi
+- LIBOGGFLAC_CFLAGS=""
+- LIBOGGFLAC_LIBS=""
+- ifelse([$2], , :, [$2])
+- fi
+- AC_SUBST(LIBOGGFLAC_CFLAGS)
+- AC_SUBST(LIBOGGFLAC_LIBS)
+- rm -f conf.libOggFLACtest
+-])
+diff -Nur a/autoconf/Makefile.am b/autoconf/Makefile.am
+--- a/autoconf/Makefile.am 2004-05-30 11:02:23.000000000 +0300
++++ b/autoconf/Makefile.am 2012-10-13 18:19:32.837584323 +0200
+@@ -25,7 +25,6 @@
gtk.m4 \
gtk-2.0.m4 \
libFLAC.m4 \
- libOggFLAC.m4 \
ogg.m4 \
utils.m4 \
-- vorbis.m4
-\ No newline at end of file
-+ vorbis.m4
-diff --git a/autoconf/alsa.m4 b/autoconf/alsa.m4
-index 3429d08..2b65bc6 100644
---- a/autoconf/alsa.m4
-+++ b/autoconf/alsa.m4
-@@ -14,7 +14,7 @@ dnl
- dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
- dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
- dnl
--AC_DEFUN(AM_PATH_ALSA,
-+AC_DEFUN([AM_PATH_ALSA],
- [dnl Save the original CFLAGS, LDFLAGS, and LIBS
- alsa_save_CFLAGS="$CFLAGS"
- alsa_save_LDFLAGS="$LDFLAGS"
-@@ -151,4 +151,4 @@ fi
- dnl That should be it. Now just export out symbols:
- AC_SUBST(ALSA_CFLAGS)
- AC_SUBST(ALSA_LIBS)
--])
-\ No newline at end of file
-+])
-diff --git a/autoconf/ao.m4 b/autoconf/ao.m4
-index a2bfa67..a852ad8 100644
---- a/autoconf/ao.m4
-+++ b/autoconf/ao.m4
-@@ -6,7 +6,7 @@
- dnl XIPH_PATH_AO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
- dnl Test for libao, and define AO_CFLAGS and AO_LIBS
- dnl
--AC_DEFUN(XIPH_PATH_AO,
-+AC_DEFUN([XIPH_PATH_AO],
- [dnl
- dnl Get the cflags and libraries
- dnl
-diff --git a/autoconf/arts.m4 b/autoconf/arts.m4
-index 7ac4daa..f6b1d94 100644
---- a/autoconf/arts.m4
-+++ b/autoconf/arts.m4
-@@ -9,7 +9,7 @@ dnl Snarfed from the ESD code below - but the faults are all mine!
- dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
- dnl Test for aRts, and define ARTS_CFLAGS and ARTS_LIBS
- dnl
--AC_DEFUN(AM_PATH_ARTS,
-+AC_DEFUN([AM_PATH_ARTS],
- [dnl
- dnl Get the cflags and libraries from the arts-config script
- dnl
-@@ -156,4 +156,4 @@ int main ()
- AC_SUBST(ARTS_LIBS)
- rm -f conf.artstest
- ])
--dnl End of aRts
-\ No newline at end of file
-+dnl End of aRts
-diff --git a/autoconf/esd.m4 b/autoconf/esd.m4
-index 289a6c0..24666c9 100644
---- a/autoconf/esd.m4
-+++ b/autoconf/esd.m4
-@@ -7,7 +7,7 @@
- dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
- dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
- dnl
--AC_DEFUN(AM_PATH_ESD,
-+AC_DEFUN([AM_PATH_ESD],
- [dnl
- dnl Get the cflags and libraries from the esd-config script
- dnl
-@@ -172,7 +172,7 @@ int main ()
- dnl AM_ESD_SUPPORTS_MULTIPLE_RECORD([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
- dnl Test, whether esd supports multiple recording clients (version >=0.2.21)
- dnl
--AC_DEFUN(AM_ESD_SUPPORTS_MULTIPLE_RECORD,
-+AC_DEFUN([AM_ESD_SUPPORTS_MULTIPLE_RECORD],
- [dnl
- AC_MSG_NOTICE([whether installed esd version supports multiple recording clients])
- ac_save_ESD_CFLAGS="$ESD_CFLAGS"
-diff --git a/autoconf/gtk-2.0.m4 b/autoconf/gtk-2.0.m4
-index a0c53ac..36a1f9f 100644
---- a/autoconf/gtk-2.0.m4
-+++ b/autoconf/gtk-2.0.m4
-@@ -5,7 +5,7 @@ dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [,
- dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
- dnl pass to pkg-config
- dnl
--AC_DEFUN(AM_PATH_GTK_2_0,
-+AC_DEFUN([AM_PATH_GTK_2_0],
- [dnl
- dnl Get the cflags and libraries from pkg-config
- dnl
-diff --git a/autoconf/gtk.m4 b/autoconf/gtk.m4
-index b8cf402..f2dd472 100644
---- a/autoconf/gtk.m4
-+++ b/autoconf/gtk.m4
-@@ -4,7 +4,7 @@
- dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
- dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
- dnl
--AC_DEFUN(AM_PATH_GTK,
-+AC_DEFUN([AM_PATH_GTK],
- [dnl
- dnl Get the cflags and libraries from the gtk-config script
- dnl
-diff --git a/autoconf/libFLAC.m4 b/autoconf/libFLAC.m4
-index 88d8e84..b6950e7 100644
---- a/autoconf/libFLAC.m4
-+++ b/autoconf/libFLAC.m4
-@@ -4,7 +4,7 @@
- dnl AM_PATH_LIBFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
- dnl Test for libFLAC, and define LIBFLAC_CFLAGS and LIBFLAC_LIBS
- dnl
--AC_DEFUN(AM_PATH_LIBFLAC,
-+AC_DEFUN([AM_PATH_LIBFLAC],
- [dnl
- dnl Get the cflags and libraries
- dnl
-diff --git a/autoconf/libOggFLAC.m4 b/autoconf/libOggFLAC.m4
-index 5ce8bda..9b5f6d2 100644
---- a/autoconf/libOggFLAC.m4
-+++ b/autoconf/libOggFLAC.m4
-@@ -4,7 +4,7 @@
- dnl AM_PATH_LIBOGGFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
- dnl Test for libOggFLAC, and define LIBOGGFLAC_CFLAGS and LIBOGGFLAC_LIBS
- dnl
--AC_DEFUN(AM_PATH_LIBOGGFLAC,
-+AC_DEFUN([AM_PATH_LIBOGGFLAC],
- [dnl
- dnl Get the cflags and libraries
- dnl
-diff --git a/autoconf/ogg.m4 b/autoconf/ogg.m4
-index 89558ab..5c13745 100644
---- a/autoconf/ogg.m4
-+++ b/autoconf/ogg.m4
-@@ -5,7 +5,7 @@
- dnl AM_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
- dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
- dnl
--AC_DEFUN(AM_PATH_OGG,
-+AC_DEFUN([AM_PATH_OGG],
- [dnl
- dnl Get the cflags and libraries
- dnl
-diff --git a/autoconf/utils.m4 b/autoconf/utils.m4
-index ecf03c8..97a2e85 100644
---- a/autoconf/utils.m4
-+++ b/autoconf/utils.m4
-@@ -17,7 +17,7 @@ dnl along with this program; if not, write to the Free Software
- dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- dnl MY_DEFINE(VARIABLE)
--AC_DEFUN(MY_DEFINE,
-+AC_DEFUN([MY_DEFINE],
- [cat >> confdefs.h <<EOF
- [#define] $1 1
- EOF
-@@ -29,7 +29,7 @@ dnl action-if-yes-or-dynamic,
- dnl $5
- dnl action-if-yes,action-if-dynamic,action-if-no)
- dnl $6 $7 $8
--AC_DEFUN(CONFIG_INTERFACE,
-+AC_DEFUN([CONFIG_INTERFACE],
- [AC_ARG_ENABLE($1,[$4],
- [case "x$enable_$1" in xyes|xdynamic) $5 ;; esac])
- case "x$enable_$1" in
-@@ -53,7 +53,7 @@ dnl CHECK_DLSYM_UNDERSCORE([ACTION-IF-NEED [, ACTION IF-NOT-NEED]])
- dnl variable input:
- dnl CC CFLAGS CPPFLAGS LDFLAGS LIBS SHCFLAGS SHLD SHLDFLAGS
- dnl ac_cv_header_dlfcn_h lib_dl_opt so
--AC_DEFUN(CHECK_DLSYM_UNDERSCORE,
-+AC_DEFUN([CHECK_DLSYM_UNDERSCORE],
- [dnl Check if dlsym need a leading underscore
- AC_MSG_CHECKING(whether your dlsym() needs a leading underscore)
- AC_CACHE_VAL(timidity_cv_func_dlsym_underscore,
-@@ -144,7 +144,7 @@ esac
-
- dnl contains program from perl5
- dnl CONTAINS_INIT()
--AC_DEFUN(CONTAINS_INIT,
-+AC_DEFUN([CONTAINS_INIT],
- [dnl Some greps do not return status, grrr.
- AC_MSG_CHECKING(whether grep returns status)
- echo "grimblepritz" >grimble
-@@ -171,7 +171,7 @@ esac
- ])
-
- dnl CONTAINS(word,filename,action-if-found,action-if-not-found)
--AC_DEFUN(CONTAINS,
-+AC_DEFUN([CONTAINS],
- [if $contains "^[$1]"'[$]' $2 >/dev/null 2>&1; then
- [$3]
- else
-@@ -180,7 +180,7 @@ fi
- ])
-
- dnl SET_UNIQ_WORDS(shell-variable,words...)
--AC_DEFUN(SET_UNIQ_WORDS,
-+AC_DEFUN([SET_UNIQ_WORDS],
- [rm -f wordtmp >/dev/null 2>&1
- val=''
- for f in $2; do
-@@ -193,7 +193,7 @@ rm -f wordtmp >/dev/null 2>&1
-
- dnl WAPI_CHECK_FUNC(FUNCTION, INCLUDES, TEST-BODY,
- [ACTION-FI-FOUND [, ACTION-IF-NOT-FOUND]])
--AC_DEFUN(WAPI_CHECK_FUNC,
-+AC_DEFUN([WAPI_CHECK_FUNC],
- [AC_MSG_CHECKING(for $1)
- AC_CACHE_VAL(wapi_cv_func_$1,
- [AC_TRY_LINK([#include <windows.h>
-@@ -214,7 +214,7 @@ dnl WAPI_CHECK_LIB(LIBRARY, FUNCTION,
- dnl INCLUDES, TEST-BODY
- dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
- dnl [, OTHER-LIBRARIES]]])
--AC_DEFUN(WAPI_CHECK_LIB,
-+AC_DEFUN([WAPI_CHECK_LIB],
- [AC_MSG_CHECKING([for $2 in -l$1])
- ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
- AC_CACHE_VAL(wapi_cv_lib_$ac_lib_var,
-@@ -238,18 +238,18 @@ fi
- ])
-
- dnl EXTRACT_CPPFLAGS(CPPFLAGS-to-append,others-to-append,FLAGS)
--AC_DEFUN(EXTRACT_CPPFLAGS,
-+AC_DEFUN([EXTRACT_CPPFLAGS],
- [for f in $3; do
- case ".$f" in
- .-I?*|.-D?*) $1="[$]$1 $f" ;;
-- *) $2="[$]$1 $f" ;;
-+ *) $2="[$]$2 $f" ;;
- esac
- done
- ])
-
-
- dnl CHECK_COMPILER_OPTION(OPTIONS [, ACTION-IF-SUCCEED [, ACTION-IF-FAILED]])
--AC_DEFUN(CHECK_COMPILER_OPTION,
-+AC_DEFUN([CHECK_COMPILER_OPTION],
- [AC_MSG_CHECKING([whether -$1 option is recognized])
- ac_ccoption=`echo $1 | sed 'y%./+-%__p_%'`
- AC_CACHE_VAL(timidity_cv_ccoption_$ac_ccoption,
-@@ -282,7 +282,7 @@ dnl MY_SEARCH_LIBS(FUNCTION, LIBRARIES [, ACTION-IF-FOUND
- dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
- dnl Search for a library defining FUNC, if it's not already available.
-
--AC_DEFUN(MY_SEARCH_LIBS,
-+AC_DEFUN([MY_SEARCH_LIBS],
- [AC_CACHE_CHECK([for library containing $1], [timidity_cv_search_$1],
- [ac_func_search_save_LIBS="$LIBS"
- timidity_cv_search_$1="no"
-@@ -295,4 +295,4 @@ if test "$timidity_cv_search_$1" != "no"; then
- $3
- else :
- $4
--fi])
+ vorbis.m4
\ No newline at end of file
-+fi])
-diff --git a/autoconf/vorbis.m4 b/autoconf/vorbis.m4
-index 9910dad..0e266bd 100644
---- a/autoconf/vorbis.m4
-+++ b/autoconf/vorbis.m4
-@@ -5,7 +5,7 @@
- dnl AM_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
- dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
- dnl
--AC_DEFUN(AM_PATH_VORBIS,
-+AC_DEFUN([AM_PATH_VORBIS],
- [dnl
- dnl Get the cflags and libraries
- dnl
-diff --git a/configure.in b/configure.in
-index 9f2835b..04897e6 100644
---- a/configure.in
-+++ b/configure.in
-@@ -388,7 +388,7 @@ dnl End of X configure
-
- # Checks for header files.
- AC_HEADER_STDC
--AC_HEADER_STDBOOL
-+#AC_HEADER_STDBOOL
- AC_HEADER_SYS_WAIT
- if test "x$WATCOM_C" != xyes ; then
- AC_HEADER_TIME
-@@ -689,7 +689,7 @@ dnl arts(R): aRts
- dnl esd(e): EsounD
- dnl portaudio(p) PortAudio
- dnl vorbis(v): Ogg Vorbis
--dnl flac(F): FLAC / OggFLAC
-+dnl flac(F): FLAC
- dnl speex(S): Ogg Speex
- dnl gogo(g): MP3 GOGO
- dnl jack(j): JACK
-@@ -723,7 +723,7 @@ AC_ARG_ENABLE(audio,
+diff -Nur a/configure.in b/configure.in
+--- a/configure.in 2012-06-28 17:14:25.000000000 +0300
++++ b/configure.in 2012-10-13 18:19:14.806923746 +0200
+@@ -889,7 +889,7 @@
jack: JACK
ao: Libao
vorbis: Ogg Vorbis
- flac: FLAC / OggFLAC
+ flac: FLAC
speex: Ogg Speex
- gogo: MP3 GOGO (Only Windows is supported)],
- [ enable_audio=$enableval
-@@ -1198,11 +1198,6 @@ if test "x$CYGNUS" = xyes || test "x$MSYS" = xyes ; then
- EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS)
- LIBS="$LIBS $LIBFLAC_LIBS"
+ gogo: MP3 GOGO (Only Windows is supported)
+ ],
+@@ -1393,23 +1393,10 @@
+ AC_MSG_CHECKING(enable_audio=flac)
+ if test "x$au_enable_flac" = xyes; then
+ AC_MSG_RESULT([yes, configuring flac])
+- SYSEXTRAS="$SYSEXTRAS flac_a.c w32_libFLAC_dll.c w32_libOggFLAC_dll.c"
++ SYSEXTRAS="$SYSEXTRAS flac_a.c w32_libFLAC_dll.c"
+ AC_CHECK_HEADER(FLAC/all.h, [
+ EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_FLAC_DLL"
])
-- AM_PATH_LIBOGGFLAC([
+- AC_CHECK_HEADER(OggFLAC/all.h, [
- EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC -DAU_OGGFLAC_DLL"
-- EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS)
-- LIBS="$LIBS $LIBOGGFLAC_LIBS"
- ])
+-dnl AM_PATH_LIBFLAC([
+-dnl EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_FLAC_DLL"
+-dnl EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS)
+-dnl LIBS="$LIBS $LIBFLAC_LIBS"
+-dnl ])
+-dnl AM_PATH_LIBOGGFLAC([
+-dnl EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC -DAU_OGGFLAC_DLL"
+-dnl EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS)
+-dnl LIBS="$LIBS $LIBOGGFLAC_LIBS"
+-dnl ])
else
AC_MSG_RESULT(no)
fi
-@@ -1216,11 +1211,6 @@ else
+@@ -1423,11 +1410,6 @@
EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS)
LIBS="$LIBS $LIBFLAC_LIBS"
])
@@ -334,24 +179,10 @@ index 9f2835b..04897e6 100644
else
AC_MSG_RESULT(no)
fi
-diff --git a/interface/Makefile.am b/interface/Makefile.am
-index b02d085..1f50572 100644
---- a/interface/Makefile.am
-+++ b/interface/Makefile.am
-@@ -247,7 +247,7 @@ clean:
-
- tclIndex: $(TCLSRCS)
- rm -f tclIndex
-- echo 'auto_mkindex . *.tcl; exit' | $(WISH)
-+ echo "auto_mkindex . *.tcl" | tclsh
-
- if ENABLE_TCLTK
- install_tk = install.tk
-diff --git a/timidity/Makefile.am b/timidity/Makefile.am
-index a411d87..d5141ba 100644
---- a/timidity/Makefile.am
-+++ b/timidity/Makefile.am
-@@ -155,11 +155,7 @@ EXTRA_timidity_SOURCES = \
+diff -Nur a/timidity/Makefile.am b/timidity/Makefile.am
+--- a/timidity/Makefile.am 2008-03-30 05:31:07.000000000 +0300
++++ b/timidity/Makefile.am 2012-10-13 18:19:32.837584323 +0200
+@@ -157,11 +157,7 @@
w32_libFLAC_dll.c \
w32_libFLAC_dll.h \
w32_libFLAC_dll_g.h \
@@ -364,7 +195,7 @@ index a411d87..d5141ba 100644
calcnewt_SOURCES = calcnewt.c
-@@ -308,7 +304,7 @@ endif
+@@ -442,7 +438,7 @@
version.$(OBJEXT): version.c ../configure
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(CFLAGS) -c $(srcdir)/version.c
diff --git a/audio/TiMidity++/patches/man_pages.diff b/audio/TiMidity++/patches/man_pages.diff
deleted file mode 100644
index bdf8844325bd2..0000000000000
--- a/audio/TiMidity++/patches/man_pages.diff
+++ /dev/null
@@ -1,122 +0,0 @@
-diff --git a/doc/C/timidity.1 b/doc/C/timidity.1
---- a/doc/C/timidity.1
-+++ b/doc/C/timidity.1
-@@ -199,7 +199,7 @@
- .RE
- .TP
- .B \-a, \-\-[no\-]anti\-alias
--Turns on antialiasing. Samples are run through a lowpass filter
-+Turns on anti-aliasing. Samples are run through a lowpass filter
- before playing, which reduces aliasing noise at low resampling
- frequencies.
- .TP
-@@ -269,7 +269,7 @@
- Sets the system manufacturer ID to \fIHH\fP (where \fIHH\fP are two
- hex\-digits).
- .br
--In this option, the manufacuture ID is set unchangable. Manufacuture
-+In this option, the manufacturer ID is set unchangeable. Manufacturer
- ID from the input file would be ignored.
- .TP
- .BI b n ", \-\-default\-bank=" n
-@@ -440,14 +440,12 @@
- system has support for the X Window System.
- .TP
- .BI "\-H " n ", \-\-force\-keysig=" n
--Specify the number of key signature. MIDI file is performed with
--transposition to the key of the number of sharp (when \fIn\fP is
--positive) or flat (when \fIn\fP is negative). Valid values of \fIn\fP
--are in the interval from \fB\-7\fP to \fB7\fP. For example, if \fIn\fP
--is \fB1\fP, MIDI file with any tonality will be performed transposing
--to \fB1\fP flat (i.e., F major or D minor). Therefore, it is
--convenient to use for the accompaniment when practicing a musical
--instrument by the tonality which is easy to perform.
-+Specify the key signature. MIDI playback is transposed to the key
-+with the same number of sharps (when \fIn\fP is
-+positive) or flats (when \fIn\fP is negative). Valid values for \fIn\fP
-+range from \fB\-7\fP to \fB7\fP. For example, if \fIn\fP
-+is \fB1\fP, MIDI playback would transpose \fB1\fP flat
-+(i.e., F major or D minor).
- .TP
- .B \-h, \-\-help
- Show the help message.
-@@ -516,10 +514,10 @@
- Launch \fBTiMidity++\fP as ALSA sequencer client.
- .TP
- .B \-iW
--Windodws synthesizer interface
-+Windows synthesizer interface
- .TP
- .B \-iw
--Windodws GUI interface
-+Windows GUI interface
- .TP
- .B \-iP
- PortMIDI synthesizer interface
-@@ -740,7 +738,7 @@
- .B \-Oj
- JACK
- .TP
--.B \-Or
-+.B \-OR
- aRts
- .TP
- .B \-OA
-diff --git a/doc/C/timidity.cfg.5 b/doc/C/timidity.cfg.5
---- a/doc/C/timidity.cfg.5
-+++ b/doc/C/timidity.cfg.5
-@@ -4,7 +4,7 @@
- .SH DESCRIPTION
- The file \fBtimidity.cfg\fP describes the runtime environments of
- timidity(1): that are the path of sound font, instruments
--configurations or else.
-+configurations, etc.
- .br
- \fBTiMidity++\fP looks for the configuration file \fBtimidity.cfg\fP
- at startup, before processing any options. If it can't be accessed,
-@@ -30,7 +30,7 @@
- ${variable} # same as $variable
- .sp
- For the moment, the command which newly defines variables is not
--prepared. The undifined variable is transposed to null string.
-+prepared. The undefined variable is transposed to null string.
- .br
- The variable defined as a regular variable is the next only one.
- .TP
-@@ -89,13 +89,13 @@
- .BI "bank " "[MapID1] number"
- Selects the tone bank to modify. Patch mappings that follow will
- affect this tone bank. You can indicate specific map as a target, by
--specifing any ofthe following to \fIMapID1\fP: \fBgm2\fP, \fBsc55\fP,
-+specifying any of the following to \fIMapID1\fP: \fBgm2\fP, \fBsc55\fP,
- \fBsc88\fP, \fBsc88pro\fP, \fBsc8850\fP, \fBxg\fP and \fBxgsfx64\fP.
- .TP
- .BI "drumset " "[MapID2] number"
- Selects the drum set to modify. Patch mappings that follow will
- affect this drum set. You can indicate specific map as a target, by
--specifing any ofthe following to \fIMapID2\fP: \fBgm2drum\fP,
-+specifying any of the following to \fIMapID2\fP: \fBgm2drum\fP,
- \fBsc55drum\fP, \fBsc88drum\fP, \fBsc88prodrum\fP, \fBsc8850drum\fP,
- \fBxgdrum\fP and \fBxgsfx126\fP.
- .TP
-@@ -363,7 +363,7 @@
- .TP
- .BI "#extension timeout " "program second"
- Specifies the time\-out value of the \fIprogram\fP. If any notes
--played with the tone number \fIprogram\fP are suspended more than
-+played with the tone number \fIprogram\fP are suspended for more than
- \fIsecond\fP seconds, \fBTiMidity++\fP kills the notes.
- .TP
- .BI "#extension copydrumset " drumset
-diff --git a/doc/ja_JP.eucJP/timidity.1 b/doc/ja_JP.eucJP/timidity.1
---- a/doc/ja_JP.eucJP/timidity.1
-+++ b/doc/ja_JP.eucJP/timidity.1
-@@ -745,7 +745,7 @@
- .B \-Oj
- JACK
- .TP
--.B \-Or
-+.B \-OR
- aRts
- .TP
- .B \-OA
diff --git a/audio/TiMidity++/patches/other.diff b/audio/TiMidity++/patches/other.diff
deleted file mode 100644
index 7ca3e39645466..0000000000000
--- a/audio/TiMidity++/patches/other.diff
+++ /dev/null
@@ -1,1008 +0,0 @@
-diff --git a/ChangeLog b/ChangeLog
-index d7d211d..ad57852 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,29 @@
-+2004-10-21 Henrique de Moraes Holschuh <hmh@debian.org>
-+
-+ * timidity/mod2midi.c (Voice_Play,Voice_SetPeriod):
-+ improve the code path when period2note returns -1
-+
-+2004-10-21 Eric A. Welsh <ewelsh@ccb.wustl.edu>
-+
-+ * timidity/mod2midi.c (period2note):
-+ initialize *finetune when returning a bad period
-+ * timidity/mod2midi.c (load_module_samples):
-+ samples without names were causing NULL pointer reads
-+ * timidity/mod2midi.c (period2note):
-+ delete extra \n
-+
-+2004-10-18 Eric A. Welsh <ewelsh@ccb.wustl.edu>
-+
-+ * libunimod/mlutil.c (getAmigaPeriod): Avoid division by zero
-+ * timidity/mod2midi.c: Change all VERB_NORMAL and VERB_VERBOSE
-+ messages to VERB_NOISY.
-+
-+2004-10-17 URABE Shyouhei <shyouhei@ice.uec.ac.jp>
-+
-+ * libunimod/mloader.c (SL_LoadSamples): too many arguments to
-+ function `FreeSampleList'
-+ * timidity/aq.c: fix wrong prototype (int -> void)
-+
- 2004-10-03 URABE Shyouhei <shyouhei@ice.uec.ac.jp>
-
- * NEWS: Add new entry for 2.13.2
-diff --git a/interface/alsaseq_c.c b/interface/alsaseq_c.c
-index ac7b918..8d608a7 100644
---- a/interface/alsaseq_c.c
-+++ b/interface/alsaseq_c.c
-@@ -500,6 +500,7 @@ static void stop_playing(void)
-
- static void doit(struct seq_context *ctxp)
- {
-+ int err, timeout_val = 10;
- for (;;) {
- while (snd_seq_event_input_pending(ctxp->handle, 1)) {
- if (do_sequencer(ctxp))
-@@ -532,10 +533,20 @@ static void doit(struct seq_context *ctxp)
- struct timeval timeout;
- FD_ZERO(&rfds);
- FD_SET(ctxp->fd, &rfds);
-- timeout.tv_sec = 0;
-- timeout.tv_usec = 10000; /* 10ms */
-- if (select(ctxp->fd + 1, &rfds, NULL, NULL, &timeout) < 0)
-+ timeout.tv_sec = (timeout_val / 1000);
-+ timeout.tv_usec = (timeout_val % 1000) * 1000;
-+ err = select(ctxp->fd + 1, &rfds, NULL, NULL, timeout_val < 0 ? NULL : &timeout);
-+ if (err < 0) {
- goto __done;
-+ } else if (err == 0) {
-+ if (timeout_val < 1024) {
-+ timeout_val+=timeout_val;
-+ } else {
-+ timeout_val = -1;
-+ }
-+ } else {
-+ timeout_val = 10;
-+ }
- }
- }
-
-diff --git a/interface/xaw_i.c b/interface/xaw_i.c
-index 7efd6dd..84b6885 100644
---- a/interface/xaw_i.c
-+++ b/interface/xaw_i.c
-@@ -261,7 +261,7 @@ int amplitude = DEFAULT_AMPLIFICATION;
- String bitmapdir = XAW_BITMAP_DIR;
- Boolean arrangetitle,savelist;
- static char **current_flist = NULL;
--static int voices = 0, last_voice = 0, voices_num_width;
-+static last_voice = 0, voices_num_width;
- static int maxentry_on_a_menu = 0,submenu_n = 0;
- #define OPTIONS_WINDOW 1
- #define FLIST_WINDOW 2
-diff --git a/libunimod/mloader.c b/libunimod/mloader.c
-index 943b307..bea58df 100644
---- a/libunimod/mloader.c
-+++ b/libunimod/mloader.c
-@@ -636,14 +636,14 @@ SL_LoadSamples (void)
- s->sample->flags = (s->sample->flags & ~SF_FORMATMASK) | s->outfmt;
- if (s->sample->data == NULL)
- {
-- FreeSampleList (musiclist);
-+ FreeSampleList ();
- return 1;
- }
- }
- s = s->next;
- }
-
-- FreeSampleList (musiclist);
-+ FreeSampleList ();
- return 0;
- }
-
-diff --git a/libunimod/mlutil.c b/libunimod/mlutil.c
-index 3008a53..e147e8a 100644
---- a/libunimod/mlutil.c
-+++ b/libunimod/mlutil.c
-@@ -321,6 +321,7 @@ ULONG getAmigaPeriod (UBYTE flags, ULONG period)
- if (flags & UF_LINEAR)
- {
- period = lintab[period % 768] >> (period / 768);
-+ if (period < 1) period = 1;
- period = (8363L * 1712L) / period;
- }
-
-diff --git a/timidity/aRts_a.c b/timidity/aRts_a.c
-index 0140a47..6bacce3 100644
---- a/timidity/aRts_a.c
-+++ b/timidity/aRts_a.c
-@@ -56,6 +56,8 @@
- #include "playmidi.h"
- #include "miditrace.h"
-
-+static int arts_init_state = 0; /* 0=no init, 1=arts_init, 2=arts_free */
-+static int arts_atexit = 0; /* 1=atexit handler has been installed */
- static arts_stream_t stream = 0;
- static int server_buffer = 0;
- static int output_count = 0;
-@@ -64,9 +66,11 @@ static int open_output(void); /* 0=success, 1=warning, -1=fatal error */
- static void close_output(void);
- static int output_data(char *buf, int32 nbytes);
- static int acntl(int request, void *arg);
--static int detect(void);
-
--/* export the playback mode */
-+/* export the playback mode. aRts cannot support auto-detection properly
-+ * see TiMidity bug report #35 on Kagemai. Do not add any functionality
-+ * that would require TiMidity to call arts_init() again after an
-+ * arts_free(), it will blow up */
-
- #define dpm arts_play_mode
-
-@@ -82,17 +86,16 @@ PlayMode dpm = {
- open_output,
- close_output,
- output_data,
-- acntl,
-- detect
-+ acntl
- };
-
--static int detect(void)
-+static void arts_shutdown(void)
- {
-- if (arts_init() == 0) {
-- arts_free();
-- return 1; /* ok, found */
-+ if(arts_init_state == 1) {
-+ close_output();
-+ arts_free();
-+ arts_init_state = 2; /* paranoia */
- }
-- return 0;
- }
-
- /*************************************************************************/
-@@ -114,10 +117,23 @@ static int open_output(void)
- channels = (dpm.encoding & PE_MONO) ? 1 : 2;
-
- /* Open the audio device */
-- if((i = arts_init()) != 0)
-- {
-- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s",
-- dpm.name, arts_error_text(i));
-+ switch (arts_init_state) {
-+ case 0:
-+ if((i = arts_init()) != 0)
-+ {
-+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s",
-+ dpm.name, arts_error_text(i));
-+ return -1;
-+ }
-+ arts_init_state = 1;
-+ if (!arts_atexit) {
-+ atexit(arts_shutdown);
-+ arts_atexit = 1;
-+ }
-+ break;
-+ case 2:
-+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
-+ "TiMidity aRts bug: open_output() after close_output() not supported");
- return -1;
- }
- stream = arts_play_stream(dpm.rate,
-@@ -186,7 +202,6 @@ static void close_output(void)
- if(stream == 0)
- return;
- arts_close_stream(stream);
-- arts_free();
- stream = 0;
- }
-
-@@ -197,7 +212,6 @@ static int acntl(int request, void *arg)
- {
- case PM_REQ_DISCARD: /* Discard stream */
- arts_close_stream(stream);
-- arts_free();
- stream=NULL;
- return 0;
- case PM_REQ_RATE: /* Change sample rate */
-diff --git a/timidity/aq.c b/timidity/aq.c
-index af2f603..bedd737 100644
---- a/timidity/aq.c
-+++ b/timidity/aq.c
-@@ -87,7 +87,7 @@ static int32 estimate_queue_size(void);
-
- /* effect.c */
- extern void init_effect(void);
--extern int do_effect(int32* buf, int32 count);
-+extern void do_effect(int32* buf, int32 count);
-
- int aq_calc_fragsize(void)
- {
-diff --git a/timidity/common.c b/timidity/common.c
-index 2fd5ea1..1ff7445 100644
---- a/timidity/common.c
-+++ b/timidity/common.c
-@@ -27,10 +27,16 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
--#include <time.h>
--#ifdef HAVE_SYS_TIME_H
--#include <sys/time.h>
--#endif /* HAVE_SYS_TIME_H */
-+#if TIME_WITH_SYS_TIME
-+# include <sys/time.h>
-+# include <time.h>
-+#else
-+# if HAVE_SYS_TIME_H
-+# include <sys/time.h>
-+# else
-+# include <time.h>
-+# endif
-+#endif /* TIME_WITH_SYS_TIME */
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif /* HAVE_SYS_TYPES_H */
-@@ -405,7 +411,8 @@ struct timidity_file *open_file(char *name, int decompress, int noise_mode)
- }
-
- /* First try the given name */
-- strncpy(current_filename, url_unexpand_home_dir(name), 1023);
-+ /* strncpy(current_filename, url_unexpand_home_dir(name), 1023); */
-+ strncpy(current_filename, name, 1023);
- current_filename[1023]='\0';
-
- if(noise_mode)
-diff --git a/timidity/flac_a.c b/timidity/flac_a.c
-index 698fd29..e28acd6 100644
---- a/timidity/flac_a.c
-+++ b/timidity/flac_a.c
-@@ -45,9 +45,6 @@
- #endif
-
- #include <FLAC/all.h>
--#ifdef AU_OGGFLAC
--#include <OggFLAC/stream_encoder.h>
--#endif
-
- #ifdef AU_FLAC_DLL
- #include "w32_libFLAC_dll_g.h"
-@@ -78,11 +75,7 @@ PlayMode dpm = {
- DEFAULT_RATE, PE_SIGNED|PE_16BIT, PF_PCM_STREAM,
- -1,
- {0}, /* default: get all the buffer fragments you can */
--#ifndef AU_OGGFLAC
-- "FLAC", 'F',
--#else
- "FLAC / OggFLAC", 'F',
--#endif /* AU_OGGFLAC */
- NULL,
- open_output,
- close_output,
-@@ -100,28 +93,22 @@ typedef struct {
- unsigned long out_bytes;
- union {
- FLAC__StreamEncoderState flac;
-- FLAC__SeekableStreamEncoderState s_flac;
--#ifdef AU_OGGFLAC
-- OggFLAC__StreamEncoderState ogg;
--#endif
-+ FLAC__StreamEncoderState s_flac;
-+ FLAC__StreamEncoderState ogg;
- } state;
- union {
- union {
- FLAC__StreamEncoder *stream;
-- FLAC__SeekableStreamEncoder *s_stream;
-+ FLAC__StreamEncoder *s_stream;
- } flac;
--#ifdef AU_OGGFLAC
- union {
-- OggFLAC__StreamEncoder *stream;
-+ FLAC__StreamEncoder *stream;
- } ogg;
--#endif
- } encoder;
- } FLAC_ctx;
-
- typedef struct {
--#ifdef AU_OGGFLAC
- int isogg;
--#endif
- int verify;
- int padding;
- int blocksize;
-@@ -138,9 +125,7 @@ typedef struct {
-
- /* default compress level is 5 */
- FLAC_options flac_options = {
--#ifdef AU_OGGFLAC
- 0, /* isogg */
--#endif
- 0, /* verify */
- 4096, /* padding */
- 4608, /* blocksize */
-@@ -158,13 +143,11 @@ FLAC_options flac_options = {
- static long serial_number = 0;
- FLAC_ctx *flac_ctx = NULL;
-
--#ifdef AU_OGGFLAC
- static FLAC__StreamEncoderWriteStatus
--ogg_stream_encoder_write_callback(const OggFLAC__StreamEncoder *encoder,
-+ogg_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
- const FLAC__byte buffer[],
- unsigned bytes, unsigned samples,
- unsigned current_frame, void *client_data);
--#endif
- static FLAC__StreamEncoderWriteStatus
- flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
- const FLAC__byte buffer[],
-@@ -174,13 +157,10 @@ static void flac_stream_encoder_metadata_callback(const FLAC__StreamEncoder *enc
- const FLAC__StreamMetadata *metadata,
- void *client_data);
- static FLAC__StreamEncoderWriteStatus
--flac_seekable_stream_encoder_write_callback(const FLAC__SeekableStreamEncoder *encoder,
-+flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
- const FLAC__byte buffer[],
- unsigned bytes, unsigned samples,
- unsigned current_frame, void *client_data);
--static void flac_seekable_stream_encoder_metadata_callback(const FLAC__SeekableStreamEncoder *encoder,
-- const FLAC__StreamMetadata *metadata,
-- void *client_data);
-
- /* preset */
- void flac_set_compression_level(int compression_level)
-@@ -278,12 +258,10 @@ void flac_set_option_verify(int verify)
- {
- flac_options.verify = verify;
- }
--#ifdef AU_OGGFLAC
- void flac_set_option_oggflac(int isogg)
- {
- flac_options.isogg = isogg;
- }
--#endif
-
- static int flac_session_close()
- {
-@@ -295,19 +273,17 @@ static int flac_session_close()
- dpm.fd = -1;
-
- if (ctx != NULL) {
--#ifdef AU_OGGFLAC
- if (flac_options.isogg) {
- if (ctx->encoder.ogg.stream) {
-- OggFLAC__stream_encoder_finish(ctx->encoder.ogg.stream);
-- OggFLAC__stream_encoder_delete(ctx->encoder.ogg.stream);
-+ FLAC__stream_encoder_finish(ctx->encoder.ogg.stream);
-+ FLAC__stream_encoder_delete(ctx->encoder.ogg.stream);
- }
- }
- else
--#endif /* AU_OGGFLAC */
- if (flac_options.seekable) {
- if (ctx->encoder.flac.s_stream) {
-- FLAC__seekable_stream_encoder_finish(ctx->encoder.flac.s_stream);
-- FLAC__seekable_stream_encoder_delete(ctx->encoder.flac.s_stream);
-+ FLAC__stream_encoder_finish(ctx->encoder.flac.s_stream);
-+ FLAC__stream_encoder_delete(ctx->encoder.flac.s_stream);
- }
- }
- else
-@@ -371,17 +347,16 @@ static int flac_output_open(const char *fname, const char *comment)
- metadata[num_metadata++] = &padding;
- }
-
--#ifdef AU_OGGFLAC
- if (flac_options.isogg) {
-- if ((ctx->encoder.ogg.stream = OggFLAC__stream_encoder_new()) == NULL) {
-+ if ((ctx->encoder.ogg.stream = FLAC__stream_encoder_new()) == NULL) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create OggFLAC stream");
- flac_session_close();
- return -1;
- }
-
-- OggFLAC__stream_encoder_set_channels(ctx->encoder.ogg.stream, nch);
-+ FLAC__stream_encoder_set_channels(ctx->encoder.ogg.stream, nch);
- /* 16bps only */
-- OggFLAC__stream_encoder_set_bits_per_sample(ctx->encoder.ogg.stream, 16);
-+ FLAC__stream_encoder_set_bits_per_sample(ctx->encoder.ogg.stream, 16);
-
- /* set sequential number for serial */
- serial_number++;
-@@ -389,9 +364,9 @@ static int flac_output_open(const char *fname, const char *comment)
- srand(time(NULL));
- serial_number = rand();
- }
-- OggFLAC__stream_encoder_set_serial_number(ctx->encoder.ogg.stream, serial_number);
-+ FLAC__stream_encoder_set_ogg_serial_number(ctx->encoder.ogg.stream, serial_number);
-
-- OggFLAC__stream_encoder_set_verify(ctx->encoder.ogg.stream, flac_options.verify);
-+ FLAC__stream_encoder_set_verify(ctx->encoder.ogg.stream, flac_options.verify);
-
- if (!FLAC__format_sample_rate_is_valid(dpm.rate)) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "invalid sampling rate %d",
-@@ -399,53 +374,52 @@ static int flac_output_open(const char *fname, const char *comment)
- flac_session_close();
- return -1;
- }
-- OggFLAC__stream_encoder_set_sample_rate(ctx->encoder.ogg.stream, dpm.rate);
-+ FLAC__stream_encoder_set_sample_rate(ctx->encoder.ogg.stream, dpm.rate);
-
-- OggFLAC__stream_encoder_set_qlp_coeff_precision(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision);
-+ FLAC__stream_encoder_set_qlp_coeff_precision(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision);
- /* expensive! */
-- OggFLAC__stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision_search);
-+ FLAC__stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.ogg.stream, flac_options.qlp_coeff_precision_search);
-
- if (nch == 2) {
-- OggFLAC__stream_encoder_set_do_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.mid_side);
-- OggFLAC__stream_encoder_set_loose_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.adaptive_mid_side);
-+ FLAC__stream_encoder_set_do_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.mid_side);
-+ FLAC__stream_encoder_set_loose_mid_side_stereo(ctx->encoder.ogg.stream, flac_options.adaptive_mid_side);
- }
-
-- OggFLAC__stream_encoder_set_max_lpc_order(ctx->encoder.ogg.stream, flac_options.max_lpc_order);
-- OggFLAC__stream_encoder_set_min_residual_partition_order(ctx->encoder.ogg.stream, flac_options.min_residual_partition_order);
-- OggFLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.ogg.stream, flac_options.max_residual_partition_order);
--
-- OggFLAC__stream_encoder_set_blocksize(ctx->encoder.ogg.stream, flac_options.blocksize);
-+ FLAC__stream_encoder_set_max_lpc_order(ctx->encoder.ogg.stream, flac_options.max_lpc_order);
-+ FLAC__stream_encoder_set_min_residual_partition_order(ctx->encoder.ogg.stream, flac_options.min_residual_partition_order);
-+ FLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.ogg.stream, flac_options.max_residual_partition_order);
-
-- OggFLAC__stream_encoder_set_client_data(ctx->encoder.ogg.stream, ctx);
-+ FLAC__stream_encoder_set_blocksize(ctx->encoder.ogg.stream, flac_options.blocksize);
-
- if (0 < num_metadata)
-- OggFLAC__stream_encoder_set_metadata(ctx->encoder.ogg.stream, metadata, num_metadata);
--
-- /* set callback */
-- OggFLAC__stream_encoder_set_write_callback(ctx->encoder.ogg.stream, ogg_stream_encoder_write_callback);
--
-- ctx->state.ogg = OggFLAC__stream_encoder_init(ctx->encoder.ogg.stream);
-- if (ctx->state.ogg != OggFLAC__STREAM_ENCODER_OK) {
-+ FLAC__stream_encoder_set_metadata(ctx->encoder.ogg.stream, metadata, num_metadata);
-+
-+ ctx->state.ogg = FLAC__stream_encoder_init_ogg_stream(ctx->encoder.ogg.stream,
-+ 0,
-+ ogg_stream_encoder_write_callback,
-+ 0, 0, 0,
-+ ctx);
-+ if (ctx->state.ogg != FLAC__STREAM_ENCODER_OK) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create OggFLAC state (%s)",
-- OggFLAC__StreamEncoderStateString[ctx->state.ogg]);
-+ FLAC__StreamEncoderStateString[ctx->state.ogg]);
- flac_session_close();
- return -1;
- }
- }
- else
--#endif /* AU_OGGFLAC */
- if (flac_options.seekable) {
-- if ((ctx->encoder.flac.s_stream = FLAC__seekable_stream_encoder_new()) == NULL) {
-+ /* FLAC SEEKABLE STREAM */
-+ if ((ctx->encoder.flac.s_stream = FLAC__stream_encoder_new()) == NULL) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC stream");
- flac_session_close();
- return -1;
- }
-
-- FLAC__seekable_stream_encoder_set_channels(ctx->encoder.flac.s_stream, nch);
-+ FLAC__stream_encoder_set_channels(ctx->encoder.flac.s_stream, nch);
- /* 16bps only */
-- FLAC__seekable_stream_encoder_set_bits_per_sample(ctx->encoder.flac.s_stream, 16);
-+ FLAC__stream_encoder_set_bits_per_sample(ctx->encoder.flac.s_stream, 16);
-
-- FLAC__seekable_stream_encoder_set_verify(ctx->encoder.flac.s_stream, flac_options.verify);
-+ FLAC__stream_encoder_set_verify(ctx->encoder.flac.s_stream, flac_options.verify);
-
- if (!FLAC__format_sample_rate_is_valid(dpm.rate)) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "invalid sampling rate %d",
-@@ -453,44 +427,40 @@ static int flac_output_open(const char *fname, const char *comment)
- flac_session_close();
- return -1;
- }
-- FLAC__seekable_stream_encoder_set_sample_rate(ctx->encoder.flac.s_stream, dpm.rate);
-+ FLAC__stream_encoder_set_sample_rate(ctx->encoder.flac.s_stream, dpm.rate);
-
-- FLAC__seekable_stream_encoder_set_qlp_coeff_precision(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision);
-+ FLAC__stream_encoder_set_qlp_coeff_precision(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision);
- /* expensive! */
-- FLAC__seekable_stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision_search);
-+ FLAC__stream_encoder_set_do_qlp_coeff_prec_search(ctx->encoder.flac.s_stream, flac_options.qlp_coeff_precision_search);
-
- if (nch == 2) {
-- FLAC__seekable_stream_encoder_set_do_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.mid_side);
-- FLAC__seekable_stream_encoder_set_loose_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.adaptive_mid_side);
-+ FLAC__stream_encoder_set_do_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.mid_side);
-+ FLAC__stream_encoder_set_loose_mid_side_stereo(ctx->encoder.flac.s_stream, flac_options.adaptive_mid_side);
- }
-
-- FLAC__seekable_stream_encoder_set_max_lpc_order(ctx->encoder.flac.s_stream, flac_options.max_lpc_order);
-- FLAC__seekable_stream_encoder_set_min_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.min_residual_partition_order);
-- FLAC__seekable_stream_encoder_set_max_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.max_residual_partition_order);
-+ FLAC__stream_encoder_set_max_lpc_order(ctx->encoder.flac.s_stream, flac_options.max_lpc_order);
-+ FLAC__stream_encoder_set_min_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.min_residual_partition_order);
-+ FLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.flac.s_stream, flac_options.max_residual_partition_order);
-
-- FLAC__seekable_stream_encoder_set_blocksize(ctx->encoder.flac.s_stream, flac_options.blocksize);
-- FLAC__seekable_stream_encoder_set_client_data(ctx->encoder.flac.s_stream, ctx);
-+ FLAC__stream_encoder_set_blocksize(ctx->encoder.flac.s_stream, flac_options.blocksize);
-
- if (0 < num_metadata)
-- FLAC__seekable_stream_encoder_set_metadata(ctx->encoder.flac.s_stream, metadata, num_metadata);
-+ FLAC__stream_encoder_set_metadata(ctx->encoder.flac.s_stream, metadata, num_metadata);
-
-- /* set callback */
--/* FLAC__seekable_stream_encoder_set_metadata_callback(ctx->encoder.flac.s_stream, flac_seekable_stream_encoder_metadata_callback); /* */
--#ifndef __BORLANDC__
-- FLAC__stream_encoder_set_metadata_callback(ctx->encoder.flac.s_stream, flac_seekable_stream_encoder_metadata_callback); /* */
--#endif
-- FLAC__seekable_stream_encoder_set_write_callback(ctx->encoder.flac.s_stream, flac_seekable_stream_encoder_write_callback);
-+ ctx->state.s_flac = FLAC__stream_encoder_init_stream(
-+ ctx->encoder.flac.s_stream,
-+ flac_stream_encoder_write_callback,
-+ 0, 0, 0,
-+ ctx);
-
-- ctx->state.s_flac = FLAC__seekable_stream_encoder_init(ctx->encoder.flac.s_stream);
-- if (ctx->state.s_flac != FLAC__SEEKABLE_STREAM_ENCODER_OK) {
-+ if (ctx->state.s_flac != FLAC__STREAM_ENCODER_OK) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC state (%s)",
-- FLAC__SeekableStreamEncoderStateString[ctx->state.s_flac]);
-+ FLAC__StreamEncoderStateString[ctx->state.s_flac]);
- flac_session_close();
- return -1;
- }
-- }
-- else
-- {
-+ } else {
-+ /* NON SEEKABLE STREAM */
- if ((ctx->encoder.flac.stream = FLAC__stream_encoder_new()) == NULL) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC stream");
- flac_session_close();
-@@ -525,16 +495,16 @@ static int flac_output_open(const char *fname, const char *comment)
- FLAC__stream_encoder_set_max_residual_partition_order(ctx->encoder.flac.stream, flac_options.max_residual_partition_order);
-
- FLAC__stream_encoder_set_blocksize(ctx->encoder.flac.stream, flac_options.blocksize);
-- FLAC__stream_encoder_set_client_data(ctx->encoder.flac.stream, ctx);
-
- if (0 < num_metadata)
- FLAC__stream_encoder_set_metadata(ctx->encoder.flac.stream, metadata, num_metadata);
-
-- /* set callback */
-- FLAC__stream_encoder_set_metadata_callback(ctx->encoder.flac.stream, flac_stream_encoder_metadata_callback);
-- FLAC__stream_encoder_set_write_callback(ctx->encoder.flac.stream, flac_stream_encoder_write_callback);
--
-- ctx->state.flac = FLAC__stream_encoder_init(ctx->encoder.flac.stream);
-+ ctx->state.flac = FLAC__stream_encoder_init_stream(ctx->encoder.flac.stream,
-+ flac_stream_encoder_write_callback,
-+ 0,
-+ 0,
-+ flac_stream_encoder_metadata_callback,
-+ ctx);
- if (ctx->state.flac != FLAC__STREAM_ENCODER_OK) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot create FLAC state (%s)",
- FLAC__StreamEncoderStateString[ctx->state.flac]);
-@@ -550,7 +520,6 @@ static int auto_flac_output_open(const char *input_filename, const char *title)
- {
- char *output_filename;
-
--#ifdef AU_OGGFLAC
- if (flac_options.isogg) {
- #ifndef __W32G__
- output_filename = create_auto_output_name(input_filename, "ogg", NULL, 0);
-@@ -559,7 +528,6 @@ static int auto_flac_output_open(const char *input_filename, const char *title)
- #endif
- }
- else
--#endif /* AU_OGGFLAC */
- {
- #ifndef __W32G__
- output_filename = create_auto_output_name(input_filename, "flac", NULL, 0);
-@@ -608,12 +576,10 @@ static int open_output(void)
- exclude_enc |= PE_BYTESWAP | PE_24BIT;
- dpm.encoding = validate_encoding(dpm.encoding, include_enc, exclude_enc);
-
--#ifdef AU_OGGFLAC
- if (flac_options.isogg) {
- ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "*** cannot write back seekpoints when encoding to Ogg yet ***");
- ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "*** and stream end will not be written. ***");
- }
--#endif
-
- #ifndef __W32G__
- if(dpm.name == NULL) {
-@@ -638,9 +604,8 @@ static int open_output(void)
- return 0;
- }
-
--#ifdef AU_OGGFLAC
- static FLAC__StreamEncoderWriteStatus
--ogg_stream_encoder_write_callback(const OggFLAC__StreamEncoder *encoder,
-+ogg_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
- const FLAC__byte buffer[],
- unsigned bytes, unsigned samples,
- unsigned current_frame, void *client_data)
-@@ -654,7 +619,6 @@ ogg_stream_encoder_write_callback(const OggFLAC__StreamEncoder *encoder,
- else
- return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
- }
--#endif
- static FLAC__StreamEncoderWriteStatus
- flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder,
- const FLAC__byte buffer[],
-@@ -675,26 +639,6 @@ static void flac_stream_encoder_metadata_callback(const FLAC__StreamEncoder *enc
- void *client_data)
- {
- }
--static FLAC__StreamEncoderWriteStatus
--flac_seekable_stream_encoder_write_callback(const FLAC__SeekableStreamEncoder *encoder,
-- const FLAC__byte buffer[],
-- unsigned bytes, unsigned samples,
-- unsigned current_frame, void *client_data)
--{
-- FLAC_ctx *ctx = (FLAC_ctx *)client_data;
--
-- ctx->out_bytes += bytes;
--
-- if (write(dpm.fd, buffer, bytes) == bytes)
-- return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
-- else
-- return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
--}
--static void flac_seekable_stream_encoder_metadata_callback(const FLAC__SeekableStreamEncoder *encoder,
-- const FLAC__StreamMetadata *metadata,
-- void *client_data)
--{
--}
-
- static int output_data(char *buf, int32 nbytes)
- {
-@@ -723,21 +667,18 @@ static int output_data(char *buf, int32 nbytes)
- oggbuf[i] = *s++;
- }
-
--#ifdef AU_OGGFLAC
- if (flac_options.isogg) {
-- ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream);
-- if (ctx->state.ogg != OggFLAC__STREAM_ENCODER_OK) {
-- if (ctx->state.ogg == OggFLAC__STREAM_ENCODER_FLAC_STREAM_ENCODER_ERROR) {
-+ ctx->state.ogg = FLAC__stream_encoder_get_state(ctx->encoder.ogg.stream);
-+ if (ctx->state.ogg != FLAC__STREAM_ENCODER_OK) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "FLAC stream verify error (%s)",
-- FLAC__StreamDecoderStateString[OggFLAC__stream_encoder_get_verify_decoder_state(ctx->encoder.ogg.stream)]);
-- }
-+ FLAC__StreamEncoderStateString[FLAC__stream_encoder_get_verify_decoder_state(ctx->encoder.ogg.stream)]);
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode OggFLAC stream (%s)",
-- OggFLAC__StreamEncoderStateString[ctx->state.ogg]);
-+ FLAC__StreamEncoderStateString[ctx->state.ogg]);
- flac_session_close();
- return -1;
- }
-
-- if (!OggFLAC__stream_encoder_process_interleaved(ctx->encoder.ogg.stream, oggbuf,
-+ if (!FLAC__stream_encoder_process_interleaved(ctx->encoder.ogg.stream, oggbuf,
- nbytes / nch / 2)) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode OggFLAC stream");
- flac_session_close();
-@@ -745,24 +686,23 @@ static int output_data(char *buf, int32 nbytes)
- }
- }
- else
--#endif /* AU_OGGFLAC */
- if (flac_options.seekable) {
-- ctx->state.s_flac = FLAC__seekable_stream_encoder_get_state(ctx->encoder.flac.s_stream);
-+ ctx->state.s_flac = FLAC__stream_encoder_get_state(ctx->encoder.flac.s_stream);
- if (ctx->state.s_flac != FLAC__STREAM_ENCODER_OK) {
- if (ctx->state.s_flac == FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR |
- FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "FLAC stream verify error (%s)",
-- FLAC__SeekableStreamDecoderStateString[FLAC__seekable_stream_encoder_get_verify_decoder_state(ctx->encoder.flac.s_stream)]);
-+ FLAC__StreamDecoderStateString[FLAC__stream_encoder_get_verify_decoder_state(ctx->encoder.flac.s_stream)]);
- }
- else {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode FLAC stream (%s)",
-- FLAC__SeekableStreamEncoderStateString[ctx->state.s_flac]);
-+ FLAC__StreamEncoderStateString[ctx->state.s_flac]);
- }
- flac_session_close();
- return -1;
- }
-
-- if (!FLAC__seekable_stream_encoder_process_interleaved(ctx->encoder.flac.s_stream, oggbuf,
-+ if (!FLAC__stream_encoder_process_interleaved(ctx->encoder.flac.s_stream, oggbuf,
- nbytes / nch / 2 )) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "cannot encode FLAC stream");
- flac_session_close();
-@@ -814,19 +754,17 @@ static void close_output(void)
- }
-
- if (flac_options.isogg) {
--#ifdef AU_OGGFLAC
-- if ((ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != OggFLAC__STREAM_ENCODER_OK) {
-+ if ((ctx->state.ogg = FLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != FLAC__STREAM_ENCODER_OK) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid (%s)",
-- OggFLAC__StreamEncoderStateString[ctx->state.ogg]);
-+ FLAC__StreamEncoderStateString[ctx->state.ogg]);
- /* fall through */
- }
- }
- else
--#endif /* AU_OGGFLAC */
- if (flac_options.seekable) {
-- if ((ctx->state.s_flac = FLAC__seekable_stream_encoder_get_state(ctx->encoder.flac.s_stream)) != FLAC__SEEKABLE_STREAM_ENCODER_OK) {
-+ if ((ctx->state.s_flac = FLAC__stream_encoder_get_state(ctx->encoder.flac.s_stream)) != FLAC__STREAM_ENCODER_OK) {
- ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "FLAC stream encoder is invalid (%s)",
-- FLAC__SeekableStreamEncoderStateString[ctx->state.s_flac]);
-+ FLAC__StreamEncoderStateString[ctx->state.s_flac]);
- /* fall through */
- }
- }
-diff --git a/timidity/mod2midi.c b/timidity/mod2midi.c
-index 72c0293..2f86cf3 100644
---- a/timidity/mod2midi.c
-+++ b/timidity/mod2midi.c
-@@ -195,7 +195,8 @@ period2note (int period, int *finetune)
-
- if (period < 14 || period > 13696)
- {
-- ctl->cmsg(CMSG_WARNING, VERB_NORMAL, "BAD period %d\n", period);
-+ ctl->cmsg(CMSG_WARNING, VERB_NOISY, "BAD period %d", period);
-+ *finetune = 0;
- return -1;
- }
-
-@@ -266,11 +267,13 @@ Voice_SetPeriod (UBYTE v, ULONG period)
- return;
-
- new_noteon = period2note (ModV[v].period, &bend);
-+ if (new_noteon >= 0) {
- #ifndef TRACE_SLIDE_NOTES
-- bend += (new_noteon - ModV[v].noteon) << 13;
-- new_noteon = ModV[v].noteon;
-+ bend += (new_noteon - ModV[v].noteon) << 13;
-+ new_noteon = ModV[v].noteon;
- #endif
-- bend = WHEEL_VALUE(bend);
-+ bend = WHEEL_VALUE(bend);
-+ }
-
- if (ModV[v].noteon != new_noteon)
- {
-@@ -278,7 +281,7 @@ Voice_SetPeriod (UBYTE v, ULONG period)
-
- if (new_noteon < 0)
- {
-- ctl->cmsg(CMSG_WARNING, VERB_VERBOSE,
-+ ctl->cmsg(CMSG_WARNING, VERB_NOISY,
- "Strange period %d",
- ModV[v].period);
- return;
-@@ -330,13 +333,13 @@ Voice_Play (UBYTE v, SAMPLE * s, ULONG start)
- Voice_Stop (v);
-
- new_noteon = period2note (ModV[v].period, &bend);
-- bend = WHEEL_VALUE(bend);
- if (new_noteon < 0) {
-- ctl->cmsg(CMSG_WARNING, VERB_VERBOSE,
-+ ctl->cmsg(CMSG_WARNING, VERB_NOISY,
- "Strange period %d",
- ModV[v].period);
- return;
- }
-+ bend = WHEEL_VALUE(bend);
-
- ModV[v].noteon = new_noteon;
- ModV[v].time = at;
-@@ -590,9 +593,13 @@ void load_module_samples (SAMPLE * s, int numsamples, int ntsc)
- special_patch[i]->sample = sp =
- (Sample *)safe_malloc(sizeof(Sample));
- memset(sp, 0, sizeof(Sample));
-- strncpy(name, s->samplename, 22);
-- name[22] = '\0';
-- code_convert(name, NULL, 23, NULL, "ASCII");
-+ memset(name, 0, 23 * sizeof(char));
-+ if (s->samplename != NULL)
-+ {
-+ strncpy(name, s->samplename, 22);
-+ name[22] = '\0';
-+ code_convert(name, NULL, 23, NULL, "ASCII");
-+ }
- if(name[0] == '\0')
- special_patch[i]->name = NULL;
- else
-diff --git a/timidity/reverb.c b/timidity/reverb.c
-index 2bc8dea..a5b4c06 100644
---- a/timidity/reverb.c
-+++ b/timidity/reverb.c
-@@ -1624,8 +1624,8 @@ static void do_ch_reverb_panning_delay(int32 *buf, int32 count, InfoDelay3 *info
- buf[i] += r;
- buf[++i] += l;
-
-- if (++index0 == buf_size) {index0 = 0;}
-- if (++buf_index == buf_size) {buf_index = 0;}
-+ if (index0++ == buf_size) {index0 = 0;}
-+ if (buf_index++ == buf_size) {buf_index = 0;}
- }
- memset(reverb_effect_buffer, 0, sizeof(int32) * count);
- info->index[0] = index0;
-diff --git a/timidity/tables.c b/timidity/tables.c
-index bb37994..9f55f54 100644
---- a/timidity/tables.c
-+++ b/timidity/tables.c
-@@ -1682,4 +1682,4 @@ float lofi_sampling_freq_table_xg[] =
- 420.0, 416.0, 412.0, 408.0, 405.0, 401.0, 397.0, 394.0,
- 390.0, 387.0, 383.0, 380.0, 377.0, 374.0, 371.0, 368.0,
- 364.0, 361.0, 359.0, 356.0, 353.0, 350.0, 347.0, 345.0,
--};
-\ No newline at end of file
-+};
-diff --git a/timidity/timidity.c b/timidity/timidity.c
-index a53a367..e443b4c 100644
---- a/timidity/timidity.c
-+++ b/timidity/timidity.c
-@@ -40,31 +40,21 @@
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif /* HAVE_UNISTD_H */
-+#if TIME_WITH_SYS_TIME
-+# include <sys/time.h>
-+# include <time.h>
-+#else
-+# if HAVE_SYS_TIME_H
-+# include <sys/time.h>
-+# else
-+# include <time.h>
-+# endif
-+#endif /* TIME_WITH_SYS_TIME */
- #ifdef HAVE_SYS_STAT_H
- #include <sys/stat.h>
- #endif /* NAVE_SYS_STAT_H */
- #include <fcntl.h> /* for open */
-
--#ifdef HAVE_STDBOOL_H
--#include <stdbool.h>
--#endif
--
--#ifndef __bool_true_false_are_defined
--# ifdef bool
--# undef bool
--# endif
--# ifdef ture
--# undef ture
--# endif
--# ifdef false
--# undef false
--# endif
--# define bool int
--# define false ((bool)0)
--# define true (!false)
--# define __bool_true_false_are_defined true
--#endif /* C99 _Bool hack */
--
- #ifdef BORLANDC_EXCEPTION
- #include <excpt.h>
- #endif /* BORLANDC_EXCEPTION */
-@@ -311,9 +301,7 @@ static const struct option longopts[] = {
- { "flac-verify", no_argument, NULL, TIM_OPT_FLAC_VERIFY },
- { "flac-padding", required_argument, NULL, TIM_OPT_FLAC_PADDING },
- { "flac-complevel", required_argument, NULL, TIM_OPT_FLAC_COMPLEVEL },
--#ifdef AU_OGGFLAC
- { "oggflac", no_argument, NULL, TIM_OPT_FLAC_OGGFLAC },
--#endif /* AU_OGGFLAC */
- #endif /* AU_FLAC */
- #ifdef AU_SPEEX
- { "speex-quality", required_argument, NULL, TIM_OPT_SPEEX_QUALITY },
-@@ -449,9 +437,7 @@ static inline int parse_opt_output_swab(const char *);
- static inline int parse_opt_flac_verify(const char *);
- static inline int parse_opt_flac_padding(const char *);
- static inline int parse_opt_flac_complevel(const char *);
--#ifdef AU_OGGFLAC
- static inline int parse_opt_flac_oggflac(const char *);
--#endif /* AU_OGGFLAC */
- #endif /* AU_FLAC */
- #ifdef AU_SPEEX
- static inline int parse_opt_speex_quality(const char *);
-@@ -2789,10 +2775,8 @@ MAIN_INTERFACE int set_tim_opt_long(int c, char *optarg, int index)
- return parse_opt_flac_padding(arg);
- case TIM_OPT_FLAC_COMPLEVEL:
- return parse_opt_flac_complevel(arg);
--#ifdef AU_OGGFLAC
- case TIM_OPT_FLAC_OGGFLAC:
- return parse_opt_flac_oggflac(arg);
--#endif /* AU_OGGFLAC */
- #endif /* AU_FLAC */
- #ifdef AU_SPEEX
- case TIM_OPT_SPEEX_QUALITY:
-@@ -3642,10 +3626,8 @@ static inline int parse_opt_h(const char *arg)
- " Write a PADDING block of length n",
- " --flac-complevel=n (for Ogg FLAC only)",
- " Set compression level n:[0..8]",
--#ifdef AU_OGGFLAC
- " --oggflac (for Ogg FLAC only)",
- " Output OggFLAC stream (experimental)",
--#endif /* AU_OGGFLAC */
- #endif /* AU_FLAC */
- #ifdef AU_SPEEX
- " --speex-quality=n (for Ogg Speex only)",
-@@ -4381,7 +4363,6 @@ static inline int parse_opt_flac_complevel(const char *arg)
- return 0;
- }
-
--#ifdef AU_OGGFLAC
- extern void flac_set_option_oggflac(int);
-
- static inline int parse_opt_flac_oggflac(const char *arg)
-@@ -4389,7 +4370,6 @@ static inline int parse_opt_flac_oggflac(const char *arg)
- flac_set_option_oggflac(1);
- return 0;
- }
--#endif /* AU_OGGFLAC */
- #endif /* AU_FLAC */
-
- #ifdef AU_SPEEX
-@@ -5466,14 +5446,14 @@ extern int volatile save_playlist_once_before_exit_flag;
- static int CoInitializeOK = 0;
- #endif
-
--static inline bool directory_p(const char* path)
-+static inline int directory_p(const char* path)
- {
- #if defined ( IA_W32GUI ) || defined ( IA_W32G_SYN )
- return is_directory(path);
- #else
- struct stat st;
- if(stat(path, &st) != -1) return S_ISDIR(st.st_mode);
-- return false;
-+ return 0;
- #endif
- }
-
-@@ -5649,11 +5629,11 @@ int main(int argc, char **argv)
- }
-
- ctl->cmsg(CMSG_FATAL, VERB_NORMAL,
-- "%s: Can't read any configuration file.\nPlease check "
-+ "%s: Error reading configuration file.\nPlease check "
- "%s or %s", program_name, config1, config2);
- #else
- ctl->cmsg(CMSG_FATAL, VERB_NORMAL,
-- "%s: Can't read any configuration file.\nPlease check "
-+ "%s: Error reading configuration file.\nPlease check "
- CONFIG_FILE, program_name);
- #endif /* __W32__ */
- }
-diff --git a/timidity/wrd.h b/timidity/wrd.h
-index 0815aa7..fd7fbb3 100644
---- a/timidity/wrd.h
-+++ b/timidity/wrd.h
-@@ -148,6 +148,7 @@ static inline void print_ecmd(char*, int*, int);
- #endif
- #include <limits.h>
- #include "mblock.h"
-+#include "common.h"
- #include "controls.h"
- static inline void print_ecmd(char *cmd, int *args, int narg)
- {
-diff --git a/timidity/wrd_read.c b/timidity/wrd_read.c
-index e7ae7f8..c824f49 100644
---- a/timidity/wrd_read.c
-+++ b/timidity/wrd_read.c
-@@ -1765,7 +1765,10 @@ static char *wrd_name_string(int cmd)
-
- #ifdef ENABLE_SHERRY
- /*******************************************************************************/
-+#if 0
-+/* for mac only */
- #pragma mark -
-+#endif
-
- static int sherry_started; /* 0 - before start command 0x01*/
- /* 1 - after start command 0x01*/
diff --git a/audio/TiMidity++/patches/patch-tclbitmaps b/audio/TiMidity++/patches/patch-tclbitmaps
new file mode 100644
index 0000000000000..f2e64e59d704e
--- /dev/null
+++ b/audio/TiMidity++/patches/patch-tclbitmaps
@@ -0,0 +1,135 @@
+commit 009dd7494916089ca8a4a3c15c37bab4bc6fc7c7
+Author: Yair K <cesium2@gmail.com>
+Date: Mon Aug 20 09:32:05 2012 +0200
+
+ Include xbm bitmaps in the tcl interface itself
+
+ Include xbm bitmaps in the tcl interface itself rather than as files in the
+ system.
+
+ Also, include tcl.h a bit later to avoid a redefine warning on reverb.h.
+
+ Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+diff --git a/interface/Makefile.am b/interface/Makefile.am
+index e45ce43..6ce4795 100644
+--- a/interface/Makefile.am
++++ b/interface/Makefile.am
+@@ -275,7 +275,7 @@ if ENABLE_DYNAMIC_XAW
+ install_xaw = install.xaw
+ endif
+
+-install.tk: $(ALLTCLF) install.bitmaps
++install.tk: $(ALLTCLF)
+ test -d $(DESTDIR)$(TCL_DIR) || mkdir -p $(DESTDIR)$(TCL_DIR)
+ for f in $(ALLTCLF) ''; do case ".$$f" in .);; *) $(INSTALL_DATA) $$f $(DESTDIR)$(TCL_DIR);; esac; done
+
+diff --git a/interface/tk_c.c b/interface/tk_c.c
+index c5c9074..ff49568 100644
+--- a/interface/tk_c.c
++++ b/interface/tk_c.c
+@@ -46,8 +46,6 @@
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
+ #include <sys/sem.h>
+-#include <tcl.h>
+-#include <tk.h>
+ #include <sys/wait.h>
+
+ #include "timidity.h"
+@@ -60,6 +58,9 @@
+ #include "miditrace.h"
+ #include "aq.h"
+
++#include <tcl.h>
++#include <tk.h>
++
+ #ifndef TKPROGPATH
+ #define TKPROGPATH PKGLIBDIR "/tkmidity.tcl"
+ #endif /* TKPROGPATH */
+@@ -871,6 +872,21 @@ static Tcl_Interp *my_interp;
+
+ static int AppInit(Tcl_Interp *interp)
+ {
++#include "bitmaps/back.xbm"
++#include "bitmaps/fwrd.xbm"
++#include "bitmaps/next.xbm"
++#include "bitmaps/pause.xbm"
++#include "bitmaps/play.xbm"
++#include "bitmaps/prev.xbm"
++#include "bitmaps/quit.xbm"
++#include "bitmaps/stop.xbm"
++#include "bitmaps/timidity.xbm"
++
++#define DefineBitmap(Bitmap) do { \
++ Tk_DefineBitmap (interp, Tk_GetUid(#Bitmap), Bitmap##_bits, \
++ Bitmap##_width, Bitmap##_height); \
++ } while(0)
++
+ my_interp = interp;
+
+ if (Tcl_Init(interp) == TCL_ERROR) {
+@@ -890,7 +906,19 @@ static int AppInit(Tcl_Interp *interp)
+ (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
+ Tcl_CreateCommand(interp, "TraceUpdate", (Tcl_CmdProc*) TraceUpdate,
+ (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
++
++ DefineBitmap(back);
++ DefineBitmap(fwrd);
++ DefineBitmap(next);
++ DefineBitmap(pause);
++ DefineBitmap(play);
++ DefineBitmap(prev);
++ DefineBitmap(quit);
++ DefineBitmap(stop);
++ DefineBitmap(timidity);
++
+ return TCL_OK;
++#undef DefineBitmap
+ }
+
+ /*ARGSUSED*/
+diff --git a/interface/tkpanel.tcl b/interface/tkpanel.tcl
+index e826c54..e64f509 100755
+--- a/interface/tkpanel.tcl
++++ b/interface/tkpanel.tcl
+@@ -87,7 +87,7 @@ proc InitGlobal {} {
+ wm title . "TkMidity"
+ wm iconname . "TkMidity"
+ global bitmap_path
+- wm iconbitmap . @$bitmap_path/timidity.xbm
++ wm iconbitmap . "timidity"
+ }
+
+
+@@ -825,22 +825,14 @@ proc CreateWindow {} {
+ global bitmap_path
+ frame .body.button -relief raised -bd 1
+ pack .body.button -side top -expand 1 -fill x
+- button .body.button.play -bitmap @$bitmap_path/play.xbm\
+- -command "PlayCmd"
+- button .body.button.stop -bitmap @$bitmap_path/stop.xbm\
+- -command "StopCmd"
+- button .body.button.prev -bitmap @$bitmap_path/prev.xbm\
+- -command "PrevCmd"
+- button .body.button.back -bitmap @$bitmap_path/back.xbm\
+- -command "BackwardCmd"
+- button .body.button.fwrd -bitmap @$bitmap_path/fwrd.xbm\
+- -command "ForwardCmd"
+- button .body.button.next -bitmap @$bitmap_path/next.xbm\
+- -command "NextCmd"
+- button .body.button.pause -bitmap @$bitmap_path/pause.xbm\
+- -command "PauseCmd"
+- button .body.button.quit -bitmap @$bitmap_path/quit.xbm\
+- -command "QuitCmd"
++ button .body.button.play -bitmap "play" -command "PlayCmd"
++ button .body.button.stop -bitmap "stop" -command "StopCmd"
++ button .body.button.prev -bitmap "prev" -command "PrevCmd"
++ button .body.button.back -bitmap "back" -command "BackwardCmd"
++ button .body.button.fwrd -bitmap "fwrd" -command "ForwardCmd"
++ button .body.button.next -bitmap "next" -command "NextCmd"
++ button .body.button.pause -bitmap "pause" -command "PauseCmd"
++ button .body.button.quit -bitmap "quit" -command "QuitCmd"
+ pack .body.button.play .body.button.pause\
+ .body.button.prev .body.button.back\
+ .body.button.stop\
diff --git a/audio/TiMidity++/patches/patch-tclsh b/audio/TiMidity++/patches/patch-tclsh
new file mode 100644
index 0000000000000..6467765360742
--- /dev/null
+++ b/audio/TiMidity++/patches/patch-tclsh
@@ -0,0 +1,139 @@
+commit 7cbdab2041e378486a74cd9d0ae0b39fb4d1af16
+Author: TAMUKI Shoichi <tamuki@linet.gr.jp>
+Date: Wed Sep 5 12:26:22 2012 +0900
+
+ Remove tclIndex due to autogenerated file
+
+ auto_mkindex will now run with tclsh instead of wish.
+
+diff --git a/configure.in b/configure.in
+index 286e459..dcc8442 100644
+--- a/configure.in
++++ b/configure.in
+@@ -36,7 +36,7 @@ dnl - add to -L LDFLAGS
+ dnl C_INCLUDE_PATH
+ dnl - add to -I CPPFLAGS
+ dnl MSYS - `yes' if cygnus or Mingw windows environment.
+-dnl WISH - wish
++dnl TCLSH - tclsh
+ dnl LN_S - ln -s
+ dnl tcltk_dep - make dependencies for tcl/tk interface
+ dnl
+@@ -59,7 +59,7 @@ AC_CONFIG_HEADERS([config.h interface.h])
+ AM_MAINTAINER_MODE
+
+ SHELL=${CONFIG_SHELL-"/bin/sh"}
+-WISH=${WISH-"wish"}
++TCLSH=${TCLSH-"tclsh"}
+
+ dnl to use contains() macro (see autoconf/acinclude.m4)
+ CONTAINS_INIT
+@@ -2287,7 +2287,7 @@ AC_SUBST(SHCFLAGS)
+ AC_SUBST(dynamic_targets)
+ AC_SUBST(so)
+ AC_SUBST(LN_S)
+-AC_SUBST(WISH)
++AC_SUBST(TCLSH)
+ AC_SUBST(tcltk_dep)
+ AC_SUBST(program_transform_name)
+ AC_SUBST(INTERFACE_SRCS)
+diff --git a/interface/Makefile.am b/interface/Makefile.am
+index 6ce4795..6921a83 100644
+--- a/interface/Makefile.am
++++ b/interface/Makefile.am
+@@ -240,8 +240,7 @@ EXTRA_DIST = \
+ tkpanel.tcl \
+ browser.tcl \
+ misc.tcl \
+- timidity.pel \
+- tclIndex
++ timidity.pel
+
+ .ptcl.tcl:
+ sed -e 's@%TCL_DIR%@$(TCL_DIR)@g' $< > $@
+@@ -249,6 +248,8 @@ EXTRA_DIST = \
+ sed -e 's@%BIN_DIR%@$(bindir)@g' $< > $@
+ clean:
+ rm -f tkmidity.tcl
++ rm -f tclIndex
++ rm -f timidity.el
+ rm -f *.$(OBJEXT)
+ rm -f *.$(so)
+ rm -f *.res
+@@ -259,7 +260,7 @@ clean:
+
+ tclIndex: $(TCLSRCS)
+ rm -f tclIndex
+- echo 'auto_mkindex . *.tcl; exit' | $(WISH)
++ echo 'auto_mkindex $(srcdir) *.tcl; exit' | $(TCLSH)
+
+ if ENABLE_TCLTK
+ install_tk = install.tk
+diff --git a/interface/tclIndex b/interface/tclIndex
+deleted file mode 100644
+index e62cfcf..0000000
+--- a/interface/tclIndex
++++ /dev/null
+@@ -1,62 +0,0 @@
+-# Tcl autoload index file, version 2.0
+-# This file is generated by the "auto_mkindex" command
+-# and sourced to set up indexing information for one or
+-# more commands. Typically each line is a command that
+-# sets an element in the auto_index array, where the
+-# element name is the name of a command and the value is
+-# a script that loads the command.
+-
+-set auto_index(InitGlobal) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(HandleInput) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(MakeShuffleList) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(AppendMsg) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(ClearMsg) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(SelectNumber) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(SetTime) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(DispButtonPlay) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(SetVolume) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(WriteMsg) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(JumpCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(VolumeCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(LoadCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(PlayCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(PauseCheck) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(PauseCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(StopCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(QuitCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(PrevCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(NextCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(ForwardCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(BackwardCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(VolUpCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(VolDownCmd) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(DispTables) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(SaveConfig) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(LoadConfig) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(InitCmdLine) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(SelectList) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(OpenFiles) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(CloseFiles) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(ToggleCurFileMode) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(CreateWindow) [list source [file join $dir tkpanel.tcl]]
+-set auto_index(filebrowser) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:init) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:init-lbox) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:get-cur-lbox) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:select) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:selall) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:updir) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:changedir) [list source [file join $dir browser.tcl]]
+-set auto_index(fs:update) [list source [file join $dir browser.tcl]]
+-set auto_index(retrieve-filename) [list source [file join $dir misc.tcl]]
+-set auto_index(sec2time) [list source [file join $dir misc.tcl]]
+-set auto_index(numeric-bind) [list source [file join $dir misc.tcl]]
+-set auto_index(my-listbox) [list source [file join $dir misc.tcl]]
+-set auto_index(my-dialog) [list source [file join $dir misc.tcl]]
+-set auto_index(warning) [list source [file join $dir misc.tcl]]
+-set auto_index(error) [list source [file join $dir misc.tcl]]
+-set auto_index(information) [list source [file join $dir misc.tcl]]
+-set auto_index(question) [list source [file join $dir misc.tcl]]
+-set auto_index(rootname) [list source [file join $dir misc.tcl]]
+-set auto_index(my-random) [list source [file join $dir misc.tcl]]
+-set auto_index(init-random) [list source [file join $dir misc.tcl]]
diff --git a/audio/TiMidity++/patches/scripts.diff b/audio/TiMidity++/patches/scripts.diff
deleted file mode 100644
index 746ecf2e0d1ab..0000000000000
--- a/audio/TiMidity++/patches/scripts.diff
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/interface/timidity.el b/interface/timidity.el
-index f03ba25..c2019bf 100644
---- a/interface/timidity.el
-+++ b/interface/timidity.el
-@@ -28,14 +28,14 @@
- ;;
- ;; You write follows in ~/.emacs
- ;; (autoload 'timidity "timidity" "TiMidity Interface" t)
--;; (setq timidity-prog-path "/usr/local/bin/timidity")
-+;; (setq timidity-prog-path "/usr/bin/timidity")
- ;;
- ;; Then you type:
- ;; M-x timidity
-
- ;; Configuration parameters.
- ; Absolute path of timidity.
--(defvar timidity-prog-path "/usr/local/bin/timidity")
-+(defvar timidity-prog-path "/usr/bin/timidity")
-
- ; String list for timidity program options.
- (defvar timidity-default-options nil)
-diff --git a/interface/tkmidity.ptcl b/interface/tkmidity.ptcl
-index caf5e0a..7168bc4 100755
---- a/interface/tkmidity.ptcl
-+++ b/interface/tkmidity.ptcl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/wishx -f
-+#!/usr/bin/wish -f
- #
- # TiMidity++ -- MIDI to WAVE converter and player
- # Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
-diff --git a/interface/tkpanel.tcl b/interface/tkpanel.tcl
-index 0a392b1..e826c54 100755
---- a/interface/tkpanel.tcl
-+++ b/interface/tkpanel.tcl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/wishx -f
-+#!/usr/bin/wish -f
- #
- # TiMidity++ -- MIDI to WAVE converter and player
- # Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
diff --git a/audio/TiMidity++/patches/speex.diff b/audio/TiMidity++/patches/speex.diff
deleted file mode 100644
index c0f71b1190b0f..0000000000000
--- a/audio/TiMidity++/patches/speex.diff
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/configure b/configure
---- a/configure
-+++ b/configure
-@@ -14785,7 +14785,7 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
-
-- #include <speex.h>
-+ #include <speex/speex.h>
- #include <ogg/ogg.h>
-
- int
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
-@@ -1230,7 +1230,7 @@
- if test "x$au_enable_speex" = xyes; then
- AC_CACHE_VAL(have_speex,
- [AC_TRY_LINK([
-- #include <speex.h>
-+ #include <speex/speex.h>
- #include <ogg/ogg.h>
- ],
- [
-diff --git a/timidity/speex_a.c b/timidity/speex_a.c
---- a/timidity/speex_a.c
-+++ b/timidity/speex_a.c
-@@ -33,8 +33,8 @@
- #include <fcntl.h>
- #endif
-
--#include <speex.h>
--#include <speex_header.h>
-+#include <speex/speex.h>
-+#include <speex/speex_header.h>
- #include <ogg/ogg.h>
-
- #include "timidity.h"