summaryrefslogtreecommitdiff
path: root/misc/py-anita
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2014-05-20 18:06:07 +0000
committergdt <gdt@pkgsrc.org>2014-05-20 18:06:07 +0000
commitb89e68d1744a18487c963eb808a4058dc9440db6 (patch)
treec446bd66788e595377b0106b8417f8d69d90c900 /misc/py-anita
parent75168fab01b398bf10a2ff49d45ef430cadeafdc (diff)
downloadpkgsrc-b89e68d1744a18487c963eb808a4058dc9440db6.tar.gz
Add options for qemu and xen, and disable all by default.
Before, anita depended on qemu0 or qemu. Now, it has options for qemu-0, qemu (currently 2) and xen (currently 4.1). By default, all are off because all of them are quite large and they need only be present at run time. Discussed with gson@, who did not object.
Diffstat (limited to 'misc/py-anita')
-rw-r--r--misc/py-anita/Makefile3
-rw-r--r--misc/py-anita/options.mk43
2 files changed, 38 insertions, 8 deletions
diff --git a/misc/py-anita/Makefile b/misc/py-anita/Makefile
index 49d66d45e96..ec904596bd6 100644
--- a/misc/py-anita/Makefile
+++ b/misc/py-anita/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.30 2014/05/09 07:37:12 wiz Exp $
+# $NetBSD: Makefile,v 1.31 2014/05/20 18:06:07 gdt Exp $
DISTNAME= anita-1.32
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= misc
MASTER_SITES= http://www.gson.org/netbsd/anita/download/
diff --git a/misc/py-anita/options.mk b/misc/py-anita/options.mk
index e52c75350ae..816f18954fd 100644
--- a/misc/py-anita/options.mk
+++ b/misc/py-anita/options.mk
@@ -1,14 +1,43 @@
-# $NetBSD: options.mk,v 1.3 2014/01/16 13:48:26 wiz Exp $
+# $NetBSD: options.mk,v 1.4 2014/05/20 18:06:07 gdt Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.py-anita
-PKG_SUPPORTED_OPTIONS= qemu-0
-PKG_SUGGESTED_OPTIONS= qemu-0
+PKG_SUPPORTED_OPTIONS= qemu-0 qemu xen
+PKG_SUGGESTED_OPTIONS=
+
+# To run (but not to build), anita needs some way to run a virtual
+# machine. The standard approach is qemu-0, because it is known to
+# work. Newer qemu is problematic. xen also works, but is less well
+# tested. See anita(1) for details of the above.
+
+# By default, py-anita does not depend on any of these, because a
+# hypervisor one doesn't want to use is a large burden (qemu in
+# particular is very large). While these options can be enabled, they
+# also serve to document ways to fulfill the hypervisor requirement.
.include "../../mk/bsd.options.mk"
-# qemu1 does not work reliably. See the anita(1) man page.
-.if empty(PKG_OPTIONS:Mqemu-0)
-DEPENDS+= qemu>=1.0:../../emulators/qemu
-.else
+# In the future, qemu0 and qemu might install with different names,
+# allowing anita to choose them dynamically. For now, they conflict,
+# so don't try to build both.
+.if !empty(PKG_OPTIONS:Mqemu-0) && !empty(PKG_OPTIONS:Mqemu)
+.error py-anita: qemu-0 and qemu (currently) conflict
+.endif
+
+.if !empty(PKG_OPTIONS:Mqemu-0)
DEPENDS+= qemu>=0.12.3nb2:../../emulators/qemu0
.endif
+
+.if !empty(PKG_OPTIONS:Mqemu)
+# qemu1/2 does not work reliably. See the anita(1) man page.
+DEPENDS+= qemu>=1.0:../../emulators/qemu
+.endif
+
+.if !empty(PKG_OPTIONS:Mxen)
+# Choose 4.1 because that has been tested (with --vmm xm) and is
+# arguably a reasonable version to recommend to people wanting to
+# install xen to run anita. (A good case can be made for 4.2, and
+# anyone who has tested it with anita is welcome to change this to
+# 4.2.)
+DEPENDS+= xenkernel41>=4.1:../../sysutils/xenkernel41
+DEPENDS+= xentools41>=4.1:../../sysutils/xentools41
+.endif