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