From 9dc6278c7b4ef41810b264ca99b597634511bda1 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Thu, 5 Oct 2017 08:57:18 +0300 Subject: import libfetch-2.38 from NetBSD ftp://ftp.fu-berlin.de/unix/NetBSD/packages/current-src/pkgsrc/net/libfetch/files libfetch comes (at least) in netbsd and freebsd flavors which differing functionality. Alpine and Arch package netbsd one, but it's not widely packaged across other distributions. We need NetBSD version as it does not use funopen(3) which is not supported in musl, and supports connection pooling. FreeBSD seems to be the orignal and better maintained version with support for SSL CAs, client certificate authentication, proxy authentication, and improved http redirect handling. So this imports NetBSD version, and future commits will pick up the needed improvements from FreeBSD tree. Incidentally, this also fixes #7857 and likes for good. --- libfetch/Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 libfetch/Makefile (limited to 'libfetch/Makefile') diff --git a/libfetch/Makefile b/libfetch/Makefile new file mode 100644 index 0000000..cfcef4b --- /dev/null +++ b/libfetch/Makefile @@ -0,0 +1,45 @@ +# $NetBSD: Makefile,v 1.8 2016/10/27 10:05:38 joerg Exp $ + +LIB= fetch +SRCS= fetch.c common.c ftp.c http.c file.c +DPSRCS= ftperr.h httperr.h +INCS= fetch.h +MAN= fetch.3 +CLEANFILES= ftperr.h httperr.h +MKLINT= no +MKPIC= no +MKPROFILE= no + +.include + +CPPFLAGS+= -I. +CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 + +FETCH_WITH_INET6?= no +FETCH_WITH_OPENSSL?= no + +.if !empty(FETCH_WITH_INET6:M[yY][eE][sS]) +CPPFLAGS+= -DINET6 +.endif + +.if !empty(FETCH_WITH_OPENSSL:M[yY][eE][sS]) +CPPFLAGS+= -DWITH_SSL +LDADD= -lssl -lcrypto +.endif + +CPPFLAGS+= -DFTP_COMBINE_CWDS + +WARNS?= 4 + +ftp.o: ftperr.h +http.o: httperr.h + +ftperr.h: ${.CURDIR}/ftp.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.sh + sh ${.CURDIR}/errlist.sh ftp_errlist FTP \ + ${.CURDIR}/ftp.errors > ${.TARGET} + +httperr.h: ${.CURDIR}/http.errors ${.CURDIR}/Makefile ${.CURDIR}/errlist.sh + sh ${.CURDIR}/errlist.sh http_errlist HTTP \ + ${.CURDIR}/http.errors > ${.TARGET} + +.include -- cgit v1.2.3-60-g2f50