diff options
author | marcus <marcus@FreeBSD.org> | 2003-06-29 06:36:00 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2003-06-29 06:36:00 +0800 |
commit | bfb1123340de22a98557f58f0e2ac3fb090cc416 (patch) | |
tree | 4b3474ae3495151c5ac82efd109f40cf4aa58ff8 | |
parent | f50b801962aab2ad33ad5ef5858229d37bc3b334 (diff) | |
download | freebsd-ports-gnome-bfb1123340de22a98557f58f0e2ac3fb090cc416.tar.gz freebsd-ports-gnome-bfb1123340de22a98557f58f0e2ac3fb090cc416.tar.zst freebsd-ports-gnome-bfb1123340de22a98557f58f0e2ac3fb090cc416.zip |
Add libpci, an API to read and write PCI configuration registers.
Submitted by: Samy Al Bahra <samy@kerneled.com>
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/libpci/Makefile | 42 | ||||
-rw-r--r-- | devel/libpci/distinfo | 1 | ||||
-rw-r--r-- | devel/libpci/files/patch-lib::Makefile | 20 | ||||
-rw-r--r-- | devel/libpci/files/patch-lib::fbsd-device.c | 24 | ||||
-rw-r--r-- | devel/libpci/pkg-descr | 7 | ||||
-rw-r--r-- | devel/libpci/pkg-plist | 3 |
7 files changed, 98 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index d7bd7ed0d67b..3349fa5fb38f 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -340,6 +340,7 @@ SUBDIR += libol SUBDIR += libole2 SUBDIR += liboop + SUBDIR += libpci SUBDIR += libpdel SUBDIR += libredblack SUBDIR += libshbuf diff --git a/devel/libpci/Makefile b/devel/libpci/Makefile new file mode 100644 index 000000000000..03e88157e349 --- /dev/null +++ b/devel/libpci/Makefile @@ -0,0 +1,42 @@ +# New ports collection makefile for: libpci +# Date created: June 14, 2003 +# Whom: Samy Al Bahra <samy@kerneled.com> +# +# $FreeBSD$ +# + +PORTNAME= libpci +PORTVERSION= 2.1.11 +CATEGORIES= devel +MASTER_SITES= http://www.kerneled.com/freebsd/ports/ \ + ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/ \ + ftp://ftp.kernel.org/pub/software/utils/pciutils/ +DISTNAME= pciutils-${PORTVERSION} + +MAINTAINER= samy@kerneled.com +COMMENT= PCI configuration space I/O made easy + +USE_BZIP2= yes +USE_GMAKE= yes +NO_INSTALL_MANPAGES= yes +INSTALLS_SHLIB= yes +ALL_TARGET= lib + +pre-everything:: + @${ECHO_MSG} "" + @${ECHO_MSG} " W A R N I N G" + @${ECHO_MSG} "************************************************" + @${ECHO_MSG} "* libpci 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: + @(${CP} ${WRKSRC}/lib/libpci.so ${PREFIX}/lib/libpci.so.2) + @(${CP} ${WRKSRC}/lib/libpci.a ${PREFIX}/lib/libpci.a) + @(${LN} -sf ${PREFIX}/lib/libpci.so.2.1 ${PREFIX}/lib/libpci.so) + +.include <bsd.port.mk> diff --git a/devel/libpci/distinfo b/devel/libpci/distinfo new file mode 100644 index 000000000000..05b42bea8b8d --- /dev/null +++ b/devel/libpci/distinfo @@ -0,0 +1 @@ +MD5 (pciutils-2.1.11.tar.bz2) = 2b3b2147b7bc91f362be55cb49fa1c4e diff --git a/devel/libpci/files/patch-lib::Makefile b/devel/libpci/files/patch-lib::Makefile new file mode 100644 index 000000000000..c983317cb17a --- /dev/null +++ b/devel/libpci/files/patch-lib::Makefile @@ -0,0 +1,20 @@ +--- lib/Makefile.orig Thu Dec 26 22:28:33 2002 ++++ lib/Makefile Sat Jun 28 05:39:36 2003 +@@ -28,6 +28,9 @@ + ifdef HAVE_PM_FBSD_DEVICE + OBJS += fbsd-device.o + CFLAGS += -I/usr/src/sys ++ifdef FREEBSD_SYS ++CFLAGS += -I${FREEBSD_SYS} ++endif + endif + + ifdef HAVE_PM_AIX_DEVICE +@@ -49,6 +52,7 @@ + rm -f $@ + ar rcs $@ $^ + ranlib $@ ++ gcc $(CFLAGS) -shared $@ -o libpci.so + + access.o: access.c $(INCL) + i386-ports.o: i386-ports.c $(INCL) diff --git a/devel/libpci/files/patch-lib::fbsd-device.c b/devel/libpci/files/patch-lib::fbsd-device.c new file mode 100644 index 000000000000..1f168f55def1 --- /dev/null +++ b/devel/libpci/files/patch-lib::fbsd-device.c @@ -0,0 +1,24 @@ +--- lib/fbsd-device.c.orig Fri Jun 13 11:11:29 2003 ++++ lib/fbsd-device.c Fri Jun 13 11:21:52 2003 +@@ -14,9 +14,19 @@ + #include <fcntl.h> + #include <string.h> + #include <unistd.h> ++#include <osreldate.h> + +-#include <pci/pcivar.h> +-#include <pci/pci_ioctl.h> ++#if __FreeBSD_version < 500000 ++# include <pci/pcivar.h> ++#else ++# include <dev/pci/pcivar.h> ++#endif ++ ++#if __FreeBSD_version < 430000 ++# include <pci/pci_ioctl.h> ++#else ++# include <sys/pciio.h> ++#endif + + #include "internal.h" + diff --git a/devel/libpci/pkg-descr b/devel/libpci/pkg-descr new file mode 100644 index 000000000000..6990d20f2301 --- /dev/null +++ b/devel/libpci/pkg-descr @@ -0,0 +1,7 @@ +libpci provides a portable layer for read and write access +to PCI configuration registers. Supported platforms include +Linux, FreeBSD, NetBSD and AIX. + + WWW: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html + +- Samy Al Bahra <samy@kerneled.com> diff --git a/devel/libpci/pkg-plist b/devel/libpci/pkg-plist new file mode 100644 index 000000000000..08151a13cf50 --- /dev/null +++ b/devel/libpci/pkg-plist @@ -0,0 +1,3 @@ +lib/libpci.a +lib/libpci.so +lib/libpci.so.2 |