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.14.0.bb55
-rw-r--r--meta/recipes-bsp/pciutils/pciutils_3.7.0.bb59
3 files changed, 55 insertions, 140 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 @@
1This patch:
2* ensures we link correctly
3* allows us to optionally pass target information to configure rather than using uname
4* select linux as the platform in most cases we care about
5
6This is a merge of various tweaks to allow us to build pciutils including
7work from:
8
97/30/2010 - Qing He <qing.he@intel.com>
101/22/2012 - Shane Wang <shane.wang@intel.com>
11Ionut Radu <ionutx.radu@intel.com>
122017/6/15 - RP - Cleanups and merging patches
13
14Upstream-Status: Inappropriate [embedded specific]
15
16Index: pciutils-3.5.6/Makefile
17===================================================================
18--- pciutils-3.5.6.orig/Makefile
19+++ pciutils-3.5.6/Makefile
20@@ -96,7 +96,7 @@ example: example.o lib/$(PCILIB)
21 example.o: example.c $(PCIINC)
22
23 %: %.o
24- $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@
25+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LIB_LDLIBS) $(LDLIBS) -o $@
26
27 %.8 %.7 %.5: %.man
28 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)#"
29Index: pciutils-3.5.6/lib/configure
30===================================================================
31--- pciutils-3.5.6.orig/lib/configure
32+++ pciutils-3.5.6/lib/configure
33@@ -9,6 +9,10 @@ echo_n() {
34 printf '%s' "$*"
35 }
36
37+VERSION=$1
38+IDSDIR=$2
39+DNS=yes
40+
41 if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then
42 echo >&2 "Please run the configure script from the top-level Makefile"
43 exit 1
44@@ -16,8 +20,8 @@ fi
45
46 echo_n "Configuring libpci for your system..."
47 if [ -z "$HOST" ] ; then
48- sys=`uname -s`
49- rel=`uname -r`
50+ sys=${3:-`uname -s`}
51+ rel=
52 realsys="$sys"
53 if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
54 then
55@@ -25,7 +29,7 @@ if [ -z "$HOST" ] ; then
56 proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
57 cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`
58 else
59- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`
60+ cpu=${4:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'`}
61 fi
62 if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ]
63 then
64@@ -35,7 +39,7 @@ if [ -z "$HOST" ] ; then
65 then
66 sys=cygwin
67 fi
68- HOST=${3:-$cpu-$sys}
69+ HOST=$cpu-$sys
70 fi
71 [ -n "$RELEASE" ] && rel="${RELEASE}"
72 # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
73@@ -44,6 +48,8 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
74 sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
75 echo " $host $rel $cpu $sys"
76
77+{ echo "$host" | grep linux; } && sys=linux
78+
79 c=config.h
80 m=config.mk
81 echo >$c '#define PCI_CONFIG_H'
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.14.0.bb b/meta/recipes-bsp/pciutils/pciutils_3.14.0.bb
new file mode 100644
index 0000000000..a267ea34b7
--- /dev/null
+++ b/meta/recipes-bsp/pciutils/pciutils_3.14.0.bb
@@ -0,0 +1,55 @@
1SUMMARY = "PCI utilities"
2DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
3to PCI bus configuration space and several utilities based on this library.'
4HOMEPAGE = "https://mj.ucw.cz/sw/pciutils/"
5SECTION = "console/utils"
6
7LICENSE = "GPL-2.0-or-later"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
9# Can drop make-native when all systems have make 4.3
10# https://git.savannah.gnu.org/cgit/make.git/commit/?id=b90fabc8d6f34fb37d428dc0fb1b8b1951a9fbed
11# causes space issues in lib/libpci.pc
12DEPENDS = "make-native"
13
14SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz"
15SRC_URI[sha256sum] = "e7713409882813991d2269d125e40dad1f54a019a52b78b3962941c1d4a6f86f"
16
17inherit multilib_header pkgconfig update-alternatives
18
19PACKAGECONFIG ??= "hwdb kmod zlib"
20PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
21PACKAGECONFIG[kmod] = "LIBKMOD=yes,LIBKMOD=no,kmod"
22PACKAGECONFIG[zlib] = "ZLIB=yes,ZLIB=no,zlib"
23
24# Configuration options
25EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS} DNS=yes SHARED=yes"
26# Construct a HOST that matches what lib/configure expects
27EXTRA_OEMAKE += "HOST="${HOST_ARCH}-${HOST_OS}""
28# Toolchain. We need to pass CFLAGS via CC as this is the only variable
29# available to the caller without clobbering assignments (notably, -fPIC)
30EXTRA_OEMAKE += "CC="${CC} ${CFLAGS}" AR="${AR}" STRIP= LDFLAGS="${LDFLAGS}""
31# Paths
32EXTRA_OEMAKE += "PREFIX=${prefix} LIBDIR=${libdir} SBINDIR=${sbindir} SHAREDIR=${datadir} MANDIR=${mandir}"
33
34do_install () {
35 # Do these in separate calls as they expose a race in pseudo when creating
36 # symlinks when ran in parallel.
37 oe_runmake DESTDIR=${D} install
38 oe_runmake DESTDIR=${D} install-lib
39
40 install -d ${D}${bindir}
41
42 oe_multilib_header pci/config.h
43}
44
45PACKAGES =+ "${PN}-ids libpci"
46
47FILES:${PN}-ids = "${datadir}/pci.ids*"
48SUMMARY:${PN}-ids = "PCI utilities - device ID database"
49DESCRIPTION:${PN}-ids = "Package providing the PCI device ID database for pciutils."
50RDEPENDS:${PN} += "${PN}-ids"
51
52FILES:libpci = "${libdir}/libpci.so.*"
53
54ALTERNATIVE:${PN} = "lspci"
55ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-bsp/pciutils/pciutils_3.7.0.bb b/meta/recipes-bsp/pciutils/pciutils_3.7.0.bb
deleted file mode 100644
index 4f0edc01ed..0000000000
--- a/meta/recipes-bsp/pciutils/pciutils_3.7.0.bb
+++ /dev/null
@@ -1,59 +0,0 @@
1SUMMARY = "PCI utilities"
2DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
3to PCI bus configuration space and several utilities based on this library.'
4HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
5SECTION = "console/utils"
6
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
9DEPENDS = "zlib kmod"
10
11SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
12 file://configure.patch"
13
14SRC_URI[sha256sum] = "9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb"
15
16inherit multilib_header pkgconfig
17
18PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
19PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
20
21PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
22
23# see configure.patch
24do_configure () {
25 (
26 cd lib && \
27 # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
28 # so we put it before ./configure
29 ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
30 )
31}
32
33export PREFIX = "${prefix}"
34export SBINDIR = "${sbindir}"
35export SHAREDIR = "${datadir}"
36export MANDIR = "${mandir}"
37
38EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
39
40ASNEEDED = ""
41
42# The configure script breaks if the HOST variable is set
43HOST[unexport] = "1"
44
45do_install () {
46 oe_runmake DESTDIR=${D} install install-lib
47
48 install -d ${D}${bindir}
49 ln -s ../sbin/lspci ${D}${bindir}/lspci
50
51 oe_multilib_header pci/config.h
52}
53
54PACKAGES =+ "${PN}-ids libpci"
55FILES_${PN}-ids = "${datadir}/pci.ids*"
56FILES_libpci = "${libdir}/libpci.so.*"
57SUMMARY_${PN}-ids = "PCI utilities - device ID database"
58DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
59RDEPENDS_${PN} += "${PN}-ids"