summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libtinyxml
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2012-10-03 13:41:33 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-10-04 15:52:54 +0200
commit7fb3b06bacc90a5429fab810258e03607a4add83 (patch)
tree573f6ec5a24290bf6f18cc62baa693de819bb3e8 /meta-oe/recipes-support/libtinyxml
parent8e26af8d38d7ac96c481320c04395b5e17afab48 (diff)
downloadmeta-openembedded-7fb3b06bacc90a5429fab810258e03607a4add83.tar.gz
libtinyxml: Add recipe for 2.6.2
This imports the recipe for TinyXML from meta-WebOS@e5c99c2cf, does some minor fixes on the recipe and import the patches included in the Debian package. We use PR as r5 to ensure the package is updated when removed from meta-WebOS layer. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
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.bb43
3 files changed, 125 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..fdadebdfa
--- /dev/null
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
@@ -0,0 +1,43 @@
1# (c) Copyright 2012 Hewlett-Packard Development Company, L.P.
2
3DESCRIPTION = "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
19CXXFLAGS += "-fPIC"
20
21do_compile() {
22 ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxml.o ${S}/tinyxml.cpp
23 ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxmlerror.o ${S}/tinyxmlerror.cpp
24 ${CXX} ${CXXFLAGS} -I${S} -c -o ${S}/tinyxmlparser.o ${S}/tinyxmlparser.cpp
25 ${CXX} ${CXXFLAGS} \
26 -shared \
27 -Wl,-soname,libtinyxml.so.${PV} \
28 -o ${S}/libtinyxml.so.${PV} \
29 ${LDFLAGS} \
30 ${S}/tinyxml.o \
31 ${S}/tinyxmlparser.o \
32 ${S}/tinyxmlerror.o
33}
34
35do_install() {
36 install -d ${D}${libdir}
37 install -m 0755 ${S}/libtinyxml.so.${PV} ${D}${libdir}
38 ln -sf libtinyxml.so.${PV} ${D}${libdir}/libtinyxml.so
39
40 install -d ${D}${includedir}
41 install -m 0644 ${S}/tinyxml.h ${D}${includedir}
42}
43