Don't forget to use patch -E

-- 
Matthieu Herrb
Index: Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/pciutils/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- Makefile    25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ Makefile    22 Nov 2006 21:50:26 -0000
@@ -4,7 +4,7 @@
 
 COMMENT=               "PCI bus configuration register access tools"
 
-DISTNAME=              pciutils-2.2.1
+DISTNAME=              pciutils-2.2.4
 CATEGORIES=            sysutils
 
 HOMEPAGE=              http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
@@ -23,7 +23,7 @@
 USE_GMAKE=             Yes
 
 MAKE_ENV=              CC="${CC}"
-FAKE_FLAGS=            PREFIX=${WRKINST}${PREFIX}
+FAKE_FLAGS=            PREFIX=${PREFIX}
 
 NO_REGRESS=            Yes
 
Index: distinfo
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/pciutils/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo    25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ distinfo    22 Nov 2006 21:39:36 -0000
@@ -1,4 +1,4 @@
-MD5 (pciutils-2.2.1.tar.gz) = c18e2a5f04e9abae5a42439de294f086
-RMD160 (pciutils-2.2.1.tar.gz) = fc12da1261a33f03fc54e4bcc48cd0b8277990a6
-SHA1 (pciutils-2.2.1.tar.gz) = 01ae9a2c826e06d48d2b0d8f78cfddf7e1cadb4c
-SIZE (pciutils-2.2.1.tar.gz) = 194389
+MD5 (pciutils-2.2.4.tar.gz) = 5629fdb049f189fb853e7021f85553d2
+RMD160 (pciutils-2.2.4.tar.gz) = 27db4b23a07a02b28b64e01fbe1c74cefa887cc0
+SHA1 (pciutils-2.2.4.tar.gz) = c20dfa13bbd3d04ce921294c51e3da94140cea8b
+SIZE (pciutils-2.2.4.tar.gz) = 210706
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/pciutils/patches/patch-Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-Makefile
--- patches/patch-Makefile      25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ patches/patch-Makefile      22 Nov 2006 21:44:26 -0000
@@ -1,13 +1,13 @@
 $OpenBSD: patch-Makefile,v 1.1.1.1 2006/03/25 21:53:35 matthieu Exp $
---- Makefile.orig      Sat Nov 26 14:00:57 2005
-+++ Makefile   Fri Mar 24 22:57:18 2006
+--- Makefile.orig      Sat Sep  9 14:57:03 2006
++++ Makefile   Wed Nov 22 22:43:48 2006
 @@ -1,8 +1,7 @@
  # Makefile for The PCI Utilities
- # (c) 1998--2005 Martin Mares <[EMAIL PROTECTED]>
+ # (c) 1998--2006 Martin Mares <[EMAIL PROTECTED]>
  
 -OPT=-O2
--CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes 
-Wmissing-prototypes -Winline
-+CFLAGS+= -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes 
-Winline
+-CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes 
-Wmissing-prototypes
++CFLAGS+= -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
  
- VERSION=2.2.1
- DATE=2005-11-26
+ VERSION=2.2.4
+ DATE=2006-09-09
Index: patches/patch-lib_Makefile
===================================================================
RCS file: patches/patch-lib_Makefile
diff -N patches/patch-lib_Makefile
--- patches/patch-lib_Makefile  25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-lib_Makefile,v 1.1.1.1 2006/03/25 21:53:35 matthieu Exp $
---- lib/Makefile.orig  Fri Aug 13 22:29:06 2004
-+++ lib/Makefile       Wed Mar 22 23:20:03 2006
-@@ -36,6 +36,10 @@ CFLAGS += -I${FREEBSD_SYS}
- endif
- endif
- 
-+ifdef PCI_HAVE_PM_OBSD_DEVICE
-+OBJS += obsd-device.o
-+endif
-+
- ifdef PCI_HAVE_PM_AIX_DEVICE
- OBJS += aix-device.o
- endif
Index: patches/patch-lib_access_c
===================================================================
RCS file: patches/patch-lib_access_c
diff -N patches/patch-lib_access_c
--- patches/patch-lib_access_c  25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-lib_access_c,v 1.1.1.1 2006/03/25 21:53:35 matthieu Exp $
---- lib/access.c.orig  Fri Aug 13 22:15:11 2004
-+++ lib/access.c       Tue Mar 21 22:56:47 2006
-@@ -47,6 +47,11 @@ static struct pci_methods *pci_methods[P
- #else
-   NULL,
- #endif
-+#ifdef PCI_HAVE_PM_OBSD_DEVICE
-+  &pm_obsd_device,
-+#else
-+  NULL,
-+#endif
- #ifdef PCI_HAVE_PM_DUMP
-   &pm_dump,
- #else
Index: patches/patch-lib_configure
===================================================================
RCS file: patches/patch-lib_configure
diff -N patches/patch-lib_configure
--- patches/patch-lib_configure 25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-lib_configure,v 1.1.1.1 2006/03/25 21:53:35 matthieu Exp $
---- lib/configure.orig Wed Sep 21 13:42:03 2005
-+++ lib/configure      Tue Mar 21 22:56:47 2006
-@@ -74,6 +74,12 @@ case $sys in
-               echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
-               ok=1
-               ;;
-+        openbsd)
-+              echo_n " obsd-device"
-+              echo >>$c '#define PCI_HAVE_PM_OBSD_DEVICE'
-+              echo >>$c '#define PCI_PATH_OBSD_DEVICE "/dev/pci"'
-+              ok=1
-+              ;;
-       aix)
-               echo_n " aix-device"
-               echo >>$c '#define PCI_HAVE_PM_AIX_DEVICE'
Index: patches/patch-lib_internal_h
===================================================================
RCS file: patches/patch-lib_internal_h
diff -N patches/patch-lib_internal_h
--- patches/patch-lib_internal_h        25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
-$OpenBSD: patch-lib_internal_h,v 1.1.1.1 2006/03/25 21:53:35 matthieu Exp $
---- lib/internal.h.orig        Fri Aug 13 22:21:22 2004
-+++ lib/internal.h     Tue Mar 21 22:56:47 2006
-@@ -36,4 +36,5 @@ struct pci_dev *pci_alloc_dev(struct pci
- int pci_link_dev(struct pci_access *, struct pci_dev *);
- 
- extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc,
--  pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_dump, pm_linux_sysfs;
-+      pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device, 
-+      pm_dump, pm_linux_sysfs;
Index: patches/patch-lib_obsd-device_c
===================================================================
RCS file: patches/patch-lib_obsd-device_c
diff -N patches/patch-lib_obsd-device_c
--- patches/patch-lib_obsd-device_c     25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,164 +0,0 @@
-$OpenBSD: patch-lib_obsd-device_c,v 1.1.1.1 2006/03/25 21:53:35 matthieu Exp $
---- lib/obsd-device.c.orig     Wed Mar 22 22:59:36 2006
-+++ lib/obsd-device.c  Wed Mar 22 22:59:36 2006
-@@ -0,0 +1,160 @@
-+/*
-+ *    The PCI Library -- FreeBSD /dev/pci access
-+ *
-+ *    Copyright (c) 1999 Jari Kirma <[EMAIL PROTECTED]>
-+ *    Updated in 2003 by Samy Al Bahra <[EMAIL PROTECTED]>
-+ *
-+ *    Can be freely distributed and used under the terms of the GNU GPL.
-+ */
-+
-+#include <fcntl.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <errno.h>
-+#include <sys/endian.h>
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+#include <sys/pciio.h>
-+#include "internal.h"
-+
-+static void
-+obsd_config(struct pci_access *a)
-+{
-+  a->method_params[PCI_ACCESS_OBSD_DEVICE] = PCI_PATH_OBSD_DEVICE;
-+}
-+
-+static int
-+obsd_detect(struct pci_access *a)
-+{
-+  char *name = a->method_params[PCI_ACCESS_OBSD_DEVICE];
-+
-+  if (access(name, R_OK))
-+    {
-+      a->warning("Cannot open %s", name);
-+      return 0;
-+    }
-+  a->debug("...using %s", name);
-+  return 1;
-+}
-+
-+static void
-+obsd_init(struct pci_access *a)
-+{
-+  char *name = a->method_params[PCI_ACCESS_OBSD_DEVICE];
-+
-+  a->fd = open(name, O_RDWR, 0);
-+  if (a->fd < 0)
-+    {
-+      a->error("obsd_init: %s open failed", name);
-+    }
-+}
-+
-+static void
-+obsd_cleanup(struct pci_access *a)
-+{
-+  close(a->fd);
-+}
-+
-+static int
-+obsd_read(struct pci_dev *d, int pos, byte *buf, int len)
-+{
-+  struct pci_io pi;
-+  union {
-+        u_int32_t u32;
-+        u_int16_t u16[2];
-+        u_int8_t u8[4];
-+  } u;
-+
-+  if (!(len == 1 || len == 2 || len == 4))
-+    {
-+      return pci_generic_block_read(d, pos, buf, len);
-+    }
-+
-+  if (pos >= 256)
-+    return 0;
-+
-+  pi.pi_sel.pc_bus = d->bus;
-+  pi.pi_sel.pc_dev = d->dev;
-+  pi.pi_sel.pc_func = d->func;
-+
-+  pi.pi_reg = pos - (pos % 4);
-+  pi.pi_width = 4;
-+      
-+  if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) {
-+        if (errno == ENXIO) {
-+                pi.pi_data = 0xffffffff;
-+        } else {
-+                d->access->error("obsd_read: ioctl(PCIOCREAD) failed");
-+        }
-+  }
-+  u.u32 = pi.pi_data;
-+
-+  switch (len)
-+    {
-+    case 1:
-+      buf[0] = (u8) u.u8[pos % 4];
-+      break;
-+    case 2:
-+      ((u16 *) buf)[0] = letoh16(u.u16[(pos % 4) / 2]);
-+      break;
-+    case 4:
-+      ((u32 *) buf)[0] = (u32) letoh32(pi.pi_data);
-+      break;
-+    }
-+  return 1;
-+}
-+
-+static int
-+obsd_write(struct pci_dev *d, int pos, byte *buf, int len)
-+{
-+  struct pci_io pi;
-+
-+  if (!(len == 1 || len == 2 || len == 4))
-+    {
-+      return pci_generic_block_write(d, pos, buf, len);
-+    }
-+
-+  if (pos >= 256)
-+    return 0;
-+
-+  pi.pi_sel.pc_bus = d->bus;
-+  pi.pi_sel.pc_dev = d->dev;
-+  pi.pi_sel.pc_func = d->func;
-+
-+  pi.pi_reg = pos;
-+  pi.pi_width = len;
-+      
-+  switch (len)
-+    {
-+    case 1:
-+      pi.pi_data = buf[0];
-+      break;
-+    case 2:
-+      pi.pi_data = ((u16 *) buf)[0];
-+      break;
-+    case 4:
-+      pi.pi_data = ((u32 *) buf)[0];
-+      break;
-+    }
-+  
-+  if (ioctl(d->access->fd, PCIOCWRITE, &pi) < 0)
-+    {
-+      d->access->error("obsd_write: ioctl(PCIOCWRITE) failed");
-+    }
-+
-+  return 1;
-+}
-+
-+struct pci_methods pm_obsd_device = {
-+  "OpenBSD-device",
-+  obsd_config,
-+  obsd_detect,
-+  obsd_init,
-+  obsd_cleanup,
-+  pci_generic_scan,
-+  pci_generic_fill_info,
-+  obsd_read,
-+  obsd_write,
-+  NULL,                                 /* dev_init */
-+  NULL                                  /* dev_cleanup */
-+};
Index: patches/patch-lib_pci_h
===================================================================
RCS file: patches/patch-lib_pci_h
diff -N patches/patch-lib_pci_h
--- patches/patch-lib_pci_h     25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-lib_pci_h,v 1.1.1.1 2006/03/25 21:53:35 matthieu Exp $
---- lib/pci.h.orig     Sat Sep 10 14:10:54 2005
-+++ lib/pci.h  Tue Mar 21 22:56:47 2006
-@@ -31,6 +31,7 @@ enum pci_access_type {
-   PCI_ACCESS_FBSD_DEVICE,             /* FreeBSD /dev/pci (params: path) */
-   PCI_ACCESS_AIX_DEVICE,              /* /dev/pci0, /dev/bus0, etc. */
-   PCI_ACCESS_NBSD_LIBPCI,             /* NetBSD libpci */
-+  PCI_ACCESS_OBSD_DEVICE,             /* OpenBSD /dev/pci */
-   PCI_ACCESS_DUMP,                    /* Dump file (params: filename) */
-   PCI_ACCESS_MAX
- };
Index: pkg/PLIST
===================================================================
RCS file: /cvs/OpenBSD/ports/sysutils/pciutils/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- pkg/PLIST   25 Mar 2006 21:53:35 -0000      1.1.1.1
+++ pkg/PLIST   22 Nov 2006 21:53:36 -0000
@@ -5,5 +5,4 @@
 sbin/lspci
 sbin/setpci
 sbin/update-pciids
[EMAIL PROTECTED] no checksum
-share/pci.ids
+share/pci.ids.gz

Reply via email to