ftp/axel: New port: Lightweight CLI download accelerator

This commit is contained in:
Yuri Victorovich 2022-11-24 18:22:03 -08:00
parent 1cd4868d3c
commit c4a794b3d7
7 changed files with 67 additions and 2 deletions

3
MOVED
View file

@ -17567,7 +17567,6 @@ net/libmms||2022-09-30|Has expired: Obsolete, Microsoft deprecated MMS protocol
audio/mctoolame-decoder||2022-09-30|Has expired: Legacy and obscure audio format that never gained any traction
audio/mctoolame-encoder||2022-09-30|Has expired: Legacy and obscure audio format that never gained any traction
www/py-ws4py||2022-09-30|Has expired: Upstream abandoned
ftp/axel||2022-09-30|Has expired: Last release in 2009 and dead upstream, please consider using www/aria2
databases/py-bsddb3|databases/py-berkeleydb|2022-09-30|Has expired: Requires upstream EOLd db5. Use py-berkeleydb
graphics/megapov|graphics/povray37|2022-10-01|Has expired: Abandoned upstream. graphics/povray37 is the recommended replacement
x11-toolkits/gstreamer1-plugins-gtk4||2022-10-01|No consumers left and deprecated in favor gtk4 plugin from multimedia/gstreamer1-plugins-rust >= 0.8.0
@ -17615,4 +17614,4 @@ net/rabbitmq-c-devel|net/rabbitmq-c|2022-11-16|Remove obsolete devel port, use n
databases/foundationdb-devel|databases/foundationdb|2022-11-16|Remove obsolete devel port, use databases/foundationdb instead
devel/py-pytest4-asyncio||2022-11-19|Has expired: legacy version for pytest4 no longer used by any port
devel/tokamak||2022-11-20|Has expired: Last release in 2008, abandoned upstream, not used, website disappeared
net/libutp|net-p2p/libutp|2022-11-19|Moved to a more adequated category
net/libutp|net-p2p/libutp|2022-11-20|Moved to a more adequated category

View file

@ -2,6 +2,7 @@
SUBDIR += R-cran-RCurl
SUBDIR += R-cran-curl
SUBDIR += axel
SUBDIR += bbftp-client
SUBDIR += bbftp-server
SUBDIR += bftpd

33
ftp/axel/Makefile Normal file
View file

@ -0,0 +1,33 @@
PORTNAME= axel
DISTVERSIONPREFIX= v
DISTVERSION= 2.17.11-21
DISTVERSIONSUFFIX= -gd65dffa
CATEGORIES= ftp
MAINTAINER= yuri@FreeBSD.org
COMMENT= Lightweight CLI download accelerator
WWW= https://github.com/axel-download-accelerator/axel
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= autoconf-archive>=0:devel/autoconf-archive \
txt2man:textproc/txt2man
USES= autoreconf gettext-tools gmake pkgconfig ssl
USE_GITHUB= yes
GH_ACCOUNT= axel-download-accelerator
GNU_CONFIGURE= yes
.if exists(/usr/libdata/pkgconfig/openssl.pc)
CONFIGURE_ARGS= --with-ssl=openssl
.else
CONFIGURE_ARGS= --without-ssl # no easy workaround
.endif
PLIST_FILES= bin/axel \
man/man1/axel.1.gz
.include <bsd.port.mk>

3
ftp/axel/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1669338799
SHA256 (axel-download-accelerator-axel-v2.17.11-21-gd65dffa_GH0.tar.gz) = f58501c4f82e1e9dbf085552387328eccb211fb1592fafae06582899cb0cfbdf
SIZE (axel-download-accelerator-axel-v2.17.11-21-gd65dffa_GH0.tar.gz) = 101764

View file

@ -0,0 +1,11 @@
--- src/axel.c.orig 2022-11-25 02:14:41 UTC
+++ src/axel.c
@@ -151,7 +151,7 @@ axel_new(conf_t *conf, int count, const search_t *res)
axel->conf->buffer_size = axel->conf->max_speed;
}
uint64_t delay =
- UINT64_C(1073741824) * axel->conf->buffer_size *
+ ((uint64_t)1073741824) * axel->conf->buffer_size *
axel->conf->num_connections / axel->conf->max_speed;
axel->delay_time.tv_sec = delay / 1073741824;

View file

@ -0,0 +1,11 @@
--- src/random.c.orig 2022-11-25 01:30:10 UTC
+++ src/random.c
@@ -6,7 +6,7 @@
ssize_t
axel_rand64(uint64_t *out)
{
- static int fd = -1;
+ static atomic_int fd = -1;
if (fd == -1) {
int tmp = open("/dev/random", O_RDONLY);
int expect = -1;

7
ftp/axel/pkg-descr Normal file
View file

@ -0,0 +1,7 @@
Axel tries to accelerate the download process by using multiple connections per
file, and can also balance the load between different servers.
Axel tries to be as light as possible, so it might be useful on byte-critical
systems.
Axel supports HTTP, HTTPS, FTP and FTPS protocols.