sys-block/libzbc: New package

Package-Manager: Portage-2.3.31, Repoman-2.3.9
This commit is contained in:
Patrick McLean
2018-04-20 10:34:20 -07:00
parent c3de07e523
commit 17d0c58e84
4 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST libzbc-5.5.0.tar.gz 128170 BLAKE2B 9b5ce6a6627f276aaab714fb724d72b3611b21fe79327486927690e7e99557eb9a07c843f46c563a6629033c1045c44be10c856058e804c8c7fd5c139d06c140 SHA512 63c9f67f451e2e609037a74766ebc3274c1a12cbf3b7c658a5144bf307f5b9ec0e075f018ce49839ecf2c5dca54a1e8b85ffdd2dfa66f14a55f14fa5762b4f2d

View File

@@ -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],

View File

@@ -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)
}

View File

@@ -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>