gxsview: add v2024.03.15 (#46901)
* gxsview: new version * gxsview 2024 patches and qt6 conflicts * gxsview 2024 demands vtk 9 minimum * Removing the -lvtkRenderingQt for 2024.03.15 * gxsview: fontconfig inc/lib dirs added to gui/gui.pro --------- Co-authored-by: Olivier Cessenat <cessenat@jliana.magic>
This commit is contained in:
parent
aed1a3f980
commit
5b5be0582f
@ -24,6 +24,9 @@ class Gxsview(QMakePackage):
|
|||||||
|
|
||||||
license("LGPL-3.0-only")
|
license("LGPL-3.0-only")
|
||||||
|
|
||||||
|
version(
|
||||||
|
"2024.03.15", sha256="5a6e6384a79fc2f39370846814f049b6c4c32f418cb00363cfb18bc1b6598d3a"
|
||||||
|
)
|
||||||
version(
|
version(
|
||||||
"2023.05.29", sha256="1e768fd7afd22198b7f73adeb42f4ccf7e0ff68996a3843b1ea138225c4c1da3"
|
"2023.05.29", sha256="1e768fd7afd22198b7f73adeb42f4ccf7e0ff68996a3843b1ea138225c4c1da3"
|
||||||
)
|
)
|
||||||
@ -40,12 +43,17 @@ class Gxsview(QMakePackage):
|
|||||||
depends_on("fontconfig")
|
depends_on("fontconfig")
|
||||||
depends_on("qt@5.14.0:+opengl+gui")
|
depends_on("qt@5.14.0:+opengl+gui")
|
||||||
depends_on("vtk@8.0:+qt+opengl2") # +mpi+python are optional
|
depends_on("vtk@8.0:+qt+opengl2") # +mpi+python are optional
|
||||||
|
depends_on("vtk@9:+qt+opengl2", when="@2024.03.15:")
|
||||||
conflicts("%gcc@:7.2.0", msg="Requires C++17 compiler support") # need C++17 standard
|
conflicts("%gcc@:7.2.0", msg="Requires C++17 compiler support") # need C++17 standard
|
||||||
|
conflicts("qt@6:", msg="Qt 6 support is not yet achieved")
|
||||||
|
conflicts("qt-base@6:", msg="Qt 6 support is not yet achieved") # required for clingo
|
||||||
|
|
||||||
patch("vtk9.patch", when="^vtk@9:")
|
patch("vtk9.patch", when="^vtk@9:")
|
||||||
# gcc11 compilation rule for std::numeric_limits,
|
# gcc11 compilation rule for std::numeric_limits,
|
||||||
# avoid "numeric_limits" is not a member of "std"
|
# avoid "numeric_limits" is not a member of "std"
|
||||||
patch("gcc11.patch", when="@2021.07.01 %gcc@11:")
|
patch("gcc11.patch", when="@2021.07.01 %gcc@11:")
|
||||||
|
# sets fontconfig inc/lib, removes useless stuffs
|
||||||
|
patch("vtk90.patch", when="@2024.03.15")
|
||||||
|
|
||||||
build_directory = "gui"
|
build_directory = "gui"
|
||||||
|
|
||||||
@ -57,11 +65,14 @@ def qmake_args(self):
|
|||||||
if not os.path.exists(vtk_include_dir):
|
if not os.path.exists(vtk_include_dir):
|
||||||
vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk")
|
vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk")
|
||||||
args.append("VTK_NO_VER_SUFFIX=ON")
|
args.append("VTK_NO_VER_SUFFIX=ON")
|
||||||
|
fontconfig = self.spec["fontconfig"]
|
||||||
args.extend(
|
args.extend(
|
||||||
[
|
[
|
||||||
"VTK_LIB_DIR={0}".format(vtk_lib_dir),
|
"VTK_LIB_DIR={0}".format(vtk_lib_dir),
|
||||||
"VTK_INC_DIR={0}".format(vtk_include_dir),
|
"VTK_INC_DIR={0}".format(vtk_include_dir),
|
||||||
"VTK_MAJOR_VER={0}".format(str(vtk_suffix)),
|
"VTK_MAJOR_VER={0}".format(str(vtk_suffix)),
|
||||||
|
"FONTCONFIG_LIBDIR={0}".format(fontconfig.prefix.lib),
|
||||||
|
"FONTCONFIG_INCDIR={0}".format(fontconfig.prefix.include),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
# Below to avoid undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
|
# Below to avoid undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
|
||||||
|
51
var/spack/repos/builtin/packages/gxsview/vtk90.patch
Normal file
51
var/spack/repos/builtin/packages/gxsview/vtk90.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
diff --git a/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp b/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp
|
||||||
|
index 92802f2..af731e3 100644
|
||||||
|
--- a/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp
|
||||||
|
+++ b/gui/geometryviewer/trajectorypane/trajectorycreatingworker.cpp
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
#include "trajectorycreatingworker.hpp"
|
||||||
|
|
||||||
|
#include <vtkCellData.h> // for coloring
|
||||||
|
+#include <vtkUnsignedCharArray.h>
|
||||||
|
|
||||||
|
#include "core/image/color.hpp"
|
||||||
|
|
||||||
|
diff --git a/gui/geometryviewer/trajectorypane/trajectorypane.cpp b/gui/geometryviewer/trajectorypane/trajectorypane.cpp
|
||||||
|
index eeae291..337e0e1 100644
|
||||||
|
--- a/gui/geometryviewer/trajectorypane/trajectorypane.cpp
|
||||||
|
+++ b/gui/geometryviewer/trajectorypane/trajectorypane.cpp
|
||||||
|
@@ -35,7 +35,7 @@
|
||||||
|
#include <vtkPolyDataMapper.h>
|
||||||
|
#include <vtkProperty.h>
|
||||||
|
#include <vtkSmartPointer.h>
|
||||||
|
-#include <vtkQImageToImageSource.h>
|
||||||
|
+// #include <vtkQImageToImageSource.h>
|
||||||
|
#include <vtkOggTheoraWriter.h>
|
||||||
|
#include <vtkWindowToImageFilter.h>
|
||||||
|
#if defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(__WIN64__) || defined(_MSC_VER)
|
||||||
|
diff --git a/gui/gui.pro b/gui/gui.pro
|
||||||
|
index cab6c36..81861b7 100644
|
||||||
|
--- a/gui/gui.pro
|
||||||
|
+++ b/gui/gui.pro
|
||||||
|
@@ -302,7 +302,8 @@ unix:{
|
||||||
|
|
||||||
|
|
||||||
|
unix:!macx {
|
||||||
|
- LIBS += -lfontconfig
|
||||||
|
+ LIBS += -L$$FONTCONFIG_LIBDIR -lfontconfig
|
||||||
|
+ INCLUDEPATH += $$FONTCONFIG_INCDIR
|
||||||
|
# gcc7 requires libstdc++fs
|
||||||
|
linux-g++ {
|
||||||
|
lessThan(QMAKE_GCC_MAJOR_VERSION, 8) {
|
||||||
|
diff --git a/gui/vtk9.pri b/gui/vtk9.pri
|
||||||
|
index 298dedb..82993f2 100644
|
||||||
|
--- a/gui/vtk9.pri
|
||||||
|
+++ b/gui/vtk9.pri
|
||||||
|
@@ -58,7 +58,6 @@ LIBS += \
|
||||||
|
-lvtkRenderingGL2PSOpenGL2$$VTK_VER_SUFFIX \
|
||||||
|
-lvtkRenderingSceneGraph$$VTK_VER_SUFFIX \
|
||||||
|
-lvtkRenderingOpenGL2$$VTK_VER_SUFFIX \
|
||||||
|
- -lvtkRenderingQt$$VTK_VER_SUFFIX \
|
||||||
|
-lvtkRenderingUI$$VTK_VER_SUFFIX \
|
||||||
|
-lvtkRenderingVolume$$VTK_VER_SUFFIX \
|
||||||
|
-lvtkRenderingVtkJS$$VTK_VER_SUFFIX \
|
Loading…
Reference in New Issue
Block a user