summaryrefslogtreecommitdiff
path: root/paraview/PKGBUILD
blob: d9849d06c5fb798f291d1be498548e8f68dfbf62 (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
92
93
94
95
# Maintainer:  Erich Eckner <arch at eckner dot net>
# Contributor: Oliver Goethel <deezy>
# Contributor: eolianoe eolianoe <eolianoe [at] gmail [DoT] com>
# Contributor: George Eleftheriou <eleftg>
# Contributor: Mathias Anselmann <mathias.anselmann@gmail.com>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Michele Mocciola <mickele>
# Contributor: Simon Zilliken <simon____AT____zilliken____DOT____name>
# Contributor: chuckdaniels

pkgname=paraview
pkgver=5.5.0
pkgrel=1
pkgdesc='Parallel Visualization Application using VTK'
arch=('i686' 'x86_64')
url='http://www.paraview.org'
license=('custom')
depends=('qt5-tools' 'qt5-x11extras'  'qt5-xmlpatterns'
         'openmpi' 'python-matplotlib' 'python-numpy'
         'ffmpeg' 'boost' 'glew' 'protobuf'
         'expat' 'freetype2' 'libjpeg' 'libxml2' 'libtheora' 'libpng' 'libtiff' 'zlib'
         'cgns')
depends_x86_64=('ospray')
makedepends=('cmake' 'mesa' 'gcc-fortran' 'ninja')
source=("https://www.paraview.org/files/v${pkgver:0:3}/ParaView-v${pkgver}.tar.gz")
sha512sums=('0915eac75a710736334fa9d436369a14546e2f90a1b55f9a0f7a96fedb94ced043d27576d2a179f275478be17e326cd3bee76f06266a776d586f6510722f3172')

prepare() {
  cd "${srcdir}/ParaView-v${pkgver}"

  #rm -rf "${srcdir}/build"
  mkdir -p "${srcdir}/build"
}

build() {
  cd "${srcdir}/build"

  # flags to enable system libs
  local VTK_USE_SYSTEM_LIB=""
  for lib in CGNS EXPAT FREETYPE GLEW HDF5 JPEG LIBXML2 OGGTHEORA PNG PROTOBUF TIFF ZLIB
  do
    VTK_USE_SYSTEM_LIB+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON "
  done

  if [ "${CARCH}" = 'x86_64' ]; then
    _arch_options='-DOSPRAY_INSTALL_DIR:PATH=/usr -DPARAVIEW_USE_OSPRAY:BOOL=ON'
  else
    _arch_options=''
  fi

  # VisitBridge bug: https://gitlab.kitware.com/paraview/paraview/issues/17456
  cmake \
    -DBUILD_DOCUMENTATION:BOOL=OFF \
    -DBUILD_EXAMPLES:BOOL=ON \
    -DBUILD_SHARED_LIBS:BOOL=ON \
    -DBUILD_TESTING:BOOL=OFF \
    -DCMAKE_BUILD_TYPE:STRING=Release \
    -DCMAKE_C_COMPILER:STRING=mpicc \
    -DCMAKE_CXX_COMPILER:STRING=mpicxx \
    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
    -DPARAVIEW_ENABLE_CGNS:BOOL=ON \
    -DPARAVIEW_ENABLE_FFMPEG:BOOL=ON \
    -DPARAVIEW_ENABLE_MATPLOTLIB:BOOL=ON \
    -DPARAVIEW_ENABLE_PYTHON:BOOL=ON \
    -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON \
    -DPARAVIEW_QT_VERSION:STRING=5 \
    -DPARAVIEW_USE_MPI:BOOL=ON \
    -DPARAVIEW_USE_VISITBRIDGE:BOOL=OFF \
    -DVISIT_BUILD_READER_CGNS:BOOL=ON \
    -DVTK_PYTHON_FULL_THREADSAFE:BOOL=ON \
    -DVTK_PYTHON_VERSION:STRING=3 \
    -DVTK_QT_VERSION:STRING=5 \
    -DVTK_RENDERING_BACKEND:STRING=OpenGL2 \
    -DVTK_SMP_IMPLEMENTATION_TYPE:STRING=OpenMP \
    -DVTK_USE_TK:BOOL=ON \
    ${VTK_USE_SYSTEM_LIB} \
    ${_arch_options} \
    -GNinja \
    ../ParaView-v${pkgver}

  ninja ${MAKEFLAGS}
}

package() {
  cd "${srcdir}/build"

  DESTDIR="${pkgdir}" ninja install

  #Install license
  install -Dm644 "${srcdir}/ParaView-v${pkgver}/License_v1.2.txt" "${pkgdir}/usr/share/licenses/paraview/LICENSE"

  # Remove IceT man pages to avoid conflicts
  rm -- "${pkgdir}/usr/share/man/man3/icet"*.3
}