--- /dev/null
+# ChangeLog for media-plugins/xmms-speex
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/xmms-speex/ChangeLog,v 1.1 2005/11/12 19:32:16 metalgod Exp $
+
+*xmms-speex-0.9.1 (12 Nov 2005)
+
+ 12 Nov 2005; Luis Medinas <metalgod@gentoo.org>
+ +files/xmms-speex-0.9.1-Makefile.patch,
+ +files/xmms-speex-0.9.1-fPIC.patch, +files/xmms-speex-0.9.1.patch,
+ +metadata.xml, +xmms-speex-0.9.1.ebuild:
+ New Package. Thanks to all people involved on bug #60542. Added two patches
+ made by me to fix build on amd64 and add utf8 support.
+
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 5d1e6789b7e7b7a2d7d69b4dc03afea1 ChangeLog 596
+MD5 f1b246361021de7240b8d42d3bfc6628 files/digest-xmms-speex-0.9.1 67
+MD5 20e928b88139b6dd35e4ae5111a33e2b files/xmms-speex-0.9.1-Makefile.patch 1310
+MD5 cac9166ed35aa72f4f0578b13f23edd3 files/xmms-speex-0.9.1-fPIC.patch 265
+MD5 f541bb0c9411ed470faae2ada9afefde files/xmms-speex-0.9.1.patch 3211
+MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
+MD5 d95a474d9545112ddccce81b44034d64 xmms-speex-0.9.1.ebuild 882
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.1 (GNU/Linux)
+
+iD8DBQFDdkNxwUpWvClEHQoRAlP1AJ4+QkBgUmfxeBkkCYpAc8OSwBXzRgCggO9X
+y2IYF+C+q4rwZYA99CjsZcM=
+=uSam
+-----END PGP SIGNATURE-----
--- /dev/null
+--- Makefile.orig 2005-11-12 19:03:18.713964552 +0000
++++ Makefile 2005-11-12 19:11:19.461879760 +0000
+@@ -3,8 +3,8 @@
+ PACKAGE=\"libspeex\"
+
+ INCDIRS=`xmms-config --cflags`
+-CFLAGS = -Wall
+-OBJS = http.o config.o fileinfo.o speexutil.o # utf8.o
++CFLAGS = -Wall -fPIC
++OBJS = http.o config.o fileinfo.o speexutil.o utf8.o
+ GUIOBJS = gui/interface.o gui/support.o gui/callbacks.o
+ GUISRCS = gui/interface.c gui/interface.h gui/support.c gui/support.h gui/callbacks.c gui/callbacks.h
+
+@@ -16,8 +16,8 @@
+ libspeex.so: libspeex.c libspeex.h $(OBJS) $(GUIOBJS)
+ $(CC) -shared -logg -lspeex -lgtk -lpthread -lxmms $(INCDIRS) $(CFLAGS) -DVERSION=$(VERSION) -DPACKAGE=\"libspeex\" -o libspeex.so libspeex.c $(OBJS) $(GUIOBJS)
+
+-#utf8.o: utf8.c utf8.h
+-# $(CC) -c $(INCDIRS) $(CFLAGS) -DHAVE_ICONV -DICONV_CONST= -o utf8.o utf8.c
++utf8.o: utf8.c utf8.h
++ $(CC) -c $(INCDIRS) $(CFLAGS) -DHAVE_ICONV -DICONV_CONST= -o utf8.o utf8.c
+
+ http.o: http.c http.h
+ $(CC) -c $(INCDIRS) $(CFLAGS) -DVERSION=$(VERSION) -DPACKAGE=$(PACKAGE) -o http.o http.c
+@@ -33,7 +33,8 @@
+
+ install: libspeex.so
+ install libspeex.so `xmms-config --input-plugin-dir`
+-
++ install -d $(DESTDIR)`xmms-config --input-plugin-dir`
++ install libspeex.so $(DESTDIR)`xmms-config --input-plugin-dir`
+ clean:
+ $(MAKE) -C gui/ clean
+ rm -f *.so *.o
--- /dev/null
+--- libspeex.c.old 2004-10-11 00:57:18.000000000 +0800
++++ libspeex.c 2004-10-12 05:11:33.000000000 +0800
+@@ -190,7 +190,7 @@
+
+ static void play (char *filename) {
+
+- speex_comment_t comments;
++ speex_comment_t comments = {0};
+
+ if (speex_fs == NULL)
+ speex_fs = malloc(sizeof(Speex_File_State));
+@@ -215,9 +215,12 @@
+ }
+ else
+ {
+- speex_file_info(filename, NULL, &comments, &speex_fs->length);
+- speex_fs->length *= 1000;
+- speex_fs->title = generate_title(filename, &comments);
++ if (!speex_file_info(filename, NULL, &comments, &speex_fs->length))
++ {
++ speex_fs->length *= 1000;
++ speex_fs->title = generate_title(filename, &comments);
++ }
++ speex_comment_free(&comments);
+ }
+
+
+@@ -235,6 +238,7 @@
+ fprintf(stderr, PACKAGE ": error opening file\n");
+ #endif
+
++ speex_fs->playing = FALSE;
+ return;
+ }
+ }
+@@ -265,7 +269,7 @@
+ SpeexBits sbits;
+ SpeexStereoState stereo = SPEEX_STEREO_STATE_INIT;
+
+- speex_comment_t comments;
++ speex_comment_t comments = {0};
+ int valid_comment;
+
+ #ifdef DEBUG
+@@ -404,8 +408,8 @@
+ if (valid_comment)
+ {
+ speex_fs->title = generate_title(NULL, &comments);
+- speex_comment_free(&comments);
+ }
++ speex_comment_free(&comments);
+ }
+
+ }
+@@ -672,11 +676,13 @@
+ }
+
+ static void stop (void) {
+- speex_fs->playing = FALSE;
++ if (speex_fs->playing == TRUE)
++ {
++ speex_fs->playing = FALSE;
+
+- // Wait for the thread to close
+- pthread_join(spx_decode_thread, NULL);
+-
++ // Wait for the thread to close
++ pthread_join(spx_decode_thread, NULL);
++ }
+ #ifdef DEBUG
+ fprintf(stderr, PACKAGE ": stop\n");
+ #endif
+@@ -707,7 +713,7 @@
+
+ static void get_song_info (char *filename, char **title, int *length) {
+
+- speex_comment_t comments;
++ speex_comment_t comments = {0};
+
+ #ifdef DEBUG
+ fprintf(stderr, "get_song_info\n");
+@@ -720,10 +726,11 @@
+ }
+ else
+ {
+- speex_file_info(filename, NULL, &comments, length);
+- *length *= 1000;
+- (*title) = g_strdup(generate_title(filename, &comments));
+-
++ if(!speex_file_info(filename, NULL, &comments, length))
++ {
++ *length *= 1000;
++ (*title) = generate_title(filename, &comments);
++ }
+ speex_comment_free(&comments);
+ }
+
+--- speexutil.c.old 2004-10-11 00:33:43.000000000 +0800
++++ speexutil.c 2004-10-11 01:20:55.000000000 +0800
+@@ -161,15 +161,13 @@
+ }
+ else if (op.packetno == 1)
+ {
+- if (comment != NULL)
++ if (comment != NULL && comment->vendor == NULL)
+ {
+ if (!speex_comment_init(op.packet, op.bytes, comment))
+ {
+ #ifdef DEBUG
+ fprintf(stderr,"Warning: invalid comment struct\n");
+ #endif
+-
+- memset(comment, 0, sizeof(speex_comment_t));
+ }
+ }
+
+@@ -310,17 +308,18 @@
+ int i;
+
+ // Free vendor-string
+- free(comment->vendor);
++ if(comment->vendor != NULL) free(comment->vendor);
+
+- // Free comments
+- for(i=0; i < comment->comment_num; i++)
++ if(comment->comments != NULL)
+ {
+- free( *(comment->comments+i));
++ // Free comments
++ for(i=0; i < comment->comment_num; i++)
++ {
++ free( *(comment->comments+i));
++ }
++ // Free comment index
++ free(comment->comments);
+ }
+-
+- // Free comment index
+- free(comment->comments);
+-
+ return;
+ }
+
--- /dev/null
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/xmms-speex/xmms-speex-0.9.1.ebuild,v 1.1 2005/11/12 19:32:16 metalgod Exp $
+
+inherit eutils
+
+IUSE=""
+
+MY_P=speex-xmms-${PV}
+S=${WORKDIR}/speex-xmms
+DESCRIPTION="Speex plugin for XMMS"
+HOMEPAGE="http://jzb.rapanden.dk/projects/speex-xmms"
+SRC_URI="http://jzb.rapanden.dk/pub/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="media-sound/xmms"
+DEPEND="${RDEPEND}
+ >=media-libs/libogg-1.1
+ <=media-libs/speex-1.1.5
+ >=x11-libs/gtk+-1.2.10-r11"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${PF}.patch
+ epatch ${FILESDIR}/${P}-Makefile.patch
+ epatch ${FILESDIR}/${P}-fPIC.patch
+}
+
+src_install() {
+ exeinto `xmms-config --input-plugin-dir`
+ doexe libspeex.so || die
+ dodoc COPYING README
+}