diff options
Diffstat (limited to 'ftp/axel/files')
-rw-r--r-- | ftp/axel/files/patch-Makefile | 46 | ||||
-rw-r--r-- | ftp/axel/files/patch-Makefile.settings | 32 | ||||
-rw-r--r-- | ftp/axel/files/patch-axel.c | 16 | ||||
-rw-r--r-- | ftp/axel/files/patch-axel.h | 20 | ||||
-rw-r--r-- | ftp/axel/files/patch-conf.c | 37 | ||||
-rw-r--r-- | ftp/axel/files/patch-conn.c | 24 |
6 files changed, 175 insertions, 0 deletions
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 ); |