diff --git a/packages/textproc/tinyxml/build b/packages/textproc/tinyxml/build new file mode 100755 index 0000000000..aabe9c513e --- /dev/null +++ b/packages/textproc/tinyxml/build @@ -0,0 +1,37 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD + +# Not really designed to be build as lib, DYI + for i in tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp; do + $CXX $CXXFLAGS -fPIC -o $i.o -c $i + done + $CXX $LDFLAGS -shared -o lib${PKG_NAME}.so.0.${PKG_VERSION} -Wl,-soname,lib${PKG_NAME}.so.0 *.cpp.o + + ln -sf lib${PKG_NAME}.so.${PKG_VERSION} lib${PKG_NAME}.so.0 + ln -sf lib${PKG_NAME}.so.0 lib${PKG_NAME}.so + + cp -P lib${PKG_NAME}.so* $SYSROOT_PREFIX/usr/lib + cp -P ${PKG_NAME}.h $SYSROOT_PREFIX/usr/include diff --git a/packages/textproc/tinyxml/install b/packages/textproc/tinyxml/install new file mode 100755 index 0000000000..de4360a3ae --- /dev/null +++ b/packages/textproc/tinyxml/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/libtinyxml.so* $INSTALL/usr/lib diff --git a/packages/textproc/tinyxml/meta b/packages/textproc/tinyxml/meta new file mode 100644 index 0000000000..daade36a1a --- /dev/null +++ b/packages/textproc/tinyxml/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="tinyxml" +PKG_VERSION="2.6.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.grinninglizard.com/tinyxml/" +PKG_URL="$SOURCEFORGE_SRC/$PKG_NAME/$PKG_VERSION/${PKG_NAME}_`echo $PKG_VERSION | sed 's,\.,_,g'`.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="textproc" +PKG_SHORTDESC="tinyxml: XML parser library" +PKG_LONGDESC="TinyXML is a simple, small, C++ XML parser that can be easily integrating into other programs." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/textproc/tinyxml/patches/tinyxml-2.6.2-enforce-use-stl.patch b/packages/textproc/tinyxml/patches/tinyxml-2.6.2-enforce-use-stl.patch new file mode 100644 index 0000000000..f930ba9c2c --- /dev/null +++ b/packages/textproc/tinyxml/patches/tinyxml-2.6.2-enforce-use-stl.patch @@ -0,0 +1,18 @@ +Description: TinyXml is built with TIXML_USE_STL, so we have to + enforce it when the library is used. +Author: Felix Geyer + +diff -Nur tinyxml-2.5.3/tinyxml.h tinyxml-2.5.3.patch/tinyxml.h +--- tinyxml-2.5.3/tinyxml.h 2007-05-07 00:41:23.000000000 +0200 ++++ tinyxml-2.5.3.patch/tinyxml.h 2009-07-08 22:32:03.000000000 +0200 +@@ -26,6 +26,10 @@ + #ifndef TINYXML_INCLUDED + #define TINYXML_INCLUDED + ++#ifndef TIXML_USE_STL ++ #define TIXML_USE_STL ++#endif ++ + #ifdef _MSC_VER + #pragma warning( push ) + #pragma warning( disable : 4530 ) diff --git a/packages/textproc/tinyxml/patches/tinyxml-2.6.2-entity.patch b/packages/textproc/tinyxml/patches/tinyxml-2.6.2-entity.patch new file mode 100644 index 0000000000..2ccbd701ac --- /dev/null +++ b/packages/textproc/tinyxml/patches/tinyxml-2.6.2-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 +--- a/tinyxml.cpp 5 Jun 2010 19:06:57 -0000 1.105 ++++ b/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 +--- a/xmltest.cpp 5 Jun 2010 17:41:52 -0000 1.89 ++++ b/xmltest.cpp 19 Jul 2010 21:24:16 -0000 +@@ -1340,6 +1340,16 @@ + }*/ + } + ++ #ifdef TIXML_USE_STL ++ { ++ TiXmlDocument xml; ++ xml.Parse("foo&#xa+bar"); ++ std::string str; ++ str << xml; ++ XmlTest( "Entity escaping", "foo&#xa+bar", str.c_str() ); ++ } ++ #endif ++ + /* 1417717 experiment + { + TiXmlDocument xml; diff --git a/packages/textproc/tinyxml/unpack b/packages/textproc/tinyxml/unpack new file mode 100755 index 0000000000..57a9901168 --- /dev/null +++ b/packages/textproc/tinyxml/unpack @@ -0,0 +1,25 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mv $BUILD/$PKG_NAME $BUILD/$PKG_NAME-$PKG_VERSION