aboutsummaryrefslogtreecommitdiff
path: root/archivers/zstd
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2016-07-30 23:51:50 +0000
committerJohn Marino <marino@FreeBSD.org>2016-07-30 23:51:50 +0000
commit6de175fd414ad16bf1dd70b6bab49d5ed838b8a8 (patch)
treea830743269cb741084b8bce21c5e15c3cc4441a8 /archivers/zstd
parent87239031bc7daeee9af3a50cbca3824a133b67a2 (diff)
Notes
Diffstat (limited to 'archivers/zstd')
-rw-r--r--archivers/zstd/Makefile24
-rw-r--r--archivers/zstd/distinfo3
-rw-r--r--archivers/zstd/files/patch-Makefile11
-rw-r--r--archivers/zstd/files/patch-lib_Makefile36
-rw-r--r--archivers/zstd/files/patch-programs_Makefile22
-rw-r--r--archivers/zstd/pkg-descr12
-rw-r--r--archivers/zstd/pkg-plist14
7 files changed, 122 insertions, 0 deletions
diff --git a/archivers/zstd/Makefile b/archivers/zstd/Makefile
new file mode 100644
index 000000000000..cdea4298e528
--- /dev/null
+++ b/archivers/zstd/Makefile
@@ -0,0 +1,24 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= zstd
+PORTVERSION= 0.7.4
+DISTVERSIONPREFIX= v
+CATEGORIES= archivers
+
+MAINTAINER= marino@FreeBSD.org
+COMMENT= Zstandard - Fast real-time compression algorithm
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/lib/LICENSE
+
+USES= gmake
+USE_GITHUB= yes
+GH_ACCOUNT= Cyan4973
+
+ALL_TARGET= default
+MAKE_ARGS= MANDIR="${PREFIX}/man/man1" \
+ LIBDIR="${PREFIX}/lib" \
+ INCLUDEDIR="${PREFIX}/include"
+
+.include <bsd.port.mk>
diff --git a/archivers/zstd/distinfo b/archivers/zstd/distinfo
new file mode 100644
index 000000000000..bea32ac360d6
--- /dev/null
+++ b/archivers/zstd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1469858423
+SHA256 (Cyan4973-zstd-v0.7.4_GH0.tar.gz) = 35ab3a5084d0194e9ff08e702edb6f507eab1bfb8c09c913639241cec852e2b7
+SIZE (Cyan4973-zstd-v0.7.4_GH0.tar.gz) = 567830
diff --git a/archivers/zstd/files/patch-Makefile b/archivers/zstd/files/patch-Makefile
new file mode 100644
index 000000000000..d9c8b0844252
--- /dev/null
+++ b/archivers/zstd/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig 2016-07-16 18:17:53 UTC
++++ Makefile
+@@ -73,7 +73,7 @@ clean:
+ #------------------------------------------------------------------------
+ #make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
+ #------------------------------------------------------------------------
+-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
++ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly))
+ HOST_OS = POSIX
+ install:
+ $(MAKE) -C $(ZSTDDIR) $@
diff --git a/archivers/zstd/files/patch-lib_Makefile b/archivers/zstd/files/patch-lib_Makefile
new file mode 100644
index 000000000000..35d252521c75
--- /dev/null
+++ b/archivers/zstd/files/patch-lib_Makefile
@@ -0,0 +1,36 @@
+--- lib/Makefile.orig 2016-07-16 18:17:53 UTC
++++ lib/Makefile
+@@ -99,7 +99,7 @@ clean:
+
+ #------------------------------------------------------------------------
+ #make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
+-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
++ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly))
+
+ libzstd.pc:
+ libzstd.pc: libzstd.pc.in
+@@ -111,15 +111,15 @@ libzstd.pc: libzstd.pc.in
+ $< >$@
+
+ install: libzstd libzstd.pc
+- @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
+- @install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
+- @cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)
+- @cp -a libzstd.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
+- @cp -a libzstd.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
+- @install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
+- @install -m 644 common/zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
+- @install -m 644 common/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h
+- @install -m 644 dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
++ @install -d -m 755 $(DESTDIR)$(PREFIX)/libdata/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
++ @$(BSD_INSTALL_LIB) libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
++ @ln -sf libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
++ @ln -sf libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
++ @$(BSD_INSTALL_DATA) libzstd.pc $(DESTDIR)$(PREFIX)/libdata/pkgconfig/
++ @$(BSD_INSTALL_LIB) libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
++ @$(BSD_INSTALL_DATA) common/zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
++ @$(BSD_INSTALL_DATA) common/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h
++ @$(BSD_INSTALL_DATA) dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
+ @echo zstd static and shared library installed
+
+ uninstall:
diff --git a/archivers/zstd/files/patch-programs_Makefile b/archivers/zstd/files/patch-programs_Makefile
new file mode 100644
index 000000000000..e09f327ccff8
--- /dev/null
+++ b/archivers/zstd/files/patch-programs_Makefile
@@ -0,0 +1,22 @@
+--- programs/Makefile.orig 2016-07-16 18:17:53 UTC
++++ programs/Makefile
+@@ -157,16 +157,16 @@ clean:
+ #---------------------------------------------------------------------------------
+ #make install is validated only for Linux, OSX, kFreeBSD, Hurd and OpenBSD targets
+ #---------------------------------------------------------------------------------
+-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD))
++ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly))
+ HOST_OS = POSIX
+ install: zstd
+ @echo Installing binaries
+ @install -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
+- @install -m 755 zstd$(EXT) $(DESTDIR)$(BINDIR)/zstd$(EXT)
++ @$(BSD_INSTALL_PROGRAM) zstd$(EXT) $(DESTDIR)$(BINDIR)/zstd$(EXT)
+ @ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/zstdcat
+ @ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/unzstd
+ @echo Installing man pages
+- @install -m 644 zstd.1 $(DESTDIR)$(MANDIR)/zstd.1
++ @$(BSD_INSTALL_MAN) zstd.1 $(DESTDIR)$(MANDIR)/zstd.1
+ @ln -sf zstd.1 $(DESTDIR)$(MANDIR)/zstdcat.1
+ @ln -sf zstd.1 $(DESTDIR)$(MANDIR)/unzstd.1
+ @echo zstd installation completed
diff --git a/archivers/zstd/pkg-descr b/archivers/zstd/pkg-descr
new file mode 100644
index 000000000000..42f98d8b28b8
--- /dev/null
+++ b/archivers/zstd/pkg-descr
@@ -0,0 +1,12 @@
+Zstd, short for Zstandard, is a real-time compression algorithm providing
+high compression ratios. It offers a very wide range of compression vs.
+speed trade-offs while being backed by a very fast decoder. It offers
+a special mode for small data called "dictionary compression" and it can
+create dictionaries from any sample set. Zstd is BSD-licensed.
+
+Using Izbench on the Silesia compression corpus, zstd ranked at the
+top with a compression ratio of 2.877, a compression rate of 325 Mb/s,
+and a decompression rate of 325. Zlib followed at 2.730, 95 Mb/s (C)
+and 360 Mb/s (D). See WWW page for the full benchmark results.
+
+WWW: http://cyan4973.github.io/zstd/
diff --git a/archivers/zstd/pkg-plist b/archivers/zstd/pkg-plist
new file mode 100644
index 000000000000..cad7c7f0bed5
--- /dev/null
+++ b/archivers/zstd/pkg-plist
@@ -0,0 +1,14 @@
+bin/unzstd
+bin/zstd
+bin/zstdcat
+include/zbuff.h
+include/zdict.h
+include/zstd.h
+lib/libzstd.a
+lib/libzstd.so
+lib/libzstd.so.0
+lib/libzstd.so.0.7.4
+libdata/pkgconfig/libzstd.pc
+man/man1/unzstd.1.gz
+man/man1/zstd.1.gz
+man/man1/zstdcat.1.gz