aboutsummaryrefslogtreecommitdiffstats
path: root/archivers
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2016-01-08 03:01:34 +0800
committerdanfe <danfe@FreeBSD.org>2016-01-08 03:01:34 +0800
commitfb9735fa841b63bb9090e7786926d02e5f38db10 (patch)
tree48b11ca0024ffc0916b89c10b15198c6cdba5bc9 /archivers
parent23e02eb86cffbdbaa11b74d4616c38bcf5e0b75a (diff)
downloadfreebsd-ports-gnome-fb9735fa841b63bb9090e7786926d02e5f38db10.tar.gz
freebsd-ports-gnome-fb9735fa841b63bb9090e7786926d02e5f38db10.tar.zst
freebsd-ports-gnome-fb9735fa841b63bb9090e7786926d02e5f38db10.zip
- Add a port of The Unarchiver, GNUstep-based unpacker for a vast variety
of file formats, both old and new - Use external wavpack library instead of the bundled one, so that if it has a security vulnerability, the port would not have to be recompiled WWW: http://unarchiver.c3.cx/commandline
Diffstat (limited to 'archivers')
-rw-r--r--archivers/Makefile1
-rw-r--r--archivers/unarchiver/Makefile45
-rw-r--r--archivers/unarchiver/distinfo2
-rw-r--r--archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd26
-rw-r--r--archivers/unarchiver/files/patch-XADMaster_Makefile.common15
-rw-r--r--archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd52
-rw-r--r--archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h10
-rw-r--r--archivers/unarchiver/pkg-descr11
8 files changed, 162 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile
index c9190dd8e9e7..ea6c97507101 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -204,6 +204,7 @@
SUBDIR += unace
SUBDIR += unadf
SUBDIR += unalz
+ SUBDIR += unarchive
SUBDIR += unarj
SUBDIR += undms
SUBDIR += unfoo
diff --git a/archivers/unarchiver/Makefile b/archivers/unarchiver/Makefile
new file mode 100644
index 000000000000..d9c2bb249671
--- /dev/null
+++ b/archivers/unarchiver/Makefile
@@ -0,0 +1,45 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= unar
+PORTVERSION= 1.9.1
+CATEGORIES= archivers gnustep
+MASTER_SITES= http://wakaba.c3.cx/releases/TheUnarchiver/
+DISTNAME= ${PORTNAME}${PORTVERSION}_src
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Unarchiver for a vast variety of file formats
+
+LICENSE= LGPL21
+LICENSE_FILE= ${WRKSRC}/License.txt
+
+# XXX: USES=gnustep overrides MAKEFILE we set below, so depend explicitly
+LIB_DEPENDS= libgnustep-base.so:${PORTSDIR}/lang/gnustep-base \
+ libwavpack.so:${PORTSDIR}/audio/wavpack
+
+USES= gmake zip
+
+MAKEFILE= Makefile.freebsd
+WRKSRC= ${WRKDIR}/The\ Unarchiver
+BUILD_WRKSRC= ${WRKSRC}/XADMaster
+
+PLIST_FILES= bin/lsar bin/unar man/man1/lsar.1.gz man/man1/unar.1.gz
+PORTDOCS= README.md
+PORTEXAMPLES= lsar.bash_completion unar.bash_completion
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/XADMaster/??ar ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/Extra/??ar.1 ${STAGEDIR}${MANPREFIX}/man/man1
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+do-install-EXAMPLES-on:
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/Extra/??ar.bash_completion \
+ ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>
diff --git a/archivers/unarchiver/distinfo b/archivers/unarchiver/distinfo
new file mode 100644
index 000000000000..643dda254b5a
--- /dev/null
+++ b/archivers/unarchiver/distinfo
@@ -0,0 +1,2 @@
+SHA256 (unar1.9.1_src.zip) = 28045fb688563c002b7c2807e80575d3f9af8eb024739f9ab836f681bb8e822c
+SIZE (unar1.9.1_src.zip) = 2541499
diff --git a/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd b/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd
new file mode 100644
index 000000000000..e356cbe7a811
--- /dev/null
+++ b/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd
@@ -0,0 +1,26 @@
+--- UniversalDetector/Makefile.freebsd.orig 2015-09-23 20:24:59 UTC
++++ UniversalDetector/Makefile.freebsd
+@@ -1,10 +1,7 @@
+ # Compilers and linkers
+
+-OBJCC = clang
+-CC = clang
+-CXX = clang++
++OBJCC ?= $(CC)
+ LD = $(CXX)
+-AR = ar
+
+ # Options for compilation
+
+@@ -16,10 +13,9 @@ GNUSTEP_OPTS = -DGNUSTEP \
+ -fobjc-exceptions \
+ -fconstant-string-class=NSConstantString
+
+-GCC_OPTS = -O2 \
++GCC_OPTS = $(CFLAGS) \
+ -Wno-import \
+ -Wno-multichar \
+- -g \
+ -D_FILE_OFFSET_BITS=64 \
+ -isystem /usr/local/GNUstep/System/Library/Headers \
+ -I/usr/local/include
diff --git a/archivers/unarchiver/files/patch-XADMaster_Makefile.common b/archivers/unarchiver/files/patch-XADMaster_Makefile.common
new file mode 100644
index 000000000000..353e5576da1d
--- /dev/null
+++ b/archivers/unarchiver/files/patch-XADMaster_Makefile.common
@@ -0,0 +1,15 @@
+--- XADMaster/Makefile.common.orig 2015-09-23 20:24:59 UTC
++++ XADMaster/Makefile.common
+@@ -206,12 +206,6 @@ LIBRARY_C_FILES = BWT.c \
+ PPMd/VariantG.c \
+ PPMd/VariantH.c \
+ PPMd/VariantI.c \
+- wavpack/bits.c \
+- wavpack/float.c \
+- wavpack/metadata.c \
+- wavpack/unpack.c \
+- wavpack/words.c \
+- wavpack/wputils.c \
+ WinZipJPEG/ArithmeticDecoder.c \
+ WinZipJPEG/Decompressor.c \
+ WinZipJPEG/JPEG.c
diff --git a/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd b/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd
new file mode 100644
index 000000000000..31002d477bfa
--- /dev/null
+++ b/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd
@@ -0,0 +1,52 @@
+--- XADMaster/Makefile.freebsd.orig 2015-09-23 20:24:59 UTC
++++ XADMaster/Makefile.freebsd
+@@ -1,10 +1,7 @@
+ # Compilers and linkers
+
+-OBJCC = clang
+-CC = clang
+-CXX = clang++
++OBJCC ?= $(CC)
+ LD = $(CXX)
+-AR = ar
+
+ # Options for compilation
+
+@@ -16,10 +13,8 @@ GNUSTEP_OPTS = -DGNUSTEP \
+ -fobjc-exceptions \
+ -fconstant-string-class=NSConstantString
+
+-GCC_OPTS = -O2 \
+- -Wno-import \
++GCC_OPTS = $(CFLAGS) -Wno-import \
+ -Wno-multichar \
+- -g \
+ -D_FILE_OFFSET_BITS=64 \
+ -isystem /usr/local/GNUstep/System/Library/Headers \
+ -I/usr/local/include
+@@ -42,6 +37,7 @@ LIBS = -Wl,--no-whole-archive \
+ -lgnustep-base \
+ -lz \
+ -lbz2 \
++ -lwavpack \
+ -licuuc \
+ -lobjc \
+ -lm
+@@ -74,7 +70,7 @@ libXADMaster.a: $(LIBRARY_OBJS)
+ $(AR) rcs $@ $^
+
+ ../UniversalDetector/libUniversalDetector.a:
+- gmake -C ../UniversalDetector -f Makefile.linux
++ $(MAKE) -C ../UniversalDetector -f Makefile.freebsd
+
+ XADTest2: $(XADTEST2_OBJS) libXADMaster.a ../UniversalDetector/libUniversalDetector.a
+ $(LD) $(ALL_LDFLAGS) -o $@ $^ $(LIBS)
+@@ -99,7 +95,7 @@ lsar: $(LSAR_OBJS) $(CMDLINE_OBJS) libXA
+
+ clean:
+ rm -rf $(BUILD_DIR) $(EXECUTABLE_FILES) $(LIBRARY_FILES)
+- gmake -C ../UniversalDetector -f Makefile.linux clean
++ $(MAKE) -C ../UniversalDetector -f Makefile.freebsd clean
+
+ .PHONY: ../UniversalDetector/libUniversalDetector.a clean
+
diff --git a/archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h b/archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h
new file mode 100644
index 000000000000..97c304b11734
--- /dev/null
+++ b/archivers/unarchiver/files/patch-XADMaster_XADWinZipWavPackHandle.h
@@ -0,0 +1,10 @@
+--- XADMaster/XADWinZipWavPackHandle.h.orig 2015-09-23 20:24:59 UTC
++++ XADMaster/XADWinZipWavPackHandle.h
+@@ -1,6 +1,6 @@
+ #import "CSBlockStreamHandle.h"
+
+-#import "wavpack/wavpack.h"
++#import <wavpack/wavpack.h>
+
+ @interface XADWinZipWavPackHandle:CSBlockStreamHandle
+ {
diff --git a/archivers/unarchiver/pkg-descr b/archivers/unarchiver/pkg-descr
new file mode 100644
index 000000000000..eac00ed840b7
--- /dev/null
+++ b/archivers/unarchiver/pkg-descr
@@ -0,0 +1,11 @@
+The Unarchiver is an archive unpacker program with support for the lots of
+popular ZIP, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO,
+BIN, split file formats, as well as the old Stuffit, Stuffit X, DiskDouble,
+Compact Pro, Packit, cpio, compress (.Z), ARJ, ARC, PAK, ACE, ZOO, LZH, ADF,
+DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old/obscure formats.
+
+It can also handle filenames in foreign character sets, created with non-
+English versions of some operating systems, and is particularly useful for
+processing CJK archives correctly.
+
+WWW: https://unarchiver.c3.cx/commandline