From 42293bc9baeae0df9c12b0ec00293e0147bd33a8 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Sun, 1 Feb 2015 16:39:06 -0600 Subject: audio/TiMidity++: Script cleanup. Add extra flags to `autoreconf` so that the script works against slackware-current. Thanks to tekk. Move timidity.cfg from /etc to /etc/timidity, along with other script cleanup suggestions. Thanks to Mii Bolen. Signed-off-by: Kyle Guinn --- audio/TiMidity++/TiMidity++.SlackBuild | 42 +++++++--------------- audio/TiMidity++/doinst.sh | 2 +- .../patches/timidity++-2.14.0-tcltk86.patch | 13 +++++++ audio/TiMidity++/timidity++-2.14.0-tcltk86.patch | 13 ------- audio/TiMidity++/timidity.cfg | 6 ++++ 5 files changed, 33 insertions(+), 43 deletions(-) create mode 100644 audio/TiMidity++/patches/timidity++-2.14.0-tcltk86.patch delete mode 100644 audio/TiMidity++/timidity++-2.14.0-tcltk86.patch create mode 100644 audio/TiMidity++/timidity.cfg (limited to 'audio/TiMidity++') diff --git a/audio/TiMidity++/TiMidity++.SlackBuild b/audio/TiMidity++/TiMidity++.SlackBuild index 73c4c2d624..9c0a2805fa 100644 --- a/audio/TiMidity++/TiMidity++.SlackBuild +++ b/audio/TiMidity++/TiMidity++.SlackBuild @@ -8,14 +8,14 @@ PRGNAM=TiMidity++ VERSION=2.14.0 -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then - case "$( uname -m )" in + case "$(uname -m)" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; + *) ARCH=$(uname -m) ;; esac fi @@ -30,20 +30,17 @@ 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. -JACK=${JACK:-no} -if [ "$JACK" = "yes" ]; then +if [ "${JACK:-no}" = "yes" ]; then ENABLE_AUDIO="$ENABLE_AUDIO,jack" fi # Support speex. Also disabled by default. -SPEEX=${SPEEX:-no} -if [ "$SPEEX" = "yes" ]; then +if [ "${SPEEX:-no}" = "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 +if [ "${XAW3D:-no}" = "yes" ]; then WITH_XAW="xaw3d" else WITH_XAW="xaw" @@ -72,27 +69,21 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +chmod -R u+w,go-w,a+rX-st . # 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 +# Another patch from Gentoo (thanks) for tcl-tk-8.6 for patch in $CWD/patches/* ; do patch -p1 < $patch done -# Another patch from Gentoo (thanks) for tcl-tk-8.6 -patch -p0 < $CWD/timidity++-2.14.0-tcltk86.patch - # Regenerate files for automake/autoconf. # Required for --docdir -autoreconf +autoreconf -vif EXTRACFLAGS="$SLKCFLAGS" \ ./configure \ @@ -110,7 +101,7 @@ EXTRACFLAGS="$SLKCFLAGS" \ --enable-network \ --enable-spectrogram \ --enable-xdnd \ - --with-default-path=/etc \ + --with-default-path=/etc/timidity \ --with-module-dir=/usr/lib${LIBDIRSUFFIX}/timidity \ --with-xaw-resource-prefix=/etc/X11 \ --with-xawlib=${WITH_XAW} \ @@ -119,19 +110,12 @@ EXTRACFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG -find $PKG/usr/man -type f -exec gzip -9 {} \; +find $PKG/usr/man -type f -exec gzip -9 {} + # Create a default timidity.cfg # TiMidity++ will complain if this file is missing. -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 +mkdir -p $PKG/etc/timidity +cat $CWD/timidity.cfg > $PKG/etc/timidity/timidity.cfg.new # Copy the startup script mkdir -p $PKG/etc/rc.d diff --git a/audio/TiMidity++/doinst.sh b/audio/TiMidity++/doinst.sh index 56700cc0ff..60eabfdf86 100644 --- a/audio/TiMidity++/doinst.sh +++ b/audio/TiMidity++/doinst.sh @@ -22,6 +22,6 @@ preserve_perms() { config $NEW } -config etc/timidity.cfg.new +config etc/timidity/timidity.cfg.new preserve_perms etc/rc.d/rc.timidity.new diff --git a/audio/TiMidity++/patches/timidity++-2.14.0-tcltk86.patch b/audio/TiMidity++/patches/timidity++-2.14.0-tcltk86.patch new file mode 100644 index 0000000000..23ef62aa03 --- /dev/null +++ b/audio/TiMidity++/patches/timidity++-2.14.0-tcltk86.patch @@ -0,0 +1,13 @@ +http://bugs.gentoo.org/451296 + +--- a/interface/tk_c.c ++++ b/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++/timidity++-2.14.0-tcltk86.patch b/audio/TiMidity++/timidity++-2.14.0-tcltk86.patch deleted file mode 100644 index ea2c0eec6c..0000000000 --- a/audio/TiMidity++/timidity++-2.14.0-tcltk86.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://bugs.gentoo.org/451296 - ---- interface/tk_c.c -+++ 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++/timidity.cfg b/audio/TiMidity++/timidity.cfg new file mode 100644 index 0000000000..ccc4332694 --- /dev/null +++ b/audio/TiMidity++/timidity.cfg @@ -0,0 +1,6 @@ +# 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 -- cgit v1.2.3