summaryrefslogtreecommitdiff
path: root/libre/xarchiver-libre
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-09-07 14:37:26 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-09-07 14:37:26 -0300
commit9f1c4bc86d2cc8eae006c9caaf1eebd6e2e3116e (patch)
tree12dd141ed0e78bd233e75058e5f8172f115b59de /libre/xarchiver-libre
parentd6c674ce36fcb96a90bd02c232a4689f2f6fad21 (diff)
downloadabslibre-9f1c4bc86d2cc8eae006c9caaf1eebd6e2e3116e.tar.gz
abslibre-9f1c4bc86d2cc8eae006c9caaf1eebd6e2e3116e.tar.bz2
abslibre-9f1c4bc86d2cc8eae006c9caaf1eebd6e2e3116e.zip
libre/xarchiver-libre-4.5.2-4
Diffstat (limited to 'libre/xarchiver-libre')
-rw-r--r--libre/xarchiver-libre/PKGBUILD27
-rw-r--r--libre/xarchiver-libre/rePKGBUILD4
-rw-r--r--libre/xarchiver-libre/xarchiver-0.5.2-fix_7z_support.patch111
-rw-r--r--libre/xarchiver-libre/xarchiver-0.5.2-rpm2cpio.patch85
-rw-r--r--libre/xarchiver-libre/xarchiver-0.5.2-segfault-open-with.patch16
-rw-r--r--libre/xarchiver-libre/xarchiver.install1
6 files changed, 237 insertions, 7 deletions
diff --git a/libre/xarchiver-libre/PKGBUILD b/libre/xarchiver-libre/PKGBUILD
index e6d5818db..001873ad3 100644
--- a/libre/xarchiver-libre/PKGBUILD
+++ b/libre/xarchiver-libre/PKGBUILD
@@ -5,7 +5,7 @@
_pkgname=xarchiver
pkgname=xarchiver-libre
pkgver=0.5.2
-pkgrel=2
+pkgrel=4
pkgdesc="GTK+ frontend to various command line archivers"
arch=('i686' 'x86_64')
url="http://xarchiver.sourceforge.net"
@@ -28,11 +28,31 @@ optdepends=('tar: TAR support'
'lzop: LZOP support')
options=('!libtool')
install=xarchiver.install
-source=(http://downloads.sourceforge.net/xarchiver/xarchiver-$pkgver.tar.bz2)
-md5sums=('2bc7f06403cc6582dd4a8029ec9d038d')
+source=(http://downloads.sourceforge.net/xarchiver/xarchiver-$pkgver.tar.bz2
+ # rpm2cpio.patch by Daniel Hokka Zakrisson
+ # taken from https://bugzilla.redhat.com/show_bug.cgi?id=577480
+ # sent upstream through
+ # https://sourceforge.net/tracker/?func=detail&aid=3310768&group_id=140153&atid=745602
+ xarchiver-0.5.2-rpm2cpio.patch
+ # segfault-open-with.patch by Bastiaan Jacques
+ # taken from https://bugzilla.redhat.com/show_bug.cgi?id=690012
+ # sent upstream through
+ # https://sourceforge.net/tracker/?func=detail&aid=3310778&group_id=140153&atid=745600
+ xarchiver-0.5.2-segfault-open-with.patch
+ # fix-7z-support.patch by taken from
+ # https://sourceforge.net/tracker/?func=detail&aid=3137589&group_id=140153&atid=745602
+ xarchiver-0.5.2-fix_7z_support.patch)
+md5sums=('2bc7f06403cc6582dd4a8029ec9d038d'
+ 'd4a1accdbba2b50e5707097dd3548d7a'
+ 'f9036a44157b318cbc59ed012b04974b'
+ '782f55c1f1021dc02c7739bf8a47336e')
build() {
cd "$srcdir/xarchiver-$pkgver"
+ #patches taken from: http://pkgs.fedoraproject.org/gitweb/?p=xarchiver.git
+ patch -Np1 -i ../xarchiver-0.5.2-rpm2cpio.patch
+ patch -Np1 -i ../xarchiver-0.5.2-segfault-open-with.patch
+ patch -Np1 -i ../xarchiver-0.5.2-fix_7z_support.patch
./configure --prefix=/usr --libexecdir=/usr/lib/xfce4
make
}
@@ -41,4 +61,3 @@ package() {
cd "$srcdir/xarchiver-$pkgver"
make DESTDIR="$pkgdir" install
}
-
diff --git a/libre/xarchiver-libre/rePKGBUILD b/libre/xarchiver-libre/rePKGBUILD
index 0e21f1be0..7f435d23f 100644
--- a/libre/xarchiver-libre/rePKGBUILD
+++ b/libre/xarchiver-libre/rePKGBUILD
@@ -1,9 +1,9 @@
# Maintainer: Nicolás Reynolds <fauno@kiwwwi.com.ar>
source PKGBUILD
-CARCH=x86_64
+#CARCH=x86_64
unset build package md5sums source
_repo=extra # Put the repo here
-_mirror=http://mirrors.kernel.org/archlinux # Put mirror here
+_mirror=ftp://ftp.archlinux.org # Put mirror here
source=(PKGBUILD
"${_mirror}/${_repo}/os/${CARCH}/${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT"
# files for pkg modifications below this line
diff --git a/libre/xarchiver-libre/xarchiver-0.5.2-fix_7z_support.patch b/libre/xarchiver-libre/xarchiver-0.5.2-fix_7z_support.patch
new file mode 100644
index 000000000..ad5b51b59
--- /dev/null
+++ b/libre/xarchiver-libre/xarchiver-0.5.2-fix_7z_support.patch
@@ -0,0 +1,111 @@
+diff -Nur xarchiver-0.5.2.orig/src/7zip.c xarchiver-0.5.2/src/7zip.c
+--- xarchiver-0.5.2.orig/src/7zip.c 2008-10-25 00:41:17.000000000 +1300
++++ xarchiver-0.5.2/src/7zip.c 2010-12-15 11:24:26.000000000 +1300
+@@ -64,15 +64,14 @@
+ XEntry *entry;
+ gchar *filename;
+ gpointer item[5];
+- gint linesize = 0,n = 0,a = 0;
+- gboolean dir = FALSE;
++ gint linesize = 0,a = 0;
+
+ if (last_line)
+ return;
+
+ if (jump_header == FALSE)
+ {
+- if (line[0] == '-')
++ if ((line[0] == '-') && (line[3] != NULL))
+ {
+ jump_header = TRUE;
+ return;
+@@ -93,71 +92,42 @@
+ item[4] = line;
+
+ /* Time */
+- for(n=13; n < linesize; ++n)
+- if(line[n] == ' ')
+- break;
+- line[n] = '\0';
++ line[19] = '\0';
+ item[3] = line + 11;
+- a = ++n;
+
+ /* Permissions */
+- for(; n < linesize; n++)
+- if(line[n] == ' ')
+- break;
+- line[n] = '\0';
+- if ((line+a)[0] == 'D')
+- dir = TRUE;
+- item[2] = line + a;
++ line[25] = '\0';
++ item[2] = line + 20;
+
+ /* Size */
+- for(++n; n < linesize; ++n)
+- if(line[n] >= '0' && line[n] <= '9')
++ for(a=26; a < linesize; ++a)
++ if(line[a] >= '0' && line[a] <= '9')
+ break;
+- a = n;
+
+- for(; n < linesize; ++n)
+- if(line[n] == ' ')
+- break;
+-
+- line[n] = '\0';
++ line[38] = '\0';
+ item[0] = line + a;
+ archive->dummy_size += g_ascii_strtoull(item[0],NULL,0);
+
+ /* Compressed */
+- for(++n; n < linesize; ++n)
+- if(line[n] >= '0' && line[n] <= '9')
+- break;
+- a = n;
+-
+- for(; n < linesize; ++n)
+- if(line[n] == ' ')
+- break;
+-
+- line[n] = '\0';
+-
+- if (line[50] != ' ')
++ /* Is this item solid? */
++ if (line[50] == ' ')
+ {
+- n+=2;
+- item[1] = line + a;
+ line[linesize-1] = '\0';
+- filename = g_strdup(line + n);
++ filename = g_strdup(line + 53);
+ }
+- /* Is this a solid archive? */
++
+ else
+ {
+- item[1] = "0";
+- line[n-1] = '\0';
++ for(a=39; a < linesize; ++a)
++ if(line[a] >= '0' && line[a] <= '9')
++ break;
++
++ line[51] = '\0';
++ item[1] = line + a;
++ line[linesize-1] = '\0';
+ filename = g_strdup(line + 53);
+ }
+
+- /* Work around for 7za which doesn't
+- * output / with directories */
+- if (dir)
+- {
+- gchar *filename_with_slash = g_strconcat (filename,"/",NULL);
+- g_free (filename);
+- filename = filename_with_slash;
+- }
+ entry = xa_set_archive_entries_for_each_row (archive,filename,item);
+ g_free(filename);
+ }
+
diff --git a/libre/xarchiver-libre/xarchiver-0.5.2-rpm2cpio.patch b/libre/xarchiver-libre/xarchiver-0.5.2-rpm2cpio.patch
new file mode 100644
index 000000000..bd6df9731
--- /dev/null
+++ b/libre/xarchiver-libre/xarchiver-0.5.2-rpm2cpio.patch
@@ -0,0 +1,85 @@
+diff -up ./src/rpm.c.rpm2cpio ./src/rpm.c
+--- ./src/rpm.c.rpm2cpio 2008-10-24 13:43:04.000000000 +0200
++++ ./src/rpm.c 2011-03-27 03:14:20.225742237 +0200
+@@ -23,11 +23,8 @@ extern gboolean batch_mode;
+
+ void xa_open_rpm (XArchive *archive)
+ {
+- unsigned char bytes[8];
+ unsigned short int i;
+- int dl,il,sigsize,offset,response;
+- gchar *ibs,*executable;
+- gchar *gzip_tmp = NULL;
++ int response;
+ GSList *list = NULL;
+ FILE *stream;
+ gboolean result;
+@@ -56,66 +53,14 @@ void xa_open_rpm (XArchive *archive)
+ 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 ( "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
+- executable = "bzip2 -dc ";
+-
+- command = g_strconcat("sh -c \"",executable,gzip_tmp," > ",archive->tmp,"/file.cpio\"",NULL);
+- g_free(gzip_tmp);
++ gchar *command = g_strconcat ( "sh -c \"rpm2cpio ",archive->escaped_path," > ",archive->tmp, "/file.cpio\"",NULL);
+ list = NULL;
+ list = g_slist_append(list,command);
+ result = xa_run_command (archive,list);
+
diff --git a/libre/xarchiver-libre/xarchiver-0.5.2-segfault-open-with.patch b/libre/xarchiver-libre/xarchiver-0.5.2-segfault-open-with.patch
new file mode 100644
index 000000000..ab907419d
--- /dev/null
+++ b/libre/xarchiver-libre/xarchiver-0.5.2-segfault-open-with.patch
@@ -0,0 +1,16 @@
+diff -pur xarchiver-0.5.2/src/open-with-dlg.c xarchiver-0.5.2.new/src/open-with-dlg.c
+--- xarchiver-0.5.2/src/open-with-dlg.c 2008-10-17 14:06:03.000000000 +0200
++++ xarchiver-0.5.2.new/src/open-with-dlg.c 2011-05-16 21:48:49.042839556 +0200
+@@ -289,7 +289,10 @@ static void xa_open_with_dialog_selectio
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+
+- gtk_tree_selection_get_selected(selection,&model,&iter);
++ if (!gtk_tree_selection_get_selected(selection,&model,&iter)) {
++ return;
++ }
++
+ gtk_tree_model_get(model,&iter,2,&exec,-1);
+
+ gtk_entry_set_text(GTK_ENTRY(data->custom_command_entry),exec);
+
diff --git a/libre/xarchiver-libre/xarchiver.install b/libre/xarchiver-libre/xarchiver.install
index 1a1f4b16b..c317fbaca 100644
--- a/libre/xarchiver-libre/xarchiver.install
+++ b/libre/xarchiver-libre/xarchiver.install
@@ -10,4 +10,3 @@ post_upgrade() {
post_remove() {
post_install
}
-