X-Git-Url: https://git.draconx.ca/gitweb/gentoo-fixes.git/blobdiff_plain/c5ad4e57246dc176a4dcfd91aae7de08b48d4148..08d9bcb18fa022ef653b4f3b46f4cba07abccefc:/sys-apps/man/files/man-1.6f-man2html-compression-2.patch diff --git a/sys-apps/man/files/man-1.6f-man2html-compression-2.patch b/sys-apps/man/files/man-1.6f-man2html-compression-2.patch new file mode 100644 index 0000000..cc90933 --- /dev/null +++ b/sys-apps/man/files/man-1.6f-man2html-compression-2.patch @@ -0,0 +1,61 @@ +add support for bzip2/lzma to man2html and friends + +--- a/man2html/glimpse_filters ++++ b/man2html/glimpse_filters +@@ -1,3 +1,6 @@ ++*.bz2 bzip2 -d -c ++*.lzma lzma -d -c ++*.xz xz -d -c + *.gz gzip -d -c + *.Z gzip -d -c + +--- a/man2html/scripts/cgi-bin/man/man2html ++++ b/man2html/scripts/cgi-bin/man/man2html +@@ -93,6 +93,12 @@ + *.bz2) + bzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE" + ;; ++ *.lzma) ++ lzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE" ++ ;; ++ *.xz) ++ xzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE" ++ ;; + *) + "$MAN2HTML" "$LL" "$PAGE" + ;; +@@ -103,6 +106,12 @@ + elif [ -r "$PAGE".bz2 ] + then + bzcat "$PAGE".bz2 | "$MAN2HTML" "$LL" -D "$PAGE" ++elif [ -r "$PAGE".lzma ] ++then ++ lzcat "$PAGE".lzma | "$MAN2HTML" "$LL" -D "$PAGE" ++elif [ -r "$PAGE".xz ] ++then ++ xzcat "$PAGE".xz | "$MAN2HTML" "$LL" -D "$PAGE" + else + "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE." + fi +--- a/man2html/scripts/cgi-bin/man/mansearch ++++ b/man2html/scripts/cgi-bin/man/mansearch +@@ -153,7 +153,7 @@ + } + print "
"; + textname = filename; +- sub(/\.(gz)|Z|z$/, "", textname); ++ sub(/\.([zZ]|gz|bz2|lzma|xz)$/, "", textname); + sub(/\./, "(", textname); + textname = textname ")"; + print textname; +--- a/man2html/scripts/cgi-bin/man/mansec ++++ b/man2html/scripts/cgi-bin/man/mansec +@@ -128,7 +128,7 @@ + # Print out alphabetic quick index and other links + } + # Split page.n into "page" and "n" and generate an entry +- sub(/[.]([zZ]|(gz))$/, "", manpage); ++ sub(/[.]([zZ]|gz|bz2|lzma|xz)$/, "", manpage); + match(manpage, /[.][^.]+$/); + title = substr(manpage, 1, RSTART - 1); + if (section != "all") {