aboutsummaryrefslogtreecommitdiffstats
path: root/community/java-jffi/APKBUILD
blob: 4431f5cbd04e8f00c8f8fd55040b2b58de277b70 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=java-jffi
_pkgname=${pkgname#java-}
pkgver=1.3.5
_libver=1.2
pkgrel=0
pkgdesc="Java Foreign Function Interface"
url="https://github.com/jnr/jffi"
# ppc64le blocked by build failure
# mips64 and riscv64 blocked by openjdk8
arch="all !ppc64le !mips64 !riscv64"
license="Apache-2.0"
depends="$pkgname-native=$pkgver-r$pkgrel java-jre-headless"
makedepends="apache-ant file linux-headers openjdk8 texinfo"
subpackages="$pkgname-native"
source="https://github.com/jnr/$_pkgname/archive/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgname-$pkgver"

# Tests fail on non-x86_64 platforms, they are probably broken.
if [ "$CARCH" != x86_64 ]; then
	options="!check"
fi

build() {
	ant jar
}

check() {
	ant test
}

package() {
	install -m644 -D "$builddir"/dist/jffi.jar \
		"$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar
	ln -sf $_pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$_pkgname.jar
}

native() {
	depends=""

	# Note: jffi expects file named libjffi-x.y.so, not libjffi.so.x.y.
	install -m755 -D "$builddir"/build/jni/libjffi-$_libver.so \
		"$subpkgdir"/usr/lib/libjffi-$_libver.so
}

sha512sums="
02c20d3d36c84eff25b95806a9103061fc924e6e66c160e3e10dc7872e66c7bde621ab56f6ad09562c0169be21f59b6b6568f7d9012ca9832e6fdd32bc67debd  jffi-1.3.5.tar.gz
"