### this file is sourced not run
PKGVER=2019.1.7.3.2
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=qhull-2019-src-7.3.2.tgz
MD5SUM=53c04f9c89b491b17b10c7ea1eaa4cc8
SRC_URL=http://www.qhull.org/download/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="libqhull: libqhull $PKGVER (Convex hull library)  
libqhull:  
libqhull: Qhull computes the convex hull, Delaunay triangulation, Voronoi 
libqhull: diagram, halfspace intersection about a point, furthest-site 
libqhull: Delaunay triangulation, and furthest-site Voronoi diagram. The 
libqhull: source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull 
libqhull: implements the Quickhull algorithm for computing the convex hull. It 
libqhull: handles roundoff errors from floating point arithmetic. It computes 
libqhull: volumes, surface areas, and approximations to the convex hull.  
libqhull: 
libqhull: http://www.qhull.org/ 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/qhull*
	sed -i -e "/ConfigPackageLocation/ s|lib/cmake/Qhull|$LIBDIR/cmake/Qhull|" CMakeLists.txt &&
	
	mkdir builddir && cd builddir &&
	cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/$LIBDIR \
		-DDOC_INSTALL_DIR=/usr/share/doc/qhull-$PKGVER &&
	make $MAKEFLAGS && make install &&

	pkg_build_slackdesc
}

