summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c52dfd531b8b292b85aab82c3d5591d303431f29 (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
# Maintainer: eolianoe <eolianoe At GoogleMAIL DoT com>
# Maintainer: A Austin <acm.austin at gmail.com>
# Contributor: Martin Ortbauer <mortbauer@gmail.com>

pkgbase=archimedes-tools
pkgname=('triangle' 'showme')
pkgver=1.6
pkgrel=7
arch=('i686' 'x86_64')
url='http://www.cs.cmu.edu/~quake/archimedes.html'
pkgdesc='Archimedes is a set of tools, including mesh generators, for performing unstructured finite element simulations'
license=('custom')
source=('http://www.netlib.org/voronoi/triangle.zip'
        'triangle_definitions.patch')
md5sums=('10aff8d7950f5e0e2fb6dd2e340be2c9'
         '98844d1b1d9de73101b660412132cd07')
makedepends=('libx11')

prepare() {
  patch < ../triangle_definitions.patch triangle.h
}

build(){
  gcc ${CFLAGS} -o triangle triangle.c -lm
  gcc ${CFLAGS} -DTRILIBRARY -Wall -fpic -c triangle.c
  gcc ${CFLAGS} -shared -o libtriangle.so triangle.o

  gcc ${CFLAGS} -o showme showme.c -lX11
}

package_triangle() {
  url='http://www.cs.cmu.edu/~quake/triangle.html'
  pkgdesc='A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator.'
  depends=('glibc')

  install -Dm755 triangle "${pkgdir}/usr/bin/triangle"
  install -Dm644 triangle.h "${pkgdir}/usr/include/triangle.h"
  install -Dm644 libtriangle.so "${pkgdir}/usr/lib/libtriangle.so"
  install -Dm644 "${srcdir}/README" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_showme() {
  url='http://www.cs.cmu.edu/~quake/showme.html'
  pkgdesc='Show Me graphically displays the contents of geometric files, especially those generated by Triangle'
  depends=('libx11')

  install -Dm755 showme "${pkgdir}/usr/bin/showme"
  install -Dm644 "${srcdir}/README" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}