add axel
A download accelerator
This commit is contained in:
parent
98958c1800
commit
a90ee6bb3c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=45835
@ -3,6 +3,7 @@
|
||||
|
||||
SUBDIR += IglooFTP
|
||||
SUBDIR += afd
|
||||
SUBDIR += axel
|
||||
SUBDIR += axyftp
|
||||
SUBDIR += bftpd
|
||||
SUBDIR += caitoo
|
||||
|
28
ftp/axel/Makefile
Normal file
28
ftp/axel/Makefile
Normal file
@ -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>
|
1
ftp/axel/distinfo
Normal file
1
ftp/axel/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (axel-0.94.tar.gz) = 921cf8736645bc3bb8008d359f1e8242
|
46
ftp/axel/files/patch-Makefile
Normal file
46
ftp/axel/files/patch-Makefile
Normal file
@ -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
|
32
ftp/axel/files/patch-Makefile.settings
Normal file
32
ftp/axel/files/patch-Makefile.settings
Normal file
@ -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
|
16
ftp/axel/files/patch-axel.c
Normal file
16
ftp/axel/files/patch-axel.c
Normal file
@ -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 ) )
|
||||
{
|
20
ftp/axel/files/patch-axel.h
Normal file
20
ftp/axel/files/patch-axel.h
Normal file
@ -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>
|
||||
|
37
ftp/axel/files/patch-conf.c
Normal file
37
ftp/axel/files/patch-conf.c
Normal file
@ -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;
|
||||
|
24
ftp/axel/files/patch-conn.c
Normal file
24
ftp/axel/files/patch-conn.c
Normal file
@ -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 );
|
1
ftp/axel/pkg-comment
Normal file
1
ftp/axel/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
A download accelerator
|
7
ftp/axel/pkg-descr
Normal file
7
ftp/axel/pkg-descr
Normal file
@ -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
|
2
ftp/axel/pkg-plist
Normal file
2
ftp/axel/pkg-plist
Normal file
@ -0,0 +1,2 @@
|
||||
bin/axel
|
||||
etc/axelrc
|
Loading…
Reference in New Issue
Block a user