diff options
author | danfe <danfe@FreeBSD.org> | 2014-12-06 00:55:18 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2014-12-06 00:55:18 +0800 |
commit | 0095497a98fe6f1802b7d9039adbffd59066e5fa (patch) | |
tree | 347614459bd57265a1e3c2791a4dd181dc31ed6e /ftp | |
parent | b2e647718940c037c9cc5411d8533278763fc33d (diff) | |
download | freebsd-ports-gnome-0095497a98fe6f1802b7d9039adbffd59066e5fa.tar.gz freebsd-ports-gnome-0095497a98fe6f1802b7d9039adbffd59066e5fa.tar.zst freebsd-ports-gnome-0095497a98fe6f1802b7d9039adbffd59066e5fa.zip |
- Resurrect, unbreak, stagify, modernize Makefile
- Switch to the tar.bz2 distfile (it is 37% smaller)
- Fix a segmentation fault (patch obtained from Gentoo)
- Define LICENSE (GPLv2) and make GUI compulsory for now (when configured
for non-GUI, it doesn't install universally required `gftprc' file, and
generally requires more work to correctly decouple frontend programs)
- Rename one ::-containing patch file, remove unneeded ones
- Cleanup MASTER_SITES, update pkg-plist and pkg-descr
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/Makefile | 1 | ||||
-rw-r--r-- | ftp/gftp/Makefile | 36 | ||||
-rw-r--r-- | ftp/gftp/distinfo | 2 | ||||
-rw-r--r-- | ftp/gftp/files/patch-lib-misc.c | 21 | ||||
-rw-r--r-- | ftp/gftp/files/patch-lib-pty.c | 103 | ||||
-rw-r--r-- | ftp/gftp/pkg-descr | 23 | ||||
-rw-r--r-- | ftp/gftp/pkg-plist | 93 |
7 files changed, 279 insertions, 0 deletions
diff --git a/ftp/Makefile b/ftp/Makefile index e958dbfaf48c..fc46789c3e20 100644 --- a/ftp/Makefile +++ b/ftp/Makefile @@ -29,6 +29,7 @@ SUBDIR += ftpproxy SUBDIR += ftpsesame SUBDIR += ftpsync + SUBDIR += gftp SUBDIR += gnusget SUBDIR += gnustep-ftp SUBDIR += gstreamer1-plugins-curl diff --git a/ftp/gftp/Makefile b/ftp/gftp/Makefile new file mode 100644 index 000000000000..59ff47aaa8ab --- /dev/null +++ b/ftp/gftp/Makefile @@ -0,0 +1,36 @@ +# Created by: Damjan Marion <dmarion@open.hr> +# $FreeBSD$ + +PORTNAME= gftp +PORTVERSION= 2.0.19 +PORTREVISION= 5 +CATEGORIES= ftp +MASTER_SITES= http://gftp.seul.org/ + +MAINTAINER= oliver@FreeBSD.org +COMMENT= Free multithreaded GTK-based FTP and SFTP client + +LICENSE= GPLv2 + +USES= pathfix pkgconfig tar:bzip2 +GNU_CONFIGURE= yes +USE_GNOME= glib20 gtk20 +USE_OPENSSL= yes + +OPTIONS_DEFINE= NLS +OPTIONS_SUB= yes + +NLS_USES= gettext +NLS_CONFIGURE_OFF= --disable-nls + +.include <bsd.port.options.mk> + +post-patch: + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \ + s|DATADIRNAME=lib|DATADIRNAME=share|g ; \ + s|"-lssl |& -lcrypto|' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|size_t dest_len|size_t *dest_len|g ; \ + s|\(gftp_filename_from_utf8 (gftp_request \* request,\) int force_local,|\1|' \ + ${WRKSRC}/lib/charset-conv.c + +.include <bsd.port.mk> diff --git a/ftp/gftp/distinfo b/ftp/gftp/distinfo new file mode 100644 index 000000000000..db02b17c1634 --- /dev/null +++ b/ftp/gftp/distinfo @@ -0,0 +1,2 @@ +SHA256 (gftp-2.0.19.tar.bz2) = 5306a46be96d6f4d23906cb1836fb3d732039621a6c7fcfa921acc21ac110bfd +SIZE (gftp-2.0.19.tar.bz2) = 1687167 diff --git a/ftp/gftp/files/patch-lib-misc.c b/ftp/gftp/files/patch-lib-misc.c new file mode 100644 index 000000000000..9daf864e58ab --- /dev/null +++ b/ftp/gftp/files/patch-lib-misc.c @@ -0,0 +1,21 @@ +Fix segmentation fault, when gftpui_run_chdir is called with directory=0x0, +and then calls gftp_expand_path (src=0x0), +the NULL string was cloned using g_strdup, which returns NULL if +its only argument is NULL, then this returned string was unreferenced. + + lib/misc.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/lib/misc.c b/lib/misc.c +index 16c019b..2791466 100644 +--- lib/misc.c.orig ++++ lib/misc.c +@@ -143,6 +143,8 @@ gftp_expand_path (gftp_request * request, const char *src) + tempchar; + struct passwd *pw; + ++ g_return_val_if_fail(src != NULL, NULL); ++ + pw = NULL; + str = g_strdup (src); + diff --git a/ftp/gftp/files/patch-lib-pty.c b/ftp/gftp/files/patch-lib-pty.c new file mode 100644 index 000000000000..25f7c385ed39 --- /dev/null +++ b/ftp/gftp/files/patch-lib-pty.c @@ -0,0 +1,103 @@ +--- lib/pty.c.orig 2007-03-13 02:56:43.000000000 +0100 ++++ lib/pty.c 2010-01-17 17:34:25.000000000 +0100 +@@ -59,6 +59,50 @@ + return (new_fds); + } + ++#elif HAVE_OPENPTY ++ ++#ifdef HAVE_PTY_H ++#include <pty.h> ++#include <utmp.h> /* for login_tty */ ++#elif HAVE_LIBUTIL_H ++#include <libutil.h> ++#else ++extern int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize * winp); ++extern int login_tty(int fd); ++#endif ++ ++char * ++gftp_get_pty_impl (void) ++{ ++ return ("openpty"); ++} ++ ++ ++static int ++_gftp_ptym_open (char *pts_name, size_t len, int *fds) ++{ ++ int fdm; ++ ++ if (openpty (&fdm, fds, pts_name, NULL, NULL) < 0) ++ return (GFTP_ERETRYABLE); ++ ++ ioctl (*fds, TIOCSCTTY, NULL); ++ ++ return (fdm); ++} ++ ++ ++static int ++_gftp_ptys_open (int fdm, int fds, char *pts_name) ++{ ++ if (login_tty (fds) < 0) { ++ close(fds); ++ return (GFTP_EFATAL); ++ } ++ ++ return (fds); ++} ++ + #elif HAVE_GRANTPT + + #if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)) +@@ -131,49 +192,6 @@ + return (new_fds); + } + +-#elif HAVE_OPENPTY +- +-#ifdef HAVE_PTY_H +-#include <pty.h> +-#include <utmp.h> /* for login_tty */ +-#elif HAVE_LIBUTIL_H +-#include <libutil.h> +-#include <utmp.h> /* for login_tty */ +-#else +-extern int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize * winp); +-extern int login_tty(int fd); +-#endif +- +-char * +-gftp_get_pty_impl (void) +-{ +- return ("openpty"); +-} +- +- +-static int +-_gftp_ptym_open (char *pts_name, size_t len, int *fds) +-{ +- int fdm; +- +- if (openpty (&fdm, fds, pts_name, NULL, NULL) < 0) +- return (GFTP_ERETRYABLE); +- +- ioctl (*fds, TIOCSCTTY, NULL); +- +- return (fdm); +-} +- +- +-static int +-_gftp_ptys_open (int fdm, int fds, char *pts_name) +-{ +- if (login_tty (fds) < 0) +- return (GFTP_EFATAL); +- +- return (fds); +-} +- + #else + + /* Fall back to *BSD... */ diff --git a/ftp/gftp/pkg-descr b/ftp/gftp/pkg-descr new file mode 100644 index 000000000000..681385a4dacc --- /dev/null +++ b/ftp/gftp/pkg-descr @@ -0,0 +1,23 @@ +gFTP is a free multithreaded FTP and SFTP client for Unix-like systems. +It has the following features: + + Distributed under the terms of the GNU Public License + Written in C, has a text interface and a GTK+ 2.x interface + Supports the FTP, FTPS (control connection only), HTTP, HTTPS, SSH, and FSP + Multithreaded to allow for simultaneous downloads + File transfer queues to allow for downloading multiple files + Bookmarks menu to allow you to quickly connect to remote sites + Supports downloading entire directories and subdirectories + Extensive connection manager with FTP and HTTP proxy server support + Supports resuming interrupted file transfers + Supports caching of remote directory listings + Supports connecting to a FTP server via command line parameters + Supports associating icons with particular file extensions in the list boxes + Sorting capabilities in the file list boxes + Can restrict files in the list boxes to a particular file specification + Supports viewing and editing of local and remote files + Allows for passive and non-passive file transfers + Supports FXP file transfers (file transfer between 2 remote servers via FTP) + Eliminates buffer overruns from malicious FTP sites + +WWW: http://gftp.seul.org/ diff --git a/ftp/gftp/pkg-plist b/ftp/gftp/pkg-plist new file mode 100644 index 000000000000..aeff3a984ce1 --- /dev/null +++ b/ftp/gftp/pkg-plist @@ -0,0 +1,93 @@ +bin/gftp +bin/gftp-gtk +bin/gftp-text +man/man1/gftp.1.gz +share/applications/gftp.desktop +share/pixmaps/gftp.png +%%DATADIR%%/COPYING +%%DATADIR%%/bookmarks +%%DATADIR%%/connect.xpm +%%DATADIR%%/deb.xpm +%%DATADIR%%/diff.xpm +%%DATADIR%%/dir.xpm +%%DATADIR%%/doc.xpm +%%DATADIR%%/dotdot.xpm +%%DATADIR%%/down.xpm +%%DATADIR%%/exe.xpm +%%DATADIR%%/gftp-16x16.png +%%DATADIR%%/gftp-22x22.png +%%DATADIR%%/gftp-24x24.png +%%DATADIR%%/gftp-32x32.png +%%DATADIR%%/gftp-48x48.png +%%DATADIR%%/gftp-logo.xpm +%%DATADIR%%/gftp-scalable.svg +%%DATADIR%%/gftp.xpm +%%DATADIR%%/gftprc +%%DATADIR%%/img.xpm +%%DATADIR%%/left.xpm +%%DATADIR%%/linkdir.xpm +%%DATADIR%%/linkfile.xpm +%%DATADIR%%/man.xpm +%%DATADIR%%/open_dir.xpm +%%DATADIR%%/right.xpm +%%DATADIR%%/rpm.xpm +%%DATADIR%%/sound.xpm +%%DATADIR%%/stop.xpm +%%DATADIR%%/tar.xpm +%%DATADIR%%/txt.xpm +%%DATADIR%%/up.xpm +%%DATADIR%%/world.xpm +%%NLS%%share/locale/am/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ar/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/az/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/be/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/bg/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/bn/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ca/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/cs/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/da/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/de/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/dz/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/el/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/en_CA/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/en_GB/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/es/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/fi/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/fr/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ga/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/gl/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/gu/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/he/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/hr/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/hu/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/it/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ja/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ko/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/lt/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/lv/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/mk/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ml/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ms/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/nb/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ne/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/nl/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/oc/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/pa/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/pl/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/pt/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/pt_BR/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ro/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ru/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/rw/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/sk/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/sq/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/sr/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/sr@Latn/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/sv/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/ta/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/th/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/tr/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/uk/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/zh_CN/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/zh_HK/LC_MESSAGES/gftp.mo +%%NLS%%share/locale/zh_TW/LC_MESSAGES/gftp.mo |