VTK's cmake build system fails to generate an `.egg-info` file, which
various libraries in the Python package system (e.g. `pkg_resources`)
would use to identify the package. Work around this by generating an
`egg-info` file ourselves.
This will allow us to drop a workaround in `mayavi`.
Since the setting DCMAKE_SKIP_BUILD_RPATH was disabled, we can now run
the checkPhase of cmake derivations without having to tweak the
LD_LIBRARY_PATH anymore.
This fixed VTK that was broken on darwin in #158778 with "mv: Argument
list too long".
Reverts: 16a1b346 ('vtk: create versionless symlinks in /lib')
Reverts: 63599248 ('vtk: move headers out of /include/vtk-*')
This partially reverts: 010f6ee3 ('treewide: mark broken for darwin')
I believe this is a remanant of a global /usr/include which isn't
required with Nix and only complicates dependants' build scripts.
Backwards compatibility is maintained by way of a symlink.
VTK 7 builds with Qt 4 by default but we only support Qt 5, so let’s switch to that.
Also Qt changed some headers so let’s backport the VTK patch to fix the build.
Previously ldd did not show the dependencies so presumably,
VTK 9 started linking them statically after build system changes,
as hinted by the following CMake warning:
Manually-specified variables were not used by the project:
VTK_USE_SYSTEM_PNG
VTK_USE_SYSTEM_TIFF
VTK doesn't seem produce png symbols on aarch64. We could probably
figure out how to fix that but we can also just tell it to use the
libpng we already have, which already works on aarch64.
vtk: clean up / reduce code repetition
This refactors the vtk expressions to use a generic base expression,
which is used for all 3 versions.
vtk 7.x no longer uses gcc 8, since the quirk of it not building with
gcc 9 seems to have been fixed.
This also makes the python bindings available for all 3 versions, and
fixes building them for vtk 8 by adding a patch.
- also create vtk_7 as several packages don't build with 8.x:
- itk5: vtkVersion.h header not found at compile time
- ants: version in tree (2.2.0) is incompatible with 8.2
- itk4: ants depends on both vtk and itk4, so use vtk_7
- gdcm: vtk header issue
- python3Packages.vtk: Python C API compilation error with Python 3.8
- upgrade vtkWithQt4 -> vtkWithQt5
Flags that we now set globally:
- CMAKE_OSX_SYSROOT
- CMAKE_OSX_DEPLOYMENT_TARGET
can now be removed.
(cherry picked from commit 8742d5de30dfe2447c0fb56a2e7410b402effc80)
Since years I'm not maintaining anything of the list below other
than some updates when I needed them for some reason. Other people
is doing that maintenance on my behalf so I better take me out but
for very few packages. Finally!