diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/packages/pciutils/pciutils-3.1.5/configure.patch (renamed from meta/packages/pciutils/pciutils-3.0.3/configure.patch) | 36 | ||||
-rw-r--r-- | meta/packages/pciutils/pciutils-3.1.5/guess-fix.patch | 35 | ||||
-rw-r--r-- | meta/packages/pciutils/pciutils-3.1.5/lib-build-fix.patch | 92 | ||||
-rw-r--r-- | meta/packages/pciutils/pciutils-3.1.5/pcimodules-pciutils.diff (renamed from meta/packages/pciutils/pciutils-3.0.3/pcimodules-pciutils.diff) | 25 | ||||
-rw-r--r-- | meta/packages/pciutils/pciutils_3.0.3.bb | 38 | ||||
-rw-r--r-- | meta/packages/pciutils/pciutils_3.1.5.bb | 56 |
6 files changed, 215 insertions, 67 deletions
diff --git a/meta/packages/pciutils/pciutils-3.0.3/configure.patch b/meta/packages/pciutils/pciutils-3.1.5/configure.patch index 0bfcc0c60..1bfe72475 100644 --- a/meta/packages/pciutils/pciutils-3.0.3/configure.patch +++ b/meta/packages/pciutils/pciutils-3.1.5/configure.patch @@ -2,12 +2,14 @@ # # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher # +--- -Index: pciutils-3.0.3/lib/configure -=================================================================== ---- pciutils-3.0.3.orig/lib/configure 2008-12-31 00:47:07.000000000 +0000 -+++ pciutils-3.0.3/lib/configure 2008-12-31 01:08:01.000000000 +0000 -@@ -11,6 +11,10 @@ +7/30/2010 - rebased to 3.1.5 by Qing He <qing.he@intel.com> + +diff -uNr pciutils-3.1.5.orig/lib/configure pciutils-3.1.5/lib/configure +--- pciutils-3.1.5.orig/lib/configure 2010-07-30 13:51:58.000000000 +0800 ++++ pciutils-3.1.5/lib/configure 2010-07-30 13:53:25.000000000 +0800 +@@ -14,6 +14,10 @@ fi } @@ -18,26 +20,27 @@ Index: pciutils-3.0.3/lib/configure if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then echo >&2 "Please run the configure script from the top-level Makefile" exit 1 -@@ -18,15 +22,15 @@ +@@ -21,8 +25,8 @@ echo_n "Configuring libpci for your system..." if [ -z "$HOST" ] ; then - sys=`uname -s` - rel=`uname -r` + sys=${3:-`uname -s`} -+ rel=${4:-`uname -r`} ++ rel= + realsys="$sys" if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ] then - rel=`/usr/bin/oslevel` +@@ -30,7 +34,7 @@ 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/'` -+ cpu=${5:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'`} ++ cpu=${4:-`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'`} fi if [ "$sys" = "GNU/kFreeBSD" -o "$sys" = "DragonFly" ] then -@@ -36,7 +40,7 @@ +@@ -40,7 +44,7 @@ then sys=cygwin fi @@ -46,7 +49,7 @@ Index: pciutils-3.0.3/lib/configure fi [ -n "$RELEASE" ] && rel="${RELEASE}" # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. -@@ -45,6 +49,21 @@ +@@ -49,6 +53,21 @@ sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo " $host $rel $cpu $sys" @@ -68,10 +71,9 @@ Index: pciutils-3.0.3/lib/configure c=config.h m=config.mk echo >$c '#define PCI_CONFIG_H' -Index: pciutils-3.0.3/Makefile -=================================================================== ---- pciutils-3.0.3.orig/Makefile 2008-12-31 01:07:52.000000000 +0000 -+++ pciutils-3.0.3/Makefile 2008-12-31 01:10:50.000000000 +0000 +diff -uNr pciutils-3.1.5.orig/Makefile pciutils-3.1.5/Makefile +--- pciutils-3.1.5.orig/Makefile 2010-07-30 13:51:58.000000000 +0800 ++++ pciutils-3.1.5/Makefile 2010-07-30 13:52:24.000000000 +0800 @@ -37,7 +37,6 @@ # Commands INSTALL=install @@ -80,7 +82,7 @@ Index: pciutils-3.0.3/Makefile CC=$(CROSS_COMPILE)gcc AR=$(CROSS_COMPILE)ar RANLIB=$(CROSS_COMPILE)ranlib -@@ -78,7 +77,7 @@ +@@ -86,7 +85,7 @@ example.o: example.c $(PCIINC) %: %.o @@ -89,7 +91,7 @@ Index: pciutils-3.0.3/Makefile %.8 %.7: %.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)#" -@@ -93,7 +92,7 @@ +@@ -101,7 +100,7 @@ install: all # -c is ignored on Linux, but required on FreeBSD $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7 diff --git a/meta/packages/pciutils/pciutils-3.1.5/guess-fix.patch b/meta/packages/pciutils/pciutils-3.1.5/guess-fix.patch new file mode 100644 index 000000000..9072d2a68 --- /dev/null +++ b/meta/packages/pciutils/pciutils-3.1.5/guess-fix.patch @@ -0,0 +1,35 @@ +the original guess algorithm is broken for many archs +for example, the following two would break: + arm-linux-gnueabi --> sys=gnueabi + x86_64-unknown-pc-linux-gnu --> sys = pc-linux-gnu + +use a simpler scheme here and hope it works for all the cases + +7/30/2010 - created by Qing He <qing.he@intel.com> + +diff --git a/lib/configure b/lib/configure +index 4318b05..84f6acb 100755 +--- a/lib/configure ++++ b/lib/configure +@@ -53,20 +53,7 @@ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + echo " $host $rel $cpu $sys" + +-if [ "$host" = "linux--gnueabi" ] +-then +- sys=linux +-fi +- +-if [ "$host" = "linux--uclibc" ] +-then +- sys=linux +-fi +- +-if [ "$host" = "linux--uclibcgnueabi" ] +-then +- sys=linux +-fi ++{ echo "$host" | grep linux; } && sys=linux + + c=config.h + m=config.mk diff --git a/meta/packages/pciutils/pciutils-3.1.5/lib-build-fix.patch b/meta/packages/pciutils/pciutils-3.1.5/lib-build-fix.patch new file mode 100644 index 000000000..1e81f8401 --- /dev/null +++ b/meta/packages/pciutils/pciutils-3.1.5/lib-build-fix.patch @@ -0,0 +1,92 @@ +Link directly to lib/libpci.so.3.1.5 will hard code this versioned +string into lspci and other utilities, which is not desirable and +won't work. In the other hand, linking to a symbolic link lib/libpci.so +doesn't have this issue. + +7/30/2010 - created by Qing He <qing.he@intel.com> + +diff --git a/Makefile b/Makefile +index 1b48e18..21af4b3 100644 +--- a/Makefile ++++ b/Makefile +@@ -51,9 +51,9 @@ PCIINC_INS=lib/config.h lib/header.h lib/pci.h lib/types.h + + export + +-all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS) pcimodules pcimodules.8 ++all: lib/$(PCILIB_DEV) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS) pcimodules pcimodules.8 + +-lib/$(PCILIB): $(PCIINC) force ++lib/$(PCILIB) lib/$(PCILIB_DEV): $(PCIINC) force + $(MAKE) -C lib all + + force: +@@ -61,9 +61,9 @@ force: + lib/config.h lib/config.mk: + cd lib && ./configure + +-pcimodules: pcimodules.o common.o lib/$(PCILIB) +-lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB) +-setpci: setpci.o common.o lib/$(PCILIB) ++pcimodules: pcimodules.o common.o lib/$(PCILIB_DEV) ++lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB_DEV) ++setpci: setpci.o common.o lib/$(PCILIB_DEV) + + pcimodules.o: pcimodules.c pciutils.h + LSPCIINC=lspci.h pciutils.h $(PCIINC) +@@ -83,7 +83,7 @@ update-pciids: update-pciids.sh + chmod +x $@ + + # The example of use of libpci +-example: example.o lib/$(PCILIB) ++example: example.o lib/$(PCILIB_DEV) + example.o: example.c $(PCIINC) + + %: %.o +diff --git a/lib/Makefile b/lib/Makefile +index 1eb06a5..a8dab56 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -42,7 +42,7 @@ ifdef PCI_HAVE_PM_NBSD_LIBPCI + OBJS += nbsd-libpci + endif + +-all: $(PCILIB) $(PCILIBPC) ++all: $(PCILIB_DEV) $(PCILIBPC) + + ifeq ($(SHARED),no) + $(PCILIB): $(addsuffix .o,$(OBJS)) +@@ -53,6 +53,9 @@ else + CFLAGS += -fPIC -fvisibility=hidden + $(PCILIB): $(addsuffix .o,$(OBJS)) + $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS) ++ ++$(PCILIB_DEV): $(PCILIB) ++ ln -s $< $@ + endif + + $(PCILIBPC): libpci.pc.in +diff --git a/lib/configure b/lib/configure +index eec225a..4318b05 100755 +--- a/lib/configure ++++ b/lib/configure +@@ -174,16 +193,18 @@ fi + echo "Checking whether to build a shared library... $SHARED (set manually)" + if [ "$SHARED" = no ] ; then + echo >>$m 'PCILIB=$(LIBNAME).a' ++ echo >>$m 'PCILIB_DEV=$(LIBNAME).a' + echo >>$m 'LDLIBS=$(WITH_LIBS)' + echo >>$m 'LIB_LDLIBS=' + else + echo >>$m 'PCILIB=$(LIBNAME).so.$(VERSION)' ++ echo >>$m 'PCILIB_DEV=$(LIBNAME).so' + # We link the dependencies _to_ the library, so we do not need explicit deps in .pc + echo >>$m 'LDLIBS=' + echo >>$m 'LIB_LDLIBS=$(WITH_LIBS)' + echo >>$c '#define PCI_SHARED_LIB' + if [ "$SHARED" = yes ] ; then +- echo >>$m 'SONAME=-Wl,-soname,$(LIBNAME).so$(ABI_VERSION)' ++ echo >>$m 'SONAME=-Wl,-soname -Wl,$(LIBNAME).so$(ABI_VERSION)' + fi + fi + echo >>$m 'PCILIBPC=$(LIBNAME).pc' diff --git a/meta/packages/pciutils/pciutils-3.0.3/pcimodules-pciutils.diff b/meta/packages/pciutils/pciutils-3.1.5/pcimodules-pciutils.diff index fba30ac71..36ea3b76b 100644 --- a/meta/packages/pciutils/pciutils-3.0.3/pcimodules-pciutils.diff +++ b/meta/packages/pciutils/pciutils-3.1.5/pcimodules-pciutils.diff @@ -1,8 +1,9 @@ -Index: pciutils-3.0.3/Makefile -=================================================================== ---- pciutils-3.0.3.orig/Makefile 2008-11-09 20:28:18.000000000 +0000 -+++ pciutils-3.0.3/Makefile 2008-12-31 00:46:45.000000000 +0000 -@@ -52,7 +52,7 @@ +7/30/2010 - rebased to 3.1.5 by Qing He <qing.he@intel.com> + +diff -uNr pciutils-3.1.5.orig/Makefile pciutils-3.1.5/Makefile +--- pciutils-3.1.5.orig/Makefile 2010-07-30 14:02:15.000000000 +0800 ++++ pciutils-3.1.5/Makefile 2010-07-30 14:02:55.000000000 +0800 +@@ -51,7 +51,7 @@ export @@ -11,19 +12,19 @@ Index: pciutils-3.0.3/Makefile lib/$(PCILIB): $(PCIINC) force $(MAKE) -C lib all -@@ -62,9 +62,11 @@ +@@ -61,9 +61,11 @@ lib/config.h lib/config.mk: cd lib && ./configure +pcimodules: pcimodules.o common.o lib/$(PCILIB) - lspci: lspci.o common.o lib/$(PCILIB) + lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB) setpci: setpci.o common.o lib/$(PCILIB) +pcimodules.o: pcimodules.c pciutils.h - lspci.o: lspci.c pciutils.h $(PCIINC) - setpci.o: setpci.c pciutils.h $(PCIINC) - common.o: common.c pciutils.h $(PCIINC) -@@ -93,10 +95,10 @@ + LSPCIINC=lspci.h pciutils.h $(PCIINC) + lspci.o: lspci.c $(LSPCIINC) + ls-vpd.o: ls-vpd.c $(LSPCIINC) +@@ -100,10 +102,10 @@ install: all # -c is ignored on Linux, but required on FreeBSD $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7 @@ -36,7 +37,7 @@ Index: pciutils-3.0.3/Makefile $(INSTALL) -c -m 644 pcilib.7 $(DESTDIR)$(MANDIR)/man7 ifeq ($(SHARED),yes) $(DIRINSTALL) -m 755 $(DESTDIR)$(LIBDIR) -@@ -114,9 +116,9 @@ +@@ -121,9 +123,9 @@ endif uninstall: all diff --git a/meta/packages/pciutils/pciutils_3.0.3.bb b/meta/packages/pciutils/pciutils_3.0.3.bb deleted file mode 100644 index a05a69b61..000000000 --- a/meta/packages/pciutils/pciutils_3.0.3.bb +++ /dev/null @@ -1,38 +0,0 @@ -DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ -to PCI bus configuration space and several utilities based on this library.' -DESCRIPTION_pciutils-ids = 'The list of PCI IDs for pciutils' -SECTION = "console/utils" -HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" -LICENSE = "GPLv2" -DEPENDS = "zlib" - -SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \ - file://configure.patch;patch=1 \ - file://pcimodules-pciutils.diff;patch=1" - -PARALLEL_MAKE = "" - -do_configure () { - (cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH}) -} - -export PREFIX = "${D}${prefix}" -export SBINDIR = "${D}${sbindir}" -export SHAREDIR = "${D}${datadir}" -export MANDIR = "${D}${mandir}" - -LDFLAGS += "-lz" - -# The configure script breaks if the HOST variable is set -HOST[unexport] = "1" - -do_install () { - oe_runmake install -} -do_install_append () { - install -d ${D}/${prefix}/share - install -m 6440 ${WORKDIR}/${PN}-${PV}/pci.ids ${D}/${prefix}/share -} - -PACKAGES =+ "pciutils-ids" -FILES_pciutils-ids="${prefix}/share/pci.ids" diff --git a/meta/packages/pciutils/pciutils_3.1.5.bb b/meta/packages/pciutils/pciutils_3.1.5.bb new file mode 100644 index 000000000..73fe1cca6 --- /dev/null +++ b/meta/packages/pciutils/pciutils_3.1.5.bb @@ -0,0 +1,56 @@ +DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ +to PCI bus configuration space and several utilities based on this library.' +DESCRIPTION_pciutils-ids = 'The list of PCI IDs for pciutils' +HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" +SECTION = "console/utils" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +DEPENDS = "zlib" +RDEPENDS_${PN} = "${PN}-ids" +PR = "r0" + +SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \ + file://configure.patch \ + file://pcimodules-pciutils.diff \ + file://lib-build-fix.patch \ + file://guess-fix.patch" + +PARALLEL_MAKE = "" + +PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes" + +# see configure.patch +do_configure () { + ( + cd lib && \ + ${PCI_CONF_FLAG} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH} + ) +} + +export PREFIX = "${prefix}" +export SBINDIR = "${sbindir}" +export SHAREDIR = "${datadir}" +export MANDIR = "${mandir}" + +EXTRA_OEMAKE += "${PCI_CONF_FLAG}" + +# 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 + + install -d ${D}${datadir} + install -m 644 ${S}/pci.ids ${D}${datadir} +} + +PACKAGES =+ "pciutils-ids libpci libpci-dev libpci-dbg" +FILES_pciutils-ids = "${datadir}/pci.ids*" +FILES_libpci = "${libdir}/libpci.so.*" +FILES_libpci-dbg = "${libdir}/.debug" +FILES_libpci-dev = "${libdir}/libpci.a ${libdir}/libpci.la ${libdir}/libpci.so \ + ${includedir}/pci ${libdir}/pkgconfig" |