summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-block/libzbc')
-rw-r--r--sys-block/libzbc/Manifest1
-rw-r--r--sys-block/libzbc/files/libzbc-no-automagic-gtk-dep.patch29
-rw-r--r--sys-block/libzbc/libzbc-5.5.0.ebuild32
-rw-r--r--sys-block/libzbc/metadata.xml19
4 files changed, 81 insertions, 0 deletions
diff --git a/sys-block/libzbc/Manifest b/sys-block/libzbc/Manifest
new file mode 100644
index 000000000000..38fe2daf7528
--- /dev/null
+++ b/sys-block/libzbc/Manifest
@@ -0,0 +1 @@
+DIST libzbc-5.5.0.tar.gz 128170 BLAKE2B 9b5ce6a6627f276aaab714fb724d72b3611b21fe79327486927690e7e99557eb9a07c843f46c563a6629033c1045c44be10c856058e804c8c7fd5c139d06c140 SHA512 63c9f67f451e2e609037a74766ebc3274c1a12cbf3b7c658a5144bf307f5b9ec0e075f018ce49839ecf2c5dca54a1e8b85ffdd2dfa66f14a55f14fa5762b4f2d
diff --git a/sys-block/libzbc/files/libzbc-no-automagic-gtk-dep.patch b/sys-block/libzbc/files/libzbc-no-automagic-gtk-dep.patch
new file mode 100644
index 000000000000..c6545033b435
--- /dev/null
+++ b/sys-block/libzbc/files/libzbc-no-automagic-gtk-dep.patch
@@ -0,0 +1,29 @@
+diff --git a/configure.ac b/configure.ac
+index 122fd22..5ab9783 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,10 +31,22 @@ AC_CHECK_HEADER(libgen.h, [], [AC_MSG_ERROR([Couldn't find libgen.h])])
+ AC_CHECK_HEADERS([linux/fs.h linux/blkzoned.h])
+
+ # Conditionals
++AC_ARG_WITH([gtk3],
++ AS_HELP_STRING([--without-gtk3], [Do not build gzbc even if gtk3 is present]))
++
++AS_IF([test "x$with_gtk3" != "xno"],
++ [PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0])],
++ [have_gtk3=no])
++
++AS_IF([test "x$with_gtk3" = "xyes"],
++ [PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0])],
++ [AS_IF([test "x$with_gtk3" = "xyes"],
++ [AC_MSG_ERROR([gtk3 requested but not found])
++ ])
++])
+
+ # Build gzbc only if GTK3 is installed.
+-PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0])
+-AM_CONDITIONAL([BUILD_GZBC], [test "$HAVE_GTK3" -eq 1])
++AM_CONDITIONAL([BUILD_GZBC], [test "$HAVE_GTK3" = 1])
+
+ # Build test suite
+ AC_ARG_WITH([test],
diff --git a/sys-block/libzbc/libzbc-5.5.0.ebuild b/sys-block/libzbc/libzbc-5.5.0.ebuild
new file mode 100644
index 000000000000..5c726ff8a47f
--- /dev/null
+++ b/sys-block/libzbc/libzbc-5.5.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="A library and tools for working with ZBC and ZAC disks"
+HOMEPAGE="https://github.com/hgst/libzbc"
+SRC_URI="https://github.com/hgst/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk"
+
+DEPEND="virtual/pkgconfig
+ >=sys-kernel/linux-headers-4.13
+ gtk? ( x11-libs/gtk+:3 )"
+
+PATCHES=(
+ "${FILESDIR}/libzbc-no-automagic-gtk-dep.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with gtk gtk3)
+}
diff --git a/sys-block/libzbc/metadata.xml b/sys-block/libzbc/metadata.xml
new file mode 100644
index 000000000000..c590b2af8790
--- /dev/null
+++ b/sys-block/libzbc/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <longdescription lang="en">
+ libzbc is a simple library providing functions for manipulating disks
+ supporting the Zoned Block Command (ZBC) and Zoned-device ATA command
+ set (ZAC) disks. libzbc implemention is compliant with the latest
+ drafts of the ZBC and ZAC standards defined by INCITS technical
+ committee T10 and T13 (respectively).
+
+ In addition to supporting ZBC and ZAC disks, libzbc also implements an
+ emulation mode allowing emulating the behavior of a host-managed zoned
+ disk using a regular file or a standard block device as backing store.
+ </longdescription>
+</pkgmetadata>