summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libtinyxml
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-support/libtinyxml
downloadmeta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/libtinyxml')
-rw-r--r--meta-oe/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch20
-rw-r--r--meta-oe/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch62
-rw-r--r--meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb45
3 files changed, 127 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch b/meta-oe/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch
new file mode 100644
index 000000000..88c962bbe
--- /dev/null
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml/enforce-use-stl.patch
@@ -0,0 +1,20 @@
1Description: TinyXml is built with TIXML_USE_STL, so we have to
2 enforce it when the library is used.
3Author: Felix Geyer <debfx-pkg@fobos.de>
4
5Upstream-Status: Pending
6
7diff -Nur tinyxml-2.5.3/tinyxml.h tinyxml-2.5.3.patch/tinyxml.h
8--- tinyxml-2.5.3/tinyxml.h 2007-05-07 00:41:23.000000000 +0200
9+++ tinyxml-2.5.3.patch/tinyxml.h 2009-07-08 22:32:03.000000000 +0200
10@@ -26,6 +26,10 @@
11 #ifndef TINYXML_INCLUDED
12 #define TINYXML_INCLUDED
13
14+#ifndef TIXML_USE_STL
15+ #define TIXML_USE_STL
16+#endif
17+
18 #ifdef _MSC_VER
19 #pragma warning( push )
20 #pragma warning( disable : 4530 )
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch b/meta-oe/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch
new file mode 100644
index 000000000..b801506ea
--- /dev/null
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml/entity-encoding.patch
@@ -0,0 +1,62 @@
1Description: TinyXML incorrectly encodes text element containing
2 an ampersand followed by either x or #.
3
4Origin: http://sourceforge.net/tracker/index.php?func=detail&aid=3031828&group_id=13559&atid=313559
5
6Upstream-Status: Pending
7
8diff -u -r1.105 tinyxml.cpp
9--- a/tinyxml.cpp
10+++ b/tinyxml.cpp
11@@ -57,30 +57,7 @@
12 {
13 unsigned char c = (unsigned char) str[i];
14
15- if ( c == '&'
16- && i < ( (int)str.length() - 2 )
17- && str[i+1] == '#'
18- && str[i+2] == 'x' )
19- {
20- // Hexadecimal character reference.
21- // Pass through unchanged.
22- // &#xA9; -- copyright symbol, for example.
23- //
24- // The -1 is a bug fix from Rob Laveaux. It keeps
25- // an overflow from happening if there is no ';'.
26- // There are actually 2 ways to exit this loop -
27- // while fails (error case) and break (semicolon found).
28- // However, there is no mechanism (currently) for
29- // this function to return an error.
30- while ( i<(int)str.length()-1 )
31- {
32- outString->append( str.c_str() + i, 1 );
33- ++i;
34- if ( str[i] == ';' )
35- break;
36- }
37- }
38- else if ( c == '&' )
39+ if ( c == '&' )
40 {
41 outString->append( entity[0].str, entity[0].strLength );
42 ++i;
43diff -u -r1.89 xmltest.cpp
44--- a/xmltest.cpp
45+++ b/xmltest.cpp
46@@ -1340,6 +1340,16 @@
47 }*/
48 }
49
50+ #ifdef TIXML_USE_STL
51+ {
52+ TiXmlDocument xml;
53+ xml.Parse("<foo>foo&amp;#xa+bar</foo>");
54+ std::string str;
55+ str << xml;
56+ XmlTest( "Entity escaping", "<foo>foo&amp;#xa+bar</foo>", str.c_str() );
57+ }
58+ #endif
59+
60 /* 1417717 experiment
61 {
62 TiXmlDocument xml;
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
new file mode 100644
index 000000000..e09a5393d
--- /dev/null
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
@@ -0,0 +1,45 @@
1# (c) Copyright 2012 Hewlett-Packard Development Company, L.P.
2
3SUMMARY = "a simple, small, minimal, C++ XML parser"
4HOMEPAGE = "http://www.sourceforge.net/projects/tinyxml"
5LICENSE = "Zlib"
6LIC_FILES_CHKSUM = "file://readme.txt;md5=f8f366f3370dda889f60faa7db162cf4"
7SECTION = "libs"
8
9PR = "r5"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_${@'${PV}'.replace('.', '_')}.tar.gz \
12 file://enforce-use-stl.patch \
13 file://entity-encoding.patch"
14SRC_URI[md5sum] = "c1b864c96804a10526540c664ade67f0"
15SRC_URI[sha256sum] = "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593"
16
17S = "${WORKDIR}/tinyxml"
18
19EXTRA_CXXFLAGS = "-I. -fPIC"
20
21do_compile() {
22 ${CXX} ${CXXFLAGS} ${EXTRA_CXXFLAGS} -c -o tinyxml.o tinyxml.cpp
23 ${CXX} ${CXXFLAGS} ${EXTRA_CXXFLAGS} -c -o tinyxmlerror.o tinyxmlerror.cpp
24 ${CXX} ${CXXFLAGS} ${EXTRA_CXXFLAGS} -c -o tinyxmlparser.o tinyxmlparser.cpp
25 ${CXX} ${CXXFLAGS} \
26 -shared \
27 -Wl,-soname,libtinyxml.so.${PV} \
28 -o libtinyxml.so.${PV} \
29 ${LDFLAGS} \
30 tinyxml.o \
31 tinyxmlparser.o \
32 tinyxmlerror.o
33
34}
35
36do_install() {
37 install -d ${D}${libdir}
38 install -m 0755 ${S}/libtinyxml.so.${PV} ${D}${libdir}
39 ln -sf libtinyxml.so.${PV} ${D}${libdir}/libtinyxml.so
40
41 install -d ${D}${includedir}
42 install -m 0644 ${S}/tinyxml.h ${D}${includedir}
43}
44
45BBCLASSEXTEND += "native"