pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xentools20 fix build on Linux:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7f0584f76196
branches:  trunk
changeset: 496773:7f0584f76196
user:      grant <grant%pkgsrc.org@localhost>
date:      Wed Jul 13 01:28:37 2005 +0000

description:
fix build on Linux:

- add some missing #ifdef __NetBSD__ and restore some Linux #includes
- use subst framework instead of hardcoding /kern paths in patches

diffstat:

 sysutils/xentools20/Makefile         |  17 +++++++++++++++--
 sysutils/xentools20/distinfo         |   9 +++------
 sysutils/xentools20/patches/patch-ab |  13 ++++++++-----
 sysutils/xentools20/patches/patch-ac |  33 +++++++++++++++++++--------------
 sysutils/xentools20/patches/patch-an |  13 -------------
 sysutils/xentools20/patches/patch-ao |  13 -------------
 sysutils/xentools20/patches/patch-ap |  21 ---------------------
 7 files changed, 45 insertions(+), 74 deletions(-)

diffs (253 lines):

diff -r 23298ed6f3cf -r 7f0584f76196 sysutils/xentools20/Makefile
--- a/sysutils/xentools20/Makefile      Tue Jul 12 21:40:35 2005 +0000
+++ b/sysutils/xentools20/Makefile      Wed Jul 13 01:28:37 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2005/06/04 11:34:30 yamt Exp $
+# $NetBSD: Makefile,v 1.13 2005/07/13 01:28:37 grant Exp $
 #
 
 DISTNAME=              xen-2.0.6-src
@@ -17,7 +17,7 @@
 USE_PKGINSTALL=                yes
 PKG_SYSCONFSUBDIR=     xen
 
-ONLY_FOR_PLATFORM=     NetBSD-*-i386
+ONLY_FOR_PLATFORM=     Linux-2.[46]*-i386 NetBSD-*-i386
 
 WRKSRC=                        ${WRKDIR}/xen-2.0/tools
 
@@ -48,13 +48,26 @@
 SUBST_FILES.paths+=    python/xen/sv/Daemon.py
 SUBST_SED.paths=        -e "s|/usr/sbin|${PREFIX}/sbin|g"
 SUBST_MESSAGE.paths=    "Fixing hardcoded paths."
+
 SUBST_STAGE.py=                pre-configure
 SUBST_FILES.py=                python/Makefile
 SUBST_SED.py=          -e "s,python,${PYTHONBIN},g"
+
 SUBST_STAGE.conf=      pre-configure
 SUBST_FILES.conf=      python/xen/xend/XendRoot.py
 SUBST_SED.conf=                -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+SUBST_CLASSES+=                proc
+SUBST_STAGE.proc=      pre-configure
+SUBST_FILES.proc=      python/xen/xend/XendVnet.py
+SUBST_FILES.proc+=     libxc/xc_misc.c
+SUBST_FILES.proc+=     xentrace/xentrace.c
+SUBST_SED.proc=                -e "s|/proc|/kern|g"
+.endif
+
 RCD_SCRIPTS=           xend
 FILES_SUBST+=          RCD_INTERPRETER=${PYTHONBIN}
 
diff -r 23298ed6f3cf -r 7f0584f76196 sysutils/xentools20/distinfo
--- a/sysutils/xentools20/distinfo      Tue Jul 12 21:40:35 2005 +0000
+++ b/sysutils/xentools20/distinfo      Wed Jul 13 01:28:37 2005 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.7 2005/06/04 11:34:30 yamt Exp $
+$NetBSD: distinfo,v 1.8 2005/07/13 01:28:37 grant Exp $
 
 SHA1 (xen-2.0.6-src.tgz) = 3808b8ff57decc3dea0c65c5a80665516a000487
 RMD160 (xen-2.0.6-src.tgz) = ebcdd95e3c74fb71bf732ff04694abe4fe3b6876
 Size (xen-2.0.6-src.tgz) = 2456215 bytes
 SHA1 (patch-aa) = 2c3ca679003895f19f11dcd5038dbfa2de241a74
-SHA1 (patch-ab) = 876bcc0723ff7e12e096ca1bff749f8a2ff23b16
-SHA1 (patch-ac) = 24acf3f7c71addc24e8f32270173fb4ace1e9180
+SHA1 (patch-ab) = ff0df4820e18310bd16ce649e5c8613d88321b35
+SHA1 (patch-ac) = 7bc2923eb2b8786d40cbdb73b8e872aa4f4e6a69
 SHA1 (patch-ad) = 6f242d6ad89b4c019cd291313ba8eaa28ae3bfbb
 SHA1 (patch-ae) = b5a6521b14dd24cb52713bd83ec91422ef63161e
 SHA1 (patch-af) = 5467e64fbd49d6ca35718d42864ed7b44fe76df3
@@ -15,9 +15,6 @@
 SHA1 (patch-ak) = 2d38643ac8308cbd79876c150a42d463b1c2bfbd
 SHA1 (patch-al) = 6394c54681af520fa21a6839cf32b84a51a146d5
 SHA1 (patch-am) = 7392057d2da107e935775627afe2498a81903f71
-SHA1 (patch-an) = 6540433dd5e3527ea635a585a1094606fd22cc1a
-SHA1 (patch-ao) = 2f3fb89cf3209e19d3f5e2e13017981f7c98b8b3
-SHA1 (patch-ap) = da9d70ec8c61e8524b0b268113d178ec1d0d176c
 SHA1 (patch-aq) = 96ac4caaa268069ee02962a917f85753515747be
 SHA1 (patch-as) = 333da168af43dae9a4e8695409cbd006e7fcf097
 SHA1 (patch-at) = 0964bc7dd23ff6fcd596d6a8564d9e3033f34563
diff -r 23298ed6f3cf -r 7f0584f76196 sysutils/xentools20/patches/patch-ab
--- a/sysutils/xentools20/patches/patch-ab      Tue Jul 12 21:40:35 2005 +0000
+++ b/sysutils/xentools20/patches/patch-ab      Wed Jul 13 01:28:37 2005 +0000
@@ -1,13 +1,16 @@
-$NetBSD: patch-ab,v 1.1.1.1 2005/03/07 15:59:08 bouyer Exp $
+$NetBSD: patch-ab,v 1.2 2005/07/13 01:28:37 grant Exp $
 
---- libxc/xc_private.h.orig    2005-01-22 00:49:25.000000000 +0100
-+++ libxc/xc_private.h 2005-01-22 00:49:49.000000000 +0100
-@@ -16,7 +16,7 @@
+--- libxc/xc_private.h.orig    2005-05-22 20:56:28.000000000 +1000
++++ libxc/xc_private.h
+@@ -16,7 +16,11 @@
  
  #include "xc.h"
  
--#include <xen/linux/privcmd.h>
++#ifdef __NetBSD__
 +#include <xen/NetBSD/xenio.h>
++#else
+ #include <xen/linux/privcmd.h>
++#endif
  
  #define _PAGE_PRESENT   0x001
  #define _PAGE_RW        0x002
diff -r 23298ed6f3cf -r 7f0584f76196 sysutils/xentools20/patches/patch-ac
--- a/sysutils/xentools20/patches/patch-ac      Tue Jul 12 21:40:35 2005 +0000
+++ b/sysutils/xentools20/patches/patch-ac      Wed Jul 13 01:28:37 2005 +0000
@@ -1,25 +1,30 @@
-$NetBSD: patch-ac,v 1.2 2005/06/04 11:34:30 yamt Exp $
+$NetBSD: patch-ac,v 1.3 2005/07/13 01:28:37 grant Exp $
 
---- python/xen/lowlevel/xu/xu.c.orig   2005-01-12 13:22:21.000000000 +0100
-+++ python/xen/lowlevel/xu/xu.c        2005-02-05 20:22:08.000000000 +0100
-@@ -15,7 +15,6 @@
+--- python/xen/lowlevel/xu/xu.c.orig   2005-05-22 20:56:26.000000000 +1000
++++ python/xen/lowlevel/xu/xu.c
+@@ -15,7 +15,9 @@
  #include <sys/socket.h>
  #include <sys/mman.h>
  #include <sys/poll.h>
--#include <sys/sysmacros.h>
++#ifndef __NetBSD__
+ #include <sys/sysmacros.h>
++#endif
  #include <netinet/in.h>
  #include <fcntl.h>
  #include <unistd.h>
-@@ -25,7 +24,7 @@
+@@ -25,7 +27,11 @@
  
  #include <xen/xen.h>
  #include <xen/io/domain_controller.h>
--#include <xen/linux/privcmd.h>
++#ifdef __NetBSD__
 +#include <xen/NetBSD/xenio.h>
++#else
+ #include <xen/linux/privcmd.h>
++#endif
  
  #define XENPKG "xen.lowlevel.xu"
  
-@@ -35,6 +34,9 @@
+@@ -35,6 +41,9 @@
  #endif
  
  /* NB. The following should be kept in sync with the kernel's evtchn driver. */
@@ -29,7 +34,7 @@
  #define EVTCHN_DEV_NAME  "/dev/xen/evtchn"
  #define EVTCHN_DEV_MAJOR 10
  #define EVTCHN_DEV_MINOR 201
-@@ -45,6 +47,7 @@
+@@ -45,6 +54,7 @@
  #define EVTCHN_BIND   _IO('E', 2)
  /* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
  #define EVTCHN_UNBIND _IO('E', 3)
@@ -37,7 +42,7 @@
  
  /* Size of a machine page frame. */
  #define PAGE_SIZE 4096
-@@ -130,7 +133,11 @@
+@@ -130,7 +140,11 @@ static PyObject *xu_notifier_bind(PyObje
      if ( !PyArg_ParseTuple(args, "i", &idx) )
          return NULL;
  
@@ -49,7 +54,7 @@
          return PyErr_SetFromErrno(PyExc_IOError);
  
      Py_INCREF(Py_None);
-@@ -145,7 +152,11 @@
+@@ -145,7 +159,11 @@ static PyObject *xu_notifier_unbind(PyOb
      if ( !PyArg_ParseTuple(args, "i", &idx) )
          return NULL;
  
@@ -61,7 +66,7 @@
          return PyErr_SetFromErrno(PyExc_IOError);
  
      Py_INCREF(Py_None);
-@@ -192,13 +203,16 @@
+@@ -192,13 +210,16 @@ staticforward PyTypeObject xu_notifier_t
  static PyObject *xu_notifier_new(PyObject *self, PyObject *args)
  {
      xu_notifier_object *xun;
@@ -78,7 +83,7 @@
      /* Make sure any existing device file links to correct device. */
      if ( (lstat(EVTCHN_DEV_NAME, &st) != 0) ||
           !S_ISCHR(st.st_mode) ||
-@@ -206,14 +220,17 @@
+@@ -206,14 +227,17 @@ static PyObject *xu_notifier_new(PyObjec
          (void)unlink(EVTCHN_DEV_NAME);
  
   reopen:
@@ -96,7 +101,7 @@
          PyObject_Del((PyObject *)xun);
          return PyErr_SetFromErrno(PyExc_IOError);
      }
-@@ -1083,7 +1100,8 @@
+@@ -1110,7 +1134,8 @@ static PyObject *xu_port_new(PyObject *s
           * The control-interface event channel for DOM0 is already set up.
           * We use an ioctl to discover the port at our end of the channel.
           */
diff -r 23298ed6f3cf -r 7f0584f76196 sysutils/xentools20/patches/patch-an
--- a/sysutils/xentools20/patches/patch-an      Tue Jul 12 21:40:35 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-an,v 1.1.1.1 2005/03/07 15:59:08 bouyer Exp $
-
---- python/xen/xend/XendVnet.py.orig   2005-01-24 10:25:27.000000000 +0100
-+++ python/xen/xend/XendVnet.py        2005-01-24 10:26:50.000000000 +0100
-@@ -14,7 +14,7 @@
-     out = None
-     try:
-         try:
--            out = file("/proc/vnet/policy", "wb")
-+            out = file("/kern/vnet/policy", "wb")
-             sxp.show(cmd, out)
-         except IOError, ex:
-             raise XendError(str(ex))
diff -r 23298ed6f3cf -r 7f0584f76196 sysutils/xentools20/patches/patch-ao
--- a/sysutils/xentools20/patches/patch-ao      Tue Jul 12 21:40:35 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-ao,v 1.1.1.1 2005/03/07 15:59:08 bouyer Exp $
-
---- libxc/xc_misc.c.orig       2005-01-24 10:25:41.000000000 +0100
-+++ libxc/xc_misc.c    2005-01-24 10:30:18.000000000 +0100
-@@ -8,7 +8,7 @@
- 
- int xc_interface_open(void)
- {
--    int fd = open("/proc/xen/privcmd", O_RDWR);
-+    int fd = open("/kern/xen/privcmd", O_RDWR);
-     if ( fd == -1 )
-         PERROR("Could not obtain handle on privileged command interface");
-     return fd;
diff -r 23298ed6f3cf -r 7f0584f76196 sysutils/xentools20/patches/patch-ap
--- a/sysutils/xentools20/patches/patch-ap      Tue Jul 12 21:40:35 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-$NetBSD: patch-ap,v 1.1.1.1 2005/03/07 15:59:08 bouyer Exp $
-
---- xentrace/xentrace.c.orig   2005-01-24 10:25:49.000000000 +0100
-+++ xentrace/xentrace.c        2005-01-24 10:30:32.000000000 +0100
-@@ -123,14 +123,14 @@
- struct t_buf *map_tbufs(unsigned long tbufs_mach, unsigned int num,
-                         unsigned long size)
- {
--    int xc_handle;                  /* file descriptor for /proc/xen/privcmd */
-+    int xc_handle;                  /* file descriptor for /kern/xen/privcmd */
-     struct t_buf *tbufs_mapped;
- 
-     xc_handle = xc_interface_open();
- 
-     if ( xc_handle < 0 ) 
-     {
--        PERROR("Open /proc/xen/privcmd when mapping trace buffers\n");
-+        PERROR("Open /kern/xen/privcmd when mapping trace buffers\n");
-         exit(EXIT_FAILURE);
-     }
- 



Home | Main Index | Thread Index | Old Index