summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2004-06-15 07:26:16 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2004-06-15 07:26:16 +0000
commit6bd5c3dfd43bc2abbe2f6d93ce62a5ce972c75e3 (patch)
treeb1742fd885a7a86d8389466d25380480c45bea94 /media-sound/streamripper/files
parentadded nonis patch and uclibc USE to allow shadow to be compiled under uclibc ... (diff)
downloadgentoo-2-6bd5c3dfd43bc2abbe2f6d93ce62a5ce972c75e3.tar.gz
gentoo-2-6bd5c3dfd43bc2abbe2f6d93ce62a5ce972c75e3.tar.bz2
gentoo-2-6bd5c3dfd43bc2abbe2f6d93ce62a5ce972c75e3.zip
Version bump. Added ~sparc.
Diffstat (limited to 'media-sound/streamripper/files')
-rw-r--r--media-sound/streamripper/files/digest-streamripper-1.60.51
-rw-r--r--media-sound/streamripper/files/streamripper-1.60.5-interface.patch329
-rw-r--r--media-sound/streamripper/files/streamripper-1.60.5-syslibmad.patch86
3 files changed, 416 insertions, 0 deletions
diff --git a/media-sound/streamripper/files/digest-streamripper-1.60.5 b/media-sound/streamripper/files/digest-streamripper-1.60.5
new file mode 100644
index 000000000000..8b135e246dda
--- /dev/null
+++ b/media-sound/streamripper/files/digest-streamripper-1.60.5
@@ -0,0 +1 @@
+MD5 93f55294dec08ba0db98fdea4f20e5e0 streamripper-1.60.5.tar.gz 696486
diff --git a/media-sound/streamripper/files/streamripper-1.60.5-interface.patch b/media-sound/streamripper/files/streamripper-1.60.5-interface.patch
new file mode 100644
index 000000000000..54d9a55e9cb4
--- /dev/null
+++ b/media-sound/streamripper/files/streamripper-1.60.5-interface.patch
@@ -0,0 +1,329 @@
+diff -ru streamripper-1.60.5/console/streamripper.c streamripper-1.60.5.interface/console/streamripper.c
+--- streamripper-1.60.5/console/streamripper.c 2004-04-20 23:33:42.000000000 +0200
++++ streamripper-1.60.5.interface/console/streamripper.c 2004-05-04 00:30:29.867344272 +0200
+@@ -222,6 +222,8 @@
+ fprintf(stderr, " -a <file> - Rip to single file, default name is timestamped\n");
+ fprintf(stderr, " -d <dir> - The destination directory\n");
+ fprintf(stderr, " -s - Don't create a directory for each stream\n");
++ fprintf(stderr, " -I <interface> - Use the specified interface for stream\n");
++ fprintf(stderr, " -R <interface> - Use the specified interface for relay\n");
+ fprintf(stderr, " -r <base port> - Create relay server on base port, default port 8000\n");
+ fprintf(stderr, " -z - Don't scan for free ports if base port is not avail\n");
+ fprintf(stderr, " -p <url> - Use HTTP proxy server at <url>\n");
+@@ -296,6 +298,14 @@
+ case 'i':
+ m_opt.flags ^= OPT_ADD_ID3;
+ break;
++ case 'I':
++ i++;
++ strncpy(m_opt.stream_interface, argv[i], MAX_PATH_LEN);
++ break;
++ case 'R':
++ i++;
++ strncpy(m_opt.relay_interface, argv[i], MAX_PATH_LEN);
++ break;
+ case 'l':
+ i++;
+ time(&m_stop_time);
+Only in streamripper-1.60.5.interface/console: streamripper.c~
+diff -ru streamripper-1.60.5/lib/inet.c streamripper-1.60.5.interface/lib/inet.c
+--- streamripper-1.60.5/lib/inet.c 2002-05-22 04:10:18.000000000 +0200
++++ streamripper-1.60.5.interface/lib/inet.c 2004-05-04 00:07:26.961577904 +0200
+@@ -31,7 +31,7 @@
+ error_code inet_get_webpage_alloc(HSOCKET *sock, const char *url, const char *proxyurl,
+ char **buffer, unsigned long *size);
+ error_code inet_sc_connect(HSOCKET *sock, const char *url, const char *proxyurl,
+- SR_HTTP_HEADER *info, char *useragent);
++ SR_HTTP_HEADER *info, char *useragent, char *interface);
+
+ /*********************************************************************************
+ * Private functions
+@@ -42,7 +42,7 @@
+ * Connects to a shoutcast type stream, leaves when it's about to get the header info
+ */
+ error_code inet_sc_connect(HSOCKET *sock, const char *url, const char *proxyurl,
+- SR_HTTP_HEADER *info, char *useragent)
++ SR_HTTP_HEADER *info, char *useragent, char *interface)
+ {
+ char headbuf[MAX_HEADER_LEN];
+ URLINFO url_info;
+@@ -64,7 +64,7 @@
+ return ret;
+
+ DEBUG2(( "calling sock_open: host=%s, port=%d\n", url_info.host, url_info.port ));
+- if ((ret = socklib_open(sock, url_info.host, url_info.port)) != SR_SUCCESS)
++ if ((ret = socklib_open(sock, url_info.host, url_info.port, interface)) != SR_SUCCESS)
+ return ret;
+
+ DEBUG2(( "calling httplib_construct_sc_request\n" ));
+@@ -82,7 +82,7 @@
+ if (*info->http_location)
+ {
+ /* RECURSIVE CASE */
+- inet_sc_connect(sock, info->http_location, proxyurl, info, useragent);
++ inet_sc_connect(sock, info->http_location, proxyurl, info, useragent, interface);
+ }
+
+ return SR_SUCCESS;
+@@ -122,7 +122,7 @@
+ if ((ret = socklib_init()) != SR_SUCCESS)
+ return ret;
+
+- if ((ret = socklib_open(sock, url_info.host, url_info.port)) != SR_SUCCESS)
++ if ((ret = socklib_open(sock, url_info.host, url_info.port, NULL)) != SR_SUCCESS)
+ return ret;
+
+ if ((ret = httplib_construct_page_request(url, proxyurl != NULL, headbuf)) != SR_SUCCESS)
+diff -ru streamripper-1.60.5/lib/inet.h streamripper-1.60.5.interface/lib/inet.h
+--- streamripper-1.60.5/lib/inet.h 2001-12-24 08:33:50.000000000 +0100
++++ streamripper-1.60.5.interface/lib/inet.h 2004-05-04 00:07:26.961577904 +0200
+@@ -8,7 +8,7 @@
+ extern error_code inet_get_webpage_alloc(HSOCKET *sock, const char *url, const char *proxyurl,
+ char **buffer, unsigned long *size);
+ extern error_code inet_sc_connect(HSOCKET *sock, const char *url,
+- const char *proxyurl, SR_HTTP_HEADER *info, char *useragent);
++ const char *proxyurl, SR_HTTP_HEADER *info, char *useragent, char *interface);
+
+ #endif //__INET_H__
+
+diff -ru streamripper-1.60.5/lib/relaylib.c streamripper-1.60.5.interface/lib/relaylib.c
+--- streamripper-1.60.5/lib/relaylib.c 2002-05-22 04:10:18.000000000 +0200
++++ streamripper-1.60.5.interface/lib/relaylib.c 2004-05-04 00:07:26.961577904 +0200
+@@ -23,6 +23,8 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <net/if.h>
++#include <sys/ioctl.h>
+ #include <netdb.h>
+ #include <unistd.h>
+ #include <signal.h>
+@@ -49,18 +51,19 @@
+ /*********************************************************************************
+ * Public functions
+ *********************************************************************************/
+-error_code relaylib_init(BOOL search_ports, int base_port, int max_port, int *port_used);
++error_code relaylib_init(BOOL search_ports, int base_port, int max_port, int *port_used, char *interface);
+ void relaylib_shutdown();
+ error_code relaylib_set_response_header(char *http_header);
+ error_code relaylib_start();
+ error_code relaylib_send(char *data, int len);
+ BOOL relaylib_isrunning();
++extern error_code read_interface(char *interface, u_int32_t *addr);
+
+ /*********************************************************************************
+ * Private functions
+ *********************************************************************************/
+ static void thread_accept(void *notused);
+-static error_code try_port(u_short port);
++static error_code try_port(u_short port, char *interface);
+
+
+ /*********************************************************************************
+@@ -98,7 +101,7 @@
+ }
+ #endif
+
+-error_code relaylib_init(BOOL search_ports, int relay_port, int max_port, int *port_used)
++error_code relaylib_init(BOOL search_ports, int relay_port, int max_port, int *port_used, char *interface)
+ {
+ int ret;
+ #ifdef WIN32
+@@ -130,7 +133,7 @@
+
+ for(;relay_port <= max_port; relay_port++)
+ {
+- if ((ret = try_port((u_short)relay_port)) == SR_ERROR_CANT_BIND_ON_PORT)
++ if ((ret = try_port((u_short)relay_port, interface)) == SR_ERROR_CANT_BIND_ON_PORT)
+ continue; // Keep searching.
+
+ if (ret == SR_SUCCESS)
+@@ -145,15 +148,16 @@
+ return SR_ERROR_CANT_BIND_ON_PORT;
+ }
+
+-error_code try_port(u_short port)
++error_code try_port(u_short port, char *interface)
+ {
+ struct sockaddr_in local;
+
+ m_listensock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
+ if (m_listensock == SOCKET_ERROR)
+ return SR_ERROR_SOCK_BASE;
+-
+- local.sin_addr.s_addr = htonl(INADDR_ANY);
++
++ if (read_interface(interface,&local.sin_addr.s_addr) != 0)
++ local.sin_addr.s_addr = htonl(INADDR_ANY);
+ local.sin_family = AF_INET;
+ local.sin_port = htons(port);
+
+diff -ru streamripper-1.60.5/lib/relaylib.h streamripper-1.60.5.interface/lib/relaylib.h
+--- streamripper-1.60.5/lib/relaylib.h 2001-08-04 07:00:08.000000000 +0200
++++ streamripper-1.60.5.interface/lib/relaylib.h 2004-05-04 00:07:26.961577904 +0200
+@@ -3,7 +3,7 @@
+
+ #include "types.h"
+
+-extern error_code relaylib_init(BOOL search_ports, int relay_port, int max_port, int *port_used);
++extern error_code relaylib_init(BOOL search_ports, int relay_port, int max_port, int *port_used, char *interface);
+ extern void relaylib_shutdown();
+ extern error_code relaylib_set_response_header(char *http_header);
+ extern error_code relaylib_start();
+diff -ru streamripper-1.60.5/lib/rip_manager.c streamripper-1.60.5.interface/lib/rip_manager.c
+--- streamripper-1.60.5/lib/rip_manager.c 2004-04-26 06:47:51.000000000 +0200
++++ streamripper-1.60.5.interface/lib/rip_manager.c 2004-05-04 00:20:54.760773760 +0200
+@@ -527,7 +527,7 @@
+ * Connect to the stream
+ */
+ ret = inet_sc_connect(&m_sock, m_options.url, pproxy, &m_info,
+- m_options.useragent);
++ m_options.useragent, m_options.stream_interface);
+ if (ret != SR_SUCCESS) {
+ goto RETURN_ERR;
+ }
+@@ -631,7 +631,8 @@
+ if (GET_MAKE_RELAY(m_options.flags)) {
+ int new_port = 0;
+ ret = relaylib_init(GET_SEARCH_PORTS(m_options.flags),
+- m_options.relay_port, m_options.max_port, &new_port);
++ m_options.relay_port, m_options.max_port, &new_port,
++ m_options.relay_interface);
+ if (ret != SR_SUCCESS) {
+ goto RETURN_ERR;
+ }
+Only in streamripper-1.60.5.interface/lib: rip_manager.c~
+diff -ru streamripper-1.60.5/lib/rip_manager.h streamripper-1.60.5.interface/lib/rip_manager.h
+--- streamripper-1.60.5/lib/rip_manager.h 2004-04-26 06:47:51.000000000 +0200
++++ streamripper-1.60.5.interface/lib/rip_manager.h 2004-05-04 00:18:06.966282400 +0200
+@@ -88,6 +88,8 @@
+ char proxyurl[MAX_URL_LEN]; // url of a http proxy server, '\0' otherwise
+ char output_directory[MAX_PATH_LEN]; // base directory to output files too
+ char output_file[MAX_PATH_LEN]; // filename base when ripping without splitting
++ char relay_interface[MAX_PATH_LEN]; // interface to use for relay
++ char stream_interface[MAX_PATH_LEN]; // interface to use for stream
+ int relay_port; // port to use for the relay server
+ u_short max_port; // highest port the relay server can look if it needs to search
+ u_long maxMB_rip_size; // max number of megabytes that can by writen out before we stop
+diff -ru streamripper-1.60.5/lib/socklib.c streamripper-1.60.5.interface/lib/socklib.c
+--- streamripper-1.60.5/lib/socklib.c 2004-03-02 21:33:41.000000000 +0100
++++ streamripper-1.60.5.interface/lib/socklib.c 2004-05-04 00:07:45.324786272 +0200
+@@ -29,6 +29,8 @@
+ #include <sys/socket.h>
+ #include <sys/uio.h>
+ #include <netinet/in.h>
++#include <net/if.h>
++#include <sys/ioctl.h>
+ #include <netdb.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+@@ -63,7 +65,7 @@
+ * Public functions
+ *********************************************************************************/
+ error_code socklib_init();
+-error_code socklib_open(HSOCKET *socket_handle, char *host, int port);
++error_code socklib_open(HSOCKET *socket_handle, char *host, int port, char *interface);
+ void socklib_close(HSOCKET *socket_handle);
+ void socklib_cleanup();
+ error_code socklib_read_header(HSOCKET *socket_handle, char *buffer, int size,
+@@ -72,6 +74,7 @@
+ int socklib_sendall(HSOCKET *socket_handle, char* buffer, int size);
+ error_code socklib_recvall_alloc(HSOCKET *socket_handle, char** buffer, unsigned long *size,
+ int (*recvall)(HSOCKET *socket_handle, char* buffer, int size));
++error_code read_interface(char *interface, u_int32_t *addr);
+
+ /*********************************************************************************
+ * Private Vars
+@@ -110,9 +113,32 @@
+ * socket_handle gets assigned to the handle for the connection
+ */
+
+-error_code socklib_open(HSOCKET *socket_handle, char *host, int port)
++error_code read_interface(char *interface, u_int32_t *addr)
+ {
+- struct sockaddr_in address;
++ int fd;
++ struct ifreq ifr;
++
++ memset(&ifr, 0, sizeof(struct ifreq));
++ if((fd = socket(AF_INET, SOCK_DGRAM, 0)) >= 0) {
++ ifr.ifr_addr.sa_family = AF_INET;
++ strcpy(ifr.ifr_name, interface);
++ if (ioctl(fd, SIOCGIFADDR, &ifr) == 0)
++ *addr = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr;
++ else {
++ close(fd);
++ return -2;
++ }
++ } else
++ return -1;
++ close(fd);
++ return 0;
++}
++
++
++error_code socklib_open(HSOCKET *socket_handle, char *host, int port,
++ char* interface)
++{
++ struct sockaddr_in address, local;
+ struct hostent *hp;
+ int len;
+
+@@ -121,6 +147,18 @@
+
+ DEBUG2(( "creating our socket\n" ));
+ socket_handle->s = socket(AF_INET, SOCK_STREAM, 0);
++
++ if (interface) {
++ if (read_interface(interface,&local.sin_addr.s_addr) != 0)
++ local.sin_addr.s_addr = htonl(INADDR_ANY);
++ local.sin_family = AF_INET;
++ local.sin_port = 0;
++ if (bind(socket_handle->s, (struct sockaddr *)&local, sizeof(local)) == SOCKET_ERROR) {
++ WSACleanup();
++ closesocket(socket_handle->s);
++ return SR_ERROR_CANT_BIND_ON_INTERFACE;
++ }
++ }
+
+ DEBUG2(( "checking hostname\n" ));
+ if ((address.sin_addr.s_addr = inet_addr(host)) == INADDR_NONE)
+diff -ru streamripper-1.60.5/lib/socklib.h streamripper-1.60.5.interface/lib/socklib.h
+--- streamripper-1.60.5/lib/socklib.h 2001-08-04 07:00:10.000000000 +0200
++++ streamripper-1.60.5.interface/lib/socklib.h 2004-05-04 00:07:26.962577752 +0200
+@@ -15,7 +15,7 @@
+
+
+ extern error_code socklib_init();
+-extern error_code socklib_open(HSOCKET *socket_handle, char *host, int port);
++extern error_code socklib_open(HSOCKET *socket_handle, char *host, int port, char *interface);
+ extern void socklib_close(HSOCKET *socket_handle);
+ extern void socklib_cleanup();
+ extern error_code socklib_read_header(HSOCKET *socket_handle, char *buffer, int size,
+diff -ru streamripper-1.60.5/lib/types.h streamripper-1.60.5.interface/lib/types.h
+--- streamripper-1.60.5/lib/types.h 2004-04-17 22:53:54.000000000 +0200
++++ streamripper-1.60.5.interface/lib/types.h 2004-05-04 00:07:26.962577752 +0200
+@@ -144,6 +144,7 @@
+ #define SR_ERROR_NO_TRACK_INFO - 0x1D
+ #define SR_EEROR_CANT_FIND_SUBSTR - 0x1E
+ #define SR_ERROR_CANT_BIND_ON_PORT - 0x1F
++#define SR_ERROR_CANT_BIND_ON_INTERFACE - 0x40
+ #define SR_ERROR_HOST_NOT_CONNECTED - 0x20
+ #define SR_ERROR_HTTP_404_ERROR - 0x21
+ #define SR_ERROR_HTTP_401_ERROR - 0x22
+Only in streamripper-1.60.5/libmad-0.15.1b: mad.h
+diff -ru streamripper-1.60.5/streamripper.1 streamripper-1.60.5.interface/streamripper.1
+--- streamripper-1.60.5/streamripper.1 2004-03-22 16:37:18.000000000 +0100
++++ streamripper-1.60.5.interface/streamripper.1 2004-05-04 00:22:14.662626832 +0200
+@@ -38,6 +38,10 @@
+ add sequence number to output file
+ .IP "\fB\-i\fR" 4
+ dont add ID3V1 Tags to output file
++.IP "\fB\-I <interface>\fR" 4
++bind stream socket to the specified interface
++.IP "\fB\-R <interface>\fR" 4
++bind relay server socket to the specified interface
+ .IP "\fB\-u <useragent>\fR" 4
+ Use a different UserAgent then "Streamripper"
+ .IP "\fB\-\-x\fR" 4
+Only in streamripper-1.60.5.interface/: streamripper.1~
diff --git a/media-sound/streamripper/files/streamripper-1.60.5-syslibmad.patch b/media-sound/streamripper/files/streamripper-1.60.5-syslibmad.patch
new file mode 100644
index 000000000000..b25c4c32537e
--- /dev/null
+++ b/media-sound/streamripper/files/streamripper-1.60.5-syslibmad.patch
@@ -0,0 +1,86 @@
+--- Makefile.am.orig 2004-06-15 00:15:27.204647204 -0700
++++ Makefile.am 2004-06-15 00:16:12.507149151 -0700
+@@ -1,7 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+
+-SUBDIRS = libmad-0.15.1b
+-
+ bin_PROGRAMS = streamripper
+ streamripper_SOURCES = \
+ console/streamripper.c \
+@@ -36,67 +34,6 @@
+ lib/types.h \
+ lib/util.h
+
+-libmad_manifest = \
+- libmad-0.15.1b/README \
+- libmad-0.15.1b/configure.ac \
+- libmad-0.15.1b/aclocal.m4 \
+- libmad-0.15.1b/mad.h \
+- libmad-0.15.1b/Makefile.am \
+- libmad-0.15.1b/Makefile.in \
+- libmad-0.15.1b/config.h.in \
+- libmad-0.15.1b/libmad.list.in \
+- libmad-0.15.1b/configure \
+- libmad-0.15.1b/COPYING \
+- libmad-0.15.1b/INSTALL \
+- libmad-0.15.1b/TODO \
+- libmad-0.15.1b/config.guess \
+- libmad-0.15.1b/config.sub \
+- libmad-0.15.1b/depcomp \
+- libmad-0.15.1b/install-sh \
+- libmad-0.15.1b/ltmain.sh \
+- libmad-0.15.1b/missing \
+- libmad-0.15.1b/mkinstalldirs \
+- libmad-0.15.1b/version.c \
+- libmad-0.15.1b/fixed.c \
+- libmad-0.15.1b/bit.c \
+- libmad-0.15.1b/timer.c \
+- libmad-0.15.1b/stream.c \
+- libmad-0.15.1b/frame.c \
+- libmad-0.15.1b/synth.c \
+- libmad-0.15.1b/decoder.c \
+- libmad-0.15.1b/layer12.c \
+- libmad-0.15.1b/layer3.c \
+- libmad-0.15.1b/huffman.c \
+- libmad-0.15.1b/version.h \
+- libmad-0.15.1b/fixed.h \
+- libmad-0.15.1b/bit.h \
+- libmad-0.15.1b/timer.h \
+- libmad-0.15.1b/stream.h \
+- libmad-0.15.1b/frame.h \
+- libmad-0.15.1b/synth.h \
+- libmad-0.15.1b/decoder.h \
+- libmad-0.15.1b/global.h \
+- libmad-0.15.1b/layer12.h \
+- libmad-0.15.1b/layer3.h \
+- libmad-0.15.1b/huffman.h \
+- libmad-0.15.1b/D.dat \
+- libmad-0.15.1b/imdct_s.dat \
+- libmad-0.15.1b/qc_table.dat \
+- libmad-0.15.1b/rq_table.dat \
+- libmad-0.15.1b/sf_table.dat \
+- libmad-0.15.1b/imdct_l_arm.S \
+- libmad-0.15.1b/minimad.c \
+- libmad-0.15.1b/mad.h.sed \
+- libmad-0.15.1b/CHANGES \
+- libmad-0.15.1b/COPYRIGHT \
+- libmad-0.15.1b/CREDITS \
+- libmad-0.15.1b/VERSION \
+- libmad-0.15.1b/msvc++/Makefile.am \
+- libmad-0.15.1b/msvc++/Makefile.in \
+- libmad-0.15.1b/msvc++/mad.h \
+- libmad-0.15.1b/msvc++/config.h \
+- libmad-0.15.1b/msvc++/libmad.dsp
+-
+ man_MANS = \
+ streamripper.1
+
+@@ -117,6 +54,6 @@
+ AM_CPPFLAGS = -Ilib -Ilibmad-0.15.1b -D__UNIX__
+
+ streamripper_LDADD = \
+- libmad-0.15.1b/.libs/libmad.a @THREADLIBS@
++ -lmad @THREADLIBS@
+
+