summaryrefslogtreecommitdiff
path: root/community/paraview/PKGBUILD
blob: da943848f91775894e65373c31687b159c281ada (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
# $Id: PKGBUILD 58527 2011-11-13 15:58:19Z andrea $
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Michele Mocciola <mickele>
# Contributor: Simon Zilliken <simon____AT____zilliken____DOT____name>

pkgname=paraview
pkgver=3.10.1
pkgrel=4
pkgdesc='Parallel Visualization Application using VTK'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.paraview.org'
license=('custom')
depends=('qt' 'python2' 'libgl' 'libxml2' 'unixodbc' 'postgresql-libs' 'libxt' 'libmysqlclient' 'mesa' 'openmpi') #'hdf5'
makedepends=('cmake' 'desktop-file-utils')
source=("http://paraview.org/files/v${pkgver:0:4}/ParaView-${pkgver}.tar.gz"
        'paraview.png'
        'paraview.desktop'
        'fixkernelversioncheck.diff')
md5sums=('d8a9d4a997a720589ffd57568bcdd449'
         'db623002bc71a257ddfdd0c9c7b14c3f'
         '4e4b7172ed18171c37446fd7c4f1e8f5'
         '9e137af23701f76fc727222ebac23389')

build() {
  cd ParaView-${pkgver}

  # patch vtk to fix http://www.vtk.org/Bug/view.php?id=12568
  # remove next pkgver bump
  cd VTK
  patch -Np1 -i ${srcdir}/fixkernelversioncheck.diff
  cd ..

  sed -i '20 i#include <stddef.h>' VTK/Utilities/vtkmetaio/metaUtils.cxx
  sed -i 's/stddef.h/cstddef/' VTK/Wrapping/Python/vtkPythonUtil.cxx
  sed -i '36 i#include <vtksys/cstddef>' VTK/Wrapping/Python/PyVTKObject.cxx

  # Paraview wants to be built out of source
  mkdir -p build
  cd build

  # use -DPARAVIEW_INSTALL_THIRD_PARTY_LIBRARIES:BOOL=OFF \ to fix make install error: http://www.cmake.org/pipermail/paraview/2011-February/020268.html
  cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_USE_PTHREADS:BOOL=ON \
    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
    -DCMAKE_SKIP_RPATH:BOOL=YES \
    -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
    -DCMAKE_COLOR_MAKEFILE:BOOL=TRUE \
    -DBUILD_SHARED_LIBS:BOOL=ON \
    -DBUILD_DOCUMENTATION:BOOL=OFF \
    -DBUILD_EXAMPLES:BOOL=OFF \
    -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
    -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
    -DVTK_USE_SYSTEM_PNG:BOOL=ON \
    -DVTK_USE_SYSTEM_TIFF:BOOL=ON \
    -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
    -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
    -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \
    -DVTK_USE_BOOST:BOOL=OFF \
    -DVTK_USE_OFFSCREEN=TRUE \
    -DPARAVIEW_USE_SYSTEM_HDF5:BOOL=ON \
    -DPARAVIEW_USE_MPI:BOOL=ON \
    -DPARAVIEW_ENABLE_PYTHON:BOOL=ON \
    -DPARAVIEW_BUILD_QT_GUI:BOOL=ON \
    -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
    -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
    -DPARAVIEW_INSTALL_THIRD_PARTY_LIBRARIES:BOOL=OFF \
    ..

  make
}

package() {
  cd ParaView-${pkgver}/build

  make DESTDIR=${pkgdir} install

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

  # Install desktop shortcuts
  install -Dm644 ${srcdir}/paraview.png ${pkgdir}/usr/share/pixmaps/paraview.png
  desktop-file-install --dir=${pkgdir}/usr/share/applications ${srcdir}/paraview.desktop

  # Removes VTK plugin for designer - if you need, you can install vtk
  #rm -rf ${pkgdir}/opt/paraview/plugins
}