initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

73
tinyxml/PKGBUILD Normal file
View File

@@ -0,0 +1,73 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=tinyxml
pkgver=2.6.2
pkgrel=1
_debver=$pkgver
_debrel=4
pkgdesc='Simple, small XML parser'
url="http://grinninglizard.com/$pkgname/"
arch=('i686' 'x86_64')
license=('zlib')
makedepends=('setconf' 'quilt')
source=("https://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver//./_}.tar.gz"
"https://deb.debian.org/debian/pool/main/${pkgname::1}/$pkgname/${pkgname}_$_debver-$_debrel.debian.tar.xz"
'entity.patch'
"$pkgname-2.5.3-stl.patch"
"$pkgname.pc")
sha512sums=('133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56'
'71d1afd7d9275636e8f1a4f265c84dfb95bb0d930057c008954d3c852f03110ac11b6aaca2227352bb083d82567eb3a6dd11e0d7fc8849a5bcac0f23f653f155'
'e03f4bdfb80354c6d262abb40e6c105cb2d37530e2f1f1d865ff4fd8434320a26957fbc2379db8af1bd18cd3c8662e064e79525831a5fb9fcb4aff46f3eb0809'
'52cd82ef9e8f1783b3d6042551342a8c592c447e1da352d5d017db4211144bc0a908ddbfe2a4641b3108fb8e02dc47f385a851f920532d94178314255904a6ef'
'5c7993f26119f2a9b21e95ecca195db3996460616d7b760e3b1ea8ab3a6fd4b904c2370d39ed18ae30dae521ba6f3253f231321543a606f03bef5c29d1ab33a1')
prepare() {
cd "$pkgname"
if [[ ${pkgver%.*} != ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
# Fix entity encoding
patch -p0 -i "$srcdir/entity.patch"
# Make TINYXML_USE_STL permanently defined in tinyxml.h
# patch -p1 -i "$srcdir/$pkgname-2.5.3-stl.patch"
# Fix Makefile
# setconf Makefile TINYXML_USE_STL YES
setconf Makefile RELEASE_CFLAGS "$CXXFLAGS -fPIC"
}
build() {
cd "$pkgname"
make
g++ -fPIC "$CXXFLAGS" -shared -o "lib${pkgname}.so.0.$pkgver" \
-Wl,-soname,"lib${pkgname}.so.0" $(ls *.o | grep -v xmltest)
}
package() {
cd "$pkgname"
#install -dm0755 "$pkgdir"/usr/{lib,include}
install -Dm0755 "lib${pkgname}.so.0.$pkgver" -t "$pkgdir"/usr/lib/
install -Dm0644 "$pkgname.h" tinystr.h -t "$pkgdir"/usr/include
install -Dm644 readme.txt -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 "$srcdir/$pkgname.pc" -t "$pkgdir/usr/lib/pkgconfig"
cd "$pkgdir/usr/lib"
ln -s "lib${pkgname}.so.0.$pkgver" "lib${pkgname}.so.0"
ln -s "lib${pkgname}.so.0.$pkgver" "lib${pkgname}.so"
}
# vim: ts=2 sw=2 et:

64
tinyxml/entity.patch Normal file
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;

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 )

11
tinyxml/tinyxml.pc Normal file
View File

@@ -0,0 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: TinyXml
Description: simple, small, C++ XML parser
Version: 2.6.2
Libs: -L${libdir} -ltinyxml
Cflags: -I${includedir}