summaryrefslogtreecommitdiff
path: root/extra/qhull/PKGBUILD
blob: 806c926ada1af2a4e421a957951354f5a5f5c99e (plain)
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
# $Id: PKGBUILD 120895 2011-04-27 06:52:39Z ronald $
# Maintainer: Ronald van Haren <ronald@archlinux.org>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Jason Taylor <jftaylor21@gmail.com>
# Contributor: Darwin Bautista <djclue917@gmail.com>

pkgname=qhull
pkgver=2010.1
pkgrel=1
pkgdesc="A general dimension code for computing convex hulls and related structures"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.qhull.org/"
license=('custom')
depends=('glibc')
makedepends=('cmake')
source=(http://www.qhull.org/download/$pkgname-$pkgver-src.tgz
	qhull-2010.1-cmake-install.patch
	qhull-2010.1-overflows.patch)
options=('!libtool')
sha1sums=('ed480912e03efdd767195c06c7e8c252c78112b1'
          '0a7747eb13c2e07c25882c1f0f5c0dfb4ef1c8c0'
          '21295d57af2f8cdfc775512fa44fe90f49d89c41')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # gentoo patches
  patch -Np1 -i ${srcdir}/qhull-2010.1-cmake-install.patch
  patch -Np1 -i ${srcdir}/qhull-2010.1-overflows.patch

  [ -d build ] || mkdir build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DDOC_INSTALL_DIR=/usr/share/doc \
	-DLIB_INSTALL_DIR=/usr/lib ..
  make
}

package() { 
  cd "$srcdir/$pkgname-$pkgver/build"

  make DESTDIR=$pkgdir install

  # install manpages
  install -Dm644 $srcdir/$pkgname-$pkgver/html/rbox.man $pkgdir/usr/share/man/man1/rbox.1
  install -Dm644 $srcdir/$pkgname-$pkgver/html/qhull.man $pkgdir/usr/share/man/man1/qhull.1

  # Install license
  install -Dm644 $srcdir/$pkgname-$pkgver/COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt"
}