From fc901adfb4e6b25a00c22797d94f8ce521a7b261 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Fri, 25 Nov 2016 13:15:14 +0100 Subject: [PATCH] xarchiver: update to 0.5.4.7 --- .../xarchiver/patches/add-mime-types.patch | 17 ---- .../patches/fix-password-protected.patch | 42 --------- .../xarchiver/patches/fix-rpm-support.patch | 86 ------------------- srcpkgs/xarchiver/template | 11 +-- 4 files changed, 6 insertions(+), 150 deletions(-) delete mode 100644 srcpkgs/xarchiver/patches/add-mime-types.patch delete mode 100644 srcpkgs/xarchiver/patches/fix-password-protected.patch delete mode 100644 srcpkgs/xarchiver/patches/fix-rpm-support.patch diff --git a/srcpkgs/xarchiver/patches/add-mime-types.patch b/srcpkgs/xarchiver/patches/add-mime-types.patch deleted file mode 100644 index 32db8f2cf7..0000000000 --- a/srcpkgs/xarchiver/patches/add-mime-types.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur xarchiver.desktop.in.orig xarchiver.desktop.in ---- xarchiver.desktop.in.orig 2014-05-12 01:08:12.159131913 +0000 -+++ xarchiver.desktop.in 2014-05-12 01:09:02.585526393 +0000 -@@ -4,11 +4,11 @@ - _Name=Xarchiver - _Comment=A GTK+2 only archive manager - _GenericName=Archive manager --Exec=xarchiver -+Exec=xarchiver %f - Icon=xarchiver - Terminal=false - Type=Application - X-MultipleArgs=false - Categories=GTK;Archiving;Utility; - StartupNotify=true --MimeType=application/x-arj;application/arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-gzip;application/x-rar;application/x-rar-compressed;application/x-tar;application/x-zip;application/x-zip-compressed;application/zip;multipart/x-zip;application/x-7z-compressed;application/x-compressed-tar;application/x-bzip2;application/x-bzip2-compressed-tar; -+MimeType=application/x-arj;application/arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-gzip;application/x-rar;application/x-rar-compressed;application/x-tar;application/x-zip;application/x-zip-compressed;application/zip;application/x-7z-compressed;application/x-compressed-tar;application/x-bzip2;application/x-bzip2-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-xz;application/x-xz-compressed-tar;application/x-deb;application/x-rpm; diff --git a/srcpkgs/xarchiver/patches/fix-password-protected.patch b/srcpkgs/xarchiver/patches/fix-password-protected.patch deleted file mode 100644 index c4aaa526cd..0000000000 --- a/srcpkgs/xarchiver/patches/fix-password-protected.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Naur src/window.c.orig xarchiver-0.5.2/src/window.c ---- src/window.c.orig 2014-01-24 08:10:09.305990000 +0100 -+++ src/window.c 2014-01-24 08:42:45.110729290 +0100 -@@ -1694,7 +1694,7 @@ - { - if (archive->passwd == NULL) - { -- archive->passwd = xa_create_password_dialog(NULL); -+ archive->passwd = xa_create_password_dialog(archive); - if ( archive->passwd == NULL) - { - gtk_drag_finish (dc,FALSE,FALSE,t); -@@ -2702,9 +2702,12 @@ - - if (entry->is_encrypted) - { -- archive[idx]->passwd = xa_create_password_dialog(archive[idx]); - if (archive[idx]->passwd == NULL) -- return; -+ { -+ archive[idx]->passwd = xa_create_password_dialog(archive[idx]); -+ if (archive[idx]->passwd == NULL) -+ return; -+ } - } - filename = g_strconcat(archive[idx]->tmp,"/",entry->filename,NULL); - if (g_file_test(filename,G_FILE_TEST_EXISTS)) -@@ -2768,8 +2771,12 @@ - { - if (entry->is_encrypted) - { -- if (archive->passwd == NULL) -- return; -+ if (archive->passwd == NULL) -+ { -+ archive->passwd = xa_create_password_dialog(archive); -+ if (archive->passwd == NULL) -+ return; -+ } - } - if (archive->extraction_path) - { diff --git a/srcpkgs/xarchiver/patches/fix-rpm-support.patch b/srcpkgs/xarchiver/patches/fix-rpm-support.patch deleted file mode 100644 index ec04ebe70a..0000000000 --- a/srcpkgs/xarchiver/patches/fix-rpm-support.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -Naur src/rpm.c.orig src/rpm.c ---- src/rpm.c.orig 2014-02-09 16:26:24.000000000 +0100 -+++ src/rpm.c 2014-02-19 07:54:27.744136749 +0100 -@@ -23,8 +23,11 @@ - - void xa_open_rpm (XArchive *archive) - { -+ unsigned char bytes[8]; - unsigned short int i; -- int response; -+ int dl,il,sigsize,offset,response; -+ gchar *ibs,*executable; -+ gchar *gzip_tmp = NULL; - GSList *list = NULL; - FILE *stream; - gboolean result; -@@ -53,14 +56,68 @@ - archive->column_types[i] = types[i]; - - xa_create_liststore (archive,names); -+ if (fseek ( stream, 104 , SEEK_CUR ) ) -+ { -+ fclose (stream); -+ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek to position 104:"),g_strerror(errno)); -+ return; -+ } -+ if ( fread ( bytes, 1, 8, stream ) == 0 ) -+ { -+ fclose ( stream ); -+ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read data from file:"),g_strerror(errno)); -+ return; -+ } -+ il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3]; -+ dl = 256 * ( 256 * ( 256 * bytes[4] + bytes[5]) + bytes[6] ) + bytes[7]; -+ sigsize = 8 + 16 * il + dl; -+ offset = 104 + sigsize + ( 8 - ( sigsize % 8 ) ) % 8 + 8; -+ if (fseek ( stream, offset , SEEK_SET ) ) -+ { -+ fclose (stream); -+ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek in file:"),g_strerror(errno)); -+ return; -+ } -+ if ( fread ( bytes, 1, 8, stream ) == 0 ) -+ { -+ fclose ( stream ); -+ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read data from file:"),g_strerror(errno)); -+ return; -+ } -+ il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3]; -+ dl = 256 * ( 256 * ( 256 * bytes[4] + bytes[5]) + bytes[6] ) + bytes[7]; -+ sigsize = 8 + 16 * il + dl; -+ offset = offset + sigsize; -+ fclose (stream); - - /* Create a unique temp dir in /tmp */ - result = xa_create_temp_directory (archive); - if (!result) - return; - -+ gzip_tmp = g_strconcat (archive->tmp,"/file.gz_bz",NULL); -+ ibs = g_strdup_printf ( "%u" , offset ); -+ - /* Now I run dd to have the bzip2 / gzip compressed cpio archive in /tmp */ -- gchar *command = g_strconcat ( "sh -c \"rpm2cpio ",archive->escaped_path," > ",archive->tmp, "/file.cpio\"",NULL); -+ gchar *command = g_strconcat ( "dd if=",archive->escaped_path," ibs=",ibs," skip=1 of=",gzip_tmp,NULL); -+ g_free (ibs); -+ list = g_slist_append(list,command); -+ batch_mode = TRUE; -+ result = xa_run_command (archive,list); -+ if (result == FALSE) -+ { -+ g_free (gzip_tmp); -+ return; -+ } -+ if (xa_detect_archive_type (gzip_tmp) == XARCHIVETYPE_GZIP) -+ executable = "gzip -dc "; -+ else if (xa_detect_archive_type (gzip_tmp) == XARCHIVETYPE_BZIP2) -+ executable = "bzip2 -dc "; -+ else -+ executable = "xz -dc "; -+ -+ command = g_strconcat("sh -c \"",executable,gzip_tmp," > ",archive->tmp,"/file.cpio\"",NULL); -+ g_free(gzip_tmp); - list = NULL; - list = g_slist_append(list,command); - result = xa_run_command (archive,list); diff --git a/srcpkgs/xarchiver/template b/srcpkgs/xarchiver/template index dfc97cdb2c..1bae3d6180 100644 --- a/srcpkgs/xarchiver/template +++ b/srcpkgs/xarchiver/template @@ -1,14 +1,15 @@ # Template file for 'xarchiver' pkgname=xarchiver -version=0.5.4 -revision=2 +version=0.5.4.7 +revision=1 build_style=gnu-configure +wrksrc="xarchiver-xarchiver-${version}" hostmakedepends="pkg-config intltool" makedepends="gtk+-devel" depends="xdg-utils desktop-file-utils hicolor-icon-theme" short_desc="GTK+2 lightweight desktop independent archive manager" -homepage="http://xarchiver.sourceforge.net/" +homepage="https://github.com/ib/xarchiver" license="GPL-2" maintainer="Juan RP " -distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.bz2" -checksum=e63fa73979fcc56efe8cca9095fd915d31a1714ce9676246b8626f164e452ef4 +distfiles="${homepage}/archive/xarchiver-${version}.tar.gz" +checksum=124eeccd819419c3d8f2935a78a3ad0ad47174bf7ef641441341e3aa32ea8f11