summaryrefslogtreecommitdiff
path: root/audio/xmms
diff options
context:
space:
mode:
authorrh <rh@pkgsrc.org>2002-10-14 09:46:59 +0000
committerrh <rh@pkgsrc.org>2002-10-14 09:46:59 +0000
commitd3cb7452129c291c13fa1bf33aec5f684935dd53 (patch)
tree10936089c640c8f8068a0af7b0784b423c711996 /audio/xmms
parent1de77096a248b2cfd6a2c5f180e88876e7e2603e (diff)
downloadpkgsrc-d3cb7452129c291c13fa1bf33aec5f684935dd53.tar.gz
Add support for IPv6, mainly using the patches from
http://www.version6.net/ Bump PKGREVISION. This closes PR pkg/17771 by Tomi Nylund <wizard@sik.oulu.fi>
Diffstat (limited to 'audio/xmms')
-rw-r--r--audio/xmms/Makefile12
-rw-r--r--audio/xmms/distinfo7
-rw-r--r--audio/xmms/patches/patch-ac58
-rw-r--r--audio/xmms/patches/patch-ad58
-rw-r--r--audio/xmms/patches/patch-ao164
-rw-r--r--audio/xmms/patches/patch-at83
-rw-r--r--audio/xmms/patches/patch-au12
7 files changed, 389 insertions, 5 deletions
diff --git a/audio/xmms/Makefile b/audio/xmms/Makefile
index 33976b9d768..8eb4b74772a 100644
--- a/audio/xmms/Makefile
+++ b/audio/xmms/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2002/10/03 08:05:27 jlam Exp $
+# $NetBSD: Makefile,v 1.36 2002/10/14 09:46:59 rh Exp $
#
DISTNAME= xmms-1.2.7
@@ -12,9 +12,9 @@ HOMEPAGE= http://www.xmms.org/
COMMENT= X Multimedia System --- An audio player with a Winamp GUI
USE_BUILDLINK2= yes
-USE_LIBTOOL= yes
-USE_GMAKE= yes
-GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --without-gnome
LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
@@ -28,6 +28,10 @@ LIBS+= -liconv
PTHREAD_OPTS+= require
+.if defined(USE_INET6) && ${USE_INET6} == YES
+CONFIGURE_ARGS+= --enable-ipv6
+.endif
+
.if (${OPSYS} == NetBSD)
CONFIGURE_ARGS+= --with-dev-dsp=${DEVOSSSOUND}
CPPFLAGS+= -DHAVE_NANOSLEEP=1
diff --git a/audio/xmms/distinfo b/audio/xmms/distinfo
index 4e6ffe00b06..ffff4fb3838 100644
--- a/audio/xmms/distinfo
+++ b/audio/xmms/distinfo
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.9 2002/03/21 18:52:31 drochner Exp $
+$NetBSD: distinfo,v 1.10 2002/10/14 09:46:59 rh Exp $
SHA1 (xmms-1.2.7.tar.gz) = 2f910d88af9bb5e8d54e796653beef969b555c68
Size (xmms-1.2.7.tar.gz) = 2860908 bytes
SHA1 (patch-aa) = b1945d9d161cc538e5dda1014571f582be1a951c
SHA1 (patch-ab) = 6f236de07dcd7ce8a2325effe038e42ea4222250
+SHA1 (patch-ac) = 4c3dc43fd83bacfacd376235d3723aeee96570f2
+SHA1 (patch-ad) = 7645b1a2bbb338c9bea8b2015d5763486f77d16a
SHA1 (patch-ae) = 1e486f43bfe8dbafbbea3db3781ec08196184ee2
SHA1 (patch-af) = 472e2504fae530b34785e18d38d6f45891494a6d
SHA1 (patch-ag) = 24a56ba54752994806518872d03709559f5ac620
@@ -14,7 +16,10 @@ SHA1 (patch-ak) = 83f26d8d0a80def2ee28aa09f3261ff97d019dbf
SHA1 (patch-al) = caae7feb9ddc7a1d51c734b5f9a1eb669279066e
SHA1 (patch-am) = eb86d881c229b73e37efc1e6fec7d806699fc2c2
SHA1 (patch-an) = e4169817fbdd978dd8c97cafa3447df277e53ecf
+SHA1 (patch-ao) = 666eeb2d55c3ee6881a4d482f33bc1284d7f3455
SHA1 (patch-ap) = 493a4d81960b4d11548b8f277c00b8315339ac02
SHA1 (patch-aq) = 3eb19fbebfc0ea68cd6703b6b3d1a706406b1aee
SHA1 (patch-ar) = ef35ce733dceac323119b5bbb3065164fac87c74
SHA1 (patch-as) = 1f62167c7901e8d2211f39a25e6f902935a413b1
+SHA1 (patch-at) = e95b1cc83944a388d74d6968852fa6e3e6f9d5a4
+SHA1 (patch-au) = 7e68b5de230003d40399c7a2aa2b2264e033803f
diff --git a/audio/xmms/patches/patch-ac b/audio/xmms/patches/patch-ac
new file mode 100644
index 00000000000..48038e8b062
--- /dev/null
+++ b/audio/xmms/patches/patch-ac
@@ -0,0 +1,58 @@
+$NetBSD: patch-ac,v 1.4 2002/10/14 09:46:59 rh Exp $
+
+--- configure.orig Tue Mar 5 07:57:01 2002
++++ configure
+@@ -256,6 +256,8 @@ ac_help="$ac_help
+ --with-catgets use catgets functions if available"
+ ac_help="$ac_help
+ --enable-3dnow build with 3DNow! instructions support"
++ac_help="$ac_help
++ --enable-ipv6 enable IPv6 support [default=no]"
+
+ # Initialize some variables set by options.
+ # The variables have the same names as the options, with
+@@ -10622,8 +10624,33 @@ else
+ fi
+
+
++# Check whether --enable-ipv6 or --disable-ipv6 was given.
++if test "${enable_ipv6+set}" = set; then
++ enableval="$enable_ipv6"
++ enable_ipv6=$enableval
++else
++ enable_ipv6=no
++fi
++
++if test "x$enable_ipv6" = xyes; then
++ cat >> confdefs.h <<\EOF
++#define USE_IPV6 1
++EOF
++
++fi
++
++
++if test "x$enable_ipv6" = xyes; then
++ USE_IPV6_TRUE=
++ USE_IPV6_FALSE='#'
++else
++ USE_IPV6_TRUE='#'
++ USE_IPV6_FALSE=
++fi
++
++
+ echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
+-echo "configure:10627: checking for socklen_t" >&5
++echo "configure:10654: checking for socklen_t" >&5
+ if eval "test \"`echo '$''{'xmms_cv_type_socklen_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -12254,6 +12281,9 @@ s%@OUTPUT_PLUGINS@%$OUTPUT_PLUGINS%g
+ s%@VISUALIZATION_PLUGINS@%$VISUALIZATION_PLUGINS%g
+ s%@USE_3DNOW_TRUE@%$USE_3DNOW_TRUE%g
+ s%@USE_3DNOW_FALSE@%$USE_3DNOW_FALSE%g
++s%@USE_IPV6_TRUE@%$USE_IPV6_TRUE%g
++s%@USE_IPV6_FALSE@%$USE_IPV6_FALSE%g
++s%@USE_IPV6@%$USE_IPV6%g
+ s%@OSS_CFLAGS@%$OSS_CFLAGS%g
+ s%@POSIX_LIBS@%$POSIX_LIBS%g
+ s%@HAVE_OSS_TRUE@%$HAVE_OSS_TRUE%g
diff --git a/audio/xmms/patches/patch-ad b/audio/xmms/patches/patch-ad
new file mode 100644
index 00000000000..3019b80626b
--- /dev/null
+++ b/audio/xmms/patches/patch-ad
@@ -0,0 +1,58 @@
+$NetBSD: patch-ad,v 1.3 2002/10/14 09:47:00 rh Exp $
+
+--- Input/cdaudio/http.c.orig Fri Jul 21 18:54:17 2000
++++ Input/cdaudio/http.c
+@@ -25,9 +25,45 @@
+ gint http_open_connection(gchar * server, gint port)
+ {
+ gint sock;
++#ifdef USE_IPV6
++ struct addrinfo hints, *res, *res0;
++ char service[6];
++#else
+ struct hostent *host;
+ struct sockaddr_in address;
++#endif
+
++#ifdef USE_IPV6
++ snprintf(service, 6, "%d", port);
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_socktype = SOCK_STREAM;
++
++ if (getaddrinfo(server, service, &hints, &res0))
++ return 0;
++
++ for (res = res0; res; res = res->ai_next) {
++ sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol);
++ if (sock < 0) {
++ if (res->ai_next)
++ continue;
++ else {
++ freeaddrinfo(res0);
++ return 0;
++ }
++ }
++ if (connect(sock, res->ai_addr, res->ai_addrlen) < 0) {
++ if (res->ai_next) {
++ close(sock);
++ continue;
++ } else {
++ freeaddrinfo(res0);
++ return 0;
++ }
++ }
++ freeaddrinfo(res0);
++ return sock;
++ }
++#else
+ sock = socket(AF_INET, SOCK_STREAM, 0);
+ address.sin_family = AF_INET;
+
+@@ -40,6 +76,7 @@ gint http_open_connection(gchar * server
+ if (connect(sock, (struct sockaddr *) &address, sizeof (struct sockaddr_in)) == -1)
+ return 0;
+
++#endif
+ return sock;
+ }
+
diff --git a/audio/xmms/patches/patch-ao b/audio/xmms/patches/patch-ao
new file mode 100644
index 00000000000..832cafe9434
--- /dev/null
+++ b/audio/xmms/patches/patch-ao
@@ -0,0 +1,164 @@
+$NetBSD: patch-ao,v 1.4 2002/10/14 09:47:00 rh Exp $
+
+--- Input/mpg123/http.c.orig Tue Jan 8 00:08:04 2002
++++ Input/mpg123/http.c
+@@ -332,8 +332,13 @@ static void *http_buffer_loop(void *arg)
+ gboolean redirect;
+ int udp_sock = 0;
+ fd_set set;
++#ifdef USE_IPV6
++ struct addrinfo hints, *res, *res0;
++ char service[6];
++#else
+ struct hostent *hp;
+ struct sockaddr_in address;
++#endif
+ struct timeval tv;
+
+ url = (gchar *) arg;
+@@ -355,6 +360,45 @@ static void *http_buffer_loop(void *arg)
+ chost = mpg123_cfg.use_proxy ? mpg123_cfg.proxy_host : host;
+ cport = mpg123_cfg.use_proxy ? mpg123_cfg.proxy_port : port;
+
++#ifdef USE_IPV6
++ snprintf(service, 6, "%d", cport);
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_socktype = SOCK_STREAM;
++ if (! getaddrinfo(chost, service, &hints, &res0)) {
++ eof = TRUE;
++ for (res = res0; res; res = res->ai_next) {
++ if ((sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0)
++ continue;
++ fcntl(sock, F_SETFL, O_NONBLOCK);
++ status = g_strdup_printf(_("CONNECTING TO %s:%d"), chost, cport);
++ mpg123_ip.set_info_text(status);
++ g_free(status);
++ ((struct sockaddr_in6 *)res->ai_addr)->sin6_port = htons(cport);
++ if (connect(sock, res->ai_addr, res->ai_addrlen) < 0) {
++ if (errno != EINPROGRESS) {
++ close(sock);
++ continue;
++ }
++ }
++ eof = FALSE;
++ break;
++ }
++ freeaddrinfo(res0);
++ if (eof) {
++ status = g_strdup_printf(_("Couldn't connect to host %s:%d"), chost, cport);
++ show_error_message(status);
++ g_free(status);
++ mpg123_ip.set_info_text(NULL);
++ }
++ } else {
++ status = g_strdup_printf(_("Couldn't look up host %s"), chost);
++ show_error_message(status);
++ g_free(status);
++
++ mpg123_ip.set_info_text(NULL);
++ eof = TRUE;
++ }
++#else
+ sock = socket(AF_INET, SOCK_STREAM, 0);
+ fcntl(sock, F_SETFL, O_NONBLOCK);
+ address.sin_family = AF_INET;
+@@ -372,9 +416,11 @@ static void *http_buffer_loop(void *arg)
+ mpg123_ip.set_info_text(NULL);
+ eof = TRUE;
+ }
++#endif
+
+ if (!eof)
+ {
++#ifndef USE_IPV6
+ memcpy(&address.sin_addr.s_addr, *(hp->h_addr_list), sizeof (address.sin_addr.s_addr));
+ address.sin_port = g_htons(cport);
+
+@@ -393,6 +439,7 @@ static void *http_buffer_loop(void *arg)
+ eof = TRUE;
+ }
+ }
++#endif
+ while (going)
+ {
+ tv.tv_sec = 0;
+@@ -697,14 +744,23 @@ char *mpg123_http_get_title(char *url)
+ /* Find a good local udp port and bind udp_sock to it, return the port */
+ static int udp_establish_listener(int *sock)
+ {
++#ifdef USE_IPV6
++ struct sockaddr_in6 sin;
++ socklen_t sinlen = sizeof (struct sockaddr_in6);
++#else
+ struct sockaddr_in sin;
+ socklen_t sinlen = sizeof (struct sockaddr_in);
++#endif
+
+ #ifdef DEBUG_UDP
+ fprintf (stderr,"Establishing udp listener\n");
+ #endif
+
++#ifdef USE_IPV6
++ if ((*sock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
++#else
+ if ((*sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
++#endif
+ {
+ g_log(NULL, G_LOG_LEVEL_CRITICAL,
+ "udp_establish_listener(): unable to create socket");
+@@ -712,8 +768,12 @@ static int udp_establish_listener(int *s
+ }
+
+ memset(&sin, 0, sinlen);
++#ifdef USE_IPV6
++ sin.sin6_family = AF_INET6;
++#else
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = g_htonl(INADDR_ANY);
++#endif
+
+ if (bind(*sock, (struct sockaddr *)&sin, sinlen) < 0)
+ {
+@@ -743,7 +803,11 @@ static int udp_establish_listener(int *s
+ fprintf (stderr,"Listening on local %s:%d\n", inet_ntoa(sin.sin_addr), g_ntohs(sin.sin_port));
+ #endif
+
++#ifdef USE_IPV6
++ return g_ntohs(sin.sin6_port);
++#else
+ return g_ntohs(sin.sin_port);
++#endif
+ }
+
+ static int udp_check_for_data(int sock)
+@@ -752,10 +816,14 @@ static int udp_check_for_data(int sock)
+ char *valptr;
+ gchar *title;
+ gint len, i;
++#ifdef USE_IPV6
++ struct sockaddr_in6 from;
++#else
+ struct sockaddr_in from;
++#endif
+ socklen_t fromlen;
+
+- fromlen = sizeof(struct sockaddr_in);
++ fromlen = sizeof(from);
+
+ if ((len = recvfrom(sock, buf, 1024, 0, (struct sockaddr *)&from, &fromlen)) < 0)
+ {
+@@ -840,7 +908,14 @@ static int udp_check_for_data(int sock)
+ #ifdef DEBUG_UDP
+ else
+ fprintf(stderr,"Sent ack: %s", obuf);
++#ifdef USE_IPV6
++{
++ char adr[INET6_ADDRSTRLEN];
++ inet_ntop(AF_INET6, &from.sin6_addr, adr, INET6_ADDRSTRLEN);
++ fprintf (stderr,"Remote: [%s]:%d\n", adr, g_ntohs(from.sin6_port));
++#else
+ fprintf (stderr,"Remote: %s:%d\n", inet_ntoa(from.sin_addr), g_ntohs(from.sin_port));
++#endif
+ #endif
+ }
+ }
diff --git a/audio/xmms/patches/patch-at b/audio/xmms/patches/patch-at
new file mode 100644
index 00000000000..d3a61fe6136
--- /dev/null
+++ b/audio/xmms/patches/patch-at
@@ -0,0 +1,83 @@
+$NetBSD: patch-at,v 1.1 2002/10/14 09:47:00 rh Exp $
+
+--- Input/vorbis/http.c.orig Thu Jan 3 00:21:21 2002
++++ Input/vorbis/http.c
+@@ -287,8 +287,13 @@ static void *http_buffer_loop(void *arg)
+ gint cnt, written, error, err_len, port, cport;
+ gboolean redirect;
+ fd_set set;
++#ifdef USE_IPV6
++ struct addrinfo hints, *res, *res0;
++ char service[6];
++#else
+ struct hostent *hp;
+ struct sockaddr_in address;
++#endif
+ struct timeval tv;
+
+ url = (gchar *) arg;
+@@ -310,6 +315,44 @@ static void *http_buffer_loop(void *arg)
+ chost = vorbis_cfg.use_proxy ? vorbis_cfg.proxy_host : host;
+ cport = vorbis_cfg.use_proxy ? vorbis_cfg.proxy_port : port;
+
++#ifdef USE_IPV6
++ snprintf(service, 6, "%d", cport);
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_socktype = SOCK_STREAM;
++ if (! getaddrinfo(chost, service, &hints, &res0)) {
++ eof = TRUE;
++ for (res = res0; res; res = res->ai_next) {
++ if ((sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0)
++ continue;
++ fcntl(sock, F_SETFL, O_NONBLOCK);
++ status = g_strdup_printf(_("CONNECTING TO %s:%d"), chost, cport);
++ vorbis_ip.set_info_text(status);
++ g_free(status);
++ ((struct sockaddr_in6 *)res->ai_addr)->sin6_port = htons(cport);
++ if (connect(sock, res->ai_addr, res->ai_addrlen) < 0) {
++ if (errno != EINPROGRESS) {
++ close(sock);
++ continue;
++ }
++ }
++ eof = FALSE;
++ break;
++ }
++ freeaddrinfo(res0);
++ if (eof) {
++ status = g_strdup_printf(_("Couldn't connect to host %s:%d"), chost, cport);
++ vorbis_ip.set_info_text(status);
++ g_free(status);
++ eof = TRUE;
++ break;
++ }
++ } else {
++ status = g_strdup_printf(_("Couldn't look up host %s"), chost);
++ vorbis_ip.set_info_text(status);
++ g_free(status);
++ eof = TRUE;
++ }
++#else
+ sock = socket(AF_INET, SOCK_STREAM, 0);
+ fcntl(sock, F_SETFL, O_NONBLOCK);
+ address.sin_family = AF_INET;
+@@ -327,9 +370,11 @@ static void *http_buffer_loop(void *arg)
+ vorbis_ip.set_info_text(NULL);
+ eof = TRUE;
+ }
++#endif
+
+ if (!eof)
+ {
++#ifndef USE_IPV6
+ memcpy(&address.sin_addr.s_addr, *(hp->h_addr_list), sizeof (address.sin_addr.s_addr));
+ address.sin_port = g_htons(cport);
+
+@@ -348,6 +393,7 @@ static void *http_buffer_loop(void *arg)
+ eof = TRUE;
+ }
+ }
++#endif
+ while (going)
+ {
+ tv.tv_sec = 0;
diff --git a/audio/xmms/patches/patch-au b/audio/xmms/patches/patch-au
new file mode 100644
index 00000000000..9a14d18d2c5
--- /dev/null
+++ b/audio/xmms/patches/patch-au
@@ -0,0 +1,12 @@
+$NetBSD: patch-au,v 1.1 2002/10/14 09:47:01 rh Exp $
+
+--- config.h.in.orig Tue Mar 5 07:56:50 2002
++++ config.h.in
+@@ -104,6 +104,7 @@ void g_free_orig (gpointer mem);
+ #undef PACKAGE
+ #undef VERSION
+ #undef USE_3DNOW
++#undef USE_IPV6
+ #undef WITH_SYMBOL_UNDERSCORE
+ #undef WITH_SM
+ #undef ENABLE_NLS