aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2015-11-13 00:31:16 +0800
committernovel <novel@FreeBSD.org>2015-11-13 00:31:16 +0800
commit5b310c24cdc6c04b5b89aa1ae5537cd0d3938c80 (patch)
tree3512764998c0e554aa6f28b28839e19bc2182193 /devel
parent9a5e28dc5d4711bd8eebd19daa9743b83b9f8704 (diff)
downloadfreebsd-ports-gnome-5b310c24cdc6c04b5b89aa1ae5537cd0d3938c80.tar.gz
freebsd-ports-gnome-5b310c24cdc6c04b5b89aa1ae5537cd0d3938c80.tar.zst
freebsd-ports-gnome-5b310c24cdc6c04b5b89aa1ae5537cd0d3938c80.zip
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
Diffstat (limited to 'devel')
-rw-r--r--devel/libvirt/Makefile28
-rw-r--r--devel/libvirt/pkg-plist1
2 files changed, 9 insertions, 20 deletions
diff --git a/devel/libvirt/Makefile b/devel/libvirt/Makefile
index e8fe1aa67fb8..339a6e10c727 100644
--- a/devel/libvirt/Makefile
+++ b/devel/libvirt/Makefile
@@ -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
@@ -109,7 +103,7 @@ post-patch:
@${MV} ${WRKSRC}/daemon/libvirtd.conf ${WRKSRC}/daemon/libvirtd.conf.sample
@${REINPLACE_CMD} -e 's|libvirtd\.conf|libvirtd.conf.sample|' \
${WRKSRC}/daemon/Makefile.in
-
+
@${REINPLACE_CMD} -e 's|ln -s ../default.xml|true|' \
-e 's|$$(DESTDIR)$$(confdir)/qemu/networks|${STAGEDIR}${EXAMPLESDIR}/networks|' \
${WRKSRC}/src/Makefile.in
@@ -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 \
diff --git a/devel/libvirt/pkg-plist b/devel/libvirt/pkg-plist
index 3b6ab739b0ad..594c801b3662 100644
--- a/devel/libvirt/pkg-plist
+++ b/devel/libvirt/pkg-plist
@@ -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