aboutsummaryrefslogtreecommitdiffstats
path: root/main/tinyxml2/APKBUILD
blob: 2f592cceefece8446f6588337ede242f92ecfd34 (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
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=tinyxml2
pkgver=7.1.0
pkgrel=0
pkgdesc="Simple, small and efficient C++ XML parser"
url="http://www.grinninglizard.com/tinyxml2"
arch="all"
license="Zlib"
makedepends="cmake"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/leethomason/tinyxml2/archive/$pkgver.tar.gz"

build() {
	cd "$builddir"
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		$CMAKE_CROSSOPTS
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="09d5f37018f79a593ff35e33d4296c9ec643a22e83c0cee4c37949300f86201eee07e9b7e6ba55044d8abb438d5d21b70d5843a96ae4652389bb164047ec31e1  tinyxml2-7.1.0.tar.gz"