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
commite32c0acf4a426262660ee0f22ec927ed6dea9630 (patch)
tree977ad17a47b792b2df261eec9e3c9b764150ac5b /sys-apps/man
parentremove double slash in log output #194532 (diff)
downloadgentoo-2-e32c0acf4a426262660ee0f22ec927ed6dea9630.tar.gz
gentoo-2-e32c0acf4a426262660ee0f22ec927ed6dea9630.tar.bz2
gentoo-2-e32c0acf4a426262660ee0f22ec927ed6dea9630.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.
(Portage version: 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/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
6 files changed, 441 insertions, 2 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/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
+}