Submitted By:            Kevin Day <kevin AT kevux DOT org>
Date:                    2006-12-30
Initial Package Version: 1.16.1
Upstream Status:         Submitted to mailing tar's list
Description:             Add support for lzo/lzop decompression.
Looks like 1.16.1 is still unstable, this is the backport to the working 1.15.1
http://www.oberhumer.com/opensource/lzo/
http://www.lzop.org/

--- tar-1.15.1/src/tar.c.orig	2006-12-30 16:58:49.000000000 -0600
+++ tar-1.15.1/src/tar.c	2006-12-30 17:01:17.000000000 -0600
@@ -431,6 +431,8 @@
    N_("create archive with volume name NAME. At list/extract time, use TEXT as a globbing pattern"), 68 },
   {"bzip2", 'j', 0, 0,
    N_("filter the archive through bzip2"), 68 },
+  {"lzop", 'q', 0, 0,
+   N_("filter the archive through lzop"), 68 },
   {"gzip", 'z', 0, 0,
    N_("filter the archive through gzip"), 68 },
   {"gunzip", 0, 0, OPTION_ALIAS, NULL, 68 },
@@ -823,6 +825,10 @@
     case 'P':
       absolute_names_option = true;
       break;
+
+    case 'q':
+      set_use_compress_program_option ("lzop");
+      break;      
       
     case 'r':
       set_subcommand_option (APPEND_SUBCOMMAND);
--- tar-1.15.1/src/buffer.c.orig	2006-12-30 16:58:41.000000000 -0600
+++ tar-1.15.1/src/buffer.c	2006-12-30 16:59:37.000000000 -0600
@@ -153,7 +153,8 @@
   ct_none,
   ct_compress,
   ct_gzip,
-  ct_bzip2
+  ct_bzip2,
+  ct_lzop
 };
 
 struct zip_magic
@@ -170,6 +171,7 @@
   { ct_compress, "\037\235", 2, "compress", "-Z" },
   { ct_gzip,     "\037\213", 2, "gzip", "-z"  },
   { ct_bzip2,    "BZh",      3, "bzip2", "-j" },
+  { ct_lzop,     "\211LZO",  4, "lzop", "-q" },
 };
 
 #define NMAGIC (sizeof(magic)/sizeof(magic[0]))
