summaryrefslogtreecommitdiff
path: root/media-libs/libtimidity/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/libtimidity/files
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/libtimidity/files')
-rw-r--r--media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch30
-rw-r--r--media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch22
2 files changed, 52 insertions, 0 deletions
diff --git a/media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch b/media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch
new file mode 100644
index 000000000000..ead93ffd32dd
--- /dev/null
+++ b/media-libs/libtimidity/files/libtimidity-0.1.0-automagic.patch
@@ -0,0 +1,30 @@
+diff -ur libtimidity-0.1.0.orig/configure.ac libtimidity-0.1.0/configure.ac
+--- libtimidity-0.1.0.orig/configure.ac 2004-11-23 06:30:46.000000000 +0200
++++ libtimidity-0.1.0/configure.ac 2007-08-02 15:51:47.000000000 +0300
+@@ -39,9 +39,24 @@
+ # Checks for libraries.
+ LIBTIMIDITY_LIBS=""
+ AC_CHECK_LIB([m], [pow], [LIBTIMIDITY_LIBS="$TIMIDITY_LIBS -lm"])
+-have_ao=no
+-XIPH_PATH_AO([have_ao=yes])
++
++AC_ARG_ENABLE([ao],
++ [AS_HELP_STRING([--enable-ao], [Enable libao (default=disabled)])],
++ [have_ao="$enableval"],
++ [have_ao="no"]
++)
++
++if test "$have_ao" = "yes"; then
++ PKG_CHECK_MODULES([AO], [ao >= 0.8.5])
++ AC_DEFINE([AO], [], [Define when building with ao])
++ HAVE_AO="true"
++else
++ HAVE_AO="false"
++fi
++
++AC_SUBST([ENABLE_AO])
+ AM_CONDITIONAL([HAVE_AO], [test $have_ao = yes])
++AC_SUBST(AO_LIBS)
+
+ # Checks for header files.
+ AC_HEADER_STDC
diff --git a/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch b/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch
new file mode 100644
index 000000000000..22952a5ebba1
--- /dev/null
+++ b/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch
@@ -0,0 +1,22 @@
+diff -Naur libtimidity-0.1.0/src/resample.c libtimidity-0.1.0-r1/src/resample.c
+--- libtimidity-0.1.0/src/resample.c 2004-11-21 23:02:53.000000000 +0100
++++ libtimidity-0.1.0-r1/src/resample.c 2008-02-24 18:46:36.000000000 +0100
+@@ -545,7 +545,8 @@
+ void pre_resample(MidSong *song, MidSample *sp)
+ {
+ double a, xdiff;
+- sint32 incr, ofs, newlen, count;
++ sint32 incr, ofs, count;
++ unsigned int newlen;
+ sint16 *newdata, *dest, *src = (sint16 *) sp->data;
+ sint16 v1, v2, v3, v4, *vptr;
+ #ifdef DEBUG_CHATTER
+@@ -561,7 +562,7 @@
+
+ a = ((double) (sp->sample_rate) * freq_table[(int) (sp->note_to_use)]) /
+ ((double) (sp->root_freq) * song->rate);
+- newlen = (sint32)(sp->data_length / a);
++ newlen = (unsigned int)(sp->data_length / a);
+ dest = newdata = safe_malloc(newlen >> (FRACTION_BITS - 1));
+
+ count = (newlen >> FRACTION_BITS) - 1;