summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/man
diff options
context:
space:
mode:
authorXiaofeng Yan <xiaofeng.yan@windriver.com>2010-09-02 16:39:48 +0800
committerSaul Wold <Saul.Wold@intel.com>2010-09-08 16:36:53 -0700
commit3f71edc3ef4672ea2bbe3d2f604ada121b3870ab (patch)
treeee8ed865b71f8c85b87e3ef7aa404b25cfcb6aef /meta/recipes-extended/man
parente3f492603ef0bfef8e993157e9d9cb661ac9851a (diff)
downloadpoky-3f71edc3ef4672ea2bbe3d2f604ada121b3870ab.tar.gz
man: Add new man package
A set of documentation tools: man, apropos and whatis Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Diffstat (limited to 'meta/recipes-extended/man')
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5g-nonrootbuild.patch12
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5h1-gencat.patch10
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5h1-make.patch13
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5i2-initial.patch15
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5i2-newline.patch11
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5i2-overflow.patch12
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5j-i18n.patch12
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5j-nocache.patch12
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5j-utf8.patch57
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5k-confpath.patch11
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5k-nonascii.patch14
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5k-sofix.patch20
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5m2-bug11621.patch11
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5m2-buildroot.patch48
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5m2-multiple.patch18
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5m2-no-color-for-printing.patch11
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5m2-sigpipe.patch26
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.5m2-tv_fhs.patch27
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-i18n_whatis.patch141
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-lzma+xz-support.patch142
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-mandirs.patch27
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-new_sections.patch11
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-ro_usr.patch67
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-security.patch58
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-use_i18n_vars_in_a_std_way.patch156
-rw-r--r--meta/recipes-extended/man/man-1.6e/man-1.6e-whatis2.patch37
-rw-r--r--meta/recipes-extended/man/man-1.6e/man.1.gzbin0 -> 12323 bytes
-rw-r--r--meta/recipes-extended/man/man-1.6e/man.7.gzbin0 -> 6192 bytes
-rw-r--r--meta/recipes-extended/man/man-1.6e/manpath.5.gzbin0 -> 2133 bytes
-rw-r--r--meta/recipes-extended/man/man_1.6e.bb61
30 files changed, 1040 insertions, 0 deletions
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5g-nonrootbuild.patch b/meta/recipes-extended/man/man-1.6e/man-1.5g-nonrootbuild.patch
new file mode 100644
index 0000000000..ae2bc4d17f
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5g-nonrootbuild.patch
@@ -0,0 +1,12 @@
1diff -u -r man-1.5g.old/configure man-1.5g/configure
2--- man-1.5g.old/configure Wed Apr 7 04:16:05 1999
3+++ man-1.5g/configure Mon May 15 15:22:44 2000
4@@ -791,7 +791,7 @@
5 read mode
6 if test "$mode" != ""; then man_mode=$mode; fi
7 fi
8- man_install_flags="-m $man_mode -o $man_user -g $man_group"
9+ man_install_flags=""
10 fi
11
12 # What sections do we anticipate?
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5h1-gencat.patch b/meta/recipes-extended/man/man-1.6e/man-1.5h1-gencat.patch
new file mode 100644
index 0000000000..6409dfce55
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5h1-gencat.patch
@@ -0,0 +1,10 @@
1--- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200
2+++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100
3@@ -47,6 +47,7 @@ up-to-date. Many thanks.
4 01/14/91 4 nazgul Off by one on number specified entries
5 */
6
7+#undef _GNU_SOURCE
8 #include <stdio.h>
9 #include <stdlib.h>
10 #ifdef SYSV
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5h1-make.patch b/meta/recipes-extended/man/man-1.6e/man-1.5h1-make.patch
new file mode 100644
index 0000000000..f9f91e4d0e
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5h1-make.patch
@@ -0,0 +1,13 @@
1--- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999
2+++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999
3@@ -1,8 +1,8 @@
4 # only executed from a subdir
5 MAN1 = man whatis apropos
6-MAN5 = man.conf
7+MAN5 = man.config
8 MAN8 = makewhatis
9-ALL = man.1 whatis.1 apropos.1 man.conf.5
10+ALL = man.1 whatis.1 apropos.1 man.config.5
11 MAYBE8 = makewhatis
12
13 .SUFFIXES: .man .1 .5 .8
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5i2-initial.patch b/meta/recipes-extended/man/man-1.6e/man-1.5i2-initial.patch
new file mode 100644
index 0000000000..1b1442385e
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5i2-initial.patch
@@ -0,0 +1,15 @@
1--- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001
2+++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001
3@@ -81,8 +81,10 @@
4 continue;;
5 -s) setsections=1
6 continue;;
7- -u) findarg="-newer /var/cache/man/whatis"
8- update=1
9+ -u) if [ -e /var/cache/man/whatis ]; then
10+ findarg="-newer /var/cache/man/whatis"
11+ update=1
12+ fi
13 continue;;
14 -v) verbose=1
15 continue;;
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5i2-newline.patch b/meta/recipes-extended/man/man-1.6e/man-1.5i2-newline.patch
new file mode 100644
index 0000000000..da95d5ad18
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5i2-newline.patch
@@ -0,0 +1,11 @@
1--- src/man.c 2008-12-21 19:17:31.000000000 +0100
2+++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100
3@@ -391,7 +391,7 @@ again:
4 beg++;
5
6 end = beg;
7- while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
8+ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE)
9 end++; /* note that buf is NUL-terminated */
10 *end = '\0';
11
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5i2-overflow.patch b/meta/recipes-extended/man/man-1.6e/man-1.5i2-overflow.patch
new file mode 100644
index 0000000000..f1ef06bab0
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5i2-overflow.patch
@@ -0,0 +1,12 @@
1--- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001
2+++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001
3@@ -381,6 +381,9 @@
4 strcat(name, "/");
5 strcat(name, beg);
6 }
7+ /* If this is too long, bad things have already happened. *
8+ * we should quit IMMEDIATELY. */
9+ if(strlen(name)>sizeof(ultname)) _exit(1);
10
11 goto again;
12 }
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5j-i18n.patch b/meta/recipes-extended/man/man-1.6e/man-1.5j-i18n.patch
new file mode 100644
index 0000000000..7645542e16
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5j-i18n.patch
@@ -0,0 +1,12 @@
1--- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001
2+++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001
3@@ -27,8 +27,7 @@
4 for j in $M; do
5 if [ -f $j ]; then
6 i=`echo $j | sed -e 's/mess.//; s/.cat//'`
7- dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
8- dest=${PREFIX}$dest
9+ dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
10 echo "mkdir -p `dirname $dest`"
11 mkdir -p `dirname $dest`;
12 echo "install -c -m 644 $j $dest"
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5j-nocache.patch b/meta/recipes-extended/man/man-1.6e/man-1.5j-nocache.patch
new file mode 100644
index 0000000000..267b34b93a
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5j-nocache.patch
@@ -0,0 +1,12 @@
1--- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001
2+++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001
3@@ -81,6 +81,9 @@
4 #
5 #NOCACHE
6 #
7+# NOCACHE keeps man from creating cache pages
8+NOCACHE
9+#
10 # Useful paths - note that COL should not be defined when
11 # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
12 # not only is it superfluous, but it actually damages the output.
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5j-utf8.patch b/meta/recipes-extended/man/man-1.6e/man-1.5j-utf8.patch
new file mode 100644
index 0000000000..c817763676
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5j-utf8.patch
@@ -0,0 +1,57 @@
1--- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001
2+++ man-1.5j/configure Thu Nov 22 15:03:15 2001
3@@ -408,9 +408,9 @@
4 Fgawk=/bin/gawk
5 Fawk=/bin/gawk
6 Fmawk=missing
7- troff=""
8- nroff=""
9- jnroff=""
10+ troff=/usr/bin/troff
11+ nroff=/usr/bin/nroff
12+ jnroff=/usr/bin/nroff
13 eqn=""
14 neqn=""
15 jneqn=""
16@@ -453,6 +453,8 @@
17 done
18 done
19 Fgroff=/usr/bin/groff
20+ Fnroff=/usr/bin/nroff
21+ Fjnroff=/usr/bin/nroff
22 Fgeqn=/usr/bin/geqn
23 Fgtbl=/usr/bin/gtbl
24 Fcol=/usr/bin/col
25@@ -485,25 +487,25 @@
26 then
27 if test $Fnroff = "missing"
28 then
29- nroff="nroff -Tlatin1 -mandoc"
30+ nroff="nroff -Tutf8 -mandoc"
31 else
32- nroff="$Fnroff -Tlatin1 -mandoc"
33+ nroff="$Fnroff -Tutf8 -mandoc"
34 fi
35 troff="troff -mandoc"
36 echo "Warning: could not find groff"
37 else
38 if test $Fnroff = "missing"
39 then
40- nroff="$Fgroff -Tlatin1 -mandoc"
41+ nroff="$Fgroff -Tutf8 -mandoc"
42 else
43- nroff="$Fnroff -Tlatin1 -mandoc"
44+ nroff="$Fnroff -Tutf8 -mandoc"
45 fi
46 troff="$Fgroff -Tps -mandoc"
47- jnroff="$Fgroff -Tnippon -mandocj"
48+ jnroff="$Fjnroff -Tutf8 -mandocj"
49 fi
50 eqn="$Fgeqn -Tps"
51- neqn="$Fgeqn -Tlatin1"
52- jneqn="$Fgeqn -Tnippon"
53+ neqn="$Fgeqn -Tutf8"
54+ jneqn="$Fgeqn -Tutf8"
55 tbl="$Fgtbl"
56 col="$Fcol"
57 vgrind="$Fvgrind"
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5k-confpath.patch b/meta/recipes-extended/man/man-1.6e/man-1.5k-confpath.patch
new file mode 100644
index 0000000000..71ac9fcfc9
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5k-confpath.patch
@@ -0,0 +1,11 @@
1--- configure 2006-05-01 19:56:14.000000000 +0200
2+++ configure.oden 2008-12-21 19:16:50.000000000 +0100
3@@ -198,7 +198,7 @@
4 confdir="${confprefix}/share/misc"
5 fi
6 fi
7-conffilename="man.conf"
8+conffilename="man.config"
9
10 if test "$RANDOM" = "$RANDOM"; then
11 # Plain old Bourne shell.
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5k-nonascii.patch b/meta/recipes-extended/man/man-1.6e/man-1.5k-nonascii.patch
new file mode 100644
index 0000000000..465d839ea0
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5k-nonascii.patch
@@ -0,0 +1,14 @@
1--- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100
2+++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200
3@@ -18,9 +18,9 @@
4
5 # When man pages in your favorite locale look to grep like binary files
6 # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
7-aproposgrepopt1='i'
8+aproposgrepopt1='ia'
9 aproposgrepopt2=''
10-whatisgrepopt1='iw'
11+whatisgrepopt1='iwa'
12 whatisgrepopt2='^'
13 grepopt1=$%apropos_or_whatis%grepopt1
14 grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5k-sofix.patch b/meta/recipes-extended/man/man-1.6e/man-1.5k-sofix.patch
new file mode 100644
index 0000000000..d4522ea974
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5k-sofix.patch
@@ -0,0 +1,20 @@
1--- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001
2+++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001
3@@ -300,7 +300,7 @@
4
5 if (strlen(name0) >= sizeof(ultname))
6 return name0;
7- strcpy(ultname, name0);
8+ strncpy(ultname, name0, BUFSIZE-32);
9 name = ultname;
10
11 again:
12@@ -332,7 +332,7 @@
13 * .so files - we could glob for all possible extensions,
14 * for now: only try .gz
15 */
16- else if (fp == NULL && get_expander(".gz") &&
17+ if (fp == NULL && get_expander(".gz") &&
18 strlen(name)+strlen(".gz") < BUFSIZE) {
19 strcat(name, ".gz");
20 fp = fopen (name, "r");
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5m2-bug11621.patch b/meta/recipes-extended/man/man-1.6e/man-1.5m2-bug11621.patch
new file mode 100644
index 0000000000..9c06c4c104
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5m2-bug11621.patch
@@ -0,0 +1,11 @@
1--- ./configure.ad 2003-12-11 19:17:10.000000000 +0100
2+++ ./configure 2003-12-11 19:17:27.000000000 +0100
3@@ -26,7 +26,7 @@
4 # (Indeed, -r may cause the terminal to get into funny states.
5 # Very inconvenient. For viewing pages in strange locales, set LC_*.)
6 #
7-DEFAULTLESSOPT="-is"
8+DEFAULTLESSOPT="-isr"
9 #
10 # Note that not creating any cat directories (/var/cache/man or so)
11 # and not making man suid or sgid is recommended.
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5m2-buildroot.patch b/meta/recipes-extended/man/man-1.6e/man-1.5m2-buildroot.patch
new file mode 100644
index 0000000000..d84208390a
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5m2-buildroot.patch
@@ -0,0 +1,48 @@
1--- ./configure.less 2003-12-11 19:18:15.000000000 +0100
2+++ ./configure 2003-12-11 19:20:03.000000000 +0100
3@@ -401,18 +401,13 @@
4
5 if test "$ans" = "false"
6 then
7- for i in more less cmp cat awk gawk mawk
8- do
9- eval F$i="missing"
10- for j in $DEFPATH
11- do
12- if test -f $j/$i
13- then
14- eval F$i=$j/$i
15- break
16- fi
17- done
18- done
19+ Fmore=/bin/more
20+ Fless=/usr/bin/less
21+ Fcmp=/usr/bin/cmp
22+ Fcat=/bin/cat
23+ Fgawk=/bin/gawk
24+ Fawk=/bin/gawk
25+ Fmawk=missing
26 troff=""
27 nroff=""
28 jnroff=""
29@@ -457,6 +452,19 @@
30 fi
31 done
32 done
33+ Fgroff=/usr/bin/groff
34+ Fgeqn=/usr/bin/geqn
35+ Fgtbl=/usr/bin/gtbl
36+ Fcol=/usr/bin/col
37+ Fgrefer=/usr/bin/grefer
38+ Fgpic=/usr/bin/gpic
39+ Fmore=/bin/more
40+ Fless=/usr/bin/less
41+ Fcmp=/usr/bin/cmp
42+ Fcat=/bin/cat
43+ Fgawk=/bin/gawk
44+
45+
46 for i in eqn tbl refer pic
47 do
48 if test `eval echo \\$Fg$i` = "missing"
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5m2-multiple.patch b/meta/recipes-extended/man/man-1.6e/man-1.5m2-multiple.patch
new file mode 100644
index 0000000000..cc5bffde63
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5m2-multiple.patch
@@ -0,0 +1,18 @@
1--- man-1.5m2/src/manfile.c_multiple 2006-12-08 23:42:17.000000000 +0100
2+++ man-1.5m2/src/manfile.c 2006-12-09 00:00:01.000000000 +0100
3@@ -25,9 +25,12 @@
4
5 if (a) {
6 if (*head) {
7- p = *head;
8- while(p->next)
9- p = p->next;
10+ for (p = *head; p->next; p = p->next) {
11+ if(!strcmp (p->filename, a->filename))
12+ return;
13+ }
14+ if(!strcmp (p->filename, a->filename))
15+ return;
16 p->next = a;
17 } else
18 *head = a;
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5m2-no-color-for-printing.patch b/meta/recipes-extended/man/man-1.6e/man-1.5m2-no-color-for-printing.patch
new file mode 100644
index 0000000000..d1f810a442
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5m2-no-color-for-printing.patch
@@ -0,0 +1,11 @@
1--- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200
2+++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200
3@@ -539,6 +539,8 @@
4 troff="$troff -c"
5 nroff="$nroff -c"
6 jnroff="$jnroff -c"
7+else
8+ troff="$troff -c"
9 fi
10
11 if [ x$default = x ]; then
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5m2-sigpipe.patch b/meta/recipes-extended/man/man-1.6e/man-1.5m2-sigpipe.patch
new file mode 100644
index 0000000000..81fb2d702a
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5m2-sigpipe.patch
@@ -0,0 +1,26 @@
1--- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100
2+++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100
3@@ -116,11 +116,14 @@
4 static int
5 system1 (const char *command) {
6 void (*prev_handler)(int) = signal (SIGINT,catch_int);
7+ signal (SIGPIPE,SIG_IGN);
8 int ret = system(command);
9
10 /* child terminated with signal? */
11 if (WIFSIGNALED(ret) &&
12- (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
13+ (WTERMSIG(ret) == SIGINT ||
14+ WTERMSIG(ret) == SIGPIPE ||
15+ WTERMSIG(ret) == SIGQUIT))
16 exit(1);
17
18 /* or we caught an interrupt? */
19@@ -128,6 +131,7 @@
20 exit(1);
21
22 signal(SIGINT,prev_handler);
23+ signal(SIGPIPE,SIG_DFL);
24 return ret;
25 }
26
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.5m2-tv_fhs.patch b/meta/recipes-extended/man/man-1.6e/man-1.5m2-tv_fhs.patch
new file mode 100644
index 0000000000..20389d9c08
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.5m2-tv_fhs.patch
@@ -0,0 +1,27 @@
1--- man/Makefile.in 2008-12-21 19:19:33.000000000 +0100
2+++ man/Makefile.in.oden 2008-12-21 19:19:39.000000000 +0100
3@@ -34,6 +34,15 @@
4 for i in $(MAN8); \
5 do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done
6
7+install-l10n: $(ALL)
8+ mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8
9+ for i in $(MAN1); \
10+ do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done
11+ for i in $(MAN5); \
12+ do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done
13+ for i in $(MAN8); \
14+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done
15+
16 clean:
17 rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
18
19@@ -49,7 +58,7 @@
20 @for i in @languages@; do if test -d $$i; then echo; \
21 echo "==== Installing the `cat $$i.txt` man pages. ===="; \
22 cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
23- export SLANG; make -f ../Makefile install; cd ..; \
24+ export SLANG; make -f ../Makefile install-l10n; cd ..; \
25 else echo "==== No $$i man pages found. ===="; fi; done
26
27 cleansubdirs:
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-i18n_whatis.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-i18n_whatis.patch
new file mode 100644
index 0000000000..ad62a6016f
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-i18n_whatis.patch
@@ -0,0 +1,141 @@
1diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh
2--- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300
3+++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300
4@@ -60,16 +60,56 @@
5 esac
6 done
7
8+# list of languages to look for
9+LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
10+DIR_LIST=""
11+for d in /var/cache/man $manpath /usr/lib
12+do
13+ for l in $LANG_LIST
14+ do
15+ if [ -d $d/$l ]
16+ then
17+ # check that the path is not already in the list
18+ if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
19+ then
20+ DIR_LIST="$DIR_LIST $d/$l"
21+ fi
22+ fi
23+ done
24+ DIR_LIST="$DIR_LIST $d"
25+ # check that the path is not already in the list
26+ if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
27+ then
28+ DIR_LIST="$DIR_LIST $d/$l"
29+ fi
30+done
31+
32 while [ "$1" != "" ]
33 do
34 found=0
35- for d in /var/cache/man $manpath /usr/lib
36+ # in order not to display lines in more than one language for
37+ # a same man page; we check that a given man page name
38+ # hasn't already been displayed
39+ BAZ=""
40+ for d in $DIR_LIST
41 do
42 if [ -f $d/whatis ]
43 then
44- if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
45+ if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
46 then
47- found=1
48+ # the LC_ALL=C is needed in case the text is
49+ # in a different encoding than the locale
50+ BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
51+ for i in $BAR
52+ do
53+ if ! echo "$BAZ" | grep "$i" > /dev/null
54+ then
55+ BAZ="$BAZ $i"
56+ i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
57+ echo -e "$FOO" | grep "$i"
58+ found=1
59+ fi
60+ done
61 # Some people are satisfied with a single occurrence
62 # But it is better to give all
63 # break
64diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
65--- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300
66+++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300
67@@ -41,12 +41,32 @@
68
69 program=`basename $0`
70
71+# this allows to define language specific values fro NAME, DESCRIPTION
72+# if not defined, using those default values
73+if [ -z "$MAN_NAME" ]
74+then
75+ MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟÎΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\
76+NÉV|NOME|åå‰|ì´ë¦„|NAAM|NAZWA|NUME|ИМЯ|MENO|ÐÐЗВÐ|å称|å稱"
77+fi
78+if [ -z "$MAN_DESCRIPTION" ]
79+then
80+ MAN_DESCRIPTION="ОПИСÐÐИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\
81+ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÃRÃS|DESCRIZIONE|\
82+説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|æè¿°"
83+fi
84+# make them into awk regexp
85+MAN_NAME="^(${MAN_NAME})";
86+MAN_DESCRIPTION="^(${MAN_DESCRIPTION})";
87+
88 # In case both /usr/man and /usr/share/man exist, the former is local
89 # and should be first.
90 # It is a bug to add /var/cache/man to DEFCATPATH.
91 dm=
92 for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
93 do
94+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
95+ if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi
96+ fi
97 if [ -d $d ]; then
98 if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
99 fi
100@@ -55,6 +75,9 @@
101 dc=
102 for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
103 do
104+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
105+ if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
106+ fi
107 if [ -d $d ]; then
108 if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
109 fi
110@@ -194,7 +217,7 @@
111 section=$i
112 curdir=$mandir/${pages}$i
113 export section verbose curdir
114- find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
115+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
116
117 function readline() {
118 if (use_zcat || use_bzcat) {
119@@ -261,13 +284,7 @@
120 gsub(/.\b/, "");
121 if (($1 ~ /^\.[Ss][Hh]/ &&
122 ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
123- $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
124- $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
125- $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
126- $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ ||
127- $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ ||
128- $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ ||
129- $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) ||
130+ $2 ~ MAN_NAME )) ||
131 (pages == "cat" && $1 ~ /^NAME/)) {
132 if (!insh) {
133 insh = 1;
134@@ -278,6 +295,7 @@
135 if ($1 ~ /^\.[Ss][HhYS]/ ||
136 (pages == "cat" &&
137 ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
138+ $1 ~ MAN_DESCRIPTION ||
139 $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
140 $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
141 $0 ~ /^[^ ]/))) {
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-lzma+xz-support.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-lzma+xz-support.patch
new file mode 100644
index 0000000000..9aa5260b71
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-lzma+xz-support.patch
@@ -0,0 +1,142 @@
1diff -Naurp man-1.6e/configure man-1.6e.oden/configure
2--- man-1.6e/configure 2008-12-21 19:20:51.000000000 +0100
3+++ man-1.6e.oden/configure 2008-12-21 19:20:32.000000000 +0100
4@@ -1027,7 +1027,7 @@ then
5 then
6 DO_COMPRESSION=true
7 compress=
8- for i in bzip2 gzip bzip tzip pack compress freeze yabba
9+ for i in xz lzma bzip2 gzip bzip tzip pack compress freeze yabba
10 do
11 eval F$i=missing
12 for j in $DEFPATH
13@@ -1080,6 +1080,8 @@ then
14 fi
15
16 case $compress in
17+ *xz*) ext=".xz" ;;
18+ *lzma*) ext=".lzma" ;;
19 *bzip2*) ext=".bz2" ;;
20 *gzip*) ext=".gz" ;;
21 *bzip*) ext=".bz" ;;
22@@ -1122,7 +1124,7 @@ then
23 fi
24
25 # unconditionally handle uncompression
26-UNCOMPRESSORS="gunzip bzip2 pcat zcat fcat unyabba"
27+UNCOMPRESSORS="unxz unlzma gunzip bzip2 pcat zcat fcat unyabba"
28 for i in $UNCOMPRESSORS
29 do
30 eval F$i=missing
31@@ -1143,6 +1146,14 @@ bzip2=missing
32 if [ $Fbzip2 != missing ]; then
33 bzip2="$Fbzip2 -c -d"
34 fi
35+unxz=missing
36+if [ $Funxz != missing ]; then
37+ unxz="$Funxz -c -d"
38+fi
39+unlzma=missing
40+if [ $Funlzma != missing ]; then
41+ unlzma="$Funlzma -c -d"
42+fi
43 pcat="$Fpcat"
44 zcat="$Fzcat"
45 fcat="$Ffcat"
46@@ -1171,6 +1181,12 @@ if [ x$default = x ]; then
47 bzip2)
48 echo "Command to use for .bz2 files (standard bzip2)"
49 echo $n "[`eval echo \\$$filter`] $c" ;;
50+ xz)
51+ echo "Command to use for .xz files (standard xz)"
52+ echo $n "[`eval echo \\$$filter`] $c" ;;
53+ lzma)
54+ echo "Command to use for .lzma files (standard lzma)"
55+ echo $n "[`eval echo \\$$filter`] $c" ;;
56 pcat)
57 echo "Command to use for .z files (pack/unpack)"
58 echo $n "[`eval echo \\$$filter`] $c" ;;
59@@ -1232,6 +1248,8 @@ fi
60 case $compress_ext in
61 .gz) decompress=$gunzip ;;
62 .bz2) decompress=$bzip2 ;;
63+ .xz) decompress=$unlzma ;;
64+ .lzma) decompress=$unlzma ;;
65 .z) decompress=$pcat ;;
66 .Z) decompress=$zcat ;;
67 .F) decompress=$fcat ;;
68@@ -1319,6 +1337,8 @@ s,@pcat@,$pcat,
69 s,@zcat@,$zcat,
70 s,@gunzip@,$gunzip,
71 s,@bzip2@,$bzip2,
72+s,@unlzma@,$unlzma,
73+s,@unxz@,$unxz,
74 s,@unyabba@,$unyabba,
75 s,@compress@,$compress,
76 s,@compress_ext@,$compress_ext,
77diff -Naurp man-1.6e/src/makewhatis.sh man-1.6e.oden/src/makewhatis.sh
78--- man-1.6e/src/makewhatis.sh 2008-12-21 19:20:51.000000000 +0100
79+++ man-1.6e.oden/src/makewhatis.sh 2008-12-21 19:20:32.000000000 +0100
80@@ -220,7 +220,7 @@ do
81 find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
82
83 function readline() {
84- if (use_zcat || use_bzcat) {
85+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
86 result = (pipe_cmd | getline);
87 if (result < 0) {
88 print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
89@@ -235,7 +235,7 @@ do
90 }
91
92 function closeline() {
93- if (use_zcat || use_bzcat) {
94+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
95 return close(pipe_cmd);
96 } else {
97 return close(filename);
98@@ -254,7 +254,11 @@ do
99 match(filename,"\\.z$") || match(filename,"\\.gz$");
100 if (!use_zcat)
101 use_bzcat = match(filename,"\\.bz2");
102- if (use_zcat || use_bzcat) {
103+ if(!use_bzcat)
104+ use_lzcat = match(filename,"\\.lzma");
105+ if(!use_lzcat)
106+ use_xzcat = match(filename,"\\.xz");
107+ if (use_zcat || use_bzcat || use_lzcat || use_xz_cat) {
108 filename_no_gz = substr(filename, 0, RSTART - 1);
109 } else {
110 filename_no_gz = filename;
111@@ -267,12 +271,16 @@ do
112 actual_section = section;
113 }
114 sub(/\..*/, "", progname);
115- if (use_zcat || use_bzcat) {
116+ if (use_zcat || use_bzcat || use_lzcat || use_xz_cat) {
117 if (use_zcat) {
118 pipe_cmd = "zcat \"" filename "\"";
119- } else {
120+ } else if (use_bzcat) {
121 pipe_cmd = "bzcat \"" filename "\"";
122- }
123+ } else if (use_lzcat) {
124+ pipe_cmd = "lzcat \"" filename "\"";
125+ } else {
126+ pipe_cmd = "xzcat \"" filename "\"";
127+ }
128 # try to avoid suspicious stuff
129 if (filename ~ /[;&|`$(]/) {
130 print "ignored strange file name " filename " in " curdir > "/dev/stderr";
131diff -Naurp man-1.6e/src/man.conf.in man-1.6e.oden/src/man.conf.in
132--- man-1.6e/src/man.conf.in 2008-12-21 19:20:51.000000000 +0100
133+++ man-1.6e.oden/src/man.conf.in 2008-12-21 19:20:32.000000000 +0100
134@@ -139,6 +139,8 @@ MANSECT @sections@
135 #
136 .gz @gunzip@
137 .bz2 @bzip2@
138+.lzma @unlzma@
139+.xz @unxz@
140 .z @pcat@
141 .Z @zcat@
142 .F @fcat@
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-mandirs.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-mandirs.patch
new file mode 100644
index 0000000000..06e9869754
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-mandirs.patch
@@ -0,0 +1,27 @@
1--- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300
2+++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300
3@@ -36,11 +36,12 @@
4 #
5 # Every automatically generated MANPATH includes these fields
6 #
7-MANPATH /usr/man
8 MANPATH /usr/share/man
9+MANPATH /usr/X11R6/man
10 MANPATH /usr/local/man
11 MANPATH /usr/local/share/man
12-MANPATH /usr/X11R6/man
13+MANPATH /usr/kerberos/man
14+MANPATH /usr/man
15 #
16 # Uncomment if you want to include one of these by default
17 #
18@@ -67,6 +68,9 @@
19 MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
20 MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
21 MANPATH_MAP /usr/bin/mh /usr/share/man
22+MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man
23+MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man
24+
25 #
26 # NOAUTOPATH keeps man from automatically adding directories that look like
27 # manual page directories to the path.
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-new_sections.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-new_sections.patch
new file mode 100644
index 0000000000..51727588f4
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-new_sections.patch
@@ -0,0 +1,11 @@
1--- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300
2+++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300
3@@ -960,7 +960,7 @@
4
5 # What sections do we anticipate?
6
7-tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
8+tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
9
10 if [ x$default = x ]; then
11 echo ""
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-ro_usr.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-ro_usr.patch
new file mode 100644
index 0000000000..054054b521
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-ro_usr.patch
@@ -0,0 +1,67 @@
1--- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
2+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:54:57.000000000 -0300
3@@ -124,7 +124,7 @@
4 continue;;
5 -s) setsections=1
6 continue;;
7- -u) findarg="-ctime 0"
8+ -u) findarg="-newer /var/cache/man/whatis"
9 update=1
10 continue;;
11 -v) verbose=1
12@@ -165,14 +165,7 @@
13 # first truncate all the whatis files that will be created new,
14 # then only update - we might visit the same directory twice
15 if [ x$update = x ]; then
16- for pages in man cat
17- do
18- eval path="\$$pages"path
19- for mandir in $path
20- do
21- cp /dev/null $mandir/whatis
22- done
23- done
24+ cp /dev/null /var/cache/man/whatis
25 fi
26
27 for pages in man cat
28@@ -184,11 +177,6 @@
29 if [ x$verbose != x ]; then
30 echo "about to enter $mandir" > /dev/stderr
31 fi
32- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
33- if [ x$verbose != x ]; then
34- echo skipping $mandir - we did it already > /dev/stderr
35- fi
36- else
37 here=`pwd`
38 cd $mandir
39 for i in $sections
40@@ -407,23 +395,14 @@
41
42 cd $here
43
44- # kludge for Slackware's /usr/man/preformat
45- if [ $mandir = /usr/man/preformat ]
46- then
47- mandir1=/usr/man
48- else
49- mandir1=$mandir
50- fi
51-
52- if [ -f ${mandir1}/whatis ]
53+ if [ -f /var/cache/man/whatis ]
54 then
55- cat ${mandir1}/whatis >> $TMPFILE
56+ cat /var/cache/man/whatis >> $TMPFILE
57 fi
58- tr -s '\n' < $TMPFILE | sort -u > ${mandir1}/whatis
59+ tr -s '\n' < $TMPFILE | sort -u > /var/cache/man/whatis
60
61- chmod 644 ${mandir1}/whatis
62+ chmod 644 /var/cache/man/whatis
63 rm $TMPFILE
64- fi
65 done
66 done
67
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-security.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-security.patch
new file mode 100644
index 0000000000..85fdf4e5fc
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-security.patch
@@ -0,0 +1,58 @@
1diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
2--- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
3+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300
4@@ -45,7 +45,7 @@
5 # and should be first.
6 # It is a bug to add /var/cache/man to DEFCATPATH.
7 dm=
8-for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
9+for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
10 do
11 if [ -d $d ]; then
12 if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
13@@ -53,7 +53,7 @@
14 done
15 DEFMANPATH=$dm
16 dc=
17-for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
18+for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
19 do
20 if [ -d $d ]; then
21 if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
22@@ -76,12 +76,12 @@
23 # We try here to be careful (and avoid preconstructed symlinks)
24 # in case makewhatis is run as root, by creating a subdirectory of /tmp.
25
26-TMPFILEDIR=/tmp/whatis.tmp.dir.$$
27-rm -rf $TMPFILEDIR
28-if ! mkdir -m 0700 $TMPFILEDIR; then
29- echo Could not create $TMPFILEDIR
30- exit 1;
31+TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX`
32+if [ $? -ne 0 ]; then
33+ echo "$0: Can't create temp file, exiting..."
34+ exit 1
35 fi
36+chmod 0700 $TMPFILEDIR
37 TMPFILE=$TMPFILEDIR/w
38
39 # make sure TMPFILEDIR is deleted if program is killed or terminates
40diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c
41--- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300
42+++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300
43@@ -1234,7 +1234,6 @@
44 #endif
45
46
47-#if 0
48 {
49 /* There are no known cases of buffer overflow caused by
50 excessively long environment variables. In case you find one,
51@@ -1257,7 +1256,6 @@
52 MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
53 MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
54 }
55-#endif
56
57
58 #ifndef __FreeBSD__
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-use_i18n_vars_in_a_std_way.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-use_i18n_vars_in_a_std_way.patch
new file mode 100644
index 0000000000..a448da54d7
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-use_i18n_vars_in_a_std_way.patch
@@ -0,0 +1,156 @@
1diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c
2--- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300
3+++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300
4@@ -9,22 +9,63 @@
5 extern char *index (const char *, int); /* not always in <string.h> */
6 extern char *my_malloc(int); /* in util.c */
7
8+/* if the program has sgid/suid privileges then getenv doesn't return
9+ * NLSPATH; so we set here a good default value.
10+ */
11 #ifndef DEFAULT_NLSPATH
12 # if __GLIBC__ >= 2
13-# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
14+# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
15 # else
16 # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
17 # endif
18 #endif
19
20-static nl_catd my_catopenpath(char *name, char *path);
21+static nl_catd my_catopenpath(char *name, char *path, char *lang);
22
23 static /* this source included in gripes.c */
24 nl_catd
25 my_catopen(char *name, int oflag) {
26- nl_catd fd;
27+ nl_catd fd = (nl_catd) -1;
28+
29+ /* using first the my_catopenpath, which looks with LANGUAGE
30+ * and only if it fails ressort to catopen, it gives better i18n
31+ */
32+ {
33+ char *nlspath, *lang, *s;
34
35- fd = catopen(name, oflag);
36+ /*
37+ * "If NLSPATH does not exist in the environment, or if a
38+ * message catalog cannot be opened in any of the paths specified
39+ * by NLSPATH, then an implementation defined default path is used"
40+ */
41+ nlspath = getenv("NLSPATH");
42+ if (!nlspath)
43+ nlspath = DEFAULT_NLSPATH;
44+
45+ lang = getenv("LANGUAGE");
46+ if (!lang)
47+ lang = getenv("LC_ALL");
48+ if (!lang)
49+ lang = getenv("LC_MESSAGES");
50+ if (!lang)
51+ lang = getenv("LANG");
52+ if (!lang)
53+ lang = "";
54+
55+ while(*lang && (fd == (nl_catd) -1)) {
56+ s = index(lang, ':');
57+ if (s) *s = 0;
58+ fd = my_catopenpath(name, nlspath, lang);
59+ if (s) lang=s+1;
60+ else lang = "";
61+ }
62+ if (fd == (nl_catd) -1)
63+ fd = my_catopenpath(name, nlspath, "en");
64+ }
65+
66+ /* still not found, use the system catopen */
67+ if (fd == (nl_catd) -1)
68+ fd = catopen(name, oflag);
69
70 if (fd == (nl_catd) -1 && oflag) {
71 oflag = 0;
72@@ -32,8 +73,6 @@
73 }
74
75 if (fd == (nl_catd) -1) {
76- char *nlspath;
77-
78 /* The libc catopen fails - let us see if we can do better */
79 /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
80
81@@ -58,17 +97,6 @@
82 #endif
83 }
84
85- /*
86- * "If NLSPATH does not exist in the environment, or if a
87- * message catalog cannot be opened in any of the paths specified
88- * by NLSPATH, then an implementation defined default path is used"
89- */
90-
91- nlspath = getenv("NLSPATH");
92- if (nlspath)
93- fd = my_catopenpath(name, nlspath);
94- if (fd == (nl_catd) -1)
95- fd = my_catopenpath(name, DEFAULT_NLSPATH);
96 }
97 return fd;
98 }
99@@ -90,15 +118,13 @@
100 *
101 */
102 static nl_catd
103-my_catopenpath(char *name, char *nlspath) {
104- int fd;
105+my_catopenpath(char *name, char *nlspath, char *lang) {
106 nl_catd cfd = (nl_catd) -1;
107- char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
108+ char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
109 int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
110
111 namesz = strlen(name);
112
113- lang = getenv("LANG");
114 if (!lang)
115 lang = "";
116 langsz = strlen(lang);
117@@ -194,14 +220,9 @@
118 path = s+1;
119 } else
120 path = 0;
121- fd = open(file, O_RDONLY);
122- if (fd != -1) {
123- /* we found the right catalog - but we don't know the
124- type of nl_catd, so close it again and ask libc */
125- close(fd);
126- cfd = catopen(file, 0);
127- break;
128- }
129+ cfd = catopen(file, 0);
130+ if (cfd != (nl_catd) -1)
131+ break;
132 }
133
134 free(path0);
135diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c
136--- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300
137+++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300
138@@ -282,13 +282,14 @@
139 /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
140 the return value of setlocale is an opaque string. */
141 /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
142- if((lang = getenv("LC_ALL")) != NULL)
143+ /* LANGUAGE is GNU/Linux and overrules all */
144+ if((lang = getenv("LANGUAGE")) != NULL)
145 split2(dir, lang, add_to_mandirlist_x, perrs);
146- if((lang = getenv("LC_MESSAGES")) != NULL)
147+ else if((lang = getenv("LC_ALL")) != NULL)
148 split2(dir, lang, add_to_mandirlist_x, perrs);
149- if((lang = getenv("LANG")) != NULL)
150+ else if((lang = getenv("LC_MESSAGES")) != NULL)
151 split2(dir, lang, add_to_mandirlist_x, perrs);
152- if((lang = getenv("LANGUAGE")) != NULL)
153+ else if((lang = getenv("LANG")) != NULL)
154 split2(dir, lang, add_to_mandirlist_x, perrs);
155 add_to_mandirlist_x(dir, 0, perrs);
156 }
diff --git a/meta/recipes-extended/man/man-1.6e/man-1.6e-whatis2.patch b/meta/recipes-extended/man/man-1.6e/man-1.6e-whatis2.patch
new file mode 100644
index 0000000000..180d4a3178
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man-1.6e-whatis2.patch
@@ -0,0 +1,37 @@
1--- man-1.6e-ro_usr/src/makewhatis.sh 2007-05-18 11:41:50.000000000 -0300
2+++ man-1.6e/src/makewhatis.sh 2007-05-18 13:27:16.000000000 -0300
3@@ -162,10 +162,15 @@
4 fi
5 catpath=`echo ${catpath} | tr : ' '`
6
7+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
8+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
9+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
10+
11 # first truncate all the whatis files that will be created new,
12 # then only update - we might visit the same directory twice
13 if [ x$update = x ]; then
14- cp /dev/null /var/cache/man/whatis
15+ mkdir -p $WHATIS_DIR/
16+ /bin/echo -n > $WHATIS_DIR/whatis
17 fi
18
19 for pages in man cat
20@@ -395,13 +400,13 @@
21
22 cd $here
23
24- if [ -f /var/cache/man/whatis ]
25+ if [ -f $WHATIS_DIR/whatis ]
26 then
27- cat /var/cache/man/whatis >> $TMPFILE
28+ cat $WHATIS_DIR/whatis >> $TMPFILE
29 fi
30- tr -s '\n' < $TMPFILE | sort -u > /var/cache/man/whatis
31+ tr -s '\n' < $TMPFILE | sort -u > $WHATIS_DIR/whatis
32
33- chmod 644 /var/cache/man/whatis
34+ chmod 644 $WHATIS_DIR/whatis
35 rm $TMPFILE
36 done
37 done
diff --git a/meta/recipes-extended/man/man-1.6e/man.1.gz b/meta/recipes-extended/man/man-1.6e/man.1.gz
new file mode 100644
index 0000000000..c368045153
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man.1.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man-1.6e/man.7.gz b/meta/recipes-extended/man/man-1.6e/man.7.gz
new file mode 100644
index 0000000000..e85af82426
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/man.7.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man-1.6e/manpath.5.gz b/meta/recipes-extended/man/man-1.6e/manpath.5.gz
new file mode 100644
index 0000000000..c012ff8976
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6e/manpath.5.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man_1.6e.bb b/meta/recipes-extended/man/man_1.6e.bb
new file mode 100644
index 0000000000..1ac10979d9
--- /dev/null
+++ b/meta/recipes-extended/man/man_1.6e.bb
@@ -0,0 +1,61 @@
1DESCRIPTION = "A set of documentation tools: man, apropos and whatis"
2SECTION = "console/utils"
3HOMEPAGE = "http://primates.ximian.com/~flucifredi/man"
4PRIORITY = "required"
5LICENSE = "GPLv2"
6PR = "r0"
7
8DEPENDS = "groff less"
9
10LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
11
12SRC_URI = "http://primates.ximian.com/~flucifredi/man/man-1.6e.tar.gz \
13 file://man-1.5k-confpath.patch;striplevel=0 \
14 file://man-1.5h1-make.patch;striplevel=1 \
15 file://man-1.5k-nonascii.patch;striplevel=1 \
16 file://man-1.6e-security.patch;striplevel=1 \
17 file://man-1.6e-mandirs.patch;striplevel=1 \
18 file://man-1.5m2-bug11621.patch;striplevel=1 \
19 file://man-1.5k-sofix.patch;striplevel=1 \
20 file://man-1.5m2-buildroot.patch;striplevel=1 \
21 file://man-1.6e-ro_usr.patch;striplevel=1 \
22 file://man-1.5i2-newline.patch;striplevel=0 \
23 file://man-1.5j-utf8.patch;striplevel=1 \
24 file://man-1.5i2-overflow.patch;striplevel=1 \
25 file://man-1.5j-nocache.patch;striplevel=1 \
26 file://man-1.5i2-initial.patch;striplevel=1 \
27 file://man-1.5h1-gencat.patch;striplevel=0 \
28 file://man-1.5g-nonrootbuild.patch;striplevel=1 \
29 file://man-1.5m2-tv_fhs.patch;striplevel=0 \
30 file://man-1.5j-i18n.patch;striplevel=1 \
31 file://man-1.6e-whatis2.patch;striplevel=1 \
32 file://man-1.6e-use_i18n_vars_in_a_std_way.patch;striplevel=1 \
33 file://man-1.5m2-no-color-for-printing.patch;striplevel=1 \
34 file://man-1.5m2-sigpipe.patch;striplevel=1 \
35 file://man-1.6e-i18n_whatis.patch;striplevel=1 \
36 file://man-1.6e-new_sections.patch;striplevel=1 \
37 file://man-1.6e-lzma+xz-support.patch;striplevel=1 \
38 file://man*"
39
40
41do_configure () {
42 ${S}/configure -default -confdir ${D}/etc +sgid +fhs +lang all
43}
44
45
46fakeroot do_install() {
47 oe_runmake install DESTDIR=${D}
48}
49
50do_install_append(){
51 mkdir -p ${D}/etc/
52 mkdir -p ${D}${datadir}/man/man5
53 mkdir -p ${D}${datadir}/man/man7
54 cp ${S}/src/man.conf ${D}/etc/
55 cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/
56 cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/
57 cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/
58}
59
60
61FILES_${PN} += "${datadir}/locale"