aboutsummaryrefslogtreecommitdiffstats
path: root/testing/geos/APKBUILD
blob: 375d5f0c4c2fada2022f8c4d8bcc3cf9fa888d71 (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
# Contributor: Eric Kidd <git@randomhacks.net>
# Maintainer:
pkgname=geos
pkgver=3.5.0
pkgrel=0
pkgdesc="GEOS is a library providing OpenGIS and JTS spatial operations in C++."
url="http://trac.osgeo.org/geos/"
arch="x86 x86_64"
license="LGPL2.1"
depends=""
depends_dev=""
makedepends="swig python2-dev $depends_dev"
install=""
subpackages="py-$pkgname:py $pkgname-dev"
source="http://download.osgeo.org/geos/geos-$pkgver.tar.bz2 10-isnan.patch"

builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$builddir"
	for i in "$srcdir"/*.patch; do
		msg "Applying ${i}"
		patch -p1 -i $i || return 1
	done
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-python \
		|| return 1

	# --enable-ruby produces a gem which crashes, and which seems to
	# mostly ignored in favor of the rgeo and ffi-geos modules, anyway.

	make || return 1

	# This is a complex library that does lots of complicated numeric
	# stuff, and the unit tests are fast, so let's run them just to be
	# safe.
	make check || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

py() {
	cd "$builddir"
	pkgdesc="$pkgname Python bindings"
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

md5sums="136842690be7f504fba46b3c539438dd  geos-3.5.0.tar.bz2
05cb0ecb132c4d20b5444a7ec926d68c  10-isnan.patch"
sha256sums="49982b23bcfa64a53333dab136b82e25354edeb806e5a2e2f5b8aa98b1d0ae02  geos-3.5.0.tar.bz2
1bce38b84d5ba67bc0f4725cc13d69b89654b3cd37e4189090691e8abe008040  10-isnan.patch"
sha512sums="cd9c008c19213eb90959f950b03958e6abd9c22d83e6eb5f5a9020263ad8b0045dd5c5af60417c548fc130a57756ae1ef706710086cc277498b9ba6a0a6256b7  geos-3.5.0.tar.bz2
3bb8a11e56f9f03138e46b96c31c57f7f080a7115d5d64a3d84c1dbd077ab61e32e7c8b441d5d167ba0f9b87ac6b978291b507ab0ef7d9f27f3fb282766a3db6  10-isnan.patch"