summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2011-03-28 09:58:18 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2011-03-28 09:58:18 +0000
commitd0c38f21e4fe2bffabb29ee7c75edc0225167742 (patch)
tree1ccd3b2743ac80837c770f36f1c82c878dc3ebef /dev-libs/tinyxml
parentchange to new style virtual/mta - bug 360305. remove mailwrapper support - bu... (diff)
downloadgentoo-2-d0c38f21e4fe2bffabb29ee7c75edc0225167742.tar.gz
gentoo-2-d0c38f21e4fe2bffabb29ee7c75edc0225167742.tar.bz2
gentoo-2-d0c38f21e4fe2bffabb29ee7c75edc0225167742.zip
Add patch to fix entity encoding, upstream bug ID 3031828
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/tinyxml')
-rw-r--r--dev-libs/tinyxml/ChangeLog9
-rw-r--r--dev-libs/tinyxml/files/Makefile33
-rw-r--r--dev-libs/tinyxml/files/tinyxml-2.6.1-entity.patch64
-rw-r--r--dev-libs/tinyxml/tinyxml-2.6.1-r1.ebuild (renamed from dev-libs/tinyxml/tinyxml-2.5.3_p20090813-r1.ebuild)25
4 files changed, 87 insertions, 44 deletions
diff --git a/dev-libs/tinyxml/ChangeLog b/dev-libs/tinyxml/ChangeLog
index a71cec64a588..5594bdc13f2a 100644
--- a/dev-libs/tinyxml/ChangeLog
+++ b/dev-libs/tinyxml/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/tinyxml
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/tinyxml/ChangeLog,v 1.8 2011/02/11 18:43:31 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/tinyxml/ChangeLog,v 1.9 2011/03/28 09:58:18 voyageur Exp $
+
+*tinyxml-2.6.1-r1 (28 Mar 2011)
+
+ 28 Mar 2011; Bernard Cafarelli <voyageur@gentoo.org>
+ -tinyxml-2.5.3_p20090813-r1.ebuild, +tinyxml-2.6.1-r1.ebuild,
+ +files/tinyxml-2.6.1-entity.patch, -files/Makefile:
+ Add patch to fix entity encoding, upstream bug ID 3031828
11 Feb 2011; Kacper Kowalik <xarthisius@gentoo.org> tinyxml-2.6.1.ebuild:
Marked ~ppc wrt #314833
diff --git a/dev-libs/tinyxml/files/Makefile b/dev-libs/tinyxml/files/Makefile
deleted file mode 100644
index 1db0244525cb..000000000000
--- a/dev-libs/tinyxml/files/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-AR ?= ar
-CXX ?= g++
-CXXFLAGS += -Wall
-RANLIB ?= ranlib
-
-name = libtinyxml
-major = 0
-minor = 0.0
-version = $(major).$(minor)
-
-src = tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp
-lo = $(addsuffix .lo,$(basename ${src}))
-o = $(addsuffix .o,$(basename ${src}))
-
-all: $(name).a $(name).so
-
-%.o: %.cpp
- $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
-
-$(name).a: $(o)
- $(AR) rc $(name).a $(o)
- $(RANLIB) $(name).a
-
-%.lo: %.cpp
- $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -fPIC $< -o $@
-
-$(name).so: $(lo)
- $(CXX) $(LDFLAGS) -fPIC -shared $(lo) -Wl,-soname,$(name).so.$(major) -o $(name).so.$(version)
- ln -s $(name).so.$(version) $(name).so.$(major)
- ln -s $(name).so.$(version) $(name).so
-
-clean:
- -rm -f *.o *.lo *.so* *.a
diff --git a/dev-libs/tinyxml/files/tinyxml-2.6.1-entity.patch b/dev-libs/tinyxml/files/tinyxml-2.6.1-entity.patch
new file mode 100644
index 000000000000..66d89a61743d
--- /dev/null
+++ b/dev-libs/tinyxml/files/tinyxml-2.6.1-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.
+- // &#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
+--- 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&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;
diff --git a/dev-libs/tinyxml/tinyxml-2.5.3_p20090813-r1.ebuild b/dev-libs/tinyxml/tinyxml-2.6.1-r1.ebuild
index d19d65867bee..b0ba1362e30b 100644
--- a/dev-libs/tinyxml/tinyxml-2.5.3_p20090813-r1.ebuild
+++ b/dev-libs/tinyxml/tinyxml-2.6.1-r1.ebuild
@@ -1,24 +1,34 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/tinyxml/tinyxml-2.5.3_p20090813-r1.ebuild,v 1.2 2010/06/05 14:56:23 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/tinyxml/tinyxml-2.6.1-r1.ebuild,v 1.1 2011/03/28 09:58:18 voyageur Exp $
EAPI=2
inherit flag-o-matic toolchain-funcs
DESCRIPTION="a simple, small, C++ XML parser that can be easily integrating into other programs"
HOMEPAGE="http://www.grinninglizard.com/tinyxml/index.html"
-SRC_URI="mirror://gentoo/${P}.tar.bz2"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV//./_}.tar.gz"
LICENSE="ZLIB"
SLOT="0"
-KEYWORDS="~amd64 ~ia64 ~sparc ~x86"
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
IUSE="debug doc stl"
RDEPEND=""
DEPEND="doc? ( app-doc/doxygen )"
+S="${WORKDIR}/${PN}"
+
src_prepare() {
- cp -f "${FILESDIR}"/Makefile . || die
+ local major_v minor_v
+ major_v=$(echo ${PV} | cut -d \. -f 1)
+ minor_v=$(echo ${PV} | cut -d \. -f 2-3)
+
+ sed -e "s:@MAJOR_V@:$major_v:" \
+ -e "s:@MINOR_V@:$minor_v:" \
+ "${FILESDIR}"/Makefile-2 > Makefile || die
+
+ epatch "${FILESDIR}"/${P}-entity.patch
}
src_compile() {
@@ -28,10 +38,6 @@ src_compile() {
tc-export AR CXX RANLIB
emake || die "emake failed"
-
- if use doc; then
- doxygen dox || die "doxygen failed"
- fi
}
src_install() {
@@ -44,7 +50,6 @@ src_install() {
dodoc {changes,readme}.txt || die "dodoc failed"
if use doc; then
- dodoc tutorial_gettingStarted.txt || die "dodoc failed"
dohtml -r docs/* || die "dohtml failed"
fi
}