Compare commits

..

23 commits

Author SHA1 Message Date
Orion Poplawski
8125f3a80e Add packit config
[skip changelog]
2026-08-16 07:50:52 -06:00
Python Maint
cd8dbc453c Rebuilt for Python 3.15.0b4 ABI change 2026-07-22 13:07:47 +02:00
Fedora Release Engineering
cf6967342b Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:38:56 +00:00
František Zatloukal
54b79bed57 Rebuilt for fmt/spdlog 2026-06-25 12:41:50 +02:00
Sandro Mani
0ba4e40cea Rebuild (gdal) - full 2026-06-20 23:15:21 +02:00
Sandro Mani
4bfa6b2f9b Add vtk-gdal313.patch 2026-06-19 18:10:02 +02:00
Sandro Mani
2994f7d9be Rebuild (gdal) - bootstrap 2026-06-19 15:16:23 +02:00
Python Maint
01d93ec448 Rebuilt for Python 3.15 2026-06-05 00:23:52 +02:00
Orion Poplawski
6d29a611b0 Update to 9.2.2 2026-05-20 22:55:35 -06:00
Orion Poplawski
b714f706cd Add requires on needed FFMPEG libraries 2026-05-09 17:31:00 -06:00
Orion Poplawski
2a0275690e Drop explicit requires on ffmpeg-free-devel (rhbz#2464712) 2026-05-04 17:11:08 -06:00
Orion Poplawski
b1929da97f Disable bootstrap 2026-04-19 20:25:07 -06:00
Orion Poplawski
9bbfe9eab8 Rebuild for openvr soname change 2026-04-19 12:24:40 -06:00
Orion Poplawski
8c13984654 Rebuild for hdf5 2.1 in bootstrap mode 2026-04-16 19:39:39 -06:00
Orion Poplawski
c49a4bf778 Update to 9.6.1 2026-03-30 17:46:01 -06:00
Björn Esser
76598affe6
Rebuild (jsoncpp) 2026-03-22 18:58:57 +01:00
Orion Poplawski
a6c86c2671 Add patch to fix integer overflow on 32-bit in KissFFT (CVE-2025-34297) 2026-03-16 19:54:01 -06:00
Orion Poplawski
b5ba3beae7 Update to 9.6.0 2026-02-24 17:49:36 -07:00
Orion Poplawski
972726fe94 Use xwayland for tests 2026-02-23 19:22:22 -07:00
Cristian Le
d1093d6002 Rebuild for CMake Ninja generator change proposal
Signed-off-by: Cristian Le <git@lecris.dev>
2026-02-21 18:31:19 +00:00
Sandro Mani
10c3009ad9 Rebuild (grass) - full build 2026-02-16 09:00:55 +01:00
Sandro Mani
27b442f535 Bootstrap build 2026-02-15 19:10:10 +01:00
Sandro Mani
77f35cadc8 Rebuild (PDAL) 2026-02-15 18:26:16 +01:00
6 changed files with 121 additions and 501 deletions

6
.gitignore vendored
View file

@ -45,3 +45,9 @@ vtk-5.6.0.tar.gz
/VTKData-9.5.1.tar.gz
/VTK-9.5.2.tar.gz
/VTKData-9.5.2.tar.gz
/VTK-9.6.0.tar.gz
/VTKData-9.6.0.tar.gz
/VTK-9.6.1.tar.gz
/VTKData-9.6.1.tar.gz
/VTK-9.6.2.tar.gz
/VTKData-9.6.2.tar.gz

16
packit.yaml Normal file
View file

@ -0,0 +1,16 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
jobs:
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-rawhide
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-rawhide
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-rawhide

View file

@ -1,2 +1,2 @@
SHA512 (VTK-9.5.2.tar.gz) = fc8157a89fa603a7f7fce356e2f638ae69e0ea629a507458bdbb173daf511c61e39a1f0d7201b196a5b3a7ffa7e3e821398b62521faadf85edb1119a1e8b8e8e
SHA512 (VTKData-9.5.2.tar.gz) = 1be895bed613ed0f0ace0ba5e138afacc3d61b57e437299b3aecf6beff702ad1a2d02036fd147853bbbcb6a1f9d20a51831c0263fdc5b8e62ece9a6f8f7d410e
SHA512 (VTK-9.6.2.tar.gz) = 1a8d6c89ab03961f59181b12d06d9baca09445485e1cb5ac78a81ec4a2f9d8a25e87d6112f932d856782d0fcab23880295a95fd38e7f9b0b9592138fb2e2e671
SHA512 (VTKData-9.6.2.tar.gz) = f8cb1332a70a26f79eee65b0a5e8863337b6f53e81f93cf1a536e8cce2b52a69871da7fc4776de7ed1c476825ca3ad3fb85a4982bb8876faad98d72bbb3e6a8a

21
vtk-gdal313.patch Normal file
View file

@ -0,0 +1,21 @@
diff -rupN VTK-9.6.2/IO/GDAL/vtkGDALRasterReader.cxx VTK-9.6.2-new/IO/GDAL/vtkGDALRasterReader.cxx
--- VTK-9.6.2/IO/GDAL/vtkGDALRasterReader.cxx 2026-05-18 21:46:56.000000000 +0200
+++ VTK-9.6.2-new/IO/GDAL/vtkGDALRasterReader.cxx 2026-06-19 18:08:21.049063630 +0200
@@ -182,7 +182,7 @@ void vtkGDALRasterReader::vtkGDALRasterR
this->Reader->DriverShortName = GDALGetDriverShortName(driver);
this->Reader->DriverLongName = GDALGetDriverLongName(driver);
- char** papszMetaData = GDALGetMetadata(this->GDALData, nullptr);
+ CSLConstList papszMetaData = GDALGetMetadata(this->GDALData, nullptr);
if (CSLCount(papszMetaData) > 0)
{
for (int i = 0; papszMetaData[i] != nullptr; ++i)
@@ -882,7 +882,7 @@ std::vector<std::string> vtkGDALRasterRe
{
std::vector<std::string> domainMetaData;
- char** papszMetadata = GDALGetMetadata(this->Impl->GDALData, domain.c_str());
+ CSLConstList papszMetadata = GDALGetMetadata(this->Impl->GDALData, domain.c_str());
if (CSLCount(papszMetadata) > 0)
{

View file

@ -1,489 +0,0 @@
commit b7c22497712be6751fbefe155533ae34d5e381f5
Author: Spiros Tsalikis <spiros.tsalikis@kitware.com>
Date: Thu May 22 12:30:19 2025 -0400
Tcl/Tk: Support version 9.0.0
diff --git a/Rendering/Tk/vtkTkImageViewerWidget.cxx b/Rendering/Tk/vtkTkImageViewerWidget.cxx
index 43c7a48a13..9d2c4210de 100644
--- a/Rendering/Tk/vtkTkImageViewerWidget.cxx
+++ b/Rendering/Tk/vtkTkImageViewerWidget.cxx
@@ -23,6 +23,17 @@
#include <algorithm>
#include <cstdlib>
+#if (TCL_MAJOR_VERSION >= 9)
+#define VTK_TCL_CONST const
+#elif ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4))
+#define VTK_TCL_CONST CONST84
+#else
+#define VTK_TCL_CONST
+#endif
+#ifndef offsetof
+#define offsetof(type, field) ((size_t)((char*)&((type*)0)->field))
+#endif
+
#define VTK_ALL_EVENTS_MASK \
KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask | \
LeaveWindowMask | PointerMotionMask | ExposureMask | VisibilityChangeMask | FocusChangeMask | \
@@ -32,14 +43,14 @@
// or with the command configure. The only new one is "-rw" which allows
// the uses to set their own ImageViewer window.
static Tk_ConfigSpec vtkTkImageViewerWidgetConfigSpecs[] = {
- { TK_CONFIG_PIXELS, (char*)"-height", (char*)"height", (char*)"Height", (char*)"400",
- Tk_Offset(struct vtkTkImageViewerWidget, Height), 0, nullptr },
+ { TK_CONFIG_PIXELS, "-height", "height", "Height", "400",
+ offsetof(struct vtkTkImageViewerWidget, Height), 0, nullptr },
- { TK_CONFIG_PIXELS, (char*)"-width", (char*)"width", (char*)"Width", (char*)"400",
- Tk_Offset(struct vtkTkImageViewerWidget, Width), 0, nullptr },
+ { TK_CONFIG_PIXELS, "-width", "width", "Width", "400",
+ offsetof(struct vtkTkImageViewerWidget, Width), 0, nullptr },
- { TK_CONFIG_STRING, (char*)"-iv", (char*)"iv", (char*)"IV", (char*)"",
- Tk_Offset(struct vtkTkImageViewerWidget, IV), 0, nullptr },
+ { TK_CONFIG_STRING, "-iv", "iv", "IV", "", offsetof(struct vtkTkImageViewerWidget, IV), 0,
+ nullptr },
{ TK_CONFIG_END, nullptr, nullptr, nullptr, nullptr, 0, 0, nullptr }
};
@@ -56,17 +67,22 @@ extern int vtkImageViewerCommand(ClientData cd, Tcl_Interp* interp, int argc, ch
//------------------------------------------------------------------------------
// It's possible to change with this function or in a script some
// options like width, height or the ImageViewer widget.
-int vtkTkImageViewerWidget_Configure(
- Tcl_Interp* interp, struct vtkTkImageViewerWidget* self, int argc, char* argv[], int flags)
+#if (TCL_MAJOR_VERSION >= 9)
+int vtkTkImageViewerWidget_Configure(Tcl_Interp* interp, struct vtkTkImageViewerWidget* self,
+ Tcl_Size objc, Tcl_Obj* const* objv, int flags)
+#else
+int vtkTkImageViewerWidget_Configure(Tcl_Interp* interp, struct vtkTkImageViewerWidget* self,
+ int argc, VTK_TCL_CONST char* argv[], int flags)
+#endif
{
// Let Tk handle generic configure options.
- if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkImageViewerWidgetConfigSpecs, argc,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- const_cast<CONST84 char**>(argv),
+#if (TCL_MAJOR_VERSION >= 9)
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkImageViewerWidgetConfigSpecs, objc, objv,
+ (void*)self, flags) == TCL_ERROR)
#else
- argv,
-#endif
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkImageViewerWidgetConfigSpecs, argc, argv,
(char*)self, flags) == TCL_ERROR)
+#endif
{
return (TCL_ERROR);
}
@@ -89,11 +105,8 @@ int vtkTkImageViewerWidget_Configure(
// to choose the appropriate method to invoke.
extern "C"
{
- int vtkTkImageViewerWidget_Widget(ClientData clientData, Tcl_Interp* interp, int argc,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- CONST84
-#endif
- char* argv[])
+ int vtkTkImageViewerWidget_Widget(
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char* argv[])
{
struct vtkTkImageViewerWidget* self = (struct vtkTkImageViewerWidget*)clientData;
int result = TCL_OK;
@@ -106,7 +119,11 @@ extern "C"
}
// Make sure the widget is not deleted during this function
+#if (TCL_MAJOR_VERSION >= 9)
+ Tcl_Preserve((ClientData)self);
+#else
Tk_Preserve((ClientData)self);
+#endif
// Handle render call to the widget
if (strncmp(argv[1], "render", std::max<size_t>(1, strlen(argv[1]))) == 0 ||
@@ -137,13 +154,27 @@ extern "C"
else
{
/* Execute a configuration change */
- result = vtkTkImageViewerWidget_Configure(interp, self, argc - 2,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- const_cast<char**>(argv + 2),
+#if (TCL_MAJOR_VERSION >= 9)
+ // Convert string arguments to Tcl_Obj for TCL 9.0
+ Tcl_Obj** objv_config = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
+ for (int i = 0; i < argc - 2; i++)
+ {
+ objv_config[i] = Tcl_NewStringObj(argv[i + 2], -1);
+ Tcl_IncrRefCount(objv_config[i]);
+ }
+ result = vtkTkImageViewerWidget_Configure(
+ interp, self, argc - 2, objv_config, TK_CONFIG_ARGV_ONLY);
+
+ // Clean up the Tcl_Obj array
+ for (int i = 0; i < argc - 2; i++)
+ {
+ Tcl_DecrRefCount(objv_config[i]);
+ }
+ ckfree((char*)objv_config);
#else
- argv + 2,
+ result =
+ vtkTkImageViewerWidget_Configure(interp, self, argc - 2, argv + 2, TK_CONFIG_ARGV_ONLY);
#endif
- TK_CONFIG_ARGV_ONLY);
}
}
else if (!strcmp(argv[1], "GetImageViewer"))
@@ -165,7 +196,11 @@ extern "C"
}
// Unlock the object so it can be deleted.
+#if (TCL_MAJOR_VERSION >= 9)
+ Tcl_Release((ClientData)self);
+#else
Tk_Release((ClientData)self);
+#endif
return result;
}
}
@@ -181,16 +216,10 @@ extern "C"
// * Configures this vtkTkImageViewerWidget for the given arguments
extern "C"
{
- int vtkTkImageViewerWidget_Cmd(ClientData clientData, Tcl_Interp* interp, int argc,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- CONST84
-#endif
- char** argv)
+ int vtkTkImageViewerWidget_Cmd(
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char** argv)
{
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- CONST84
-#endif
- char* name;
+ VTK_TCL_CONST char* name;
Tk_Window main = (Tk_Window)clientData;
Tk_Window tkwin;
struct vtkTkImageViewerWidget* self;
@@ -233,13 +262,37 @@ extern "C"
vtkTkImageViewerWidget_EventProc, (ClientData)self);
// Configure vtkTkImageViewerWidget widget
- if (vtkTkImageViewerWidget_Configure(interp, self, argc - 2,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- const_cast<char**>(argv + 2),
+#if (TCL_MAJOR_VERSION >= 9)
+ // Convert string arguments to Tcl_Obj for TCL 9.0
+ Tcl_Obj** objv_init = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
+ for (int i = 0; i < argc - 2; i++)
+ {
+ objv_init[i] = Tcl_NewStringObj(argv[i + 2], -1);
+ Tcl_IncrRefCount(objv_init[i]);
+ }
+
+ if (vtkTkImageViewerWidget_Configure(interp, self, argc - 2, objv_init, 0) == TCL_ERROR)
+ {
+ // Clean up before error return
+ for (int i = 0; i < argc - 2; i++)
+ {
+ Tcl_DecrRefCount(objv_init[i]);
+ }
+ ckfree((char*)objv_init);
+
+ Tk_DestroyWindow(tkwin);
+ Tcl_DeleteCommand(interp, (char*)"vtkTkImageViewerWidget");
+ return TCL_ERROR;
+ }
+
+ // Clean up the Tcl_Obj array
+ for (int i = 0; i < argc - 2; i++)
+ {
+ Tcl_DecrRefCount(objv_init[i]);
+ }
+ ckfree((char*)objv_init);
#else
- argv + 2,
-#endif
- 0) == TCL_ERROR)
+ if (vtkTkImageViewerWidget_Configure(interp, self, argc - 2, argv + 2, 0) == TCL_ERROR)
{
Tk_DestroyWindow(tkwin);
Tcl_DeleteCommand(interp, (char*)"vtkTkImageViewerWidget");
@@ -247,6 +300,7 @@ extern "C"
// free(self);
return TCL_ERROR;
}
+#endif
Tcl_AppendResult(interp, Tk_PathName(tkwin), nullptr);
return TCL_OK;
@@ -255,7 +309,11 @@ extern "C"
extern "C"
{
+#if (TCL_MAJOR_VERSION >= 9)
+ void vtkTkImageViewerWidget_Destroy(void* memPtr)
+#else
void vtkTkImageViewerWidget_Destroy(char* memPtr)
+#endif
{
struct vtkTkImageViewerWidget* self = (struct vtkTkImageViewerWidget*)memPtr;
diff --git a/Rendering/Tk/vtkTkRenderWidget.cxx b/Rendering/Tk/vtkTkRenderWidget.cxx
index 6ddaa5816a..84c940b484 100644
--- a/Rendering/Tk/vtkTkRenderWidget.cxx
+++ b/Rendering/Tk/vtkTkRenderWidget.cxx
@@ -29,6 +29,17 @@
#include <cstdlib>
#include <vector>
+#if (TCL_MAJOR_VERSION >= 9) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 6))
+#define VTK_TCL_CONST const
+#elif ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4))
+#define VTK_TCL_CONST CONST84
+#else
+#define VTK_TCL_CONST
+#endif
+#ifndef offsetof
+#define offsetof(type, field) ((size_t)((char*)&((type*)0)->field))
+#endif
+
// Silence warning like
// "dereferencing type-punned pointer will break strict-aliasing rules"
// it happens because this kind of expression: (long *)&ptr
@@ -45,14 +56,13 @@
// or with the command configure. The only new one is "-rw" which allows
// the uses to set their own render window.
static Tk_ConfigSpec vtkTkRenderWidgetConfigSpecs[] = {
- { TK_CONFIG_PIXELS, (char*)"-height", (char*)"height", (char*)"Height", (char*)"400",
- Tk_Offset(struct vtkTkRenderWidget, Height), 0, nullptr },
+ { TK_CONFIG_PIXELS, "-height", "height", "Height", "400",
+ offsetof(struct vtkTkRenderWidget, Height), 0, nullptr },
- { TK_CONFIG_PIXELS, (char*)"-width", (char*)"width", (char*)"Width", (char*)"400",
- Tk_Offset(struct vtkTkRenderWidget, Width), 0, nullptr },
+ { TK_CONFIG_PIXELS, "-width", "width", "Width", "400", offsetof(struct vtkTkRenderWidget, Width),
+ 0, nullptr },
- { TK_CONFIG_STRING, (char*)"-rw", (char*)"rw", (char*)"RW", (char*)"",
- Tk_Offset(struct vtkTkRenderWidget, RW), 0, nullptr },
+ { TK_CONFIG_STRING, "-rw", "rw", "RW", "", offsetof(struct vtkTkRenderWidget, RW), 0, nullptr },
{ TK_CONFIG_END, nullptr, nullptr, nullptr, nullptr, 0, 0, nullptr }
};
@@ -113,11 +123,8 @@ extern "C"
#define VTKIMAGEDATATOTKPHOTO_CORONAL 0
#define VTKIMAGEDATATOTKPHOTO_SAGITTAL 1
#define VTKIMAGEDATATOTKPHOTO_TRANSVERSE 2
- int vtkImageDataToTkPhoto_Cmd(ClientData vtkNotUsed(clientData), Tcl_Interp* interp, int argc,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- CONST84
-#endif
- char** argv)
+ int vtkImageDataToTkPhoto_Cmd(
+ ClientData vtkNotUsed(clientData), Tcl_Interp* interp, int argc, VTK_TCL_CONST char** argv)
{
int status = 0;
vtkImageData* image;
@@ -330,8 +337,14 @@ extern "C"
block.offset[3] = 3;
break;
}
+#if (TCL_MAJOR_VERSION >= 9)
+ Tk_PhotoSetSize(interp, photo, block.width, block.height);
+ Tk_PhotoPutBlock(
+ interp, photo, &block, 0, 0, block.width, block.height, TK_PHOTO_COMPOSITE_SET);
+#else
Tk_PhotoSetSize(photo, block.width, block.height);
Tk_PhotoPutBlock(photo, &block, 0, 0, block.width, block.height);
+#endif
return TCL_OK;
}
}
@@ -339,17 +352,22 @@ extern "C"
//------------------------------------------------------------------------------
// It's possible to change with this function or in a script some
// options like width, height or the render widget.
-int vtkTkRenderWidget_Configure(
- Tcl_Interp* interp, struct vtkTkRenderWidget* self, int argc, char* argv[], int flags)
+#if (TCL_MAJOR_VERSION >= 9)
+int vtkTkRenderWidget_Configure(Tcl_Interp* interp, struct vtkTkRenderWidget* self, Tcl_Size objc,
+ Tcl_Obj* const* objv, int flags)
+#else
+int vtkTkRenderWidget_Configure(Tcl_Interp* interp, struct vtkTkRenderWidget* self, int argc,
+ VTK_TCL_CONST char* argv[], int flags)
+#endif
{
// Let Tk handle generic configure options.
- if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkRenderWidgetConfigSpecs, argc,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- const_cast<CONST84 char**>(argv),
+#if (TCL_MAJOR_VERSION >= 9)
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkRenderWidgetConfigSpecs, objc, objv, (void*)self,
+ flags) == TCL_ERROR)
#else
- argv,
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkRenderWidgetConfigSpecs, argc, argv, (char*)self,
+ flags) == TCL_ERROR)
#endif
- (char*)self, flags) == TCL_ERROR)
{
return (TCL_ERROR);
}
@@ -372,11 +390,8 @@ int vtkTkRenderWidget_Configure(
// to choose the appropriate method to invoke.
extern "C"
{
- int vtkTkRenderWidget_Widget(ClientData clientData, Tcl_Interp* interp, int argc,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- CONST84
-#endif
- char* argv[])
+ int vtkTkRenderWidget_Widget(
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char* argv[])
{
struct vtkTkRenderWidget* self = (struct vtkTkRenderWidget*)clientData;
int result = TCL_OK;
@@ -389,7 +404,11 @@ extern "C"
}
// Make sure the widget is not deleted during this function
+#if (TCL_MAJOR_VERSION >= 9)
+ Tcl_Preserve((ClientData)self);
+#else
Tk_Preserve((ClientData)self);
+#endif
// Handle render call to the widget
if (strncmp(argv[1], "render", std::max<size_t>(1, strlen(argv[1]))) == 0 ||
@@ -420,13 +439,26 @@ extern "C"
else
{
/* Execute a configuration change */
- result = vtkTkRenderWidget_Configure(interp, self, argc - 2,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- const_cast<char**>(argv + 2),
+#if (TCL_MAJOR_VERSION >= 9)
+ // Convert string arguments to Tcl_Obj for TCL 9.0
+ Tcl_Obj** objv_config = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
+ for (int i = 0; i < argc - 2; i++)
+ {
+ objv_config[i] = Tcl_NewStringObj(argv[i + 2], -1);
+ Tcl_IncrRefCount(objv_config[i]);
+ }
+ result =
+ vtkTkRenderWidget_Configure(interp, self, argc - 2, objv_config, TK_CONFIG_ARGV_ONLY);
+
+ // Clean up the Tcl_Obj array
+ for (int i = 0; i < argc - 2; i++)
+ {
+ Tcl_DecrRefCount(objv_config[i]);
+ }
+ ckfree((char*)objv_config);
#else
- argv + 2,
+ result = vtkTkRenderWidget_Configure(interp, self, argc - 2, argv + 2, TK_CONFIG_ARGV_ONLY);
#endif
- TK_CONFIG_ARGV_ONLY);
}
}
else if (!strcmp(argv[1], "GetRenderWindow"))
@@ -448,7 +480,11 @@ extern "C"
}
// Unlock the object so it can be deleted.
+#if (TCL_MAJOR_VERSION >= 9)
+ Tcl_Release((ClientData)self);
+#else
Tk_Release((ClientData)self);
+#endif
return result;
}
}
@@ -464,16 +500,10 @@ extern "C"
// * Configures this vtkTkRenderWidget for the given arguments
extern "C"
{
- int vtkTkRenderWidget_Cmd(ClientData clientData, Tcl_Interp* interp, int argc,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- CONST84
-#endif
- char** argv)
+ int vtkTkRenderWidget_Cmd(
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char** argv)
{
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- CONST84
-#endif
- char* name;
+ VTK_TCL_CONST char* name;
Tk_Window main = (Tk_Window)clientData;
Tk_Window tkwin;
struct vtkTkRenderWidget* self;
@@ -515,13 +545,37 @@ extern "C"
tkwin, ExposureMask | StructureNotifyMask, vtkTkRenderWidget_EventProc, (ClientData)self);
// Configure vtkTkRenderWidget widget
- if (vtkTkRenderWidget_Configure(interp, self, argc - 2,
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
- const_cast<char**>(argv + 2),
+#if (TCL_MAJOR_VERSION >= 9)
+ // Convert string arguments to Tcl_Obj for TCL 9.0
+ Tcl_Obj** objv_init = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
+ for (int i = 0; i < argc - 2; i++)
+ {
+ objv_init[i] = Tcl_NewStringObj(argv[i + 2], -1);
+ Tcl_IncrRefCount(objv_init[i]);
+ }
+
+ if (vtkTkRenderWidget_Configure(interp, self, argc - 2, objv_init, 0) == TCL_ERROR)
+ {
+ // Clean up before error return
+ for (int i = 0; i < argc - 2; i++)
+ {
+ Tcl_DecrRefCount(objv_init[i]);
+ }
+ ckfree((char*)objv_init);
+
+ Tk_DestroyWindow(tkwin);
+ Tcl_DeleteCommand(interp, (char*)"vtkTkImageViewerWidget");
+ return TCL_ERROR;
+ }
+
+ // Clean up the Tcl_Obj array
+ for (int i = 0; i < argc - 2; i++)
+ {
+ Tcl_DecrRefCount(objv_init[i]);
+ }
+ ckfree((char*)objv_init);
#else
- argv + 2,
-#endif
- 0) == TCL_ERROR)
+ if (vtkTkRenderWidget_Configure(interp, self, argc - 2, argv + 2, 0) == TCL_ERROR)
{
Tk_DestroyWindow(tkwin);
Tcl_DeleteCommand(interp, "vtkTkRenderWidget");
@@ -529,6 +583,7 @@ extern "C"
// free(self);
return TCL_ERROR;
}
+#endif
Tcl_AppendResult(interp, Tk_PathName(tkwin), nullptr);
return TCL_OK;
@@ -555,7 +610,11 @@ extern "C"
extern "C"
{
+#if (TCL_MAJOR_VERSION >= 9)
+ void vtkTkRenderWidget_Destroy(void* memPtr)
+#else
void vtkTkRenderWidget_Destroy(char* memPtr)
+#endif
{
struct vtkTkRenderWidget* self = (struct vtkTkRenderWidget*)memPtr;

View file

@ -34,16 +34,29 @@
%bcond_without openmpi
%endif
%endif
# Disable until USD imports are clean
%bcond_with usd
# s390x on EL8 does not have xorg-x11-drv-dummy
%if 0%{?rhel}
%if 0%{?rhel} >= 10
%bcond_without xwayland
%else
%ifarch s390x
%bcond_with xdummy
%else
%bcond_without xdummy
%endif
%endif
%else
%if 0%{?fedora} >= 44
%bcond_without xwayland
%else
%bcond_without xdummy
%endif
%endif
%bcond_without xwayland
%if 0%{?fedora} || 0%{?rhel} >= 9
%bcond_without flexiblas
@ -63,23 +76,23 @@
Summary: The Visualization Toolkit - A high level 3D visualization library
Name: vtk
Version: 9.5.2%{?rc:~%{rc}}
Version: 9.6.2%{?rc:~%{rc}}
Release: %autorelease
License: BSD-3-Clause
%global srcver %{lua:local ver = rpm.expand('%version');ver = ver:gsub('~','.');print(ver)}
Source0: https://www.vtk.org/files/release/9.5/VTK-%{srcver}.tar.gz
Source1: https://www.vtk.org/files/release/9.5/VTKData-%{srcver}.tar.gz
Source0: https://www.vtk.org/files/release/9.6/VTK-%{srcver}.tar.gz
Source1: https://www.vtk.org/files/release/9.6/VTKData-%{srcver}.tar.gz
Source2: xorg.conf
# Patch required libharu version (Fedora 33+ contains the needed VTK patches)
Patch: vtk-libharu.patch
# Tk 9.0 - based on b7c22497712be6751fbefe155533ae34d5e381f5
Patch: vtk-tk9.patch
# always_inline fails on ppc64le
# https://gitlab.kitware.com/vtk/vtk/-/issues/19622
# https://bugzilla.redhat.com/show_bug.cgi?id=2386242
Patch: vtk-ppc64-no-always-inline.patch
# Fix Integer Overflow on 32-bit in KissFFT
Patch: vtk-CVE-2025-34297.patch
# Fix build against GDAL 3.13+
Patch: vtk-gdal313.patch
URL: https://vtk.org/
@ -104,10 +117,15 @@ BuildRequires: lapack-devel
BuildRequires: boost-devel
BuildRequires: cgnslib-devel
BuildRequires: cli11-devel
BuildRequires: double-conversion-devel
BuildRequires: eigen3-devel
BuildRequires: expat-devel
BuildRequires: fast_float-devel
# FFMPEG libaries
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libswresample)
BuildRequires: pkgconfig(libswscale)
%if %{with fmt}
BuildRequires: fmt-devel >= 8.1.0
%endif
@ -153,6 +171,17 @@ BuildRequires: PEGTL-devel
BuildRequires: proj-devel
BuildRequires: pugixml-devel
BuildRequires: python%{python3_pkgversion}-devel
%if %{with usd}
BuildRequires: cmake(pxr)
# Needed by cmake(pxr)
# https://bugzilla.redhat.com/show_bug.cgi?id=2441663
BuildRequires: materialx-data
BuildRequires: python3-materialx
# https://src.fedoraproject.org/rpms/usd/pull-request/39
BuildRequires: cmake(MaterialX)
BuildRequires: cmake(OpenSubdiv)
%endif
BuildRequires: cmake(Qt6UiPlugin)
BuildRequires: cmake(Qt6Quick)
BuildRequires: R-devel
@ -184,6 +213,9 @@ BuildRequires: netcdf-openmpi-devel
BuildRequires: xorg-x11-drv-dummy
BuildRequires: mesa-dri-drivers
%endif
%if %{with xwayland}
BuildRequires: xwayland-run
%endif
Requires: hdf5 = %{_hdf5_version}
# Almost every BR needs to be required by the -devel packages
@ -200,12 +232,17 @@ Requires: boost-devel%{?_isa} \
Requires: cgnslib-devel%{?_isa} \
# cli11 is noarch and header-only \
Requires: cli11-static \
Requires: double-conversion-devel%{?_isa} \
# eigen3 is noarch and header-only \
Requires: eigen3-static \
Requires: expat-devel%{?_isa} \
# fast_float is noarch and header-only \
Requires: fast_float-devel \
# FFMPEG libraries \
Requires: pkgconfig(libavcodec) \
Requires: pkgconfig(libavformat) \
Requires: pkgconfig(libavutil) \
Requires: pkgconfig(libswresample) \
Requires: pkgconfig(libswscale) \
%if %{with fmt} \
Requires: fmt-devel%{?_isa} \
%endif \
@ -254,6 +291,9 @@ Requires: pugixml-devel%{?_isa} \
# bz #1183210 + #1183530 \
Requires: python%{python3_pkgversion}-devel \
Requires: sqlite-devel%{?_isa} \
%if %{with usd} \
Requires: cmake(pxr) \
%endif \
Requires: cmake(Qt6) \
Requires: cmake(Qt6Core5Compat) \
Requires: cmake(Qt6Quick) \
@ -574,7 +614,7 @@ programming languages.
# TODO - VPIC - not yet packaged
# TODO - xdmf2 - not yet packaged
# TODO - xdmf3 - not yet packaged
for x in vtk{cgns,cli11,doubleconversion,eigen,expat,fast_float,%{?with_fmt:fmt,}freetype,%{?with_gl2ps:gl2ps,}hdf5,jpeg,jsoncpp,libharu,libproj,libxml2,lz4,lzma,mpi4py,netcdf,nlohmannjson,ogg,pegtl,png,pugixml,sqlite,theora,tiff,utf8,zlib}
for x in vtk{cgns,cli11,eigen,expat,fast_float,%{?with_fmt:fmt,}freetype,%{?with_gl2ps:gl2ps,}hdf5,jpeg,jsoncpp,libharu,libproj,libxml2,lz4,lzma,mpi4py,netcdf,nlohmannjson,ogg,pegtl,png,pugixml,sqlite,theora,tiff,utf8,zlib}
do
rm -r ThirdParty/*/${x}
done
@ -634,6 +674,9 @@ find vtk-examples -type f | xargs chmod -R a-x
-DVTK_MODULE_ENABLE_VTK_IOMySQL:STRING=YES \\\
-DVTK_MODULE_ENABLE_VTK_IOOMF:STRING=YES \\\
-DVTK_MODULE_ENABLE_VTK_IOParallelLSDyna:STRING=YES \\\
%if %{without usd} \
-DVTK_MODULE_ENABLE_VTK_IOUSD:STRING=NO \\\
%endif \
-DVTK_MODULE_ENABLE_VTK_IOTRUCHAS:STRING=YES \\\
-DVTK_MODULE_ENABLE_VTK_IOVPIC:STRING=YES \\\
-DVTK_MODULE_ENABLE_VTK_IOXdmf2:STRING=YES \\\
@ -665,6 +708,7 @@ find vtk-examples -type f | xargs chmod -R a-x
-DVTK_BUILD_ALL_MODULES=ON \\\
-DVTK_ENABLE_OSPRAY:BOOL=OFF \\\
-DVTK_MODULE_ENABLE_VTK_fides:STRING=NO \\\
-DVTK_MODULE_ENABLE_VTK_FiltersONNX:STRING=NO \\\
-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS:STRING=NO \\\
-DVTK_MODULE_ENABLE_VTK_IOADIOS2:STRING=NO \\\
-DVTK_MODULE_ENABLE_VTK_IOOpenVDB:STRING=NO \\\
@ -680,6 +724,7 @@ find vtk-examples -type f | xargs chmod -R a-x
-DVTK_MODULE_USE_EXTERNAL_VTK_token:BOOL=OFF \\\
-DVTK_MODULE_USE_EXTERNAL_VTK_verdict:BOOL=OFF \\\
-DVTK_MODULE_USE_EXTERNAL_VTK_vtkviskores:BOOL=OFF \\\
-DViskores_INSTALL_LIB_DIR=%{_lib} \\\
-DVTK_USE_TK=ON \\\
%{?with_flexiblas:-DBLA_VENDOR=FlexiBLAS}
@ -704,8 +749,10 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m
%endif
# Defined HDF5_IS_PARALLEL due to https://gitlab.kitware.com/vtk/vtk/-/work_items/20014
%cmake \
%{vtk_cmake_options} \
-DHDF5_IS_PARALLEL:BOOL=OFF \
-DVTK_BUILD_DOCUMENTATION:BOOL=ON \
-DVTK_BUILD_EXAMPLES:BOOL=ON \
-DVTK_BUILD_TESTING:BOOL=ON
@ -726,6 +773,7 @@ do
-DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \
-DCMAKE_INSTALL_LIBDIR:PATH=lib \
-DCMAKE_INSTALL_JNILIBDIR:PATH=lib/%{name} \
-DHDF5_IS_PARALLEL:BOOL=ON \
-DVTK_MODULE_ENABLE_VTK_ParallelMPI=WANT \
-DVTK_MODULE_ENABLE_VTK_mpi=WANT \
-DVTK_MODULE_ENABLE_VTK_RenderingParallelLIC=WANT \
@ -837,6 +885,7 @@ export QA_RPATHS=18
%ifnarch s390x
%check
cp %SOURCE2 .
export FLEXIBLAS=netlib
%if %{with xdummy}
if [ -x /usr/libexec/Xorg ]; then
Xorg=/usr/libexec/Xorg
@ -846,8 +895,19 @@ fi
$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99 &
export DISPLAY=:99
%endif
export FLEXIBLAS=netlib
%ctest --verbose || :
# %%ctest starts with a newline so we need the backslash
# xwayland-run needs XDG_RUNTIME_DIR set
if [ -z "$XDG_RUNTIME_DIR" ]; then
export XDG_RUNTIME_DIR=${PWD}/tmp
mkdir -m 0700 $XDG_RUNTIME_DIR
fi
cat > ctest_wrap <<EOF
#!/bin/bash
%ctest --verbose
EOF
chmod a+x ctest_wrap
%{?with_xwayland:wlheadless-run -- xwayland-run -- }./ctest_wrap || :
%if %{with xdummy}
kill %1 || :
cat xorg.log
@ -867,11 +927,13 @@ cat xorg.log
%{_bindir}/vtkProbeOpenGLVersion
%{_bindir}/vtkWrapHierarchy
%{_bindir}/vtkWrapJava
%{_bindir}/vtkWrapJavaScript
%{_bindir}/vtkWrapSerDes
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/cmake/%{name}/
%{_libdir}/pkgconfig/viskores.pc
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/hierarchy/
@ -906,10 +968,12 @@ cat xorg.log
%{_libdir}/mpich/bin/vtkProbeOpenGLVersion
%{_libdir}/mpich/bin/vtkWrapHierarchy
%{_libdir}/mpich/bin/vtkWrapJava
%{_libdir}/mpich/bin/vtkWrapJavaScript
%{_libdir}/mpich/bin/vtkWrapSerDes
%{_libdir}/mpich/include/
%{_libdir}/mpich/lib/*.so
%{_libdir}/mpich/lib/cmake/
%{_libdir}/mpich/lib/pkgconfig/
%dir %{_libdir}/mpich/lib/%{name}
%{_libdir}/mpich/lib/%{name}/hierarchy/
@ -946,10 +1010,12 @@ cat xorg.log
%{_libdir}/openmpi/bin/vtkProbeOpenGLVersion
%{_libdir}/openmpi/bin/vtkWrapHierarchy
%{_libdir}/openmpi/bin/vtkWrapJava
%{_libdir}/openmpi/bin/vtkWrapJavaScript
%{_libdir}/openmpi/bin/vtkWrapSerDes
%{_libdir}/openmpi/include/
%{_libdir}/openmpi/lib/*.so
%{_libdir}/openmpi/lib/cmake/
%{_libdir}/openmpi/lib/pkgconfig/
%dir %{_libdir}/openmpi/lib/%{name}
%{_libdir}/openmpi/lib/%{name}/hierarchy/