summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5f3d90e2f3e1d0565271ed774b0feea97bae33c7 (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
56
57
58
59
60
# Maintainer: detrito <detrito@inventati.org>
# Contributor: Thomas Holder <thomas@thomas-holder.de>
# Contributor: detrito <detrito@inventati.org>
# Contributor: Rodrigo Severo <rsev@protonmail.com>

pkgname=therion
pkgver=5.4.4
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=('5d3d79157a23e8758e9259425d706b9d7861993971ba630525e1665574024d85'
	'81cd6c75a74897831edd4116bb97c71090023abbb14725b96d2a219f67cb5613'
	'4dbff0ae39877078e295c90b0e7b7fce4b39a910546ed09e79eaf64c903bf1b4'
	'0639b0c4c9660af33675bf948ca4678d441167f77f7818cc015b7738a53fb8f3'
	)

prepare() {
  cd "${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
}

build() {
  cd "${pkgname}-${pkgver}"
 
  make PREFIX=/usr
 }
 
 package() {
  cd "${pkgname}-${pkgver}"
  make PREFIX="${pkgdir}" install
}