aboutsummaryrefslogtreecommitdiff
path: root/ftp/gftp
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-04-29 03:09:11 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-04-29 03:09:11 +0000
commit57083eef2b028555f2a569a51472b3c8b5b47789 (patch)
tree29ecd69158b061baa4b1e981676a6afbe7d8c1c0 /ftp/gftp
parent4558e2784881fdce5d00d3a1a51d9060cad81509 (diff)
downloadports-57083eef2b028555f2a569a51472b3c8b5b47789.tar.gz
ports-57083eef2b028555f2a569a51472b3c8b5b47789.zip
Notes
Diffstat (limited to 'ftp/gftp')
-rw-r--r--ftp/gftp/Makefile6
-rw-r--r--ftp/gftp/files/patch-configure8
-rw-r--r--ftp/gftp/files/patch-lib::misc.c12
-rw-r--r--ftp/gftp/files/patch-lib::options.h16
-rw-r--r--ftp/gftp/files/patch-lib::sshv2.c63
5 files changed, 70 insertions, 35 deletions
diff --git a/ftp/gftp/Makefile b/ftp/gftp/Makefile
index 4ae1356f7279..6f41518c7385 100644
--- a/ftp/gftp/Makefile
+++ b/ftp/gftp/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gftp
PORTVERSION= 2.0.14
+PORTREVISION= 1
CATEGORIES= ftp
MASTER_SITES= http://gftp.seul.org/ \
ftp://gftp.seul.org/pub/gftp/
@@ -41,10 +42,6 @@ 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>
@@ -71,7 +68,6 @@ 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-configure b/ftp/gftp/files/patch-configure
index d86466fefad7..be29119ab3d4 100644
--- a/ftp/gftp/files/patch-configure
+++ b/ftp/gftp/files/patch-configure
@@ -1,5 +1,13 @@
--- configure.orig Wed Nov 27 17:25:51 2002
+++ configure Wed Nov 27 17:30:47 2002
+@@ -3988,6 +3988,7 @@
+
+ GFTP_TEXT=""
+ EXTRA_LIBS=""
++EXTRA_LIBS="$EXTRA_LIBS -lutil"
+ USE_READLINE="yes"
+ READLINE_LIBS=""
+ if test "x$enable_textport" = "x1" ; then
@@ -4725,9 +4725,9 @@
rm -f conf.gtktest
diff --git a/ftp/gftp/files/patch-lib::misc.c b/ftp/gftp/files/patch-lib::misc.c
new file mode 100644
index 000000000000..fc16bc56363b
--- /dev/null
+++ b/ftp/gftp/files/patch-lib::misc.c
@@ -0,0 +1,12 @@
+--- lib/misc.c.orig Fri Dec 6 03:28:19 2002
++++ lib/misc.c Fri Apr 25 01:51:48 2003
+@@ -881,7 +881,8 @@
+ diff += rd;
+ tempstr[diff] = '\0';
+
+- if (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0)
++ if ( (strcmp (tempstr, "Password:") == 0) ||
++ (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0) )
+ {
+ if (wrotepw)
+ {
diff --git a/ftp/gftp/files/patch-lib::options.h b/ftp/gftp/files/patch-lib::options.h
deleted file mode 100644
index 221a4d7f0ee3..000000000000
--- a/ftp/gftp/files/patch-lib::options.h
+++ /dev/null
@@ -1,16 +0,0 @@
---- 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
index 3e0e4452ab57..fb8c868b459d 100644
--- a/ftp/gftp/files/patch-lib::sshv2.c
+++ b/ftp/gftp/files/patch-lib::sshv2.c
@@ -1,17 +1,6 @@
---- 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 @@
+--- lib/sshv2.c.orig Sat Nov 23 15:34:25 2002
++++ lib/sshv2.c Thu Apr 24 21:57:04 2003
+@@ -543,8 +543,13 @@
if (request->sftpserv_path == NULL ||
*request->sftpserv_path == '\0')
{
@@ -25,3 +14,49 @@
}
else
{
+@@ -570,6 +575,15 @@
+ else
+ {
+ s[0] = s[1] = 0;
++#ifdef __FreeBSD__
++ if( openpty( &fdm, &fds, &pts_name, NULL, NULL ) < 0 )
++ {
++ request->logging_function (gftp_logging_error, request->user_data,
++ _("Cannot create a socket pair: %s\n"),
++ g_strerror (errno));
++ return (-2);
++ }
++#else
+ if ((fdm = ptym_open (pts_name)) < 0)
+ {
+ request->logging_function (gftp_logging_error, request->user_data,
+@@ -577,6 +591,7 @@
+ g_strerror (errno));
+ return (-2);
+ }
++#endif
+ }
+
+ if ((child = fork ()) == 0)
+@@ -589,6 +604,13 @@
+ }
+ else
+ {
++#ifdef __FreeBSD__
++ close (fdm);
++ if( ioctl( fds, TIOCSCTTY, NULL ) < 0 )
++ {
++ return( -2 );
++ }
++#else
+ if ((fds = ptys_open (fdm, pts_name)) < 0)
+ {
+ printf ("Cannot open slave pts %s: %s\n", pts_name,
+@@ -596,6 +618,7 @@
+ return (-1);
+ }
+ close (fdm);
++#endif
+ }
+
+ tty_raw (fds);