aboutsummaryrefslogtreecommitdiffstats
path: root/ftp
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2003-04-24 17:28:40 +0800
committerleeym <leeym@FreeBSD.org>2003-04-24 17:28:40 +0800
commitb5fece68d9aaa114d81e031c6de47395ec8c01c9 (patch)
tree4a56d97b383b77cc8d23880539ba66faf0ce7fde /ftp
parentdb951146339ff8a3e1fc24fbed0cf9efa2a0ac10 (diff)
downloadfreebsd-ports-gnome-b5fece68d9aaa114d81e031c6de47395ec8c01c9.tar.gz
freebsd-ports-gnome-b5fece68d9aaa114d81e031c6de47395ec8c01c9.tar.zst
freebsd-ports-gnome-b5fece68d9aaa114d81e031c6de47395ec8c01c9.zip
make ssh2 support working for FreeBSD
PR: 51330 Submitted by: Oliver Lehmann <lehmann@ans-netz.de>
Diffstat (limited to 'ftp')
-rw-r--r--ftp/gftp/Makefile5
-rw-r--r--ftp/gftp/files/patch-lib::options.h16
-rw-r--r--ftp/gftp/files/patch-lib::sshv2.c27
3 files changed, 48 insertions, 0 deletions
diff --git a/ftp/gftp/Makefile b/ftp/gftp/Makefile
index aede51b8278a..4ae1356f7279 100644
--- a/ftp/gftp/Makefile
+++ b/ftp/gftp/Makefile
@@ -41,6 +41,10 @@ USE_GNOME+= gtk12
CONFIGURE_ENV+= _GTHREAD_LIBS="-lgthread12"
.endif
.endif
+.if defined(WITH_SSH)
+RUN_DEPENDS+= ssh-askpass:${PORTSDIR}/security/openssh-askpass
+CFLAGS+= -DWITH_SSH
+.endif
.include <bsd.port.pre.mk>
@@ -67,6 +71,7 @@ pre-everything::
@${ECHO} ""
@${ECHO} " WITHOUT_X11=yes Only build the text frontend."
@${ECHO} " WITH_GTK2=yes Use gtk 2.x instead of 1.x"
+ @${ECHO} " WITH_SSH=yes To enable SSH2 support"
@${ECHO} ""
post-patch:
diff --git a/ftp/gftp/files/patch-lib::options.h b/ftp/gftp/files/patch-lib::options.h
new file mode 100644
index 000000000000..221a4d7f0ee3
--- /dev/null
+++ b/ftp/gftp/files/patch-lib::options.h
@@ -0,0 +1,16 @@
+--- lib/options.h.orig Wed Apr 23 22:50:37 2003
++++ lib/options.h Wed Apr 23 22:51:13 2003
+@@ -26,9 +26,13 @@
+ {"FTP", rfc959_init, "ftp", 1},
+ {"HTTP", rfc2068_init, "http", 1},
+ {"Local", local_init, "file", 1},
++#ifdef WITH_SSH
+ {"SSH2", sshv2_init, "ssh2", 1},
++#endif
+ {"Bookmark", bookmark_init, "bookmark", 0},
++#ifdef WITH_SSH
+ {"SSH", ssh_init, "ssh", 1},
++#endif
+ {NULL, NULL, NULL, 0}
+ };
+
diff --git a/ftp/gftp/files/patch-lib::sshv2.c b/ftp/gftp/files/patch-lib::sshv2.c
new file mode 100644
index 000000000000..3e0e4452ab57
--- /dev/null
+++ b/ftp/gftp/files/patch-lib::sshv2.c
@@ -0,0 +1,27 @@
+--- lib/sshv2.c.orig Wed Apr 23 22:45:50 2003
++++ lib/sshv2.c Wed Apr 23 22:41:59 2003
+@@ -523,7 +523,9 @@
+ int version, fdm, fds, s[2];
+ sshv2_message message;
+ pid_t child;
+-
++#ifdef __FreeBSD__
++ ssh_use_askpass=TRUE;
++#endif
+ g_return_val_if_fail (request != NULL, -2);
+ g_return_val_if_fail (request->protonum == GFTP_SSHV2_NUM, -2);
+ g_return_val_if_fail (request->hostname != NULL, -2);
+@@ -543,8 +545,13 @@
+ if (request->sftpserv_path == NULL ||
+ *request->sftpserv_path == '\0')
+ {
++#ifdef __FreeBSD__
++ p1 = "/usr/libexec";
++ p2 = '/';
++#else
+ p1 = "";
+ p2 = ' ';
++#endif
+ }
+ else
+ {