diff options
author | Matt Housh <jaeger@crux.ninja> | 2017-05-22 12:46:18 -0500 |
---|---|---|
committer | Matt Housh <jaeger@crux.ninja> | 2017-05-22 12:46:18 -0500 |
commit | ec0fff0e58287899b2d52315b94949e6a7ef6f72 (patch) | |
tree | 3539b937550bc7d1cfc05607cfb84ba5bddea956 | |
parent | cdf0ee5fb4afc8cff460507f2b7bd88aaa8c4c96 (diff) | |
download | contrib-ec0fff0e58287899b2d52315b94949e6a7ef6f72.tar.gz contrib-ec0fff0e58287899b2d52315b94949e6a7ef6f72.tar.xz |
tinyxml: adopted
-rw-r--r-- | tinyxml/.footprint | 8 | ||||
-rw-r--r-- | tinyxml/.md5sum | 3 | ||||
-rw-r--r-- | tinyxml/.signature | 7 | ||||
-rw-r--r-- | tinyxml/Pkgfile | 29 | ||||
-rw-r--r-- | tinyxml/entity.patch | 64 | ||||
-rw-r--r-- | tinyxml/tinyxml-use-stl.patch | 11 |
6 files changed, 122 insertions, 0 deletions
diff --git a/tinyxml/.footprint b/tinyxml/.footprint new file mode 100644 index 000000000..eae6e6765 --- /dev/null +++ b/tinyxml/.footprint @@ -0,0 +1,8 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/include/ +-rw-r--r-- root/root usr/include/tinystr.h +-rw-r--r-- root/root usr/include/tinyxml.h +drwxr-xr-x root/root usr/lib/ +lrwxrwxrwx root/root usr/lib/libtinyxml.so -> libtinyxml.so.2.6.2 +lrwxrwxrwx root/root usr/lib/libtinyxml.so.2 -> libtinyxml.so.2.6.2 +-rwxr-xr-x root/root usr/lib/libtinyxml.so.2.6.2 diff --git a/tinyxml/.md5sum b/tinyxml/.md5sum new file mode 100644 index 000000000..70df5f0f4 --- /dev/null +++ b/tinyxml/.md5sum @@ -0,0 +1,3 @@ +b6cc2d9330707373d920f760793c6311 entity.patch +f938588965814d5a916d4f1fdeec1e43 tinyxml-use-stl.patch +2a0aaf609c9e670ec9748cd01ed52dae tinyxml_2_6_2.zip diff --git a/tinyxml/.signature b/tinyxml/.signature new file mode 100644 index 000000000..b114d87f4 --- /dev/null +++ b/tinyxml/.signature @@ -0,0 +1,7 @@ +untrusted comment: verify with /etc/ports/contrib.pub +RWSagIOpLGJF33a20OuGBErBcOWYzEGVdqpalrqzTYrf1/lYkpj82NwntQU7a2L4kaCXtOsfrlJXSPxjZLUt/6mvaOtIeSwuRQE= +SHA256 (Pkgfile) = d93fbe9159da21fe72b169bf960202c2877e25e99e37272b8f6dd9d1e9ac4cbe +SHA256 (.footprint) = a1e18a04ec6ecc8e74d03f9b2f2e2df4b84afa88c8ec38534255add85e363de1 +SHA256 (tinyxml_2_6_2.zip) = ac6bb9501c6f50cc922d22f26b02fab168db47521be5e845b83d3451a3e1d512 +SHA256 (entity.patch) = ef493209b0a51160171fd834a7ecdddd02679463b85fb89a2ea254213e47f99b +SHA256 (tinyxml-use-stl.patch) = 14d01a56f9f702d7e1d52eaff6783201314aa0eb48365524ef0c9acb75e7a8b2 diff --git a/tinyxml/Pkgfile b/tinyxml/Pkgfile new file mode 100644 index 000000000..16b301816 --- /dev/null +++ b/tinyxml/Pkgfile @@ -0,0 +1,29 @@ +# Description: A simple, small, minimal, C++ XML parser +# URL: http://www.grinninglizard.com/tinyxml/ +# Maintainer: Matt Housh, jaeger at crux dot ninja + +name=tinyxml +version=2.6.2 +release=2 +source=(http://download.sourceforge.net/project/$name/$name/$version/${name}_${version//./_}.zip \ + entity.patch $name-use-stl.patch) + +build() { + export CXXFLAGS="${CXXFLAGS} -fPIC" + cd $name + + patch -p0 -i $SRC/entity.patch + patch -p0 -i $SRC/$name-use-stl.patch + sed -i -e "/^TINYXML_USE_STL/ s/=.*/= YES/" \ + -e "/^RELEASE_CFLAGS/ s/-O3/${CXXFLAGS}/" Makefile + + make + g++ ${CXXFLAGS} -DTIXML_USE_STL -shared -o lib$name.so.$version \ + -Wl,-soname,lib$name.so.${version:0:1} *.o + + mkdir -p $PKG/usr/{include,lib} + install -m 0755 lib$name.so.$version $PKG/usr/lib/ + install -m 0644 *.h $PKG/usr/include/ + ln -s lib$name.so.$version $PKG/usr/lib/lib$name.so.${version:0:1} + ln -s lib$name.so.$version $PKG/usr/lib/lib$name.so +} diff --git a/tinyxml/entity.patch b/tinyxml/entity.patch new file mode 100644 index 000000000..66d89a617 --- /dev/null +++ b/tinyxml/entity.patch @@ -0,0 +1,64 @@ +? entity.patch +Index: tinyxml.cpp +=================================================================== +RCS file: /cvsroot/tinyxml/tinyxml/tinyxml.cpp,v +retrieving revision 1.105 +diff -u -r1.105 tinyxml.cpp +--- tinyxml.cpp 5 Jun 2010 19:06:57 -0000 1.105 ++++ tinyxml.cpp 19 Jul 2010 21:24:16 -0000 +@@ -57,30 +57,7 @@ + { + unsigned char c = (unsigned char) str[i]; + +- if ( c == '&' +- && i < ( (int)str.length() - 2 ) +- && str[i+1] == '#' +- && str[i+2] == 'x' ) +- { +- // Hexadecimal character reference. +- // Pass through unchanged. +- // © -- copyright symbol, for example. +- // +- // The -1 is a bug fix from Rob Laveaux. It keeps +- // an overflow from happening if there is no ';'. +- // There are actually 2 ways to exit this loop - +- // while fails (error case) and break (semicolon found). +- // However, there is no mechanism (currently) for +- // this function to return an error. +- while ( i<(int)str.length()-1 ) +- { +- outString->append( str.c_str() + i, 1 ); +- ++i; +- if ( str[i] == ';' ) +- break; +- } +- } +- else if ( c == '&' ) ++ if ( c == '&' ) + { + outString->append( entity[0].str, entity[0].strLength ); + ++i; +Index: xmltest.cpp +=================================================================== +RCS file: /cvsroot/tinyxml/tinyxml/xmltest.cpp,v +retrieving revision 1.89 +diff -u -r1.89 xmltest.cpp +--- xmltest.cpp 5 Jun 2010 17:41:52 -0000 1.89 ++++ xmltest.cpp 19 Jul 2010 21:24:16 -0000 +@@ -1340,6 +1340,16 @@ + }*/ + } + ++ #ifdef TIXML_USE_STL ++ { ++ TiXmlDocument xml; ++ xml.Parse("<foo>foo&#xa+bar</foo>"); ++ std::string str; ++ str << xml; ++ XmlTest( "Entity escaping", "<foo>foo&#xa+bar</foo>", str.c_str() ); ++ } ++ #endif ++ + /* 1417717 experiment + { + TiXmlDocument xml; diff --git a/tinyxml/tinyxml-use-stl.patch b/tinyxml/tinyxml-use-stl.patch new file mode 100644 index 000000000..b368c6881 --- /dev/null +++ b/tinyxml/tinyxml-use-stl.patch @@ -0,0 +1,11 @@ +--- tinyxml.h.orig 2013-03-17 22:25:59.051524653 -0500 ++++ tinyxml.h 2013-03-17 22:26:27.319650497 -0500 +@@ -43,6 +43,8 @@ + #define DEBUG + #endif + ++#define TIXML_USE_STL ++ + #ifdef TIXML_USE_STL + #include <string> + #include <iostream> |