summaryrefslogtreecommitdiff
path: root/sysutils/xentools3-hvm/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/xentools3-hvm/Makefile')
-rw-r--r--sysutils/xentools3-hvm/Makefile34
1 files changed, 28 insertions, 6 deletions
diff --git a/sysutils/xentools3-hvm/Makefile b/sysutils/xentools3-hvm/Makefile
index 0fdecb6adc0..88db870722f 100644
--- a/sysutils/xentools3-hvm/Makefile
+++ b/sysutils/xentools3-hvm/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
+# $NetBSD: Makefile,v 1.2 2007/12/02 18:55:30 bouyer Exp $
#
VERSION= 3.1.0
+PKGREVISION= 1
DISTNAME= xen-${VERSION}-src
PKGNAME= xentools3-hvm-${VERSION}
CATEGORIES= sysutils
@@ -17,7 +18,8 @@ BUILD_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
PKG_SYSCONFSUBDIR= xen
-ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 NetBSD-*-i386
+ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 Linux-2.[46]*-x86_64
+ONLY_FOR_PLATFORM+= NetBSD-*-i386 NetBSD-*-x86_64
CONFLICTS= xentools30-*
@@ -31,7 +33,13 @@ USE_TOOLS+= perl
USE_TOOLS+= gmake
MAKE_ENV+= EGDIR=${EGDIR:Q}
MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
-MAKE_ENV+= XEN_TARGET_ARCH="x86_32"
+.if ${MACHINE_ARCH} == "i386"
+MAKE_ENV+= XEN_TARGET_ARCH="x86_32" XEN_COMPILE_ARCH="x86_32"
+.elif ${MACHINE_ARCH} == "x86_64"
+MAKE_ENV+= XEN_TARGET_ARCH="x86_64" XEN_COMPILE_ARCH="x86_64"
+.else
+MAKE_ENV+= XEN_TARGET_ARCH="unsupported"
+.endif
PYTHON_VERSIONS_ACCEPTED= 24 23
SUBST_CLASSES+= paths
@@ -65,11 +73,25 @@ PROCPATH= /kern
PROCPATH= /proc
.endif
+CONF_FILES_PERMS+= ${EGDIR}/qemu-ifup ${PKG_SYSCONFDIR}/scripts/qemu-ifup \
+ ${ROOT_USER} ${ROOT_GROUP} 0755
+
+OWN_DIRS= ${PKG_SYSCONFDIR}/scripts
+
pre-build:
${MKDIR} ${WRKSRC}/libxc/xen/NetBSD
- ${TEST} -f ${WRKSRC}/libxc/xen/NetBSD/xenio.h || ${CP} ${FILESDIR}/xenio.h ${WRKSRC}/libxc/xen/NetBSD
- ${TEST} -f ${WRKSRC}/libxc/xen/NetBSD/xenio3.h || ${CP} ${FILESDIR}/xenio3.h ${WRKSRC}/libxc/xen/NetBSD
+ ${TEST} -f ${WRKSRC}/libxc/xen/NetBSD/xenio.h || \
+ ${CP} ${FILESDIR}/xenio.h ${WRKSRC}/libxc/xen/NetBSD
+ ${TEST} -f ${WRKSRC}/libxc/xen/NetBSD/xenio3.h || \
+ ${CP} ${FILESDIR}/xenio3.h ${WRKSRC}/libxc/xen/NetBSD
${CP} ${FILESDIR}/NetBSD.mk ${WRKSRC}/../config/
+.if ${MACHINE_ARCH} == "x86_64"
+ ${MKDIR} ${WRKSRC}/libxc/machine
+ ${TEST} -f ${WRKSRC}/libxc/machine/int_types.h || \
+ ${CP} ${FILESDIR}/int_types.h ${WRKSRC}/libxc/machine
+ ${TEST} -f ${WRKSRC}/libxc/machine/elf_machdep.h || \
+ ${CP} ${FILESDIR}/elf_machdep.h ${WRKSRC}/libxc/machine
+.endif
.if ${OPSYS} == "NetBSD"
post-build:
@@ -82,7 +104,7 @@ post-build:
.endif
post-install:
- for f in hvm; do \
+ for f in hvm qemu-ifup; do \
${INSTALL_DATA} ${WRKSRC}/examples/$$f ${EGDIR}/$$f; \
done