1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
diff -Naurp man-1.6e/configure man-1.6e.oden/configure
--- man-1.6e/configure 2008-12-21 19:20:51.000000000 +0100
+++ man-1.6e.oden/configure 2008-12-21 19:20:32.000000000 +0100
@@ -1027,7 +1027,7 @@ then
then
DO_COMPRESSION=true
compress=
- for i in bzip2 gzip bzip tzip pack compress freeze yabba
+ for i in xz lzma bzip2 gzip bzip tzip pack compress freeze yabba
do
eval F$i=missing
for j in $DEFPATH
@@ -1080,6 +1080,8 @@ then
fi
case $compress in
+ *xz*) ext=".xz" ;;
+ *lzma*) ext=".lzma" ;;
*bzip2*) ext=".bz2" ;;
*gzip*) ext=".gz" ;;
*bzip*) ext=".bz" ;;
@@ -1122,7 +1124,7 @@ then
fi
# unconditionally handle uncompression
-UNCOMPRESSORS="gunzip bzip2 pcat zcat fcat unyabba"
+UNCOMPRESSORS="unxz unlzma gunzip bzip2 pcat zcat fcat unyabba"
for i in $UNCOMPRESSORS
do
eval F$i=missing
@@ -1143,6 +1146,14 @@ bzip2=missing
if [ $Fbzip2 != missing ]; then
bzip2="$Fbzip2 -c -d"
fi
+unxz=missing
+if [ $Funxz != missing ]; then
+ unxz="$Funxz -c -d"
+fi
+unlzma=missing
+if [ $Funlzma != missing ]; then
+ unlzma="$Funlzma -c -d"
+fi
pcat="$Fpcat"
zcat="$Fzcat"
fcat="$Ffcat"
@@ -1171,6 +1181,12 @@ if [ x$default = x ]; then
bzip2)
echo "Command to use for .bz2 files (standard bzip2)"
echo $n "[`eval echo \\$$filter`] $c" ;;
+ xz)
+ echo "Command to use for .xz files (standard xz)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ lzma)
+ echo "Command to use for .lzma files (standard lzma)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
pcat)
echo "Command to use for .z files (pack/unpack)"
echo $n "[`eval echo \\$$filter`] $c" ;;
@@ -1232,6 +1248,8 @@ fi
case $compress_ext in
.gz) decompress=$gunzip ;;
.bz2) decompress=$bzip2 ;;
+ .xz) decompress=$unlzma ;;
+ .lzma) decompress=$unlzma ;;
.z) decompress=$pcat ;;
.Z) decompress=$zcat ;;
.F) decompress=$fcat ;;
@@ -1319,6 +1337,8 @@ s,@pcat@,$pcat,
s,@zcat@,$zcat,
s,@gunzip@,$gunzip,
s,@bzip2@,$bzip2,
+s,@unlzma@,$unlzma,
+s,@unxz@,$unxz,
s,@unyabba@,$unyabba,
s,@compress@,$compress,
s,@compress_ext@,$compress_ext,
diff -Naurp man-1.6e/src/makewhatis.sh man-1.6e.oden/src/makewhatis.sh
--- man-1.6e/src/makewhatis.sh 2008-12-21 19:20:51.000000000 +0100
+++ man-1.6e.oden/src/makewhatis.sh 2008-12-21 19:20:32.000000000 +0100
@@ -220,7 +220,7 @@ do
find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
function readline() {
- if (use_zcat || use_bzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
result = (pipe_cmd | getline);
if (result < 0) {
print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
@@ -235,7 +235,7 @@ do
}
function closeline() {
- if (use_zcat || use_bzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
return close(pipe_cmd);
} else {
return close(filename);
@@ -254,7 +254,11 @@ do
match(filename,"\\.z$") || match(filename,"\\.gz$");
if (!use_zcat)
use_bzcat = match(filename,"\\.bz2");
- if (use_zcat || use_bzcat) {
+ if(!use_bzcat)
+ use_lzcat = match(filename,"\\.lzma");
+ if(!use_lzcat)
+ use_xzcat = match(filename,"\\.xz");
+ if (use_zcat || use_bzcat || use_lzcat || use_xz_cat) {
filename_no_gz = substr(filename, 0, RSTART - 1);
} else {
filename_no_gz = filename;
@@ -267,12 +271,16 @@ do
actual_section = section;
}
sub(/\..*/, "", progname);
- if (use_zcat || use_bzcat) {
+ if (use_zcat || use_bzcat || use_lzcat || use_xz_cat) {
if (use_zcat) {
pipe_cmd = "zcat \"" filename "\"";
- } else {
+ } else if (use_bzcat) {
pipe_cmd = "bzcat \"" filename "\"";
- }
+ } else if (use_lzcat) {
+ pipe_cmd = "lzcat \"" filename "\"";
+ } else {
+ pipe_cmd = "xzcat \"" filename "\"";
+ }
# try to avoid suspicious stuff
if (filename ~ /[;&|`$(]/) {
print "ignored strange file name " filename " in " curdir > "/dev/stderr";
diff -Naurp man-1.6e/src/man.conf.in man-1.6e.oden/src/man.conf.in
--- man-1.6e/src/man.conf.in 2008-12-21 19:20:51.000000000 +0100
+++ man-1.6e.oden/src/man.conf.in 2008-12-21 19:20:32.000000000 +0100
@@ -139,6 +139,8 @@ MANSECT @sections@
#
.gz @gunzip@
.bz2 @bzip2@
+.lzma @unlzma@
+.xz @unxz@
.z @pcat@
.Z @zcat@
.F @fcat@
|