Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > f3998c8fc85cdd48c5141e7080e23f35 > files > 1

kdebase4-runtime-4.1.2-3mdv2009.0.src.rpm

--- kdebase-runtime-4.0.98/doc/kioslave/index.docbook.liblzma	2008-07-22 21:28:52.410950136 +0200
+++ kdebase-runtime-4.0.98/doc/kioslave/index.docbook	2008-07-22 21:31:56.337950145 +0200
@@ -20,6 +20,7 @@
 <!ENTITY kio-info SYSTEM "info.docbook">
 <!ENTITY kio-lan SYSTEM "lan.docbook">
 <!ENTITY kio-ldap SYSTEM "ldap.docbook">
+<!ENTITY kio-lzma SYSTEM "lzma.docbook">
 <!ENTITY kio-mailto SYSTEM "mailto.docbook">
 <!ENTITY kio-mac SYSTEM "mac.docbook">
 <!ENTITY kio-man SYSTEM "man.docbook">
@@ -67,6 +68,7 @@
 &kio-info;
 &kio-lan;
 &kio-ldap;
+&kio-lzma;
 &kio-mailto;
 &kio-mac;
 &kio-man;
--- kdebase-runtime-4.0.98/doc/kioslave/lzma.docbook.liblzma	2008-07-23 22:32:14.985894228 +0200
+++ kdebase-runtime-4.0.98/doc/kioslave/lzma.docbook	2008-07-23 22:35:37.255002942 +0200
@@ -0,0 +1,29 @@
+<article lang="&language;" id="lzma">
+<title>lzma</title>
+<articleinfo>
+<authorgroup>
+<author>&Lauri.Watts; &Lauri.Watts.mail;</author>
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+</authorgroup>
+</articleinfo>
+
+<para>Lzma is a compression program</para>
+
+<para>The lzma kioslave is not directly usable, and is intended for use
+as a filter.  For example, the tar kioslave can filter a file through
+the lzma kioslave, in order to display the contents of a <literal
+role="extension">tar.lzma</literal> file directly in a &konqueror;
+window.</para>
+
+<para>If you click on a file compressed with a <literal
+role="extension">.lzma</literal> in &konqueror;, this kioslave is used to
+uncompress it and display it as a normal (uncompressed) file.</para>
+
+<para>If you are a developer, and would like to use the lzma filter,
+you can find documentation on using kioslaves at <ulink
+url="http://developer.kde.org">http://developer.kde.org</ulink></para>
+
+<para> See the manual: <ulink url="man:/lzma">lzma</ulink>.
+</para>
+
+</article>
--- kdebase-runtime-4.0.98/kioslave/filter/lzma.protocol.liblzma	2008-07-22 21:31:20.600950820 +0200
+++ kdebase-runtime-4.0.98/kioslave/filter/lzma.protocol	2008-07-22 21:27:36.594950686 +0200
@@ -0,0 +1,11 @@
+[Protocol]
+exec=kio_filter
+protocol=lzma
+archiveMimetype=application/x-lzma
+determineMimetypeFromExtension=true
+input=stream
+output=stream
+reading=true
+source=false
+DocPath=kioslave/lzma.html
+Icon=package-x-generic
--- kdebase-runtime-4.0.98/kioslave/info/kde-info2html.liblzma	2008-07-22 21:32:41.240950457 +0200
+++ kdebase-runtime-4.0.98/kioslave/info/kde-info2html	2008-07-22 22:15:38.293951118 +0200
@@ -39,6 +39,8 @@
 #   March 9 2003      Add support for browsing by file. by Luis Pedro Coelho
 #   June  11 2003     Update the layout of the sides to the new infopageslayout.
 #                     by Sven Leiber <s.leiber@web.de>
+#   July  22 2008     Add support for lzma.
+#                     by Per Øyvind Karlsen <peroyvind@mandriva.org>
 #
 #-------------------------------------------------------
 
@@ -140,6 +142,10 @@ sub FileNotFound {
 	if ($DirFileName =~ m/.info.bz2$/ ) {
 		open DIR, "-|", "bzcat", $DirFileName;
 	}
+	elsif ($DirFileName =~ m/.info.lzma$/ ) {
+		open DIR, "-|", "lzcat", $DirFileName;
+	}
+
 	elsif ($DirFileName =~ m/.info.gz$/ ) {
 		open DIR, "-|", "gzip", "-dc", $DirFileName;
 	}
@@ -249,6 +255,9 @@ sub infocat {
 			if ($infofile =~ m/.info.bz2$/ ) {
 				open INFOFILE, "-|", "bzcat", "$dir/$infofile";
 			}
+			elsif ($infofile =~ m/.info.lzma$/ ) {
+				open INFOFILE, "-|", "lzcat", "$dir/$infofile";
+			}
 			elsif ($infofile =~ m/.info.gz$/ ) {
 				open INFOFILE, "-|", "gzip", "-dc", "$dir/$infofile";
 			}
@@ -427,6 +436,8 @@ sub ReadIndirectTable {
     open FH1, "-|", "gunzip", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
   } elsif ($FileName =~ /\.bz2$/) {
     open FH1, "-|", "bunzip2", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
+  } elsif ($FileName =~ /\.lzma$/) {
+    open FH1, "-|", "unlzma", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
   } else {
     open(FH1, $FileName) || &DieFileNotFound($FileName);
   }
@@ -473,6 +484,8 @@ sub ReadTagTable {
     open FH, "-|", "gunzip", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
   } elsif ($FileName =~ /\.bz2$/) {
     open FH, "-|", "bunzip2", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
+  } elsif ($FileName =~ /\.lzma$/) {
+    open FH, "-|", "unlzma", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
   } else {
     open FH, $FileName || &DieFileNotFound($FileName);
   }
@@ -756,6 +769,8 @@ sub InfoNode2HTML {
     open FH2, "-|", "gunzip", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
   } elsif ($FileName =~ /\.bz2$/) {
     open FH2, "-|", "bunzip2", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
+  } elsif ($FileName =~ /\.lzma$/) {
+    open FH2, "-|", "unlzma", "-q", "-d", "-c", $FileName || &DieFileNotFound($FileName);
   } else {
     open FH2, $FileName || &DieFileNotFound($FileName);
   }
@@ -985,17 +1000,20 @@ sub FindFile {
     foreach my $Name ($File, $Alt) {
         my $gzName  = $Name . '.gz';
         my $bz2Name = $Name . '.bz2';
+        my $lzmaName = $Name . '.lzma';
 
         foreach (@info2html::config::INFODIR) {
             return "$_/$Name"    if -e "$_/$Name";
             return "$_/$gzName"  if -e "$_/$gzName";
             return "$_/$bz2Name" if -e "$_/$bz2Name";
+            return "$_/$lzmaName" if -e "$_/$lzmaName";	    
         }
         next unless $ENV{INFOPATH};
         foreach my $i (split(/:/, $ENV{INFOPATH})) {
             return "$i/$Name"    if -e "$i/$Name";
             return "$i/$gzName"  if -e "$i/$gzName";
             return "$i/$bz2Name" if -e "$i/$bz2Name";
+            return "$i/$lzmaName" if -e "$i/$lzmaName";
         }
     }
     return "";
--- kdebase-runtime-4.0.98/kioslave/man/kio_man.cpp.liblzma	2008-07-22 22:16:14.255949499 +0200
+++ kdebase-runtime-4.0.98/kioslave/man/kio_man.cpp	2008-07-22 22:17:27.411949634 +0200
@@ -71,6 +71,9 @@ void stripExtension( QString *name )
         pos -= 4;
     else if ( name->indexOf(".bz", -3) != -1 )
         pos -= 3;
+    else if ( name->indexOf(".lzma", -5) != -1 )
+        pos -= 5;
+
 
     if ( pos > 0 )
         pos = name->lastIndexOf('.', pos-1);
@@ -1331,6 +1334,8 @@ void MANProtocol::showIndex(const QStrin
 	    end -= 2;
 	else if ( len >= 4 && strcmp( end-3, ".bz2" ) == 0 )
 	    end -= 4;
+	else if ( len >= 4 && strcmp( end-4, ".lzma" ) == 0 )
+	    end -= 5;
 
 	while ( end >= begin && *end != '.' )
 	    end--;
--- kdebase-runtime-4.0.98/nepomuk/strigibackend/sopranoindexwriter.cpp.liblzma	2008-07-22 22:17:47.284951021 +0200
+++ kdebase-runtime-4.0.98/nepomuk/strigibackend/sopranoindexwriter.cpp	2008-07-22 22:24:10.137952589 +0200
@@ -83,7 +83,8 @@ namespace {
             if ( QFile::exists( archivePath ) ) {
                 if ( archivePath.endsWith( QLatin1String( ".tar" ) ) ||
                      archivePath.endsWith( QLatin1String( ".tar.gz" ) ) ||
-                     archivePath.endsWith( QLatin1String( ".tar.bz2" ) ) ) {
+                     archivePath.endsWith( QLatin1String( ".tar.bz2" ) ) ||
+                     archivePath.endsWith( QLatin1String( ".tar.lzma" ) ) ) {
                     url.setScheme( "tar" );
                 }
                 else if ( archivePath.endsWith( QLatin1String( ".zip" ) ) ) {