diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/vtk/PKGBUILD | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/vtk/PKGBUILD')
-rw-r--r-- | community/vtk/PKGBUILD | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/community/vtk/PKGBUILD b/community/vtk/PKGBUILD new file mode 100644 index 000000000..bcfecb3e8 --- /dev/null +++ b/community/vtk/PKGBUILD @@ -0,0 +1,118 @@ +# $Id: PKGBUILD 94911 2013-08-01 06:55:45Z bpiotrowski $ +# Maintainer: Andrzej Giniewicz <gginiu@gmail.com> +# Contributor: Thomas Dziedzic < gostrc at gmail > +# Contributor: Christofer Bertonha <christoferbertonha at gmail dot com> +# Contributor: leepesjee <lpeschier at xs4all dot nl> +# Contributor: Olivier Medoc +# Contributor: ignotus +# Contributor: Fabian Moser +# Contributor: djscholl + +# Qt5 support status: http://vtk.org/Bug/view.php?id=12945 + +pkgname=vtk +pkgver=5.10.1 +pkgrel=9 +pkgdesc='A software system for 3D computer graphics, image processing, and visualization.' +arch=('i686' 'x86_64') +url='http://www.vtk.org/' +license=('BSD') +depends=('libjpeg-turbo' 'boost' 'ffmpeg' 'qt4' 'lesstif' 'mariadb' 'hdf5' 'libgl') +makedepends=('cmake' 'java-environment' 'doxygen' 'gnuplot' 'mesa-libgl' 'python2' 'tk') +optdepends=('python2: python bindings' + 'java-runtime: java bindings' + 'tk: tcl bindings' + 'gnuplot: plotting tools' + 'graphviz: drawing tools') +source=("http://www.vtk.org/files/release/${pkgver:0:4}/vtk-${pkgver}.tar.gz" + "http://www.vtk.org/files/release/${pkgver:0:4}/vtkdata-${pkgver}.tar.gz" + ffmpeg-0.8.diff ffmpeg-0.11.diff ffmpeg-2.0.diff tcl-8.6.diff python-destdir.diff) +md5sums=('264b0052e65bd6571a84727113508789' + 'b6355063264cd56bcd1396c92f6ca59a' + 'e992321c9d1def6034d0fa6607b40c5a' + '81922ea61989e5591135f233a0400694' + '4ff5668957336709dcd096fbac102558' + 'a804a9f034e24ef1a8b28542c15ce1a1' + 'f7aba715bcc10de93a6ecf1cd6b0c560') + +build() { + cd "${srcdir}"/VTK$pkgver + + # fix compilation errors: + patch -Np1 -i "${srcdir}/ffmpeg-0.8.diff" + patch -Np1 -i "${srcdir}/ffmpeg-0.11.diff" + patch -Np1 -i "${srcdir}/ffmpeg-2.0.diff" + patch -Np1 -i "${srcdir}/tcl-8.6.diff" + patch -Np1 -i "${srcdir}/python-destdir.diff" + + cd "${srcdir}" + + rm -rf build + mkdir build + cd build + + # flags to enable using system libs + local cmake_system_flags="" + for lib in HDF5 EXPAT FREETYPE JPEG PNG TIFF ZLIB LIBXML2 OGGTHEORA; do + cmake_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON " + done + + # flags to use python2 instead of python which is 3.x.x on archlinux + local cmake_system_python_flags="-DPYTHON_EXECUTABLE:PATH=/usr/bin/python2 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 -DPYTHON_LIBRARY:PATH=/usr/lib/libpython2.7.so" + + cmake \ + -Wno-dev \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \ + -DVTK_DATA_ROOT:FILEPATH=${srcdir}/VTKData$pkgver \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DDOCUMENTATION_HTML_HELP:BOOL=ON \ + -DDOCUMENTATION_HTML_TARZ:BOOL=ON \ + -DBUILD_EXAMPLES:BOOL=ON \ + -DVTK_USE_CHEMISTRY:BOOL=ON \ + -DVTK_USE_HYBRID:BOOL=ON \ + -DVTK_USE_PARALLEL:BOOL=ON \ + -DVTK_USE_PATENTED:BOOL=ON \ + -DVTK_USE_BOOST:BOOL=ON \ + -DVTK_USE_INFOVIS:BOOL=ON \ + -DVTK_USE_GL2PS:BOOL=ON \ + -DVTK_USE_MYSQL:BOOL=ON \ + -DVTK_USE_FFMPEG_ENCODER:BOOL=ON \ + -DVTK_USE_TEXT_ANALYSIS:BOOL=ON \ + -DVTK_WRAP_JAVA:BOOL=ON \ + -DVTK_WRAP_PYTHON:BOOL=ON \ + -DVTK_WRAP_TCL:BOOL=ON \ + -DVTK_USE_QT:BOOL=ON \ + -DVTK_INSTALL_QT_PLUGIN_DIR:STRING="/usr/lib/qt4/plugins" \ + -DVTK_USE_GUISUPPORT:BOOL=ON \ + -DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \ + ${cmake_system_flags} \ + ${cmake_system_python_flags} \ + "${srcdir}/VTK$pkgver" + + make +} + +package() { + cd "${srcdir}/build" + + make DESTDIR="${pkgdir}" install + + # Move the vtk.jar to the arch-specific location + install -dv "${pkgdir}/usr/share/java/vtk" + mv -v "${pkgdir}/usr/lib/vtk-${pkgver:0:4}/java/vtk.jar" \ + "${pkgdir}/usr/share/java/vtk" + rm -rf "${pkgdir}/usr/lib/vtk-${pkgver:0:4}/java" + + # Install license + install -dv "${pkgdir}/usr/share/licenses/vtk" + install -m644 "${srcdir}/VTK$pkgver/Copyright.txt" \ + "${pkgdir}/usr/share/licenses/vtk" + + # Put an entry in /etc/ld.so.conf.d + install -dv "${pkgdir}/etc/ld.so.conf.d" + echo "/usr/lib/vtk-${pkgver:0:4}" > "${pkgdir}/etc/ld.so.conf.d/vtk.conf" + + sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find "${pkgdir}" -name '*.py') +} |