From f7e899092eed4e615def1caceabef68aba5e424f Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Sun, 22 Nov 2009 21:52:48 +0000 Subject: Version bump. (Portage version: 2.2_rc51/cvs/Linux x86_64) --- net-ftp/tnftp/ChangeLog | 9 +- net-ftp/tnftp/files/tnftp-20090606-getline.patch | 109 +++++++++++++++++++++ .../files/tnftp-20090606-glibc-2.8-ARG_MAX.patch | 22 +++++ net-ftp/tnftp/tnftp-20090606.ebuild | 40 ++++++++ 4 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 net-ftp/tnftp/files/tnftp-20090606-getline.patch create mode 100644 net-ftp/tnftp/files/tnftp-20090606-glibc-2.8-ARG_MAX.patch create mode 100644 net-ftp/tnftp/tnftp-20090606.ebuild diff --git a/net-ftp/tnftp/ChangeLog b/net-ftp/tnftp/ChangeLog index cfe7348a6761..866a05a9585c 100644 --- a/net-ftp/tnftp/ChangeLog +++ b/net-ftp/tnftp/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-ftp/tnftp # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/tnftp/ChangeLog,v 1.32 2009/05/23 14:40:37 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/tnftp/ChangeLog,v 1.33 2009/11/22 21:52:48 swegener Exp $ + +*tnftp-20090606 (22 Nov 2009) + + 22 Nov 2009; Sven Wegener +tnftp-20090606.ebuild, + +files/tnftp-20090606-getline.patch, + +files/tnftp-20090606-glibc-2.8-ARG_MAX.patch: + Version bump. *tnftp-20090520 (23 May 2009) diff --git a/net-ftp/tnftp/files/tnftp-20090606-getline.patch b/net-ftp/tnftp/files/tnftp-20090606-getline.patch new file mode 100644 index 000000000000..e9294beca3d7 --- /dev/null +++ b/net-ftp/tnftp/files/tnftp-20090606-getline.patch @@ -0,0 +1,109 @@ +--- tnftp-20090520/src/cmds.c ++++ tnftp-20090520/src/cmds.c +@@ -181,7 +181,7 @@ + while (1) { + fprintf(ttyout, "%s %s [anpqy?]? ", promptleft, promptright); + (void)fflush(ttyout); +- if (getline(stdin, cline, sizeof(cline), &errormsg) < 0) { ++ if (ftp_getline(stdin, cline, sizeof(cline), &errormsg) < 0) { + mflag = 0; + fprintf(ttyout, "%s; %s aborted\n", errormsg, cmd); + return (0); +@@ -776,7 +776,7 @@ + argv[0] = cmdbuf; + gmode = restart_point ? "r+" : "w"; + +- while (getline(fp, buf, sizeof(buf), NULL) >= 0) { ++ while (ftp_getline(fp, buf, sizeof(buf), NULL) >= 0) { + if (buf[0] == '\0') + continue; + argv[1] = buf; +--- tnftp-20090520/src/extern.h ++++ tnftp-20090520/src/extern.h +@@ -135,7 +135,7 @@ + void get(int, char **); + struct cmd *getcmd(const char *); + int getit(int, char **, int, const char *); +-int getline(FILE *, char *, size_t, const char **); ++int ftp_getline(FILE *, char *, size_t, const char **); + struct option *getoption(const char *); + char *getoptionvalue(const char *); + void getremoteinfo(void); +--- tnftp-20090520/src/fetch.c ++++ tnftp-20090520/src/fetch.c +@@ -193,7 +193,7 @@ + fprintf(ttyout, "%s\n", uuser); + } else { + (void)fflush(ttyout); +- if (getline(stdin, uuser, sizeof(uuser), &errormsg) < 0) { ++ if (ftp_getline(stdin, uuser, sizeof(uuser), &errormsg) < 0) { + warnx("%s; can't authenticate", errormsg); + goto cleanup_auth_url; + } +@@ -841,7 +841,7 @@ + } + + /* Read the response */ +- len = getline(fin, buf, sizeof(buf), &errormsg); ++ len = ftp_getline(fin, buf, sizeof(buf), &errormsg); + if (len < 0) { + if (*errormsg == '\n') + errormsg++; +@@ -865,7 +865,7 @@ + + /* Read the rest of the header. */ + while (1) { +- len = getline(fin, buf, sizeof(buf), &errormsg); ++ len = ftp_getline(fin, buf, sizeof(buf), &errormsg); + if (len < 0) { + if (*errormsg == '\n') + errormsg++; +@@ -1070,7 +1070,7 @@ + + fprintf(ttyout, + "Authorization failed. Retry (y/n)? "); +- if (getline(stdin, reply, sizeof(reply), NULL) ++ if (ftp_getline(stdin, reply, sizeof(reply), NULL) + < 0) { + goto cleanup_fetch_url; + } +--- tnftp-20090520/src/main.c ++++ tnftp-20090520/src/main.c +@@ -682,7 +682,7 @@ + fprintf(ttyout, "%s ", p); + } + (void)fflush(ttyout); +- len = getline(stdin, line, sizeof(line), NULL); ++ len = ftp_getline(stdin, line, sizeof(line), NULL); + switch (len) { + case -1: /* EOF */ + case -2: /* error */ +--- tnftp-20090520/src/util.c ++++ tnftp-20090520/src/util.c +@@ -415,7 +415,7 @@ + else + fprintf(ttyout, "Name (%s): ", host); + errormsg = NULL; +- nlen = getline(stdin, tmp, sizeof(tmp), &errormsg); ++ nlen = ftp_getline(stdin, tmp, sizeof(tmp), &errormsg); + if (nlen < 0) { + fprintf(ttyout, "%s; %s aborted.\n", errormsg, "login"); + code = -1; +@@ -523,7 +523,7 @@ + fprintf(ttyout, "(%s) ", aprompt); + line[len++] = ' '; + errormsg = NULL; +- nlen = getline(stdin, line + len, sizeof(line)-len, &errormsg); ++ nlen = ftp_getline(stdin, line + len, sizeof(line)-len, &errormsg); + if (nlen < 0) { + fprintf(ttyout, "%s; %s aborted.\n", errormsg, "operation"); + intr(0); +@@ -1255,7 +1255,7 @@ + * -3 line was too long + */ + int +-getline(FILE *stream, char *buf, size_t buflen, const char **errormsg) ++ftp_getline(FILE *stream, char *buf, size_t buflen, const char **errormsg) + { + int rv, ch; + size_t len; diff --git a/net-ftp/tnftp/files/tnftp-20090606-glibc-2.8-ARG_MAX.patch b/net-ftp/tnftp/files/tnftp-20090606-glibc-2.8-ARG_MAX.patch new file mode 100644 index 000000000000..8c0f91a069e8 --- /dev/null +++ b/net-ftp/tnftp/files/tnftp-20090606-glibc-2.8-ARG_MAX.patch @@ -0,0 +1,22 @@ +glibc-2.8 no loner provides the ARG_MAX macro. + +--- tnftp-20090520/libnetbsd/glob.c ++++ tnftp-20090520/libnetbsd/glob.c +@@ -55,6 +55,8 @@ + * Number of matches in the current invocation of glob. + */ + ++#include ++ + #include "tnftp.h" + + #undef TILDE /* XXX: AIX 4.1.5 has this in */ +@@ -720,7 +722,7 @@ + } + pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; + +- if ((pglob->gl_flags & GLOB_LIMIT) && (newsize + *limit) >= ARG_MAX) { ++ if ((pglob->gl_flags & GLOB_LIMIT) && (newsize + *limit) >= sysconf(_SC_ARG_MAX)) { + errno = 0; + return(GLOB_NOSPACE); + } diff --git a/net-ftp/tnftp/tnftp-20090606.ebuild b/net-ftp/tnftp/tnftp-20090606.ebuild new file mode 100644 index 000000000000..bc731d9ada99 --- /dev/null +++ b/net-ftp/tnftp/tnftp-20090606.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/tnftp/tnftp-20090606.ebuild,v 1.1 2009/11/22 21:52:48 swegener Exp $ + +EAPI="2" + +inherit eutils + +DESCRIPTION="NetBSD FTP client with several advanced features" +SRC_URI="ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/${P}.tar.gz + ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/old/${P}.tar.gz" +HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/" + +SLOT="0" +LICENSE="as-is" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="ipv6 socks5" + +DEPEND=">=sys-libs/ncurses-5.1 + socks5? ( net-proxy/dante )" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-glibc-2.8-ARG_MAX.patch + epatch "${FILESDIR}"/${P}-getline.patch +} + +src_configure() { + econf \ + --enable-editcomplete \ + $(use_enable ipv6) \ + $(use_with socks5 socks) \ + || die "econf failed" +} + +src_install() { + newbin src/ftp tnftp || die "newbin failed" + newman src/ftp.1 tnftp.1 || die "newman failed" + dodoc ChangeLog README THANKS || die "dodoc failed" +} -- cgit v1.2.3-65-gdbad