[audacious-plugins] - PATCH: handle .m3u files with extra whitespace (#640516, Hans de Goede). - Merge scrobbler patch t

Michael Schwendt mschwendt at fedoraproject.org
Thu Oct 7 14:52:45 UTC 2010


commit 12cb368ea1895587c749a6aa6829e50436afeb03
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Thu Oct 7 16:52:50 2010 +0200

    - PATCH: handle .m3u files with extra whitespace (#640516, Hans de Goede).
    - Merge scrobbler patch that prevents submitting NULL tags.
    - Reenable projectM plugin for Fedora >= 14 (GCC >= 4.5).
    - Update stripped tarball that removes the .psf plugin because of
      a licensing issue.

 audacious-plugins-2.4-strip-m3u-lines.patch        |   14 +++++
 audacious-plugins-2.4.0-no-psf.patch               |    7 ++
 ...ious-plugins-2.4.0-scrobbler-no-null.diff.patch |   61 ++++++++++++++++++++
 audacious-plugins.spec                             |   28 ++++++++-
 sources                                            |    2 +-
 5 files changed, 108 insertions(+), 4 deletions(-)
---
diff --git a/audacious-plugins-2.4-strip-m3u-lines.patch b/audacious-plugins-2.4-strip-m3u-lines.patch
new file mode 100644
index 0000000..03e5752
--- /dev/null
+++ b/audacious-plugins-2.4-strip-m3u-lines.patch
@@ -0,0 +1,14 @@
+diff -up audacious-plugins-fedora-2.4.0/src/m3u/m3u.c~ audacious-plugins-fedora-2.4.0/src/m3u/m3u.c
+--- audacious-plugins-fedora-2.4.0/src/m3u/m3u.c~	2010-08-26 01:07:50.000000000 +0200
++++ audacious-plugins-fedora-2.4.0/src/m3u/m3u.c	2010-10-06 09:48:45.723414001 +0200
+@@ -104,9 +104,7 @@ playlist_load_m3u(const gchar * filename
+             vfs_fgets(&line[strlen(line)], 1024, file);
+         }
+ 
+-        while (line[strlen(line) - 1] == '\r' ||
+-               line[strlen(line) - 1] == '\n')
+-            line[strlen(line) - 1] = '\0';
++        g_strstrip(line);
+ 
+         if (str_has_prefix_nocase(line, "#EXTM3U")) {
+             is_extm3u = TRUE;
diff --git a/audacious-plugins-2.4.0-no-psf.patch b/audacious-plugins-2.4.0-no-psf.patch
new file mode 100644
index 0000000..5e9f9bc
--- /dev/null
+++ b/audacious-plugins-2.4.0-no-psf.patch
@@ -0,0 +1,7 @@
+diff -Nur audacious-plugins-fedora-2.4.0-orig/src/psf/Makefile audacious-plugins-fedora-2.4.0/src/psf/Makefile
+--- audacious-plugins-fedora-2.4.0-orig/src/psf/Makefile	1970-01-01 01:00:00.000000000 +0100
++++ audacious-plugins-fedora-2.4.0/src/psf/Makefile	2010-10-07 16:38:46.000000000 +0200
+@@ -0,0 +1,3 @@
++all:
++clean:
++install:
diff --git a/audacious-plugins-2.4.0-scrobbler-no-null.diff.patch b/audacious-plugins-2.4.0-scrobbler-no-null.diff.patch
new file mode 100644
index 0000000..74b23f5
--- /dev/null
+++ b/audacious-plugins-2.4.0-scrobbler-no-null.diff.patch
@@ -0,0 +1,61 @@
+diff -r af866f0080d8 src/scrobbler/scrobbler.c
+--- a/src/scrobbler/scrobbler.c	Sat Sep 25 10:19:45 2010 -0400
++++ b/src/scrobbler/scrobbler.c	Sat Sep 25 10:30:37 2010 -0400
+@@ -148,6 +148,13 @@
+ 
+     item->artist = fmt_escape(tuple_get_string(tuple, FIELD_ARTIST, NULL));
+     item->title = fmt_escape(tuple_get_string(tuple, FIELD_TITLE, NULL));
++
++    if (item->artist == NULL || item->title == NULL)
++    {
++        free (item);
++        return NULL;
++    }
++
+     item->len = len;
+     item->track = tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL);
+     item->timeplayed = 0;
+@@ -168,7 +175,9 @@
+ {
+     item_t *item;
+ 
+-    item = create_item(tuple, len);
++    if ((item = create_item (tuple, len)) == NULL)
++        return NULL;
++
+     item->timeplayed = len;
+     item->utctime = t;
+ 
+@@ -177,10 +186,12 @@
+ 
+ static item_t *set_np(Tuple *tuple, int len)
+ {
+-    q_item_free(np_item);
+-    np_item = create_item(tuple, len);
++    if (np_item != NULL)
++        q_item_free (np_item);
+ 
+-    AUDDBG("Tracking now-playing track: %s - %s\n", np_item->artist, np_item->title);
++    if ((np_item = create_item (tuple, len)) != NULL)
++        AUDDBG ("Tracking now-playing track: %s - %s\n", np_item->artist,
++         np_item->title);
+ 
+     return np_item;
+ }
+@@ -961,12 +972,10 @@
+ 
+                 tuple_free(tuple);
+ 
+-                AUDDBG("a[%d]=%s t[%d]=%s l[%d]=%d i[%d]=%d b[%d]=%s\n",
+-                                 i, I_ARTIST(item),
+-                                 i, I_TITLE(item),
+-                                 i, I_LEN(item),
+-                                 i, I_TIME(item),
+-                                 i, I_ALBUM(item));
++                if (item != NULL)
++                    AUDDBG ("a[%d]=%s t[%d]=%s l[%d]=%d i[%d]=%d b[%d]=%s\n", i,
++                     I_ARTIST (item), i, I_TITLE (item), i, I_LEN (item), i,
++                     I_TIME (item), i, I_ALBUM (item));
+             }
+ 
+             free(artist);
diff --git a/audacious-plugins.spec b/audacious-plugins.spec
index af40079..15e3bab 100644
--- a/audacious-plugins.spec
+++ b/audacious-plugins.spec
@@ -6,7 +6,7 @@
 
 Name: audacious-plugins
 Version: 2.4.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: Plugins for the Audacious audio player
 Group: Applications/Multimedia
 URL: http://audacious-media-player.org/
@@ -23,8 +23,14 @@ Source1: audacious-sid.desktop
 Patch0: audacious-plugins-2.0.1-xmms-skindir.patch
 # fix hardcoded libdir replacement
 Patch1: audacious-plugins-2.4-libdir.patch
-# submitted upstream by email
+# merged upstream
 Patch2: audacious-plugins-2.4.0-neon-seek_end.patch
+# submitted upstream by email
+Patch3: audacious-plugins-2.4-strip-m3u-lines.patch
+# fixed post-2.4.0
+Patch4: audacious-plugins-2.4.0-scrobbler-no-null.diff.patch
+# there will be a --disable-psf option in 2.4.1
+Patch5: audacious-plugins-2.4.0-no-psf.patch
 
 BuildRequires: audacious-devel >= %{aud_ver}
 BuildRequires: gettext
@@ -49,10 +55,14 @@ BuildRequires: libcddb-devel
 BuildRequires: libmtp-devel
 BuildRequires: libxml2-devel
 BuildRequires: libnotify-devel
-#BuildRequires: libprojectM-devel gtkglext-devel
 BuildRequires: libbs2b-devel
 BuildRequires: curl-devel
 
+%if 0%{?fedora} > 13
+# crashes with GCC < 4.5
+BuildRequires: libprojectM-devel gtkglext-devel
+%endif
+
 # experimental, disabled by default
 BuildRequires: neon-devel
 
@@ -129,6 +139,9 @@ providers may build it with libsidplay 2 instead.
 %patch0 -p1 -b .xmms-skindir
 %patch1 -p1 -b .libdir
 %patch2 -p1 -b .neon-seek
+%patch3 -p1 -b .m3u-whitespace
+%patch4 -p1 -b .scrobbler-no-null
+%patch5 -p1 -b .no-psf
 
 for i in src/ladspa/ladspa.c
 do
@@ -151,7 +164,9 @@ sed -i '\,^.SILENT:,d' buildsys.mk.in
     \
     --disable-oss  \
     --disable-projectm  \
+%if 0%{?fedora} < 14
     --disable-projectm-1.0  \
+%endif
     --disable-sse2  \
     --disable-rpath  \
     --disable-dependency-tracking
@@ -216,6 +231,13 @@ update-desktop-database &> /dev/null || :
 
 
 %changelog
+* Wed Oct  6 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 2.4.0-4
+- PATCH: handle .m3u files with extra whitespace (#640516, Hans de Goede).
+- Merge scrobbler patch that prevents submitting NULL tags.
+- Reenable projectM plugin for Fedora >= 14 (GCC >= 4.5).
+- Update stripped tarball that removes the .psf plugin because of
+  a licensing issue.
+
 * Wed Sep 29 2010 jkeating - 2.4.0-3
 - Rebuilt for gcc bug 634757
 
diff --git a/sources b/sources
index ac568db..5b48df7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c993a194ac9b9254e65ae25c2aa9626c  audacious-plugins-fedora-2.4.0.tar.bz2
+be022d26a7c5a80780726f61dcb861c3  audacious-plugins-fedora-2.4.0.tar.bz2


More information about the scm-commits mailing list