summaryrefslogtreecommitdiff
path: root/net/nbdkit/Makefile
blob: 15385669ce8de7607ab541d5757b5325d0f603d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
PORTNAME=	nbdkit
PORTVERSION=	1.20.4
PORTREVISION=	1
CATEGORIES=	net
# XXX Although nbdkit uses github for its homepage, the release tarballs served
# by github haven't been through autoconf.  So we must download the sources
# from libguestfs.org instead.
MASTER_SITES=	http://download.libguestfs.org/${PORTNAME}/${PORTVERSION:R}-stable/

MAINTAINER=	asomers@FreeBSD.org
COMMENT=	Network Block Device server toolkit with stable ABI and permissive license

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	bash:shells/bash \
		bash-completion>0:shells/bash-completion

USES=		compiler:c11 gmake libtool pkgconfig

GNU_CONFIGURE=	yes
INSTALL_TARGET=	install-strip
TEST_TARGET=	check

# Rust consumers will download the Rust plugin from crates.io
CONFIGURE_ARGS+=	--disable-rust
# These libraries does not exist on ports
CONFIGURE_ARGS+=	--without-libnbd
CONFIGURE_ARGS+=	--without-libguestfs
# We could theoretically build these other plugins, if anybody cares to.
CONFIGURE_ARGS+=	--disable-ocaml
CONFIGURE_ARGS+=	--disable-tcl
CONFIGURE_ARGS+=	--disable-lua
CONFIGURE_ARGS+=	--disable-golang
CONFIGURE_ARGS+=	--disable-vddk
CONFIGURE_ARGS+=	--without-ext2
CONFIGURE_ARGS+=	--without-iso
CONFIGURE_ARGS+=	--without-linuxdisk
USE_LDCONFIG=		yes

OPTIONS_DEFINE=	CURL GNUTLS LIBVIRT LZMA MANPAGES PERL PYTHON RUBY SSH ZLIB
GNUTLS_BUILD_DEPENDS=	gnutls>0:security/gnutls
GNUTLS_RUN_DEPENDS=	gnutls>0:security/gnutls

OPTIONS_DEFAULT=	GNUTLS MANPAGES
OPTIONS_SUB=		yes

CURL_BUILD_DEPENDS+=	curl:ftp/curl
CURL_CONFIGURE_WITH=	curl
CURL_RUN_DEPENDS+=	curl:ftp/curl
LIBVIRT_CONFIGURE_WITH=	libvirt
LIBVIRT_LIB_DEPENDS=	libvirt.so:devel/libvirt
LZMA_CONFIGURE_WITH=	liblzma
LZMA_LIB_DEPENDS=	liblzma.so:archivers/lzmalib
MANPAGES_USE+=		perl5=build
MANPAGES_USES+=		perl5
PERL_CONFIGURE_ENABLE=	perl
PERL_USE+=		perl5
PYTHON_CONFIGURE_ENABLE=	python
PYTHON_USES+=		python:3.3+
RUBY_CONFIGURE_ENABLE=	ruby
RUBY_USE+=		ruby
SSH_CONFIGURE_WITH=	ssh
SSH_LIB_DEPENDS=	libssh.so:security/libssh
ZLIB_CONFIGURE_WITH=	zlib

.include <bsd.port.mk>