Sun Jan 2 14:46:39 2011 UTC ()
Fixes build on DragonFly-2.8.2.


(obache)
diff -r1.4 -r1.5 pkgsrc/misc/colorls/distinfo
diff -r1.3 -r1.4 pkgsrc/misc/colorls/patches/patch-ac

cvs diff -r1.4 -r1.5 pkgsrc/misc/colorls/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/colorls/distinfo 2005/02/24 11:02:51 1.4
+++ pkgsrc/misc/colorls/distinfo 2011/01/02 14:46:38 1.5
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1$NetBSD: distinfo,v 1.4 2005/02/24 11:02:51 agc Exp $ 1$NetBSD: distinfo,v 1.5 2011/01/02 14:46:38 obache Exp $
2 2
3SHA1 (ls.tar.gz) = f0d069e71faade167feaf14c4e6327bcc14d6616 3SHA1 (ls.tar.gz) = f0d069e71faade167feaf14c4e6327bcc14d6616
4RMD160 (ls.tar.gz) = 7b607b7ab953ad0dc603c269fa03648cd54ac04f 4RMD160 (ls.tar.gz) = 7b607b7ab953ad0dc603c269fa03648cd54ac04f
5Size (ls.tar.gz) = 11768 bytes 5Size (ls.tar.gz) = 11768 bytes
6SHA1 (patch-aa) = 831f286605126a136b540b4456916db8cc8ff7e4 6SHA1 (patch-aa) = 831f286605126a136b540b4456916db8cc8ff7e4
7SHA1 (patch-ab) = 8f26c3e16bb85371bbb16c5f77a667b3a456af68 7SHA1 (patch-ab) = 8f26c3e16bb85371bbb16c5f77a667b3a456af68
8SHA1 (patch-ac) = 89f775c18318c4ca8a7dbebc2daba7c52ae0878f 8SHA1 (patch-ac) = 201dfa7f1fd9cdf022f7c4f50af9b14fe1e0cccb
9SHA1 (patch-ad) = d502e96261a950c5307794f01422147430c76aba 9SHA1 (patch-ad) = d502e96261a950c5307794f01422147430c76aba
10SHA1 (patch-ae) = 9b15ef9f8ab3e77b34a0f7ee401fbe8dcae4a854 10SHA1 (patch-ae) = 9b15ef9f8ab3e77b34a0f7ee401fbe8dcae4a854

cvs diff -r1.3 -r1.4 pkgsrc/misc/colorls/patches/patch-ac (expand / switch to unified diff)

--- pkgsrc/misc/colorls/patches/patch-ac 1998/12/28 22:13:05 1.3
+++ pkgsrc/misc/colorls/patches/patch-ac 2011/01/02 14:46:39 1.4
@@ -1,78 +1,100 @@ @@ -1,78 +1,100 @@
1$NetBSD: patch-ac,v 1.3 1998/12/28 22:13:05 marc Exp $ 1$NetBSD: patch-ac,v 1.4 2011/01/02 14:46:39 obache Exp $
2 2
3--- ls.c.orig Sat Dec 21 18:40:58 1996 3--- ls.c.orig 1996-12-21 23:40:58.000000000 +0000
4+++ ls.c Mon Dec 28 17:10:04 1998 4+++ ls.c
5@@ -59,6 +59,8 @@ 5@@ -59,12 +59,18 @@ static char const sccsid[] = "@(#)ls.c 8
6 #include <string.h> 6 #include <string.h>
7 #include <unistd.h> 7 #include <unistd.h>
8 #include <locale.h> 8 #include <locale.h>
9+#include <pwd.h> 9+#include <pwd.h>
10+#include <grp.h> 10+#include <grp.h>
11  11
12 #include "ls.h" 12 #include "ls.h"
13 #include "extern.h" 13 #include "extern.h"
14@@ -94,6 +96,7 @@ 14
 15 static void display __P((FTSENT *, FTSENT *));
 16+#ifdef __DragonFly__
 17+static int mastercmp __P((const FTSENT * const *, const FTSENT * const *));
 18+#else
 19 static int mastercmp __P((const FTSENT **, const FTSENT **));
 20+#endif
 21 static void traverse __P((int, char **, int));
 22
 23 static void (*printfcn) __P((DISPLAY *));
 24@@ -94,6 +100,7 @@ int f_statustime; /* use time of last m
15 int f_dirname; /* if precede with directory name */ 25 int f_dirname; /* if precede with directory name */
16 int f_timesort; /* sort by time vice name */ 26 int f_timesort; /* sort by time vice name */
17 int f_type; /* add type character for non-regular files */ 27 int f_type; /* add type character for non-regular files */
18+int f_color; /* add type in color for non-regular files */ 28+int f_color; /* add type in color for non-regular files */
19 #ifndef BSD4_4_LITE 29 #ifndef BSD4_4_LITE
20 int f_whiteout; /* show whiteout entries */ 30 int f_whiteout; /* show whiteout entries */
21 #endif 31 #endif
22@@ -135,9 +138,9 @@ 32@@ -135,9 +142,9 @@ main(argc, argv)
23  33
24 fts_options = FTS_PHYSICAL; 34 fts_options = FTS_PHYSICAL;
25 #ifdef BSD4_4_LITE 35 #ifdef BSD4_4_LITE
26- while ((ch = getopt(argc, argv, "1ACFLRTacdfgikloqrstu")) != EOF) { 36- while ((ch = getopt(argc, argv, "1ACFLRTacdfgikloqrstu")) != EOF) {
27+ while ((ch = getopt(argc, argv, "1ACFGLRTacdfgikloqrstu")) != EOF) { 37+ while ((ch = getopt(argc, argv, "1ACFGLRTacdfgikloqrstu")) != EOF) {
28 #else 38 #else
29- while ((ch = getopt(argc, argv, "1ACFLRTWacdfgikloqrstu")) != EOF) { 39- while ((ch = getopt(argc, argv, "1ACFLRTWacdfgikloqrstu")) != EOF) {
30+ while ((ch = getopt(argc, argv, "1ACFGLRTWacdfgikloqrstu")) != EOF) { 40+ while ((ch = getopt(argc, argv, "1ACFGLRTWacdfgikloqrstu")) != EOF) {
31 #endif 41 #endif
32 switch (ch) { 42 switch (ch) {
33 /* 43 /*
34@@ -168,6 +171,10 @@ 44@@ -168,6 +175,10 @@ main(argc, argv)
35 case 'F': 45 case 'F':
36 f_type = 1; 46 f_type = 1;
37 break; 47 break;
38+ case 'G': 48+ case 'G':
39+ if (isatty(STDOUT_FILENO)) 49+ if (isatty(STDOUT_FILENO))
40+ f_color = 1; 50+ f_color = 1;
41+ break; 51+ break;
42 case 'L': 52 case 'L':
43 fts_options &= ~FTS_PHYSICAL; 53 fts_options &= ~FTS_PHYSICAL;
44 fts_options |= FTS_LOGICAL; 54 fts_options |= FTS_LOGICAL;
45@@ -228,18 +235,21 @@ 55@@ -228,18 +239,21 @@ main(argc, argv)
46 argc -= optind; 56 argc -= optind;
47 argv += optind; 57 argv += optind;
48  58
49+ parsecolors(getenv("LSCOLORS")); 59+ parsecolors(getenv("LSCOLORS"));
50+ 60+
51 /* 61 /*
52 * If not -F, -i, -l, -s or -t options, don't require stat 62 * If not -F, -i, -l, -s or -t options, don't require stat
53 * information. 63 * information.
54 */ 64 */
55- if (!f_inode && !f_longform && !f_size && !f_timesort && !f_type) 65- if (!f_inode && !f_longform && !f_size && !f_timesort && !f_type)
56+ if (!f_inode && !f_longform && !f_size && !f_timesort && !f_type 66+ if (!f_inode && !f_longform && !f_size && !f_timesort && !f_type
57+ && !f_color) 67+ && !f_color)
58 fts_options |= FTS_NOSTAT; 68 fts_options |= FTS_NOSTAT;
59  69
60 /* 70 /*
61 * If not -F, -d or -l options, follow any symbolic links listed on 71 * If not -F, -d or -l options, follow any symbolic links listed on
62 * the command line. 72 * the command line.
63 */ 73 */
64- if (!f_longform && !f_listdir && !f_type) 74- if (!f_longform && !f_listdir && !f_type)
65+ if (!f_longform && !f_listdir && !f_type && !f_color) 75+ if (!f_longform && !f_listdir && !f_type && !f_color)
66 fts_options |= FTS_COMFOLLOW; 76 fts_options |= FTS_COMFOLLOW;
67  77
68 #ifndef BSD4_4_LITE 78 #ifndef BSD4_4_LITE
69@@ -384,7 +394,8 @@ 79@@ -384,7 +398,8 @@ display(p, list)
70 u_long btotal, maxblock, maxinode, maxlen, maxnlink; 80 u_long btotal, maxblock, maxinode, maxlen, maxnlink;
71 int bcfile, flen, glen, ulen, maxflags, maxgroup, maxuser; 81 int bcfile, flen, glen, ulen, maxflags, maxgroup, maxuser;
72 int entries, needstats; 82 int entries, needstats;
73- char *user, *group, *flags, buf[20]; /* 32 bits == 10 digits */ 83- char *user, *group, *flags, buf[20]; /* 32 bits == 10 digits */
74+ const char *user, *group; 84+ const char *user, *group;
75+ char *flags, buf[20]; /* 32 bits == 10 digits */ 85+ char *flags, buf[20]; /* 32 bits == 10 digits */
76  86
77 /* 87 /*
78 * If list is NULL there are two possibilities: that the parent 88 * If list is NULL there are two possibilities: that the parent
 89@@ -521,7 +536,11 @@ display(p, list)
 90 */
 91 static int
 92 mastercmp(a, b)
 93+#ifdef __DragonFly__
 94+ const FTSENT * const *a, * const *b;
 95+#else
 96 const FTSENT **a, **b;
 97+#endif
 98 {
 99 int a_info, b_info;
 100