public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-apps/man/files: man-1.6f-so-search-2.patch man-1.6f-parallel-build.patch man-1.6f-man2html-compression-2.patch man-1.6f-xz.patch
@ 2010-01-27  2:35 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2010-01-27  2:35 UTC (permalink / raw
  To: gentoo-commits

vapier      10/01/27 02:35:14

  Added:                man-1.6f-so-search-2.patch
                        man-1.6f-parallel-build.patch
                        man-1.6f-man2html-compression-2.patch
                        man-1.6f-xz.patch
  Log:
  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)

Revision  Changes    Path
1.1                  sys-apps/man/files/man-1.6f-so-search-2.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-so-search-2.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-so-search-2.patch?rev=1.1&content-type=text/plain

Index: man-1.6f-so-search-2.patch
===================================================================
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) {



1.1                  sys-apps/man/files/man-1.6f-parallel-build.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-parallel-build.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-parallel-build.patch?rev=1.1&content-type=text/plain

Index: man-1.6f-parallel-build.patch
===================================================================
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



1.1                  sys-apps/man/files/man-1.6f-man2html-compression-2.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-man2html-compression-2.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-man2html-compression-2.patch?rev=1.1&content-type=text/plain

Index: man-1.6f-man2html-compression-2.patch
===================================================================
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") {



1.1                  sys-apps/man/files/man-1.6f-xz.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-xz.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/man/files/man-1.6f-xz.patch?rev=1.1&content-type=text/plain

Index: man-1.6f-xz.patch
===================================================================
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@






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-27  2:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-27  2:35 [gentoo-commits] gentoo-x86 commit in sys-apps/man/files: man-1.6f-so-search-2.patch man-1.6f-parallel-build.patch man-1.6f-man2html-compression-2.patch man-1.6f-xz.patch Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox