[90608] trunk/dports/sysutils/FDclone

takanori at macports.org takanori at macports.org
Fri Mar 9 13:53:28 PST 2012


Revision: 90608
          http://trac.macports.org/changeset/90608
Author:   takanori at macports.org
Date:     2012-03-09 13:53:27 -0800 (Fri, 09 Mar 2012)
Log Message:
-----------
FDclone:
 - Applied a patch to avoid SEGV in tree.c [FDclone-users:00943]
 - +nojpnmes has been erased. If you want to keep using English message, try +engmes instead.
 - +emacs, +vim, +lv, +less and +jless have been eliminated. You can obtain the equivalent effects by editing .fd2rc file.
 - +autosort feature is enabled by default.
 - Add support for +xz utils.
 - Default encoding has been changed to UTF-8. Some other parameters have also been tuned up.

Modified Paths:
--------------
    trunk/dports/sysutils/FDclone/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/FDclone/files/engmes.diff
    trunk/dports/sysutils/FDclone/files/patch-archive.c.diff
    trunk/dports/sysutils/FDclone/files/patch-custom.c.diff
    trunk/dports/sysutils/FDclone/files/patch-fd.h.diff
    trunk/dports/sysutils/FDclone/files/patch-file.c.diff
    trunk/dports/sysutils/FDclone/files/patch-tree.c.diff

Modified: trunk/dports/sysutils/FDclone/Portfile
===================================================================
--- trunk/dports/sysutils/FDclone/Portfile	2012-03-09 21:40:12 UTC (rev 90607)
+++ trunk/dports/sysutils/FDclone/Portfile	2012-03-09 21:53:27 UTC (rev 90608)
@@ -4,6 +4,7 @@
 
 name            FDclone
 version         3.00j
+revision        1
 categories      sysutils shells
 maintainers     takanori openmaintainer
 description     File & Directory Maintenance Tool
@@ -15,29 +16,17 @@
 master_sites    http://hp.vector.co.jp/authors/VA012337/soft/fd/ \
                 ftp://ftp.unixusers.net/src/fdclone/
 distname        FD-${version}
-patchfiles      patch-Makefile.in.diff
+patchfiles      patch-Makefile.in.diff \
+                patch-custom.c.diff \
+                patch-fd.h.diff \
+                patch-file.c.diff \
+                patch-tree.c.diff
 checksums       rmd160 b976c68e6facc01bf331959be4b831206c05fef7
 
 depends_lib     port:ncurses
 
-set editor      ""
-set pager       ""
+use_configure   no
 
-configure {
-    if {[variant_isset nojpnmes]} {
-        system "echo \"#define _NOJPNMES\" >> ${worksrcpath}/config.hin"
-    }
-
-    if {${editor} != ""} { reinplace "s|\"vi\"|\"${editor}\"|g" ${worksrcpath}/fd.h }
-    if {${pager} != ""} { reinplace "s|\"more%K\"|\"${pager}\"|g" ${worksrcpath}/fd.h }
-
-    if {[variant_isset autosort]} {
-        reinplace "s|SORTTYPE\t\t0|SORTTYPE\t\t1|" ${worksrcpath}/fd.h
-        reinplace "s|DISPLAYMODE\t\t0|DISPLAYMODE\t\t3|" ${worksrcpath}/fd.h
-        reinplace "s|SORTTREE\t\t0|SORTTREE\t\t1|" ${worksrcpath}/fd.h
-    }
-}
-
 use_parallel_build  yes
 build.args      CONFDIR=${prefix}/etc PREFIX=${prefix} CFLAGS="${configure.cflags}" CPPFLAGS="${configure.cppflags} -I${prefix}/include/ncurses" LDFLAGS="${configure.ldflags} -lncurses"
 
@@ -50,17 +39,23 @@
     xinstall -m 644 ${worksrcpath}/_fdrc ${destroot}${prefix}/etc/fd2rc.dist
 }
 
+default_variants +xz
+
+variant xz description {Experimental support for XZ Utils} {
+    patchfiles-append   patch-archive.c.diff
+    depends_run-append  path:bin/xz:xz
+}
+
+variant engmes description {Print messages in English} {
+    patchfiles-append   engmes.diff
+}
+
 variant universal {
     build.args  CONFDIR=${prefix}/etc PREFIX=${prefix} CFLAGS="${configure.cflags} ${configure.universal_cflags}" CPPFLAGS="${configure.cppflags} -I${prefix}/include/ncurses" LDFLAGS="${configure.ldflags} ${configure.universal_ldflags} -lncurses"
 }
-variant nojpnmes description {Do not show Japanese message} {}
-variant emacs conflicts vim description {Use emacs as default editor} {set editor emacs}
-variant vim conflicts emacs description {Use vim as default editor} {set editor vim}
-variant lv conflicts less jless description {Use lv as default pager} {set pager lv}
-variant less conflicts lv jless description {Use less as default pager} {set pager less}
-variant jless conflicts lv less description {Use jless as default pager} {set pager jless}
-variant autosort description {Sort files alphabetically automatically} {}
 
+variant nojpnmes requires engmes description {Legacy compatibility variant} {}
+
 livecheck.type  regex
 livecheck.url   ${homepage}
 livecheck.regex FD-(\[0-9.a-z\]+)\\.tar

Added: trunk/dports/sysutils/FDclone/files/engmes.diff
===================================================================
--- trunk/dports/sysutils/FDclone/files/engmes.diff	                        (rev 0)
+++ trunk/dports/sysutils/FDclone/files/engmes.diff	2012-03-09 21:53:27 UTC (rev 90608)
@@ -0,0 +1,11 @@
+--- custom.c~	2012-03-09 23:29:06.000000000 +0900
++++ custom.c	2012-03-09 23:29:40.000000000 +0900
+@@ -528,7 +528,7 @@
+ 	{"FD_URLKCODE", &urlkcode, DEFVAL(NOCNV), URLKC_E, T_KNAM},
+ #endif
+ #if	!defined (_NOENGMES) && !defined (_NOJPNMES)
+-	{"FD_MESSAGELANG", &messagelang, DEFVAL(NOCNV), MESL_E, T_MESLANG},
++	{"FD_MESSAGELANG", &messagelang, DEFVAL("C"), MESL_E, T_MESLANG},
+ #endif
+ #ifdef	DEP_FILECONV
+ 	{"FD_SJISPATH", &sjispath, DEFVAL(SJISPATH), SJSP_E, T_KPATHS},

Added: trunk/dports/sysutils/FDclone/files/patch-archive.c.diff
===================================================================
--- trunk/dports/sysutils/FDclone/files/patch-archive.c.diff	                        (rev 0)
+++ trunk/dports/sysutils/FDclone/files/patch-archive.c.diff	2012-03-09 21:53:27 UTC (rev 90608)
@@ -0,0 +1,40 @@
+--- archive.c.orig	2010-09-25 00:00:00.000000000 +0900
++++ archive.c	2012-03-09 14:05:45.000000000 +0900
+@@ -208,11 +208,15 @@
+ 	{"*.tar.Z",	"zcat %C|tar tvf -",	PM_TAR, 0},
+ 	{"*.tar.gz",	"gzip -cd %C|tar tvf -",	PM_TAR, 0},
+ 	{"*.tar.bz2",	"bzip2 -cd %C|tar tvf -",	PM_TAR, 0},
++	{"*.tar.lzma",	"lzcat %C|tar tvf -",	PM_TAR, 0},
++	{"*.tar.xz",	"xzcat %C|tar tvf -",	PM_TAR, 0},
+ # ifndef	CYGWIN
+ 	{"*.taZ",	"zcat %C|tar tvf -",	PM_TAR, 0},
+ # endif
+ 	{"*.taz",	"gzip -cd %C|tar tvf -",	PM_TAR, 0},
+ 	{"*.tgz",	"gzip -cd %C|tar tvf -",	PM_TAR, 0},
++	{"*.tlz",	"lzcat %C|tar tvf -",	PM_TAR, 0},
++	{"*.txz",	"xzcat %C|tar tvf -",	PM_TAR, 0},
+ #endif	/* !MSDOS */
+ 	{NULL,		NULL,			PM_NULL, 0}
+ };
+@@ -248,6 +252,10 @@
+ 					"gzip -cd %C|tar xf - %TA", 0},
+ 	{"*.tar.bz2",	"tar cf - %T|bzip2 -c > %C",
+ 					"bzip2 -cd %C|tar xf - %TA", 0},
++	{"*.tar.lzma",	"tar cf - %T|lzma -c > %C",
++					"lzcat %C|tar xf - %TA", 0},
++	{"*.tar.xz",	"tar cf - %T|xz -c > %C",
++					"xzcat %C|tar xf - %TA", 0},
+ # ifndef	CYGWIN
+ 	{"*.taZ",	"tar cf - %T|compress -c > %C",
+ 					"zcat %C|tar xf - %TA", 0},
+@@ -256,6 +264,10 @@
+ 					"gzip -cd %C|tar xf - %TA", 0},
+ 	{"*.tgz",	"tar cf - %T|gzip -c > %C",
+ 					"gzip -cd %C|tar xf - %TA", 0},
++	{"*.tlz",	"tar cf - %T|lzma -c > %C",
++					"lzcat %C|tar xf - %TA", 0},
++	{"*.txz",	"tar cf - %T|xz -c > %C",
++					"xzcat %C|tar xf - %TA", 0},
+ #endif	/* !MSDOS */
+ 	{NULL,		NULL,			NULL, 0}
+ };

Added: trunk/dports/sysutils/FDclone/files/patch-custom.c.diff
===================================================================
--- trunk/dports/sysutils/FDclone/files/patch-custom.c.diff	                        (rev 0)
+++ trunk/dports/sysutils/FDclone/files/patch-custom.c.diff	2012-03-09 21:53:27 UTC (rev 90608)
@@ -0,0 +1,37 @@
+--- custom.c.orig	2010-09-25 00:00:00.000000000 +0900
++++ custom.c	2012-03-09 19:41:46.000000000 +0900
+@@ -509,20 +509,20 @@
+ 		DEFVAL(UNICODEBUFFER), UNBF_E, T_BOOL},
+ #endif
+ #if	defined (DEP_KCONV) || (!defined (_NOENGMES) && !defined (_NOJPNMES))
+-	{"FD_LANGUAGE", &outputkcode, DEFVAL(NOCNV), LANG_E, _B_(T_KOUT)},
++	{"FD_LANGUAGE", &outputkcode, DEFVAL("utf8"), LANG_E, _B_(T_KOUT)},
+ #endif
+ #ifdef	DEP_FILECONV
+-	{"FD_DEFKCODE", &defaultkcode, DEFVAL(NOCNV), DFKC_E, T_KNAM},
++	{"FD_DEFKCODE", &defaultkcode, DEFVAL("utf8"), DFKC_E, T_KNAM},
+ #endif
+ #ifdef	DEP_KCONV
+-	{"FD_INPUTKCODE", &inputkcode, DEFVAL(NOCNV), IPKC_E, _B_(T_KIN)},
++	{"FD_INPUTKCODE", &inputkcode, DEFVAL("utf8"), IPKC_E, _B_(T_KIN)},
+ #endif
+ #if	defined (DEP_KCONV) && defined (DEP_PTY)
+-	{"FD_PTYINKCODE", &ptyinkcode, DEFVAL(NOCNV), PIKC_E, T_KTERM},
+-	{"FD_PTYOUTKCODE", &ptyoutkcode, DEFVAL(NOCNV), POKC_E, T_KTERM},
++	{"FD_PTYINKCODE", &ptyinkcode, DEFVAL("utf8"), PIKC_E, T_KTERM},
++	{"FD_PTYOUTKCODE", &ptyoutkcode, DEFVAL("utf8"), POKC_E, T_KTERM},
+ #endif
+ #ifdef	DEP_FILECONV
+-	{"FD_FNAMEKCODE", &fnamekcode, DEFVAL(NOCNV), FNKC_E, T_KNAM},
++	{"FD_FNAMEKCODE", &fnamekcode, DEFVAL("utf8-mac"), FNKC_E, T_KNAM},
+ #endif
+ #if	defined (DEP_FILECONV) && defined (DEP_URLPATH)
+ 	{"FD_URLKCODE", &urlkcode, DEFVAL(NOCNV), URLKC_E, T_KNAM},
+@@ -822,6 +822,7 @@
+ 		case T_KOUT:
+ 		case T_KNAM:
+ 		case T_KTERM:
++			if (!cp) cp = def_str(no);
+ 			n = (1 << (env_type(no) - T_KIN));
+ 			*((int *)(envlist[no].var)) = getlang(cp, n);
+ 			break;

Added: trunk/dports/sysutils/FDclone/files/patch-fd.h.diff
===================================================================
--- trunk/dports/sysutils/FDclone/files/patch-fd.h.diff	                        (rev 0)
+++ trunk/dports/sysutils/FDclone/files/patch-fd.h.diff	2012-03-09 21:53:27 UTC (rev 90608)
@@ -0,0 +1,40 @@
+--- fd.h.orig	2010-09-25 00:00:00.000000000 +0900
++++ fd.h	2012-03-09 18:33:23.000000000 +0900
+@@ -106,15 +106,15 @@
+  *	variables nor run_com file nor command line option	*
+  ****************************************************************/
+ #define	BASICCUSTOM		0
+-#define	SORTTYPE		0
+-#define	DISPLAYMODE		0
+-#define	SORTTREE		0
++#define	SORTTYPE		1
++#define	DISPLAYMODE		3
++#define	SORTTREE		1
+ #define	WRITEFS			0
+ #define	IGNORECASE		0
+ #define	INHERITCOPY		0
+ #define	PROGRESSBAR		0
+ #define	PRECOPYMENU		0
+-#define	ADJTTY			0
++#define	ADJTTY			1
+ #define	USEGETCURSOR		0
+ #define	DEFCOLUMNS		2
+ #define	MINFILENAME		12
+@@ -150,7 +150,7 @@
+ #else
+ #define	TMPDIR			"/tmp"
+ #endif
+-#define	TMPUMASK		022
++#define	TMPUMASK		077
+ #define	RRPATH			""
+ #define	PRECEDEPATH		""
+ #if	FD >= 2
+@@ -179,7 +179,7 @@
+ #define	HTTPPROXY		""
+ #define	HTTPLOGFILE		""
+ #define	HTMLLOGFILE		""
+-#define	UNICODEBUFFER		0
++#define	UNICODEBUFFER		1
+ #define	SJISPATH		""
+ #define	EUCPATH			""
+ #define	JISPATH			""

Added: trunk/dports/sysutils/FDclone/files/patch-file.c.diff
===================================================================
--- trunk/dports/sysutils/FDclone/files/patch-file.c.diff	                        (rev 0)
+++ trunk/dports/sysutils/FDclone/files/patch-file.c.diff	2012-03-09 21:53:27 UTC (rev 90608)
@@ -0,0 +1,11 @@
+--- file.c.orig	2010-09-25 00:00:00.000000000 +0900
++++ file.c	2012-03-10 02:21:02.000000000 +0900
+@@ -612,7 +612,7 @@
+ 	lockbuf_t *lck;
+ 	XFILE *fp;
+ 
+-	if (!(lck = lockopen(path, flags, 0666))) return(NULL);
++	if (!(lck = lockopen(path, flags, 0666 & ~tmpumask))) return(NULL);
+ 
+ 	if (!(lck -> flags & LCK_INVALID)) {
+ 		if (!(fp = Xfdopen(lck -> fd, type))) {

Added: trunk/dports/sysutils/FDclone/files/patch-tree.c.diff
===================================================================
--- trunk/dports/sysutils/FDclone/files/patch-tree.c.diff	                        (rev 0)
+++ trunk/dports/sysutils/FDclone/files/patch-tree.c.diff	2012-03-09 21:53:27 UTC (rev 90608)
@@ -0,0 +1,74 @@
+--- tree.c.diff	2010-09-25 00:00:00.000000000 +0900
++++ tree.c	2012-03-09 18:23:25.000000000 +0900
+@@ -36,6 +36,7 @@
+ static int NEAR treeup __P_((VOID_A));
+ static int NEAR treedown __P_((VOID_A));
+ static int NEAR freetree __P_((treelist *, int));
++static int NEAR bottomtree __P_((VOID_A));
+ static VOID NEAR _tree_search __P_((VOID_A));
+ static int NEAR _tree_input __P_((VOID_A));
+ static char *NEAR _tree __P_((VOID_A));
+@@ -556,6 +557,24 @@
+ 	return(n);
+ }
+ 
++static int NEAR bottomtree(VOID_A)
++{
++	int min, oy, otop;
++
++	min = filetop(win);
++	oy = tr_line;
++	otop = tr_top;
++	while (tr_line < min + FILEPERROW - 2) if (treedown() < 0) break;
++	if (tr_line >= tr_bottom - 1 && tr_top >= min + 1) {
++		tr_line = oy;
++		tr_top = otop;
++		searchtree();
++		return(-1);
++	}
++
++	return(0);
++}
++
+ static VOID NEAR _tree_search(VOID_A)
+ {
+ 	int oy, otop;
+@@ -595,23 +614,20 @@
+ 			treedown();
+ 			break;
+ 		case K_PPAGE:
++			if (bottomtree() < 0) break;
+ 			half = (FILEPERROW - 1) / 2;
+-			tmp = min + half + 1 - tr_line;
++			tmp = min + half + 1;
+ 			if (tr_top + half > min + 1) half = min - tr_top + 1;
+ 			if (half > 0) tr_top += half;
+-			for (;tmp > 0; tmp--) if (treedown() < 0) break;
+-			tr_line += tmp;
++			tr_line = tmp;
+ 			searchtree();
+ 			break;
+ 		case K_NPAGE:
++			if (bottomtree() < 0) break;
+ 			half = (FILEPERROW - 1) / 2;
+-			tmp = half + (min + half + 1) - tr_line;
+-			while (tmp-- > 0) if (treedown() < 0) break;
+-			tmp = tr_line - (min + half + 1);
+-			tr_line = min + half + 1;
+-			if (tr_bottom - tmp < min + FILEPERROW - 1)
+-				tmp = tr_bottom - min + FILEPERROW + 1;
+-			tr_top -= tmp;
++			tmp = min + half + 1;
++			while (half-- > 0) if (treedown() < 0) break;
++			tr_line = tmp;
+ 			searchtree();
+ 			break;
+ 		case K_BEG:
+@@ -676,6 +692,7 @@
+ 		case K_BS:
+ 			do {
+ 				if (treeup() < 0) break;
++				if (!tr_cur || !(tr_cur -> sub)) break;
+ 			} while (&(tr_cur -> sub[tr_no]) != old);
+ 			break;
+ 		case 'l':
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120309/ab8eaeeb/attachment-0001.html>


More information about the macports-changes mailing list