Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2020 21:38:14 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r550085 - in head/archivers: . zchunk zchunk/files
Message-ID:  <202009252138.08PLcEWo022883@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Fri Sep 25 21:38:13 2020
New Revision: 550085
URL: https://svnweb.freebsd.org/changeset/ports/550085

Log:
  New port: archivers/zchunk: Compressed file format that splits the file into independent chunks

Added:
  head/archivers/zchunk/
  head/archivers/zchunk/Makefile   (contents, props changed)
  head/archivers/zchunk/distinfo   (contents, props changed)
  head/archivers/zchunk/files/
  head/archivers/zchunk/files/patch-meson.build   (contents, props changed)
  head/archivers/zchunk/files/patch-src_lib_index_index__read.c   (contents, props changed)
  head/archivers/zchunk/pkg-descr   (contents, props changed)
  head/archivers/zchunk/pkg-plist   (contents, props changed)
Modified:
  head/archivers/Makefile

Modified: head/archivers/Makefile
==============================================================================
--- head/archivers/Makefile	Fri Sep 25 21:34:40 2020	(r550084)
+++ head/archivers/Makefile	Fri Sep 25 21:38:13 2020	(r550085)
@@ -248,6 +248,7 @@
     SUBDIR += xdms
     SUBDIR += xmill
     SUBDIR += xpk
+    SUBDIR += zchunk
     SUBDIR += zip
     SUBDIR += zip-ada
     SUBDIR += zipmix

Added: head/archivers/zchunk/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/zchunk/Makefile	Fri Sep 25 21:38:13 2020	(r550085)
@@ -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>

Added: head/archivers/zchunk/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/zchunk/distinfo	Fri Sep 25 21:38:13 2020	(r550085)
@@ -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

Added: head/archivers/zchunk/files/patch-meson.build
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/zchunk/files/patch-meson.build	Fri Sep 25 21:38:13 2020	(r550085)
@@ -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
+ 

Added: head/archivers/zchunk/files/patch-src_lib_index_index__read.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/zchunk/files/patch-src_lib_index_index__read.c	Fri Sep 25 21:38:13 2020	(r550085)
@@ -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"

Added: head/archivers/zchunk/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/zchunk/pkg-descr	Fri Sep 25 21:38:13 2020	(r550085)
@@ -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

Added: head/archivers/zchunk/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/zchunk/pkg-plist	Fri Sep 25 21:38:13 2020	(r550085)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009252138.08PLcEWo022883>