automatic version update by autodist [release 2.6.2-1mamba;Sat Dec 01 2012]

This commit is contained in:
Automatic Build System 2024-01-06 05:55:42 +01:00
parent 8ca1adff68
commit 0880dd8cc2
4 changed files with 170 additions and 0 deletions

View File

@ -1,2 +1,6 @@
# libtinyxml
TinyXML is a simple, small, C++ XML parser that can be easily integrating into other programs. Have you ever found yourself writing a text file parser every time you needed to save human readable data or serialize objects?
TinyXML solves the text I/O file once and for all.
(Or, as a friend said, ends the Just Another Text File Parser problem.)

View File

@ -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;

90
libtinyxml.spec Normal file
View File

@ -0,0 +1,90 @@
%define pkgver %(echo %version | tr . _)
Name: libtinyxml
Version: 2.6.2
Release: 1mamba
Summary: is a simple, small, C++ XML parser that can be easily integrating into other programs.
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Automatic Build System <autodist@mambasoft.it>
URL: http://www.grinninglizard.com/tinyxml/
Source: http://downloads.sourceforge.net/tinyxml/tinyxml_%{pkgver}.tar.gz
Patch0: tinyxml-2.5.3-stl.patch
Patch1: %{name}-2.6.1-entity.patch
License: zlib
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
TinyXML is a simple, small, C++ XML parser that can be easily integrating into other programs. Have you ever found yourself writing a text file parser every time you needed to save human readable data or serialize objects?
TinyXML solves the text I/O file once and for all.
(Or, as a friend said, ends the Just Another Text File Parser problem.)
%package devel
Group: Development/Libraries
Summary: Static libraries and headers for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
TinyXML is a simple, small, C++ XML parser that can be easily integrating into other programs. Have you ever found yourself writing a text file parser every time you needed to save human readable data or serialize objects?
TinyXML solves the text I/O file once and for all.
(Or, as a friend said, ends the Just Another Text File Parser problem.)
This package contains libraries and header files need for development.
%prep
%setup -q -n tinyxml
%patch0 -p1 -b .stl
%patch1 -p0
touch -r tinyxml.h.stl tinyxml.h
%build
for i in tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp; do
g++ %{optflags} -fPIC -o $i.o -c $i
done
g++ %{optflags} -shared -o %{name}.so.0.%{version} \
-Wl,-soname,%{name}.so.0 *.cpp.o
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}
install -m 755 %{name}.so.0.%{version} %{buildroot}%{_libdir}
ln -s %{name}.so.0.%{version} %{buildroot}%{_libdir}/%{name}.so.0
ln -s %{name}.so.0.%{version} %{buildroot}%{_libdir}/%{name}.so
install -p -m 644 tinyxml.h %{buildroot}%{_includedir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/*.so.*
%doc changes.txt readme.txt
%files devel
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/*.so
%doc docs/*
%changelog
* Sat Dec 01 2012 Automatic Build System <autodist@mambasoft.it> 2.6.2-1mamba
- automatic version update by autodist
* Fri Feb 18 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.1-2mamba
- added entity patch from http://sourceforge.net/tracker/index.php?func=detail&aid=3031828&group_id=13559&atid=313559
* Wed Feb 09 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.1-1mamba
- update to 2.6.1
* Thu Sep 18 2008 gil <puntogil@libero.it> 2.5.3-1mamba
- package created by autospec

12
tinyxml-2.5.3-stl.patch Normal file
View File

@ -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 )