Index: files/patch-po-Makefile.in.in
===================================================================
--- files/patch-po-Makefile.in.in	(revision 0)
+++ files/patch-po-Makefile.in.in	(revision 0)
@@ -0,0 +1,10 @@
+--- po/Makefile.in.in.old	2007-03-24 15:15:07.000000000 +0100
++++ po/Makefile.in.in	2007-03-24 15:15:25.000000000 +0100
+@@ -31,6 +31,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ mkinstalldirs = $(SHELL) @install_sh@ -d
++install_sh = @install_sh@
+ mkdir_p = @mkdir_p@
+ 
+ GMSGFMT_ = @GMSGFMT@
Index: files/patch-commands.cc.diff
===================================================================
--- files/patch-commands.cc.diff	(revision 23064)
+++ files/patch-commands.cc.diff	(working copy)
@@ -1,22 +0,0 @@
---- src/commands.cc.orig	2005-11-08 08:16:51.000000000 +0100
-+++ src/commands.cc		2005-12-15 01:07:34.000000000 +0100
-@@ -858,8 +858,9 @@
-       if(host && host[0])
-       {
- 	 url=new ParsedURL(host);
-+	 bool no_proto=(!url->proto);
- 
--	 if(!url->proto && url->host)
-+	 if(no_proto && url->host)
- 	 {
- 	    const char *p=ResMgr::Query("cmd:default-protocol",url->host);
- 	    if(!p)
-@@ -911,7 +912,7 @@
- 	 }
- 
- 	 // user gets substituted only if no proto is specified.
--	 if(!pass && (user || !uc.proto))
-+	 if(!pass && (user || no_proto))
- 	 {
- 	    nrc=NetRC::LookupHost(host,user);
- 	    if(nrc)
Index: Portfile
===================================================================
--- Portfile	(revision 23064)
+++ Portfile	(working copy)
@@ -2,7 +2,7 @@
 
 PortSystem 1.0
 name                lftp
-version             3.5.6
+version             3.5.9
 categories          net
 maintainers         yeled@macports.org
 description         Sophisticated file transfer program
@@ -17,40 +17,35 @@
 homepage            http://lftp.yar.ru/
 platforms           darwin 
 
-depends_lib  port:expat port:gettext port:libiconv port:ncurses
+depends_lib         port:expat port:libiconv port:ncurses port:readline
 
-master_sites        ftp://ftp.wiretapped.net/pub/mirrors/${name}/ \
-            ftp://ftp.wiretapped.net/pub/mirrors/${name}/old/ \
+master_sites        ftp://lftp.yar.ru/lftp/ \
+                    ftp://lftp.yar.ru/lftp/old/ \
+                    ftp://ftp.wiretapped.net/pub/mirrors/${name}/ \
+                    ftp://ftp.wiretapped.net/pub/mirrors/${name}/old/ \
                     ftp://ftp.cs.tu-berlin.de/pub/net/ftp/${name}/ \
                     http://ftp.yars.free.net/pub/source/${name}/
 use_bzip2           yes
-checksums           md5 3d4508c00639b9e776f0904a4079547a
+checksums           md5 242aa0b01be79942bb9bcdd2a4b079ba \
+                    sha1 ce4f7abb5a74e90218bb2ee94170ace747025298
 
 default_variants    +ssl
 
+configure.env   CPPFLAGS="-I${prefix}/include" \
+                LDFLAGS="-L${prefix}/lib"
+
+configure.args  --without-openssl --without-gnutls --disable-nls
+
 pre-configure {
-# for some bogus Apple headers.
-        reinplace "s|poll_works=yes|poll_works=no|g" ${worksrcpath}/configure
-        reinplace "s|need_relink=yes|need_relink=no|g" ${worksrcpath}/ltmain.sh
-# for _optopt errors
-        reinplace "s|^.*LIBOBJS=\"\$LIBOBJS getopt.\$ac_objext\" ;;|  *) LIBOBJS=\"\$LIBOBJS\" ;;|g" ${worksrcpath}/configure
-        reinplace "s|^.*LIBOBJS=\"\$LIBOBJS getopt1.\$ac_objext\" ;;|  *) LIBOBJS=\"\$LIBOBJS\" ;;|g" ${worksrcpath}/configure
-# for ssl/tls breakage.
-        reinplace "s|CDECL void srandom(unsigned seed);||g" ${worksrcpath}/src/ResMgr.cc
+	# look for ncurses first
+	reinplace "s|curses ncurses|ncurses curses|g" ${worksrcpath}/configure
 }
 
-configure.env   CPPFLAGS="-no-cpp-precomp -Wno-long-double -DBIND_8_COMPAT" \
-                LDFLAGS="-Wl,-search_paths_first"
-
-configure.args  --mandir=${prefix}/share/man \
-                --with-pic --disable-share --enable-static --without-openssl \
-                --with-included-readline --without-gnutls
-
 post-destroot { xinstall -d ${destroot}${prefix}/share/doc/${name}
                 xinstall -m 644 -v -W ${worksrcpath} \
                 BUGS ChangeLog COPYING FAQ FEATURES NEWS \
                 README README.debug-levels README.modules \
-                THANKS TODO \
+		MIRRORS THANKS TODO \
                 ${destroot}${prefix}/share/doc/${name}
 }
 
@@ -60,8 +55,15 @@
     depends_lib-append port:openssl
 }
 
-variant tls {
+variant tls conflicts ssl {
     configure.args-append --without-openssl --with-gnutls
     configure.args-delete --with-openssl --without-gnutls
     depends_lib-append port:gnutls
 }
+
+variant nls {
+    patchfiles patch-po-Makefile.in.in
+    configure.args-append --enable-nls
+    configure.args-delete --disable-nls
+    depends_lib-append port:gettext
+}
