vtk: Update to 8.2.0. Switch to python3 and build more modules

This commit is contained in:
Alexey Pavlov
2019-05-23 07:52:29 +03:00
parent c173bfc418
commit 08315cafe4
3 changed files with 100 additions and 18 deletions

View File

@@ -0,0 +1,13 @@
--- VTK-8.2.0/io/Movie/CMakeLists.txt.orig 2019-05-22 12:35:55.497788800 +0300
+++ VTK-8.2.0/io/Movie/CMakeLists.txt 2019-05-22 12:38:27.387002000 +0300
@@ -30,6 +30,10 @@
vtk_module_library(vtkIOMovie ${Module_SRCS})
+if (VTK_HAS_OGGTHEORA_SUPPORT)
+ vtk_module_link_libraries(vtkIOMovie LINK_PRIVATE ${OGG_LIBRARY})
+endif()
+
if(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
vtk_module_link_libraries(vtkIOMovie LINK_PRIVATE vfw32)
endif()

View File

@@ -0,0 +1,64 @@
--- VTK-8.2.0/Utilities/Python/CMakeLists.txt.orig 2019-05-22 15:09:47.607021700 +0300
+++ VTK-8.2.0/Utilities/Python/CMakeLists.txt 2019-05-22 15:10:29.029079800 +0300
@@ -28,7 +28,7 @@
# Export location of python module dirs in install and build tree for every vtkpython module to use
# As long as those modules depend on vtkpython, they can retrieve and use these
if(NOT VTK_PYTHON_SITE_PACKAGES_SUFFIX)
- if(WIN32 AND NOT CYGWIN)
+ if(MSVC)
set(VTK_PYTHON_SITE_PACKAGES_SUFFIX "Lib/site-packages")
else()
set(VTK_PYTHON_SITE_PACKAGES_SUFFIX
@@ -52,7 +52,7 @@
endif()
if(NOT DEFINED VTK_INSTALL_PYTHON_MODULES_DIR)
- if(WIN32 AND NOT CYGWIN)
+ if(MSVC)
set(VTK_INSTALL_PYTHON_MODULES_DIR
"${VTK_INSTALL_RUNTIME_DIR}/${VTK_PYTHON_SITE_PACKAGES_SUFFIX}"
CACHE INTERNAL "Directory where python modules will be installed")
--- VTK-8.2.0/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py.orig 2019-05-22 15:14:18.614402100 +0300
+++ VTK-8.2.0/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py 2019-05-22 15:15:06.457469200 +0300
@@ -16,6 +16,7 @@
import string
import sys
import os
+from sysconfig import _POSIX_BUILD
def get_install_path(command, *args):
"""Return the module install path, given the arguments that were
@@ -84,7 +85,7 @@
platlib = home+'/lib/python'
scripts = home+'/bin'
data = home
- elif os.name == 'posix':
+ elif os.name == 'posix' or _POSIX_BUILD:
ver = sys.version[0:3]
purelib = prefix+'/lib/python'+ver+'/site-packages'
platlib = exec_prefix+'/lib/python'+ver+'/site-packages'
--- VTK-8.2.0/CMake/FindPythonLibs.cmake.orig 2019-05-22 15:23:02.502137600 +0300
+++ VTK-8.2.0/CMake/FindPythonLibs.cmake 2019-05-22 15:24:36.966270100 +0300
@@ -32,7 +32,7 @@
# Use the executable's path as a hint
set(_Python_LIBRARY_PATH_HINT)
if(PYTHON_EXECUTABLE)
- if(WIN32)
+ if(MSVC)
get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH)
if(_Python_PREFIX)
set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/libs)
@@ -70,11 +70,11 @@
# the user supplied additional versions to the front.
set(_Python_VERSIONS
${Python_ADDITIONAL_VERSIONS} ${_PythonInterp_VERSION}
- 2.7 2.6 2.5 3.6 3.5 3.4 3.3 3.2)
+ 2.7 2.6 2.5 3.7 3.6 3.5 3.4 3.3 3.2)
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
- if(WIN32)
+ if(MSVC)
find_library(PYTHON_DEBUG_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
HINTS ${_Python_LIBRARY_PATH_HINT}

View File

@@ -4,17 +4,19 @@
_realname=vtk
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=8.1.2
pkgver=8.2.0
pkgrel=1
pkgdesc="A software system for 3D computer graphics, image processing and visualization (mingw-w64)"
arch=('any')
url="https://www.vtk.org/"
license=("BSD")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-double-conversion"
"${MINGW_PACKAGE_PREFIX}-expat"
"${MINGW_PACKAGE_PREFIX}-ffmpeg"
"${MINGW_PACKAGE_PREFIX}-fontconfig"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-gdal"
"${MINGW_PACKAGE_PREFIX}-hdf5"
"${MINGW_PACKAGE_PREFIX}-intel-tbb"
"${MINGW_PACKAGE_PREFIX}-jsoncpp"
@@ -26,6 +28,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-libtiff"
"${MINGW_PACKAGE_PREFIX}-libxml2"
"${MINGW_PACKAGE_PREFIX}-lz4"
"${MINGW_PACKAGE_PREFIX}-pugixml"
"${MINGW_PACKAGE_PREFIX}-qt5"
"${MINGW_PACKAGE_PREFIX}-zlib")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
@@ -33,39 +36,39 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-libmariadbclient"
"${MINGW_PACKAGE_PREFIX}-postgresql"
"${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-tk")
optdepends=("${MINGW_PACKAGE_PREFIX}-boost: InfovisBoost and InfovisBoostGraphAlgorithms modules"
"${MINGW_PACKAGE_PREFIX}-libmariadbclient: interface to MariaDB"
"${MINGW_PACKAGE_PREFIX}-postgresql: interface to PostgreSQL"
"${MINGW_PACKAGE_PREFIX}-python2: Python bindings"
"${MINGW_PACKAGE_PREFIX}-python2-matplotlib: Matplotlib renderer"
"${MINGW_PACKAGE_PREFIX}-python3: Python bindings"
"${MINGW_PACKAGE_PREFIX}-python3-matplotlib: Matplotlib renderer"
"${MINGW_PACKAGE_PREFIX}-tk: TCL bindings, Python Tk widgets")
source=(https://www.vtk.org/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz
"001-vtk-mingw-w64.patch"
"002-libharu-linking.patch"
"003-post-tcl-world.patch"
"004-fix-linking-rendering-tk.patch"
"005-remove-bogus-stdint-check.patch"
"006-win7-defines-guard.patch")
sha256sums=('0995fb36857dd76ccfb8bb07350c214d9f9099e80b1e66b4a8909311f24ff0db'
"006-win7-defines-guard.patch"
"007-fix-linking-movie.patch"
"008-fix-python-modules-path.patch")
sha256sums=('34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb'
'db3163012fc7d90f6ffd8300a7a306a609e7c69a88a1dcfb9cb5b5df4391e3ad'
'5b0b82f3219a2a7a3d554b24fecbe59c516abfebd0d354e6288b62f9b0e2d30e'
'a39551b84d52ba65a1bbf7c316bb35251da7ffe4bba8f970728d02b8bbafd735'
'7f428a9c15b2dfc23fff2a19a11c48a628c9b52f82ec0d1dca37d0a5cffc9aef'
'769e28e106e612671433eb2f84ab6c0c9ef676109d690f6fe330641631c1fd2b'
'087d570104d2ae7f00437897e88225a1eb904b125e3a27bb9392ddf8ef068f6c')
'087d570104d2ae7f00437897e88225a1eb904b125e3a27bb9392ddf8ef068f6c'
'ec39407b6174c9b1326389b4badf1c0c377d74a6dd2c53caf983613fafe43c81'
'030861e9c134d1badc93307256063c052efd46d5e8c4dff834a9c0af7d153345')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -Np1 -i "${srcdir}/001-vtk-mingw-w64.patch"
patch -Np1 -i "${srcdir}/002-libharu-linking.patch"
patch -Np1 -i "${srcdir}/003-post-tcl-world.patch"
patch -Np1 -i "${srcdir}/004-fix-linking-rendering-tk.patch"
# it will find stdint from msys2-runtime-devel, but that's useless
patch -Np1 -i "${srcdir}/005-remove-bogus-stdint-check.patch"
patch -Np1 -i "${srcdir}/006-win7-defines-guard.patch"
patch -Np1 -i "${srcdir}/007-fix-linking-movie.patch"
patch -Np1 -i "${srcdir}/008-fix-python-modules-path.patch"
}
build() {
@@ -99,17 +102,20 @@ build() {
-DVTK_Group_Tk=ON \
-DVTK_Group_Views=ON \
-DVTK_Group_Web=OFF \
-DVTK_USE_SYSTEM_DOUBLECONVERSION=ON \
-DVTK_USE_SYSTEM_EXPAT=ON \
-DVTK_USE_SYSTEM_FREETYPE=ON \
-DVTK_USE_SYSTEM_HDF5=ON \
-DVTK_USE_SYSTEM_JPEG=ON \
-DVTK_USE_SYSTEM_JSONCPP=ON \
-DVTK_USE_SYSTEM_LIBPROJ4=OFF \
-DVTK_USE_SYSTEM_LIBPROJ=OFF \
-DVTK_USE_SYSTEM_LIBHARU=OFF \
-DVTK_USE_SYSTEM_LIBXML2=ON \
-DVTK_USE_SYSTEM_LZ4=ON \
-DVTK_USE_SYSTEM_NETCDF=OFF \
-DVTK_USE_SYSTEM_OGGTHEORA=ON \
-DVTK_USE_SYSTEM_OGG=ON \
-DVTK_USE_SYSTEM_PUGIXML=ON \
-DVTK_USE_SYSTEM_THEORA=ON \
-DVTK_USE_SYSTEM_PNG=ON \
-DVTK_USE_SYSTEM_TIFF=ON \
-DVTK_USE_SYSTEM_ZLIB=ON \
@@ -120,6 +126,7 @@ build() {
-DMYSQL_LIBRARY="${MINGW_PREFIX}/lib/libmariadb.dll.a" \
-DModule_vtkInfovisBoost=ON \
-DModule_vtkInfovisBoostGraphAlgorithms=ON \
-DModule_vtkIOGDAL=ON \
-DModule_vtkIOODBC=OFF \
-DModule_vtkIOPostgreSQL=ON \
-DModule_vtkPythonInterpreter=ON \
@@ -129,9 +136,7 @@ build() {
-DVTK_WRAP_JAVA=OFF \
-DVTK_WRAP_PYTHON=ON \
-DVTK_QT_VERSION=5 \
-DPYTHON_EXECUTABLE="${MINGW_PREFIX}/bin/python2.7.exe" \
-DPYTHON_LIBRARY="${MINGW_PREFIX}/lib/libpython2.7.dll.a" \
-DPYTHON_INCLUDE_DIR="${MINGW_PREFIX}/include/python2.7" \
-DPYTHON_EXECUTABLE="${MINGW_PREFIX}/bin/python3.exe" \
-DVTK_SMP_IMPLEMENTATION_TYPE=TBB \
-DCMAKE_RC_FLAGS=--use-temp-file \
-DCMAKE_BUILD_TYPE=Release \