summaryrefslogtreecommitdiff
path: root/community/vtk
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/vtk
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/vtk')
-rw-r--r--community/vtk/PKGBUILD116
-rw-r--r--community/vtk/ffmpeg-0.11.diff46
-rw-r--r--community/vtk/ffmpeg-0.8.diff66
-rw-r--r--community/vtk/python-destdir.diff11
-rw-r--r--community/vtk/tcl-8.6.diff13
5 files changed, 252 insertions, 0 deletions
diff --git a/community/vtk/PKGBUILD b/community/vtk/PKGBUILD
new file mode 100644
index 000000000..46db8282a
--- /dev/null
+++ b/community/vtk/PKGBUILD
@@ -0,0 +1,116 @@
+# $Id: PKGBUILD 90101 2013-05-06 19:39:56Z foutrelis $
+# 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=8
+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 tcl-8.6.diff python-destdir.diff)
+md5sums=('264b0052e65bd6571a84727113508789'
+ 'b6355063264cd56bcd1396c92f6ca59a'
+ 'e992321c9d1def6034d0fa6607b40c5a'
+ '81922ea61989e5591135f233a0400694'
+ '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}/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')
+}
diff --git a/community/vtk/ffmpeg-0.11.diff b/community/vtk/ffmpeg-0.11.diff
new file mode 100644
index 000000000..af4e230cc
--- /dev/null
+++ b/community/vtk/ffmpeg-0.11.diff
@@ -0,0 +1,46 @@
+--- VTK/IO/vtkFFMPEGWriter.cxx.orig 2012-07-08 13:40:55.000000000 +0200
++++ VTK/IO/vtkFFMPEGWriter.cxx 2012-07-08 13:59:37.000000000 +0200
+@@ -192,13 +192,6 @@
+ c->bit_rate_tolerance = this->Writer->GetBitRateTolerance();
+ }
+
+- //apply the chosen parameters
+- if (av_set_parameters(this->avFormatContext, NULL) < 0)
+- {
+- vtkGenericWarningMacro (<< "Invalid output format parameters." );
+- return 0;
+- }
+-
+ //manufacture a codec with the chosen parameters
+ AVCodec *codec = avcodec_find_encoder(c->codec_id);
+ if (!codec)
+@@ -259,14 +252,14 @@
+
+
+ //Finally, open the file and start it off.
+- if (url_fopen(&this->avFormatContext->pb, this->avFormatContext->filename, URL_WRONLY) < 0)
++ if (avio_open(&this->avFormatContext->pb, this->avFormatContext->filename, AVIO_FLAG_WRITE) < 0)
+ {
+ vtkGenericWarningMacro (<< "Could not open " << this->Writer->GetFileName() << "." );
+ return 0;
+ }
+ this->openedFile = 1;
+
+- av_write_header(this->avFormatContext);
++ avformat_write_header(this->avFormatContext, NULL);
+ return 1;
+ }
+
+@@ -388,11 +381,7 @@
+ if (this->openedFile)
+ {
+ av_write_trailer(this->avFormatContext);
+-#ifdef VTK_FFMPEG_OLD_URL_FCLOSE
+- url_fclose(&this->avFormatContext->pb);
+-#else
+- url_fclose(this->avFormatContext->pb);
+-#endif
++ avio_close(this->avFormatContext->pb);
+ this->openedFile = 0;
+ }
+
diff --git a/community/vtk/ffmpeg-0.8.diff b/community/vtk/ffmpeg-0.8.diff
new file mode 100644
index 000000000..523919d6f
--- /dev/null
+++ b/community/vtk/ffmpeg-0.8.diff
@@ -0,0 +1,66 @@
+Description: Upstream changes introduced in version 5.6.1-6.1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ vtk (5.6.1-6.1) unstable; urgency=low
+ .
+ [ Michael Schutte ]
+ * Non-maintainer upload.
+ * Remove absolute paths to required libraries from
+ /usr/lib/vtk-5.6/VTKLibraryDepends.cmake after building, closes:
+ #506992. Due to the multiarch transition, the original behavior
+ frequently causes reverse build-deps to FTBFS. This change should
+ probably be reverted once all required libraries are multiarched.
+ .
+ [ Steve M. Robbins ]
+ * Override lintian diagnostic about embedded libraries ftgl and sqlite.
+ * IO/vtkFFMPEGWriter.cxx: Applied fix from #638246 to build with libav
+ 0.7.
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Steve M. Robbins <smr@debian.org>
+Bug-Debian: http://bugs.debian.org/506992
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- vtk-5.6.1.orig/IO/vtkFFMPEGWriter.cxx
++++ vtk-5.6.1/IO/vtkFFMPEGWriter.cxx
+@@ -123,7 +123,7 @@ int vtkFFMPEGWriterInternal::Start()
+ }
+
+ //choose avi media file format
+- this->avOutputFormat = guess_format("avi", NULL, NULL);
++ this->avOutputFormat = av_guess_format("avi", NULL, NULL);
+ if (!this->avOutputFormat)
+ {
+ vtkGenericWarningMacro (<< "Could not open the avi media file format.");
+@@ -150,7 +150,7 @@ int vtkFFMPEGWriterInternal::Start()
+ //Set up the codec.
+ AVCodecContext *c = this->avStream->codec;
+ c->codec_id = (CodecID)this->avOutputFormat->video_codec;
+- c->codec_type = CODEC_TYPE_VIDEO;
++ c->codec_type = AVMEDIA_TYPE_VIDEO;
+ c->width = this->Dim[0];
+ c->height = this->Dim[1];
+ c->pix_fmt = PIX_FMT_YUVJ420P;
+@@ -329,7 +329,7 @@ int vtkFFMPEGWriterInternal::Write(vtkIm
+ pkt.stream_index = this->avStream->index;
+ if (cc->coded_frame->key_frame) //treat keyframes well
+ {
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ }
+ pkt.duration = 0; //presentation duration in time_base units or 0 if NA
+ pkt.pos = -1; //byte position in stream or -1 if NA
diff --git a/community/vtk/python-destdir.diff b/community/vtk/python-destdir.diff
new file mode 100644
index 000000000..9b1504b8b
--- /dev/null
+++ b/community/vtk/python-destdir.diff
@@ -0,0 +1,11 @@
+--- VTK/Wrapping/Python/CMakeLists.txt.orig 2013-02-02 12:56:08.067142089 +0100
++++ VTK/Wrapping/Python/CMakeLists.txt 2013-02-02 12:58:16.182794679 +0100
+@@ -558,7 +558,7 @@
+
+ # Create default python setup arguments if they are not set.
+ IF(NOT DEFINED VTK_PYTHON_SETUP_ARGS)
+- SET(VTK_PYTHON_SETUP_ARGS "--prefix=\"${DOLLAR}{CMAKE_INSTALL_PREFIX}\""
++ SET(VTK_PYTHON_SETUP_ARGS "--root=\"${DOLLAR}DESTDIR\" --prefix=\"${DOLLAR}{CMAKE_INSTALL_PREFIX}\""
+ CACHE STRING "Arguments passed to \"python setup.py install ...\" during installation.")
+ MARK_AS_ADVANCED(VTK_PYTHON_SETUP_ARGS)
+ ENDIF(NOT DEFINED VTK_PYTHON_SETUP_ARGS)
diff --git a/community/vtk/tcl-8.6.diff b/community/vtk/tcl-8.6.diff
new file mode 100644
index 000000000..6152a8fa7
--- /dev/null
+++ b/community/vtk/tcl-8.6.diff
@@ -0,0 +1,13 @@
+--- VTK5.10.1/Common/vtkTcl.h 2012-10-15 22:33:21.000000000 +0200
++++ VTK5.10.1/Common/vtkTcl.h.new 2012-12-22 12:27:56.176482722 +0100
+@@ -17,6 +17,10 @@
+
+ #include "vtkConfigure.h"
+
++// see http://paraview.org/Bug/view.php?id=11810
++#define USE_INTERP_RESULT
++#define USE_INTERP_ERRORLINE
++
+ #ifdef VTK_TCL_TK_STATIC
+ # ifndef STATIC_BUILD
+ # define STATIC_BUILD