summaryrefslogtreecommitdiff
path: root/sys-libs/libnbd/libnbd-1.16.1-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-14 22:02:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-14 22:02:07 +0100
commit78db24b58a7f75bf18548cbf5c3b210f2f33f2f4 (patch)
tree53f180d30387a94fd028e0c5a10635621ebeb98f /sys-libs/libnbd/libnbd-1.16.1-r1.ebuild
parent153fd195574cc30040446316bb666af0e58d985f (diff)
gentoo auto-resync : 14:05:2023 - 22:02:07
Diffstat (limited to 'sys-libs/libnbd/libnbd-1.16.1-r1.ebuild')
-rw-r--r--sys-libs/libnbd/libnbd-1.16.1-r1.ebuild80
1 files changed, 80 insertions, 0 deletions
diff --git a/sys-libs/libnbd/libnbd-1.16.1-r1.ebuild b/sys-libs/libnbd/libnbd-1.16.1-r1.ebuild
new file mode 100644
index 000000000000..625b4a38d242
--- /dev/null
+++ b/sys-libs/libnbd/libnbd-1.16.1-r1.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"
+
+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-libxml2
+ )
+
+ export bashcompdir="$(get_bashcompdir)"
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+ use python && python_optimize
+}