aboutsummaryrefslogtreecommitdiff
path: root/archivers/xarchiver
diff options
context:
space:
mode:
authorDanilo Egea Gondolfo <danilo@FreeBSD.org>2015-09-17 00:12:19 +0000
committerDanilo Egea Gondolfo <danilo@FreeBSD.org>2015-09-17 00:12:19 +0000
commitb3ee19566eaacdc5c385b42434babd52f0fa082f (patch)
treeffa12edaf10f985b7cadb52c2f45ebd33839a584 /archivers/xarchiver
parentf0a68f6868f5dc797a042bc76b40acc9af42c1a2 (diff)
downloadports-b3ee19566eaacdc5c385b42434babd52f0fa082f.tar.gz
ports-b3ee19566eaacdc5c385b42434babd52f0fa082f.zip
Notes
Diffstat (limited to 'archivers/xarchiver')
-rw-r--r--archivers/xarchiver/Makefile18
-rw-r--r--archivers/xarchiver/files/patch-src_bzip2.c17
-rw-r--r--archivers/xarchiver/files/patch-src_tar.c123
-rw-r--r--archivers/xarchiver/files/patch-src_window.c11
4 files changed, 167 insertions, 2 deletions
diff --git a/archivers/xarchiver/Makefile b/archivers/xarchiver/Makefile
index fafae0083303..401dec39183b 100644
--- a/archivers/xarchiver/Makefile
+++ b/archivers/xarchiver/Makefile
@@ -3,6 +3,7 @@
PORTNAME= xarchiver
PORTVERSION= 0.5.4
+PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= SF/${PORTNAME:tl}
@@ -13,16 +14,29 @@ LICENSE= GPLv2
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils \
7zr:${PORTSDIR}/archivers/p7zip \
- zip:${PORTSDIR}/archivers/zip
+ zip:${PORTSDIR}/archivers/zip \
+ zipinfo:${PORTSDIR}/archivers/unzip
-USES= tar:bzip2 gmake pkgconfig desktop-file-utils
+USES= desktop-file-utils gmake pkgconfig tar:bzip2
USE_GNOME= glib20 gtk20 intltool
GNU_CONFIGURE= yes
INSTALLS_ICONS= yes
OPTIONS_DEFINE= DOCS NLS
+OPTIONS_GROUP= FORMATS
+OPTIONS_GROUP_FORMATS= ARJ LZO RAR
OPTIONS_SUB= yes
+FORMATS_DESC= Additional compression formats support
+ARJ_DESC= ARJ compression support
+LZO_DESC= LZO compression support
+RAR_DESC= RAR compression support
+
+ARJ_RUN_DEPENDS= arj:${PORTSDIR}/archivers/arj
+LZO_RUN_DEPENDS= lzop:${PORTSDIR}/archivers/lzop
+RAR_RUN_DEPENDS= unrar:${PORTSDIR}/archivers/unrar \
+ rar:${PORTSDIR}/archivers/rar
+
NLS_USES= gettext
NLS_CPPFLAGS+= -I${LOCALBASE}/include
NLS_LDFLAGS+= -L${LOCALBASE}/lib
diff --git a/archivers/xarchiver/files/patch-src_bzip2.c b/archivers/xarchiver/files/patch-src_bzip2.c
new file mode 100644
index 000000000000..4471a049a328
--- /dev/null
+++ b/archivers/xarchiver/files/patch-src_bzip2.c
@@ -0,0 +1,17 @@
+--- src/bzip2.c.orig 2014-02-09 15:26:24 UTC
++++ src/bzip2.c
+@@ -171,11 +171,11 @@ void xa_open_tar_compressed_file(XArchiv
+ if (archive->type == XARCHIVETYPE_TAR_BZ2)
+ command = g_strconcat(tar," tfjv ",archive->escaped_path,NULL);
+ else if (archive->type == XARCHIVETYPE_TAR_LZMA)
+- command = g_strconcat(tar," tv --use-compress-program=lzma -f ",archive->escaped_path,NULL);
++ command = g_strconcat(tar," tv --use-compress-program='lzma -d' -f ",archive->escaped_path,NULL);
+ else if (archive->type == XARCHIVETYPE_TAR_XZ)
+- command = g_strconcat(tar," tv --use-compress-program=xz -f ",archive->escaped_path,NULL);
++ command = g_strconcat(tar," tv --use-compress-program='xz -d' -f ",archive->escaped_path,NULL);
+ else if (archive->type == XARCHIVETYPE_TAR_LZOP)
+- command = g_strconcat(tar," tv --use-compress-program=lzop -f ",archive->escaped_path,NULL);
++ command = g_strconcat(tar," tv --use-compress-program='lzop -d' -f ",archive->escaped_path,NULL);
+ /* else fail? */
+
+ archive->has_properties = archive->can_add = archive->can_extract = archive->has_test = TRUE;
diff --git a/archivers/xarchiver/files/patch-src_tar.c b/archivers/xarchiver/files/patch-src_tar.c
new file mode 100644
index 000000000000..54ecc58deac2
--- /dev/null
+++ b/archivers/xarchiver/files/patch-src_tar.c
@@ -0,0 +1,123 @@
+--- src/tar.c.orig 2014-09-28 20:10:38 UTC
++++ src/tar.c
+@@ -331,7 +331,7 @@ gboolean xa_tar_extract(XArchive *archiv
+ #else
+ archive->overwrite ? " --overwrite" : " --keep-old-files",
+ #endif
+- archive->tar_touch ? " --touch" : "",
++ archive->tar_touch ? " -m" : "",
+ " -C ",archive->extraction_path," ",names->str,NULL);
+ }
+ else
+@@ -350,7 +350,7 @@ gboolean xa_tar_extract(XArchive *archiv
+ #else
+ archive->overwrite ? " --overwrite" : " --keep-old-files",
+ #endif
+- archive->tar_touch ? " --touch" : "",
++ archive->tar_touch ? " -m" : "",
+ " -C ",archive->extraction_path," ",names->str,NULL);
+ }
+ else
+@@ -369,7 +369,7 @@ gboolean xa_tar_extract(XArchive *archiv
+ #else
+ archive->overwrite ? " --overwrite" : " --keep-old-files",
+ #endif
+- archive->tar_touch ? " --touch" : "",
++ archive->tar_touch ? " -m" : "",
+ " -C ",archive->extraction_path," ",names->str,NULL);
+ }
+ else
+@@ -382,18 +382,18 @@ gboolean xa_tar_extract(XArchive *archiv
+ case XARCHIVETYPE_TAR_LZMA:
+ if (archive->full_path || multi_extract)
+ {
+- command = g_strconcat (tar, " --use-compress-program=lzma -xvf " , archive->escaped_path,
++ command = g_strconcat (tar, " --use-compress-program='lzma -d' -xvf " , archive->escaped_path,
+ #ifdef __FreeBSD__
+ archive->overwrite ? " " : " -k",
+ #else
+ archive->overwrite ? " --overwrite" : " --keep-old-files",
+ #endif
+- archive->tar_touch ? " --touch" : "",
++ archive->tar_touch ? " -m" : "",
+ " -C ",archive->extraction_path," ",names->str,NULL);
+ }
+ else
+ {
+- result = xa_extract_tar_without_directories ( "tar --use-compress-program=lzma -xvf ",archive,names->str);
++ result = xa_extract_tar_without_directories ( "tar --use-compress-program='lzma -d' -xvf ",archive,names->str);
+ command = NULL;
+ }
+ break;
+@@ -401,18 +401,18 @@ gboolean xa_tar_extract(XArchive *archiv
+ case XARCHIVETYPE_TAR_LZOP:
+ if (archive->full_path || multi_extract)
+ {
+- command = g_strconcat (tar, " --use-compress-program=lzop -xvf " , archive->escaped_path,
++ command = g_strconcat (tar, " --use-compress-program='lzop -d' -xvf " , archive->escaped_path,
+ #ifdef __FreeBSD__
+ archive->overwrite ? " " : " -k",
+ #else
+ archive->overwrite ? " --overwrite" : " --keep-old-files",
+ #endif
+- archive->tar_touch ? " --touch" : "",
++ archive->tar_touch ? " -m" : "",
+ " -C ",archive->extraction_path," ",names->str,NULL);
+ }
+ else
+ {
+- result = xa_extract_tar_without_directories ( "tar --use-compress-program=lzop -xvf ",archive,names->str);
++ result = xa_extract_tar_without_directories ( "tar --use-compress-program='lzop -d' -xvf ",archive,names->str);
+ command = NULL;
+ }
+ break;
+@@ -420,18 +420,18 @@ gboolean xa_tar_extract(XArchive *archiv
+ case XARCHIVETYPE_TAR_XZ:
+ if (archive->full_path || multi_extract)
+ {
+- command = g_strconcat (tar, " --use-compress-program=xz -xvf " , archive->escaped_path,
++ command = g_strconcat (tar, " --use-compress-program='xz -d' -xvf " , archive->escaped_path,
+ #ifdef __FreeBSD__
+ archive->overwrite ? " " : " -k",
+ #else
+ archive->overwrite ? " --overwrite" : " --keep-old-files",
+ #endif
+- archive->tar_touch ? " --touch" : "",
++ archive->tar_touch ? " -m" : "",
+ " -C ",archive->extraction_path," ",names->str,NULL);
+ }
+ else
+ {
+- result = xa_extract_tar_without_directories ( "tar --use-compress-program=xz -xvf ",archive,names->str);
++ result = xa_extract_tar_without_directories ( "tar --use-compress-program='xz -d' -xvf ",archive,names->str);
+ command = NULL;
+ }
+ break;
+@@ -567,7 +567,7 @@ gboolean xa_extract_tar_without_director
+ archive->overwrite ? " --overwrite" : " --keep-old-files",
+ " --no-wildcards ",
+ #endif
+- archive->tar_touch ? " --touch" : "",
++ archive->tar_touch ? " -m" : "",
+ "-C ",archive->tmp," ",files_to_extract,NULL);
+ list = g_slist_append(list,command);
+ if (strstr(files_to_extract,"/") || strcmp(archive->tmp,archive->extraction_path) != 0)
+@@ -618,15 +618,15 @@ void xa_tar_test(XArchive *archive)
+ break;
+
+ case XARCHIVETYPE_TAR_LZMA:
+- command = g_strconcat (tar, " --use-compress-program=lzma -tvf ",archive->path, NULL);
++ command = g_strconcat (tar, " --use-compress-program='lzma -d' -tvf ",archive->path, NULL);
+ break;
+
+ case XARCHIVETYPE_TAR_LZOP:
+- command = g_strconcat (tar, " --use-compress-program=lzop -tvf ",archive->path, NULL);
++ command = g_strconcat (tar, " --use-compress-program='lzop -d' -tvf ",archive->path, NULL);
+ break;
+
+ case XARCHIVETYPE_TAR_XZ:
+- command = g_strconcat (tar, " --use-compress-program=xz -tvf ",archive->path, NULL);
++ command = g_strconcat (tar, " --use-compress-program='xz -d' -tvf ",archive->path, NULL);
+ break;
+
+ case XARCHIVETYPE_LZMA:
diff --git a/archivers/xarchiver/files/patch-src_window.c b/archivers/xarchiver/files/patch-src_window.c
new file mode 100644
index 000000000000..9b2fe011bf0f
--- /dev/null
+++ b/archivers/xarchiver/files/patch-src_window.c
@@ -0,0 +1,11 @@
+--- src/window.c.orig 2014-09-28 20:42:37 UTC
++++ src/window.c
+@@ -1130,7 +1130,7 @@ XArchiveType xa_detect_archive_type (gch
+ xx = XARCHIVETYPE_BZIP2;
+ else if (memcmp ( magic,"\x1f\x8b",2) == 0 || memcmp ( magic,"\x1f\x9d",2) == 0)
+ xx = XARCHIVETYPE_GZIP;
+- else if (memcmp ( magic,"\x5d\x00\x00\x80",4) == 0)
++ else if (memcmp ( magic,"\x5d\x00\x00",3) == 0)
+ xx = XARCHIVETYPE_LZMA;
+ else if (memcmp ( magic,"\xfd\x37\x7a\x58\x5a",5) == 0)
+ xx = XARCHIVETYPE_XZ;