summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorbouyer <bouyer>2008-02-17 16:29:03 +0000
committerbouyer <bouyer>2008-02-17 16:29:03 +0000
commita4432894ebdd7db5fdfdf7e9a210ed3b103b703d (patch)
tree4dbb9e8dc8f9effdc4b76d65cad7c00418d1c83c /sysutils
parent80c6e66eac2e0b557671bb0e690a67e085805cce (diff)
downloadpkgsrc-a4432894ebdd7db5fdfdf7e9a210ed3b103b703d.tar.gz
Use /usr/include/xen/xenio*.h if present, falling back to the ones
from files/ (which have the old IOCTL_PRIVCMD_HYPERCALL to be compatible with NetBSD 4.0). Properly handle the new IOCTL_PRIVCMD_HYPERCALL ioctl if present.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xentools3-hvm/Makefile15
-rw-r--r--sysutils/xentools3-hvm/distinfo4
-rw-r--r--sysutils/xentools3-hvm/files/xenio.h6
-rw-r--r--sysutils/xentools3-hvm/patches/patch-au4
-rw-r--r--sysutils/xentools3/Makefile14
-rw-r--r--sysutils/xentools3/distinfo6
-rw-r--r--sysutils/xentools3/files/xenio.h6
-rw-r--r--sysutils/xentools3/patches/patch-ab21
-rw-r--r--sysutils/xentools3/patches/patch-au4
9 files changed, 48 insertions, 32 deletions
diff --git a/sysutils/xentools3-hvm/Makefile b/sysutils/xentools3-hvm/Makefile
index 20798b85a07..770de3d9013 100644
--- a/sysutils/xentools3-hvm/Makefile
+++ b/sysutils/xentools3-hvm/Makefile
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2008/02/15 20:34:35 bouyer Exp $
+# $NetBSD: Makefile,v 1.5 2008/02/17 16:29:03 bouyer Exp $
#
VERSION= 3.1.3
DISTNAME= xen-${VERSION}-src
PKGNAME= xentools3-hvm-${VERSION}
+PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_LOCAL}
EXTRACT_SUFX= .tgz
@@ -77,11 +78,13 @@ CONF_FILES_PERMS+= ${EGDIR}/qemu-ifup ${PKG_SYSCONFDIR}/scripts/qemu-ifup \
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
+.if !exists(/usr/include/xen/xenio.h)
+ ${MKDIR} ${WRKSRC}/libxc/xen
+ ${TEST} -f ${WRKSRC}/libxc/xen/xenio.h || \
+ ${CP} ${FILESDIR}/xenio.h ${WRKSRC}/libxc/xen
+ ${TEST} -f ${WRKSRC}/libxc/xen/xenio3.h || \
+ ${CP} ${FILESDIR}/xenio3.h ${WRKSRC}/libxc/xen
+.endif
${CP} ${FILESDIR}/NetBSD.mk ${WRKSRC}/../config/
.if ${MACHINE_ARCH} == "x86_64"
${MKDIR} ${WRKSRC}/libxc/machine
diff --git a/sysutils/xentools3-hvm/distinfo b/sysutils/xentools3-hvm/distinfo
index dfd96b72ce0..493560d4063 100644
--- a/sysutils/xentools3-hvm/distinfo
+++ b/sysutils/xentools3-hvm/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2008/02/15 20:34:35 bouyer Exp $
+$NetBSD: distinfo,v 1.4 2008/02/17 16:29:03 bouyer Exp $
SHA1 (xen-3.1.3-src.tgz) = 87b370df928feda599bbc7076e7a4589f67355c8
RMD160 (xen-3.1.3-src.tgz) = b26b71e0422db7aece60aa4dd9f9c8d34affd0c7
@@ -10,7 +10,7 @@ SHA1 (patch-ap) = 33f2bdbef6df3f2105d4502b8066abb6c952fc6c
SHA1 (patch-ar) = c8748761267dd82c75deab79d13b71d56bcf2223
SHA1 (patch-as) = 8850108d0c8f101642f4855184253824f9c214b5
SHA1 (patch-at) = 2311289176c83fcd3ff18b90bab9c2e5e05a52f1
-SHA1 (patch-au) = beb2eaa8bf832e179e69b1758cfe0fafafdc496b
+SHA1 (patch-au) = b2357fdaff2895a5e4da4371d72ccc3041c78a83
SHA1 (patch-av) = be2a1440126908996410f92a04ad479f8a2ca373
SHA1 (patch-aw) = 2776799b391983ad79af0f28367287a4a865260a
SHA1 (patch-ax) = 93411fbeff95f76d723fdda993d55a2740d3a713
diff --git a/sysutils/xentools3-hvm/files/xenio.h b/sysutils/xentools3-hvm/files/xenio.h
index d670b414759..dfbb03187c5 100644
--- a/sysutils/xentools3-hvm/files/xenio.h
+++ b/sysutils/xentools3-hvm/files/xenio.h
@@ -27,8 +27,8 @@
* IN THE SOFTWARE.
*/
-#ifndef __NetBSD_PRIVCMD_H__
-#define __NetBSD_PRIVCMD_H__
+#ifndef __PKGSRC_PRIVCMD_H__
+#define __PKGSRC_PRIVCMD_H__
/* Interface to /proc/xen/privcmd */
@@ -102,4 +102,4 @@ typedef struct privcmd_blkmsg
/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
-#endif /* __NetBSD_PRIVCMD_H__ */
+#endif /* __PKGSRC_PRIVCMD_H__ */
diff --git a/sysutils/xentools3-hvm/patches/patch-au b/sysutils/xentools3-hvm/patches/patch-au
index f479e601274..72acfa62e8b 100644
--- a/sysutils/xentools3-hvm/patches/patch-au
+++ b/sysutils/xentools3-hvm/patches/patch-au
@@ -1,4 +1,4 @@
-$NetBSD: patch-au,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
+$NetBSD: patch-au,v 1.2 2008/02/17 16:29:03 bouyer Exp $
--- libxc/xc_private.h.orig 2006-10-16 22:15:35.000000000 +0200
+++ libxc/xc_private.h 2006-10-16 22:16:09.000000000 +0200
@@ -7,7 +7,7 @@ $NetBSD: patch-au,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
#include "xenctrl.h"
+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio.h>
++#include <xen/xenio.h>
+#else
#include <xen/sys/privcmd.h>
+#endif
diff --git a/sysutils/xentools3/Makefile b/sysutils/xentools3/Makefile
index 50add7cab63..ef264b1a63d 100644
--- a/sysutils/xentools3/Makefile
+++ b/sysutils/xentools3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2008/02/15 20:34:35 bouyer Exp $
+# $NetBSD: Makefile,v 1.7 2008/02/17 16:29:03 bouyer Exp $
#
VERSION= 3.1.3
@@ -137,11 +137,13 @@ CONF_FILES_PERMS+= ${EGDIR}/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
OWN_DIRS= ${PKG_SYSCONFDIR}/scripts /var/log/xen
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
+.if !exists(/usr/include/xen/xenio.h)
+ ${MKDIR} ${WRKSRC}/libxc/xen
+ ${TEST} -f ${WRKSRC}/libxc/xen/xenio.h || \
+ ${CP} ${FILESDIR}/xenio.h ${WRKSRC}/libxc/xen
+ ${TEST} -f ${WRKSRC}/libxc/xen/xenio3.h || \
+ ${CP} ${FILESDIR}/xenio3.h ${WRKSRC}/libxc/xen
+.endif
${CP} ${FILESDIR}/NetBSD.mk ${WRKSRC}/../config/
pod2man ${WRKSRC}/../docs/man/xend-config.sxp.pod.5 |\
sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
diff --git a/sysutils/xentools3/distinfo b/sysutils/xentools3/distinfo
index 3b4eae65c2e..63904492836 100644
--- a/sysutils/xentools3/distinfo
+++ b/sysutils/xentools3/distinfo
@@ -1,15 +1,15 @@
-$NetBSD: distinfo,v 1.4 2008/02/15 20:34:35 bouyer Exp $
+$NetBSD: distinfo,v 1.5 2008/02/17 16:29:03 bouyer Exp $
SHA1 (xen-3.1.3-src.tgz) = 87b370df928feda599bbc7076e7a4589f67355c8
RMD160 (xen-3.1.3-src.tgz) = b26b71e0422db7aece60aa4dd9f9c8d34affd0c7
Size (xen-3.1.3-src.tgz) = 6891760 bytes
SHA1 (patch-aa) = 86a6c9c2a43da76a5746835e13646b24e6992070
-SHA1 (patch-ab) = 424d8cc3e41d128a221f0277c1cb1d8779e97241
+SHA1 (patch-ab) = dcafc8b6c4cd1e4dfc6f4ec806fd8076b3104b86
SHA1 (patch-ac) = 4eb0f474d4e3a685788c1ce92c0b407dc3d7a855
SHA1 (patch-ad) = ec36d712925ddf06aac7d6393ad818a51c4363f3
SHA1 (patch-al) = da759ccbb2c4b48f42178cff47ace7ef42466814
SHA1 (patch-as) = 6f05feeb9dd63f2071d48b0d8aa8c6a0952e60c7
-SHA1 (patch-au) = beb2eaa8bf832e179e69b1758cfe0fafafdc496b
+SHA1 (patch-au) = b2357fdaff2895a5e4da4371d72ccc3041c78a83
SHA1 (patch-av) = be2a1440126908996410f92a04ad479f8a2ca373
SHA1 (patch-aw) = 8039fa7bd7799efc48da9550f861e2212cb3361b
SHA1 (patch-ax) = c2fd0f25ed00498039eececcfb467a236f608efa
diff --git a/sysutils/xentools3/files/xenio.h b/sysutils/xentools3/files/xenio.h
index d670b414759..dfbb03187c5 100644
--- a/sysutils/xentools3/files/xenio.h
+++ b/sysutils/xentools3/files/xenio.h
@@ -27,8 +27,8 @@
* IN THE SOFTWARE.
*/
-#ifndef __NetBSD_PRIVCMD_H__
-#define __NetBSD_PRIVCMD_H__
+#ifndef __PKGSRC_PRIVCMD_H__
+#define __PKGSRC_PRIVCMD_H__
/* Interface to /proc/xen/privcmd */
@@ -102,4 +102,4 @@ typedef struct privcmd_blkmsg
/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
-#endif /* __NetBSD_PRIVCMD_H__ */
+#endif /* __PKGSRC_PRIVCMD_H__ */
diff --git a/sysutils/xentools3/patches/patch-ab b/sysutils/xentools3/patches/patch-ab
index 1f94b0d2bb0..61b725109b2 100644
--- a/sysutils/xentools3/patches/patch-ab
+++ b/sysutils/xentools3/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 2007/12/03 21:54:30 bouyer Exp $
+$NetBSD: patch-ab,v 1.3 2008/02/17 16:29:03 bouyer Exp $
---- libxc/xc_netbsd.c.orig 2007-12-03 12:46:01.000000000 +0100
-+++ libxc/xc_netbsd.c 2007-12-03 12:48:59.000000000 +0100
-@@ -0,0 +1,268 @@
+--- libxc/xc_netbsd.c.orig 2008-02-17 15:12:36.000000000 +0100
++++ libxc/xc_netbsd.c 2008-02-17 15:20:03.000000000 +0100
+@@ -0,0 +1,279 @@
+/******************************************************************************
+ *
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
@@ -17,7 +17,7 @@ $NetBSD: patch-ab,v 1.2 2007/12/03 21:54:30 bouyer Exp $
+#include "xc_private.h"
+
+#include <xen/memory.h>
-+#include <xen/NetBSD/xenio3.h>
++#include <xen/xenio3.h>
+#include <unistd.h>
+#include <fcntl.h>
+
@@ -142,9 +142,20 @@ $NetBSD: patch-ab,v 1.2 2007/12/03 21:54:30 bouyer Exp $
+
+int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall)
+{
++#ifdef __PKGSRC_PRIVCMD_H__
++ /* old IOCTL */
+ return do_privcmd(xc_handle,
+ IOCTL_PRIVCMD_HYPERCALL,
+ (unsigned long)hypercall);
++#else
++ int error = do_privcmd(xc_handle,
++ IOCTL_PRIVCMD_HYPERCALL,
++ (unsigned long)hypercall);
++ if (error)
++ return error;
++ else
++ return (hypercall->retval);
++#endif
+}
+
+#define EVTCHN_DEV_NAME "/dev/xenevt"
diff --git a/sysutils/xentools3/patches/patch-au b/sysutils/xentools3/patches/patch-au
index 605a32b9d06..72acfa62e8b 100644
--- a/sysutils/xentools3/patches/patch-au
+++ b/sysutils/xentools3/patches/patch-au
@@ -1,4 +1,4 @@
-$NetBSD: patch-au,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
+$NetBSD: patch-au,v 1.2 2008/02/17 16:29:03 bouyer Exp $
--- libxc/xc_private.h.orig 2006-10-16 22:15:35.000000000 +0200
+++ libxc/xc_private.h 2006-10-16 22:16:09.000000000 +0200
@@ -7,7 +7,7 @@ $NetBSD: patch-au,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
#include "xenctrl.h"
+#ifdef __NetBSD__
-+#include <xen/NetBSD/xenio.h>
++#include <xen/xenio.h>
+#else
#include <xen/sys/privcmd.h>
+#endif