aboutsummaryrefslogtreecommitdiffstats
path: root/main/tinyxml/APKBUILD
blob: eba9e3c7aa6f173609a9c76c28ce07ae5aee3a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=tinyxml
pkgver=2.6.2
_realver=2_6_2
pkgrel=1
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
}

sha512sums="133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56  tinyxml_2_6_2.tar.gz
52cd82ef9e8f1783b3d6042551342a8c592c447e1da352d5d017db4211144bc0a908ddbfe2a4641b3108fb8e02dc47f385a851f920532d94178314255904a6ef  tinyxml-2.6.2-defineSTL.patch
47d582456c2e2ac51a186a4bd58ede4895586ed373b654b120b34bedc7c2e52ed291a3576a37420ea94a238a265d8e2d38de024e770144e465590718da245af3  tinyxml-2.6.1-entity.patch"