aboutsummaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2020-09-25 21:38:13 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2020-09-25 21:38:13 +0000
commit5e2dbf17b7d2310473d7e5c464d6f0140dc0b5a7 (patch)
tree6b2049081fdef6903519991f61bdc91af9c878e5 /archivers
parentc3084f6469fa74b972d8121fb03c674cf699cff6 (diff)
downloadports-5e2dbf17b7d2310473d7e5c464d6f0140dc0b5a7.tar.gz
ports-5e2dbf17b7d2310473d7e5c464d6f0140dc0b5a7.zip
Notes
Diffstat (limited to 'archivers')
-rw-r--r--archivers/Makefile1
-rw-r--r--archivers/zchunk/Makefile34
-rw-r--r--archivers/zchunk/distinfo3
-rw-r--r--archivers/zchunk/files/patch-meson.build22
-rw-r--r--archivers/zchunk/files/patch-src_lib_index_index__read.c14
-rw-r--r--archivers/zchunk/pkg-descr8
-rw-r--r--archivers/zchunk/pkg-plist11
7 files changed, 93 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile
index a84d52e25ab7..748939b04d83 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -248,6 +248,7 @@
SUBDIR += xdms
SUBDIR += xmill
SUBDIR += xpk
+ SUBDIR += zchunk
SUBDIR += zip
SUBDIR += zip-ada
SUBDIR += zipmix
diff --git a/archivers/zchunk/Makefile b/archivers/zchunk/Makefile
new file mode 100644
index 000000000000..f445175d9f46
--- /dev/null
+++ b/archivers/zchunk/Makefile
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+PORTNAME= zchunk
+DISTVERSION= 1.1.6
+CATEGORIES= archivers
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Compressed file format that splits the file into independent chunks
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libargp.so:devel/argp-standalone \
+ libcurl.so:ftp/curl
+
+USES= localbase meson pkgconfig
+USE_GITHUB= yes
+USE_LDCONFIG= yes
+
+LDFLAGS+= ${LOCALBASE}/lib/libargp.so # workaround for https://github.com/zchunk/zchunk/issues/30
+
+OPTIONS_DEFINE= OPENSSL ZSTD
+OPTIONS_DEFAULT= OPENSSL ZSTD
+
+OPENSSL_MESON_ON= -Dwith-openssl=enabled
+OPENSSL_MESON_OFF= -Dwith-openssl=disabled
+OPENSSL_USES= ssl
+OPENSSL_LDFLAGS= -L${OPENSSLLIB} -lssl -lcrypto # workaround for https://github.com/zchunk/zchunk/issues/31
+
+ZSTD_MESON_ON= -Dwith-zstd=enabled
+ZSTD_MESON_OFF= -Dwith-zstd=disabled
+ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd
+
+.include <bsd.port.mk>
diff --git a/archivers/zchunk/distinfo b/archivers/zchunk/distinfo
new file mode 100644
index 000000000000..3b1fa2922926
--- /dev/null
+++ b/archivers/zchunk/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1601065678
+SHA256 (zchunk-zchunk-1.1.6_GH0.tar.gz) = 7068fbf30b613b3e4ac80ec291ebdbc08c70c7ce81af1f689d9eaf32bac3a027
+SIZE (zchunk-zchunk-1.1.6_GH0.tar.gz) = 1448800
diff --git a/archivers/zchunk/files/patch-meson.build b/archivers/zchunk/files/patch-meson.build
new file mode 100644
index 000000000000..aad04c686dbe
--- /dev/null
+++ b/archivers/zchunk/files/patch-meson.build
@@ -0,0 +1,22 @@
+--- meson.build.orig 2020-03-14 23:03:28 UTC
++++ meson.build
+@@ -31,9 +31,18 @@ endif
+ if get_option('with-openssl') == 'disabled'
+ openssl_dep = dependency('', required : false)
+ else
+- openssl_dep = dependency('openssl', required : get_option('with-openssl') == 'enabled')
++ openssl_dep = dependency('openssl', required: false)
+ if openssl_dep.found()
+ add_project_arguments('-DZCHUNK_OPENSSL', language : 'c')
++ else
++ openssl_dep = [
++ cc.find_library('ssl', required: get_option('with-openssl') == 'enabled'),
++ cc.find_library('crypto', required: get_option('with-openssl') == 'enabled')
++ ]
++ openssl_dep = openssl_dep[0]
++ if openssl_dep.found()
++ add_project_arguments('-DZCHUNK_OPENSSL', language : 'c')
++ endif
+ endif
+ endif
+
diff --git a/archivers/zchunk/files/patch-src_lib_index_index__read.c b/archivers/zchunk/files/patch-src_lib_index_index__read.c
new file mode 100644
index 000000000000..99172b56fa74
--- /dev/null
+++ b/archivers/zchunk/files/patch-src_lib_index_index__read.c
@@ -0,0 +1,14 @@
+--- src/lib/index/index_read.c.orig 2020-09-25 20:29:27 UTC
++++ src/lib/index/index_read.c
+@@ -28,7 +28,11 @@
+ #include <stdint.h>
+ #include <stdbool.h>
+ #include <string.h>
++#if !defined(__FreeBSD__)
+ #include <endian.h>
++#else
++#include <sys/endian.h>
++#endif
+ #include <zck.h>
+
+ #include "zck_private.h"
diff --git a/archivers/zchunk/pkg-descr b/archivers/zchunk/pkg-descr
new file mode 100644
index 000000000000..b7245bd95998
--- /dev/null
+++ b/archivers/zchunk/pkg-descr
@@ -0,0 +1,8 @@
+zchunk is a compressed file format that splits the file into independent chunks.
+This allows you to only download changed chunks when downloading a new version
+of the file, and also makes zchunk files efficient over rsync.
+
+zchunk files are protected with strong checksums to verify that the file you
+downloaded is, in fact, the file you wanted.
+
+WWW: https://github.com/zchunk/zchunk
diff --git a/archivers/zchunk/pkg-plist b/archivers/zchunk/pkg-plist
new file mode 100644
index 000000000000..caa93791fbbf
--- /dev/null
+++ b/archivers/zchunk/pkg-plist
@@ -0,0 +1,11 @@
+bin/unzck
+bin/zck
+bin/zck_delta_size
+bin/zck_gen_zdict
+bin/zck_read_header
+bin/zckdl
+include/zck.h
+lib/libzck.so
+lib/libzck.so.1
+lib/libzck.so.1.1.6
+libdata/pkgconfig/zck.pc