summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/pciutils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/pciutils')
-rw-r--r--meta/recipes-bsp/pciutils/pciutils/configure.patch81
-rw-r--r--meta/recipes-bsp/pciutils/pciutils_3.12.0.bb54
-rw-r--r--meta/recipes-bsp/pciutils/pciutils_3.6.4.bb60
3 files changed, 54 insertions, 141 deletions
diff --git a/meta/recipes-bsp/pciutils/pciutils/configure.patch b/meta/recipes-bsp/pciutils/pciutils/configure.patch
deleted file mode 100644
index e444c13975..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils/configure.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-This patch:
-* ensures we link correctly
-* allows us to optionally pass target information to configure rather than using uname
-* select linux as the platform in most cases we care about
-
-This is a merge of various tweaks to allow us to build pciutils including
-work from:
-
-7/30/2010 - Qing He <qing.he@intel.com>
-1/22/2012 - Shane Wang <shane.wang@intel.com>
-Ionut Radu <ionutx.radu@intel.com>
-2017/6/15 - RP - Cleanups and merging patches
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: pciutils-3.5.6/Makefile
-===================================================================
---- pciutils-3.5.6.orig/Makefile
-+++ pciutils-3.5.6/Makefile
-@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB)
- example.o: example.c $(PCIINC)
-
- %: %.o
-- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@
-+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@
-
- %.8 %.7 %.5: %.man
- M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
-Index: pciutils-3.5.6/lib/configure
-===================================================================
---- pciutils-3.5.6.orig/lib/configure
-+++ pciutils-3.5.6/lib/configure
-@@ -9,6 +9,10 @@ echo_n() {
- printf '%s' "$*"
- }
-
-+VERSION=$1
-+IDSDIR=$2
-+DNS=yes
-+
- if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then
- echo >&2 "Please run the configure script from the top-level Makefile"
- exit 1
-@@ -16,8 +20,8 @@ fi
-
- echo_n "Configuring libpci for your system..."
- if [ -z "$HOST" ] ; then
-- sys=`uname -s`
-- rel=`uname -r`
-+ sys=${3:-`uname -s`}
-+ rel=
- realsys="$sys"
- if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
- then
-@@ -25,7 +29,7 @@ if [ -z "$HOST" ] ; then
- proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
- cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
- else
-- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`
-+ cpu=${4:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`}
- fi
- if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ]
- then
-@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then
- then
- sys=cygwin
- fi
-- HOST=${3:-$cpu-$sys}
-+ HOST=$cpu-$sys
- fi
- [ -n "$RELEASE" ] && rel="${RELEASE}"
- # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
-@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- echo " $host $rel $cpu $sys"
-
-+{ echo "$host" | grep linux; } && sys=linux
-+
- c=config.h
- m=config.mk
- echo >$c '#define PCI_CONFIG_H'
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.12.0.bb b/meta/recipes-bsp/pciutils/pciutils_3.12.0.bb
new file mode 100644
index 0000000000..2db0895bf4
--- /dev/null
+++ b/meta/recipes-bsp/pciutils/pciutils_3.12.0.bb
@@ -0,0 +1,54 @@
+SUMMARY = "PCI utilities"
+DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
+to PCI bus configuration space and several utilities based on this library.'
+HOMEPAGE = "https://mj.ucw.cz/sw/pciutils/"
+SECTION = "console/utils"
+
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+# Can drop make-native when all systems have make 4.3
+# https://git.savannah.gnu.org/cgit/make.git/commit/?id=b90fabc8d6f34fb37d428dc0fb1b8b1951a9fbed
+# causes space issues in lib/libpci.pc
+DEPENDS = "make-native"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz"
+SRC_URI[sha256sum] = "f185d116d5ff99b797497efce8f19f1ee8ccc5a668b97a159e3d13472f674154"
+
+inherit multilib_header pkgconfig update-alternatives
+
+PACKAGECONFIG ??= "hwdb kmod zlib"
+PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
+PACKAGECONFIG[kmod] = "LIBKMOD=yes,LIBKMOD=no,kmod"
+PACKAGECONFIG[zlib] = "ZLIB=yes,ZLIB=no,zlib"
+
+# Configuration options
+EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS} DNS=yes SHARED=yes"
+# Construct a HOST that matches what lib/configure expects
+EXTRA_OEMAKE += "HOST="${HOST_ARCH}-${HOST_OS}""
+# Toolchain. We need to pass CFLAGS via CC as this is the only variable
+# available to the caller without clobbering assignments (notably, -fPIC)
+EXTRA_OEMAKE += "CC="${CC} ${CFLAGS}" AR="${AR}" STRIP= LDFLAGS="${LDFLAGS}""
+# Paths
+EXTRA_OEMAKE += "PREFIX=${prefix} LIBDIR=${libdir} SBINDIR=${sbindir} SHAREDIR=${datadir} MANDIR=${mandir}"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install install-lib
+
+ install -d ${D}${bindir}
+
+ oe_multilib_header pci/config.h
+}
+
+PACKAGES =+ "${PN}-ids libpci"
+
+FILES:${PN}-ids = "${datadir}/pci.ids*"
+SUMMARY:${PN}-ids = "PCI utilities - device ID database"
+DESCRIPTION:${PN}-ids = "Package providing the PCI device ID database for pciutils."
+RDEPENDS:${PN} += "${PN}-ids"
+
+FILES:libpci = "${libdir}/libpci.so.*"
+# The versioned symbols in libpci appear to be causing relocations
+INSANE_SKIP:libpci += "textrel"
+
+ALTERNATIVE:${PN} = "lspci"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.6.4.bb b/meta/recipes-bsp/pciutils/pciutils_3.6.4.bb
deleted file mode 100644
index 034bb63dc9..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils_3.6.4.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "PCI utilities"
-DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
-to PCI bus configuration space and several utilities based on this library.'
-HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "zlib kmod"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
- file://configure.patch"
-
-SRC_URI[md5sum] = "4343b37e19f319ce8f3d59c30031790e"
-SRC_URI[sha256sum] = "f67ff732976e2db2a5ccdf3960020796526ba6b05f6b1cdd24b7b206af706055"
-
-inherit multilib_header pkgconfig
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
-PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
-
-PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
-
-# see configure.patch
-do_configure () {
- (
- cd lib && \
- # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
- # so we put it before ./configure
- ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
- )
-}
-
-export PREFIX = "${prefix}"
-export SBINDIR = "${sbindir}"
-export SHAREDIR = "${datadir}"
-export MANDIR = "${mandir}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
-
-ASNEEDED = ""
-
-# The configure script breaks if the HOST variable is set
-HOST[unexport] = "1"
-
-do_install () {
- oe_runmake DESTDIR=${D} install install-lib
-
- install -d ${D}${bindir}
- ln -s ../sbin/lspci ${D}${bindir}/lspci
-
- oe_multilib_header pci/config.h
-}
-
-PACKAGES =+ "${PN}-ids libpci"
-FILES_${PN}-ids = "${datadir}/pci.ids*"
-FILES_libpci = "${libdir}/libpci.so.*"
-SUMMARY_${PN}-ids = "PCI utilities - device ID database"
-DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
-RDEPENDS_${PN} += "${PN}-ids"