summaryrefslogtreecommitdiff
path: root/dev-libs/tinyxml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/tinyxml
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/tinyxml')
-rw-r--r--dev-libs/tinyxml/Manifest8
-rw-r--r--dev-libs/tinyxml/files/Makefile-344
-rw-r--r--dev-libs/tinyxml/files/tinyxml-2.6.1-entity.patch64
-rw-r--r--dev-libs/tinyxml/files/tinyxml-2.6.2-defineSTL.patch12
-rw-r--r--dev-libs/tinyxml/metadata.xml14
-rw-r--r--dev-libs/tinyxml/tinyxml-2.6.2-r2.ebuild52
6 files changed, 194 insertions, 0 deletions
diff --git a/dev-libs/tinyxml/Manifest b/dev-libs/tinyxml/Manifest
new file mode 100644
index 000000000000..ebb82a9c2eb0
--- /dev/null
+++ b/dev-libs/tinyxml/Manifest
@@ -0,0 +1,8 @@
+AUX Makefile-3 1054 SHA256 88fb55306acac573c00da8e03c5ac780f23313879b8952c8657905897a0caf88 SHA512 81b05e25341095444d0112fe58840d334a14f754cdc0e907b468484655008de026a4b96947de98d009a4a54d84af121ee0a663075fe0ad727894d3aa432426e2 WHIRLPOOL 893bf2bb443041ed4cd35c3696d42cad96bff146363e83fdd9175f943761bb07878043a923cbba08d30ab5f44b11b2e9a7639bf522247f5293d085a17693b875
+AUX tinyxml-2.6.1-entity.patch 1776 SHA256 ef493209b0a51160171fd834a7ecdddd02679463b85fb89a2ea254213e47f99b SHA512 e03f4bdfb80354c6d262abb40e6c105cb2d37530e2f1f1d865ff4fd8434320a26957fbc2379db8af1bd18cd3c8662e064e79525831a5fb9fcb4aff46f3eb0809 WHIRLPOOL f6db630c0ae59643c05389f8397ba46bf1ec01860fbbf1c1e421f6d78d10c03e4f4f27bca1b572ab847f94cce16f76764913ed654eabce32d3a5428c54984588
+AUX tinyxml-2.6.2-defineSTL.patch 353 SHA256 3baf2c4dbc2c8f54a151dac8860113d2f549174f83ed85d552b094dfaebb52af SHA512 52cd82ef9e8f1783b3d6042551342a8c592c447e1da352d5d017db4211144bc0a908ddbfe2a4641b3108fb8e02dc47f385a851f920532d94178314255904a6ef WHIRLPOOL 46f53ea97fd610b6191524d81b32a79c6153fbf242280bb85e22266d149ea240bbfb3d6118da0cfb0088b28825153afaad601b4a6ff294e61560430c097dcaa7
+DIST tinyxml_2_6_2.tar.gz 210124 SHA256 15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593 SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56 WHIRLPOOL 6367930385d55a205e5a4a8034c7f62df2bdb33506fc184d73eeb86e3e78c61f802de255176e4b20e9070201fa495e96b37b2fc4d3f0ada24c399b15374542ea
+EBUILD tinyxml-2.6.2-r2.ebuild 1250 SHA256 e41180f0f3849528acda14316e8b7efea7bae5d903f0ee9a2bd574cb40e06140 SHA512 436a8c050c54ee7e4dec2be3cbe23ad79540daf8a88a50c139457e1bef2a36d5ba269e988520802ee0a0946f4c198ab06674f4aafe665b5d71ff396297f0def3 WHIRLPOOL 34520fdc7c599c88438088e9351eed399b9fb29eaf107ead0b2fdee74205784397d5674cf8e080b2dfa6c9d4020b7fbc35a24d8d7c8e44332d8806eb9fb034b8
+MISC ChangeLog 2688 SHA256 11a6d98a2ba51b5e50e7fd6db5872a1e4971f637a0ff6c021f8194abac65a154 SHA512 298b346f89166e663651edc48024a971901c2c09bcbdeacc4760f018b0164bebcfbe8d2ac5768d5d551c787841b87e24a77f32aa4ed693f785b2001bb526be37 WHIRLPOOL 9613c75ce24ee40aef56a5ff41db1586ccd253308817279c87aa2dda6014dd730b1b6dcea78984a5b7a5103920dd5a978f07cf97520ff3d6b540e09d5ce12e6c
+MISC ChangeLog-2015 4596 SHA256 c8c8ee92e1632f4b8f89b71cdff4caa1297d24e98bc22d496f2e5dbd8de52194 SHA512 6378b20944c4dc46170926aed2b0d179dc2405897b7d18f6e45efda07faf26870455346ffc839cd7dfa503d5321fd5bd8116ddc2435f42497372fbfe18f9ccd6 WHIRLPOOL 181eeaad8835fd0ceaaa940fa714d9b0f72fb1b672d6b9abf01721685a6727373eed3e90612d86039aa7dcda3f08828f9c0c27d3ba2f1608ba552e336e66219f
+MISC metadata.xml 405 SHA256 4a9267780e3b2fccccd6973ab19f33b19d1124da9a3d4e678c834534ddad405a SHA512 b11af65ea7f12e4840154047ded852f3a393fecdca6c247d2eee83330a1ca834d210cb5d55db1601534c13a391321b82311fb9d5b288326beacdce2ad743ebb2 WHIRLPOOL 6fbe0f9f4b3b76627f40b315f183cad2edcb55a168ff9efa30842bf3d484f1b681f6c38640f4a4c6364de0604f286edbcf18ae29db33ec59576e04cd38a28001
diff --git a/dev-libs/tinyxml/files/Makefile-3 b/dev-libs/tinyxml/files/Makefile-3
new file mode 100644
index 000000000000..40ad4fe7e9ce
--- /dev/null
+++ b/dev-libs/tinyxml/files/Makefile-3
@@ -0,0 +1,44 @@
+AR ?= ar
+CXX ?= g++
+CXXFLAGS += -Wall
+RANLIB ?= ranlib
+LIBDIR ?= /usr/lib
+
+name = libtinyxml
+major = @MAJOR_V@
+minor = @MINOR_V@
+version = $(major).$(minor)
+
+src = tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp
+lo = $(addsuffix .lo,$(basename ${src}))
+o = $(addsuffix .o,$(basename ${src}))
+
+lib = so
+ifeq ($(shell uname),Darwin)
+ lib = dylib
+endif
+
+all: $(name).a $(name).$(lib)
+
+%.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
+
+$(name).dylib: $(lo)
+ $(CXX) $(LDFLAGS) -fPIC -dynamiclib $(lo) -install_name $(LIBDIR)/$(name).$(major).dylib -o $(name).$(version).dylib
+ ln -s $(name).$(version).dylib $(name).$(major).dylib
+ ln -s $(name).$(version).dylib $(name).dylib
+
+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/files/tinyxml-2.6.2-defineSTL.patch b/dev-libs/tinyxml/files/tinyxml-2.6.2-defineSTL.patch
new file mode 100644
index 000000000000..7bcde59ff946
--- /dev/null
+++ b/dev-libs/tinyxml/files/tinyxml-2.6.2-defineSTL.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/dev-libs/tinyxml/metadata.xml b/dev-libs/tinyxml/metadata.xml
new file mode 100644
index 000000000000..f225bc05a9ee
--- /dev/null
+++ b/dev-libs/tinyxml/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <use>
+ <flag name="stl">Compile with TIXML_USE_STL support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">tinyxml</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/tinyxml/tinyxml-2.6.2-r2.ebuild b/dev-libs/tinyxml/tinyxml-2.6.2-r2.ebuild
new file mode 100644
index 000000000000..27d0e1701a67
--- /dev/null
+++ b/dev-libs/tinyxml/tinyxml-2.6.2-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit flag-o-matic toolchain-funcs eutils multilib versionator
+
+DESCRIPTION="Simple and small C++ XML parser"
+HOMEPAGE="http://www.grinninglizard.com/tinyxml/index.html"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV//./_}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~x64-macos ~x86-macos"
+IUSE="debug doc static-libs +stl"
+
+RDEPEND=""
+DEPEND="doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ local major_v=$(get_major_version)
+ local minor_v=$(get_version_component_range 2-3)
+
+ sed -e "s:@MAJOR_V@:$major_v:" \
+ -e "s:@MINOR_V@:$minor_v:" \
+ "${FILESDIR}"/Makefile-3 > Makefile || die
+
+ epatch "${FILESDIR}"/${PN}-2.6.1-entity.patch
+
+ use debug && append-cppflags -DDEBUG
+ use stl && epatch "${FILESDIR}"/${P}-defineSTL.patch
+
+ if ! use static-libs; then
+ sed -e "/^all:/s/\$(name).a //" -i Makefile || die
+ fi
+
+ tc-export AR CXX RANLIB
+
+ [[ ${CHOST} == *-darwin* ]] && export LIBDIR="${EPREFIX}"/usr/$(get_libdir)
+}
+
+src_install() {
+ dolib.so *$(get_libname)*
+
+ insinto /usr/include
+ doins *.h
+
+ dodoc {changes,readme}.txt
+
+ use doc && dohtml -r docs/*
+}