summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 282f98d8e1cf35e51d5efec1505a4b3bdc123c34 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Maintainer: Thomas Holder <thomas at thomas-holder dot de>
# Contributor: detrito <detrito at inventati dot org>
# Contributor: Rodrigo Severo <rsev at protonmail dot com>

pkgname='therion'
pkgver='6.3.3'
pkgrel='2'
pkgdesc="Cave surveying: processes survey data and generates maps or 3D models of caves"
arch=('x86_64' 'i686')
url="http://therion.speleo.sk"
license=('GPL2')
changelog='CHANGELOG'

depends=(
	'bwidget' 
	'fmt'
	'freetype2'
	'glu' 
	'imagemagick' 
	'libjpeg-turbo' 
	'libpng' 
	'nlohmann-json' # vtk dependency
	'python'
	'shapelib'
	'texlive-core' 
	'texlive-metapost'
	'tk'
	'tkimg'
	'vtk' 
	'wxwidgets-gtk3'
	'zlib'
)

makedepends=(
	'cmake'
	'perl'
)

source=(
	"http://github.com/therion/therion/archive/v${pkgver}.tar.gz"
	'therion_ini.patch'
	'add_library-STATIC.patch'
)

sha256sums=(
	'55d5e5bd2f6cf27cd32f9cb096c15ced6939605f1c1754a97456551112481ce5'
	'0639b0c4c9660af33675bf948ca4678d441167f77f7818cc015b7738a53fb8f3'
	'54756514e46ede74eb418f7b234d8290cea6b1904bf52109a5d5620900d7ee02'
)

backup=(
	etc/therion.ini
	etc/xtherion.ini
)

_builddir="build"
_sourcedir="${pkgname}-${pkgver}"

prepare() {
  cd "${pkgname}-${pkgver}"

  # patch to get UTF8 and available fonts
  patch -p0 -i ${srcdir}/therion_ini.patch

  # fix static linking
  patch -p1 -i ${srcdir}/add_library-STATIC.patch
}

build() {
  cmake \
    -B "${_builddir}" \
    -S "${_sourcedir}" \
    -DUSE_BUNDLED_CATCH2=ON \
    -DUSE_BUNDLED_SHAPELIB=OFF \
    -DCMAKE_INSTALL_PREFIX='/usr'

  make -C "${_builddir}"
}
 
package() {
  make -C "${_builddir}" DESTDIR="${pkgdir}" install/strip

  mkdir -p "${pkgdir}/etc"

  cp \
    "${_sourcedir}/therion.ini" \
    "${_sourcedir}/xtherion/xtherion.ini" \
    "${pkgdir}/etc"
}