devel/libvirt: fix BHYVE option

- Drop OSVERSION check that's always true because of incorrect
   version value
 - Fix plist when BHYVE option is disabled on systems where it's
   available

While here, clean up trailing whitespace.

Differential Revision:	D4109
This commit is contained in:
Roman Bogorodskiy 2015-11-12 16:31:16 +00:00
parent 3bf57d92c4
commit 06c0d21d3b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=401365
2 changed files with 9 additions and 20 deletions

View file

@ -27,6 +27,9 @@ OPTIONS_DEFINE_amd64= XEN
.if exists(/usr/sbin/bhyve)
OPTIONS_DEFINE_amd64+= BHYVE
OPTIONS_DEFAULT_amd64+= BHYVE
.else
PLIST_SUB+= BHYVE="@comment "
CONFIGURE_ARGS+= --without-bhyve
.endif
QEMU_DESC= QEMU driver
BHYVE_DESC= bhyve driver
@ -34,6 +37,8 @@ XEN_DESC= Xen support via libxl
OPTIONS_SUB= yes
BHYVE_CONFIGURE_WITH= bhyve
QEMU_CONFIGURE_WITH= qemu yajl
QEMU_CFLAGS= -I${LOCALBASE}/include
QEMU_LIB_DEPENDS= libyajl.so:${PORTSDIR}/devel/yajl
@ -56,7 +61,7 @@ VARDIR= /var
USE_RC_SUBR= libvirtd
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --without-avahi \
CONFIGURE_ARGS+= --without-avahi \
--without-polkit \
--without-hal \
--without-udev \
@ -82,7 +87,7 @@ USE_PERL5= build
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
SHLIB_VER= 0.1002.${PORTVERSION:E}
PLIST_SUB= PORTVERSION="-${PORTVERSION}" \
PLIST_SUB+= PORTVERSION="-${PORTVERSION}" \
SHLIB_VER=${SHLIB_VER}
PORTDOCS= *
@ -90,17 +95,6 @@ SUB_FILES= pkg-message
.include <bsd.port.options.mk>
.if (exists(/usr/sbin/bhyve) && ${OSVERSION} >= 100051)
CONFIGURE_ARGS+= --with-bhyve
.else
CONFIGURE_ARGS+= --without-bhyve
.endif
.if ${PORT_OPTIONS:MBHYVE}
STRIP_FILES+= lib/libvirt/connection-driver/libvirt_driver_bhyve.so
PLIST_FILES+= lib/libvirt/connection-driver/libvirt_driver_bhyve.so
.endif
.if !${PLIST_SUB:MXEN}
PLIST_SUB+= XEN="@comment "
.endif
@ -146,12 +140,6 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
.endfor
.if ${PORT_OPTIONS:MBHYVE}
.for strip in ${STRIP_FILES}
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${strip}
.endfor
.endif
.for dir in run/libvirt/network \
run/libvirt/qemu \
run/libvirt/lockd \

View file

@ -295,6 +295,7 @@ share/gtk-doc/html/libvirt/up.png
%%NLS%%share/locale/zh_CN/LC_MESSAGES/libvirt.mo
%%NLS%%share/locale/zh_TW/LC_MESSAGES/libvirt.mo
%%NLS%%share/locale/zu/LC_MESSAGES/libvirt.mo
%%BHYVE%%lib/libvirt/connection-driver/libvirt_driver_bhyve.so
%%QEMU%%lib/libvirt/connection-driver/libvirt_driver_qemu.so
lib/libvirt/connection-driver/libvirt_driver_network.so
lib/libvirt/connection-driver/libvirt_driver_secret.so