diff --git a/sysutils/pciutils/Makefile b/sysutils/pciutils/Makefile index fee33050405f..5f767e926655 100644 --- a/sysutils/pciutils/Makefile +++ b/sysutils/pciutils/Makefile @@ -6,7 +6,7 @@ # PORTNAME= pciutils -PORTVERSION= 2.2.3 +PORTVERSION= 2.2.6 CATEGORIES= sysutils MASTER_SITES= ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/ \ ftp://ftp.kernel.org/pub/software/utils/pciutils/ \ @@ -20,18 +20,6 @@ MAKE_ENV= LANG=C MAN8= lspci.8 setpci.8 update-pciids.8 -pre-configure: - @${ECHO_MSG} "" - @${ECHO_MSG} " W A R N I N G" - @${ECHO_MSG} "************************************************" - @${ECHO_MSG} "* pciutils requires that you have your kernel *" - @${ECHO_MSG} "* sources installed. If your kernel sources *" - @${ECHO_MSG} "* are somewhere other than /usr/src/sys, you *" - @${ECHO_MSG} "* may set the FREEBSD_SYS variable to the *" - @${ECHO_MSG} "* correct path. *" - @${ECHO_MSG} "************************************************" - @${ECHO_MSG} "" - do-install: @${INSTALL_MAN} ${WRKSRC}/lspci.8 ${PREFIX}/man/man8 @${INSTALL_MAN} ${WRKSRC}/setpci.8 ${PREFIX}/man/man8 diff --git a/sysutils/pciutils/distinfo b/sysutils/pciutils/distinfo index 5db6d694b9d7..e2d9748a4f0b 100644 --- a/sysutils/pciutils/distinfo +++ b/sysutils/pciutils/distinfo @@ -1,3 +1,3 @@ -MD5 (pciutils-2.2.3.tar.gz) = 39747279aad46e7a6a3e1ea636d055b4 -SHA256 (pciutils-2.2.3.tar.gz) = e501df7734738d0625a3765498e1c4625a2fbaf408c86599eca2070c57bc4d4b -SIZE (pciutils-2.2.3.tar.gz) = 1121334 +MD5 (pciutils-2.2.6.tar.gz) = e26593ab38ef9ae4457826be9e35aff8 +SHA256 (pciutils-2.2.6.tar.gz) = 30019fa23996429d3bedaa1b30e32b9ddcd2eaa4fe39ec015d533af6afc0ee6b +SIZE (pciutils-2.2.6.tar.gz) = 226049 diff --git a/sysutils/pciutils/files/patch-Makefile b/sysutils/pciutils/files/patch-Makefile index ffb5de244d38..dc0bd966e0ff 100644 --- a/sysutils/pciutils/files/patch-Makefile +++ b/sysutils/pciutils/files/patch-Makefile @@ -1,24 +1,17 @@ --- Makefile.orig Fri May 5 21:46:32 2006 +++ Makefile Mon Nov 27 22:12:24 2006 -@@ -1,19 +1,16 @@ +@@ -1,13 +1,11 @@ # Makefile for The PCI Utilities - # (c) 1998--2006 Martin Mares + # (c) 1998--2007 Martin Mares -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.3 - DATE=2006-05-05 + VERSION=2.2.6 + DATE=2007-06-20 -PREFIX=/usr/local SBINDIR=$(PREFIX)/sbin SHAREDIR=$(PREFIX)/share IDSDIR=$(SHAREDIR) - MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi) --INSTALL=install --DIRINSTALL=install -d -+DIRINSTALL=$(INSTALL) -d - PCILIB=lib/libpci.a - PCIINC=lib/config.h lib/header.h lib/pci.h lib/types.h lib/sysdep.h - diff --git a/sysutils/pciutils/files/patch-lib::fbsd-device.c b/sysutils/pciutils/files/patch-lib::fbsd-device.c new file mode 100644 index 000000000000..5b69d7c76ba2 --- /dev/null +++ b/sysutils/pciutils/files/patch-lib::fbsd-device.c @@ -0,0 +1,99 @@ +--- lib/fbsd-device.c.orig Tue Jul 20 07:01:31 1999 ++++ lib/fbsd-device.c Tue Apr 12 10:49:09 2005 +@@ -7,7 +7,9 @@ + * Can be freely distributed and used under the terms of the GNU GPL. + */ + ++#include + #include ++#include + #include + #include + #include +@@ -19,13 +21,8 @@ + # endif + #endif + +-#if __FreeBSD_version < 500000 +-# include +-#else +-# include +-#endif +- + #if __FreeBSD_version < 430000 ++# include + # include + #else + # include +@@ -84,6 +81,9 @@ + if (pos >= 256) + return 0; + ++#if __FreeBSD_version >= 700053 ++ pi.pi_sel.pc_domain = d->domain; ++#endif + pi.pi_sel.pc_bus = d->bus; + pi.pi_sel.pc_dev = d->dev; + pi.pi_sel.pc_func = d->func; +@@ -92,7 +92,13 @@ + pi.pi_width = len; + + if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) +- d->access->error("fbsd_read: ioctl(PCIOCREAD) failed"); ++ { ++ if (errno == ENODEV) ++ { ++ return 0; ++ } ++ d->access->error("fbsd_read: ioctl(PCIOCREAD) failed: %s", strerror(errno)); ++ } + + switch (len) + { +@@ -100,10 +106,10 @@ + buf[0] = (u8) pi.pi_data; + break; + case 2: +- ((u16 *) buf)[0] = (u16) pi.pi_data; ++ ((u16 *) buf)[0] = cpu_to_le16((u16) pi.pi_data); + break; + case 4: +- ((u32 *) buf)[0] = (u32) pi.pi_data; ++ ((u32 *) buf)[0] = cpu_to_le32((u32) pi.pi_data); + break; + } + return 1; +@@ -122,6 +128,9 @@ + if (pos >= 256) + return 0; + ++#if __FreeBSD_version >= 700053 ++ pi.pi_sel.pc_domain = d->domain; ++#endif + pi.pi_sel.pc_bus = d->bus; + pi.pi_sel.pc_dev = d->dev; + pi.pi_sel.pc_func = d->func; +@@ -135,16 +144,20 @@ + pi.pi_data = buf[0]; + break; + case 2: +- pi.pi_data = ((u16 *) buf)[0]; ++ pi.pi_data = le16_to_cpu(((u16 *) buf)[0]); + break; + case 4: +- pi.pi_data = ((u32 *) buf)[0]; ++ pi.pi_data = le32_to_cpu(((u32 *) buf)[0]); + break; + } + + if (ioctl(d->access->fd, PCIOCWRITE, &pi) < 0) + { +- d->access->error("fbsd_write: ioctl(PCIOCWRITE) failed"); ++ if (errno == ENODEV) ++ { ++ return 0; ++ } ++ d->access->error("fbsd_write: ioctl(PCIOCWRITE) failed: %s", strerror(errno)); + } + + return 1; diff --git a/sysutils/pciutils/files/patch-lspci.c b/sysutils/pciutils/files/patch-lspci.c new file mode 100644 index 000000000000..7748d873b14d --- /dev/null +++ b/sysutils/pciutils/files/patch-lspci.c @@ -0,0 +1,14 @@ +--- lspci.c.orig Fri Mar 30 11:56:35 2007 ++++ lspci.c Tue Oct 2 13:24:51 2007 +@@ -58,8 +58,9 @@ + * This increases our memory footprint, but only slightly since we don't + * use alloca() much. + */ +- +-#ifdef __GNUC__ ++#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__DragonFly__) ++/* alloca() is defined in stdlib.h */ ++#elif defined(__GNUC__) && !defined(PCI_OS_WINDOWS) + #include + #else + #undef alloca