aboutsummaryrefslogtreecommitdiff
path: root/ftp/axel
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2001-08-05 16:06:50 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2001-08-05 16:06:50 +0000
commita90ee6bb3c482d884d2cdd4e69658caa76e6d4d9 (patch)
treec40b69e948ad936d5ef3ff6270a7cffa26d86899 /ftp/axel
parent98958c18003d0cbed93f36b37cbcc96168f7e3a2 (diff)
downloadports-a90ee6bb3c482d884d2cdd4e69658caa76e6d4d9.tar.gz
ports-a90ee6bb3c482d884d2cdd4e69658caa76e6d4d9.zip
Notes
Diffstat (limited to 'ftp/axel')
-rw-r--r--ftp/axel/Makefile28
-rw-r--r--ftp/axel/distinfo1
-rw-r--r--ftp/axel/files/patch-Makefile46
-rw-r--r--ftp/axel/files/patch-Makefile.settings32
-rw-r--r--ftp/axel/files/patch-axel.c16
-rw-r--r--ftp/axel/files/patch-axel.h20
-rw-r--r--ftp/axel/files/patch-conf.c37
-rw-r--r--ftp/axel/files/patch-conn.c24
-rw-r--r--ftp/axel/pkg-comment1
-rw-r--r--ftp/axel/pkg-descr7
-rw-r--r--ftp/axel/pkg-plist2
11 files changed, 214 insertions, 0 deletions
diff --git a/ftp/axel/Makefile b/ftp/axel/Makefile
new file mode 100644
index 000000000000..06fefab1af47
--- /dev/null
+++ b/ftp/axel/Makefile
@@ -0,0 +1,28 @@
+# ex:ts=8
+# New ports collection makefile for: axel
+# Date created: Jul 23, 2001
+# Whom: ijliao
+#
+# $FreeBSD$
+#
+
+PORTNAME= axel
+PORTVERSION= 0.94
+CATEGORIES= ftp
+MASTER_SITES= http://www.lintux.cx/downloads/
+
+MAINTAINER= ports@FreeBSD.org
+
+USE_GMAKE= yes
+
+MAN1= axel.1
+
+post-patch:
+ @${PERL} -pi -e "s,-pthread,${PTHREAD_LIBS},g" ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/axel ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/axelrc.example ${PREFIX}/etc/axelrc
+ ${INSTALL_MAN} ${WRKSRC}/axel.1 ${PREFIX}/man/man1
+
+.include <bsd.port.mk>
diff --git a/ftp/axel/distinfo b/ftp/axel/distinfo
new file mode 100644
index 000000000000..ef8ff5a5bb25
--- /dev/null
+++ b/ftp/axel/distinfo
@@ -0,0 +1 @@
+MD5 (axel-0.94.tar.gz) = 921cf8736645bc3bb8008d359f1e8242
diff --git a/ftp/axel/files/patch-Makefile b/ftp/axel/files/patch-Makefile
new file mode 100644
index 000000000000..bd53439a36ba
--- /dev/null
+++ b/ftp/axel/files/patch-Makefile
@@ -0,0 +1,46 @@
+--- Makefile.orig Wed Jun 27 16:48:03 2001
++++ Makefile Sun Aug 5 23:39:13 2001
+@@ -12,11 +12,20 @@
+ ifdef DEBUG
+ CFLAGS = -DDEBUG -g
+ else
+-CFLAGS = -O3
++endif
++
++ifndef GETOPTLONG
++CFLAGS += -DNOGETOPTLONG
+ endif
+
+ .SUFFIXES: .po .mo
+
++# determine host OS type
++HOSTTYPE=$(shell uname)
++ifeq ($(HOSTTYPE),Darwin)
++CFLAGS += -DDARWIN
++endif
++
+ ### Add your translation here..
+ MOFILES = nl.mo de.mo
+
+@@ -32,8 +41,12 @@
+ endif
+
+ ifdef THREADS
++ifeq ($(HOSTTYPE),FreeBSD)
++LFLAGS += -pthread
++else
+ LFLAGS += -lpthread
+ endif
++endif
+
+ clean:
+ rm -f *.o axel *.mo config.h
+@@ -68,7 +81,7 @@
+ rm -f $(BINDIR)/axel
+
+ config.h: Makefile.settings
+- make clean
++ $(MAKE) clean
+ @echo '/* Generated by Makefile, do not edit! */' > config.h
+ @echo '/* Edit Makefile.settings instead */' >> config.h
+ @echo >> config.h
diff --git a/ftp/axel/files/patch-Makefile.settings b/ftp/axel/files/patch-Makefile.settings
new file mode 100644
index 000000000000..1c2255d12e93
--- /dev/null
+++ b/ftp/axel/files/patch-Makefile.settings
@@ -0,0 +1,32 @@
+--- Makefile.settings.orig Mon Jun 18 01:18:20 2001
++++ Makefile.settings Sun Aug 5 23:40:00 2001
+@@ -7,10 +7,9 @@
+
+ # File locations
+ #
+-PREFIX=/usr
+ BINDIR=$(PREFIX)/bin
+-ETCDIR=/etc
+-MANDIR=$(PREFIX)/share/man
++ETCDIR=$(PREFIX)/etc
++MANDIR=$(PREFIX)/man
+ LOCALE=$(PREFIX)/share/locale
+
+ # NOTE: Disabling an option means commenting out the specific line. Changing
+@@ -26,7 +25,7 @@
+ # will make the binary 4KB larger. You also have to tell where the
+ # translations should be installed.
+ #
+-I18N=1
++#I18N=1
+
+ # Disabling this converts axel to a simple downloader like wget, without
+ # support for multiple connections. Do it if you like small programs. ;)
+@@ -42,3 +41,7 @@
+ # Necessary for package creation
+ #
+ DESTDIR=
++
++#
++# Some OS'es don't have getopt_long
++#GETOPTLONG=1
diff --git a/ftp/axel/files/patch-axel.c b/ftp/axel/files/patch-axel.c
new file mode 100644
index 000000000000..1bbad1179f25
--- /dev/null
+++ b/ftp/axel/files/patch-axel.c
@@ -0,0 +1,16 @@
+--- axel.c.orig Sun Aug 5 23:40:26 2001
++++ axel.c Sun Aug 5 23:41:19 2001
+@@ -797,10 +797,11 @@
+ void *setup_thread( void *c )
+ {
+ conn_t *conn = c;
++ int oldstate;
+
+ /* Allow this thread to be killed at any time. */
+- pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, NULL );
+- pthread_setcanceltype( PTHREAD_CANCEL_ASYNCHRONOUS, NULL );
++ pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, &oldstate );
++ pthread_setcanceltype( PTHREAD_CANCEL_ASYNCHRONOUS, &oldstate );
+
+ if( conn_setup( conn ) )
+ {
diff --git a/ftp/axel/files/patch-axel.h b/ftp/axel/files/patch-axel.h
new file mode 100644
index 000000000000..632349710d73
--- /dev/null
+++ b/ftp/axel/files/patch-axel.h
@@ -0,0 +1,20 @@
+--- axel.h.orig Sun Aug 5 23:41:50 2001
++++ axel.h Sun Aug 5 23:42:26 2001
+@@ -30,7 +30,9 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <netdb.h>
++#ifndef NOGETOPTLONG
+ #include <getopt.h>
++#endif
+ #include <limits.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -41,6 +43,7 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <netinet/in_systm.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+
diff --git a/ftp/axel/files/patch-conf.c b/ftp/axel/files/patch-conf.c
new file mode 100644
index 000000000000..7a5ea16c3548
--- /dev/null
+++ b/ftp/axel/files/patch-conf.c
@@ -0,0 +1,37 @@
+--- conf.c.orig Sun Aug 5 23:42:46 2001
++++ conf.c Sun Aug 5 23:44:29 2001
+@@ -39,6 +39,7 @@
+ sscanf( value, "%i", &conf->name ); \
+ }
+
++#ifndef NOGETOPTLONG
+ struct option axel_options[] =
+ {
+ /* name has_arg flag val */
+@@ -50,6 +51,7 @@
+ { "version", 0, NULL, 'V' },
+ { NULL, 0, NULL, 0 }
+ };
++#endif
+
+ int conf_loadfile( conf_t *conf, char *file )
+ {
+@@ -144,7 +146,17 @@
+
+ while( 1 )
+ {
+- option = getopt_long( argc, argv, "s:n:NqhV", axel_options, NULL );
++ option =
++#ifdef NOGETOPTLONG
++ getopt
++#else
++ getopt_long
++#endif
++ ( argc, argv, "s:n:NqhV"
++#ifndef NOGETOPTLONG
++ , axel_options, NULL
++#endif
++ );
+ if( option == -1 )
+ break;
+
diff --git a/ftp/axel/files/patch-conn.c b/ftp/axel/files/patch-conn.c
new file mode 100644
index 000000000000..89132cf595e0
--- /dev/null
+++ b/ftp/axel/files/patch-conn.c
@@ -0,0 +1,24 @@
+--- conn.c.orig Sun Aug 5 23:44:46 2001
++++ conn.c Sun Aug 5 23:45:38 2001
+@@ -121,6 +121,13 @@
+ /* Take default port numbers from /etc/services */
+ else
+ {
++#ifdef DARWIN
++ /* don't want to include a NetInfo interface */
++ if( conn->proto == PROTO_FTP )
++ conn->port = 21;
++ else
++ conn->port = 80;
++#else
+ struct servent *serv;
+
+ /* Never assume the standard 21/80 ports!! */
+@@ -130,6 +137,7 @@
+ serv = getservbyname( "www", "tcp" );
+
+ conn->port = ntohs( serv->s_port );
++#endif
+ }
+
+ return( conn->port > 0 );
diff --git a/ftp/axel/pkg-comment b/ftp/axel/pkg-comment
new file mode 100644
index 000000000000..ce1401b27010
--- /dev/null
+++ b/ftp/axel/pkg-comment
@@ -0,0 +1 @@
+A download accelerator
diff --git a/ftp/axel/pkg-descr b/ftp/axel/pkg-descr
new file mode 100644
index 000000000000..165653f9a537
--- /dev/null
+++ b/ftp/axel/pkg-descr
@@ -0,0 +1,7 @@
+Axel is, as the title says already, a download accelerator. I know, Axel's
+not the first program which does things like this, but it does a nice job,
+just like any other program. The difference between Axel and most other
+programs is that it does segmented downloading, but all the data is written
+to the final destination file immediately.
+
+WWW: http://www.lintux.cx/axel.html
diff --git a/ftp/axel/pkg-plist b/ftp/axel/pkg-plist
new file mode 100644
index 000000000000..6bb711b43f54
--- /dev/null
+++ b/ftp/axel/pkg-plist
@@ -0,0 +1,2 @@
+bin/axel
+etc/axelrc