Diff nbd-3.25-r1 with a nbd-9999

/usr/portage/sys-block/nbd/nbd-9999.ebuild 2026-10-13 20:03:07.308579586 +0300
1
# Copyright 1999-2025 Gentoo Authors
1
# Copyright 1999-2026 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
inherit systemd
6
inherit autotools systemd
7 7

  
8 8
DESCRIPTION="Userland client/server for kernel network block device"
9 9
HOMEPAGE="https://nbd.sourceforge.io/"
10 10

  
11 11
if [[ ${PV} == 9999 ]] ; then
12
	inherit autotools git-r3
12
	inherit git-r3
13 13
	EGIT_REPO_URI="https://github.com/NetworkBlockDevice/nbd.git"
14 14
else
15
	SRC_URI="https://github.com/NetworkBlockDevice/nbd/releases/download/${P}/${P}.tar.xz"
16
	SRC_URI+=" https://downloads.sourceforge.net/nbd/${P}.tar.xz"
17
	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~sparc x86"
15
	# Use auto-generated tarballs for now as there's no dist tarball available
16
	# See https://github.com/NetworkBlockDevice/nbd/issues/198
17
	SRC_URI="https://github.com/NetworkBlockDevice/nbd/archive/refs/tags/${P}.tar.gz"
18
	S="${WORKDIR}/${PN}-${P}"
19

  
20
	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~sparc ~x86"
18 21
fi
19 22

  
20 23
LICENSE="GPL-2"
21 24
SLOT="0"
22
IUSE="debug gnutls netlink zlib"
25
IUSE="debug gnutls"
23 26

  
24 27
RDEPEND="
25 28
	>=dev-libs/glib-2.32.0
29
	>=dev-libs/libnl-3.1
26 30
	gnutls? ( >=net-libs/gnutls-2.12.0 )
27
	netlink? ( >=dev-libs/libnl-3.1 )
28
	zlib? ( virtual/zlib:= )
29 31
"
30 32
DEPEND="${RDEPEND}"
31 33
BDEPEND="
34
	app-text/docbook-sgml-dtd:4.5
35
	app-text/docbook-sgml-utils
36
	dev-build/autoconf-archive
32 37
	sys-devel/bison
38
	sys-devel/flex
33 39
	virtual/pkgconfig
34 40
"
35 41

  
36
PATCHES=(
37
	"${FILESDIR}/${PN}-3.25-fix-build-on-musl-gcc14.patch"
38
)
39

  
40
if [[ ${PV} == 9999 ]] ; then
41
	BDEPEND+="
42
		app-text/docbook-sgml-dtd:4.5
43
		app-text/docbook-sgml-utils
44
		dev-build/autoconf-archive
45
	"
46
fi
47

  
48 42
src_prepare() {
49 43
	default
50 44

  
51
	if [[ ${PV} == 9999 ]] ; then
52
		emake -C man -f mans.mk \
53
			nbd-server.1.sh.in \
54
			nbd-server.5.sh.in \
55
			nbd-client.8.sh.in \
56
			nbd-trdump.1.sh.in \
57
			nbd-trplay.1.sh.in \
58
			nbdtab.5.sh.in
59

  
60
		emake -C systemd -f Makefile.am nbd@.service.sh.in
45
	emake -C systemd -f Makefile.am nbd@.service.sh.in
61 46

  
62
		eautoreconf
63
	fi
47
	eautoreconf
64 48
}
65 49

  
66 50
src_configure() {
67
	# Needs Bison
68
	unset YACC
51
	# Needs Bison and flex
52
	unset YACC LEX
69 53

  
70 54
	local myeconfargs=(
71 55
		--enable-lfs
72
		# https://github.com/NetworkBlockDevice/nbd/issues/149
73
		--disable-gznbd
56
		--with-libnl
74 57
		$(use_enable !debug syslog)
75 58
		$(use_enable debug)
76 59
		$(use_with gnutls)
77
		$(use_with netlink libnl)
78 60
	)
79 61

  
80 62
	econf "${myeconfargs[@]}"
Thank you!