updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / vtk-python / PKGBUILD
blobe39b9831d5b531cda98dde91bf238af6e0f59b70
1 # Maintainer: Christofer Bertonha <chritoferbertonha@gmail.com>
3 pkgname=vtk-python
4 mainver=5.6
5 pkgver=${mainver}.1
6 pkgrel=3
7 pkgdesc='A software system for 3D computer graphics, image processing, and visualization which supports a wide variety of visualization algorithms and advanced modeling techniques.'
8 arch=('i686' 'x86_64')
9 url='http://www.vtk.org/'
10 license=('BSD')
11 depends=('python2' 'zlib' 'qt' 'libpng' 'libtiff' 'libxml2' 'expat' 'nvidia-cg-toolkit' 'boost-libs' 'libjpeg-turbo')
12 makedepends=('cmake' 'python2' 'zlib' 'qt' 'libpng' 'libtiff' 'libxml2' 'expat' 'nvidia-cg-toolkit' 'boost' 'libjpeg-turbo')
13 provides=(vtk)
14 conflicts=(vtk)
15 source=("http://www.vtk.org/files/release/${mainver}/vtk-${pkgver}.tar.gz")
16 md5sums=('b80a76435207c5d0f74dfcab15b75181')
18 build() {
19   cd ${srcdir}
21   sed \
22     -e '1i#include <cstddef>' \
23     -i VTK/Common/vtkPythonUtil.cxx
25  sed \
26     -e 's#ptrdiff_t#std::ptrdiff_t#g' \
27     -i VTK/Utilities/vtkmetaio/metaUtils.cxx
29  sed \
30     -e 's#png_set_gray_1_2_4_to_8#png_set_expand_gray_1_2_4_to_8#g' \
31     -i VTK/IO/vtkPNGReader.cxx
33   mkdir -p build && cd build
35   cmake \
36     -DCMAKE_BUILD_TYPE:STRING=Release \
37     -DBUILD_TESTING:BOOL=OFF \
38     -DBUILD_EXAMPLES:BOOL=OFF \
39     -DBUILD_SHARED_LIBS:BOOL=ON \
40     -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
41     -DVTK_USE_CG_SHADERS:BOOL=ON\
42     -DVTK_USE_BOOST:BOOL=ON \
43     -DVTK_USE_QT:BOOL=ON \
44     -DVTK_USE_TK:BOOL=OFF \
45     -DVTK_USE_QVTK_QTOPENGL:BOOL=ON \
46     -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
47     -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
48     -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
49     -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \
50     -DVTK_USE_SYSTEM_PNG:BOOL=ON \
51     -DVTK_USE_SYSTEM_TIFF:BOOL=ON \
52     -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
53     -DVTK_WRAP_PYTHON:BOOL=ON \
54     -DPYTHON_INCLUDE_DIR:FILEPATH=/usr/include/python2.7 \
55     -DPYTHON_LIBRARY:FILEPATH=/usr/lib/libpython2.7.so \
56     -DVTK_PYTHON_SETUP_ARGS:STRING=--root=${pkgdir} \
57     ../VTK
59   make
62 package() {
63   cd ${srcdir}/build
65   make DESTDIR=${pkgdir} install
66   
67   ln -s ${pkgdir}/usr/lib/vtk-${mainver}/*.so* ${pkgdir}/usr/lib/
69   # install BSD license
70   install -d ${pkgdir}/usr/share/licenses/vtk
71   install -m 644 ../VTK/Copyright.txt \
72     ${pkgdir}/usr/share/licenses/vtk