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