aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Egea Gondolfo <danilo@FreeBSD.org>2015-09-17 13:55:48 +0000
committerDanilo Egea Gondolfo <danilo@FreeBSD.org>2015-09-17 13:55:48 +0000
commit8fa758df469a105950cc77916a790b4be93d2b40 (patch)
tree7eb077c4338a3514d53440194d0475079bd503d7
parent9640815c8a2badd4bacafc8a9b2e0180dd592355 (diff)
downloadports-8fa758df469a105950cc77916a790b4be93d2b40.tar.gz
ports-8fa758df469a105950cc77916a790b4be93d2b40.zip
MFH: r397093
- Replace '--touch' option with '-m' - Fix '--use-compress-program' usage with bsdtar where needed - Improve LZMA detection - Add missing dependency to zipinfo (required to view contents of ZIP archives) - Add ARJ and LZO options - Sort USES while here - Add RAR option PR: 203103 Submitted by: Andriy Voskoboinyk <s3erios@gmail.com> Approved by: ports-secteam (feld)
Notes
Notes: svn path=/branches/2015Q3/; revision=397113
-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 79da256d1c64..814071f69b73 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;