diff options
author | Jeroen Roovers <jer@gentoo.org> | 2012-03-16 16:48:39 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2012-03-16 16:48:39 +0000 |
commit | 5cdee98916b455c331cae75ccedc4f66177f9895 (patch) | |
tree | 31fb372471bbe5d157bbf22d3281ed7cc346863f /net-ftp | |
parent | Dependency on polygon:2 only (diff) | |
download | gentoo-2-5cdee98916b455c331cae75ccedc4f66177f9895.tar.gz gentoo-2-5cdee98916b455c331cae75ccedc4f66177f9895.tar.bz2 gentoo-2-5cdee98916b455c331cae75ccedc4f66177f9895.zip |
Fix bug #408231. Set RDEPEND. Move preparation stuff to src_prepare(). Respect LDFLAGS. Remove old patches. Do not automagically compile against dev-libs/openssl.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'net-ftp')
-rw-r--r-- | net-ftp/pftpfxp/ChangeLog | 13 | ||||
-rw-r--r-- | net-ftp/pftpfxp/files/0.11.4.6-correct_bookmark_path.patch | 136 | ||||
-rw-r--r-- | net-ftp/pftpfxp/files/0.11.4.6-correct_config_fix.patch | 94 | ||||
-rw-r--r-- | net-ftp/pftpfxp/files/0.11.4.6-gcc3.4.fix | 13 | ||||
-rw-r--r-- | net-ftp/pftpfxp/files/1.11-gcc43.patch | 4 | ||||
-rw-r--r-- | net-ftp/pftpfxp/files/pftpfxp-v0.11.4mew6-pret.patch | 93 | ||||
-rw-r--r-- | net-ftp/pftpfxp/pftpfxp-1.12-r1.ebuild (renamed from net-ftp/pftpfxp/pftpfxp-1.12.ebuild) | 38 |
7 files changed, 40 insertions, 351 deletions
diff --git a/net-ftp/pftpfxp/ChangeLog b/net-ftp/pftpfxp/ChangeLog index d754e56050c6..2b60ea037fc6 100644 --- a/net-ftp/pftpfxp/ChangeLog +++ b/net-ftp/pftpfxp/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for net-ftp/pftpfxp # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/pftpfxp/ChangeLog,v 1.16 2012/03/03 19:38:45 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/pftpfxp/ChangeLog,v 1.17 2012/03/16 16:48:38 jer Exp $ + +*pftpfxp-1.12-r1 (16 Mar 2012) + + 16 Mar 2012; Jeroen Roovers <jer@gentoo.org> + -files/0.11.4.6-correct_bookmark_path.patch, + -files/0.11.4.6-correct_config_fix.patch, -files/0.11.4.6-gcc3.4.fix, + -files/pftpfxp-v0.11.4mew6-pret.patch, files/1.11-gcc43.patch, + -pftpfxp-1.12.ebuild, +pftpfxp-1.12-r1.ebuild: + Fix bug #408231. Set RDEPEND. Move preparation stuff to src_prepare(). + Respect LDFLAGS. Remove old patches. Do not automagically compile against + dev-libs/openssl. *pftpfxp-1.12 (03 Mar 2012) 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 deleted file mode 100644 index e63d656cbf83..000000000000 --- a/net-ftp/pftpfxp/files/0.11.4.6-correct_bookmark_path.patch +++ /dev/null @@ -1,136 +0,0 @@ -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/0.11.4.6-correct_config_fix.patch b/net-ftp/pftpfxp/files/0.11.4.6-correct_config_fix.patch deleted file mode 100644 index c5d4b6a589f8..000000000000 --- a/net-ftp/pftpfxp/files/0.11.4.6-correct_config_fix.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- pftpfxp-mew/src/main.cc.orig 2006-07-13 13:04:55.000000000 +1000 -+++ pftpfxp-mew/src/main.cc 2006-07-13 13:07:35.000000000 +1000 -@@ -547,7 +547,7 @@ - if ((*label != '\0') && (strlen(value) > 0)) { - if (!strcasecmp(label, "DEVICE")) { - if (!DetermineOwnIP(value)) { -- printf("unknown network device '%s', sorry.\n", -+ fprintf(stderr,"unknown network device '%s', sorry.\n", - value); - fclose(in_file); - return (FALSE); -@@ -705,7 +705,7 @@ - strcpy(sectionlabels[21], value); - //debuglog("section22: %s", sectionlabels[21]); - } else { -- printf("unknown label '%s' in configfile.\n", label); -+ fprintf(stderr,"unknown label '%s' in configfile.\n", label); - fclose(in_file); - return (FALSE); - } -@@ -1096,9 +1096,26 @@ - } - - int main(int argc, char **argv) { -- char msg[256], config_file[] = {".pftp/config"}, keymap_file[] = {".pftp/keymap"}; -+ char msg[256]; -+ char *home_directory; -+ char *config_file; -+ char *keymap_file; - int n; - -+ home_directory = getenv("HOME"); -+ n = strlen(home_directory) + sizeof("/.pftp/config") + 1; -+ if ((config_file=(char*)malloc(n))==NULL) { -+ fprintf(stderr,"error allocating memory\n"); -+ exit( -1); -+ } -+ if ((keymap_file=(char*)malloc(n))==NULL) { -+ free(config_file); -+ fprintf(stderr,"error allocating memory\n"); -+ exit( -1); -+ } -+ sprintf(config_file, "%s/.pftp/config", home_directory); -+ sprintf(keymap_file, "%s/.pftp/keymap", home_directory); -+ - pthread_mutex_init(&syscall_lock, NULL); - pthread_mutex_init(&sigwinch_lock, NULL); - -@@ -1137,35 +1154,39 @@ - getcwd(startcwd, SERVER_WORKINGDIR_SIZE); - - if (!ReadConfig(config_file)) { -- printf("error reading/parsing configfile '%s', bailing out.\n", config_file); -+ fprintf(stderr,"error reading/parsing configfile '%s', bailing out.\n", config_file); -+ free(config_file); - exit( -1); - } -+ free(config_file); - - unlinklog(); - - if (!ReadKeymap(keymap_file)) { -- printf("error reading/parsing keymapfile '%s', bailing out.\n", keymap_file); -+ fprintf(stderr,"error reading/parsing keymapfile '%s', bailing out.\n", keymap_file); -+ free(keymap_file); - exit( -1); - } -+ free(keymap_file); - debuglog("after keymap"); - - if (display->ProbeBookmarkRC() == 1) { -- printf("unknown or invalid bookmark file found, delete it\n"); -+ fprintf(stderr,"unknown or invalid bookmark file found, delete it\n"); - exit( -1); - } - - if (chdir(localdir) != 0) { -- printf("please specify a valid dir for the LOCALDIR label or comment it out\n"); -+ fprintf(stderr,"please specify a valid dir for the LOCALDIR label or comment it out\n"); - exit ( -1); - } - - if (!use_own_ip) { -- printf("you need to specify a network-device in the configfile.\n"); -+ fprintf(stderr,"you need to specify a network-device in the configfile.\n"); - exit( -1); - } - - if (!use_okay_dir) { -- printf("you need to specify a dir for the .okay and .error files in the configfile.\n"); -+ fprintf(stderr,"you need to specify a dir for the .okay and .error files in the configfile.\n"); - exit( -1); - } - diff --git a/net-ftp/pftpfxp/files/0.11.4.6-gcc3.4.fix b/net-ftp/pftpfxp/files/0.11.4.6-gcc3.4.fix deleted file mode 100644 index e2c68fb07e38..000000000000 --- a/net-ftp/pftpfxp/files/0.11.4.6-gcc3.4.fix +++ /dev/null @@ -1,13 +0,0 @@ ---- src/server.cc.orig 2004-11-26 17:32:26.750551888 +0930 -+++ src/server.cc 2004-11-26 17:41:14.500567672 +0930 -@@ -5357,8 +5357,8 @@ - finished = FALSE; - int f, d; - FILELIST **dir_list, **file_list; -- dir_list = new (FILELIST *)[dir_count]; -- file_list = new (FILELIST *)[file_count]; -+ dir_list = new FILELIST *[dir_count]; -+ file_list = new FILELIST *[file_count]; - - //make arrays for the sorting - fl_temp = this->internal_filelist; diff --git a/net-ftp/pftpfxp/files/1.11-gcc43.patch b/net-ftp/pftpfxp/files/1.11-gcc43.patch index d8a1c88cf419..f856429ab973 100644 --- a/net-ftp/pftpfxp/files/1.11-gcc43.patch +++ b/net-ftp/pftpfxp/files/1.11-gcc43.patch @@ -1,5 +1,5 @@ ---- src/tcp.cc 2003-11-08 23:00:00.000000000 +0000 -+++ src/tcp.cc 2009-03-11 22:26:49.000000000 +0000 +--- a/src/tcp.cc ++++ b/src/tcp.cc @@ -1176,7 +1176,7 @@ this->size = 0; diff --git a/net-ftp/pftpfxp/files/pftpfxp-v0.11.4mew6-pret.patch b/net-ftp/pftpfxp/files/pftpfxp-v0.11.4mew6-pret.patch deleted file mode 100644 index 161b929c55a4..000000000000 --- a/net-ftp/pftpfxp/files/pftpfxp-v0.11.4mew6-pret.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- pftpfxp-mew.orig/src/server.cc Sun Nov 9 20:51:19 2003 -+++ pftpfxp-mew/src/server.cc Wed Jun 9 10:59:21 2004 -@@ -3277,7 +3277,14 @@ - return (FALSE); - } - } else { -- if (!this->tcp.SendData("PASV\r\n")) { -+ sprintf(this->temp_string, "PRET RETR %s\r\n", file); -+ if (!this->tcp.SendData(this->temp_string)) { -+ this->error = E_CONTROL_RESET; -+ this->PostBusy(NULL); -+ return (FALSE); -+ } -+ this->tcp.WaitForMessage(); -+ if (!this->tcp.SendData("PASV\r\n")) { - this->error = E_CONTROL_RESET; - this->PostBusy(NULL); - return (FALSE); -@@ -3687,7 +3694,15 @@ - } - - if (fxpmethod == 0) { -- if (nossl != 1 && dest->nossl != 1 && prefs.use_ssl_fxp && dest->prefs.use_ssl_fxp) { -+ sprintf(this->temp_string, "PRET RETR %s\r\n", file); -+ if (!this->tcp.SendData(this->temp_string)) { -+ this->error = E_CONTROL_RESET; -+ this->PostBusy(NULL); -+ dest->PostBusy(NULL); -+ return (FALSE); -+ } -+ this->tcp.WaitForMessage(); -+ if (nossl != 1 && dest->nossl != 1 && prefs.use_ssl_fxp && dest->prefs.use_ssl_fxp) { - // dest & src support ssl and want ssl_fxp - // send CPSV, extract PORT info and post file, then wait (until DEST sent PORT and then STOR) - if (!this->tcp.SendData("CPSV\r\n")) { -@@ -3909,7 +3924,15 @@ - fxpmeth1: - if (fxpmethod == 1) { - debuglog("normal fxp rejected trying alternative method"); -- if (nossl != 1 && dest->nossl != 1 && prefs.use_ssl_fxp && dest->prefs.use_ssl_fxp) { -+ sprintf(this->temp_string, "PRET STOR %s\r\n", file); -+ if (!dest->tcp.SendData(this->temp_string)) { -+ this->error = E_CONTROL_RESET; -+ this->PostBusy(NULL); -+ dest->PostBusy(NULL); -+ return (FALSE); -+ } -+ dest->tcp.WaitForMessage(); -+ if (nossl != 1 && dest->nossl != 1 && prefs.use_ssl_fxp && dest->prefs.use_ssl_fxp) { - // dest & src support ssl and want ssl_fxp - // send CPSV, extract PORT info and post file, then wait (until DEST sent PORT and then RETR) - if (!dest->tcp.SendData("CPSV\r\n")) { -@@ -3920,8 +3943,15 @@ - return (FALSE); - } - } else { -- // send PASV, extract PORT info and post file, then wait (until DEST sent PORT and then RETR) -- if (!dest->tcp.SendData("PASV\r\n")) { -+ sprintf(this->temp_string, "PRET STOR %s\r\n", file); -+ if (!this->tcp.SendData(this->temp_string)) { -+ this->error = E_CONTROL_RESET; -+ this->PostBusy(NULL); -+ return (FALSE); -+ } -+ this->tcp.WaitForMessage(); -+ // send PASV, extract PORT info and post file, then wait (until DEST sent PORT and then RETR) -+ if (!dest->tcp.SendData("PASV\r\n")) { - this->error = E_CONTROL_RESET; - this->PostBusy(NULL); - dest->PostBusy(NULL); -@@ -4080,7 +4110,7 @@ - } - } - //this->PostStatusFile(file, "RETR_OK", port_msg); // notify dest and GO! -- this->PostBusy("FXP>"); -+ this->PostBusy("FXP>"); - dest->PostBusy("FXP<"); - this->StartTime(); - dest->StartTime(); -@@ -4491,6 +4521,13 @@ - return (FALSE); - } - } else { /* PASV MODE */ -+ if(!this->tcp.SendData("PRET LIST\r\n")) { -+ this->error = E_CONTROL_RESET; -+ this->PostBusy(NULL); -+ return (FALSE); -+ } -+ this->tcp.WaitForMessage(); -+ - if (!this->tcp.SendData("PASV\r\n")) { - this->error = E_CONTROL_RESET; - this->PostBusy(NULL); diff --git a/net-ftp/pftpfxp/pftpfxp-1.12.ebuild b/net-ftp/pftpfxp/pftpfxp-1.12-r1.ebuild index 378e19a9b93a..2edd6f003acd 100644 --- a/net-ftp/pftpfxp/pftpfxp-1.12.ebuild +++ b/net-ftp/pftpfxp/pftpfxp-1.12-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/pftpfxp/pftpfxp-1.12.ebuild,v 1.1 2012/03/03 19:38:45 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/pftpfxp/pftpfxp-1.12-r1.ebuild,v 1.1 2012/03/16 16:48:38 jer Exp $ EAPI=4 inherit eutils toolchain-funcs @@ -17,29 +17,43 @@ KEYWORDS="~amd64 ~ppc ~x86" IUSE="ssl" -DEPEND="app-arch/unzip - ssl? ( >=dev-libs/openssl-0.9.6c )" +RDEPEND="ssl? ( >=dev-libs/openssl-0.9.6c )" +DEPEND=" + app-arch/unzip + ${RDEPEND} +" S=${WORKDIR}/${MY_P} src_prepare() { epatch "$FILESDIR/1.11-gcc43.patch" -} -src_configure() { + # do no strip + # look for the correct library (bug #408231) + sed -i configure \ + -e 's|[^D]*DO.*||g' \ + -e 's|libssl.a|libssl.so|g' \ + || die + #fix permissions of configure script chmod +x configure - # no stripping - sed -i -e 's/[^D]*DO.*//g' configure - sed -i -e 's/CPP/CXX/g' src/Makefile.in - #note: not a propper autoconf - ./configure || die "configure failed" + + # use CXX not CPP + # respect LDFLAGS + sed -i src/Makefile.in \ + -e 's/CPP/CXX/g' \ + -e 's|$(CXX) -o |$(CXX) $(GENTOO_LDFLAGS) -o |g' \ + || die +} + +src_configure() { + #note: not a proper autoconf + ./configure $(use ssl || echo --nossl) || die "configure failed" sed -i -e 's:$<:$(CPPFLAGS) $<:' -e 's/LINKFLAGS/LDFLAGS/g' src/Makefile } src_compile() { - tc-export CXX - emake + emake GENTOO_LDFLAGS="${LDFLAGS}" CXX=$(tc-getCXX) } src_install() { |