diff options
author | mezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-07-24 03:18:58 +0800 |
---|---|---|
committer | mezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-07-24 03:18:58 +0800 |
commit | ea55f3b2bed649895d0a305157d049811de8af05 (patch) | |
tree | 58e2b159dc3ffbdfca466db2a17f887065f43bd0 /audio | |
parent | 8bb58d593f34bfc85ce219059cbd7ebde11a3f45 (diff) | |
download | marcuscom-ports-ea55f3b2bed649895d0a305157d049811de8af05.tar marcuscom-ports-ea55f3b2bed649895d0a305157d049811de8af05.tar.gz marcuscom-ports-ea55f3b2bed649895d0a305157d049811de8af05.tar.bz2 marcuscom-ports-ea55f3b2bed649895d0a305157d049811de8af05.tar.lz marcuscom-ports-ea55f3b2bed649895d0a305157d049811de8af05.tar.xz marcuscom-ports-ea55f3b2bed649895d0a305157d049811de8af05.tar.zst marcuscom-ports-ea55f3b2bed649895d0a305157d049811de8af05.zip |
share/gnome/ -> share/.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@9238 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'audio')
-rw-r--r-- | audio/streamtuner/Makefile | 90 | ||||
-rw-r--r-- | audio/streamtuner/distinfo | 3 | ||||
-rw-r--r-- | audio/streamtuner/files/patch-src_plugins_live365_live365.c | 247 | ||||
-rw-r--r-- | audio/streamtuner/files/patch-src_plugins_python_pst-main.c | 18 | ||||
-rw-r--r-- | audio/streamtuner/pkg-descr | 8 | ||||
-rw-r--r-- | audio/streamtuner/pkg-plist | 108 |
6 files changed, 474 insertions, 0 deletions
diff --git a/audio/streamtuner/Makefile b/audio/streamtuner/Makefile new file mode 100644 index 000000000..1075bfb3e --- /dev/null +++ b/audio/streamtuner/Makefile @@ -0,0 +1,90 @@ +# New ports collection makefile for: streamtuner +# Date created: 02 Apr 2002 +# Whom: Jean-Yves Lefort <jylefort@brutele.be> +# +# $FreeBSD$ +# + +PORTNAME= streamtuner +PORTVERSION= 0.99.99 +PORTREVISION= 8 +CATEGORIES= audio www +MASTER_SITES= ${MASTER_SITE_SAVANNAH} +MASTER_SITE_SUBDIR= ${PORTNAME} + +MAINTAINER= jylefort@FreeBSD.org +COMMENT= A GTK+ stream directory browser + +BUILD_DEPENDS= scrollkeeper-config:${PORTSDIR}/textproc/scrollkeeper +LIB_DEPENDS= curl:${PORTSDIR}/ftp/curl +RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/gnome-icon-theme.pc:${PORTSDIR}/misc/gnome-icon-theme + +USE_XLIB= yes +USE_GNOME= gtk20 gnomehack gnomeprefix +USE_GMAKE= yes +INSTALLS_OMF= yes +GNU_CONFIGURE= yes +USE_GETOPT_LONG= yes +CPPFLAGS= -I${LOCALBASE}/include +LDFLAGS= -L${LOCALBASE}/lib +CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" + +OPTIONS= SHOUTCAST "SHOUTcast plugin" on \ + LIVE365 "Live365 plugin" on \ + XIPH "Xiph plugin" on \ + LOCAL "Local plugin" on \ + LOCAL_METADATA "metadata support for the Local plugin" on \ + PYTHON "Python plugin" on + +.include <bsd.port.pre.mk> + +.if defined(WITHOUT_SHOUTCAST) +CONFIGURE_ARGS+= --disable-shoutcast +PLIST_SUB+= SHOUTCAST="@comment " +.else +PLIST_SUB+= SHOUTCAST="" +.endif + +.if defined(WITHOUT_LIVE365) +CONFIGURE_ARGS+= --disable-live365 +PLIST_SUB+= LIVE365="@comment " +.else +PLIST_SUB+= LIVE365="" +.endif + +.if defined(WITHOUT_XIPH) +CONFIGURE_ARGS+= --disable-xiph +PLIST_SUB+= XIPH="@comment " +.else +PLIST_SUB+= XIPH="" +USE_GNOME+= libxml2 +.endif + +.if defined(WITHOUT_LOCAL) +CONFIGURE_ARGS+= --disable-local +PLIST_SUB+= LOCAL="@comment " +.else +PLIST_SUB+= LOCAL="" +.if defined(WITHOUT_LOCAL_METADATA) +CONFIGURE_ARGS+= --disable-local-metadata +.else +LIB_DEPENDS+= tag_c:${PORTSDIR}/audio/taglib +.endif +.endif + +.if defined(WITHOUT_PYTHON) +CONFIGURE_ARGS+= --disable-python +PLIST_SUB+= PYTHON="@comment " +.else +PLIST_SUB+= PYTHON="" +USE_PYTHON= 2.3+ +# we need to manually include this, because USE_PYTHON is defined +# after including bsd.port.pre.mk +.include "${PORTSDIR}/Mk/bsd.python.mk" +USE_GNOME+= pygtk2 +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|echo aout|echo elf|' ${WRKSRC}/configure + +.include <bsd.port.post.mk> diff --git a/audio/streamtuner/distinfo b/audio/streamtuner/distinfo new file mode 100644 index 000000000..a07760be9 --- /dev/null +++ b/audio/streamtuner/distinfo @@ -0,0 +1,3 @@ +MD5 (streamtuner-0.99.99.tar.gz) = 2027b7c34e85b594524b0b4351c14362 +SHA256 (streamtuner-0.99.99.tar.gz) = 5c223a5e8dab9e504617bd221914e97bd2f0ae5f6ed8fe78b8ea8b427fee9123 +SIZE (streamtuner-0.99.99.tar.gz) = 948075 diff --git a/audio/streamtuner/files/patch-src_plugins_live365_live365.c b/audio/streamtuner/files/patch-src_plugins_live365_live365.c new file mode 100644 index 000000000..2000c3b66 --- /dev/null +++ b/audio/streamtuner/files/patch-src_plugins_live365_live365.c @@ -0,0 +1,247 @@ +--- src/plugins/live365/live365.c.orig Wed May 11 03:49:30 2005 ++++ src/plugins/live365/live365.c Wed May 11 03:51:11 2005 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2003, 2004 Jean-Yves Lefort ++ * Copyright (C) 2002-2005 Jean-Yves Lefort + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -59,7 +59,9 @@ + { + ACCESS_ALL, + ACCESS_VIP, +- ACCESS_SUBSCRIPTION ++ ACCESS_SUBSCRIPTION, ++ ACCESS_SOLD_OUT, ++ ACCESS_UNKNOWN + } Access; + + typedef struct +@@ -94,7 +96,8 @@ + { + GList **streams; + Live365Stream *stream; +- Live365Stream *finished_stream; ++ gboolean first_page; ++ gboolean looped; + gboolean has_next_page; + } ReloadStreamsInfo; + +@@ -263,13 +266,16 @@ + + case FIELD_ACCESS_STRING: + { +- const char *str = NULL; ++ const char *str; + + switch (stream->access) + { + case ACCESS_ALL: str = _("All"); break; + case ACCESS_VIP: str = _("VIP"); break; + case ACCESS_SUBSCRIPTION: str = _("Subscription"); break; ++ case ACCESS_SOLD_OUT: str = _("Sold out"); break; ++ case ACCESS_UNKNOWN: str = _("Unknown"); break; ++ default: str = NULL; break; + } + + g_value_set_string(value, str); +@@ -707,14 +713,16 @@ + char *s1, *s2, *s3, *s4, *s5; + + if ((s1 = st_strstr_span(line, "<a href=\"/cgi-bin/directory")) +- && (s2 = st_strstr_span(s1, "&genre=")) ++ && (s2 = st_strstr_span(s1, "genre=")) + && (s3 = strchr(s2, '"')) + && (s4 = st_strchr_span(s3, '>')) + && (s5 = strstr(s4, "</a>"))) + { + category = st_category_new(); + category->name = g_strndup(s2, s3 - s2); +- category->label = st_sgml_ref_expand_len(s4, s5 - s4); ++ category->label = ! strcmp(category->name, "Recommendations") ++ ? g_strdup(_("Recommendations")) ++ : st_sgml_ref_expand_len(s4, s5 - s4); + category->url_postfix = g_strconcat(DIRECTORY_PREFIX, category->name, NULL); + } + else if ((s1 = st_strstr_span(line, "<a href=\"/genres/")) +@@ -755,6 +763,8 @@ + + *streams = NULL; + info.streams = streams; ++ info.first_page = TRUE; ++ info.looped = FALSE; + + session = st_transfer_session_new(); + +@@ -802,9 +812,11 @@ + if (status) /* only display warning if the transfer was otherwise correct */ + PARSE_ERROR; + } ++ ++ info.first_page = FALSE; + } +- while (status && info.has_next_page +- && (stream_limit == -1 || received_streams < stream_limit)); ++ while (status && info.has_next_page && ! info.looped ++ && (stream_limit == -1 || received_streams < stream_limit)); + + st_transfer_session_free(session); + +@@ -818,6 +830,10 @@ + char *s1, *s2, *s3, *s4, *s5, *s6, *s7; + char *word1, *word2, *word3; + ++ /* if we have detected a loop, we just ignore the page */ ++ if (info->looped) ++ return; ++ + if ((s1 = st_str_has_prefix_span(line, "<TD CLASS=\"icon\"")) + && (s2 = st_strstr_span(s1, "DrawPlayIcon"))) + { +@@ -834,15 +850,18 @@ + info->stream->access = ACCESS_VIP; + else if (strstr(s2, "'SUBSCRIPTION'")) + info->stream->access = ACCESS_SUBSCRIPTION; ++ else if (strstr(s2, "'SOLD_OUT'")) ++ info->stream->access = ACCESS_SOLD_OUT; + else +- PARSE_ERROR; +- +- info->finished_stream = NULL; ++ { ++ PARSE_ERROR; ++ info->stream->access = ACCESS_UNKNOWN; ++ } + } + else if ((s1 = st_str_has_prefix_span(line, "<TD CLASS=\"title")) +- && (s2 = st_strstr_span(s1, "href='")) +- && (s3 = strstr(s2, "'>")) +- && (s4 = strstr(s3, "</a>"))) ++ && (s2 = st_strstr_span(s1, "href='")) ++ && (s3 = strstr(s2, "'>")) ++ && (s4 = strstr(s3, "</a>"))) + { + if (info->stream) + { +@@ -865,12 +884,19 @@ + else + PARSE_ERROR; + } +- else if ((s1 = st_strstr_span(line, "&station_id=")) +- && (s2 = strchr(s1, '&'))) ++ else if ((s1 = st_str_has_prefix_span(line, "<TD CLASS=\"handle\"")) ++ && (s2 = st_strstr_span(s1, "ReadCookie(")) ++ && (s3 = st_strstr_span(s2, ", '")) ++ && (s4 = strchr(s3, '\'')) ++ && (s5 = st_strstr_span(s4, "&station_id=")) ++ && (s6 = strchr(s5, '&'))) + { + if (info->stream) + { +- word1 = g_strndup(s1, s2 - s1); ++ g_free(info->stream->broadcaster); ++ info->stream->broadcaster = st_sgml_ref_expand_len(s3, s4 - s3); ++ ++ word1 = g_strndup(s5, s6 - s5); + if (st_str_like(word1, ST_NUMERIC)) + info->stream->station_id = atoi(word1); + g_free(word1); +@@ -878,34 +904,23 @@ + else + PARSE_ERROR; + } +- else if ((s1 = st_strstr_span(line, "alt=\"More broadcaster info")) +- && (s2 = st_strchr_span(s1, '>')) +- && (s3 = strstr(s2, "</a>"))) +- { +- if (info->stream) +- { +- g_free(info->stream->broadcaster); +- info->stream->broadcaster = st_sgml_ref_expand_len(s2, s3 - s2); +- } +- else +- PARSE_ERROR; +- } + else if ((s1 = st_str_has_prefix_span(line, "<TD CLASS=\"connection\"")) + && (s2 = st_strchr_span(s1, '>')) +- && (s3 = strstr(s2, "<br>")) +- && ((s4 = strstr(s3, "<img src='/images/mp3pro")) +- || (s4 = strstr(s3, "</TD>")))) ++ && (s3 = strchr(s2, '<'))) + { + if (info->stream) + { + word1 = st_sgml_ref_expand_len(s2, s3 - s2); +- s3 += 4; word2 = st_sgml_ref_expand_len(s3, s4 - s3); +- ++ + g_free(info->stream->audio); +- info->stream->audio = g_strdup_printf(g_str_has_prefix(s4, "</TD>") ? "%s %s" : "%s %s, MP3Pro", word2, word1); + +- g_free(word1); +- g_free(word2); ++ if (strstr(s3, "<img src='/images/mp3pro")) ++ { ++ info->stream->audio = g_strdup_printf("%s, MP3Pro", word1); ++ g_free(word1); ++ } ++ else ++ info->stream->audio = word1; + } + else + PARSE_ERROR; +@@ -947,12 +962,17 @@ + else + PARSE_ERROR; + } +- else if (strstr(line, "TD CLASS=\"tabledesc2\"")) ++ else if ((s1 = st_strstr_span(line, "<TD CLASS=\"desc\""))) + { + if (info->stream) + { + if (info->stream->station_id) + { ++ if ((s2 = st_strstr_span(s1, "<a class='desc-link' href='")) ++ && (s3 = st_strchr_span(s2, '>')) ++ && (s4 = strstr(s3, "<BR>"))) ++ info->stream->description = st_sgml_ref_expand_len(s3, s4 - s3); ++ + ((STStream *) info->stream)->name = g_strdup_printf("%i", info->stream->station_id); + *(info->streams) = g_list_append(*(info->streams), info->stream); + } +@@ -962,23 +982,23 @@ + stream_free_cb(info->stream, NULL); + } + +- info->finished_stream = info->stream; + info->stream = NULL; + } + else + PARSE_ERROR; + } +- else if ((s1 = st_strstr_span(line, "<a class='desc-link' href='")) +- && (s2 = st_strchr_span(s1, '>')) +- && (s3 = strstr(s2, "<BR>"))) +- { +- if (info->finished_stream) +- { +- info->finished_stream->description = st_sgml_ref_expand_len(s2, s3 - s2); +- info->finished_stream = NULL; ++ else if ((s1 = st_strstr_span(line, "<TD class=\"pagination\"")) ++ && (s2 = st_strstr_span(s1, ">Showing ")) ++ && (s3 = strchr(s2, '-'))) ++ { ++ word1 = g_strndup(s2, s3 - s2); ++ if (st_str_like(word1, ST_NUMERIC)) ++ { ++ int n = atoi(word1); ++ if (n == 1 && ! info->first_page) ++ info->looped = TRUE; + } +- else +- PARSE_ERROR; ++ g_free(word1); + } + else if (strstr(line, "Next</A>")) + info->has_next_page = TRUE; diff --git a/audio/streamtuner/files/patch-src_plugins_python_pst-main.c b/audio/streamtuner/files/patch-src_plugins_python_pst-main.c new file mode 100644 index 000000000..1e5109750 --- /dev/null +++ b/audio/streamtuner/files/patch-src_plugins_python_pst-main.c @@ -0,0 +1,18 @@ +--- src/plugins/python/pst-main.c.orig Thu Mar 24 15:52:58 2005 ++++ src/plugins/python/pst-main.c Thu Mar 24 15:53:59 2005 +@@ -94,6 +94,7 @@ + { + gboolean status = FALSE; + PyObject *module; ++ char *argv[] = { "" }; + + if (! check_api_version(err)) + return FALSE; +@@ -109,6 +110,7 @@ + } + + Py_Initialize(); ++ PySys_SetArgv(G_N_ELEMENTS(argv), argv); + PyEval_InitThreads(); + + module = PyImport_AddModule("__main__"); diff --git a/audio/streamtuner/pkg-descr b/audio/streamtuner/pkg-descr new file mode 100644 index 000000000..331da3e96 --- /dev/null +++ b/audio/streamtuner/pkg-descr @@ -0,0 +1,8 @@ +streamtuner is a stream directory browser. Through the use of a plugin +system, it offers an intuitive GTK+ 2.0 interface to Internet radio +directories such as SHOUTcast and Live365. + +WWW: http://www.nongnu.org/streamtuner/ + +- Jean-Yves Lefort +jylefort@FreeBSD.org diff --git a/audio/streamtuner/pkg-plist b/audio/streamtuner/pkg-plist new file mode 100644 index 000000000..54e8fdb68 --- /dev/null +++ b/audio/streamtuner/pkg-plist @@ -0,0 +1,108 @@ +bin/streamtuner +include/streamtuner/st-action-api.h +include/streamtuner/st-category-api.h +include/streamtuner/st-dialog-api.h +include/streamtuner/st-handler-api.h +include/streamtuner/st-handler-field-api.h +include/streamtuner/st-handlers-api.h +include/streamtuner/st-m3u-api.h +include/streamtuner/st-pls-api.h +include/streamtuner/st-plugin-api.h +include/streamtuner/st-programs-api.h +include/streamtuner/st-re-api.h +include/streamtuner/st-settings-api.h +include/streamtuner/st-sgml-ref-api.h +include/streamtuner/st-state-api.h +include/streamtuner/st-stream-api.h +include/streamtuner/st-transfer-api.h +include/streamtuner/st-util-api.h +include/streamtuner/st-version-api.h +include/streamtuner/streamtuner.h +%%LIVE365%%lib/streamtuner/plugins/live365.so +%%LOCAL%%lib/streamtuner/plugins/local.so +%%PYTHON%%lib/streamtuner/plugins/python.so +%%SHOUTCAST%%lib/streamtuner/plugins/shoutcast.so +%%XIPH%%lib/streamtuner/plugins/xiph.so +libdata/pkgconfig/streamtuner.pc +share/doc/streamtuner/api-reference.html +share/doc/streamtuner/ch01s02.html +share/doc/streamtuner/home.png +share/doc/streamtuner/index.html +share/doc/streamtuner/index.sgml +share/doc/streamtuner/ix01.html +share/doc/streamtuner/left.png +share/doc/streamtuner/overview.html +share/doc/streamtuner/right.png +share/doc/streamtuner/streamtuner-STHandler.html +share/doc/streamtuner/streamtuner-STPlugin.html +share/doc/streamtuner/streamtuner-st-action-api.html +share/doc/streamtuner/streamtuner-st-category-api.html +share/doc/streamtuner/streamtuner-st-dialog-api.html +share/doc/streamtuner/streamtuner-st-handler-field-api.html +share/doc/streamtuner/streamtuner-st-handlers-api.html +share/doc/streamtuner/streamtuner-st-m3u-api.html +share/doc/streamtuner/streamtuner-st-pls-api.html +share/doc/streamtuner/streamtuner-st-programs-api.html +share/doc/streamtuner/streamtuner-st-re-api.html +share/doc/streamtuner/streamtuner-st-settings-api.html +share/doc/streamtuner/streamtuner-st-sgml-ref-api.html +share/doc/streamtuner/streamtuner-st-state-api.html +share/doc/streamtuner/streamtuner-st-stream-api.html +share/doc/streamtuner/streamtuner-st-transfer-api.html +share/doc/streamtuner/streamtuner-st-util-api.html +share/doc/streamtuner/streamtuner-st-version-api.html +share/doc/streamtuner/streamtuner.devhelp +share/doc/streamtuner/up.png +share/applications/streamtuner.desktop +share/gnome/help/streamtuner/C/documentation-license.xml +share/gnome/help/streamtuner/C/figures/main-window.png +share/gnome/help/streamtuner/C/software-license.xml +share/gnome/help/streamtuner/C/streamtuner.xml +share/omf/streamtuner/streamtuner-C.omf +share/pixmaps/streamtuner.png +share/streamtuner/ui/applications.png +share/streamtuner/ui/bookmarks.png +share/streamtuner/ui/browse.png +share/streamtuner/ui/category-open-running.png +share/streamtuner/ui/category-open.png +share/streamtuner/ui/category-running.png +share/streamtuner/ui/category.png +%%LIVE365%%share/streamtuner/ui/live365.png +%%LOCAL%%share/streamtuner/ui/local.png +share/streamtuner/ui/logo.png +share/streamtuner/ui/main-category-running.png +share/streamtuner/ui/main-category.png +share/streamtuner/ui/preselections.png +%%PYTHON%%share/streamtuner/ui/python.png +share/streamtuner/ui/record.png +share/streamtuner/ui/search-category-running.png +share/streamtuner/ui/search-category.png +share/streamtuner/ui/search.png +%%SHOUTCAST%%share/streamtuner/ui/shoutcast.png +share/streamtuner/ui/streamtuner.png +share/streamtuner/ui/tune-in.png +%%XIPH%%share/streamtuner/ui/xiph.png +%%PYTHON%%share/streamtuner/python/icons/basic.ch.png +%%PYTHON%%share/streamtuner/python/icons/google-stations.png +%%PYTHON%%share/streamtuner/python/icons/punkcast.com.png +%%PYTHON%%share/streamtuner/python/scripts/basic.ch.py +%%PYTHON%%share/streamtuner/python/scripts/google-stations.py +%%PYTHON%%share/streamtuner/python/scripts/punkcast.com.py +share/locale/de/LC_MESSAGES/streamtuner.mo +share/locale/fr/LC_MESSAGES/streamtuner.mo +share/locale/hu/LC_MESSAGES/streamtuner.mo +share/locale/ja/LC_MESSAGES/streamtuner.mo +share/locale/pt/LC_MESSAGES/streamtuner.mo +@dirrm include/streamtuner +@dirrm lib/streamtuner/plugins +@dirrm lib/streamtuner +@dirrm share/doc/streamtuner +@dirrm share/gnome/help/streamtuner/C/figures +@dirrm share/gnome/help/streamtuner/C +@dirrm share/gnome/help/streamtuner +@dirrm share/omf/streamtuner +@dirrm share/streamtuner/ui +%%PYTHON%%@dirrm share/streamtuner/python/icons +%%PYTHON%%@dirrm share/streamtuner/python/scripts +%%PYTHON%%@dirrm share/streamtuner/python +@dirrm share/streamtuner |