summaryrefslogtreecommitdiff
path: root/scidavis-qt5/PKGBUILD
blob: 20bc45453bb5cb04b660cbdf739b1f58be9f82b3 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Mirko Scholz
# Contributor: Evgeniy Alekseev <arcanis at archlinux dot org>
# Contributor: Knut Franke <Knut.Franke ad gmx dot de>
# Contributor: Olaf Leidinger <leidola at newcon dot de>
# Contributor: Robal <nigrantis.tigris at gmail dot com>
# Contributor: Alexander <chronischzuspaet at gmail dot com> Kempen

# see https://svnweb.freebsd.org/ports/head/science/scidavis/Makefile?view=markup

_pkgname=scidavis
pkgname=scidavis-qt5
pkgver=2.3.0
_commit=${pkgver}
pkgrel=21
pkgdesc="Application for Scientific Data Analysis and Visualization, fork of QtiPlot. Qt5 port"
arch=('i686' 'pentium4' 'x86_64')
url="http://scidavis.sourceforge.net/"
license=('GPL')
makedepends=('boost' 'cmake' 'qt5-tools'
'sip' 'python-sip'
'qwt5-qt5>=5.2.3.1-2'
'qwtplot3d-qt5>=0.2.7-3'
)
_pinned_dependencies=(
  'gcc-libs=10.2.0'
  'glibc>=2.31'
  'glu=9.0.1'
  'gsl=2.6'
  'libglvnd=1.3.3'
  'muparser=2.3.2'
  'python=3.9.5'
  'qt5-base=5.15.2+kde+r192'
  'qt5-svg=5.15.2+kde+r7'
  'zlib=1:1.2.11'
)
depends=('mesa' 'shared-mime-info' 'desktop-file-utils' 'hicolor-icon-theme' 'python-pyqt5' 'python-pyqt5-sip' 'python-scipy' "${_pinned_dependencies[@]}")
conflicts=('scidavis')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/highperformancecoder/scidavis/archive/${_commit}.tar.gz"
'linking.patch'
)
sha512sums=('2ede70bcf5b910fc61e5a23ba36129bde11fd10b14470d4e8c9509eecb245c73242a3a1eec174b4f9a22abd21880e6ecbd9f0d1e492af87ff781163ad05e20cf'
            '69f04800343935141ad224510a915a8cbdbd0e07401a61530a52e18ea5d02b85f7e579f70b6bb32b37e085c07f61a8ce3f9c83f7b7b9cfe0553624b8ff9ff5db')

prepare() {
  cd "${_pkgname}-${_commit}"
  patch --forward --strip=1 --input="${srcdir}/linking.patch"
}

build() {
  cd "${_pkgname}-${_commit}"
  qmake-qt5 \
	CONFIG+="liborigin python" \
	INCLUDEPATH+="/usr/include/qt/qwt5-qt5" \
	INCLUDEPATH+="/usr/include/qt/qwtplot3d-qt5" \
	LIBS+="-lqwt5-qt5 -lqwtplot3d-qt5" \
	QMAKE_CXXFLAGS="-Wno-deprecated-copy -Wno-deprecated-declarations -fpermissive"
  make qmake
  make
}

package() {
  cd "${_pkgname}-${_commit}"
  make INSTALL_ROOT="${pkgdir}" DESTDIR="${pkgdir}" install

  python -m py_compile "${pkgdir}/etc/scidavisrc.py"
  mv ${pkgdir}/etc/__pycache__/scidavisrc*.pyc "${pkgdir}/etc/scidavisrc.pyc"
  rm -rf ${pkgdir}/etc/__pycache__

  # remove liborigin files since it uses static library
  rm -rf "${pkgdir}/usr/local"

  # install translations (it looks like it does not provide target to do it)
  install -dm755 "${pkgdir}/usr/share/scidavis/translations/"
  find "scidavis/translations/" -name '*.qm' -type f -exec \
      install -Dm644 {} "${pkgdir}/usr/share/scidavis/translations/" \;
}