[arch-commits] Commit in file-roller/trunk (PKGBUILD rar1.patch rar2.patch)

Jan Steffens heftig at archlinux.org
Sun May 17 10:06:23 UTC 2015


    Date: Sunday, May 17, 2015 @ 12:06:23
  Author: heftig
Revision: 239484

Improve optdeps, zip support and FS#42665 FS#44639 rar support

Added:
  file-roller/trunk/rar1.patch
  file-roller/trunk/rar2.patch
Modified:
  file-roller/trunk/PKGBUILD

------------+
 PKGBUILD   |   24 ++++++++++++++++++------
 rar1.patch |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 rar2.patch |   22 ++++++++++++++++++++++
 3 files changed, 87 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-05-17 08:46:26 UTC (rev 239483)
+++ PKGBUILD	2015-05-17 10:06:23 UTC (rev 239484)
@@ -4,21 +4,33 @@
 
 pkgname=file-roller
 pkgver=3.16.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Create and modify archives"
 arch=('i686' 'x86_64')
 license=('GPL')
-depends=('desktop-file-utils' 'gtk3' 'hicolor-icon-theme' 'dconf' 'libarchive' 'file' 'json-glib' 'libnotify' 'p7zip')
+depends=('desktop-file-utils' 'gtk3' 'hicolor-icon-theme' 'dconf' 'libarchive' 'file' 'json-glib' 'libnotify' 'p7zip'
+         'zip' 'unzip')
 makedepends=('intltool' 'pkg-config' 'libnautilus-extension' 'itstool' 'docbook-xsl')
-optdepends=('lrzip: lrzip archive support'
-            'unace: extraction tool for the proprietary ace archive format')
+optdepends=('unrar: better RAR archive support'
+            'unace: ACE archive support'
+            'lrzip: lrzip archive support'
+            'cdrkit: ISO image support')
 groups=('gnome-extra')
 options=('!emptydirs')
 install=file-roller.install
 url="http://www.gnome.org"
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
-sha256sums=('60897ff24d4822395a227b62811c3b8768b701844961e93303d6d6d9463d7e3f')
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz
+        rar1.patch rar2.patch)
+sha256sums=('60897ff24d4822395a227b62811c3b8768b701844961e93303d6d6d9463d7e3f'
+            '020a2debda885afc5748ebc3620ec9c9320f21d9caad631c8d79216b38f96d56'
+            'd92da92d64c8c35c19c17b19a7bdfe6d0a00fae28207d1681dec707e8e8dc9f9')
 
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../rar1.patch
+  patch -Np1 -i ../rar2.patch
+}
+
 build() {
   cd $pkgname-$pkgver
 

Added: rar1.patch
===================================================================
--- rar1.patch	                        (rev 0)
+++ rar1.patch	2015-05-17 10:06:23 UTC (rev 239484)
@@ -0,0 +1,47 @@
+From 160fd2dab3977fa9fdf727cb74e6a23b8fc9d20b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Thu, 16 Apr 2015 10:34:57 +0200
+Subject: Give priority to rar and unrar that supports RAR files better
+
+rar and unrar supports the RAR5 archive format, while libarchive and p7zip not.
+
+diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
+index 9674098..2b70528 100644
+--- a/src/fr-archive-libarchive.c
++++ b/src/fr-archive-libarchive.c
+@@ -137,6 +137,16 @@ fr_archive_libarchive_get_capabilities (FrArchive  *archive,
+ 		return capabilities;
+ 	}
+ 
++	/* give priority to rar and unrar that supports RAR files better. */
++	if ((strcmp (mime_type, "application/x-rar") == 0)
++	    || (strcmp (mime_type, "application/x-cbr") == 0))
++	{
++		if (_g_program_is_available ("rar", check_command)
++		    || _g_program_is_available ("unrar", check_command)) {
++			return capabilities;
++		}
++	}
++
+ 	/* tar.lrz format requires external lrzip */
+ 	if (strcmp (mime_type, "application/x-lrzip-compressed-tar") == 0) {
+ 		if (!_g_program_is_available ("lrzip", check_command))
+diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
+index e6e8258..62a8fbe 100644
+--- a/src/fr-command-7z.c
++++ b/src/fr-command-7z.c
+@@ -616,7 +616,10 @@ fr_command_7z_get_capabilities (FrArchive  *archive,
+ 		if (_g_mime_type_matches (mime_type, "application/x-rar")
+ 		    || _g_mime_type_matches (mime_type, "application/x-cbr"))
+ 		{
+-			if (! check_command || g_file_test ("/usr/lib/p7zip/Codecs/Rar29.so", G_FILE_TEST_EXISTS))
++			/* give priority to rar and unrar that supports RAR files better. */
++			if (!_g_program_is_available ("rar", check_command)
++			    && !_g_program_is_available ("unrar", check_command)
++			    && g_file_test ("/usr/lib/p7zip/Codecs/Rar29.so", G_FILE_TEST_EXISTS))
+ 				capabilities |= FR_ARCHIVE_CAN_READ;
+ 		}
+ 		else
+-- 
+cgit v0.10.2
+

Added: rar2.patch
===================================================================
--- rar2.patch	                        (rev 0)
+++ rar2.patch	2015-05-17 10:06:23 UTC (rev 239484)
@@ -0,0 +1,22 @@
+From f243fe19623b69ae628ae55cd2eabb8182fcfcef Mon Sep 17 00:00:00 2001
+From: Paolo Bacchilega <paobac at src.gnome.org>
+Date: Sun, 17 May 2015 07:35:44 +0200
+Subject: restore the original condition
+
+
+diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
+index 62a8fbe..fc33d4d 100644
+--- a/src/fr-command-7z.c
++++ b/src/fr-command-7z.c
+@@ -619,7 +619,7 @@ fr_command_7z_get_capabilities (FrArchive  *archive,
+ 			/* give priority to rar and unrar that supports RAR files better. */
+ 			if (!_g_program_is_available ("rar", check_command)
+ 			    && !_g_program_is_available ("unrar", check_command)
+-			    && g_file_test ("/usr/lib/p7zip/Codecs/Rar29.so", G_FILE_TEST_EXISTS))
++			    && (! check_command || g_file_test ("/usr/lib/p7zip/Codecs/Rar29.so", G_FILE_TEST_EXISTS)))
+ 				capabilities |= FR_ARCHIVE_CAN_READ;
+ 		}
+ 		else
+-- 
+cgit v0.10.2
+



More information about the arch-commits mailing list