aboutsummaryrefslogtreecommitdiffstats
path: root/community/xerces-c/APKBUILD
blob: e1ce2416a5ee3b2b4fc5be50f34e70f87df11d5a (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
# Contributor: Andrew Bell <andrew.bell.ia@gmail.com>
# Maintainer: Andrew Bell <andrew.bell.ia@gmail.com>
pkgname=xerces-c
pkgver=3.2.3
pkgrel=0
pkgdesc="A validating XML parser written in a portable subset of C++"
url="https://xerces.apache.org/index.html"
arch="all"
license="Apache-2.0"
makedepends="cmake curl-dev icu-dev"
subpackages="$pkgname-samples $pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/apache/xerces-c/archive/v$pkgver.tar.gz"

build() {
	local thread_support=-Dthreads:BOOL=ON
	case "$CARCH" in
		s390x) thread_support=-Dthreads:BOOL=OFF ;;
	esac
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX="$pkgdir"/usr \
		$thread_support \
		-Dnetwork-accessor=curl \
		-Dmessage-loader=icu \
		-Dtranscoder=icu \
		. $CMAKE_CROSSOPTS
	make -C build
}

check() {
	cd build
	ctest
}

package() {
	make -C build install DESTDIR="$pkgdir"
}

samples() {
	pkgdesc="$pkgdesc (compiled samples)"

	mkdir -p $subpkgdir/usr
	mv $pkgdir/usr/bin $subpkgdir/usr
}

sha512sums="aaafe2de4ea156d94e71e3631c79bd66660badf17bf2a19587a0ca34011f70bd1584a0beef909409a3ff05eecea9d37ffee6dbb267625f59217fd86705d2cd28  xerces-c-3.2.3.tar.gz"