summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-27 02:35:14 +0000
committerMike Frysinger <vapier@gentoo.org>2010-01-27 02:35:14 +0000
commit94a5dcff2f1a2c92b1906b256af0fed5fdcbf326 (patch)
treea86fc8b15c198464c86e0af6451bac99f3131145 /sys-apps/man
parentremove double slash in log output #194532 (diff)
downloadhistorical-94a5dcff2f1a2c92b1906b256af0fed5fdcbf326.tar.gz
historical-94a5dcff2f1a2c92b1906b256af0fed5fdcbf326.tar.bz2
historical-94a5dcff2f1a2c92b1906b256af0fed5fdcbf326.zip
Tweak log output #194532 by Ken Rushia. Fix by Kevin Pyle for parallel build errors #207148 by Csaba Tóth. Fix parallel build warnings #258916 by Mr. Anderson. Add the -r option to default less options #287183 by Martin Baselier. Add support for xz compression #302380 by Dror Levin.
Package-Manager: portage-2.2_rc61/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/man')
-rw-r--r--sys-apps/man/ChangeLog15
-rw-r--r--sys-apps/man/Manifest28
-rw-r--r--sys-apps/man/files/man-1.6f-man2html-compression-2.patch61
-rw-r--r--sys-apps/man/files/man-1.6f-parallel-build.patch78
-rw-r--r--sys-apps/man/files/man-1.6f-so-search-2.patch34
-rw-r--r--sys-apps/man/files/man-1.6f-xz.patch128
-rw-r--r--sys-apps/man/man-1.6f-r4.ebuild127
7 files changed, 453 insertions, 18 deletions
diff --git a/sys-apps/man/ChangeLog b/sys-apps/man/ChangeLog
index 4e4ae7062083..7aebe43e715c 100644
--- a/sys-apps/man/ChangeLog
+++ b/sys-apps/man/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-apps/man
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/man/ChangeLog,v 1.154 2009/09/29 11:45:01 flameeyes Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/man/ChangeLog,v 1.155 2010/01/27 02:35:14 vapier Exp $
+
+*man-1.6f-r4 (27 Jan 2010)
+
+ 27 Jan 2010; Mike Frysinger <vapier@gentoo.org> +man-1.6f-r4.ebuild,
+ +files/man-1.6f-man2html-compression-2.patch,
+ +files/man-1.6f-parallel-build.patch, +files/man-1.6f-so-search-2.patch,
+ +files/man-1.6f-xz.patch:
+ Tweak log output #194532 by Ken Rushia. Fix by Kevin Pyle for parallel
+ build errors #207148 by Csaba Tóth. Fix parallel build warnings #258916
+ by Mr. Anderson. Add the -r option to default less options #287183 by
+ Martin Baselier. Add support for xz compression #302380 by Dror Levin.
29 Sep 2009; Diego E. Pettenò <flameeyes@gentoo.org> man-1.6f-r3.ebuild:
Fix package name.
diff --git a/sys-apps/man/Manifest b/sys-apps/man/Manifest
index 43923299073a..62793b10b30d 100644
--- a/sys-apps/man/Manifest
+++ b/sys-apps/man/Manifest
@@ -1,8 +1,7 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
AUX makewhatis.cron 115 RMD160 166a144a1f876c494e252836fd32142dc52e4b0a SHA1 2c7f9fd209f8c2078751ea877d4e3b09a75475ab SHA256 3e7f377a6c9ecdeff6e85f918993a4af0cf8bb5bcc63bf7a35e6426d50e434a4
-AUX man-1.5m-groff-1.18.patch 923 RMD160 44b369bed7d540e704a377851efac385d9bcebb0 SHA1 94859ad8b7066a7eaa263823b573b8542aac8b04 SHA256 2b27c6a9d0804dd8923b24a8355a797ef20f70cf42011078161b6955eee1bec9
AUX man-1.5m2-apropos.patch 450 RMD160 b2045e2b0633009c11630548e7992d5377a7763a SHA1 2aeb82e4952d768761b62bd565ecc9d830860bcc SHA256 c524c12eaa1f40e26eba40e3c6b88b32b5b24bd4cb75d2ba9a0361a539877ec9
AUX man-1.5p-defmanpath-symlinks.patch 881 RMD160 f9be8d92840f20d05dee8cc86207c036538e44d1 SHA1 47e16f452e3b7fc0eb431209d311ff59a898e620 SHA256 bd6bdb63af8c78f088ef8b19723adadc1bd465c799a4f97601c0fa9c5ff48a0d
AUX man-1.5p-search-order.patch 463 RMD160 175d20a172eb1088ea6c5b7ec5d70fc6b1db6036 SHA1 ce0eb19c848153bb1ae7335a37a9cf6cf3c8dac7 SHA256 96d73ede177ec43880f834eab326f7b27b75c4d99d0e04027dff3a14078fd5a6
@@ -10,27 +9,24 @@ AUX man-1.6-cross-compile.patch 1744 RMD160 873e07ed67255c29a195fe8de47745410c09
AUX man-1.6b-more-sections.patch 291 RMD160 38055a8cae18769589f379d2f8c5ab98cec1217d SHA1 1fbdc176a125aa9e0f38a78346cc175e8d43a8c1 SHA256 33d876a93a84d0680bf737be9b06968d91ff376800e21ae8799e45357c35efef
AUX man-1.6c-cut-duplicate-manpaths.patch 2148 RMD160 4ea3e5cd240f8632ed7808fc23525780f86f5417 SHA1 fec95ca10a7f08a4dea4c656c3fb453b7af839ce SHA256 a9557114725da765265891a4c1cf846b6a8f0b38c0180628a7fec7dfb1b76a4d
AUX man-1.6d-fbsd.patch 312 RMD160 dede639e7ae795da1a84c13add717386fdcef720 SHA1 9204cac212107d4ff109544a6bf3801f532a68ef SHA256 669c51e8eca894f8c983d41c4fa24af3aa74cf323906e262b3f185dfa1ca00da
-AUX man-1.6e-dont-kill-shebangs.patch 599 RMD160 3977ba6da44e7902143c65ee07faefc61748f015 SHA1 4c8334a9aa0c35b8503d5c4712ba0b3c7dc42ee4 SHA256 945208a9d73d52e51c9a4930b1c2e289f8bdb79bb9adfdaa51946c6ed135ac2c
AUX man-1.6e-headers.patch 241 RMD160 04052f079124c57fcc6b0ebe29a4a62eba39baa4 SHA1 4b421073a2c88ca32bc6d8a448710cc921d0e6cf SHA256 d62108e3baaec771d99226eff07a6f604a8b9afefd25ec596b9817574a638e20
-AUX man-1.6e-man2html-bzip2.patch 1511 RMD160 1a2cd248001f272d5ce79b952c7e59b9244f5df4 SHA1 ed923a79f45650cf53c77e4d08ed50e108c1bb8c SHA256 ac080c92233d0de35f09641b7ff79f71dd0fff60bf95a310b33dc55134b3505c
-AUX man-1.6e-readonly-whatis2.patch 1179 RMD160 71e357153c18bcf444b9264b64d29de7e303ecab SHA1 981ab4e9743dce40a07fbb90d2c179c7a8716c56 SHA256 e87c4a98c9caee7fe80f873f29523232c9754f42aa78830028af2ddc40f408a8
AUX man-1.6f-compress.patch 941 RMD160 b0aef2f2c6953f397e7fa8082f4047bc7fc39796 SHA1 a1239954d67180782a5ce9ee8cc786ad7b4b12be SHA256 d0e1d976201bb61c7769ce407991647411f7f8da2945b56af64797357ce389b3
+AUX man-1.6f-man2html-compression-2.patch 1725 RMD160 f657abc5322b2a80ed861bb7b90158cfdc617e45 SHA1 fd2e1b82733d6c115b5929f38abb7eb7a75848a9 SHA256 f9df05eabad2408a017790954f46ac06eb565fed4de603d6d20bb3145439f97a
AUX man-1.6f-man2html-compression.patch 1559 RMD160 c154c9d0f27ded25a9b60e1bf1496d624fe9cc08 SHA1 a7714a9ee7421ba3dd7b1a4fd66a436caadbe6da SHA256 dba59d9d94684995f670065ad09da392af5318f1b95eeba66806631f5339afa9
+AUX man-1.6f-parallel-build.patch 2300 RMD160 63974024e6bbee300fe26a7400b4e3c6addd69fe SHA1 493cb921cd90a4a567035093127a59576a921a16 SHA256 b8efa60be8c8a9ba487cff0bc498946359b7066ac2aa0c872264e31d356caf00
+AUX man-1.6f-so-search-2.patch 1062 RMD160 559faa19c7130bba8e5b508ac5e024a44b5b9e02 SHA1 917a8de958266fbefcca1ad4d5d552a0b66d0be4 SHA256 8f4c6bcfde17291f92c677b82e2367458916488a1a8de6ba345eecd5bfccb2e8
AUX man-1.6f-so-search.patch 1055 RMD160 1e8e098a0ef2b52003043f3ac12bc5719c3541ee SHA1 6927649688d13027439f28742a81e97aefdfad63 SHA256 73e047a205a01ff6519ee331755b0429d48d79e1d6a5fd9683eabd2e3791419b
AUX man-1.6f-unicode.patch 656 RMD160 298d0012b34c803fb296d7cacc07febd8d314f39 SHA1 c4c716ae4417b949721fbfec0b667a91cf560810 SHA256 1c7624b5824e5585abd1c3d27ffd8e2d9207a05bf67e268aeaabaddf842d4709
-DIST man-1.6e.tar.gz 252657 RMD160 486099dc1b34fe86a2c1d19b7c89dc19b9787837 SHA1 7264bda7dd7bf08bdb9dac6ec7734e755ec0a8d1 SHA256 022faf23844eabb3662eabb105836925dd83bedda10271e2450a5bc5b61a5b5f
+AUX man-1.6f-xz.patch 3738 RMD160 56ccb9f0e3d3353425ab5f9e0546d77528f9827b SHA1 b1759769630a720bf8232846182494c4473dacf5 SHA256 c1b3e6f257f5e6d5303ce5f763ec7adc98bd171cbc03e59536e9d39ab3db4295
DIST man-1.6f.tar.gz 254827 RMD160 8680bb94bff9b86fb9d061f58d9acb08c934531e SHA1 c97012607ed9d75a6eee7e66d257a99a8ed86918 SHA256 9f208c7e1981371ad4481d6e6c2c566bc726a15778723f94136d220fb9375f6c
-EBUILD man-1.6e-r3.ebuild 3557 RMD160 136047613d1e60452b2bb8a168c77fd314023e98 SHA1 2c5a28b01d7fe022a94dfb0eb8e27a546db9c264 SHA256 2c8306e947f7521669be148d64389b3d15546f01aa8972d9e573bb858bc4366a
-EBUILD man-1.6f-r1.ebuild 2989 RMD160 7cd2f69cebf830ad75a2267a18450463f1476cce SHA1 e7b5dfc59ee9dd1fd9065d91be6868eabe24a95a SHA256 85041144b5de565af5f163bc34123fc9170dc45a3640b3e0246ed77db60c639e
-EBUILD man-1.6f-r2.ebuild 3035 RMD160 1663b6853e9bef07787f6da729d7bcd6a7ded0cb SHA1 5c33f8c7a0f22b52c04a0e8c3d4083475444e496 SHA256 cf796420af9ee8489b30bfb0a1f5765b2ff43514402d26730506bb2fc880f1f2
-EBUILD man-1.6f-r3.ebuild 3567 RMD160 3612e77fac8ca103639db722ce369e94487cd08f SHA1 255adbe68f4f11999a1988ea9e1399defa3413f3 SHA256 e49a669fd574aa869eb7687eb0db38e78a173545404d5a0317d289c5ac47ace1
-EBUILD man-1.6f.ebuild 2974 RMD160 45440f8db6942835007bc02d050252337fa94f17 SHA1 944ff93af0fe39773a0a7036f1038a16517a048c SHA256 b80ac0b104fffe3f166a4fcf2b532ab861a19bcb9acb101c0f5a535b6ab96167
-MISC ChangeLog 20973 RMD160 9b2eaeac0aa0d8118a79b31739947dbd67522be6 SHA1 6fdc1f2367170d27eba0ecdab8694fbd80cb8aa8 SHA256 869e3517ce52a862616be5ccbcb1c334ac8884ab75a0c4c7e81ac4adeb8abb00
+EBUILD man-1.6f-r3.ebuild 3562 RMD160 9b401537ab36815f8ca222c0e0dd48a7a997eb72 SHA1 ec3bf84b7257f38ebf99c9c4116bc82cd827a1da SHA256 0115dbcb39e9347a8f7eb865a8c5fbc8336d3f8678a372118a866554daf6a15d
+EBUILD man-1.6f-r4.ebuild 3726 RMD160 9c52d3df27736dd85af4aa335dff2f78d8f79385 SHA1 5e7c53a19e1f28b8dee534a16127edd0dc352431 SHA256 88aba630cb008af0f590b897b01d598ef2609e8db1f9d08d05e414164f432d7c
+MISC ChangeLog 21514 RMD160 301ca18acd02a52921bc7681bd6fe777ad6f5db3 SHA1 fd2ecb4dc6ff312cf7cf69a337b9a4182699be39 SHA256 b3f79abab27af6bf16602b17b22e474fb9c313f781ccc89b05204713040be9b2
MISC metadata.xml 329 RMD160 5120c92ca5f6331554baa726567c4367d8dea6f4 SHA1 3d9cf63688ff3e757816ea41b2dcac6d9dfe5d4f SHA256 2e95447c6cf6d6de9be0d4e1019d7ba41c99cc033fe94c5d81d2543124dbfc8d
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
+Version: GnuPG v2.0.14 (GNU/Linux)
-iEYEARECAAYFAkrB8z0ACgkQAiZjviIA2XgsHQCg7lluUkyqW5Ws9/BNNnFOo5Ne
-j54AoLF2DdGzGu4I05hNsoKoxyjXy+mX
-=3SWq
+iF4EAREIAAYFAktfpm0ACgkQTwhj9JtAlp7noAD/TXi6kVFH1cCF81PhMBDPOR+0
+zlLsDBTlGcpqzjQKwNMBAKBe4pWEF/A2xUV6mIhUiv8WQjLYN7tBtcu6TDLTVdO1
+=/xmY
-----END PGP SIGNATURE-----
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 000000000000..b79b3a1872f1
--- /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
+
+--- man2html/glimpse_filters
++++ 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
+
+--- man2html/scripts/cgi-bin/man/man2html
++++ 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
+--- man2html/scripts/cgi-bin/man/mansearch
++++ man2html/scripts/cgi-bin/man/mansearch
+@@ -153,7 +153,7 @@
+ }
+ print "<DT> <a href=\"" cgipath "/man2html?" fullname "\">";
+ textname = filename;
+- sub(/\.(gz)|Z|z$/, "", textname);
++ sub(/\.([zZ]|gz|bz2|lzma|xz)$/, "", textname);
+ sub(/\./, "(", textname);
+ textname = textname ")";
+ print textname;
+--- man2html/scripts/cgi-bin/man/mansec
++++ 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") {
diff --git a/sys-apps/man/files/man-1.6f-parallel-build.patch b/sys-apps/man/files/man-1.6f-parallel-build.patch
new file mode 100644
index 000000000000..335b9c2a6872
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-parallel-build.patch
@@ -0,0 +1,78 @@
+http://bugs.gentoo.org/207148
+
+patch by Kevin Pyle to fix parallel build issues
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -42,9 +42,12 @@
+ makemsg:
+ $(BUILD_CC) -o makemsg makemsg.c
+
+-msg.c gripedefs.h: ../msgs/mess.en makemsg
++gripedefs.h: ../msgs/mess.en makemsg
+ ./makemsg ../msgs/mess.en gripedefs.h msg.c
+
++# avoid parallel build issues with makemsg
++msg.c: gripedefs.h
++
+ # glob.c does not have prototypes
+ glob.o: glob.c ndir.h
+ $(CC) -c $(CWARNNP) $(CFLAGS) -I. $(DEFS) glob.c
+
+http://bugs.gentoo.org/258916
+
+avoid:
+ make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
+
+--- a/man/Makefile.in
++++ b/man/Makefile.in
+@@ -3,7 +3,7 @@
+ MAN5 = man.conf
+ MAN8 = makewhatis
+ ALL = man.1 whatis.1 apropos.1 man.conf.5
+-MAYBE8 = makewhatis
++MAYBE8 = $(wildcard makewhatis.man)
+
+ .SUFFIXES: .man .1 .5 .8
+
+@@ -21,9 +21,7 @@
+ # Where to put the manual pages.
+ mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
+
+-all: $(ALL)
+- for i in $(MAYBE8); \
+- do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
++all: $(ALL) $(MAYBE8:.man=.8)
+
+ install: $(ALL)
+ mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
+@@ -39,18 +37,17 @@
+
+ spotless:
+
+-subdirs:
+- @for i in @languages@; do if test -d $$i; then echo; \
+- echo "==== Making the `cat $$i.txt` man pages. ===="; \
+- cd $$i; make -f ../Makefile; cd ..; \
+- else echo "==== No $$i man pages found. ===="; fi; done
+-
+-installsubdirs:
+- @for i in @languages@; do if test -d $$i; then echo; \
+- echo "==== Installing the `cat $$i.txt` man pages. ===="; \
+- cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
+- export SLANG; make -f ../Makefile install; cd ..; \
+- else echo "==== No $$i man pages found. ===="; fi; done
++MAN_LANGS = @languages@
++subdirs: $(MAN_LANGS:=_lang_subdir)
++%_lang_subdir:
++ @echo "==== Making the `cat $(@:_lang_subdir=).txt` man pages. ===="
++ $(MAKE) -f ../Makefile -C $(@:_lang_subdir=)
++
++installsubdirs: $(MAN_LANGS:=_lang_installsubdir)
++%_lang_installsubdir:
++ @echo "==== Making the `cat $(@:_lang_installsubdir=).txt` man pages. ===="
++ $(MAKE) -f ../Makefile -C $(@:_lang_installsubdir=) install \
++ SLANG=`s=$(@:_lang_installsubdir=); test $$s = en || echo /$$s`
+
+ cleansubdirs:
+ @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
diff --git a/sys-apps/man/files/man-1.6f-so-search-2.patch b/sys-apps/man/files/man-1.6f-so-search-2.patch
new file mode 100644
index 000000000000..ac42c8df7b37
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-so-search-2.patch
@@ -0,0 +1,34 @@
+improve the uncompressed .so search
+
+--- a/src/man.c
++++ b/src/man.c
+@@ -381,13 +381,23 @@ again:
+ }
+ /*
+ * Some people have compressed man pages, but uncompressed
+- * .so files - we could glob for all possible extensions,
+- * for now: only try .gz
++ * .so files - we should discover this list dynamically, but
++ * for now just hardcode it.
+ */
+- else if (fp == NULL && get_expander(".gz") &&
+- strlen(name)+strlen(".gz") < BUFSIZE) {
+- strcat(name, ".gz");
+- fp = fopen (name, "r");
++ else if (fp == NULL) {
++#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
++ size_t i, name_len = strlen(name);
++ const char *extensions[] = { ".gz", ".bz2", ".lzma", ".xz", ".z", ".Z" };
++ for (i = 0; i < ARRAY_SIZE(extensions); ++i) {
++ const char *comp = extensions[i];
++ name[name_len] = '\0';
++ if (get_expander(comp) && name_len+strlen(comp) < BUFSIZE) {
++ strcat(name, comp);
++ fp = fopen(name, "r");
++ if (fp)
++ break;
++ }
++ }
+ }
+
+ if (fp == NULL) {
diff --git a/sys-apps/man/files/man-1.6f-xz.patch b/sys-apps/man/files/man-1.6f-xz.patch
new file mode 100644
index 000000000000..7b2ed9085766
--- /dev/null
+++ b/sys-apps/man/files/man-1.6f-xz.patch
@@ -0,0 +1,128 @@
+add support for xz
+
+http://bugs.gentoo.org/302380
+
+--- a/configure
++++ b/configure
+@@ -1017,7 +1017,7 @@
+ echo $compress
+ else
+ compress=
+- for i in lzma 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
+@@ -1076,6 +1076,7 @@
+ *gzip*) ext=".gz" ;;
+ *bzip*) ext=".bz" ;;
+ *tzip*) ext=".tz" ;;
++ *xz*) ext=".xz" ;;
+ *pack*) ext=".z" ;;
+ *compress*) ext=".Z" ;;
+ *freeze*) ext=".F" ;;
+@@ -1114,7 +1115,7 @@
+ fi
+
+ # unconditionally handle uncompression
+-UNCOMPRESSORS="unlzma gunzip bzip2 pcat zcat fcat unyabba"
++UNCOMPRESSORS="unxz unlzma gunzip bzip2 pcat zcat fcat unyabba"
+ for i in $UNCOMPRESSORS
+ do
+ eval F$i=missing
+@@ -1139,6 +1140,10 @@
+ if [ $Funlzma != missing ]; then
+ unlzma="$Funlzma -c -d"
+ fi
++unxz=missing
++if [ $Funxz != missing ]; then
++ unxz="$Funxz -c -d"
++fi
+ pcat="$Fpcat"
+ zcat="$Fzcat"
+ fcat="$Ffcat"
+@@ -1170,6 +1175,9 @@
+ lzma)
+ echo "Command to use for .lzma files (standard lzma)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
++ xz)
++ echo "Command to use for .xz files (standard xz)"
++ echo $n "[`eval echo \\$$filter`] $c" ;;
+ pcat)
+ echo "Command to use for .z files (pack/unpack)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+@@ -1232,6 +1240,7 @@
+ .gz) decompress=$gunzip ;;
+ .bz2) decompress=$bzip2 ;;
+ .lzma) decompress=$unlzma ;;
++ .xz) decompress=$unxz ;;
+ .z) decompress=$pcat ;;
+ .Z) decompress=$zcat ;;
+ .F) decompress=$fcat ;;
+@@ -1325,6 +1334,7 @@
+ s,@gunzip@,$gunzip,
+ s,@bzip2@,$bzip2,
+ s,@unlzma@,$unlzma,
++s,@unxz@,$unxz,
+ s,@unyabba@,$unyabba,
+ s,@compress@,$compress,
+ s,@compress_ext@,$compress_ext,
+--- a/src/makewhatis.sh
++++ b/src/makewhatis.sh
+@@ -230,7 +230,7 @@
+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
+
+ function readline() {
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ result = (pipe_cmd | getline);
+ if (result < 0) {
+ print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
+@@ -245,7 +245,7 @@
+ }
+
+ function closeline() {
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ return close(pipe_cmd);
+ } else {
+ return close(filename);
+@@ -266,7 +266,9 @@
+ use_bzcat = match(filename,"\\.bz2");
+ if(!use_bzcat)
+ use_lzcat = match(filename,"\\.lzma");
+- if (use_zcat || use_bzcat || use_lzcat ) {
++ if(!use_lzcat)
++ use_xzcat = match(filename,"\\.xz");
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ filename_no_gz = substr(filename, 0, RSTART - 1);
+ } else {
+ filename_no_gz = filename;
+@@ -279,13 +281,15 @@
+ actual_section = section;
+ }
+ sub(/\..*/, "", progname);
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ if (use_zcat) {
+ pipe_cmd = "zcat \"" filename "\"";
+ } else if (use_bzcat) {
+ pipe_cmd = "bzcat \"" filename "\"";
+- } else {
++ } else if (use_lzcat) {
+ pipe_cmd = "lzcat \"" filename "\"";
++ } else {
++ pipe_cmd = "xzcat \"" filename "\"";
+ }
+ # try to avoid suspicious stuff
+ if (filename ~ /[;&|`$(]/) {
+--- a/src/man.conf.in
++++ b/src/man.conf.in
+@@ -133,6 +133,7 @@
+ .gz @gunzip@
+ .bz2 @bzip2@
+ .lzma @unlzma@
++.xz @unxz@
+ .z @pcat@
+ .Z @zcat@
+ .F @fcat@
diff --git a/sys-apps/man/man-1.6f-r4.ebuild b/sys-apps/man/man-1.6f-r4.ebuild
new file mode 100644
index 000000000000..09ae828e4134
--- /dev/null
+++ b/sys-apps/man/man-1.6f-r4.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/man/man-1.6f-r4.ebuild,v 1.1 2010/01/27 02:35:14 vapier Exp $
+
+EAPI="2"
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Standard commands to read man pages"
+HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
+SRC_URI="http://primates.ximian.com/~flucifredi/man/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="lzma nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND="|| ( >=sys-apps/groff-1.19.2-r1 app-doc/heirloom-doctools )
+ !sys-apps/man-db
+ !app-arch/lzma
+ lzma? ( app-arch/xz-utils )"
+PROVIDE="virtual/man"
+
+pkg_setup() {
+ enewgroup man 15
+ enewuser man 13 -1 /usr/share/man man
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/man-1.6f-man2html-compression-2.patch
+ epatch "${FILESDIR}"/man-1.6-cross-compile.patch
+ epatch "${FILESDIR}"/man-1.5p-search-order.patch
+ epatch "${FILESDIR}"/man-1.6f-unicode.patch #146315
+ epatch "${FILESDIR}"/man-1.5p-defmanpath-symlinks.patch
+ epatch "${FILESDIR}"/man-1.6b-more-sections.patch
+ epatch "${FILESDIR}"/man-1.6c-cut-duplicate-manpaths.patch
+ epatch "${FILESDIR}"/man-1.5m2-apropos.patch
+ epatch "${FILESDIR}"/man-1.6d-fbsd.patch
+ epatch "${FILESDIR}"/man-1.6e-headers.patch
+ epatch "${FILESDIR}"/man-1.6f-so-search-2.patch
+ epatch "${FILESDIR}"/man-1.6f-compress.patch
+ epatch "${FILESDIR}"/man-1.6f-parallel-build.patch #207148 #258916
+ epatch "${FILESDIR}"/man-1.6f-xz.patch #302380
+ # make sure `less` handles escape sequences #287183
+ sed -i -e '/^DEFAULTLESSOPT=/s:"$:R":' configure
+}
+
+src_configure() {
+ strip-linguas $(eval $(grep ^LANGUAGES= configure) ; echo ${LANGUAGES//,/ })
+
+ unset NLSPATH #175258
+
+ tc-export CC BUILD_CC
+
+ local mylang=
+ if use nls ; then
+ if [[ -z ${LINGUAS} ]] ; then
+ mylang="all"
+ else
+ mylang="${LINGUAS// /,}"
+ fi
+ else
+ mylang="none"
+ fi
+ if use lzma; then
+ mycompress=/usr/bin/lzma
+ else
+ mycompress=/bin/bzip2
+ fi
+ COMPRESS=$mycompress \
+ ./configure \
+ -confdir=/etc \
+ +sgid +fhs \
+ +lang ${mylang} \
+ || die "configure failed"
+}
+
+src_install() {
+ unset NLSPATH #175258
+
+ emake PREFIX="${D}" install || die "make install failed"
+ dosym man /usr/bin/manpath
+
+ dodoc LSM README* TODO
+
+ # makewhatis only adds man-pages from the last 24hrs
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/makewhatis.cron makewhatis
+
+ keepdir /var/cache/man
+ diropts -m0775 -g man
+ local mansects=$(grep ^MANSECT "${D}"/etc/man.conf | cut -f2-)
+ for x in ${mansects//:/ } ; do
+ keepdir /var/cache/man/cat${x}
+ done
+}
+
+pkg_postinst() {
+ einfo "Forcing sane permissions onto ${ROOT}var/cache/man (Bug #40322)"
+ chown -R root:man "${ROOT}"/var/cache/man
+ chmod -R g+w "${ROOT}"/var/cache/man
+ [[ -e ${ROOT}/var/cache/man/whatis ]] \
+ && chown root:0 "${ROOT}"/var/cache/man/whatis
+
+ echo
+
+ local f files=$(ls "${ROOT}"/etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+ for f in ${files} ; do
+ [[ ${f} == */etc/cron.daily/makewhatis ]] && continue
+ [[ $(md5sum "${f}") == "8b2016cc778ed4e2570b912c0f420266 "* ]] \
+ && rm -f "${f}"
+ done
+ files=$(ls "${ROOT}"etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+ if [[ ${files/$'\n'} != ${files} ]] ; then
+ ewarn "You have multiple makewhatis cron files installed."
+ ewarn "You might want to delete all but one of these:"
+ ewarn ${files}
+ fi
+
+ if has_version app-doc/heirloom-doctools; then
+ ewarn "Please note that the /etc/man.conf file installed will not"
+ ewarn "work with heirloom's nroff by default (yet)."
+ ewarn ""
+ ewarn "Check app-doc/heirloom-doctools elog messages for the proper"
+ ewarn "configuration."
+ fi
+}