aboutsummaryrefslogtreecommitdiffstats
path: root/community/qhull/APKBUILD
blob: e33627a489fe206b17bdcf30a8c7c03f2532c8cd (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
# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=qhull
pkgver=2020.2
pkgrel=1
pkgdesc="Calculate convex hulls and related structures"
url="https://www.qhull.org/"
arch="all"
license="custom"
makedepends="cmake"
subpackages="
	$pkgname-static
	$pkgname-dev
	$pkgname-nonreentrant
	$pkgname-doc
	"
source="qhull-$pkgver.tar.gz::https://github.com/qhull/qhull/archive/$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DCMAKE_SKIP_INSTALL_RPATH=YES \
		$CMAKE_CROSSOPTS
	make -C build all libqhull
}

check() {
	cd build && ctest
}

package() {
	make -C build DESTDIR="$pkgdir" install
	mv build/libqhull.so* "$pkgdir"/usr/lib/

	install -Dm644 $builddir/COPYING.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
}

nonreentrant() {
	amove usr/lib/libqhull.so.*
}

sha512sums="88f50c2a968f56deec61772490617cc877b0ca2d804954ade08297b9bab826076db6b960d6f1feb21c6851e5328cb11c6dd565666517fa78a3d65b901848ff36  qhull-2020.2.tar.gz"