ports/87177: [UPDATE] ftp/prozilla: update to version 1.3.7.4
Alejandro Pulver
alejandro at varnet.biz
Sun Oct 9 21:10:06 UTC 2005
>Number: 87177
>Category: ports
>Synopsis: [UPDATE] ftp/prozilla: update to version 1.3.7.4
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 09 21:10:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Alejandro Pulver
>Release: FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:
>Description:
Changes:
* Update to version 1.3.7.4.
* Rename patches to more appropiate names.
>How-To-Repeat:
>Fix:
--- prozilla.diff begins here ---
diff -urN /usr/ports/ftp/prozilla/Makefile prozilla/Makefile
--- /usr/ports/ftp/prozilla/Makefile Wed Jan 26 14:20:52 2005
+++ prozilla/Makefile Sun Oct 9 17:51:28 2005
@@ -6,35 +6,32 @@
#
PORTNAME= prozilla
-PORTVERSION= 1.3.7.3
+PORTVERSION= 1.3.7.4
CATEGORIES= ftp
MASTER_SITES= http://prozilla.genesys.ro/downloads/prozilla/tarballs/
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= alejandro at varnet.biz
COMMENT= ProZilla is a fast download accelerator
USE_GETOPT_LONG=yes
-USE_REINPLACE= yes
USE_GMAKE= yes
+USE_REINPLACE= yes
GNU_CONFIGURE= yes
-CPPFLAGS= -I${LOCALBASE}/include
-LDFLAGS= -L${LOCALBASE}/lib
-CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-MAN1= proz.1 prozilla.1
+MAN1= proz.1 prozilla.1
-DOCS= ANNOUNCE AUTHORS COPYING CREDITS ChangeLog INSTALL FAQ NEWS README TODO
+DOCS= ANNOUNCE AUTHORS COPYING CREDITS ChangeLog INSTALL FAQ NEWS \
+ README TODO
post-patch:
- @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
- s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|%Ld|%lld|g' ${WRKSRC}/src/*.c ${WRKSRC}/src/*.h
post-install:
.if !defined(NOPORTDOCS)
- ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
-.for f in ${DOCS}
+ ${MKDIR} ${DOCSDIR}
+. for f in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
-.endfor
+. endfor
.endif
.include <bsd.port.mk>
diff -urN /usr/ports/ftp/prozilla/distinfo prozilla/distinfo
--- /usr/ports/ftp/prozilla/distinfo Wed Jan 26 14:20:52 2005
+++ prozilla/distinfo Sat Oct 8 14:00:05 2005
@@ -1,2 +1,2 @@
-MD5 (prozilla-1.3.7.3.tar.gz) = 88f0d9d88aa7628239dae08804dcd550
-SIZE (prozilla-1.3.7.3.tar.gz) = 218616
+MD5 (prozilla-1.3.7.4.tar.gz) = b594b55b1b49a8eca2505173cc1bfc44
+SIZE (prozilla-1.3.7.4.tar.gz) = 222229
diff -urN /usr/ports/ftp/prozilla/files/patch-connect.c prozilla/files/patch-connect.c
--- /usr/ports/ftp/prozilla/files/patch-connect.c Sat Feb 7 16:55:21 2004
+++ prozilla/files/patch-connect.c Wed Dec 31 21:00:00 1969
@@ -1,131 +0,0 @@
---- src/connect.c.ori Fri Aug 17 20:38:25 2001
-+++ src/connect.c Sat Feb 7 02:11:10 2004
-@@ -24,9 +24,11 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-+#include <sys/types.h>
- #include <sys/socket.h>
- #include <fcntl.h>
- #include <netdb.h>
-+#include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #include <netdb.h>
-@@ -42,51 +44,58 @@
- #include "runtime.h"
- #include "debug.h"
-
-+static pthread_mutex_t __thread_safe_lock = PTHREAD_MUTEX_INITIALIZER;
-+
- uerr_t connect_to_server(int *sock, char *name, int port, int timeout)
- {
- unsigned int portnum;
-+ char szPort[10];
- int status;
-- struct sockaddr_in server;
-- struct hostent *hp, hostbuf;
- extern int h_errno;
- /* int opt; */
- int noblock, flags;
-
-- char *tmphstbuf;
-- size_t hstbuflen = 2048;
-- tmphstbuf = kmalloc(hstbuflen);
-+ struct addrinfo hints, *res=NULL;
-+ struct addrinfo *res0=NULL;
-+ int error;
-+
-+ memset(&hints, 0, sizeof(hints));
-+ memset(szPort, 0, sizeof(szPort));
-+ sprintf(szPort, "%d", port);
-+ hints.ai_family = AF_INET;
-+ hints.ai_socktype = SOCK_STREAM;
-
- assert(name != NULL);
-
-- portnum = port;
-- memset((void *) &server, 0, sizeof(server));
--
- message("Resolving %s", name);
-
-- hp=k_gethostname (name,&hostbuf,&tmphstbuf,&hstbuflen);
--
-- if (hp == NULL)
-- {
-- message("Failed to resolve %s", name);
-- return HOSTERR;
-- }
-+ pthread_mutex_lock(&__thread_safe_lock);
-
-- message("Resolved %s !", name);
--
--
-- memcpy((void *) &server.sin_addr, hp->h_addr, hp->h_length);
-- server.sin_family = hp->h_addrtype;
-- server.sin_port = htons(portnum);
-+ error = getaddrinfo(name, szPort, &hints, &res);
-+ if (error) {
-+ message("Failed to resolve %s", name);
-+ pthread_mutex_unlock(&__thread_safe_lock);
-+ freeaddrinfo(res);
-+ return HOSTERR;
-+ }
-+
-+ message("Resolved %s !", name);
-+
-+ res0 = (struct addrinfo *) malloc(sizeof(struct addrinfo));
-+ memcpy(res0, res, sizeof(struct addrinfo));
-+ freeaddrinfo(res);
-+ pthread_mutex_unlock(&__thread_safe_lock);
-
- /*
- * create socket
- */
-- if ((*sock = socket(AF_INET, SOCK_STREAM, 0)) < 1)
-+ if ((*sock = socket(res0->ai_family, res0->ai_socktype, 0)) < 1)
- {
- message("unable to create socket\n");
-- free(tmphstbuf);
-+ free(res0);
- return CONSOCKERR;
- }
-+
- /*Experimental */
- flags = fcntl(*sock, F_GETFL, 0);
- if (flags != -1)
-@@ -96,8 +105,7 @@
-
- message("Connecting to server.......");
-
--
-- status = connect(*sock, (struct sockaddr *) &server, sizeof(server));
-+ status = connect(*sock, res0->ai_addr, res0->ai_addrlen);
-
- if (status == -1 && noblock != -1 && errno == EINPROGRESS)
- {
-@@ -135,11 +143,11 @@
-
- if (errno == ECONNREFUSED)
- {
-- free(tmphstbuf);
-+ free(res0);
- return CONREFUSED;
- } else
- {
-- free(tmphstbuf);
-+ free(res0);
- return CONERROR;
- }
- } else
-@@ -156,8 +164,9 @@
- /* setsockopt(*sock, SOL_SOCKET, SO_KEEPALIVE,
- * (char *) &opt, (int) sizeof(opt));
- */
-+
- message("Connect OK!");
-- free(tmphstbuf);
-+ free(res0);
- return NOCONERROR;
- }
-
diff -urN /usr/ports/ftp/prozilla/files/patch-connection.c prozilla/files/patch-connection.c
--- /usr/ports/ftp/prozilla/files/patch-connection.c Sat Apr 19 18:06:54 2003
+++ prozilla/files/patch-connection.c Wed Dec 31 21:00:00 1969
@@ -1,15 +0,0 @@
---- src/connection.c.ori Sat Jan 25 00:33:14 2003
-+++ src/connection.c Sat Jan 25 00:33:38 2003
-@@ -30,7 +30,12 @@
- #include <assert.h>
- #include <pthread.h>
-
-+#ifdef __FreeBSD__
-+#include <sys/param.h>
-+#include <sys/mount.h>
-+#else
- #include <sys/vfs.h>
-+#endif
-
- #include "connection.h"
- #include "misc.h"
diff -urN /usr/ports/ftp/prozilla/files/patch-ftp-retr.c prozilla/files/patch-ftp-retr.c
--- /usr/ports/ftp/prozilla/files/patch-ftp-retr.c Sat Apr 19 18:06:54 2003
+++ prozilla/files/patch-ftp-retr.c Wed Dec 31 21:00:00 1969
@@ -1,10 +0,0 @@
---- src/ftp-retr.c.ori Sat Jan 25 00:40:45 2003
-+++ src/ftp-retr.c Sat Jan 25 00:40:56 2003
-@@ -32,6 +32,7 @@
- #include <netdb.h>
- #include <sys/socket.h>
- #include <sys/time.h>
-+#include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #include <netinet/tcp.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-ftpsearch.c prozilla/files/patch-ftpsearch.c
--- /usr/ports/ftp/prozilla/files/patch-ftpsearch.c Sat Apr 19 18:06:54 2003
+++ prozilla/files/patch-ftpsearch.c Wed Dec 31 21:00:00 1969
@@ -1,10 +0,0 @@
---- src/ftpsearch.c.ori Sat Jan 25 00:45:38 2003
-+++ src/ftpsearch.c Sat Jan 25 00:45:48 2003
-@@ -25,6 +25,7 @@
- #include <sys/socket.h>
- #include <fcntl.h>
- #include <netdb.h>
-+#include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #include <arpa/inet.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-http-retr.c prozilla/files/patch-http-retr.c
--- /usr/ports/ftp/prozilla/files/patch-http-retr.c Sat Apr 19 18:06:54 2003
+++ prozilla/files/patch-http-retr.c Wed Dec 31 21:00:00 1969
@@ -1,10 +0,0 @@
---- src/http-retr.c.ori Sat Jan 25 00:49:21 2003
-+++ src/http-retr.c Sat Jan 25 00:49:34 2003
-@@ -32,6 +32,7 @@
- #include <fcntl.h>
- #include <sys/socket.h>
- #include <sys/time.h>
-+#include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #include <netinet/tcp.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-misc.c prozilla/files/patch-misc.c
--- /usr/ports/ftp/prozilla/files/patch-misc.c Sat Apr 19 18:06:54 2003
+++ prozilla/files/patch-misc.c Wed Dec 31 21:00:00 1969
@@ -1,10 +0,0 @@
---- src/misc.c.ori Sat Jan 25 01:38:04 2003
-+++ src/misc.c Sat Jan 25 01:38:40 2003
-@@ -24,7 +24,6 @@
- #include <stdio.h>
- #include <stdarg.h>
- #include <stdlib.h>
--#include <malloc.h>
- #include <string.h>
- #include <ctype.h>
- #include <curses.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-ping.c prozilla/files/patch-ping.c
--- /usr/ports/ftp/prozilla/files/patch-ping.c Sat Apr 19 18:06:54 2003
+++ prozilla/files/patch-ping.c Wed Dec 31 21:00:00 1969
@@ -1,10 +0,0 @@
---- src/ping.c.ori Sat Jan 25 00:53:13 2003
-+++ src/ping.c Sat Jan 25 00:53:28 2003
-@@ -23,6 +23,7 @@
- #include <sys/socket.h>
- #include <fcntl.h>
- #include <netdb.h>
-+#include <netinet/in_systm.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #include <arpa/inet.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-src_connect.c prozilla/files/patch-src_connect.c
--- /usr/ports/ftp/prozilla/files/patch-src_connect.c Wed Dec 31 21:00:00 1969
+++ prozilla/files/patch-src_connect.c Sun Oct 9 14:21:33 2005
@@ -0,0 +1,126 @@
+--- src/connect.c.orig Sat Feb 26 16:47:17 2005
++++ src/connect.c Sun Oct 9 13:06:34 2005
+@@ -24,9 +24,11 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <fcntl.h>
+ #include <netdb.h>
++#include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netdb.h>
+@@ -42,53 +44,52 @@
+ #include "runtime.h"
+ #include "debug.h"
+
++static pthread_mutex_t __thread_safe_lock = PTHREAD_MUTEX_INITIALIZER;
++
+ uerr_t connect_to_server(int *sock, char *name, int port, int timeout)
+ {
+- unsigned int portnum;
++ char szPort[10];
+ int status;
+- struct sockaddr_in server;
+- struct hostent *hp, hostbuf;
+ extern int h_errno;
+ /* int opt; */
+ int noblock, flags;
+
+- char *tmphstbuf;
+- size_t hstbuflen = 2048;
+- tmphstbuf = kmalloc(hstbuflen);
++ struct addrinfo hints, *res=NULL;
++ struct addrinfo *res0=NULL;
++ int error;
+
+ assert(name != NULL);
+
+- portnum = port;
+- memset((void *) &server, 0, sizeof(server));
++ memset(&hints, 0, sizeof(hints));
++ memset(szPort, 0, sizeof(szPort));
++ snprintf(szPort, sizeof(szPort), "%d", port);
++ hints.ai_family = AF_INET;
++ hints.ai_socktype = SOCK_STREAM;
+
+ message("Resolving %s", name);
+
+- hp=k_gethostname (name,&hostbuf,&tmphstbuf,&hstbuflen);
+-
+- if (hp == NULL)
+- {
+- message("Failed to resolve %s", name);
+- return HOSTERR;
+- }
++ error = getaddrinfo(name, szPort, &hints, &res);
++ if (error) {
++ message("Failed to resolve %s", name);
++ pthread_mutex_unlock(&__thread_safe_lock);
++ freeaddrinfo(res);
++ return HOSTERR;
++ }
+
+ message("Resolved %s !", name);
+-
+- memcpy((void *) &server.sin_addr, hp->h_addr, hp->h_length);
+- server.sin_family = hp->h_addrtype;
+- server.sin_port = htons(portnum);
+
+- if (tmphstbuf)
+- {
+- free(tmphstbuf);
+- tmphstbuf = NULL;
+- }
++ res0 = (struct addrinfo *) malloc(sizeof(struct addrinfo));
++ memcpy(res0, res, sizeof(struct addrinfo));
++ freeaddrinfo(res);
++ pthread_mutex_unlock(&__thread_safe_lock);
+
+ /*
+ * create socket
+ */
+- if ((*sock = socket(AF_INET, SOCK_STREAM, 0)) < 1)
++ if ((*sock = socket(res0->ai_family, res0->ai_socktype, 0)) < 1)
+ {
+ message("unable to create socket\n");
++ free(res0);
+ return CONSOCKERR;
+ }
+ /*Experimental */
+@@ -100,8 +101,7 @@
+
+ message("Connecting to server.......");
+
+-
+- status = connect(*sock, (struct sockaddr *) &server, sizeof(server));
++ status = connect(*sock, res0->ai_addr, res0->ai_addrlen);
+
+ if (status == -1 && noblock != -1 && errno == EINPROGRESS)
+ {
+@@ -137,10 +137,13 @@
+ {
+ close(*sock);
+
+- if (errno == ECONNREFUSED)
++ if (errno == ECONNREFUSED) {
++ free(res0);
+ return CONREFUSED;
+- else
++ } else {
++ free(res0);
+ return CONERROR;
++ }
+ } else
+ {
+ flags = fcntl(*sock, F_GETFL, 0);
+@@ -156,6 +159,7 @@
+ * (char *) &opt, (int) sizeof(opt));
+ */
+ message("Connect OK!");
++ free(res0);
+ return NOCONERROR;
+ }
+
diff -urN /usr/ports/ftp/prozilla/files/patch-src_connection.c prozilla/files/patch-src_connection.c
--- /usr/ports/ftp/prozilla/files/patch-src_connection.c Wed Dec 31 21:00:00 1969
+++ prozilla/files/patch-src_connection.c Sat Oct 8 12:30:47 2005
@@ -0,0 +1,15 @@
+--- src/connection.c.ori Sat Jan 25 00:33:14 2003
++++ src/connection.c Sat Jan 25 00:33:38 2003
+@@ -30,7 +30,12 @@
+ #include <assert.h>
+ #include <pthread.h>
+
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#include <sys/mount.h>
++#else
+ #include <sys/vfs.h>
++#endif
+
+ #include "connection.h"
+ #include "misc.h"
diff -urN /usr/ports/ftp/prozilla/files/patch-src_ftp-retr.c prozilla/files/patch-src_ftp-retr.c
--- /usr/ports/ftp/prozilla/files/patch-src_ftp-retr.c Wed Dec 31 21:00:00 1969
+++ prozilla/files/patch-src_ftp-retr.c Sat Oct 8 12:30:47 2005
@@ -0,0 +1,10 @@
+--- src/ftp-retr.c.ori Sat Jan 25 00:40:45 2003
++++ src/ftp-retr.c Sat Jan 25 00:40:56 2003
+@@ -32,6 +32,7 @@
+ #include <netdb.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
++#include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/tcp.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-src_ftpsearch.c prozilla/files/patch-src_ftpsearch.c
--- /usr/ports/ftp/prozilla/files/patch-src_ftpsearch.c Wed Dec 31 21:00:00 1969
+++ prozilla/files/patch-src_ftpsearch.c Sat Oct 8 12:30:47 2005
@@ -0,0 +1,10 @@
+--- src/ftpsearch.c.ori Sat Jan 25 00:45:38 2003
++++ src/ftpsearch.c Sat Jan 25 00:45:48 2003
+@@ -25,6 +25,7 @@
+ #include <sys/socket.h>
+ #include <fcntl.h>
+ #include <netdb.h>
++#include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <arpa/inet.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-src_http-retr.c prozilla/files/patch-src_http-retr.c
--- /usr/ports/ftp/prozilla/files/patch-src_http-retr.c Wed Dec 31 21:00:00 1969
+++ prozilla/files/patch-src_http-retr.c Sat Oct 8 12:30:47 2005
@@ -0,0 +1,10 @@
+--- src/http-retr.c.ori Sat Jan 25 00:49:21 2003
++++ src/http-retr.c Sat Jan 25 00:49:34 2003
+@@ -32,6 +32,7 @@
+ #include <fcntl.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
++#include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/tcp.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-src_misc.c prozilla/files/patch-src_misc.c
--- /usr/ports/ftp/prozilla/files/patch-src_misc.c Wed Dec 31 21:00:00 1969
+++ prozilla/files/patch-src_misc.c Sat Oct 8 12:30:47 2005
@@ -0,0 +1,10 @@
+--- src/misc.c.ori Sat Jan 25 01:38:04 2003
++++ src/misc.c Sat Jan 25 01:38:40 2003
+@@ -24,7 +24,6 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <curses.h>
diff -urN /usr/ports/ftp/prozilla/files/patch-src_ping.c prozilla/files/patch-src_ping.c
--- /usr/ports/ftp/prozilla/files/patch-src_ping.c Wed Dec 31 21:00:00 1969
+++ prozilla/files/patch-src_ping.c Sat Oct 8 12:30:47 2005
@@ -0,0 +1,10 @@
+--- src/ping.c.ori Sat Jan 25 00:53:13 2003
++++ src/ping.c Sat Jan 25 00:53:28 2003
+@@ -23,6 +23,7 @@
+ #include <sys/socket.h>
+ #include <fcntl.h>
+ #include <netdb.h>
++#include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <arpa/inet.h>
--- prozilla.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list