summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorRemy Bohmer <linux@bohmer.net>2010-06-03 23:56:08 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-06-04 13:54:21 +0200
commit2b08f4df781a6fd18ff3759b8752cd3da802c222 (patch)
treefe1999e1b364d6ccd959caa89cd6cb8c42f0c86d /patches
parent0847e8b70f2de0dc71211e4f2f134a26934772aa (diff)
downloadptxdist-2b08f4df781a6fd18ff3759b8752cd3da802c222.tar.gz
ptxdist-2b08f4df781a6fd18ff3759b8752cd3da802c222.tar.xz
[lshw] add new packet
Adds the Hardware Lister package to ptxdist A patch is added for the package to make the xml output compatibility with a xml-parser using tinyxpath. Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/lshw-B.02.14/fix-cross-compile.patch43
-rw-r--r--patches/lshw-B.02.14/replace_reserved_xml_keyword.patch33
-rw-r--r--patches/lshw-B.02.14/series2
3 files changed, 78 insertions, 0 deletions
diff --git a/patches/lshw-B.02.14/fix-cross-compile.patch b/patches/lshw-B.02.14/fix-cross-compile.patch
new file mode 100644
index 000000000..bfcce62b9
--- /dev/null
+++ b/patches/lshw-B.02.14/fix-cross-compile.patch
@@ -0,0 +1,43 @@
+fix cross-compilation
+
+Signed-off-by: Remy Bohmer <linux@bohmer.net>
+---
+ src/Makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+Index: lshw-B.02.14/src/Makefile
+===================================================================
+--- lshw-B.02.14.orig/src/Makefile
++++ lshw-B.02.14/src/Makefile
+@@ -18,10 +18,10 @@ export DATADIR
+ CXX?=c++
+ INCLUDES=-I./core/
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+-LDFLAGS=-L./core/ -g
++CXXFLAGS= ${CPPFLAGS} -g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++MYLDFLAGS:= ${LDFLAGS} -L./core/ -g
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+- LDFLAGS+= -Wl,--as-needed
++ MYLDFLAGS+= -Wl,--as-needed
+ endif
+ LDSTATIC=-static
+ LIBS=-llshw -lresolv
+@@ -38,7 +38,7 @@ core:
+ +make -C core all
+
+ $(PACKAGENAME): core $(PACKAGENAME).o
+- $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
++ $(CXX) $(MYLDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+
+ .PHONY: gui
+ gui: core
+@@ -52,7 +52,7 @@ nologo:
+ static: $(PACKAGENAME)-static
+
+ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
+- $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
++ $(CXX) $(LDSTATIC) $(MYLDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+ $(STRIP) $@
+
+ .PHONY: compressed
diff --git a/patches/lshw-B.02.14/replace_reserved_xml_keyword.patch b/patches/lshw-B.02.14/replace_reserved_xml_keyword.patch
new file mode 100644
index 000000000..f508ce732
--- /dev/null
+++ b/patches/lshw-B.02.14/replace_reserved_xml_keyword.patch
@@ -0,0 +1,33 @@
+Replace keyword node with hwnode for TinyXpath compatibility
+
+It turns out that within TinyXpath 'node' is a reserved key-word.
+Replace it with 'hwnode' when printing to xml.
+
+Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
+Signed-off-by: Remy Bohmer <linux@bohmer.net>
+---
+ src/core/hw.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: lshw-B.02.14/src/core/hw.cc
+===================================================================
+--- lshw-B.02.14.orig/src/core/hw.cc 2009-10-14 14:49:33.000000000 +0200
++++ lshw-B.02.14/src/core/hw.cc 2009-10-14 14:49:49.000000000 +0200
+@@ -1343,7 +1343,7 @@ string hwNode::asXML(unsigned level)
+ if(visible(getClassName()))
+ {
+ out << spaces(2*level);
+- out << "<node id=\"" << getId() << "\"";
++ out << "<hwnode id=\"" << getId() << "\"";
+ if (disabled())
+ out << " disabled=\"true\"";
+ if (claimed())
+@@ -1596,7 +1596,7 @@ string hwNode::asXML(unsigned level)
+ if(visible(getClassName()))
+ {
+ out << spaces(2*level);
+- out << "</node>" << endl;
++ out << "</hwnode>" << endl;
+ }
+
+ return out.str();
diff --git a/patches/lshw-B.02.14/series b/patches/lshw-B.02.14/series
new file mode 100644
index 000000000..4b21b9958
--- /dev/null
+++ b/patches/lshw-B.02.14/series
@@ -0,0 +1,2 @@
+fix-cross-compile.patch
+replace_reserved_xml_keyword.patch