mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
52 lines
1.5 KiB
Bash
52 lines
1.5 KiB
Bash
#
|
|
# Games Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Contributor: Larry Hajali <larryhaja[at]gmail[dot]com>
|
|
# Contributor: Hubert Grzeskowiak <arch at nemesis13 dot de>
|
|
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
|
|
|
|
pkgname=tinyxml
|
|
pkgver=2.6.2
|
|
pkgrel=1
|
|
pkgdesc="A simple, small, C++ XML parser that can be easily integrated into other programs"
|
|
url='http://www.grinninglizard.com/tinyxml/'
|
|
arch=('i686' 'x86_64')
|
|
license=('zlib')
|
|
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}_${pkgver//./_}.tar.gz"
|
|
'entity.patch'
|
|
'tinyxml-2.5.3-stl.patch')
|
|
md5sums=('c1b864c96804a10526540c664ade67f0'
|
|
'b6cc2d9330707373d920f760793c6311'
|
|
'6db8334398e0cdad7e3c6406206ff42a')
|
|
|
|
build() {
|
|
cd "$srcdir"/$pkgname
|
|
|
|
# Fix entity encoding.
|
|
patch -p0 < "$srcdir"/entity.patch
|
|
|
|
# Make TINYXML_USE_STL permanently defined in tinyxml.h
|
|
patch -p1 < "$srcdir"/$pkgname-2.5.3-stl.patch
|
|
|
|
# Fix Makefile
|
|
sed -i \
|
|
-e '/^TINYXML_USE_STL/ s|=.*|=YES|' \
|
|
-e "s|^RELEASE_CFLAGS.*|& ${CXXFLAGS} -fPIC|" Makefile
|
|
|
|
make
|
|
|
|
g++ -fPIC ${CXXFLAGS} -shared -o lib${pkgname}.so.0.$pkgver -Wl,-soname,lib${pkgname}.so.0 *.o
|
|
}
|
|
|
|
package()
|
|
{
|
|
cd "$srcdir"/$pkgname
|
|
install -d -m 0755 "$pkgdir"/usr/{lib,include}
|
|
install -m 0755 lib${pkgname}.so.0.$pkgver "$pkgdir"/usr/lib/
|
|
install -m 0644 $pkgname.h tinystr.h "$pkgdir"/usr/include
|
|
(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
|
|
)
|
|
}
|