ports/83217: [PATCH] audio/lopster: fix connection to old servers

Radim Kolar hsn at netmag.cz
Sun Jul 10 13:10:25 UTC 2005


>Number:         83217
>Category:       ports
>Synopsis:       [PATCH] audio/lopster: fix connection to old servers
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 10 13:10:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Radim Kolar
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
Sanatana Dharma
>Environment:
System: FreeBSD sanatana.dharma 5.4-STABLE FreeBSD 5.4-STABLE #13: Sat Jul  2 13:14:50 CEST
>Description:
I have made following changes into port:

1. added knob without_zlib for compiling without zlib library
2. fixed 'welcome' packet for old servers in disabled zlib mode
    (email part was missing)
3. avoid sending \0 password. For some reason, lopster is not willing
to send preconfigured password. so if password is missing, send username
instead. this looks like bug in some gui code.

after that changes, connection to all known servers works allright.

Added file(s):
- files/patch-src::napster.c

Port maintainer (ports at oven.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- lopster-1.2.2_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/audio/lopster/Makefile /home/hsn/hacked/lopster/Makefile
--- /usr/ports/audio/lopster/Makefile	Mon Apr  4 13:52:30 2005
+++ /home/hsn/hacked/lopster/Makefile	Sun Jul 10 14:54:36 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	lopster
 PORTVERSION=	1.2.2
+PORTREVISION=	1
 CATEGORIES=	audio
 MASTER_SITES=	http://lopster.sourceforge.net/download/
 
@@ -18,7 +19,7 @@
 USE_GNOME=	gtk12
 USE_X_PREFIX=	yes
 USE_REINPLACE=	yes
-CONFIGURE_ARGS=	--with-pthread=yes --with-zlib=yes
+CONFIGURE_ARGS=	--with-pthread=yes
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
 
 .include <bsd.port.pre.mk>
@@ -31,8 +32,19 @@
 LIB_DEPENDS+=	ogg.5:${PORTSDIR}/audio/libogg
 .endif
 
+.if !defined(WITHOUT_ZLIB)
+CONFIGURE_ARGS+=	--with-zlib=yes
+.else
+CONFIGURE_ARGS+=	--with-zlib=no
+.endif
+
 pre-everything::
+.ifndef WITH_LIBOGG
 	@${ECHO_MSG} "You can specify WITH_LIBOGG to include Ogg support"
+.endif
+.ifndef WITHOUT_ZLIB
+	@${ECHO_MSG} "You can specify WITH_ZLIB to disable compression for old servers"
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" ${WRKSRC}/configure
diff -ruN --exclude=CVS /usr/ports/audio/lopster/files/patch-src::napster.c /home/hsn/hacked/lopster/files/patch-src::napster.c
--- /usr/ports/audio/lopster/files/patch-src::napster.c	Thu Jan  1 01:00:00 1970
+++ /home/hsn/hacked/lopster/files/patch-src::napster.c	Sun Jul 10 14:53:22 2005
@@ -0,0 +1,19 @@
+--- src/napster.c.orig	Sat Aug 28 23:27:09 2004
++++ src/napster.c	Sun Jul 10 14:46:50 2005
+@@ -717,11 +717,13 @@
+ 		 global.linespeed,
+ 		 email?email:"anon at anon");
+ #else  
+-  size = sprintf(text+4, "%s %s %d \"Lopster %s\" %d",
++  size = sprintf(text+4, "%s %s %d \"Lopster %s\" %d %s",
+ 		 net->user.username, 
+-		 net->user.password,
++		 strlen(net->user.password)?net->user.password:net->user.username,
+ 		 port, VERSION,
+-		 global.linespeed);
++		 global.linespeed,
++		 email?email:"anon at anon"
++		 );
+ #endif
+   
+   size = BSWAP16(size);
--- lopster-1.2.2_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list