summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2006-07-28 15:44:37 +0000
committerDaniel Black <dragonheart@gentoo.org>2006-07-28 15:44:37 +0000
commit3dd7ceeb9f82f3ba94f457875a462f213f5d8ed7 (patch)
treef88c412d340d7549eada4f97eff7e28228f0bf0e /net-ftp
parentPatches from Caster for java-1.5-fixer. Primarily, it makes sure there aren't... (diff)
downloadhistorical-3dd7ceeb9f82f3ba94f457875a462f213f5d8ed7.tar.gz
historical-3dd7ceeb9f82f3ba94f457875a462f213f5d8ed7.tar.bz2
historical-3dd7ceeb9f82f3ba94f457875a462f213f5d8ed7.zip
another patch to handle bookmarks in home directory. bug #140143
Package-Manager: portage-2.1.1_pre3-r5
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/pftpfxp/ChangeLog10
-rw-r--r--net-ftp/pftpfxp/files/0.11.4.6-correct_bookmark_path.patch136
-rw-r--r--net-ftp/pftpfxp/files/digest-pftpfxp-0.11.4.6-r33
-rw-r--r--net-ftp/pftpfxp/pftpfxp-0.11.4.6-r3.ebuild48
4 files changed, 196 insertions, 1 deletions
diff --git a/net-ftp/pftpfxp/ChangeLog b/net-ftp/pftpfxp/ChangeLog
index e8097fe1c86b..545f2eb96a0e 100644
--- a/net-ftp/pftpfxp/ChangeLog
+++ b/net-ftp/pftpfxp/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-ftp/pftpfxp
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/pftpfxp/ChangeLog,v 1.8 2006/07/13 03:05:57 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/pftpfxp/ChangeLog,v 1.9 2006/07/28 15:44:37 dragonheart Exp $
+
+*pftpfxp-0.11.4.6-r3 (28 Jul 2006)
+
+ 28 Jul 2006; Daniel Black <dragonheart@gentoo.org>
+ +files/0.11.4.6-correct_bookmark_path.patch, -pftpfxp-0.11.4.6-r1.ebuild,
+ -pftpfxp-0.11.4.6-r2.ebuild, +pftpfxp-0.11.4.6-r3.ebuild:
+ another patch to handle bookmarks in home directory thanks to Daniel Persson
+ in bug #140143
*pftpfxp-0.11.4.6-r2 (13 Jul 2006)
diff --git a/net-ftp/pftpfxp/files/0.11.4.6-correct_bookmark_path.patch b/net-ftp/pftpfxp/files/0.11.4.6-correct_bookmark_path.patch
new file mode 100644
index 000000000000..e63d656cbf83
--- /dev/null
+++ b/net-ftp/pftpfxp/files/0.11.4.6-correct_bookmark_path.patch
@@ -0,0 +1,136 @@
+diff -Naur old/pftpfxp-mew/include/defines.h new/pftpfxp-mew/include/defines.h
+--- old/pftpfxp-mew/include/defines.h 2006-07-28 08:55:08.000000000 +0200
++++ new/pftpfxp-mew/include/defines.h 2006-07-28 08:57:28.000000000 +0200
+@@ -209,9 +209,6 @@
+
+ #define PASSWORD_SIZE 60
+
+-#define BOOKMARK_RC ".pftp/bookmarks"
+-#define BOOKMARK_RC_BAK ".pftp/bookmarks.bak"
+-
+ #define DEFAULT_OKAY "[ okay ]"
+
+ #define PASS_MAGIC ",.,-.%$&%2.--,.-jio433-:52.-$:-.1hinui#+43+.5230.9401431.-54,.-fdioru892032"
+diff -Naur old/pftpfxp-mew/src/bookmark.cc new/pftpfxp-mew/src/bookmark.cc
+--- old/pftpfxp-mew/src/bookmark.cc 2006-07-28 08:55:08.000000000 +0200
++++ new/pftpfxp-mew/src/bookmark.cc 2006-07-28 17:16:32.000000000 +0200
+@@ -23,15 +23,38 @@
+ char *line = new(char[2048]), *enc = new(char[4096]);
+ BOOKMARK *bm_temp = global_bookmark;
+ char tempcwd[SERVER_WORKINGDIR_SIZE];
++ char *home_directory;
++ char *bookmark_file;
++ char *bookmark_file_bak;
++ int n;
++
++ home_directory = getenv("HOME");
++ n = strlen(home_directory) + sizeof("/.pftp/bookmarks") + 1;
++
++ if ((bookmark_file=(char*)malloc(n))==NULL) {
++ fprintf(stderr,"error allocating memory\n");
++ exit( -1);
++ }
++
++ sprintf(bookmark_file, "%s/.pftp/bookmarks", home_directory);
++
++ n = strlen(home_directory) + sizeof("/.pftp/bookmarks.bak") + 1;
++ if ((bookmark_file_bak=(char*)malloc(n))==NULL) {
++ fprintf(stderr,"error allocating memory\n");
++ exit( -1);
++ }
++
++ sprintf(bookmark_file_bak, "%s/.pftp/bookmarks.bak", home_directory);
+
+ getcwd(tempcwd, SERVER_WORKINGDIR_SIZE);
+ chdir(startcwd);
+
+ // backup old bookmark-file
+- rename(BOOKMARK_RC, BOOKMARK_RC_BAK);
++ rename(bookmark_file, bookmark_file_bak);
++ free(bookmark_file_bak);
+
+ pass_pos = 0;
+- if ((file_out = fopen(BOOKMARK_RC, "w"))) {
++ if ((file_out = fopen(bookmark_file, "w"))) {
+ // put magic and version number
+ strcpy(line, PASS_MAGIC);
+ Encrypt(line, enc);
+@@ -297,6 +320,7 @@
+ delete[](line);
+ delete[](enc);
+ chdir(tempcwd);
++ free(bookmark_file);
+ }
+
+ void CDisplayHandler::Decrypt(char *in, char *out) {
+@@ -383,12 +407,25 @@
+ char *line = new(char[4096]), *out = new(char[2048]);
+ BOOKMARK *bm_new, *bm_temp = NULL;
+ char tempcwd[SERVER_WORKINGDIR_SIZE];
++ char *home_directory;
++ char *bookmark_file;
++ int n;
+
++ pass_pos = 0;
++ home_directory = getenv("HOME");
++ n = strlen(home_directory) + sizeof("/.pftp/bookmarks") + 1;
++
++ if ((bookmark_file=(char*)malloc(n))==NULL) {
++ fprintf(stderr,"error allocating memory\n");
++ exit( -1);
++ }
++ sprintf(bookmark_file, "%s/.pftp/bookmarks", home_directory);
++
+ getcwd(tempcwd, SERVER_WORKINGDIR_SIZE);
+ chdir(startcwd);
+-
+- pass_pos = 0;
+- if ((file_in = fopen(BOOKMARK_RC, "r"))) {
++
++ if ((file_in = fopen(bookmark_file, "r"))) {
++ free(bookmark_file);
+ // check bookmark-id
+ fgets(line, 4095, file_in);
+
+@@ -2303,6 +2340,7 @@
+ chdir(tempcwd);
+ return (TRUE);
+ }
++ free(bookmark_file);
+ delete[](line);
+ delete[](out);
+ chdir(tempcwd);
+@@ -2313,11 +2351,24 @@
+ FILE *file_probe;
+ char tempcwd[SERVER_WORKINGDIR_SIZE];
+ char *line;
++ char *home_directory;
++ char *bookmark_file;
++ int n;
++
++ home_directory = getenv("HOME");
++ n = strlen(home_directory) + sizeof("/.pftp/bookmarks") + 1;
++
++ if ((bookmark_file=(char*)malloc(n))==NULL) {
++ fprintf(stderr,"error allocating memory\n");
++ exit( -1);
++ }
++ sprintf(bookmark_file, "%s/.pftp/bookmarks", home_directory);
+
+ getcwd(tempcwd, SERVER_WORKINGDIR_SIZE);
+ chdir(startcwd);
+
+- if ((file_probe = fopen(BOOKMARK_RC, "r"))) {
++ if ((file_probe = fopen(bookmark_file, "r"))) {
++ free(bookmark_file);
+ // check bookmark-id
+ line = new(char[4096]);
+ fgets(line, 4095, file_probe);
+@@ -2358,6 +2409,7 @@
+ delete[](line);
+ return (1);
+ } else {
++ free(bookmark_file);
+ chdir(tempcwd);
+ return (2);
+ }
diff --git a/net-ftp/pftpfxp/files/digest-pftpfxp-0.11.4.6-r3 b/net-ftp/pftpfxp/files/digest-pftpfxp-0.11.4.6-r3
new file mode 100644
index 000000000000..923a4fd4b307
--- /dev/null
+++ b/net-ftp/pftpfxp/files/digest-pftpfxp-0.11.4.6-r3
@@ -0,0 +1,3 @@
+MD5 22528192327488a372a6de1f5d2709dc pftpfxp-v0.11.4mew6.tgz 137093
+RMD160 7d60f8cb2469d7bb95561631c05a5692dccde995 pftpfxp-v0.11.4mew6.tgz 137093
+SHA256 c119435cd844eda76631dde77104e2d0daeef44923158776927d3b51dd5b1e9b pftpfxp-v0.11.4mew6.tgz 137093
diff --git a/net-ftp/pftpfxp/pftpfxp-0.11.4.6-r3.ebuild b/net-ftp/pftpfxp/pftpfxp-0.11.4.6-r3.ebuild
new file mode 100644
index 000000000000..42ed25d62efc
--- /dev/null
+++ b/net-ftp/pftpfxp/pftpfxp-0.11.4.6-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/pftpfxp/pftpfxp-0.11.4.6-r3.ebuild,v 1.1 2006/07/28 15:44:37 dragonheart Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="The powerful curses-based ftp/fxp client, mew edition"
+HOMEPAGE="http://pftpmew.tanesha.net"
+SRC_URI="http://tanesha.net/bigmess/pftpfxp-v0.11.4mew6.tgz"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="ssl"
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.6c )"
+S=${WORKDIR}/pftpfxp-mew
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PV}-gcc3.4.fix || die "patch failed"
+ epatch "${FILESDIR}"/pftpfxp-v0.11.4mew6-pret.patch || die "patch failed"
+ epatch "${FILESDIR}"/${PV}-correct_config_fix.patch || die "patch failed"
+ epatch "${FILESDIR}"/${PV}-correct_bookmark_path.patch || die "patch failed"
+ sed -i -e "s/^CPP=.*/CPP=$(tc-getCXX)/" \
+ -e "s:^CPPF=.*:CPPF=\"-Wall -D_REENTRANT -I../include ${CFLAGS}\":" \
+ configure
+}
+
+src_compile() {
+ cd "${S}"
+ #note: not a propper autoconf
+ ./configure || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin pftp
+ dodoc .pftp/config .pftp/keymap README.MEW old/*
+ cd "${WORKDIR}"
+ mv irssi mIRC-mew pftpfxp-autoconnect "${D}"/usr/share/doc/${PF}
+}
+
+pkg_postinst() {
+ einfo "In order to use pftp-mew you need to create these files:"
+ einfo " ~/.pftp/config"
+ einfo " ~/.pftp/keymap"
+ einfo "Refer to the examples in /usr/share/doc/${PF} for more information."
+}