Opened 10 years ago
Closed 2 years ago
#46853 closed enhancement (fixed)
VTK @6.1.0 +qt4 variant added
Reported by: | joelfred@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | stromnov (Andrey Stromnov), joelfred@…, RJVB (René Bertin) | |
Port: | vtk |
Description
Added the option to build VTK with QT4, which is needed by VisIt, a port I am in the process of creating and submitting.
For discussion: should qt4 or qt5 be a default variant?
Also: I have not tested the qt5 variant, but it doesn't look like it should work, since VTK needs configuration environment variables when configuring it to work with qt5. See: http://www.vtk.org/Wiki/VTK/Configure_and_Build#Qt5..2A
Attachments (2)
Change History (9)
Changed 10 years ago by joelfred@…
Attachment: | Portfile-vtk.diff added |
---|
comment:2 follow-up: 4 Changed 10 years ago by joelfred@…
It does warn about vtk violating /opt/local/plugins, but I'm very not sure what that means. I think that's where the plugins are supposed to go, but Macports doesn't know about the ${prefix}/plugins convention so it complains?
comment:3 Changed 9 years ago by RJVB (René Bertin)
If you add Qt support via variants, they typically need to be mutually exclusive, and this port is no exception from what I can see.
I haven't looked at the source code layout, but if you would like to offer both Qt4 and Qt5 support (plugins or however VTK integrates this; something I would encourage you to investigate based on my own work on co-installable Qt ports), you could try making Qt subports that depend on the main VTK port. This *might* work like follows:
- the main port takes care not to include Qt support.
- Qt4 subport calls cmake with the appropriate flags in the TLD, and then invokes make in the qt4 (or qt-specific) subdirectory. Installing will be done from that same directory.
- Qt5 subport calls cmake with the appropriate flags in the TLD, and then invokes make in the qt5 (or qt-specific) subdirectory. Installing will be done from that same directory.
Given how cmake usually works, this will cause anything that the Qt4 or Qt5 support needs to be built, but not the whole VTK tree, which would take way too much time. And it'd only install the files that contain the Qt specific stuff.
comment:4 Changed 9 years ago by RJVB (René Bertin)
Replying to joelfred@…:
It does warn about vtk violating /opt/local/plugins, but I'm very not sure what that means. I think that's where the plugins are supposed to go, but Macports doesn't know about the ${prefix}/plugins convention so it complains?
That plugin directory contains the QVTKWidgetPlugin designer plugin. To be installed correctly, -DVTK_INSTALL_QT_DIR:PATH=${qt_plugins_dir}/designer
must be added to the configure arguments.
Changed 9 years ago by RJVB (René Bertin)
diff taking into account most of my remarks
comment:5 Changed 9 years ago by RJVB (René Bertin)
Promised, I'll be stopping now :)
The last patch version replaces the Qt variants with Qt subports. For now all subports (vtk, vtk-qt4 and vtk-qt5) are all mutually exclusive, I don't know if it can even be otherwise. The advantage of using Qt subports is that dependents can specify the Qt version they require. With variants that would not be possible.
comment:7 Changed 2 years ago by chrstphrchvz (Christopher Chavez)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Updates to create qt4 variant in vtk