summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@gentoo.org>2023-05-14 13:41:57 +0200
committerArsen Arsenović <arsen@gentoo.org>2023-05-14 18:41:16 +0200
commit309cba15a7f84ecf2f64b1d88a69a0a43b02cbeb (patch)
treec6f8c9cd964e69c2eba07bf80a5a57d908d6b74c /sys-libs
parentsci-libs/jiwer: new package, add 3.0.1 (diff)
downloadgentoo-309cba15a7f84ecf2f64b1d88a69a0a43b02cbeb.tar.gz
gentoo-309cba15a7f84ecf2f64b1d88a69a0a43b02cbeb.tar.bz2
gentoo-309cba15a7f84ecf2f64b1d88a69a0a43b02cbeb.zip
sys-libs/libnbd: add 1.16.1
Co-authored-by: INODE64 <ffelix@inode64.com> Signed-off-by: INODE64 <ffelix@inode64.com> Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libnbd/Manifest1
-rw-r--r--sys-libs/libnbd/libnbd-1.16.1.ebuild80
-rw-r--r--sys-libs/libnbd/metadata.xml3
3 files changed, 84 insertions, 0 deletions
diff --git a/sys-libs/libnbd/Manifest b/sys-libs/libnbd/Manifest
index 890270fa6e33..925593c8b6b4 100644
--- a/sys-libs/libnbd/Manifest
+++ b/sys-libs/libnbd/Manifest
@@ -1 +1,2 @@
DIST libnbd-1.14.1.tar.gz 1257547 BLAKE2B 4c2fc02abc1d069b23fb8cc52b3359f10ebd23f2bc8cb359274a4fc2781413445d64ca1013b3123dff090d359a0e28076aa410220a05b155f95320238d1b99ee SHA512 9d95cf7a66926d00ec9aacfc6d04f2dc885ccfed07c78f1e6693190dd14132d30d6d1ff7d46e46007732a8a20a9fbf648775bc0b3371ad49eff4ce1e44e47209
+DIST libnbd-1.16.1.tar.gz 1379437 BLAKE2B 13020c21663e988d46fb5a048b31c58b0256c7c547fee2b95bde139324043d6102a0a901c98ffa75f88eca38cd0293329c62d6613435b74e65802c083af3c58f SHA512 e840cff964e847015955f0a0dcc7d03899d5e0fb0bdd3f5597ec87169d0b2689213fed72fd3afc84300ec86ed10703e9396599c11750ef10df66cf61853210a5
diff --git a/sys-libs/libnbd/libnbd-1.16.1.ebuild b/sys-libs/libnbd/libnbd-1.16.1.ebuild
new file mode 100644
index 000000000000..279ff95f756a
--- /dev/null
+++ b/sys-libs/libnbd/libnbd-1.16.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit bash-completion-r1 python-single-r1
+
+DESCRIPTION="NBD client library in userspace"
+HOMEPAGE="https://gitlab.com/nbdkit/libnbd"
+SRC_URI="https://download.libguestfs.org/libnbd/$(ver_cut 1-2)-stable/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fuse gnutls go ocaml python test uri-support"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+# libxml2 - URI support
+RDEPEND="
+ dev-libs/libxml2
+ fuse? ( sys-fs/fuse:3 )
+ gnutls? ( net-libs/gnutls:= )
+ python? ( ${PYTHON_DEPS} )
+ go? ( dev-lang/go )
+ ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] )
+"
+DEPEND="
+ ${RDEPEND}
+ test? (
+ sys-block/nbd[gnutls?]
+ sys-block/nbdkit[gnutls?]
+ )
+"
+BDEPEND="dev-lang/perl"
+
+src_prepare() {
+ default
+
+ # Some tests require impossible to provide features, such as fuse.
+ # These are marked by requires_... in the functions.sh shell
+ # library. Rather than listing these tests, let's list out the
+ # impossible to support features and make them skip.
+ cat <<-EOF >> tests/functions.sh.in || die
+ requires_fuse ()
+ {
+ requires false
+ }
+ EOF
+
+ # Broken under sandbox.
+ cat <<-EOF > lib/test-fork-safe-execvpe.sh || die
+ #!/bin/sh
+ :
+ EOF
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable fuse)
+ $(use_enable go golang)
+ $(use_enable ocaml)
+ $(use_enable python)
+ $(use_with gnutls)
+ --with-uri-support
+ )
+
+ export bashcompdir="$(get_bashcompdir)"
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+ use python && python_optimize
+}
diff --git a/sys-libs/libnbd/metadata.xml b/sys-libs/libnbd/metadata.xml
index 5ef40b52a00e..907f610bee5a 100644
--- a/sys-libs/libnbd/metadata.xml
+++ b/sys-libs/libnbd/metadata.xml
@@ -16,5 +16,8 @@
<flag name="fuse">
Install the <pkg>sys-fs/fuse</pkg> powered nbdfuse.
</flag>
+ <flag name="go">
+ Build bindings for <pkg>dev-lang/go</pkg>
+ </flag>
</use>
</pkgmetadata>