git: 4f5a0912a88a - main - ftp/rexx-curl: Unbreak this port with curl 7.85.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 10 Sep 2022 13:05:24 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4f5a0912a88a5eac1c7db59e6c455f737e754f1a

commit 4f5a0912a88a5eac1c7db59e6c455f737e754f1a
Author:     Bob Eager <bob@eager.cx>
AuthorDate: 2022-09-10 12:54:46 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-09-10 13:03:01 +0000

    ftp/rexx-curl: Unbreak this port with curl 7.85.0
    
    PR:             266269
---
 ftp/rexx-curl/Makefile               |  2 --
 ftp/rexx-curl/files/patch-rexxcurl.c | 18 ++++++++++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/ftp/rexx-curl/Makefile b/ftp/rexx-curl/Makefile
index 72f7512fa58d..c87f71570cd3 100644
--- a/ftp/rexx-curl/Makefile
+++ b/ftp/rexx-curl/Makefile
@@ -9,8 +9,6 @@ MAINTAINER=	bob@eager.cx
 COMMENT=	External function package providing an interface to the cURL package
 WWW=		http://rexxcurl.sourceforge.net/
 
-BROKEN=		does not build with curl 7.85.0: use of undeclared identifier 'CURLOPT_FTP_RESPONSE_TIMEOUT'
-
 LICENSE=	CPLV1
 LICENSE_NAME=	CPL V1.0 license
 LICENSE_FILE=	${WRKSRC}/CPLv1.0.txt
diff --git a/ftp/rexx-curl/files/patch-rexxcurl.c b/ftp/rexx-curl/files/patch-rexxcurl.c
index 6e64288906fe..c709be7477b9 100644
--- a/ftp/rexx-curl/files/patch-rexxcurl.c
+++ b/ftp/rexx-curl/files/patch-rexxcurl.c
@@ -9,7 +9,21 @@
  #ifdef HAVE_CONFIG_H
  # include "config.h"
  #else
-@@ -1879,9 +1881,9 @@ int rexxcurl_sshkey_callback( CURL *easy
+@@ -480,8 +482,13 @@ static curl_options RexxCurlOptions[] =
+    { "FTPLISTONLY"     ,CURLOPT_FTPLISTONLY     ,RXCURLOPT_BOOL        , NULL },
+ #endif
+    { "FTPPORT"         ,CURLOPT_FTPPORT         ,RXCURLOPT_STRING      , NULL },
++#if LIBCURL_VERSION_NUM >= 0x075500
++   { "FTPRESPONSETIMEOUT", CURLOPT_SERVER_RESPONSE_TIMEOUT, RXCURLOPT_LONG, NULL },
++#endif
+ #if LIBCURL_VERSION_NUM >= 0x070a08
++# if LIBCURL_VERSION_NUM < 0x075500
+    { "FTPRESPONSETIMEOUT", CURLOPT_FTP_RESPONSE_TIMEOUT, RXCURLOPT_LONG, NULL },
++# endif
+ #endif
+ #if LIBCURL_VERSION_NUM >= 0x070e00
+    { "FTPSKIPPASVIP"   ,CURLOPT_FTP_SKIP_PASV_IP,RXCURLOPT_BOOL        , NULL },
+@@ -1879,9 +1886,9 @@ int rexxcurl_sshkey_callback( CURL *easy,     /* easy 
        if ( argv == NULL )
           return -1;
  
@@ -21,7 +35,7 @@
        rx_foundkeytype_len = sprintf( rx_foundkeytype, "%u", foundkey->keytype );
        rx_libcurlviewofkey_len = sprintf( rx_libcurlviewofkey, "%u", match );
  
-@@ -1964,11 +1966,11 @@ int debug_function( CURL *handle, curl_i
+@@ -1964,11 +1971,11 @@ int debug_function( CURL *handle, curl_infotype type, 
     int c;
     char *prefix = "*<><><>";
     if ( type == CURLINFO_TEXT )