summaryrefslogtreecommitdiff
path: root/community/vtk/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/vtk/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/vtk/PKGBUILD')
-rw-r--r--community/vtk/PKGBUILD101
1 files changed, 101 insertions, 0 deletions
diff --git a/community/vtk/PKGBUILD b/community/vtk/PKGBUILD
new file mode 100644
index 000000000..b09bf289f
--- /dev/null
+++ b/community/vtk/PKGBUILD
@@ -0,0 +1,101 @@
+# Maintainer: Thomas Dziedzic < gostrc at gmail >
+# Contributor: leepesjee <lpeschier at xs4all dot nl>
+# Contributor: Olivier Medoc
+# Contributor: ignotus
+# Contributor: Fabian Moser
+# Contributor: djscholl
+
+pkgname=vtk
+pkgver=5.6.1
+pkgrel=5
+pkgdesc='A software system for 3D computer graphics, image processing, and visualization which supports a wide variety of visualization algorithms and advanced modeling techniques.'
+arch=('i686' 'x86_64')
+url='http://www.vtk.org'
+license=('BSD')
+depends=('libpng' 'libtiff' 'freetype2' 'python2' 'java-runtime' 'tk' 'boost' 'ffmpeg' 'qt' 'lesstif')
+optdepends=('gnuplot: plotting tools'
+ 'graphviz: drawing tools')
+makedepends=('cmake' 'java-environment' 'doxygen' 'gnuplot' 'mesa')
+source=("http://www.vtk.org/files/release/${pkgver:0:3}/${pkgname}-${pkgver}.tar.gz"
+ "http://www.vtk.org/files/release/${pkgver:0:3}/vtkdata-${pkgver}.tar.gz")
+md5sums=('b80a76435207c5d0f74dfcab15b75181'
+ '67263bd972f923d39a60f01104368779')
+
+build() {
+ cd VTK
+
+ for _FILE in `grep -Rl "png_set_gray_1_2_4_to_8" *`
+ do
+ sed -i 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' ${_FILE}
+ done
+
+ cd ${srcdir}
+
+ rm -rf build
+ mkdir build
+ cd build
+
+ cmake \
+ -Wno-dev \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
+ -DVTK_DATA_ROOT:FILEPATH=${srcdir}/VTKData \
+ -DBUILD_DOCUMENTATION:BOOL=ON \
+ -DDOCUMENTATION_HTML_HELP:BOOL=ON \
+ -DDOCUMENTATION_HTML_TARZ:BOOL=ON \
+ -DBUILD_EXAMPLES:BOOL=ON \
+ -DVTK_USE_HYBRID:BOOL=ON \
+ -DVTK_USE_PARALLEL:BOOL=ON \
+ -DVTK_USE_PATENTED:BOOL=ON \
+ -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
+ -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_LIBXML2:BOOL=ON \
+ -DVTK_USE_BOOST:BOOL=ON \
+ -DVTK_USE_INFOVIS:BOOL=ON \
+ -DVTK_USE_GL2PS: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_PYTHON_SETUP_ARGS:STRING="--prefix=${pkgdir}/usr" \
+ -DVTK_USE_QT:BOOL=ON \
+ -DDESIRED_QT_VERSION:STRING=4 \
+ -DVTK_USE_GUISUPPORT:BOOL=ON \
+ -DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \
+ -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
+ -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
+ ${srcdir}/VTK
+
+ # j1 is used because of a bug in building with multiple threads
+ make -j1
+}
+
+package() {
+ cd build
+
+ make DESTDIR=${pkgdir} install
+
+ # Move the vtk.jar to the arch-specific location
+ install -dv ${pkgdir}/usr/share/java/${pkgname}
+ mv -v ${pkgdir}/usr/lib/${pkgname}-${pkgver:0:3}/java/${pkgname}.jar \
+ ${pkgdir}/usr/share/java/${pkgname}
+
+ # Move the qt-designer plugin to the appropriate location
+ install -dv ${pkgdir}/usr/lib/qt
+ mv -v ${pkgdir}/usr/plugins \
+ ${pkgdir}/usr/lib/qt
+
+ # Install license
+ install -dv ${pkgdir}/usr/share/licenses/${pkgname}
+ install -m644 ${srcdir}/VTK/Copyright.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}
+
+ # Put an entry in /etc/ld.so.conf.d
+ install -dv ${pkgdir}/etc/ld.so.conf.d
+ echo "/usr/lib/${pkgname}-${pkgver:0:3}" > ${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf
+}