aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libkml/APKBUILD
blob: dd62a9cee38d2c295e434ff691fd2ff16d7c5fd0 (plain) (blame)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=libkml
pkgver=1.3.0
pkgrel=3
_jdkver=11
pkgdesc="Reference implementation of OGC KML 2.2"
url="https://github.com/libkml/libkml"
arch="all !x86 !armhf !armv7 !s390x" # openjdk is not yet available on 32 bit arches
license="BSD-3-Clause"
depends_dev="
	boost-dev
	expat-dev
	zlib-dev
	"
makedepends="
	$depends_dev
	cmake
	curl-dev
	minizip-dev
	openjdk$_jdkver-jdk
	python3-dev
	swig
	uriparser-dev
	"
checkdepends="
	gtest-dev
	"
subpackages="
	$pkgname-dev
	py3-$pkgname:py
	java-$pkgname:java
	"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/libkml/libkml/archive/$pkgver.tar.gz
	10-fix-mistaken-use-of-std-cerr-instead-of-std-endl.patch
	20-fix-python3.patch
	30-fix-python-tests.patch
	40-dont-bytecompile.patch
	"

build() {
	cmake . \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DWITH_SWIG=ON \
		-DWITH_PYTHON=ON \
		-DWITH_JAVA=ON \
		-DJava_JAR_EXECUTABLE=/usr/lib/jvm/java-$_jdkver-openjdk/bin/jar \
		-DJava_JAVAC_EXECUTABLE=/usr/lib/jvm/java-$_jdkver-openjdk/bin/javac \
		-DJava_JAVADOC_EXECUTABLE=/usr/lib/jvm/java-$_jdkver-openjdk/bin/javadoc \
		-DJAVA_JVM_LIBRARY=/usr/lib/jvm/java-$_jdkver-openjdk/lib/server/libjvm.so \
		-DBUILD_TESTING=ON \
		-DBUILD_EXAMPLES=OFF
	make
}

py() {
	pkgdesc="Python 3 bindings for $pkgname"
	mkdir -p $subpkgdir/usr/lib/
	mv $pkgdir/usr/lib/python3.? $subpkgdir/usr/lib/
}

java() {
	pkgdesc="Java $_jdkver bindings for $pkgname"
	mkdir -p $subpkgdir/usr/lib/
	mkdir -p $subpkddir/usr/share/
	mv $pkgdir/usr/lib/jni $subpkgdir/usr/lib/jni
	mv $pkgdir/usr/share $subpkgdir/usr/share
}

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

check() {
	ctest -E test_java_kmlbase
}
sha512sums="aa48158103d3af764bf98c1fb4cf3e1356b9cc6c8e79d80b96850916f0a8ccb1dac3a46427735dd0bf20647daa047d10e722ac3da2a214d4c1559bf6d5d7c853  libkml-1.3.0.tar.gz
8fe7bd1aeee0663ade115cbb7f63b528d4a919db6e04095c0222b1a9e32a9b2b04deacd15f3224d2146b0943086af205c179bf5638c9f5562b0977aad3ba65fe  10-fix-mistaken-use-of-std-cerr-instead-of-std-endl.patch
a588a5f86d31f3eeb47d6d2c2281a7f518730e4247847e9dae093ca7f3006e27a4b4ca4e2e003ce31ef72f83096f5cfee3b3f2fb536934f64987cecb791ce12b  20-fix-python3.patch
c29d1e9e00fe5000a9b0e7e13bf4c196c61c47459724d5c20a22714504c1497175bca6723759d02be24ac314f6381f4ff2f1245bd2e2c2b2b344f959b50a7978  30-fix-python-tests.patch
a81cd6b09041060aff7d999280e0d7ea4bb6c819b510afd210ad097e480f444f0f2c779fe1cb2f5ecf0976f27daf66df62a88825e893bb6126909acfd0d74f65  40-dont-bytecompile.patch"