summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 166fddb167238688f0ee219fac07c85549ae4afd (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
50
51
52
53
54
55
# Maintainer: detrito <detrito@inventati.org>
# Contributor: Thomas Holder <thomas@thomas-holder.de>
# Contributor: detrito <detrito@inventati.org>

pkgname=therion
pkgver=5.4.1
pkgrel=2
pkgdesc="A cave surveying software"
arch=('x86_64' 'i686')
url="http://therion.speleo.sk"
license=('GPL2')

# avoid parallel-execution errors
MAKEFLAGS="-j1"

depends=('tk' 'bwidget' 'texlive-core' 'imagemagick' 'wxgtk' 'glu' 'vtk'
	'webkitgtk2')

optdepends=('libjpeg-turbo' 'libpng' 'zlib')

source=("http://github.com/therion/therion/archive/v${pkgver}.tar.gz"
	"loch_vtk7.patch"
	"make_install.patch"
	"therion_ini.patch")

sha256sums=('6e4b88d1803bdf252cf7d4632afcd9c4005e387245e9ac95774e6cc894ae4ccd'
	'81cd6c75a74897831edd4116bb97c71090023abbb14725b96d2a219f67cb5613'
	'bf3fda048fb1a4f4c49f0daf7faa7e40c630748b33ed27c47bcfabba4014571c'
	'0639b0c4c9660af33675bf948ca4678d441167f77f7818cc015b7738a53fb8f3'
	)

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

  # patch to compile loch with VTK 7.1
  patch -p0 -i ${srcdir}/loch_vtk7.patch

  # patch to install in $pkgdir
  patch -p0 -i ${srcdir}/make_install.patch

  # patch to get UTF8 and available fonts
  patch -p0 -i ${srcdir}/therion_ini.patch
  
  # path to fix loch compilation
  sed -i.bak 's/-DLXLINUX//' loch/Makefile
  sed -i.bak 's/^POBJECTS =.*/POBJECTS =/' loch/Makefile
  sed -i.bak 's/freetype-config --cflags/pkg-config --cflags freetype2/' loch/Makefile

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}