pciutils: fix build on SunOS, no symbol versioning available

lspci still says:
> lspci: Cannot find any working access method.

But at least it won't hold up the 28 packages that depend on this.
This commit is contained in:
tnn 2022-01-09 22:31:57 +00:00
parent eef1bfa568
commit d5f7e8e0d7
3 changed files with 29 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.48 2021/12/17 20:07:24 maya Exp $
# $NetBSD: Makefile,v 1.49 2022/01/09 22:31:57 tnn Exp $
DISTNAME= pciutils-3.7.0
PKGREVISION= 2
@ -41,4 +41,6 @@ SUBST_STAGE.dns= pre-configure
SUBST_FILES.dns= Makefile
SUBST_SED.dns= -e 's/^DNS=/DNS=no/'
BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,--version-script=libpci.ver
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.38 2021/12/17 20:07:24 maya Exp $
$NetBSD: distinfo,v 1.39 2022/01/09 22:31:57 tnn Exp $
BLAKE2s (pciutils-3.7.0.tar.gz) = da0286d390bcb46d3cba1665e33edc163a895af428af2b2f1910450839431ac3
SHA512 (pciutils-3.7.0.tar.gz) = 37c01619264d299ac1e367a022637d60ab2bf6e5533fe9d37b2d37fdc5070563b78bfedc200b6bcb9192ce43fdec09ff350080c3e3ba504b90766d004398efc5
@ -7,3 +7,4 @@ SHA1 (patch-aa) = 4c5c8950868627c7175a3544dccb6f645fd9c52d
SHA1 (patch-ab) = 14786e702cceaea9146f34a5a301650d2092d689
SHA1 (patch-ac) = 4b90e99c051391b9cd3a6c1f5781f41b4a855c29
SHA1 (patch-lib_i386-io-sunos.h) = 4917244d39b48d38b8173cf3031281ad1c7fec24
SHA1 (patch-lib_internal.h) = e608669ead99bb63e3c245046412b8cde5abc31a

View file

@ -0,0 +1,24 @@
$NetBSD: patch-lib_internal.h,v 1.1 2022/01/09 22:31:57 tnn Exp $
no symbol versioning available on SunOS
--- lib/internal.h.orig 2020-05-26 16:11:35.000000000 +0000
+++ lib/internal.h
@@ -18,6 +18,17 @@
#define STATIC_ALIAS(_decl, _for) _decl PCI_ABI { return _for; }
#define DEFINE_ALIAS(_decl, _for)
#define SYMBOL_VERSION(_int, _ext)
+#elif defined(__sun__)
+#define STATIC_ALIAS(_decl, _for)
+#define DEFINE_ALIAS(_decl, _for)
+#define SYMBOL_VERSION(_int, _ext)
+#define pci_fill_info_v35 pci_fill_info
+#define pci_filter_init_v33 pci_filter_init
+#define pci_fill_info_v35 pci_fill_info
+#define pci_init_v35 pci_init
+#define pci_filter_parse_slot_v33 pci_filter_parse_slot
+#define pci_filter_parse_id_v33 pci_filter_parse_id
+#define pci_filter_match_v33 pci_filter_match
#else
#define STATIC_ALIAS(_decl, _for)
#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for)))