Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 2021 01:50:40 GMT
From:      "Jason W. Bacon" <jwb@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 35f24e09c672 - main - archivers/vbz-compression: Compression for Oxford Nanopore signal data
Message-ID:  <202108130150.17D1oehJ021642@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jwb:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35f24e09c6727c745478197cdd15e9294238884f

commit 35f24e09c6727c745478197cdd15e9294238884f
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2021-08-13 01:48:47 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2021-08-13 01:50:35 +0000

    archivers/vbz-compression: Compression for Oxford Nanopore signal data
    
    VBZ Compression uses variable byte integer encoding to compress Oxford
    Nanopore signal data.
---
 archivers/Makefile                                 |  1 +
 archivers/vbz-compression/Makefile                 | 31 ++++++++++++++++++
 archivers/vbz-compression/distinfo                 |  3 ++
 .../vbz-compression/files/patch-CMakeLists.txt     | 37 ++++++++++++++++++++++
 .../vbz-compression/files/patch-vbz_CMakeLists.txt | 15 +++++++++
 archivers/vbz-compression/pkg-descr                | 10 ++++++
 6 files changed, 97 insertions(+)

diff --git a/archivers/Makefile b/archivers/Makefile
index 22c1259cb943..fca4d8a860c5 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -245,6 +245,7 @@
     SUBDIR += urbackup-client
     SUBDIR += urbackup-server
     SUBDIR += v1541commander
+    SUBDIR += vbz-compression
     SUBDIR += xar
     SUBDIR += xarchive
     SUBDIR += xarchiver
diff --git a/archivers/vbz-compression/Makefile b/archivers/vbz-compression/Makefile
new file mode 100644
index 000000000000..db7a778e88ba
--- /dev/null
+++ b/archivers/vbz-compression/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	vbz-compression
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.0.1
+CATEGORIES=	archivers
+
+MAINTAINER=	jwb@FreeBSD.org
+COMMENT=	Variable byte integer encoding to compress Oxford Nanopore signal data
+
+LICENSE=	MPL20
+LICENSE_FILE=	${WRKSRC}/LICENCE.txt
+
+BUILD_DEPENDS=	streamvbyte>=0.4.1:archivers/streamvbyte
+LIB_DEPENDS=	libhdf5.so:science/hdf5 \
+		libzstd.so:archivers/zstd
+
+USES=		cmake
+USE_GITHUB=	yes
+USE_LDCONFIG=	${PREFIX}/hdf5/lib/plugin
+
+GH_ACCOUNT=	nanoporetech
+GH_PROJECT=	vbz_compression
+
+CMAKE_ARGS=	-DENABLE_CONAN=OFF \
+		-DENABLE_PERF_TESTING=OFF \
+		-DENABLE_PYTHON=OFF \
+		-DSTREAMVBYTE_INSTALL_DIR=${LOCALBASE} \
+		-DSTREAMVBYTE_STATIC_LIB=${LOCALBASE}/lib/libstreamvbyte_static.a
+
+PLIST_FILES=	hdf5/lib/plugin/libvbz_hdf_plugin.so
+
+.include <bsd.port.mk>
diff --git a/archivers/vbz-compression/distinfo b/archivers/vbz-compression/distinfo
new file mode 100644
index 000000000000..38af63eba95a
--- /dev/null
+++ b/archivers/vbz-compression/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1628777147
+SHA256 (nanoporetech-vbz_compression-v1.0.1_GH0.tar.gz) = 3c140fb4f60f8451db68768457c59b10aadba4c33f1b1a1eadb4439345b68192
+SIZE (nanoporetech-vbz_compression-v1.0.1_GH0.tar.gz) = 5292519
diff --git a/archivers/vbz-compression/files/patch-CMakeLists.txt b/archivers/vbz-compression/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..048c9e78875d
--- /dev/null
+++ b/archivers/vbz-compression/files/patch-CMakeLists.txt
@@ -0,0 +1,37 @@
+--- CMakeLists.txt.orig	2020-06-19 15:45:38 UTC
++++ CMakeLists.txt
+@@ -139,34 +139,6 @@ find_package(HDF5 1.8.16)
+ find_package(zstd 1.3.1 REQUIRED)
+ find_package(Sanitizers)
+ 
+-get_filename_component(STREAMVBYTE_SOURCE_DIR
+-    third_party/streamvbyte
+-    ABSOLUTE
+-)
+-set(STREAMVBYTE_INSTALL_DIR "${CMAKE_BINARY_DIR}/streamvbyte_lib/")
+-set(STREAMVBYTE_PREFIX ${CMAKE_BINARY_DIR}/streamvbyte)
+-set(STREAMVBYTE_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}streamvbyte_static${CMAKE_STATIC_LIBRARY_SUFFIX})
+-set(STREAMVBYTE_STATIC_LIB_SUBDIR ".")
+-get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+-if (is_multi_config)
+-    set(STREAMVBYTE_STATIC_LIB_SUBDIR "$<CONFIG>")
+-endif()
+-ExternalProject_Add(
+-    streamvbyte
+-    SOURCE_DIR ${STREAMVBYTE_SOURCE_DIR}
+-    UPDATE_DISCONNECTED TRUE
+-    PREFIX ${STREAMVBYTE_PREFIX}
+-    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${STREAMVBYTE_INSTALL_DIR} -DSTREAMVBYTE_DISABLE_NATIVE=ON -DSTD_FLAGS="-std=c99"
+-    # We need to tell CMake about libraries we will link to, otherwise some generators (eg: Ninja)
+-    # complain about how knowing how to build libstreamvbyte_static.a, for example.
+-    # Ideally, we'd set a hypothetical INSTALL_BYPRODUCTS, and link to the installed file, but that
+-    # doesn't seem to be an option.
+-    BUILD_BYPRODUCTS "<BINARY_DIR>/${STREAMVBYTE_STATIC_LIB_NAME}"
+-)
+-ExternalProject_Get_Property(streamvbyte BINARY_DIR)
+-set(STREAMVBYTE_STATIC_LIB "${BINARY_DIR}/${STREAMVBYTE_STATIC_LIB_SUBDIR}/${STREAMVBYTE_STATIC_LIB_NAME}")
+-
+-
+ ########################################################################
+ #
+ # Warnings
diff --git a/archivers/vbz-compression/files/patch-vbz_CMakeLists.txt b/archivers/vbz-compression/files/patch-vbz_CMakeLists.txt
new file mode 100644
index 000000000000..fe9d4131a9f9
--- /dev/null
+++ b/archivers/vbz-compression/files/patch-vbz_CMakeLists.txt
@@ -0,0 +1,15 @@
+--- vbz/CMakeLists.txt.orig	2020-06-19 15:45:38 UTC
++++ vbz/CMakeLists.txt
+@@ -25,12 +25,6 @@ target_include_directories(vbz
+         ${STREAMVBYTE_INSTALL_DIR}/include
+ )
+ 
+-# This explicit dependency is required to make sure the header files are installed into the right
+-# location before we try building against them.
+-add_dependencies(vbz
+-    streamvbyte
+-)
+-
+ if (WIN32 OR APPLE OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
+     if(NOT MSVC)
+         target_compile_options(vbz PRIVATE -mssse3)
diff --git a/archivers/vbz-compression/pkg-descr b/archivers/vbz-compression/pkg-descr
new file mode 100644
index 000000000000..78a0d6ace188
--- /dev/null
+++ b/archivers/vbz-compression/pkg-descr
@@ -0,0 +1,10 @@
+VBZ Compression uses variable byte integer encoding to compress Oxford
+Nanopore signal data.
+
+The performance of VBZ is achieved by taking advantage of the properties of the
+raw signal and therefore is most effective when applied to the signal dataset.
+Other datasets you may have in your Fast5 files will not be able to take
+advantage of the default VBZ settings for compression. VBZ will be used as the
+default compression scheme in a future release of MinKNOW.
+
+WWW: https://github.com/nanoporetech/vbz_compression



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