summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch')
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch120
1 files changed, 120 insertions, 0 deletions
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch
new file mode 100644
index 0000000000..f8ade4fc58
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch
@@ -0,0 +1,120 @@
1Index: man-1.6f/configure
2===================================================================
3--- man-1.6f.orig/configure 2010-12-29 14:00:35.000000000 -0800
4+++ man-1.6f/configure 2010-12-29 14:27:57.584431711 -0800
5@@ -1027,7 +1027,7 @@
6 then
7 DO_COMPRESSION=true
8 compress=
9- for i in lzma bzip2 gzip bzip tzip pack compress freeze yabba
10+ for i in xz lzma bzip2 gzip bzip tzip pack compress freeze yabba
11 do
12 eval F$i=missing
13 for j in $DEFPATH
14@@ -1080,6 +1080,7 @@
15 fi
16
17 case $compress in
18+ *xz*) ext=".xz" ;;
19 *lzma*) ext=".lzma" ;;
20 *bzip2*) ext=".bz2" ;;
21 *gzip*) ext=".gz" ;;
22@@ -1123,7 +1124,7 @@
23 fi
24
25 # unconditionally handle uncompression
26-UNCOMPRESSORS="unlzma 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@@ -1144,6 +1145,10 @@
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@@ -1176,6 +1181,9 @@
43 bzip2)
44 echo "Command to use for .bz2 files (standard bzip2)"
45 echo $n "[`eval echo \\$$filter`] $c" ;;
46+ xz)
47+ echo "Command to use for .xz files (standard xz)"
48+ echo $n "[`eval echo \\$$filter`] $c" ;;
49 lzma)
50 echo "Command to use for .lzma files (standard lzma)"
51 echo $n "[`eval echo \\$$filter`] $c" ;;
52@@ -1240,6 +1248,7 @@
53 case $compress_ext in
54 .gz) decompress=$gunzip ;;
55 .bz2) decompress=$bzip2 ;;
56+ .xz) decompress=$unxz ;;
57 .lzma) decompress=$unlzma ;;
58 .z) decompress=$pcat ;;
59 .Z) decompress=$zcat ;;
60@@ -1333,6 +1342,7 @@
61 s,@zcat@,$zcat,
62 s,@gunzip@,$gunzip,
63 s,@bzip2@,$bzip2,
64+s,@unxz@,$unxz,
65 s,@unlzma@,$unlzma,
66 s,@unyabba@,$unyabba,
67 s,@compress@,$compress,
68Index: man-1.6f/src/makewhatis.sh
69===================================================================
70--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 14:00:35.000000000 -0800
71+++ man-1.6f/src/makewhatis.sh 2010-12-29 14:16:18.821555314 -0800
72@@ -242,7 +242,7 @@
73 find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
74
75 function readline() {
76- if (use_zcat || use_bzcat || use_lzcat) {
77+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
78 result = (pipe_cmd | getline);
79 if (result < 0) {
80 print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
81@@ -257,7 +257,7 @@
82 }
83
84 function closeline() {
85- if (use_zcat || use_bzcat || use_lzcat) {
86+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
87 return close(pipe_cmd);
88 } else {
89 return close(filename);
90@@ -278,7 +278,9 @@
91 use_bzcat = match(filename,"\\.bz2");
92 if(!use_bzcat)
93 use_lzcat = match(filename,"\\.lzma");
94- if (use_zcat || use_bzcat || use_lzcat ) {
95+ if(!use_xzcat)
96+ use_xzcat = match(filename,"\\.xz");
97+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat ) {
98 filename_no_gz = substr(filename, 0, RSTART - 1);
99 } else {
100 filename_no_gz = filename;
101@@ -291,14 +293,16 @@
102 actual_section = section;
103 }
104 sub(/\..*/, "", progname);
105- if (use_zcat || use_bzcat || use_lzcat) {
106+ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
107 if (use_zcat) {
108 pipe_cmd = "zcat \"" filename "\"";
109 } else if (use_bzcat) {
110 pipe_cmd = "bzcat \"" filename "\"";
111- } else {
112+ } else if (use_lzcat) {
113 pipe_cmd = "lzcat \"" filename "\"";
114- }
115+ } else {
116+ pipe_cmd = "xzcat \"" filename "\"";
117+ }
118 # try to avoid suspicious stuff
119 if (filename ~ /[;&|`$(]/) {
120 print "ignored strange file name " filename " in " curdir > "/dev/stderr";