diff options
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | CMakeLists.txt | 24 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | entity.patch | 64 | ||||
-rw-r--r-- | tinyxml-2.5.3-stl.patch | 12 | ||||
-rw-r--r-- | tinyxml.pc | 10 |
6 files changed, 189 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2b4bbc8a4e2c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = mingw-w64-tinyxml + pkgdesc = Simple, small, C++ XML parser that can be easily integrated into other programs (mingw-w64) + pkgver = 2.6.2 + pkgrel = 2 + url = http://www.grinninglizard.com/tinyxml + arch = any + license = zlib + makedepends = mingw-w64-cmake + depends = mingw-w64-crt + options = !strip + options = !buildflags + options = staticlibs + source = http://downloads.sourceforge.net/tinyxml/tinyxml_2_6_2.tar.gz + source = entity.patch + source = tinyxml-2.5.3-stl.patch + source = tinyxml.pc + source = CMakeLists.txt + sha256sums = 15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593 + sha256sums = ef493209b0a51160171fd834a7ecdddd02679463b85fb89a2ea254213e47f99b + sha256sums = 3baf2c4dbc2c8f54a151dac8860113d2f549174f83ed85d552b094dfaebb52af + sha256sums = 3a658c2d84d461cd64f48aa489baf78bcf06ad193d18455f3e9048a52a1f3b9d + sha256sums = SKIP + +pkgname = mingw-w64-tinyxml + diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000000..e75b540c02de --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 2.6) + +project(TinyXml) + + +include_directories(./) + +file( + GLOB_RECURSE + source_files + *.h + tiny*.cpp +) + +add_library(tinyxml ${source_files} +) + +#SET_TARGET_PROPERTIES (tinyxml PROPERTIES DEFINE_SYMBOL "EXPORT" ) + +INSTALL( FILES tinyxml.h tinystr.h DESTINATION include ) + +INSTALL( TARGETS tinyxml RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} )
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7cb63aa0d8a4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +pkgname=mingw-w64-tinyxml +pkgver=2.6.2 +pkgrel=2 +pkgdesc="Simple, small, C++ XML parser that can be easily integrated into other programs (mingw-w64)" +arch=(any) +url="http://www.grinninglizard.com/tinyxml" +license=("zlib") +depends=(mingw-w64-crt) +makedepends=(mingw-w64-cmake) +options=(!strip !buildflags staticlibs) +source=("http://downloads.sourceforge.net/tinyxml/tinyxml_${pkgver//./_}.tar.gz" + "entity.patch" + "tinyxml-2.5.3-stl.patch" + "tinyxml.pc" + "CMakeLists.txt") +sha256sums=('15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593' + 'ef493209b0a51160171fd834a7ecdddd02679463b85fb89a2ea254213e47f99b' + '3baf2c4dbc2c8f54a151dac8860113d2f549174f83ed85d552b094dfaebb52af' + '3a658c2d84d461cd64f48aa489baf78bcf06ad193d18455f3e9048a52a1f3b9d' + 'SKIP') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "$srcdir/tinyxml" + patch -p0 -i "$srcdir"/entity.patch + patch -p1 -i "$srcdir"/tinyxml-2.5.3-stl.patch + cp "$srcdir"/CMakeLists.txt . +} + +build() { + cd "$srcdir/tinyxml" + for _arch in ${_architectures}; do + mkdir -p build-${_arch} && pushd build-${_arch} + ${_arch}-cmake .. + make + popd + mkdir -p build-${_arch}-static && pushd build-${_arch}-static + ${_arch}-cmake -DBUILD_SHARED_LIBS=OFF .. + make + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "$srcdir/tinyxml/build-${_arch}-static" + make DESTDIR="$pkgdir" install + cd "$srcdir/tinyxml/build-${_arch}" + make DESTDIR="$pkgdir" install + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + done +} diff --git a/entity.patch b/entity.patch new file mode 100644 index 000000000000..66d89a61743d --- /dev/null +++ b/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-2.5.3-stl.patch b/tinyxml-2.5.3-stl.patch new file mode 100644 index 000000000000..7bcde59ff946 --- /dev/null +++ b/tinyxml-2.5.3-stl.patch @@ -0,0 +1,12 @@ +diff -up tinyxml/tinyxml.h~ tinyxml/tinyxml.h +--- tinyxml/tinyxml.h~ 2007-11-30 22:39:36.000000000 +0100 ++++ tinyxml/tinyxml.h 2007-11-30 22:39:36.000000000 +0100 +@@ -26,6 +26,8 @@ distribution. + #ifndef TINYXML_INCLUDED + #define TINYXML_INCLUDED + ++#define TIXML_USE_STL 1 ++ + #ifdef _MSC_VER + #pragma warning( push ) + #pragma warning( disable : 4530 ) diff --git a/tinyxml.pc b/tinyxml.pc new file mode 100644 index 000000000000..e04260b5d301 --- /dev/null +++ b/tinyxml.pc @@ -0,0 +1,10 @@ +prefix=/usr/@ARCH@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: TinyXml +Description: simple, small, C++ XML parser +Version: 2.6.2 +Libs: -L${libdir} -ltinyxml +Cflags: -I${includedir} |