rpms/timidity++/F-7 TiMidity++-2.13.2-cfgfile-name.patch, NONE, 1.1 TiMidity++-2.13.2-dynlibroot.patch, NONE, 1.1 TiMidity++-2.13.2-flac-detect.patch, NONE, 1.1 TiMidity++-2.13.2-flac.patch, NONE, 1.1 TiMidity++-2.13.2-ipv6.patch, NONE, 1.1 TiMidity++-2.13.2-libao-first.patch, NONE, 1.1 TiMidity++-2.13.2-man-pages.patch, NONE, 1.1 TiMidity++-2.13.2-misc-fixes.patch, NONE, 1.1 TiMidity++-2.13.2-mlutil.patch, NONE, 1.1 TiMidity++-2.13.2-speex.patch, NONE, 1.1 .cvsignore, 1.7, 1.8 sources, 1.7, 1.8 timidity++.spec, 1.14, 1.15 TiMidity++-2.13.0-redhat.patch, 1.1, NONE
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Tue Mar 4 21:33:12 UTC 2008
Author: jwrdegoede
Update of /cvs/extras/rpms/timidity++/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16154
Modified Files:
.cvsignore sources timidity++.spec
Added Files:
TiMidity++-2.13.2-cfgfile-name.patch
TiMidity++-2.13.2-dynlibroot.patch
TiMidity++-2.13.2-flac-detect.patch
TiMidity++-2.13.2-flac.patch TiMidity++-2.13.2-ipv6.patch
TiMidity++-2.13.2-libao-first.patch
TiMidity++-2.13.2-man-pages.patch
TiMidity++-2.13.2-misc-fixes.patch
TiMidity++-2.13.2-mlutil.patch TiMidity++-2.13.2-speex.patch
Removed Files:
TiMidity++-2.13.0-redhat.patch
Log Message:
* Mon Mar 3 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-13
- Merge review fixes (bz 226492)
- merge patch0 into patch16, drop patch0
- Make License tag just GPLv2
- Unify macros usage
TiMidity++-2.13.2-cfgfile-name.patch:
--- NEW FILE TiMidity++-2.13.2-cfgfile-name.patch ---
diff -up TiMidity++-2.13.2/timidity/timidity.c~ TiMidity++-2.13.2/timidity/timidity.c
--- TiMidity++-2.13.2/timidity/timidity.c~ 2008-02-28 13:25:00.000000000 +0100
+++ TiMidity++-2.13.2/timidity/timidity.c 2008-02-28 13:25:00.000000000 +0100
@@ -5170,7 +5170,9 @@ MAIN_INTERFACE int timidity_pre_load_con
#else
/* UNIX */
- if(!read_config_file(CONFIG_FILE, 0))
+ if(!read_config_file(CONFIG_FILE1, 0))
+ got_a_configuration = 1;
+ else if(!read_config_file(CONFIG_FILE2, 0))
got_a_configuration = 1;
#endif
@@ -5240,7 +5240,9 @@ MAIN_INTERFACE int timidity_post_load_co
if(!got_a_configuration)
{
- if(try_config_again && !read_config_file(CONFIG_FILE, 0))
+ if(try_config_again && !read_config_file(CONFIG_FILE1, 0))
+ got_a_configuration = 1;
+ else if(try_config_again && !read_config_file(CONFIG_FILE2, 0))
got_a_configuration = 1;
}
@@ -5695,7 +5697,7 @@ int main(int argc, char **argv)
#else
ctl->cmsg(CMSG_FATAL, VERB_NORMAL,
"%s: Error reading configuration file.\nPlease check "
- CONFIG_FILE, program_name);
+ CONFIG_FILE1 " or " CONFIG_FILE2, program_name);
#endif /* __W32__ */
}
else
diff -up TiMidity++-2.13.2/timidity/timidity.h~ TiMidity++-2.13.2/timidity/timidity.h
--- TiMidity++-2.13.2/timidity/timidity.h~ 2008-02-28 13:19:29.000000000 +0100
+++ TiMidity++-2.13.2/timidity/timidity.h 2008-02-28 13:19:29.000000000 +0100
@@ -41,14 +41,8 @@
/* You could specify a complete path, e.g. "/etc/timidity.cfg", and
then specify the library directory in the configuration file. */
-/* #define CONFIG_FILE "/etc/timidity.cfg" */
-#ifndef CONFIG_FILE
-# ifdef DEFAULT_PATH
-# define CONFIG_FILE DEFAULT_PATH "/timidity.cfg"
-# else
-# define CONFIG_FILE PKGDATADIR "/timidity.cfg"
-# endif /* DEFAULT_PATH */
-#endif /* CONFIG_FILE */
+#define CONFIG_FILE1 "/etc/timidity++.cfg"
+#define CONFIG_FILE2 "/etc/timidity.cfg"
/* Filename extension, followed by command to run decompressor so that
TiMidity++-2.13.2-dynlibroot.patch:
--- NEW FILE TiMidity++-2.13.2-dynlibroot.patch ---
diff -up TiMidity++-2.13.2/timidity/timidity.c.dynlibroot TiMidity++-2.13.2/timidity/timidity.c
--- TiMidity++-2.13.2/timidity/timidity.c.dynlibroot 2008-02-21 12:41:09.000000000 +0100
+++ TiMidity++-2.13.2/timidity/timidity.c 2008-02-21 12:49:55.000000000 +0100
@@ -554,7 +554,7 @@ MAIN_INTERFACE struct URL_module *url_mo
#ifndef SHARED_LIB_PATH
#define SHARED_LIB_PATH PKGLIBDIR
#endif /* SHARED_LIB_PATH */
-static char *dynamic_lib_root = SHARED_LIB_PATH;
+static char *dynamic_lib_root = NULL;
#endif /* IA_DYNAMIC */
#ifndef MAXPATHLEN
@@ -2970,8 +2970,7 @@ static inline int parse_opt_d(const char
{
/* dynamic lib root */
#ifdef IA_DYNAMIC
- if (dynamic_lib_root)
- free(dynamic_lib_root);
+ free(dynamic_lib_root);
dynamic_lib_root = safe_strdup(arg);
return 0;
#else
@@ -3893,6 +3892,8 @@ static inline int parse_opt_h(const char
cmp->id_character, cmp->id_name);
#endif /* IA_DYNAMIC */
#ifdef IA_DYNAMIC
+ if (!dynamic_lib_root)
+ dynamic_lib_root = safe_strdup(SHARED_LIB_PATH);
fprintf(fp, "Supported dynamic load interfaces (%s):" NLS,
dynamic_lib_root);
memset(mark, 0, sizeof(mark));
@@ -3997,6 +3998,8 @@ static inline char *dynamic_interface_in
int fd, n;
char *nl;
+ if (!dynamic_lib_root)
+ dynamic_lib_root = safe_strdup(SHARED_LIB_PATH);
sprintf(libinfo, "%s" PATH_STRING "interface_%c.txt",
dynamic_lib_root, id);
if ((fd = open(libinfo, 0)) < 0)
@@ -4021,6 +4024,8 @@ char *dynamic_interface_module(int id)
static char shared_library[MAXPATHLEN];
int fd;
+ if (!dynamic_lib_root)
+ dynamic_lib_root = safe_strdup(SHARED_LIB_PATH);
sprintf(shared_library, "%s" PATH_STRING "interface_%c%s",
dynamic_lib_root, id, SHARED_LIB_EXT);
if ((fd = open(shared_library, 0)) < 0)
TiMidity++-2.13.2-flac-detect.patch:
--- NEW FILE TiMidity++-2.13.2-flac-detect.patch ---
diff -up TiMidity++-2.13.2/configure.in~ TiMidity++-2.13.2/configure.in
--- TiMidity++-2.13.2/configure.in~ 2007-12-10 00:26:48.000000000 +0100
+++ TiMidity++-2.13.2/configure.in 2007-12-10 00:26:48.000000000 +0100
@@ -1212,15 +1212,10 @@ else
AC_MSG_RESULT([yes, configuring flac])
SYSEXTRAS="$SYSEXTRAS flac_a.c"
AM_PATH_LIBFLAC([
- EXTRADEFS="$EXTRADEFS -DAU_FLAC"
+ EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_OGGFLAC"
EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS)
LIBS="$LIBS $LIBFLAC_LIBS"
])
- AM_PATH_LIBOGGFLAC([
- EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC"
- EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS)
- LIBS="$LIBS $LIBOGGFLAC_LIBS"
- ])
else
AC_MSG_RESULT(no)
fi
diff -up TiMidity++-2.13.2/configure~ TiMidity++-2.13.2/configure
--- TiMidity++-2.13.2/configure~ 2007-12-10 00:26:47.000000000 +0100
+++ TiMidity++-2.13.2/configure 2007-12-10 00:26:47.000000000 +0100
@@ -14471,7 +14471,7 @@ fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- EXTRADEFS="$EXTRADEFS -DAU_FLAC"
+ EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_OGGFLAC"
for f in $LIBFLAC_CFLAGS; do
case ".$f" in
.-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;;
@@ -14562,211 +14562,6 @@ rm -f conftest.err conftest.$ac_objext \
rm -f conf.libFLACtest
-# Check whether --with-libOggFLAC or --without-libOggFLAC was given.
-if test "${with_libOggFLAC+set}" = set; then
- withval="$with_libOggFLAC"
- libOggFLAC_prefix="$withval"
-else
- libOggFLAC_prefix=""
-fi;
-
-# Check whether --with-libOggFLAC-libraries or --without-libOggFLAC-libraries was given.
-if test "${with_libOggFLAC_libraries+set}" = set; then
- withval="$with_libOggFLAC_libraries"
- libOggFLAC_libraries="$withval"
-else
- libOggFLAC_libraries=""
-fi;
-
-# Check whether --with-libOggFLAC-includes or --without-libOggFLAC-includes was given.
-if test "${with_libOggFLAC_includes+set}" = set; then
- withval="$with_libOggFLAC_includes"
- libOggFLAC_includes="$withval"
-else
- libOggFLAC_includes=""
-fi;
-# Check whether --enable-libOggFLACtest or --disable-libOggFLACtest was given.
-if test "${enable_libOggFLACtest+set}" = set; then
- enableval="$enable_libOggFLACtest"
-
-else
- enable_libOggFLACtest=yes
-fi;
-
- 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
-
- echo "$as_me:$LINENO: checking for libOggFLAC" >&5
-echo $ECHO_N "checking for libOggFLAC... $ECHO_C" >&6
- 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"
- rm -f conf.libOggFLACtest
- if test "$cross_compiling" = yes; then
- echo $ac_n "cross compiling; assumed OK... $ac_c"
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <OggFLAC/stream_decoder.h>
-
-int main ()
-{
- system("touch conf.libOggFLACtest");
- return 0;
-}
-
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-no_libOggFLAC=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
-
- if test "x$no_libOggFLAC" = "x" ; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
- EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC"
- for f in $LIBOGGFLAC_CFLAGS; do
- case ".$f" in
- .-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;;
- *) CFLAGS="$CPPFLAGS $f" ;;
- esac
-done
-
- LIBS="$LIBS $LIBOGGFLAC_LIBS"
-
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- if test -f conf.libOggFLACtest ; then
- :
- else
- echo "*** Could not run libOggFLAC test program, checking why..."
- CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS"
- LIBS="$LIBS $LIBOGGFLAC_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <OggFLAC/stream_decoder.h>
-
-int
-main ()
-{
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- 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"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- 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"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- LIBOGGFLAC_CFLAGS=""
- LIBOGGFLAC_LIBS=""
- :
- fi
-
-
- rm -f conf.libOggFLACtest
-
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
TiMidity++-2.13.2-flac.patch:
--- NEW FILE TiMidity++-2.13.2-flac.patch ---
--- timidity-2.13.2.orig/timidity/flac_a.c
+++ timidity-2.13.2/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 @@
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 @@
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 @@
/* 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 @@
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 @@
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 @@
{
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 @@
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 @@
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 @@
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 @@
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);
+ FLAC__stream_encoder_set_metadata(ctx->encoder.ogg.stream, metadata, num_metadata);
- ctx->state.ogg = OggFLAC__stream_encoder_init(ctx->encoder.ogg.stream);
- if (ctx->state.ogg != OggFLAC__STREAM_ENCODER_OK) {
+ 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 @@
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 @@
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 @@
{
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 @@
#endif
}
else
-#endif /* AU_OGGFLAC */
{
#ifndef __W32G__
output_filename = create_auto_output_name(input_filename, "flac", NULL, 0);
@@ -608,12 +576,10 @@
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 @@
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 @@
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 @@
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 @@
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 @@
}
}
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 @@
}
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 */
}
}
TiMidity++-2.13.2-ipv6.patch:
--- NEW FILE TiMidity++-2.13.2-ipv6.patch ---
diff -up TiMidity++-2.13.2/utils/net.c.ipv6 TiMidity++-2.13.2/utils/net.c
--- TiMidity++-2.13.2/utils/net.c.ipv6 2002-07-19 02:46:14.000000000 +0200
+++ TiMidity++-2.13.2/utils/net.c 2008-02-01 14:44:46.000000000 +0100
@@ -58,7 +58,9 @@
SOCKET open_socket(char *host, unsigned short port)
{
SOCKET fd;
- struct sockaddr_in in;
+ struct addrinfo hints, *result, *rp;
+ char service[NI_MAXSERV];
+ int s;
#if defined(WINSOCK)
static int first = 1;
@@ -69,27 +71,33 @@ SOCKET open_socket(char *host, unsigned
}
#endif
- memset(&in, 0, sizeof(in));
- if((in.sin_addr.s_addr = inet_addr(host)) == INADDR_NONE)
- {
- struct hostent *hp;
- if((hp = gethostbyname(host)) == NULL)
- return (SOCKET)-1;
- memcpy(&in.sin_addr, hp->h_addr, hp->h_length);
- }
- in.sin_port = htons(port);
- in.sin_family = AF_INET;
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_ADDRCONFIG;
+
+ snprintf(service, sizeof(service), "%d", port);
- if((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET)
- return (SOCKET)-1;
+ s = getaddrinfo(host, service, &hints, &result);
- if(connect(fd, (struct sockaddr *)&in, sizeof(in)) == SOCKET_ERROR)
+ if (s)
+ return (SOCKET)-1;
+
+ for (rp = result; rp != NULL; rp = rp->ai_next)
{
- closesocket(fd);
- return (SOCKET)-1;
+ fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
+
+ if (fd != -1 && connect(fd, rp->ai_addr, rp->ai_addrlen) != -1)
+ break;
+
+ if (fd != -1) {
+ close(fd);
+ fd = -1;
+ }
}
- return fd;
+ freeaddrinfo(result);
+ return (SOCKET) fd;
}
#if !defined(__W32__) || defined(__CYGWIN32__)
diff -up TiMidity++-2.13.2/libarc/url_news.c.ipv6 TiMidity++-2.13.2/libarc/url_news.c
--- TiMidity++-2.13.2/libarc/url_news.c.ipv6 2002-07-19 02:09:22.000000000 +0200
+++ TiMidity++-2.13.2/libarc/url_news.c 2008-02-01 14:44:46.000000000 +0100
@@ -288,8 +288,17 @@ URL url_news_open(char *name)
buff[sizeof(buff) - 1] = '\0';
host = buff;
- for(p = host; *p && *p != ':' && *p != '/'; p++)
- ;
+ if (host[0] == '[')
+ {
+ if (!(p = strchr(host, ']')))
+ return NULL;
+ *p = '\0';
+ ++host;
+ ++p;
+ } else
+ for(p = host; *p && *p != ':' && *p != '/'; p++)
+ ;
+
if(*p == ':')
{
*p++ = '\0'; /* terminate `host' string */
diff -up TiMidity++-2.13.2/libarc/url_ftp.c.ipv6 TiMidity++-2.13.2/libarc/url_ftp.c
--- TiMidity++-2.13.2/libarc/url_ftp.c.ipv6 2002-01-15 11:53:19.000000000 +0100
+++ TiMidity++-2.13.2/libarc/url_ftp.c 2008-02-01 14:44:46.000000000 +0100
@@ -234,6 +234,14 @@ URL url_ftp_open(char *name)
*passwd++ = '\0';
}
+ if (host[0] == '[')
+ {
+ if (!(p = strchr(host, ']')))
+ return NULL;
+ *p = '\0';
+ ++host;
+ }
+
#ifdef DEBUG
printf("open(host=`%s', port=`%d')\n", host, port);
#endif /* DEBUG */
diff -up TiMidity++-2.13.2/libarc/url_http.c.ipv6 TiMidity++-2.13.2/libarc/url_http.c
--- TiMidity++-2.13.2/libarc/url_http.c.ipv6 2002-01-15 11:53:19.000000000 +0100
+++ TiMidity++-2.13.2/libarc/url_http.c 2008-02-01 14:44:46.000000000 +0100
@@ -133,8 +133,15 @@ URL url_http_open(char *name)
p = name;
if(strncmp(p, "http://", 7) == 0)
p += 7;
- for(q = p; *q && *q != ':' && *q != '/'; q++)
- ;
+ if (p[0] == '[')
+ {
+ if (!(q = strchr(p, ']')))
+ return NULL;
+ *q = '\0';
+ ++p;
+ } else
+ for(q = p; *q && *q != ':' && *q != '/'; q++)
+ ;
len = q - p;
if(len >= sizeof(wwwserver) - 1) { /* What?? */
strcpy(wwwserver, "localhost");
@@ -158,8 +165,18 @@ URL url_http_open(char *name)
memcpy(buff, name, n + 1);
host = buff;
- for(p = host; *p && *p != ':' && *p != '/'; p++)
- ;
+
+ if (host[0] == '[')
+ {
+ if (!(p = strchr(host, ']')))
+ return NULL;
+ *p = '\0';
+ ++host;
+ ++p;
+ } else
+ for(p = host; *p && *p != ':' && *p != '/'; p++)
+ ;
+
if(*p == ':')
{
char *pp;
diff -up TiMidity++-2.13.2/interface/server_c.c.ipv6 TiMidity++-2.13.2/interface/server_c.c
--- TiMidity++-2.13.2/interface/server_c.c.ipv6 2004-09-27 01:40:13.000000000 +0200
+++ TiMidity++-2.13.2/interface/server_c.c 2008-02-01 14:44:46.000000000 +0100
@@ -50,6 +50,7 @@
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
+#include <netdb.h>
#ifndef NO_STRING_H
#include <string.h>
#else
@@ -227,7 +228,7 @@ static double start_time;
static int tmr_running;
static int is_system_prefix = 0;
-static struct sockaddr_in control_client;
+static struct sockaddr_storage control_client;
static double low_time_at = 0.3;
static double high_time_at = 0.5;
static FILE *outfp;
@@ -294,34 +295,58 @@ static void ctl_event(CtlEvent *e)
static int pasv_open(int *port)
{
- int sfd;
- struct sockaddr_in server;
+ int sfd, s;
+ struct sockaddr_storage server;
+ struct addrinfo hints, *result, *rp;
+ char service[NI_MAXSERV];
- if((sfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_PASSIVE;
+
+ sprintf(service, "%d", *port);
+
+ s = getaddrinfo(NULL, service, &hints, &result);
+ if (s)
{
- perror("socket");
- return -1;
+ fprintf(stderr, "getaddrinfo ", gai_strerror(s));
+ return -1;
}
- memset(&server, 0, sizeof(server));
- server.sin_port = htons(*port);
- server.sin_family = AF_INET;
- server.sin_addr.s_addr = htonl(INADDR_ANY);
+ for (rp = result; rp != NULL; rp = rp->ai_next)
+ {
+ sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
+
+ if (sfd == -1)
+ continue;
#ifdef SO_REUSEADDR
- {
- int on = 1;
- setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (caddr_t)&on, sizeof(on));
- }
+ {
+ int on = 1;
+ setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (caddr_t)&on, sizeof(on));
+ }
#endif /* SO_REUSEADDR */
- ctl.cmsg(CMSG_INFO, VERB_DEBUG, "Bind TCP/IP port=%d", *port);
- if(bind(sfd, (struct sockaddr *)&server, sizeof(server)) < 0)
+ ctl.cmsg(CMSG_INFO, VERB_DEBUG, "Bind TCP/IP port=%d", *port);
+ if (bind(sfd, rp->ai_addr, rp->ai_addrlen) != 0) {
+ perror("bind");
+ close(sfd);
+ } else
+ break;
+
+ close(sfd);
+ }
+
+ if (rp == NULL)
{
- perror("bind");
- close(sfd);
- return -1;
+ fprintf(stderr, "Could not bind\n");
+ freeaddrinfo(result);
+ return -1;
}
+
+ freeaddrinfo(result);
+
if(*port == 0)
{
int len = sizeof(server);
@@ -331,7 +356,17 @@ static int pasv_open(int *port)
close(sfd);
return -1;
}
- *port = ntohs(server.sin_port);
+
+ /* Not quite protocol independent */
+ switch (((struct sockaddr *) &server)->sa_family)
+ {
+ case AF_INET:
+ *port = ntohs(((struct sockaddr_in *) &server)->sin_port);
+ break;
+ case AF_INET6:
+ *port = ntohs(((struct sockaddr_in6 *) &server)->sin6_port);
+ break;
+ }
}
/* Set it up to wait for connections. */
@@ -847,7 +882,7 @@ static int cmd_help(int argc, char **arg
static int cmd_open(int argc, char **argv)
{
int sock;
- struct sockaddr_in in;
+ struct sockaddr_storage in;
int addrlen;
int port;
@@ -881,8 +916,20 @@ static int cmd_open(int argc, char **arg
}
close(sock);
- if(control_client.sin_addr.s_addr != in.sin_addr.s_addr)
- return send_status(513, "Security violation: Address mismatch");
+ /* Not quite protocol independent */
+ switch (((struct sockaddr *) &control_client)->sa_family)
+ {
+ case AF_INET:
+ if (((struct sockaddr_in *) &control_client)->sin_addr.s_addr !=
+ ((struct sockaddr_in *) &in)->sin_addr.s_addr)
+ return send_status(513, "Security violation: Address mismatch");
+ break;
+ case AF_INET6:
+ if (((struct sockaddr_in6 *) &control_client)->sin6_addr.s6_addr !=
+ ((struct sockaddr_in6 *) &in)->sin6_addr.s6_addr)
+ return send_status(513, "Security violation: Address mismatch");
+ break;
+ }
send_status(200, "Ready data connection");
data_buffer_len = 0;
diff -up TiMidity++-2.13.2/timidity/timidity.c.ipv6 TiMidity++-2.13.2/timidity/timidity.c
--- TiMidity++-2.13.2/timidity/timidity.c.ipv6 2008-02-01 15:07:26.000000000 +0100
+++ TiMidity++-2.13.2/timidity/timidity.c 2008-02-01 15:03:32.000000000 +0100
@@ -1489,6 +1489,8 @@ MAIN_INTERFACE int read_config_file(char
/* #extension HTTPproxy hostname:port */
else if(strcmp(w[0], "HTTPproxy") == 0)
{
+ char r_bracket, l_bracket;
+
if(words < 2)
{
ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
@@ -1500,7 +1502,7 @@ MAIN_INTERFACE int read_config_file(char
/* If network is not supported, this extension is ignored. */
#ifdef SUPPORT_SOCKET
url_http_proxy_host = safe_strdup(w[1]);
- if((cp = strchr(url_http_proxy_host, ':')) == NULL)
+ if((cp = strrchr(url_http_proxy_host, ':')) == NULL)
{
ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
"%s: line %d: Syntax error", name, line);
@@ -1516,11 +1518,30 @@ MAIN_INTERFACE int read_config_file(char
CHECKERRLIMIT;
continue;
}
+
+ l_bracket = url_http_proxy_host[0];
+ r_bracket = url_http_proxy_host[strlen(url_http_proxy_host) - 1];
+
+ if (l_bracket == '[' || r_bracket == ']')
+ {
+ if (l_bracket != '[' || r_bracket != ']')
+ {
+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
+ "%s: line %d: Malformed IPv6 address",
+ name, line);
+ CHECKERRLIMIT;
+ continue;
+ }
+ url_http_proxy_host++;
+ url_http_proxy_host[strlen(url_http_proxy_host) - 1] = '\0';
+ }
#endif
}
/* #extension FTPproxy hostname:port */
else if(strcmp(w[0], "FTPproxy") == 0)
{
+ char l_bracket, r_bracket;
+
if(words < 2)
{
ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
@@ -1532,7 +1553,7 @@ MAIN_INTERFACE int read_config_file(char
/* If network is not supported, this extension is ignored. */
#ifdef SUPPORT_SOCKET
url_ftp_proxy_host = safe_strdup(w[1]);
- if((cp = strchr(url_ftp_proxy_host, ':')) == NULL)
+ if((cp = strrchr(url_ftp_proxy_host, ':')) == NULL)
{
ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
"%s: line %d: Syntax error", name, line);
@@ -1548,6 +1569,23 @@ MAIN_INTERFACE int read_config_file(char
CHECKERRLIMIT;
continue;
}
+
+ l_bracket = url_ftp_proxy_host[0];
+ r_bracket = url_ftp_proxy_host[strlen(url_ftp_proxy_host) - 1];
+
+ if (l_bracket == '[' || r_bracket == ']')
+ {
+ if (l_bracket != '[' || r_bracket != ']')
+ {
+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
+ "%s: line %d: Malformed IPv6 address",
+ name, line);
+ CHECKERRLIMIT;
+ continue;
+ }
+ url_ftp_proxy_host++;
+ url_ftp_proxy_host[strlen(url_ftp_proxy_host) - 1] = '\0';
+ }
#endif
}
/* #extension mailaddr somebody at someware.domain.com */
TiMidity++-2.13.2-libao-first.patch:
--- NEW FILE TiMidity++-2.13.2-libao-first.patch ---
diff -up TiMidity++-2.13.2/timidity/output.c~ TiMidity++-2.13.2/timidity/output.c
--- TiMidity++-2.13.2/timidity/output.c~ 2007-12-10 16:55:05.000000000 +0100
+++ TiMidity++-2.13.2/timidity/output.c 2007-12-10 16:55:05.000000000 +0100
@@ -133,6 +133,10 @@ extern PlayMode gogo_play_mode;
extern PlayMode modmidi_play_mode;
PlayMode *play_mode_list[] = {
+#if defined(AU_AO) /* Try libao first as that will give us pulseaudio */
+ &ao_play_mode,
+#endif /* AU_AO */
+
#if defined(AU_ARTS)
&arts_play_mode,
#endif /* AU_ARTS */
@@ -171,10 +175,6 @@ PlayMode *play_mode_list[] = {
&nas_play_mode,
#endif /* AU_NAS */
-#if defined(AU_AO)
- &ao_play_mode,
-#endif /* AU_PORTAUDIO */
-
#ifndef __MACOS__
&wave_play_mode,
&raw_play_mode,
diff -ur TiMidity++-2.13.2/timidity/ao_a.c TiMidity++-2.13.2.new/timidity/ao_a.c
--- TiMidity++-2.13.2/timidity/ao_a.c 2004-04-12 19:44:03.000000000 +0200
+++ TiMidity++-2.13.2.new/timidity/ao_a.c 2007-12-10 20:28:14.000000000 +0100
@@ -42,6 +42,7 @@
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 */
@@ -56,7 +57,8 @@
open_output,
close_output,
output_data,
- acntl
+ acntl,
+ detect
};
static ao_device *ao_device_ctx;
@@ -167,3 +169,29 @@
}
return -1;
}
+
+static int detect(void)
+{
+ int driver_id, result = 0;
+ ao_sample_format ao_sample_format_ctx;
+ ao_device *ao_device_ctx;
+
+ ao_initialize();
+
+ /* Only succeed in autodetect mode when pulseaudio is available! */
+ driver_id = ao_driver_id("pulse");
+
+ ao_sample_format_ctx.rate = 44100;
+ ao_sample_format_ctx.bits = 16;
+ ao_sample_format_ctx.channels = 2;
+ ao_sample_format_ctx.byte_format = AO_FMT_NATIVE;
+
+ if ((ao_device_ctx = ao_open_live(driver_id, &ao_sample_format_ctx, NULL))) {
+ result = 1;
+ ao_close(ao_device_ctx);
+ }
+
+ ao_shutdown();
+
+ return result;
+}
TiMidity++-2.13.2-man-pages.patch:
--- NEW FILE TiMidity++-2.13.2-man-pages.patch ---
--- timidity-2.13.2.orig/doc/C/timidity.1
+++ timidity-2.13.2/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 manufacture ID is set unchangeable. Manufacture
ID from the input file would be ignored.
.TP
.BI b n ", \-\-default\-bank=" n
@@ -516,10 +516,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 +740,7 @@
.B \-Oj
JACK
.TP
-.B \-Or
+.B \-OR
aRts
.TP
.B \-OA
@@ -1064,8 +1064,7 @@
\fBTiMidity++\fP Debug
.RE
.SH SEE ALSO
-lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1),
-timidity.cfg(5)
+sf2text(1), timidity.cfg(5)
.SH COPYRIGHT
Copyright (C) 1999\-2004 Masanao Izumo <iz at onicos.co.jp>
.br
--- timidity-2.13.2.orig/doc/C/timidity.cfg.5
+++ timidity-2.13.2/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 ofthe 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
@@ -470,9 +470,7 @@
will read from the output of cat fild.mid.
.SH FILES
.TP
-.B /etc/timidity.cfg
-.TP
-.B /usr/local/share/timidity/timidity.cfg
+.B /etc/timidity/timidity.cfg
.SH SEE ALSO
timidity(1), lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1)
.SH COPYRIGHT
--- timidity-2.13.2.orig/doc/ja_JP.eucJP/timidity.1
+++ timidity-2.13.2/doc/ja_JP.eucJP/timidity.1
@@ -745,7 +745,7 @@
.B \-Oj
JACK
.TP
-.B \-Or
+.B \-OR
aRts
.TP
.B \-OA
--- timidity-2.13.2.orig/doc/ja_JP.eucJP/timidity.cfg.5
+++ timidity-2.13.2/doc/ja_JP.eucJP/timidity.cfg.5
@@ -466,8 +466,6 @@
.SH ¥Õ¥¡¥¤¥ë
.TP
.B /etc/timidity.cfg
-.TP
-.B /usr/local/share/timidity/timidity.cfg
.SH ´ØÏ¢¹àÌÜ
timidity(1), lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1)
.SH Ãøºî¸¢
TiMidity++-2.13.2-misc-fixes.patch:
--- NEW FILE TiMidity++-2.13.2-misc-fixes.patch ---
--- timidity-2.13.2.orig/timidity/aq.c
+++ timidity-2.13.2/timidity/aq.c
@@ -87,7 +87,7 @@
/* 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)
{
--- timidity-2.13.2.orig/timidity/common.c
+++ timidity-2.13.2/timidity/common.c
@@ -405,7 +411,8 @@
}
/* 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)
--- timidity-2.13.2.orig/timidity/mod2midi.c
+++ timidity-2.13.2/timidity/mod2midi.c
@@ -195,7 +195,8 @@
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 @@
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 @@
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_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 @@
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
--- timidity-2.13.2.orig/timidity/reverb.c
+++ timidity-2.13.2/timidity/reverb.c
@@ -1624,8 +1624,8 @@
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;
--- timidity-2.13.2.orig/timidity/tables.c
+++ timidity-2.13.2/timidity/tables.c
@@ -1682,4 +1682,4 @@
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
+};
--- timidity-2.13.2.orig/timidity/timidity.c
+++ timidity-2.13.2/timidity/timidity.c
@@ -5466,14 +5446,14 @@
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 @@
}
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__ */
}
--- timidity-2.13.2.orig/timidity/wrd.h
+++ timidity-2.13.2/timidity/wrd.h
@@ -148,6 +148,7 @@
#endif
#include <limits.h>
#include "mblock.h"
+#include "common.h"
#include "controls.h"
static inline void print_ecmd(char *cmd, int *args, int narg)
{
--- timidity-2.13.2.orig/timidity/wrd_read.c
+++ timidity-2.13.2/timidity/wrd_read.c
@@ -1765,7 +1765,10 @@
#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*/
TiMidity++-2.13.2-mlutil.patch:
--- NEW FILE TiMidity++-2.13.2-mlutil.patch ---
--- timidity-2.13.2.orig/libunimod/mlutil.c
+++ timidity-2.13.2/libunimod/mlutil.c
@@ -321,6 +321,7 @@
if (flags & UF_LINEAR)
{
period = lintab[period % 768] >> (period / 768);
+ if (period < 1) period = 1;
period = (8363L * 1712L) / period;
}
TiMidity++-2.13.2-speex.patch:
--- NEW FILE TiMidity++-2.13.2-speex.patch ---
diff -up TiMidity++-2.13.2/configure~ TiMidity++-2.13.2/configure
--- TiMidity++-2.13.2/configure~ 2007-12-10 13:22:49.000000000 +0100
+++ TiMidity++-2.13.2/configure 2007-12-10 13:22:49.000000000 +0100
@@ -14580,7 +14580,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #include <speex.h>
+ #include <speex/speex.h>
#include <ogg/ogg.h>
int
diff -up TiMidity++-2.13.2/configure.in~ TiMidity++-2.13.2/configure.in
--- TiMidity++-2.13.2/configure.in~ 2007-12-10 13:23:01.000000000 +0100
+++ TiMidity++-2.13.2/configure.in 2007-12-10 13:23:01.000000000 +0100
@@ -1225,7 +1225,7 @@ AC_MSG_CHECKING(enable_audio=speex)
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 -up TiMidity++-2.13.2/timidity/speex_a.c~ TiMidity++-2.13.2/timidity/speex_a.c
--- TiMidity++-2.13.2/timidity/speex_a.c~ 2007-12-10 13:23:13.000000000 +0100
+++ TiMidity++-2.13.2/timidity/speex_a.c 2007-12-10 13:23:13.000000000 +0100
@@ -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"
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/timidity++/F-7/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- .cvsignore 9 Feb 2005 17:40:56 -0000 1.7
+++ .cvsignore 4 Mar 2008 21:32:39 -0000 1.8
@@ -1,5 +1 @@
-TiMidity++-2.13.0.tar.bz2
-britepno.pat.bz2
-instruments.tar.bz2
-pistol.pat.bz2
TiMidity++-2.13.2.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/timidity++/F-7/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources 9 Feb 2005 17:40:56 -0000 1.7
+++ sources 4 Mar 2008 21:32:39 -0000 1.8
@@ -1,4 +1 @@
-324e265362f812883024b58cf3470d1a britepno.pat.bz2
-3ff4264e611f89094a47940e4988ae81 instruments.tar.bz2
-f961325db679de6e0ea402ebe6a268f9 pistol.pat.bz2
a82ceeb2245e22f4de2b41da21eaee32 TiMidity++-2.13.2.tar.bz2
Index: timidity++.spec
===================================================================
RCS file: /cvs/extras/rpms/timidity++/F-7/timidity++.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- timidity++.spec 14 Oct 2007 20:01:35 -0000 1.14
+++ timidity++.spec 4 Mar 2008 21:32:39 -0000 1.15
@@ -1,25 +1,36 @@
Summary: A software wavetable MIDI synthesizer
Name: timidity++
Version: 2.13.2
-Release: 4%{?dist}
+Release: 13%{?dist}
Group: Applications/Multimedia
Source: http://downloads.sourceforge.net/timidity/TiMidity++-%{version}.tar.bz2
-Source1: http://archive.cs.umbc.edu/pub/midia/instruments.tar.bz2
-Source2: timidity.cfg
-Source3: http://www.stardate.bc.ca/eawpatches/eawpats/britepno.pat.bz2
-Source4: http://www.stardate.bc.ca/eawpatches/eawpats/pistol.pat.bz2
-Source5: fedora-timidity.desktop
+Source1: fedora-timidity.desktop
URL: http://timidity.sourceforge.net
-Patch: TiMidity++-2.13.0-redhat.patch
Patch3: TiMidity++-2.13.0-detect.patch
Patch5: TiMidity++-2.13.0-64bit.patch
Patch6: TiMidity++-2.13.0-warnings.patch
+Patch7: TiMidity++-2.13.2-flac-detect.patch
+Patch8: TiMidity++-2.13.2-speex.patch
+Patch9: TiMidity++-2.13.2-libao-first.patch
+# The following patches are courtesy of Debian
+Patch10: TiMidity++-2.13.2-man-pages.patch
+Patch11: TiMidity++-2.13.2-misc-fixes.patch
+Patch12: TiMidity++-2.13.2-mlutil.patch
+Patch13: TiMidity++-2.13.2-flac.patch
+# end Debian patches
+Patch14: TiMidity++-2.13.2-ipv6.patch
+Patch15: TiMidity++-2.13.2-dynlibroot.patch
+Patch16: TiMidity++-2.13.2-cfgfile-name.patch
+
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Obsoletes: timidity++-X11
BuildRequires: arts-devel esound-devel alsa-lib-devel ncurses-devel gtk2-devel
+BuildRequires: libao-devel libvorbis-devel flac-devel speex-devel
+%ifnarch ppc64
+BuildRequires: jack-audio-connection-kit-devel
+%endif
BuildRequires: desktop-file-utils
-Requires: %{name}-patches = %{version}-%{release}, hicolor-icon-theme
+Requires: PersonalCopy-Lite-soundfont hicolor-icon-theme
%description
TiMidity++ is a MIDI format to wave table format converter and
@@ -27,58 +38,52 @@
sound card does not natively support wave table format.
-%package patches
-Summary: Instrument (patch) files for %{name}
-Group: Applications/Multimedia
-
-%description patches
-This package contains samples of instruments (called patches) for use in
-wavetable midi synthesizers like %{name}. These patches are in the Gravis
-Ultasound .pat format and can be used by any wavetable midi synthesizer which
-understands this format.
-
-
%prep
%setup -q -n TiMidity++-%{version}
-# Put config files etc. to sane locations
-%patch -p1 -b .redhat
# Autodetect whether we should use aRts, esd, or neither
%patch3 -p1 -b .detect
# fix for x86_64 and s390x
%patch5 -p1 -b .64bit
%patch6 -p1 -b .warnings
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
%build
-export EXTRACFLAGS="$RPM_OPT_FLAGS"
+export EXTRACFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
%configure --enable-dynamic --disable-dependency-tracking \
- --enable-interface=ncurses,slang,vt100,alsaseq,server,network,gtk \
- --enable-audio=oss,arts,alsa,esd,vorbis \
- --enable-gtk
-make
+ --enable-interface=ncurses,vt100,alsaseq,server,network,gtk \
+%ifnarch ppc64
+ --enable-audio=oss,arts,alsa,esd,ao,jack,vorbis,speex,flac
+%else
+ --enable-audio=oss,arts,alsa,esd,ao,vorbis,speex,flac
+%endif
+make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
-
make install DESTDIR=$RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/timidity $RPM_BUILD_ROOT/etc
-install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/timidity.cfg
-ln -s /etc/timidity.cfg $RPM_BUILD_ROOT%{_datadir}/timidity/timidity.cfg
-pushd $RPM_BUILD_ROOT%{_datadir}/timidity
-tar xvjf %{SOURCE1}
-bzip2 -dck %{SOURCE3} >instruments/britepno.pat
-bzip2 -dck %{SOURCE4} >instruments/pistol.pat
-popd
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
+echo "soundfont %{_datadir}/soundfonts/PCLite.sf2" > \
+ $RPM_BUILD_ROOT/%{_sysconfdir}/timidity++.cfg
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
- %{SOURCE5}
+ %{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
-install -m 644 interface/pixmaps/timidity.xpm \
+install -p -m 644 interface/pixmaps/timidity.xpm \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/timidity.xpm
@@ -103,18 +108,68 @@
%files
%defattr(-,root,root,-)
+%doc AUTHORS COPYING README NEWS ChangeLog
+%config(noreplace) %{_sysconfdir}/timidity++.cfg
%{_bindir}/*
%{_mandir}/*/*
%{_datadir}/applications/fedora-timidity.desktop
%{_datadir}/icons/hicolor/48x48/apps/timidity.xpm
-%files patches
-%defattr(-,root,root,-)
-%config(noreplace) /etc/timidity.cfg
-%{_datadir}/timidity
-
%changelog
+* Mon Mar 3 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-13
+- Merge review fixes (bz 226492)
+ - merge patch0 into patch16, drop patch0
+ - Make License tag just GPLv2
+ - Unify macros usage
+
+* Thu Feb 28 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-12
+- Stop shipping a timidity++-patches package, investigation into the license
+ of the included patches has turned up doubts about the rights of the author
+ of the midas SGI midi player to release these into the Public Domain
+- Instead require PersonalCopy-Lite-soundfont, and point to PCLite.sf2 in
+ timidity++.cfg
+- Note PersonalCopy-Lite-soundfont also has a PersonalCopy-Lite-patches
+ sub-package with the .sf2 file converted to GUS patch format for other
+ applications who require timidity++-patches to get GUS format patches, this
+ package contains an /etc/timidity.cfg file pointing to the gus patches,
+ therefor the timidity++ package now ships a timidty++.cfg instead of a
+ timidity.cfg
+- Check for /etc/timidity++.cfg before trying /etc/timidity.cfg, see above for
+ rationale
+
+* Thu Feb 21 2008 Jindrich Novy <jnovy at redhat.com> 2.13.2-11
+- rebuild
+
+* Thu Feb 21 2008 Jindrich Novy <jnovy at redhat.com> 2.13.2-10
+- don't free a constant string if -d is specified (#433756),
+ thanks to Andrew Bartlett
+
+* Wed Feb 20 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-9
+- Add IPv6 support, patch by Milan Zazrivec (bz 198467)
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 2.13.2-8
+- Autorebuild for GCC 4.3
+
+* Thu Jan 24 2008 Jindrich Novy <jnovy at redhat.com> 2.13.2-7
+- merge review fixes, thanks to Mamoru Tasaka: (#226492)
+ - update License tag (still unclear what to do with GUS patches)
+ - remove useless unversioned obsolete timidity++-X11
+ - substitute /etc with %%{_sysconfdir}
+ - enable parallel build
+ - preserve timestamps, tar unpacking is no more verbose
+ - add docs
+
+* Tue Dec 11 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-6
+- Disable building of the jack output on powerpc64, as that mysteriously fails
+ to build there.
+
+* Mon Dec 10 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-5
+- Add patches to fix detect and compile of speex and flac outputs
+- Add various bugfixes from Debian
+- Enable ogg, flac, speex, libao and jack output formats (bz 412431)
+- Make libao the default output as libao support pulseaudio directly
+
* Sat Oct 13 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.13.2-4
- Split the patches of into a seperate sub package so that they can be used
by other wavetable midi synthesizers, without dragging in a bunch of unwanted
--- TiMidity++-2.13.0-redhat.patch DELETED ---
More information about the fedora-extras-commits
mailing list