SHA256
8
0
forked from pool/tinyxml

- Autoconfiscate the package.

- New package for factory.
- Remove stl patch as configure handles that now.

- fix packaging
  (devel package should be libtinyxml-devel not libtinyxml0-devel)

- Reworked Spec (Provides/Obsoletes)

- cleanup the specfile and added make clean

- removed %%%%buildroot

- Changed Packagename to libtinyxml

- initial openSUSE Package
- branched for Contrib

- Various improvements from review (bz 407571)

- Initial Fedora Package

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tinyxml?expand=0&rev=1
This commit is contained in:
Philipp Thomas
2010-11-05 17:52:07 +00:00
committed by Git OBS Bridge
commit ca7e368c42
12 changed files with 2324 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

46
Makefile.am Normal file
View File

@@ -0,0 +1,46 @@
#****************************************************************************
#
# Makefile for TinyXml library.
# Lee Thomason
# www.grinninglizard.com
#
# Process with automake to turn into the real Makefile
#****************************************************************************
SUBDIRS = docs
ACLOCAL_AMFLAGS = -I m4
lib_LTLIBRARIES = libtinyxml.la
libtinyxml_la_SOURCES = tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp
libtinyxml_la_LDFLAGS = -version-info 0:0:0
include_HEADERS = tinyxml.h tinystr.h
check_PROGRAMS = xmltest
xmltest_SOURCES = xmltest.cpp
if DEBUG
AM_CFLAGS := -Wall -Wno-format -g -DDEBUG
AM_CXXFLAGS := ${AM_CFLAGS}
AM_LDFLAGS := -g
else
AM_CFLAGS := -Wall -Wno-unknown-pragmas
AM_CXXFLAGS := ${AM_CFLAGS}
AM_LDFLAGS :=
endif
if PROFILE
AM_CFLAGS := -pg -O3
AM_CXXFLAGS := -pg -O3
AM_ LDFLAGS := -pg
endif
if TINYXML_USE_STL
libtinyxml_la_CPPFLAGS = -DTIXML_USE_STL=1
endif
EXTRA_DIST = changes.txt readme.txt tinyxml_lib.dsp tinyxmlSTL.dsp tinyXmlTestSTL.vcproj \
utf8test.xml tinyxml.dsw tinyxml_lib.vcproj tinyxmlSTL.vcproj \
tinyXmlTest.vcproj utf8test.gif echo.dsp tinyxml.sln tinyXmlTestSTL.dsp \
utf8testverify.xml use_stl_def

88
Makefile.am.docs Normal file
View File

@@ -0,0 +1,88 @@
EXTRA_DIST = annotated.html \
classes.html \
classTiXmlAttribute.html \
classTiXmlAttribute-members.html \
classTiXmlAttribute.png \
classTiXmlBase.html \
classTiXmlBase-members.html \
classTiXmlBase.png \
classTiXmlComment.html \
classTiXmlComment-members.html \
classTiXmlComment.png \
classTiXmlDeclaration.html \
classTiXmlDeclaration-members.html \
classTiXmlDeclaration.png \
classTiXmlDocument.html \
classTiXmlDocument-members.html \
classTiXmlDocument.png \
classTiXmlElement.html \
classTiXmlElement-members.html \
classTiXmlElement.png \
classTiXmlHandle.html \
classTiXmlHandle-members.html \
classTiXmlNode.html \
classTiXmlNode-members.html \
classTiXmlNode.png \
classTiXmlPrinter.html \
classTiXmlPrinter-members.html \
classTiXmlPrinter.png \
classTiXmlText.html \
classTiXmlText-members.html \
classTiXmlText.png \
classTiXmlUnknown.html \
classTiXmlUnknown-members.html \
classTiXmlUnknown.png \
classTiXmlVisitor.html \
classTiXmlVisitor-members.html \
classTiXmlVisitor.png \
deprecated.html \
doxygen.css \
doxygen.png \
files.html \
functions_0x63.html \
functions_0x64.html \
functions_0x65.html \
functions_0x66.html \
functions_0x67.html \
functions_0x69.html \
functions_0x6c.html \
functions_0x6e.html \
functions_0x6f.html \
functions_0x70.html \
functions_0x71.html \
functions_0x72.html \
functions_0x73.html \
functions_0x74.html \
functions_0x75.html \
functions_0x76.html \
functions_enum.html \
functions_func_0x63.html \
functions_func_0x64.html \
functions_func_0x65.html \
functions_func_0x66.html \
functions_func_0x67.html \
functions_func_0x69.html \
functions_func_0x6c.html \
functions_func_0x6e.html \
functions_func_0x70.html \
functions_func_0x71.html \
functions_func_0x72.html \
functions_func_0x73.html \
functions_func_0x74.html \
functions_func_0x75.html \
functions_func_0x76.html \
functions_func.html \
functions.html \
functions_rela.html \
functions_vars.html \
hierarchy.html \
index.html \
Makefile.am \
pages.html \
tab_b.gif \
tab_l.gif \
tab_r.gif \
tabs.css \
tinystr_8h_source.html \
tinyxml_8h_source.html \
tutorial0.html

67
configure.ac Normal file
View File

@@ -0,0 +1,67 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67])
AC_INIT(tinyxml, 2.6.1, www.sourceforge.net/projects/tinyxml)
AC_CONFIG_SRCDIR([tinystr.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
LT_INIT([disable-static])
AC_LANG(C++)
# Checks for header files.
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_CHECK_FUNCS([memmove strchr])
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Turn on debugging]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
AC_ARG_ENABLE([profile],
AS_HELP_STRING([--enable-profiling], [Turn on profiling]),
[case "${enableval}" in
yes) profile=true ;;
no) profile=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-profiling]) ;;
esac],[profile=false])
AM_CONDITIONAL([PROFILE], [test x$profile = xtrue])
AC_ARG_ENABLE([stl],
AS_HELP_STRING([--disable-stl], [Don't use STL [default is use]]),
[case "${enableval}" in
yes) tyx_use_stl=true ;;
no) tyx_use_stl=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-stl]) ;;
esac],[tyx_use_stl=true])
AM_CONDITIONAL([TINYXML_USE_STL], [test x$tyx_use_stl = xtrue])
case $tyx_use_stl in
true) TIXML_USE_STL=use_stl_def ;;
*) TIXML_USE_STL=/dev/null ;;
esac
AC_SUBST_FILE(TIXML_USE_STL)
AC_CONFIG_FILES([Makefile docs/Makefile tinyxml.h])
AC_OUTPUT

81
tinyxml-c_headers.patch Normal file
View File

@@ -0,0 +1,81 @@
Use the C++ versions of the STDC headers.
signed-of-by: pth@suse.de
Index: tinystr.h
===================================================================
--- tinystr.h.orig 2010-03-23 06:16:36.000000000 +0100
+++ tinystr.h 2010-11-04 15:20:38.861503854 +0100
@@ -39,8 +39,8 @@ distribution.
#ifndef TIXML_STRING_INCLUDED
#define TIXML_STRING_INCLUDED
-#include <assert.h>
-#include <string.h>
+#include <cassert>
+#include <cstring>
/* The support for explicit isn't that universal, and it isn't really
required - it is used to check that the TiXmlString class isn't incorrectly
Index: tinyxml.cpp
===================================================================
--- tinyxml.cpp.orig 2010-03-23 06:16:36.000000000 +0100
+++ tinyxml.cpp 2010-11-04 15:22:13.806257421 +0100
@@ -22,7 +22,7 @@ must not be misrepresented as being the
distribution.
*/
-#include <ctype.h>
+#include <cctype>
#ifdef TIXML_USE_STL
#include <sstream>
Index: tinyxml.h
===================================================================
--- tinyxml.h.orig 2010-03-23 06:16:36.000000000 +0100
+++ tinyxml.h 2010-11-04 15:21:12.619460632 +0100
@@ -32,11 +32,11 @@ distribution.
#pragma warning( disable : 4786 )
#endif
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
+#include <cctype>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cassert>
// Help out windows:
#if defined( _DEBUG ) && !defined( DEBUG )
Index: tinyxmlparser.cpp
===================================================================
--- tinyxmlparser.cpp.orig 2010-03-23 06:16:36.000000000 +0100
+++ tinyxmlparser.cpp 2010-11-04 15:23:03.795078300 +0100
@@ -22,8 +22,8 @@ must not be misrepresented as being the
distribution.
*/
-#include <ctype.h>
-#include <stddef.h>
+#include <cctype>
+#include <cstddef>
#include "tinyxml.h"
Index: xmltest.cpp
===================================================================
--- xmltest.cpp.orig 2010-03-23 06:16:36.000000000 +0100
+++ xmltest.cpp 2010-11-04 15:23:38.429189753 +0100
@@ -8,7 +8,7 @@
#include <sstream>
using namespace std;
#else
- #include <stdio.h>
+ #include <cstdio>
#endif
#if defined( WIN32 ) && defined( TUNE )

58
tinyxml-entity.patch Normal file
View File

@@ -0,0 +1,58 @@
? entity.patch
Index: tinyxml.cpp
===================================================================
--- tinyxml.cpp.orig 2010-11-04 15:33:06.473418438 +0100
+++ tinyxml.cpp 2010-11-04 15:33:06.597440320 +0100
@@ -57,30 +57,7 @@ void TiXmlBase::EncodeString( const TIXM
{
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
===================================================================
--- xmltest.cpp.orig 2010-11-04 15:33:06.553432556 +0100
+++ xmltest.cpp 2010-11-04 15:33:06.597440320 +0100
@@ -1338,6 +1338,16 @@ int main()
}*/
}
+ #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;

49
tinyxml.changes Normal file
View File

@@ -0,0 +1,49 @@
-------------------------------------------------------------------
Fri Nov 5 18:51:02 CET 2010 - pth@suse.de
- Autoconfiscate the package.
- New package for factory.
- Remove stl patch as configure handles that now.
-------------------------------------------------------------------
Wed Jun 30 00:00:00 CET 2010 - prusnak@opensuse.org
- fix packaging
(devel package should be libtinyxml-devel not libtinyxml0-devel)
-------------------------------------------------------------------
Fri Oct 16 00:00:00 CET 2009 - saigkill@opensuse.org
- Reworked Spec (Provides/Obsoletes)
-------------------------------------------------------------------
Fri Jul 31 00:00:00 CET 2009 - saigkill@opensuse.org
- cleanup the specfile and added make clean
-------------------------------------------------------------------
Sat Apr 18 00:00:00 CET 2009 - saigkill@opensuse.org
- removed %%%%buildroot
-------------------------------------------------------------------
Fri Feb 13 00:00:00 CET 2009 - saigkill@opensuse.org - 2.5.3
- Changed Packagename to libtinyxml
-------------------------------------------------------------------
Thu Feb 12 00:00:00 CET 2009 - saigkill@opensuse.org - 2.5.3
- initial openSUSE Package
- branched for Contrib
-------------------------------------------------------------------
Fri Dec 14 00:00:00 CET 2007 - j.w.r.degoede@hhs.nl 2.5.3-2
- Various improvements from review (bz 407571)
-------------------------------------------------------------------
Fri Nov 30 00:00:00 CET 2007 - j.w.r.degoede@hhs.nl 2.5.3-1
- Initial Fedora Package

1801
tinyxml.h.in Normal file

File diff suppressed because it is too large Load Diff

102
tinyxml.spec Normal file
View File

@@ -0,0 +1,102 @@
%define so_version 0
Name: tinyxml
Version: 2.6.1
%define file_version 2_6_1
%define lib_package lib%{name}%{so_version}
Group: System/Libraries
Summary: A simple, small, C++ XML parser
Release: 2
License: GPLv2+
Source: %{name}_%{file_version}.tar.lzma
Source1: configure.ac
Source2: Makefile.am
Source3: tinyxml.h.in
Source4: use_stl_def
Source5: Makefile.am.docs
Patch0: tinyxml-c_headers.patch
Patch1: tinyxml-entity.patch
Url: http://sourceforge.net/projects/tinyxml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ lzma
%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 -n %{lib_package}
Group: System/Libraries
Summary: A simple, small, C++ XML parser
%description -n %{lib_package}
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
Summary: Development files for libtinyxml
Group: Development/Libraries/C and C++
Requires: %{lib_package} = %{version}
Provides: libtinyxml-devel = %{version}
Obsoletes: libtinyxml-devel < %{version}
Suggests: %{name}-%{docs}
%description devel
The libtinyxml-devel package contains libraries and header files for
developing applications that use libtinyxml.
%package docs
Summary: Documentaqtion for libtinyxml
Group: Development/Libraries/C and C++
Requires: %{name}%{so_version} = %{version}
%description docs
This packages contains the HTML documentation and a tutorial for
libtinyxml
%prep
%setup -q -n tinyxml
%patch0
%patch1
mkdir -p m4
cp %{S:1} %{S:2} %{S:3} %{S:4} .
cp %{S:5} docs/Makefile.am
%build
autoreconf -fi
export CXXFLAGS="%{optflags}"
%configure
make %{?_smp_mflags}
%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la
%clean
rm -rf %{buildroot}
%post -n %{lib_package} -p /sbin/ldconfig
%postun -n %{lib_package} -p /sbin/ldconfig
%files -n %{lib_package}
%defattr(-,root,root,-)
%doc changes.txt readme.txt
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%files docs
%defattr(-,root,root,-)
%doc docs/*.html docs/*.gif docs/*.png docs/*.css
%changelog

3
tinyxml_2_6_1.tar.lzma Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4dc0c2350ab5d9a5ed34f803064cf1d65f41f72c6178f756a42e9336dcb93655
size 130955

5
use_stl_def Normal file
View File

@@ -0,0 +1,5 @@
#ifdef TIXML_USE_STL
#undef TIXML_USE_STL
#endif
#define TIXML_USE_STL 1