diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-05-23 19:41:24 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-05-23 19:41:24 +0000 |
commit | f9bea429092b660aa8a18391395c819cc12094be (patch) | |
tree | 2eb88456c884bea26b6c9d18dbacaffdec145bd4 /media-sound/gmpc | |
parent | Sparc stable, Bug #221169. (diff) | |
download | historical-f9bea429092b660aa8a18391395c819cc12094be.tar.gz historical-f9bea429092b660aa8a18391395c819cc12094be.tar.bz2 historical-f9bea429092b660aa8a18391395c819cc12094be.zip |
Thanks to amateja from PLD Linux chatroom at Freenode for helping me out porting gmpc to libxspf from libspiff.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'media-sound/gmpc')
-rw-r--r-- | media-sound/gmpc/ChangeLog | 9 | ||||
-rw-r--r-- | media-sound/gmpc/Manifest | 7 | ||||
-rw-r--r-- | media-sound/gmpc/files/gmpc-0.18.0-libxspf.patch | 243 | ||||
-rw-r--r-- | media-sound/gmpc/gmpc-0.18.0-r1.ebuild (renamed from media-sound/gmpc/gmpc-0.18.0.ebuild) | 21 | ||||
-rw-r--r-- | media-sound/gmpc/metadata.xml | 2 |
5 files changed, 268 insertions, 14 deletions
diff --git a/media-sound/gmpc/ChangeLog b/media-sound/gmpc/ChangeLog index 466aec4e68b8..107d320ea95e 100644 --- a/media-sound/gmpc/ChangeLog +++ b/media-sound/gmpc/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-sound/gmpc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/gmpc/ChangeLog,v 1.57 2009/03/20 15:44:58 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/gmpc/ChangeLog,v 1.58 2009/05/23 19:41:24 ssuominen Exp $ + +*gmpc-0.18.0-r1 (23 May 2009) + + 23 May 2009; Samuli Suominen <ssuominen@gentoo.org> -gmpc-0.18.0.ebuild, + +gmpc-0.18.0-r1.ebuild, +files/gmpc-0.18.0-libxspf.patch, metadata.xml: + Thanks to amateja from PLD Linux chatroom at Freenode for helping me out + porting gmpc to libxspf from libspiff. 20 Mar 2009; Raúl Porcel <armin76@gentoo.org> gmpc-0.17.0.ebuild: x86 stable wrt #259793 diff --git a/media-sound/gmpc/Manifest b/media-sound/gmpc/Manifest index b0fc716103a4..797e9589c99b 100644 --- a/media-sound/gmpc/Manifest +++ b/media-sound/gmpc/Manifest @@ -1,6 +1,7 @@ +AUX gmpc-0.18.0-libxspf.patch 7703 RMD160 60f5bea8020d2d4b27c9d4f85e70c4c3599a5dd4 SHA1 e8753ce40847fa27e7b9fccbdedf8d418e710a0d SHA256 39e2ee8d209b8b5fbe838d27092cd13d66f06c1109bbf1be63c9a19c55931efc DIST gmpc-0.17.0.tar.gz 1041200 RMD160 5ae15f833c333e6fcd47c7ee9712782ff169ae36 SHA1 2b4d4f33e3374440936e91ddc790a98cff13ef1b SHA256 0fb21ace04b4e75aa82a0b0d3993c9b0e0ed2e8b48cbeecc083cfd2f4fe9061a DIST gmpc-0.18.0.tar.gz 1376241 RMD160 64980140fbdb4de1d35c9af8ac604780ae81c8a4 SHA1 95b4ec3c094fd91007407dfa559d5aef50542d6a SHA256 7bb7bfebf6782f6bb3f9d586cb6a35a4340ef69f43b52ad0e06959b141a7db81 EBUILD gmpc-0.17.0.ebuild 1093 RMD160 485bc193ce12895b8a068c172ccb9a52ca6542be SHA1 6d2df821878caf38c0217cbc819d5bcd2d930c2c SHA256 2ff6442063e1b5b387834c95dad87ea477e2cfaa6dfe4f4e9f5ee5dffffdba40 -EBUILD gmpc-0.18.0.ebuild 1254 RMD160 1df5d9002d6fb5d862155501244926883cfbadaf SHA1 48daff63c3cfa0fbbb8fe5d0541535fb8bc82e7f SHA256 45db3637dd1cf5cba55947d55dee50e58c57d82ca8b1658311d370bd3b95fc15 -MISC ChangeLog 7097 RMD160 ac327567fdc44851af774a910273ac3828407c07 SHA1 ef9056fa6e7dcccd23cf4c1eba430b69721bc03b SHA256 06b79cc3cbff8595a2456c8a1fae76cc70b3efb50297aac2fbeb2d1ec73f177f -MISC metadata.xml 327 RMD160 79dc7b5e202c406a161477cf28b895648203033a SHA1 ee8d8986956836d9322d9ac7725c7861ddbee1e3 SHA256 23f335fab641860a46f117eb66f704b6c1cfa96b88a0d8a0f800de46c5cf8f29 +EBUILD gmpc-0.18.0-r1.ebuild 1322 RMD160 81316b1e61dbd2185001982a2c66df403d6676f8 SHA1 01a11bd0f7154b631f1de23107630f47e1932cec SHA256 e08ce92ef900ecfa868861b8021f350bfceb1555088f1268fbff29c82903cc29 +MISC ChangeLog 7396 RMD160 6e436991fe8d8a002b06865578c5e4d27ee73187 SHA1 d6612562f401768290422c88c6f72641d9676ba5 SHA256 2fcf5fe4d3941bd1aaa9080db66f6b9ac2cb2ec49e4f447902f5cceaccc31a90 +MISC metadata.xml 342 RMD160 b79e0d8f63f387d420131a9d8196ac331f568b40 SHA1 4b8aebf988b206e50585b953bc457fc8133d3038 SHA256 fce3f240732cac6a55582a57289563d327e6b26922f9c6f33763498574303905 diff --git a/media-sound/gmpc/files/gmpc-0.18.0-libxspf.patch b/media-sound/gmpc/files/gmpc-0.18.0-libxspf.patch new file mode 100644 index 000000000000..761d28b1ebde --- /dev/null +++ b/media-sound/gmpc/files/gmpc-0.18.0-libxspf.patch @@ -0,0 +1,243 @@ +diff -ur gmpc-0.18.0.orig/configure.ac gmpc-0.18.0/configure.ac +--- gmpc-0.18.0.orig/configure.ac 2009-03-09 18:23:10.000000000 +0200 ++++ gmpc-0.18.0/configure.ac 2009-05-23 22:33:14.000000000 +0300 +@@ -63,34 +63,30 @@ + AC_MSG_ERROR([GMPC plugin requires zlib]) + fi + ++PKG_PROG_PKG_CONFIG + +-libspiff=0; ++libxspf=0; + +-AC_ARG_ENABLE(libspiff, +- [ --enable-libspiff Use libspiff to parse spiff playlists.], ++AC_ARG_ENABLE(libxspf, ++ [ --enable-libxspf Use libxspf to parse XSPF playlists.], + [ case "${enableval}" in +- yes) enable_libspiff=yes;; +- no) enable_libspiff=no;; +- *) AC_MSG_ERROR([bad value ${enableval} for --enable-libspiff]);; ++ yes) enable_libxspf=yes;; ++ no) enable_libxspf=no;; ++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libxspf]);; + esac], +- [enable_libspiff=auto]) ++ [enable_libxspf=auto]) + +-if test "x${enable_libspiff}" != xno; then +- AC_CHECK_HEADER(spiff/spiff_c.h, AC_CHECK_LIB(spiff, spiff_parse,libspiff=1,libspiff=0),libspiff=0) +- if test "x${libspiff}" == "x1"; +- then +- AC_DEFINE(SPIFF,1,["Use or don't use libspiff"]) +- SPIFF_LIBS=-lspiff +- AC_SUBST(SPIFF_LIBS) +- else +- if test "x${enable_libspiff}" == "xyes"; then +- AC_MSG_ERROR([libspiff not found]) +- fi +- fi ++if test "x${enable_libxspf}" != xno; then ++ PKG_CHECK_MODULES([xspf], [xspf], [ ++ AC_DEFINE(XSPF,1,["Use or don't use libxspf"]) ++ libxspf=1 ++ ], [ ++ if test "x${enable_libxspf}" = "xyes"; then ++ AC_MSG_ERROR([libxspf not found]) ++ fi]) + fi +- +-PKG_PROG_PKG_CONFIG +- ++AC_SUBST(xspf_LIBS) ++AC_SUBST(xspf_CFLAGS) + + # Checks for header files. + AC_HEADER_STDC +@@ -475,10 +471,10 @@ + else + echo "Use mac integration library: disabled" + fi +-if test "x$libspiff" = "x1"; then +- echo "Use libspiff library: enabled" ++if test "x$libxspf" = "x1"; then ++ echo "Use libxspf library: enabled" + else +- echo "Use libspiff library: disabled" ++ echo "Use libxspf library: disabled" + fi + echo ""; + echo "Now type make to build" +diff -ur gmpc-0.18.0.orig/src/Makefile.am gmpc-0.18.0/src/Makefile.am +--- gmpc-0.18.0.orig/src/Makefile.am 2009-03-09 18:23:05.000000000 +0200 ++++ gmpc-0.18.0/src/Makefile.am 2009-05-23 22:33:14.000000000 +0300 +@@ -97,7 +97,7 @@ + @libglade_LIBS@\ + @gthread_LIBS@\ + @libsoup_LIBS@\ +- @SPIFF_LIBS@\ ++ @xspf_LIBS@\ + @sm_LIBS@ + + if USE_SYSTEM_LIBSEXY +@@ -126,6 +126,7 @@ + @gthread_CFLAGS@\ + @sm_CFLAGS@\ + @libsoup_CFLAGS@\ ++ @xspf_CFLAGS@\ + @EXTRA_CFLAGS@\ + -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\"\ + -DPACKAGE_DATA_DIR=\""$(datarootdir)"\" +diff -ur gmpc-0.18.0.orig/src/url_fetcher.c gmpc-0.18.0/src/url_fetcher.c +--- gmpc-0.18.0.orig/src/url_fetcher.c 2009-03-09 18:23:05.000000000 +0200 ++++ gmpc-0.18.0/src/url_fetcher.c 2009-05-23 22:33:14.000000000 +0300 +@@ -25,8 +25,8 @@ + #include "playlist3.h" + #include "gmpc_easy_download.h" + +-#ifdef SPIFF +-#include <spiff/spiff_c.h> ++#ifdef XSPF ++#include <xspf_c.h> + #endif + /** in gmpc */ + void pl3_option_menu_activate(); +@@ -89,73 +89,57 @@ + } + } + /*** +- * parse spiff file ++ * parse XSPF file + */ +-static void url_parse_spiff_file(const char *data, int size) ++static void url_parse_xspf_file(const char *data, int size, const char *uri) + { +-#ifdef SPIFF ++#ifdef XSPF + int songs= 0; +- const gchar *tempdir = g_get_tmp_dir(); +- gchar *filename = g_build_filename(tempdir, "gmpc-temp-spiff-file",NULL); +- if(filename) +- { +- GError *error = NULL; +- int has_http = FALSE, has_file = FALSE; +- char **handlers = mpd_server_get_url_handlers(connection); +- int i = 0; +- for (i = 0; handlers && handlers[i]; i++) { +- if (strcmp(handlers[i], "http://") == 0) { +- has_http = TRUE; +- } else if (strcmp(handlers[i], "file://") == 0) { +- has_file = TRUE; +- } +- } +- if (handlers) +- g_strfreev(handlers); +- +- g_file_set_contents(filename, data,(gssize)size, &error); +- if(!error) +- { +- struct spiff_track *strack; +- struct spiff_mvalue *sloc; +- struct spiff_list *slist = spiff_parse(filename); +- if (slist != NULL) +- { +- SPIFF_LIST_FOREACH_TRACK(slist, strack) { +- SPIFF_TRACK_FOREACH_LOCATION(strack, sloc) { +- char *scheme = g_uri_parse_scheme(sloc->value); +- if(scheme) +- { +- debug_printf(DEBUG_INFO, "Trying to add url: %s", sloc->value); +- if(strcmp(scheme, "http") == 0 && has_http) +- { +- mpd_playlist_add(connection, sloc->value); +- songs++; +- } +- else if(strcmp(scheme, "file") == 0 && has_file) +- { +- mpd_playlist_add(connection, sloc->value); +- songs++; +- } +- g_free(scheme); +- } +- else{ +- debug_printf(DEBUG_ERROR, "Failed to parse scheme: %s",sloc->value); +- } +- } +- } +- spiff_free(slist); +- } +- g_unlink(filename); +- } +- else +- { +- debug_printf(DEBUG_ERROR, "Error message: %s", error->message); +- g_error_free(error); +- } ++ GError *error = NULL; ++ int has_http = FALSE, has_file = FALSE; ++ char **handlers = mpd_server_get_url_handlers(connection); ++ int i = 0; ++ for (i = 0; handlers && handlers[i]; i++) { ++ if (strcmp(handlers[i], "http://") == 0) { ++ has_http = TRUE; ++ } else if (strcmp(handlers[i], "file://") == 0) { ++ has_file = TRUE; ++ } ++ } ++ if (handlers) ++ g_strfreev(handlers); ++ ++ struct xspf_track *strack; ++ struct xspf_mvalue *sloc; ++ struct xspf_list *slist = xspf_parse_memory(data, (int)size, uri); ++ if (slist != NULL) ++ { ++ XSPF_LIST_FOREACH_TRACK(slist, strack) { ++ XSPF_TRACK_FOREACH_LOCATION(strack, sloc) { ++ char *scheme = g_uri_parse_scheme(sloc->value); ++ if(scheme) ++ { ++ debug_printf(DEBUG_INFO, "Trying to add url: %s", sloc->value); ++ if(strcmp(scheme, "http") == 0 && has_http) ++ { ++ mpd_playlist_add(connection, sloc->value); ++ songs++; ++ } ++ else if(strcmp(scheme, "file") == 0 && has_file) ++ { ++ mpd_playlist_add(connection, sloc->value); ++ songs++; ++ } ++ g_free(scheme); ++ } ++ else{ ++ debug_printf(DEBUG_ERROR, "Failed to parse scheme: %s",sloc->value); ++ } ++ } ++ } ++ xspf_free(slist); ++ } + +- g_free(filename); +- } + if (songs) { + char *string = g_strdup_printf(_("Added %i %s"), songs, ngettext("stream", "streams", songs)); + pl3_push_statusbar_message(string); +@@ -164,7 +148,7 @@ + + + #else +- debug_printf(DEBUG_ERROR, "Spiff not supported, install libspiff"); ++ debug_printf(DEBUG_ERROR, "XSPF playlist not supported, install libxspf"); + #endif + } + +@@ -220,7 +204,7 @@ + else if (!strncasecmp(data, "<?xml", 5)) { + debug_printf(DEBUG_INFO, "Detected a xml file, might be xspf"); + /* This might just be a xspf file */ +- url_parse_spiff_file(data, size); ++ url_parse_xspf_file(data, size, text); + } + /** pls file: */ + else if (!strncasecmp(data, "[playlist]", 10)) { diff --git a/media-sound/gmpc/gmpc-0.18.0.ebuild b/media-sound/gmpc/gmpc-0.18.0-r1.ebuild index 32120a805a64..8e841aa66073 100644 --- a/media-sound/gmpc/gmpc-0.18.0.ebuild +++ b/media-sound/gmpc/gmpc-0.18.0-r1.ebuild @@ -1,10 +1,9 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/gmpc/gmpc-0.18.0.ebuild,v 1.2 2009/03/15 08:38:43 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/gmpc/gmpc-0.18.0-r1.ebuild,v 1.1 2009/05/23 19:41:24 ssuominen Exp $ -EAPI=1 - -inherit gnome2-utils +EAPI=2 +inherit autotools eutils gnome2-utils DESCRIPTION="A GTK+2 client for the Music Player Daemon" HOMEPAGE="http://gmpcwiki.sarine.nl/index.php/GMPC" @@ -13,7 +12,7 @@ SRC_URI="mirror://sourceforge/musicpd/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" -IUSE="nls session spiff" +IUSE="nls session xspf" RDEPEND=">=dev-libs/glib-2.10:2 dev-perl/XML-Parser @@ -24,20 +23,24 @@ RDEPEND=">=dev-libs/glib-2.10:2 >=x11-libs/gtk+-2.12:2 x11-libs/libsexy session? ( x11-libs/libSM ) - spiff? ( media-libs/libspiff )" + xspf? ( >=media-libs/libxspf-1.2 )" DEPEND="${RDEPEND} dev-util/gob dev-util/intltool dev-util/pkgconfig sys-devel/gettext" -src_compile() { +src_prepare() { + epatch "${FILESDIR}"/${P}-libxspf.patch + eautoreconf +} + +src_configure() { econf \ $(use_enable session sm) \ - $(use_enable spiff libspiff) \ + $(use_enable xspf libxspf) \ --enable-system-libsexy \ --disable-shave - emake || die "emake failed" } src_install() { diff --git a/media-sound/gmpc/metadata.xml b/media-sound/gmpc/metadata.xml index ec34307f13ad..35e639abbdcf 100644 --- a/media-sound/gmpc/metadata.xml +++ b/media-sound/gmpc/metadata.xml @@ -7,6 +7,6 @@ <name>Christoph Mende</name> </maintainer> <use> - <flag name='spiff'>Use libspiff to parse XSPF playlists</flag> + <flag name='xspf'>Enable support for reading and saving XSPF playlists</flag> </use> </pkgmetadata> |