Sophie

Sophie

distrib > Mandriva > mes5 > i586 > by-pkgid > da51267f905113977546adacac2767a3 > files > 9

groff-1.19.1-12mdv2009.0.src.rpm

--- groff-1.19.1/contrib/groffer/groffer.sh.lzma_support	2007-08-29 04:24:41.000000000 +0200
+++ groff-1.19.1/contrib/groffer/groffer.sh	2007-08-29 04:26:10.000000000 +0200
@@ -1019,12 +1019,17 @@ if test "$(echo 'test' | gzip -c -d -f -
                             | bzip2 -d -c 2>/dev/null)" \
              = 'test'; then
     _HAS_BZIP='yes';
-  else
-    _HAS_BZIP='no';
+  fi;
+  if echo 'test' | lzma -c 2>/dev/null | lzma -t 2>/dev/null \
+	  && test "$(echo 'test' | lzma -c 2>/dev/null \
+	  | lzma -d -c 2>/dev/null)" \
+	  = 'test'; then
+    _HAS_LZMA='yes';
   fi;
 else
   _HAS_COMPRESSION='no';
   _HAS_BZIP='no';
+  _HAS_LZMA='no';
 fi;
 
 
@@ -1107,7 +1112,7 @@ base_name()
 #
 # Decompress if possible or just print <file> to standard output.
 #
-# gzip, bzip2, and .Z decompression is supported.
+# gzip, bzip2, lzma and .Z decompression is supported.
 #
 # Arguments: 1, a file name.
 # Output: the content of <file>, possibly decompressed.
@@ -1130,6 +1135,12 @@ if test "${_HAS_COMPRESSION}" = 'yes'; t
         eval "${return_ok}";
       fi;
     fi;
+    if obj _HAS_LZMA is_yes; then
+      if lzma -t "$1" 2>/dev/null; then
+        lzma -c -d "$1" 2>/dev/null;
+	eval "${return_ok}";
+      fi;
+    fi;
     gzip -c -d -f "$1" 2>/dev/null;
     eval "${return_ok}";
   }
--- groff-1.19.1/contrib/groffer/groffer.man~	2004-05-04 06:45:21.000000000 +0200
+++ groff-1.19.1/contrib/groffer/groffer.man	2007-08-29 04:28:02.000000000 +0200
@@ -691,6 +691,8 @@ Moreover, compressed files that can be h
 .BR gzip (1)
 or
 .BR bzip2 (1)
+or
+.BR lzma (1)
 are decompressed on-the-fly.
 .
 .
@@ -2480,11 +2482,14 @@ parameters is compressed with a format t
 .BR gzip (1)
 or
 .BR bzip2 (1)
+or
+.BR lzma (1)
 it is decompressed on-the-fly.
 .
 This includes the GNU
 .BR .gz ,
 .BR .bz2 ,
+.BR .lzma ,
 and the traditional
 .B .Z
 compression.
@@ -3227,6 +3232,8 @@ Standard pager program for the
 .BR gzip (1)
 .TP+
 .BR bzip2 (1)
+.TP+
+.BR lzma (1)
 The decompression programs supported by groffer.
 .
 .