New Package. Thanks to all people involved on bug #60542. Added two patches made...
authorLuis Medinas <metalgod@gentoo.org>
Sat, 12 Nov 2005 19:32:16 +0000 (19:32 +0000)
committerLuis Medinas <metalgod@gentoo.org>
Sat, 12 Nov 2005 19:32:16 +0000 (19:32 +0000)
Package-Manager: portage-2.0.53_rc7

media-plugins/xmms-speex/ChangeLog [new file with mode: 0644]
media-plugins/xmms-speex/Manifest [new file with mode: 0644]
media-plugins/xmms-speex/files/digest-xmms-speex-0.9.1 [new file with mode: 0644]
media-plugins/xmms-speex/files/xmms-speex-0.9.1-Makefile.patch [new file with mode: 0644]
media-plugins/xmms-speex/files/xmms-speex-0.9.1-fPIC.patch [new file with mode: 0644]
media-plugins/xmms-speex/files/xmms-speex-0.9.1.patch [new file with mode: 0644]
media-plugins/xmms-speex/metadata.xml [new file with mode: 0644]
media-plugins/xmms-speex/xmms-speex-0.9.1.ebuild [new file with mode: 0644]

diff --git a/media-plugins/xmms-speex/ChangeLog b/media-plugins/xmms-speex/ChangeLog
new file mode 100644 (file)
index 0000000..457f85e
--- /dev/null
@@ -0,0 +1,13 @@
+# 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.
+
diff --git a/media-plugins/xmms-speex/Manifest b/media-plugins/xmms-speex/Manifest
new file mode 100644 (file)
index 0000000..d962e36
--- /dev/null
@@ -0,0 +1,17 @@
+-----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-----
diff --git a/media-plugins/xmms-speex/files/digest-xmms-speex-0.9.1 b/media-plugins/xmms-speex/files/digest-xmms-speex-0.9.1
new file mode 100644 (file)
index 0000000..cbe28e5
--- /dev/null
@@ -0,0 +1 @@
+MD5 223a8c8fc7f073c7a7bd4fe6736ed0ee speex-xmms-0.9.1.tar.gz 34010
diff --git a/media-plugins/xmms-speex/files/xmms-speex-0.9.1-Makefile.patch b/media-plugins/xmms-speex/files/xmms-speex-0.9.1-Makefile.patch
new file mode 100644 (file)
index 0000000..c4cba07
--- /dev/null
@@ -0,0 +1,34 @@
+--- 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
diff --git a/media-plugins/xmms-speex/files/xmms-speex-0.9.1-fPIC.patch b/media-plugins/xmms-speex/files/xmms-speex-0.9.1-fPIC.patch
new file mode 100644 (file)
index 0000000..59603d5
--- /dev/null
@@ -0,0 +1,11 @@
+--- gui/Makefile.orig  2005-11-12 19:06:51.404630656 +0000
++++ gui/Makefile       2005-11-12 19:07:01.230136952 +0000
+@@ -3,7 +3,7 @@
+ PACKAGE=\"libspeex\"
+ 
+ INCDIRS=`xmms-config --cflags`
+-CFLAGS = -Wall
++CFLAGS = -Wall -fPIC
+ 
+ all: interface.o support.o callbacks.o
+ 
diff --git a/media-plugins/xmms-speex/files/xmms-speex-0.9.1.patch b/media-plugins/xmms-speex/files/xmms-speex-0.9.1.patch
new file mode 100644 (file)
index 0000000..897a09c
--- /dev/null
@@ -0,0 +1,143 @@
+--- 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;
+ }
+       
diff --git a/media-plugins/xmms-speex/metadata.xml b/media-plugins/xmms-speex/metadata.xml
new file mode 100644 (file)
index 0000000..e1774e3
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sound</herd>
+</pkgmetadata>
diff --git a/media-plugins/xmms-speex/xmms-speex-0.9.1.ebuild b/media-plugins/xmms-speex/xmms-speex-0.9.1.ebuild
new file mode 100644 (file)
index 0000000..18f1560
--- /dev/null
@@ -0,0 +1,37 @@
+# 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
+}