tinyxml: update to tinyxml-2.6.2_2, build as static library

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-06-01 17:41:13 +02:00
parent c43853b05e
commit 894ce87935
7 changed files with 13 additions and 146 deletions

View File

@ -25,7 +25,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.xbmc.org"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS="boost Python zlib bzip2 systemd ffmpeg libass curl rtmpdump fontconfig tinyxml freetype libmad libogg libmodplug faad2 flac libmpeg2 taglib yajl xbmc-addon-settings"
PKG_DEPENDS="boost Python zlib bzip2 systemd ffmpeg libass curl rtmpdump fontconfig freetype libmad libogg libmodplug faad2 flac libmpeg2 taglib yajl xbmc-addon-settings"
PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 systemd lzo pcre swig ffmpeg libass enca curl libssh rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libmad libsamplerate libogg libcdio libmodplug faad2 flac libmpeg2 taglib yajl sqlite"
PKG_PRIORITY="optional"
PKG_SECTION="mediacenter"

View File

@ -24,14 +24,14 @@
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.${PKG_VERSION} -Wl,-soname,lib${PKG_NAME}.so.0 *.cpp.o
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-static \
--disable-shared \
ln -sf lib${PKG_NAME}.so.${PKG_VERSION} lib${PKG_NAME}.so.0
ln -sf lib${PKG_NAME}.so.0 lib${PKG_NAME}.so
make
cp -P lib${PKG_NAME}.so* $SYSROOT_PREFIX/usr/lib
cp -P ${PKG_NAME}.h $SYSROOT_PREFIX/usr/include
$MAKEINSTALL

View File

@ -1,26 +0,0 @@
#!/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

View File

@ -19,12 +19,12 @@
################################################################################
PKG_NAME="tinyxml"
PKG_VERSION="2.6.2"
PKG_VERSION="2.6.2_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_URL="http://mirrors.xbmc.org/build-deps/sources/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain"
PKG_PRIORITY="optional"
@ -33,4 +33,4 @@ 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"
PKG_AUTORECONF="yes"

View File

@ -1,18 +0,0 @@
Description: TinyXml is built with TIXML_USE_STL, so we have to
enforce it when the library is used.
Author: Felix Geyer <debfx-pkg@fobos.de>
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 )

View File

@ -1,64 +0,0 @@
? 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.
- // &#xA9; -- 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>foo&amp;#xa+bar</foo>");
+ std::string str;
+ str << xml;
+ XmlTest( "Entity escaping", "<foo>foo&amp;#xa+bar</foo>", str.c_str() );
+ }
+ #endif
+
/* 1417717 experiment
{
TiXmlDocument xml;

View File

@ -1,25 +0,0 @@
#!/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