pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/libpciaccess Update to 0.13.2. Set LICENSE.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8e6e95fe7bcb
branches:  trunk
changeset: 621949:8e6e95fe7bcb
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Jul 21 09:42:40 2013 +0000

description:
Update to 0.13.2. Set LICENSE.

This release provides a lot of platform-specific improvements for various
platforms, including Solaris (SPARC & x64), FreeBSD, NetBSD, and Hurd.
It also provides some platform-independent fixes & code cleanup.

Adam Jackson (1):
      configure: Remove AM_MAINTAINER_MODE

Alan Coopersmith (10):
      Solaris: Implement map_legacy & legacy_io functions
      Solaris: refactor pci_device_solx_devfs_map_range to reduce code duplication
      Bug 63583 - add legacy IO routines for FreeBSD
      Define PCI_MATCH_ANY as an unsigned int
      pci_id_file_open: move variable inside the #ifndef that uses it
      pci_device_solx_devfs_read: fix sign conversion/comparison warnings
      Solaris: Remove #defines for Ultra 45 southbridge device ids
      pci_device_solx_devfs_probe: implicit conversion changes signedness warnings
      Resync COPYING file with copyrights/licenses from code
      libpciaccess 0.13.2

Colin Walters (1):
      autogen.sh: Implement GNOME Build API

Egbert Eich (1):
      PCI: set correct mask value when matching for bridges.

Henry Zhao (5):
      libpciaccess: implementation of boot_vga in Solaris
      libpciaccess: sparc rom read fix
      scanpci: print meaningful info on BASEROM
      Solaris: Add domain support for sparc platform
      Solaris: probe improvement

John Martin (1):
      Fix Sun bug #7035791: scanpci should report 64 bit registers

Mark Logan (1):
      libpciaccess: fix memory usage errors

Samuel Thibault (1):
      Implement legacy io & map for x86 backend

Thomas Klausner (6):
      Protect config.h like usual.
      Move 'const' to correct place, so it has meaning.
      Update NetBSD support.
      Enable boot_vga support only if WSDISPLAYIO_GET_BUSID is defined.
      Fix build on NetBSD-4.
      Support more pci functions on NetBSD.

diffstat:

 sysutils/libpciaccess/Makefile                               |    23 +-
 sysutils/libpciaccess/distinfo                               |    18 +-
 sysutils/libpciaccess/patches/patch-ac                       |  1053 ---------
 sysutils/libpciaccess/patches/patch-configure                |    23 +
 sysutils/libpciaccess/patches/patch-configure.ac             |    51 -
 sysutils/libpciaccess/patches/patch-scanpci_Makefile.am      |    15 -
 sysutils/libpciaccess/patches/patch-scanpci_scanpci.c        |    28 -
 sysutils/libpciaccess/patches/patch-src_common__bridge.c     |    25 -
 sysutils/libpciaccess/patches/patch-src_freebsd__pci.c       |   174 -
 sysutils/libpciaccess/patches/patch-src_pciaccess__private.h |    16 -
 sysutils/libpciaccess/patches/patch-src_solx__devfs.c        |  1153 ----------
 sysutils/libpciaccess/patches/patch-src_x86__pci.c           |   127 -
 12 files changed, 34 insertions(+), 2672 deletions(-)

diffs (truncated from 2776 to 300 lines):

diff -r cfd4dc6b8fff -r 8e6e95fe7bcb sysutils/libpciaccess/Makefile
--- a/sysutils/libpciaccess/Makefile    Sun Jul 21 09:11:43 2013 +0000
+++ b/sysutils/libpciaccess/Makefile    Sun Jul 21 09:42:40 2013 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.16 2013/06/03 14:19:38 wiz Exp $
+# $NetBSD: Makefile,v 1.17 2013/07/21 09:42:40 wiz Exp $
 
-DISTNAME=      libpciaccess-0.13.1
-PKGREVISION=   3
+DISTNAME=      libpciaccess-0.13.2
 CATEGORIES=    sysutils x11
 MASTER_SITES=  ${MASTER_SITE_XORG:=lib/}
 EXTRACT_SUFX=  .tar.bz2
@@ -9,6 +8,7 @@
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://xorg.freedesktop.org/
 COMMENT=       PCI access utility library from X.org
+LICENSE=       mit AND x11
 
 ###
 ### XXX This list is probably not exhaustive.
@@ -19,23 +19,12 @@
 ONLY_FOR_PLATFORM+=    Linux-*-* SunOS-*-*
 ONLY_FOR_PLATFORM+=    NetBSD-*-sparc64 NetBSD-*-hppa
 
-GNU_CONFIGURE= yes
-USE_LIBTOOL=   yes
-USE_TOOLS+=    pkg-config
-###
-### XXX When our patches make it upstream, this will no longer be
-###    necessary.
-###
-USE_TOOLS+=    autoconf automake autoreconf
-
+GNU_CONFIGURE=         yes
 CONFIGURE_ARGS+=       --with-zlib
+USE_LIBTOOL=           yes
+USE_TOOLS+=            pkg-config
 
 PKGCONFIG_OVERRIDE+=   pciaccess.pc.in
 
-BUILD_DEPENDS+=        xorg-util-macros>=1.3:../../devel/xorg-util-macros
-
-pre-configure:
-       cd ${WRKSRC} && autoreconf -v -i -f
-
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r cfd4dc6b8fff -r 8e6e95fe7bcb sysutils/libpciaccess/distinfo
--- a/sysutils/libpciaccess/distinfo    Sun Jul 21 09:11:43 2013 +0000
+++ b/sysutils/libpciaccess/distinfo    Sun Jul 21 09:42:40 2013 +0000
@@ -1,14 +1,6 @@
-$NetBSD: distinfo,v 1.22 2013/06/04 10:16:00 obache Exp $
+$NetBSD: distinfo,v 1.23 2013/07/21 09:42:40 wiz Exp $
 
-SHA1 (libpciaccess-0.13.1.tar.bz2) = ae4dcf27a1b52c6a1fd90b21165fbaecae34e8ac
-RMD160 (libpciaccess-0.13.1.tar.bz2) = 2e4c94bd782e98d360664cc0ce3d5ad2d1b0045c
-Size (libpciaccess-0.13.1.tar.bz2) = 352351 bytes
-SHA1 (patch-ac) = 254cb4ce079f64f80ec56b5caaae8390b214411e
-SHA1 (patch-configure.ac) = 7c5042225016fcd47e8cfd8242c0533ea86b8c5e
-SHA1 (patch-scanpci_Makefile.am) = 086fead04b4a2e506a35aca5d5fe82395708e90c
-SHA1 (patch-scanpci_scanpci.c) = 795d0572af9afb13af60f878f9f44d40edb33463
-SHA1 (patch-src_common__bridge.c) = 658815c38b4f2e318bf083bc81b9042f88d04b2f
-SHA1 (patch-src_freebsd__pci.c) = 6b96f4c60a386a129069c3cd4593ba27938346e4
-SHA1 (patch-src_pciaccess__private.h) = 56853598f50e5656ff7ba190b31f2940d66ec468
-SHA1 (patch-src_solx__devfs.c) = 924649d561bc9922b6ee8335ffe5e997b1cb8c3c
-SHA1 (patch-src_x86__pci.c) = b9820f8ff9306c18d040444e57270f520f95a58f
+SHA1 (libpciaccess-0.13.2.tar.bz2) = 63df515a4c5d5a339a7c1f9e4baa6543efa3c7da
+RMD160 (libpciaccess-0.13.2.tar.bz2) = d02d6be193cbea6a56c08b041c5ef3d3902f330c
+Size (libpciaccess-0.13.2.tar.bz2) = 359231 bytes
+SHA1 (patch-configure) = 92a80491413c1e6882290498745f5f841f2a2362
diff -r cfd4dc6b8fff -r 8e6e95fe7bcb sysutils/libpciaccess/patches/patch-ac
--- a/sysutils/libpciaccess/patches/patch-ac    Sun Jul 21 09:11:43 2013 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,1053 +0,0 @@
-$NetBSD: patch-ac,v 1.15 2013/06/04 10:16:00 obache Exp $
-
-Improve NetBSD support. From Michael Lorenz <macallan%NetBSD.org@localhost>.
-Enable boot_vga support only if WSDISPLAYIO_GET_BUSID is defined.
-
---- src/netbsd_pci.c.orig      2012-04-09 10:02:57.000000000 -0700
-+++ src/netbsd_pci.c   2013-06-02 06:52:58.000000000 -0700
-@@ -1,6 +1,7 @@
- /*
-  * Copyright (c) 2008 Juan Romero Pardines
-  * Copyright (c) 2008 Mark Kettenis
-+ * Copyright (c) 2009 Michael Lorenz
-  *
-  * Permission to use, copy, modify, and distribute this software for any
-  * purpose with or without fee is hereby granted, provided that the above
-@@ -20,8 +21,22 @@
- #include <sys/mman.h>
- #include <sys/types.h>
- 
-+#include "config.h"
-+
-+#ifdef HAVE_MTRR
- #include <machine/sysarch.h>
- #include <machine/mtrr.h>
-+#ifdef _X86_SYSARCH_L
-+#define netbsd_set_mtrr(mr, num)      _X86_SYSARCH_L(set_mtrr)(mr, num)
-+#else
-+#ifdef __i386__
-+#define netbsd_set_mtrr(mr, num)      i386_set_mtrr((mr), (num))
-+#endif
-+#ifdef __amd64__
-+#define netbsd_set_mtrr(mr, num)      x86_64_set_mtrr((mr), (num))
-+#endif
-+#endif
-+#endif
- 
- #include <dev/pci/pciio.h>
- #include <dev/pci/pcireg.h>
-@@ -35,126 +50,152 @@
- #include <unistd.h>
- 
- 
-+#include <pci.h>
-+#include <dev/wscons/wsconsio.h>
-+
- #include "pciaccess.h"
- #include "pciaccess_private.h"
- 
--static int pcifd;
-+typedef struct _pcibus {
-+      int fd;         /* /dev/pci* */
-+      int num;        /* bus number */
-+      int maxdevs;    /* maximum number of devices */
-+} PciBus;
-+
-+static PciBus buses[32];      /* indexed by pci_device.domain */
-+static int nbuses = 0;                /* number of buses found */
-+
-+/*
-+ * NetBSD's userland has a /dev/pci* entry for each bus but userland has no way
-+ * to tell if a bus is a subordinate of another one or if it's on a different
-+ * host bridge. On some architectures ( macppc for example ) all root buses have
-+ * bus number 0 but on sparc64 for example the two roots in an Ultra60 have
-+ * different bus numbers - one is 0 and the other 128.
-+ * With each /dev/pci* we can map everything on the same root and we can also
-+ * see all devices on the same root, trying to do that causes problems though:
-+ * - since we can't tell which /dev/pci* is a subordinate we would find some
-+ *   devices more than once
-+ * - we would have to guess subordinate bus numbers which is a waste of time
-+ *   since we can ask each /dev/pci* for its bus number so we can scan only the
-+ *   buses we know exist, not all 256 which may exist in each domain.
-+ * - some bus_space_mmap() methods may limit mappings to address ranges which
-+ *   belong to known devices on that bus only.
-+ * Each host bridge may or may not have its own IO range, to avoid guesswork
-+ * here each /dev/pci* will let userland map its appropriate IO range at
-+ * PCI_MAGIC_IO_RANGE if defined in <machine/param.h>
-+ * With all this we should be able to use any PCI graphics device on any PCI
-+ * bus on any architecture as long as Xorg has a driver, without allowing
-+ * arbitrary mappings via /dev/mem and without userland having to know or care
-+ * about translating bus addresses to physical addresses or the other way 
-+ * around.
-+ */
- 
- static int
--pci_read(int bus, int dev, int func, uint32_t reg, uint32_t *val)
-+pci_read(int domain, int bus, int dev, int func, uint32_t reg, uint32_t *val)
- {
--      struct pciio_bdf_cfgreg io;
--      int err;
-+      uint32_t rval;
- 
--      bzero(&io, sizeof(io));
--      io.bus = bus;
--      io.device = dev;
--      io.function = func;
--      io.cfgreg.reg = reg;
-+      if ((domain < 0) || (domain > nbuses))
-+              return -1;
- 
--      err = ioctl(pcifd, PCI_IOC_BDF_CFGREAD, &io);
--      if (err)
--              return (err);
-+      if (pcibus_conf_read(buses[domain].fd, (unsigned int)bus,
-+          (unsigned int)dev, (unsigned int)func, reg, &rval) == -1)
-+              return (-1);
- 
--      *val = io.cfgreg.val;
-+      *val = rval;
- 
-       return 0;
- }
- 
- static int
--pci_write(int bus, int dev, int func, uint32_t reg, uint32_t val)
-+pci_write(int domain, int bus, int dev, int func, uint32_t reg, uint32_t val)
- {
--      struct pciio_bdf_cfgreg io;
- 
--      bzero(&io, sizeof(io));
--      io.bus = bus;
--      io.device = dev;
--      io.function = func;
--      io.cfgreg.reg = reg;
--      io.cfgreg.val = val;
-+      if ((domain < 0) || (domain > nbuses))
-+              return -1;
- 
--      return ioctl(pcifd, PCI_IOC_BDF_CFGWRITE, &io);
-+      return pcibus_conf_write(buses[domain].fd, (unsigned int)bus,
-+          (unsigned int)dev, (unsigned int)func, reg, val);
- }
- 
- static int
--pci_nfuncs(int bus, int dev)
-+pci_nfuncs(int domain, int bus, int dev)
- {
-       uint32_t hdr;
- 
--      if (pci_read(bus, dev, 0, PCI_BHLC_REG, &hdr) != 0)
-+      if ((domain < 0) || (domain > nbuses))
-+              return -1;
-+
-+      if (pci_read(domain, bus, dev, 0, PCI_BHLC_REG, &hdr) != 0)
-               return -1;
- 
-       return (PCI_HDRTYPE_MULTIFN(hdr) ? 8 : 1);
- }
- 
-+/*ARGSUSED*/
- static int
- pci_device_netbsd_map_range(struct pci_device *dev,
-     struct pci_device_mapping *map)
- {
--      struct mtrr mtrr;
--      int fd, error, nmtrr, prot = PROT_READ;
-+#ifdef HAVE_MTRR
-+      struct mtrr m;
-+      int n = 1;
-+#endif
-+      int prot, ret = 0;
- 
--      if ((fd = open("/dev/mem", O_RDWR | O_CLOEXEC)) == -1)
--              return errno;
-+      prot = PROT_READ;
- 
-       if (map->flags & PCI_DEV_MAP_FLAG_WRITABLE)
-               prot |= PROT_WRITE;
--
--      map->memory = mmap(NULL, map->size, prot, MAP_SHARED,
--          fd, map->base);
-+      map->memory = mmap(NULL, (size_t)map->size, prot, MAP_SHARED,
-+          buses[dev->domain].fd, (off_t)map->base);
-       if (map->memory == MAP_FAILED)
-               return errno;
- 
-+#ifdef HAVE_MTRR
-+      memset(&m, 0, sizeof(m));
-+
-       /* No need to set an MTRR if it's the default mode. */
-       if ((map->flags & PCI_DEV_MAP_FLAG_CACHABLE) ||
-           (map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) {
--              mtrr.base = map->base;
--              mtrr.len = map->size;
--              mtrr.flags = MTRR_VALID;
--
-+              m.base = map->base;
-+              m.flags = MTRR_VALID | MTRR_PRIVATE;
-+              m.len = map->size;
-+              m.owner = getpid();
-               if (map->flags & PCI_DEV_MAP_FLAG_CACHABLE)
--                      mtrr.type = MTRR_TYPE_WB;
-+                      m.type = MTRR_TYPE_WB;
-               if (map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)
--                      mtrr.type = MTRR_TYPE_WC;
--#ifdef __i386__
--              error = i386_set_mtrr(&mtrr, &nmtrr);
--#endif
--#ifdef __amd64__
--              error = x86_64_set_mtrr(&mtrr, &nmtrr);
--#endif
--              if (error) {
--                      close(fd);
--                      return errno;
-+                      m.type = MTRR_TYPE_WC;
-+
-+              if ((netbsd_set_mtrr(&m, &n)) == -1) {
-+                      fprintf(stderr, "mtrr set failed: %s\n",
-+                          strerror(errno));
-               }
-       }
-+#endif
- 
--      close(fd);
--
--      return 0;
-+      return ret;
- }
- 
- static int
- pci_device_netbsd_unmap_range(struct pci_device *dev,
-     struct pci_device_mapping *map)
- {
--      struct mtrr mtrr;
--      int nmtrr, error;
-+#ifdef HAVE_MTRR



Home | Main Index | Thread Index | Old Index