# Contributor: Carlo Landmeter # Maintainer: pkgname=tinyxml pkgver=2.6.2 _realver=2_6_2 pkgrel=0 pkgdesc="A simple, small, C++ XML parser" url="http://www.grinninglizard.com/tinyxml/" arch="all" license="zlib" depends="" depends_dev="" makedepends="$depends_dev" install="" subpackages="$pkgname-dev" source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_realver.tar.gz tinyxml-2.6.2-defineSTL.patch tinyxml-2.6.1-entity.patch" _builddir=$srcdir/$pkgname prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done sed -i -e '/^TINYXML_USE_STL/ s|=.*|=YES|' \ -e "s|^RELEASE_CFLAGS.*|& ${CXXFLAGS} -fPIC|" Makefile } build() { cd "$_builddir" make || return 1 g++ -fPIC ${CXXFLAGS} -shared -o libtinyxml.so.0.$pkgver \ -Wl,-soname,libtinyxml.so.0 $(ls *.o | grep -v xmltest) } package() { cd "$_builddir" install -d -m 0755 "$pkgdir"/usr/lib \ "$pkgdir"/usr/include install -m 0755 libtinyxml.so.0.2.6.2 \ "$pkgdir"/usr/lib/ install -m 0644 tinyxml.h tinystr.h \ "$pkgdir"/usr/include/ cd "$pkgdir"/usr/lib ln -s libtinyxml.so.0.2.6.2 libtinyxml.so ln -s libtinyxml.so.0.2.6.2 libtinyxml.so.0 } md5sums="c1b864c96804a10526540c664ade67f0 tinyxml_2_6_2.tar.gz 6db8334398e0cdad7e3c6406206ff42a tinyxml-2.6.2-defineSTL.patch 5890558bca2e9763f0fdcbb94e90971e tinyxml-2.6.1-entity.patch"