diff options
-rw-r--r-- | .SRCINFO | 58 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 109 | ||||
-rw-r--r-- | gdal2.patch | 31 | ||||
-rw-r--r-- | hdf5.patch | 11 | ||||
-rw-r--r-- | mesa.patch | 11 | ||||
-rw-r--r-- | vtk-type.patch | 23 |
7 files changed, 247 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..69ad02700de5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,58 @@ +pkgbase = vtk-visit + pkgdesc = A software system for 3D computer graphics, image processing, and visualization (legacy version fo VisIt). + pkgver = 6.1.0 + pkgrel = 1 + url = http://www.vtk.org/ + arch = i686 + arch = x86_64 + license = BSD + makedepends = boost + makedepends = cmake + makedepends = java-environment + makedepends = doxygen + makedepends = gnuplot + makedepends = tk + makedepends = wget + makedepends = python2-matplotlib + makedepends = python2-twisted + makedepends = python2-mpi4py + makedepends = python2-autobahn + makedepends = unixodbc + makedepends = gdal + makedepends = openmpi + makedepends = mariadb + makedepends = glew + makedepends = gl2ps + makedepends = ffmpeg + makedepends = lesstif + makedepends = qtwebkit + makedepends = jsoncpp + depends = gcc-libs + optdepends = python2: python bindings + optdepends = java-runtime: java bindings + optdepends = tk: tcl bindings + optdepends = gnuplot: plotting tools + optdepends = graphviz: drawing tools + optdepends = python2-matplotlib: for Matplotlib rendering + optdepends = python2-twisted: for vtkWeb + optdepends = python2-autobahn: for vtkWeb + optdepends = openmpi: OpenMPI support + optdepends = python2-mpi4py: OpenMPI python support + optdepends = unixodbc + optdepends = glew + optdepends = gl2ps + optdepends = gdal + optdepends = mariadb + source = http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz + source = mesa.patch + source = hdf5.patch + source = vtk-type.patch + source = gdal2.patch + sha256sums = bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34 + sha256sums = 47fee3346c0d751ef58d1049c2c2160f741b3122058c0f0482ff6153c6c2f3f8 + sha256sums = d081f31463c1cab05e8e628550c89559236813af2b7511198e5768868ad601f0 + sha256sums = 32a2a771cc6b0aa8c98399fa0b0294e2a1f98c15a5d7ad9cccf2bc50c68da492 + sha256sums = 57ae622a7e281887f7948f4d5a53ff0e0301bbdf70594691dd74f20f14b6e882 + +pkgname = vtk-visit + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..6d3d3c73f0cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.gz +*.xz +/pkg +/src diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a20c3631e25f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,109 @@ +# Maintainer: eolianoe <eolianoe [at] gmail [DoT] com> +# Contributor: Ray Rashif <schiv@archlinux.org> +# Contributor: Andrzej Giniewicz <gginiu@gmail.com> +# Contributor: Thomas Dziedzic < gostrc at gmail > + +# Based on the PKGBUILD of vtk in community + +pkgname='vtk-visit' +_pkgname=vtk +_PKGNAME=VTK +pkgver=6.1.0 +pkgrel=1 +pkgdesc='A software system for 3D computer graphics, image processing, and visualization (legacy version fo VisIt).' +arch=('i686' 'x86_64') +url='http://www.vtk.org/' +license=('BSD') +depends=('gcc-libs') +makedepends=('boost' 'cmake' 'java-environment' 'doxygen' 'gnuplot' + 'tk' 'wget' + 'python2-matplotlib' 'python2-twisted' 'python2-mpi4py' 'python2-autobahn' + 'unixodbc' 'gdal' 'openmpi' 'mariadb' 'glew' 'gl2ps' + 'ffmpeg' 'lesstif' 'qtwebkit' 'jsoncpp') +optdepends=('python2: python bindings' + 'java-runtime: java bindings' + 'tk: tcl bindings' + 'gnuplot: plotting tools' + 'graphviz: drawing tools' + 'python2-matplotlib: for Matplotlib rendering' + 'python2-twisted: for vtkWeb' + 'python2-autobahn: for vtkWeb' + 'openmpi: OpenMPI support' + 'python2-mpi4py: OpenMPI python support' + 'unixodbc' + 'glew' + 'gl2ps' + 'gdal' + 'mariadb') +source=("http://www.vtk.org/files/release/${pkgver:0:3}/${_PKGNAME}-${pkgver}.tar.gz" + 'mesa.patch' 'hdf5.patch' 'vtk-type.patch' 'gdal2.patch') +sha256sums=('bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34' + '47fee3346c0d751ef58d1049c2c2160f741b3122058c0f0482ff6153c6c2f3f8' + 'd081f31463c1cab05e8e628550c89559236813af2b7511198e5768868ad601f0' + '32a2a771cc6b0aa8c98399fa0b0294e2a1f98c15a5d7ad9cccf2bc50c68da492' + '57ae622a7e281887f7948f4d5a53ff0e0301bbdf70594691dd74f20f14b6e882') + +prepare() { + cd "${srcdir}/${_PKGNAME}-${pkgver}" + + # fix compilation errors: + patch -Np1 -i "${srcdir}/mesa.patch" + patch -Np1 -i "${srcdir}/hdf5.patch" + patch -Np1 -i "${srcdir}/vtk-type.patch" + patch -Np1 -i "${srcdir}/gdal2.patch" + + # Use python2 + sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + -i $(find . -name '*.py') + + # Out of source build + cd "${srcdir}" + rm -rf -- build + mkdir -p build +} + +build() { + cd "${srcdir}/build" + + # To help cmake find java + export JAVA_HOME=/usr/lib/jvm/default + + # Flags to enable using system libs + local vtk_system_flags="" + for lib in AUTHOBAHN EXPAT FREETYPE GLEW GL2PS HDF5 JPEG JSONCPP LIBXML2 MPI4PY OGGTHEORA PNG SIX TIFF TWISTED ZLIB ZOPE; do + vtk_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON " + done + + cmake \ + -Wno-dev \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:FILEPATH=/opt/${_pkgname}-${pkgver} \ + -DPYTHON_EXECUTABLE:PATH=/usr/bin/python2 \ + -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 \ + -DPYTHON_LIBRARY:PATH=/usr/lib/libpython2.7.so \ + -DPYTHON_VERSION:STRING=2 \ + -DVTK_BUILD_ALL_MODULES:BOOL=ON \ + -DVTK_USE_FFMPEG_ENCODER:BOOL=ON \ + ${vtk_system_flags} \ + -DVTK_QT_VERSION:STRING=4 \ + -DVTK_WRAP_JAVA:BOOL=ON \ + -DVTK_WRAP_PYTHON:BOOL=ON \ + -DVTK_WRAP_TCL:BOOL=ON \ + "${srcdir}/${_PKGNAME}-${pkgver}" + + make +} + +package() { + cd "${srcdir}/build" + + make DESTDIR="${pkgdir}" install + + # Install license + install -dv "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 "${srcdir}/${_PKGNAME}-$pkgver/Copyright.txt"\ + "${pkgdir}/usr/share/licenses/${pkgname}" +} diff --git a/gdal2.patch b/gdal2.patch new file mode 100644 index 000000000000..36c33ee14caf --- /dev/null +++ b/gdal2.patch @@ -0,0 +1,31 @@ +diff --git a/IO/GDAL/vtkGDALVectorReader.cxx b/IO/GDAL/vtkGDALVectorReader.cxx +index 86854a0..a0e234a 100644 +--- a/IO/GDAL/vtkGDALVectorReader.cxx ++++ b/IO/GDAL/vtkGDALVectorReader.cxx +@@ -44,7 +44,7 @@ class vtkGDALVectorReader::Internal + public: + Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds ) + { +- this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver ); ++ this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL ); + if ( ! this->Source ) + { + this->LastError = CPLGetLastErrorMsg(); +@@ -61,7 +61,7 @@ public: + { + if ( this->Source ) + { +- OGRDataSource::DestroyDataSource( this->Source ); ++ GDALClose( (GDALDatasetH) this->Source ); + } + } + +@@ -304,7 +304,7 @@ public: + return nCells; + } + +- OGRDataSource* Source; ++ GDALDataset* Source; + OGRSFDriver* Driver; + const char* LastError; + int LayerIdx; diff --git a/hdf5.patch b/hdf5.patch new file mode 100644 index 000000000000..e9e1a3f5b9de --- /dev/null +++ b/hdf5.patch @@ -0,0 +1,11 @@ +--- a/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt.orig 2014-11-24 19:29:00.084619157 +0100 ++++ b/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt 2014-11-24 19:29:22.824443117 +0100 +@@ -233,7 +233,7 @@ + if (NOT VTK_USE_SYSTEM_HDF5) + # using VTK's HDF5, we always build that with HL support. + set (USE_NETCDF4 ON) +-elseif(HDF5_HL_LIBRARY OR HDF5_hdf5_hl_LIBRARY) ++elseif(HDF5_HL_LIBRARY OR HDF5_hdf5_hl_LIBRARY OR HDF5_hdf5_hl_LIBRARY_RELEASE) + set (USE_NETCDF4 ON) + else() + message(STATUS "Disabling NETCDF4 support since HDF5_HL or HDF5_hdf5_hl is missing.") diff --git a/mesa.patch b/mesa.patch new file mode 100644 index 000000000000..0d9c565065ce --- /dev/null +++ b/mesa.patch @@ -0,0 +1,11 @@ +--- a/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx.orig 2014-11-23 22:16:50.000000000 +0100 ++++ b/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx 2014-11-23 22:16:59.000000000 +0100 +@@ -27,7 +27,7 @@ + + // define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by + // the system +-//#define GLX_GLXEXT_LEGACY ++#define GLX_GLXEXT_LEGACY + #include "GL/glx.h" + + #include "vtkgl.h" diff --git a/vtk-type.patch b/vtk-type.patch new file mode 100644 index 000000000000..fc891e99e3ef --- /dev/null +++ b/vtk-type.patch @@ -0,0 +1,23 @@ +diff -up VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx +--- VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx.type 2014-01-22 08:55:41.000000000 -0700 ++++ VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx 2015-01-08 15:00:40.492667074 -0700 +@@ -1186,7 +1186,7 @@ bool vtkFreeTypeTools::CalculateBounding + if (bitmap) + { + metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent); +- metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)), ++ metaData.descent = std::min(-(static_cast<int>(bitmap->rows) - (bitmapGlyph->top - 1)), + metaData.descent); + } + ++heightString; +@@ -1951,8 +1951,8 @@ void vtkFreeTypeTools::GetLineMetrics(T + if (bitmap) + { + bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left); +- bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width); +- bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows); ++ bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast<int>(bitmap->width)); ++ bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast<int>(bitmap->rows)); + bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1); + } + else |