git: df10dcefa427 - main - devel/libpciaccess: Update to 0.17

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Sun, 26 Mar 2023 17:32:36 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=df10dcefa427fcc3a4b1405387b12466dc5a9cdc

commit df10dcefa427fcc3a4b1405387b12466dc5a9cdc
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2023-03-24 08:55:10 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-03-26 17:31:30 +0000

    devel/libpciaccess: Update to 0.17
    
    While here use upstreamed patches and remove dep on pciics,
    if the file exists it is prefered but by default use pci_vendors from base.
    
    Releases notes: https://lists.x.org/archives/xorg-announce/2022-October/003226.html
    
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
---
 devel/libpciaccess/Makefile                       | 13 ++++----
 devel/libpciaccess/distinfo                       | 10 +++++--
 devel/libpciaccess/files/patch-src_freebsd__pci.c | 36 -----------------------
 devel/libpciaccess/pkg-plist                      |  1 -
 4 files changed, 13 insertions(+), 47 deletions(-)

diff --git a/devel/libpciaccess/Makefile b/devel/libpciaccess/Makefile
index b8536bf4b9b7..9673f4c94651 100644
--- a/devel/libpciaccess/Makefile
+++ b/devel/libpciaccess/Makefile
@@ -1,7 +1,11 @@
 PORTNAME=	libpciaccess
-PORTVERSION=	0.16
+PORTVERSION=	0.17
 CATEGORIES=	devel
 
+PATCH_SITES=	https://gitlab.freedesktop.org/xorg/lib/${PORTNAME}/-/commit/
+PATCHFILES+=	7f7d12445c3c.patch:-p1 #https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/merge_requests/27
+PATCHFILES+=	4ee437c98c2d.patch:-p1 #https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/merge_requests/28
+
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	Generic PCI access library
 WWW=		https://www.freedesktop.org/wiki/Software/xlibs/
@@ -9,12 +13,7 @@ WWW=		https://www.freedesktop.org/wiki/Software/xlibs/
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BUILD_DEPENDS=	${LOCALBASE}/share/pciids/pci.ids:misc/pciids
-RUN_DEPENDS=	${LOCALBASE}/share/pciids/pci.ids:misc/pciids
-
-CONFIGURE_ARGS=	--with-pciids-path=${LOCALBASE}/share/pciids
-
-USES=		xorg-cat:lib
+USES=		tar:xz xorg-cat:lib,meson
 INSTALL_TARGET=	install-strip
 
 .include <bsd.port.mk>
diff --git a/devel/libpciaccess/distinfo b/devel/libpciaccess/distinfo
index 37085ff2c0d7..b42c4e613c50 100644
--- a/devel/libpciaccess/distinfo
+++ b/devel/libpciaccess/distinfo
@@ -1,3 +1,7 @@
-TIMESTAMP = 1564692641
-SHA256 (xorg/lib/libpciaccess-0.16.tar.bz2) = 214c9d0d884fdd7375ec8da8dcb91a8d3169f263294c9a90c575bf1938b9f489
-SIZE (xorg/lib/libpciaccess-0.16.tar.bz2) = 366603
+TIMESTAMP = 1679655835
+SHA256 (xorg/lib/libpciaccess-0.17.tar.xz) = 74283ba3c974913029e7a547496a29145b07ec51732bbb5b5c58d5025ad95b73
+SIZE (xorg/lib/libpciaccess-0.17.tar.xz) = 331768
+SHA256 (xorg/lib/7f7d12445c3c.patch) = 372a5615b3643b7d67b22f542033c9a2a5ba70e570eeda3cfdb2331c3927d431
+SIZE (xorg/lib/7f7d12445c3c.patch) = 1002
+SHA256 (xorg/lib/4ee437c98c2d.patch) = 10065f02a32c00b2e234cd89c973f4346cd633c1c812463eb02dc805b326cc39
+SIZE (xorg/lib/4ee437c98c2d.patch) = 7331
diff --git a/devel/libpciaccess/files/patch-src_freebsd__pci.c b/devel/libpciaccess/files/patch-src_freebsd__pci.c
deleted file mode 100644
index 434267b954e0..000000000000
--- a/devel/libpciaccess/files/patch-src_freebsd__pci.c
+++ /dev/null
@@ -1,36 +0,0 @@
---- src/freebsd_pci.c.orig	2019-07-17 16:25:27 UTC
-+++ src/freebsd_pci.c
-@@ -421,24 +421,6 @@ pci_system_freebsd_destroy( void )
-     freebsd_pci_sys = NULL;
- }
- 
--static int
--pci_device_freebsd_has_kernel_driver( struct pci_device *dev )
--{
--    struct pci_io io;
--
--    io.pi_sel.pc_domain = dev->domain;
--    io.pi_sel.pc_bus = dev->bus;
--    io.pi_sel.pc_dev = dev->dev;
--    io.pi_sel.pc_func = dev->func;
--    
--    if ( ioctl( freebsd_pci_sys->pcidev, PCIOCATTACHED, &io ) < 0 ) {
--	return 0;
--    }
--
--    /* if io.pi_data is 0, no driver is attached */
--    return io.pi_data == 0 ? 0 : 1;
--}
--
- static struct pci_io_handle *
- pci_device_freebsd_open_legacy_io( struct pci_io_handle *ret,
- 				   struct pci_device *dev, pciaddr_t base,
-@@ -614,7 +596,7 @@ static const struct pci_system_methods freebsd_pci_met
-     .fill_capabilities = pci_fill_capabilities_generic,
-     .enable = NULL,
-     .boot_vga = NULL,
--    .has_kernel_driver = pci_device_freebsd_has_kernel_driver,
-+    .has_kernel_driver = NULL,
- 
-     .open_device_io = pci_device_freebsd_open_io,
-     .open_legacy_io = pci_device_freebsd_open_legacy_io,
diff --git a/devel/libpciaccess/pkg-plist b/devel/libpciaccess/pkg-plist
index 1c283a8a1e5f..b6196a03d1b4 100644
--- a/devel/libpciaccess/pkg-plist
+++ b/devel/libpciaccess/pkg-plist
@@ -1,5 +1,4 @@
 include/pciaccess.h
-lib/libpciaccess.a
 lib/libpciaccess.so
 lib/libpciaccess.so.0
 lib/libpciaccess.so.0.11.1