changeset 1262:835046684f66

network/curl: add more options
author David Demelier <markand@malikania.fr>
date Wed, 10 Nov 2021 08:32:52 +0100
parents 9adf49f12e71
children 274a0b088d9a
files network/curl/curl.sh
diffstat 1 files changed, 155 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/network/curl/curl.sh	Wed Nov 10 08:32:41 2021 +0100
+++ b/network/curl/curl.sh	Wed Nov 10 08:32:52 2021 +0100
@@ -21,8 +21,29 @@
 PKGLICENSE="MIT"
 PKGSUMMARY="command line tool for transferring data with URLs"
 PKGDOWNLOAD="https://curl.haxx.se/download/$PKGNAME-$PKGVERSION.tar.xz"
-PKGDEPENDS=""
-PKGOPTIONS="IDN2 IPV6 NGHTTP2 PSL SSH SSL ZLIB"
+PKGOPTIONS="DICT
+            FILE
+            FTP
+            GOPHER
+            HTTP
+            HTTP2
+            IDN2
+            IMAP
+            IPV6
+            LDAP
+            LDAPS
+            POP
+            PROXY
+            PSL
+            RTSP
+            SMB
+            SMTP
+            SSH
+            SSL
+            TELNET
+            TFTP
+            ZLIB
+            "
 
 : ${CHOST:=$(uname -m)-linux-musl}
 : ${CBUILD:=$(uname -m)-linux-musl}
@@ -30,14 +51,59 @@
 : ${CFLAGS:=-O2}
 : ${LDFLAGS:=}
 : ${LIBS:=}
+: ${DICT:=yes}
+: ${FILE:=yes}
+: ${FTP:=yes}
+: ${GOPHER:=yes}
+: ${HTTP2:=yes}
+: ${HTTP:=yes}
 : ${IDN2:=yes}
+: ${IMAP:=yes}
 : ${IPV6:=yes}
-: ${NGHTTP2:=yes}
+: ${LDAP:=yes}
+: ${LDAPS:=yes}
+: ${POP:=yes}
+: ${PROXY:=yes}
 : ${PSL:=yes}
+: ${RTSP:=yes}
+: ${SMB:=yes}
+: ${SMTP:=yes}
 : ${SSH:=yes}
 : ${SSL:=yes}
+: ${TELNET:=yes}
+: ${TFTP:=yes}
 : ${ZLIB:=yes}
 
+if [ "$DICT" = "yes" ]; then
+	with_dict="--enable-dict"
+else
+	with_dict="--disable-dict"
+fi
+
+if [ "$FILE" = "yes" ]; then
+	with_file="--enable-file"
+else
+	with_file="--disable-file"
+fi
+
+if [ "$FTP" = "yes" ]; then
+	with_ftp="--enable-ftp"
+else
+	with_ftp="--disable-ftp"
+fi
+
+if [ "$GOPHER" = "yes" ]; then
+	with_gopher="--enable-gopher"
+else
+	with_gopher="--disable-gopher"
+fi
+
+if [ "$HTTP" = "yes" ]; then
+	with_http="--enable-http"
+else
+	with_http="--disable-http"
+fi
+
 if [ "$IDN2" = "yes" ]; then
 	PKGDEPENDS="libidn2 $PKGDEPENDS"
 	with_idn2="--with-libidn2"
@@ -45,24 +111,65 @@
 	with_idn2="--without-libidn2"
 fi
 
+if [ "$IMAP" = "yes" ]; then
+	with_imap="--enable-imap"
+else
+	with_imap="--disable-imap"
+fi
+
 if [ "$IPV6" = "yes" ]; then
 	with_ipv6="--enable-ipv6"
 else
 	with_ipv6="--disable-ipv6"
 fi
 
-if [ "$NGHTTP2" = "yes" ]; then
+if [ "$LDAP" = "yes" ]; then
+	with_ldap="--enable-ldap"
+else
+	with_ldap="--disable-ldap"
+fi
+
+if [ "$LDAPS" = "yes" ]; then
+	with_ldaps="--enable-ldaps"
+else
+	with_ldaps="--disable-ldaps"
+fi
+
+if [ "$HTTP2" = "yes" ]; then
 	PKGDEPENDS="nghttp2 $PKGDEPENDS"
-	with_nghttp2="--with-nghttp2"
+	with_http2="--with-nghttp2"
 else
-	with_nghttp2="--without-nghttp2"
+	with_http2="--without-nghttp2"
 fi
 
-if [ "$PSL" = "yes" ]; then
-	PKGDEPENDS="libpsl $PKGDEPENDS"
-	with_psl="--with-libpsl"
+if [ "$POP" = "yes" ]; then
+	with_pop="--enable-pop3"
+else
+	with_pop="--disable-pop3"
+fi
+
+if [ "$PROXY" = "yes" ]; then
+	with_proxy="--enable-proxy"
 else
-	with_psl="--without-libpsl"
+	with_proxy="--disable-proxy"
+fi
+
+if [ "$RTSP" = "yes" ]; then
+	with_rtsp="--enable-rtsp"
+else
+	with_rtsp="--disable-rtsp"
+fi
+
+if [ "$SMB" = "yes" ]; then
+	with_smb="--enable-smb"
+else
+	with_smb="--disable-smb"
+fi
+
+if [ "$SMTP" = "yes" ]; then
+	with_smtp="--enable-smtp"
+else
+	with_smtp="--disable-smtp"
 fi
 
 if [ "$SSH" = "yes" ]; then
@@ -79,6 +186,25 @@
 	with_ssl="--without-ssl"
 fi
 
+if [ "$PSL" = "yes" ]; then
+	PKGDEPENDS="libpsl $PKGDEPENDS"
+	with_psl="--with-libpsl"
+else
+	with_psl="--without-libpsl"
+fi
+
+if [ "$TELNET" = "yes" ]; then
+	with_telnet="--enable-telnet"
+else
+	with_telnet="--disable-telnet"
+fi
+
+if [ "$TFTP" = "yes" ]; then
+	with_tftp="--enable-tftp"
+else
+	with_tftp="--disable-tftp"
+fi
+
 if [ "$ZLIB" = "yes" ]; then
 	PKGDEPENDS="zlib $PKGDEPENDS"
 	with_zlib="--with-zlib"
@@ -89,7 +215,7 @@
 build()
 {
 	rm -rf $PKGNAME-$PKGVERSION
-	tar xvf $PKGNAME-$PKGVERSION.tar.xz
+	tar -xvf $PKGNAME-$PKGVERSION.tar.xz
 	cd $PKGNAME-$PKGVERSION
 
 	CC="$CC" \
@@ -100,19 +226,36 @@
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix= \
+		--disable-debug \
 		--enable-shared \
+		--enable-optimize \
 		--with-ca-bundle=/etc/ssl/cert.pem \
 		--without-cyassl \
 		--without-gnutls \
 		--without-mbedtls \
 		--without-polarssl \
 		--without-wolfssl \
+		$with_dict \
+		$with_file \
+		$with_ftp \
+		$with_gopher \
+		$with_http \
+		$with_http2 \
 		$with_idn2 \
+		$with_imap \
 		$with_ipv6 \
-		$with_nghttp2 \
+		$with_ldap \
+		$with_ldaps \
+		$with_pop \
+		$with_proxy \
 		$with_psl \
+		$with_rtsp \
+		$with_smb \
+		$with_smtp \
 		$with_ssh \
 		$with_ssl \
+		$with_telnet \
+		$with_tftp \
 		$with_zlib
 	make
 	make install DESTDIR=$DESTDIR