# Contributor: Holger Jaekel # Maintainer: Holger Jaekel pkgname=libkml pkgver=1.3.0 pkgrel=2 _jdkver=11 pkgdesc="Reference implementation of OGC KML 2.2" url="https://github.com/libkml/libkml" arch="all !x86 !armhf !armv7" # 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"