View | Details | Raw Unified | Return to bug 51391
Collapse All | Expand All

(-)gftp/Makefile (-5 / +1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	gftp
8
PORTNAME=	gftp
9
PORTVERSION=	2.0.14
9
PORTVERSION=	2.0.14
10
PORTREVISION=	1
10
CATEGORIES=	ftp
11
CATEGORIES=	ftp
11
MASTER_SITES=	http://gftp.seul.org/ \
12
MASTER_SITES=	http://gftp.seul.org/ \
12
		ftp://gftp.seul.org/pub/gftp/
13
		ftp://gftp.seul.org/pub/gftp/
Lines 41-50 Link Here
41
CONFIGURE_ENV+=	_GTHREAD_LIBS="-lgthread12"
42
CONFIGURE_ENV+=	_GTHREAD_LIBS="-lgthread12"
42
.endif
43
.endif
43
.endif
44
.endif
44
.if defined(WITH_SSH)
45
RUN_DEPENDS+=	ssh-askpass:${PORTSDIR}/security/openssh-askpass
46
CFLAGS+=	-DWITH_SSH
47
.endif
48
45
49
.include <bsd.port.pre.mk>
46
.include <bsd.port.pre.mk>
50
47
Lines 71-77 Link Here
71
	@${ECHO} ""
68
	@${ECHO} ""
72
	@${ECHO} "	WITHOUT_X11=yes		Only build the text frontend."
69
	@${ECHO} "	WITHOUT_X11=yes		Only build the text frontend."
73
	@${ECHO} "	WITH_GTK2=yes		Use gtk 2.x instead of 1.x"
70
	@${ECHO} "	WITH_GTK2=yes		Use gtk 2.x instead of 1.x"
74
	@${ECHO} "	WITH_SSH=yes		To enable SSH2 support"
75
	@${ECHO} ""
71
	@${ECHO} ""
76
72
77
post-patch:
73
post-patch:
(-)gftp/files/patch-configure (+8 lines)
Lines 1-5 Link Here
1
--- configure.orig	Wed Nov 27 17:25:51 2002
1
--- configure.orig	Wed Nov 27 17:25:51 2002
2
+++ configure	Wed Nov 27 17:30:47 2002
2
+++ configure	Wed Nov 27 17:30:47 2002
3
@@ -3988,6 +3988,7 @@
4
 
5
 GFTP_TEXT=""
6
 EXTRA_LIBS=""
7
+EXTRA_LIBS="$EXTRA_LIBS -lutil"
8
 USE_READLINE="yes"
9
 READLINE_LIBS=""
10
 if test "x$enable_textport" = "x1" ; then
3
@@ -4725,9 +4725,9 @@
11
@@ -4725,9 +4725,9 @@
4
   
12
   
5
   rm -f conf.gtktest
13
   rm -f conf.gtktest
(-)gftp/files/patch-lib::misc.c (+14 lines)
Line 0 Link Here
1
--- lib/misc.c.orig	Thu Apr 24 11:54:48 2003
2
+++ lib/misc.c	Thu Apr 24 11:53:00 2003
3
@@ -881,7 +881,11 @@
4
       diff += rd;
5
       tempstr[diff] = '\0'; 
6
 
7
+#ifdef __FreeBSD__
8
+      if (strcmp (tempstr, "Password:") == 0)
9
+#else
10
       if (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0)
11
+#endif
12
         {
13
           if (wrotepw)
14
             {
(-)gftp/files/patch-lib::options.h (-16 lines)
Lines 1-16 Link Here
1
--- lib/options.h.orig	Wed Apr 23 22:50:37 2003
2
+++ lib/options.h	Wed Apr 23 22:51:13 2003
3
@@ -26,9 +26,13 @@
4
   {"FTP", 	rfc959_init, 	"ftp",		1},
5
   {"HTTP", 	rfc2068_init, 	"http",		1},
6
   {"Local", 	local_init, 	"file",		1},
7
+#ifdef WITH_SSH
8
   {"SSH2",	sshv2_init,	"ssh2", 	1},
9
+#endif
10
   {"Bookmark", 	bookmark_init, 	"bookmark", 	0},
11
+#ifdef WITH_SSH
12
   {"SSH", 	ssh_init, 	"ssh", 		1},
13
+#endif
14
   {NULL, 	NULL, 		NULL,		0}
15
 };
16
 
(-)gftp/files/patch-lib::sshv2.c (-14 / +49 lines)
Lines 1-17 Link Here
1
--- lib/sshv2.c.orig	Wed Apr 23 22:45:50 2003
1
--- lib/sshv2.c.orig	Sat Nov 23 15:34:25 2002
2
+++ lib/sshv2.c	Wed Apr 23 22:41:59 2003
2
+++ lib/sshv2.c	Thu Apr 24 21:57:04 2003
3
@@ -523,7 +523,9 @@
3
@@ -543,8 +543,13 @@
4
   int version, fdm, fds, s[2];
5
   sshv2_message message;
6
   pid_t child;
7
-
8
+#ifdef __FreeBSD__
9
+  ssh_use_askpass=TRUE;
10
+#endif
11
   g_return_val_if_fail (request != NULL, -2);
12
   g_return_val_if_fail (request->protonum == GFTP_SSHV2_NUM, -2);
13
   g_return_val_if_fail (request->hostname != NULL, -2);
14
@@ -543,8 +545,13 @@
15
   if (request->sftpserv_path == NULL ||
4
   if (request->sftpserv_path == NULL ||
16
       *request->sftpserv_path == '\0')
5
       *request->sftpserv_path == '\0')
17
     {
6
     {
Lines 25-27 Link Here
25
     }
14
     }
26
   else
15
   else
27
     {
16
     {
17
@@ -570,6 +575,15 @@
18
   else
19
     {
20
       s[0] = s[1] = 0;
21
+#ifdef __FreeBSD__
22
+      if( openpty( &fdm, &fds, &pts_name, NULL, NULL ) < 0 )
23
+        {
24
+          request->logging_function (gftp_logging_error, request->user_data,
25
+        	                 _("Cannot create a socket pair: %s\n"),
26
+                                 g_strerror (errno));
27
+          return (-2);
28
+	}
29
+#else
30
       if ((fdm = ptym_open (pts_name)) < 0)
31
         {
32
           request->logging_function (gftp_logging_error, request->user_data,
33
@@ -577,6 +591,7 @@
34
                                 g_strerror (errno));
35
           return (-2);
36
         }
37
+#endif
38
     }
39
  
40
   if ((child = fork ()) == 0)
41
@@ -589,6 +604,13 @@
42
         }
43
       else
44
         {
45
+#ifdef __FreeBSD__
46
+          close (fdm);
47
+          if( ioctl( fds, TIOCSCTTY, NULL ) < 0 )
48
+            {
49
+              return( -2 );
50
+            }
51
+#else
52
           if ((fds = ptys_open (fdm, pts_name)) < 0)
53
             {
54
               printf ("Cannot open slave pts %s: %s\n", pts_name, 
55
@@ -596,6 +618,7 @@
56
               return (-1);
57
             }
58
           close (fdm);
59
+#endif
60
         }
61
 
62
       tty_raw (fds);

Return to bug 51391