summaryrefslogtreecommitdiff
path: root/graphics/vv
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/vv')
-rw-r--r--graphics/vv/Makefile40
-rw-r--r--graphics/vv/distinfo6
-rw-r--r--graphics/vv/files/patch-common_clitkCommon.txx25
-rw-r--r--graphics/vv/files/patch-common_clitkXdrImageIOWriter.cxx15
-rw-r--r--graphics/vv/files/patch-common_rtkEdfImageIO.h15
-rw-r--r--graphics/vv/files/patch-itk_RelativePositionPropImageFilter.txx30
-rw-r--r--graphics/vv/files/patch-vv_vv.cxx33
-rw-r--r--graphics/vv/files/patch-vv_vvBlendImageActor.cxx56
-rw-r--r--graphics/vv/files/patch-vv_vvSlicer.cxx25
9 files changed, 230 insertions, 15 deletions
diff --git a/graphics/vv/Makefile b/graphics/vv/Makefile
index f238b61ff4ed..949a0af9f166 100644
--- a/graphics/vv/Makefile
+++ b/graphics/vv/Makefile
@@ -1,8 +1,7 @@
PORTNAME= vv
DISTVERSIONPREFIX= v
-DISTVERSION= 1.4.0-383
-DISTVERSIONSUFFIX= -g7a783a8b
-PORTREVISION= 8
+DISTVERSION= 1.4.0-406
+DISTVERSIONSUFFIX= -gd33ac3e8
CATEGORIES= graphics
MAINTAINER= yuri@FreeBSD.org
@@ -18,15 +17,16 @@ LIB_DEPENDS= libexpat.so:textproc/expat2 \
libgdcmCommon.so:devel/gdcm \
libhdf5_cpp.so:science/hdf5 \
libITKLabelMap-5.0.so:science/InsightToolkit501 \
- libpng.so:graphics/png \
- libsz.so:science/libaec \
+ libmpi.so:net/mpich \
+ libnetcdf.so:science/netcdf \
+ libpng16.so:graphics/png \
libtiff.so:graphics/tiff \
- libvtkIOSQL-8.2.so:math/vtk8
+ libvtkIOSQL-${VTK_VER}.so:math/vtk9
-USES= cmake compiler:c++11-lang eigen:3 jpeg qt:5 xorg
+USES= cmake compiler:c++11-lang eigen:3 jpeg python:build,run qt:5 xorg
USE_GITHUB= yes
GH_ACCOUNT= open-vv
-USE_QT= core designer gui network sql widgets xml buildtools:build qmake:build
+USE_QT= core designer gui network opengl declarative sql widgets xml buildtools:build qmake:build
USE_XORG= ice sm x11 xext xt
USE_CXXSTD= c++11
@@ -40,7 +40,31 @@ PLIST_FILES= bin/vv
CXXFLAGS+= -msse2 # workaround for ITK failing to add -msse2 on i386: https://github.com/open-vv/vv/issues/83 & https://github.com/InsightSoftwareConsortium/ITK/issues/2011
.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's/VTK_OVERRIDE/override/g' \
+ ${WRKSRC}/vv/vtkVOXImageWriter.h \
+ ${WRKSRC}/vv/vvAnimatedGIFWriter.h \
+ ${WRKSRC}/vv/vvBlendImageActor.h \
+ ${WRKSRC}/vv/vvClipPolyData.h \
+ ${WRKSRC}/vv/vvGlyph2D.h \
+ ${WRKSRC}/vv/vvGlyphSource.h \
+ ${WRKSRC}/vv/vvInteractorStyleNavigator.h \
+ ${WRKSRC}/vv/vvLandmarksGlyph.h \
+ ${WRKSRC}/vv/vvSlicer.h
+ @${REINPLACE_CMD} -e 's/Widget()->GetRenderWindow()/Widget()->renderWindow()/g' \
+ ${WRKSRC}/vv/vvToolHistogramCommand.cxx
+ @${REINPLACE_CMD} -e 's/Widget->GetRenderWindow()/Widget->renderWindow()/g' \
+ ${WRKSRC}/vv/vvMainWindow.cxx \
+ ${WRKSRC}/vv/vvSegmentationDialog.cxx \
+ ${WRKSRC}/vv/vvSurfaceViewerDialog.cxx \
+ ${WRKSRC}/vv/vvToolHistogram.cxx \
+ ${WRKSRC}/vv/vvToolProfile.cxx
+ @${REINPLACE_CMD} -e 's/widget->GetRenderWindow()/widget->renderWindow()/g' \
+ ${WRKSRC}/vv/vvMainWindow.cxx
+
post-configure: # workaround for "error: unable to find library -lGTest::GTest", see https://github.com/open-vv/vv/issues/74
@${REINPLACE_CMD} -E 's/ -lGTest::(GTest|Main) / /g' ${BUILD_WRKSRC}/build.ninja
+ @${REINPLACE_CMD} -E 's|/usr/local/lib/libtiff\.so\.[0-9]+\.[0-9]+\.[0-9]+|/usr/local/lib/libtiff.so|g' ${BUILD_WRKSRC}/build.ninja
+.include <../../math/vtk9/Makefile.version>
.include <bsd.port.post.mk>
diff --git a/graphics/vv/distinfo b/graphics/vv/distinfo
index a7748e6e693c..5f0f729f98bf 100644
--- a/graphics/vv/distinfo
+++ b/graphics/vv/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1600492328
-SHA256 (open-vv-vv-v1.4.0-383-g7a783a8b_GH0.tar.gz) = dfa80f7036297e859bf5c6b18b2b187fc05dc50a17f0b074d909e96fa8c2acbb
-SIZE (open-vv-vv-v1.4.0-383-g7a783a8b_GH0.tar.gz) = 4860982
+TIMESTAMP = 1760419528
+SHA256 (open-vv-vv-v1.4.0-406-gd33ac3e8_GH0.tar.gz) = 7f3e10a3a1391ccebd56d685316303b2fbf7f0112417d8caadb4562644cebf06
+SIZE (open-vv-vv-v1.4.0-406-gd33ac3e8_GH0.tar.gz) = 8248327
diff --git a/graphics/vv/files/patch-common_clitkCommon.txx b/graphics/vv/files/patch-common_clitkCommon.txx
new file mode 100644
index 000000000000..8f800d137543
--- /dev/null
+++ b/graphics/vv/files/patch-common_clitkCommon.txx
@@ -0,0 +1,25 @@
+Remove deprecated std::binary_function base class.
+
+C++17 removed std::binary_function which was deprecated in C++11.
+Replace with plain structs that define operator().
+
+--- common/clitkCommon.txx.orig 2025-04-17 12:54:38 UTC
++++ common/clitkCommon.txx
+@@ -135,7 +135,7 @@ template<class Type>
+
+ //--------------------------------------------------------------------
+ template<class Type>
+-struct vectorComparisonLowerThan: public std::binary_function<int, int, bool> {
++struct vectorComparisonLowerThan {
+ vectorComparisonLowerThan(const std::vector<Type> & v):vect(v) {};
+ bool operator()(int x, int y) {
+ return (vect[x] < vect[y]);
+@@ -146,7 +146,7 @@ template<class Type>
+
+ //--------------------------------------------------------------------
+ template<class Type>
+-struct vectorComparisonGreaterThan: public std::binary_function<int, int, bool> {
++struct vectorComparisonGreaterThan {
+ vectorComparisonGreaterThan(const std::vector<Type> & v):vect(v) {};
+ bool operator()(int x, int y) {
+ return (vect[x] > vect[y]);
diff --git a/graphics/vv/files/patch-common_clitkXdrImageIOWriter.cxx b/graphics/vv/files/patch-common_clitkXdrImageIOWriter.cxx
new file mode 100644
index 000000000000..0a7eef8e114b
--- /dev/null
+++ b/graphics/vv/files/patch-common_clitkXdrImageIOWriter.cxx
@@ -0,0 +1,15 @@
+Remove register storage class specifier.
+
+C++17 removed the 'register' keyword which was deprecated in C++11.
+
+--- common/clitkXdrImageIOWriter.cxx.orig 2025-04-17 12:54:38 UTC
++++ common/clitkXdrImageIOWriter.cxx
+@@ -464,7 +464,7 @@ static size_t nki_private_compress(signed char *dest,
+ unsigned long iCRC;
+ unsigned long iCRC2;
+ unsigned int iHeaderSize=8; // value for iMode==1 and iMode==3
+- register int val;
++ int val;
+ size_t i,j;
+ NKI_MODE2* pHeader = (NKI_MODE2*)dest;
+ NKI_MODE2_64BITS* pHeader_64bits = (NKI_MODE2_64BITS*)dest;
diff --git a/graphics/vv/files/patch-common_rtkEdfImageIO.h b/graphics/vv/files/patch-common_rtkEdfImageIO.h
new file mode 100644
index 000000000000..f79dd805a41f
--- /dev/null
+++ b/graphics/vv/files/patch-common_rtkEdfImageIO.h
@@ -0,0 +1,15 @@
+Update ITK enum name for ITK 5.0 compatibility.
+
+ITK 5.0 renamed IOByteOrderEnum to ByteOrder.
+
+--- common/rtkEdfImageIO.h.orig 2025-04-17 12:54:38 UTC
++++ common/rtkEdfImageIO.h
+@@ -100,7 +100,7 @@ class EdfImageIO : public itk::ImageIOBase (protected)
+ // table key-value structure
+ struct table {
+ const char *key;
+- itk::ImageIOBase::IOByteOrderEnum value;
++ itk::ImageIOBase::ByteOrder value;
+ };
+
+ struct table3 {
diff --git a/graphics/vv/files/patch-itk_RelativePositionPropImageFilter.txx b/graphics/vv/files/patch-itk_RelativePositionPropImageFilter.txx
new file mode 100644
index 000000000000..f6d963c9eada
--- /dev/null
+++ b/graphics/vv/files/patch-itk_RelativePositionPropImageFilter.txx
@@ -0,0 +1,30 @@
+Remove register storage class specifier.
+
+C++17 removed the 'register' keyword which was deprecated in C++11.
+
+--- itk/RelativePositionPropImageFilter.txx.orig 2025-04-17 12:54:38 UTC
++++ itk/RelativePositionPropImageFilter.txx
+@@ -365,12 +365,12 @@ namespace itk
+
+ typename TabulationImageType::IndexType start;
+
+- for(register int i=0;i<ImageDimension;i++)
++ for(int i=0;i<ImageDimension;i++)
+ start[i]=0;
+
+ typename TabulationImageType::SizeType size = this->GetInput()->GetLargestPossibleRegion().GetSize();
+
+- for(register int i=0;i<ImageDimension;i++)
++ for(int i=0;i<ImageDimension;i++)
+ size[i]*=2;
+
+ typename TabulationImageType::RegionType region;
+@@ -390,7 +390,7 @@ namespace itk
+ m_AngleTabulation->GetRequestedRegion().GetIndex();
+
+ typename TabulationImageType::SizeType center = this->GetInput()->GetLargestPossibleRegion().GetSize();
+- for(register int i=0;i<ImageDimension;i++)
++ for(int i=0;i<ImageDimension;i++)
+ center[i]-=1;
+
+ VectorType vecttemp;
diff --git a/graphics/vv/files/patch-vv_vv.cxx b/graphics/vv/files/patch-vv_vv.cxx
index b3517f001de0..1167955d887f 100644
--- a/graphics/vv/files/patch-vv_vv.cxx
+++ b/graphics/vv/files/patch-vv_vv.cxx
@@ -1,11 +1,36 @@
---- vv/vv.cxx.orig 2020-09-19 05:31:12 UTC
+Update for VTK 9 and fix platform-specific code.
+
+- Replace QVTKOpenGLWidget with QVTKOpenGLNativeWidget (VTK 9 API change)
+- Wrap Windows-specific #pragma in #ifdef _WIN32 to prevent linking errors
+ on non-Windows platforms
+
+--- vv/vv.cxx.orig 2025-04-17 12:54:38 UTC
+++ vv/vv.cxx
-@@ -53,7 +53,7 @@
+@@ -43,7 +43,7 @@
+ #include "vvToolsList.h"
+ #include "vvConfiguration.h"
+ #if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9
+-#include <QVTKOpenGLWidget.h>
++#include <QVTKOpenGLNativeWidget.h>
+ #endif
+
+ #include <vtkFileOutputWindow.h>
+@@ -56,7 +56,9 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
--#pragma comment(lib, "ws2_32.lib")
-+//#pragma comment(lib, "ws2_32.lib")
++#ifdef _WIN32
+ #pragma comment(lib, "ws2_32.lib")
++#endif
typedef enum {O_BASE,O_OVERLAY,O_FUSION,O_VF,O_CONTOUR,O_LANDMARKS} OpenModeType;
typedef enum {P_NORMAL,P_SEQUENCE,P_WINDOW,P_LEVEL} ParseModeType;
+@@ -119,7 +121,7 @@ int main( int argc, char** argv )
+ #endif
+
+ #if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9
+- QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
++ QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());
+ #endif
+ CLITK_INIT;
+
diff --git a/graphics/vv/files/patch-vv_vvBlendImageActor.cxx b/graphics/vv/files/patch-vv_vvBlendImageActor.cxx
new file mode 100644
index 000000000000..0f2bd047929a
--- /dev/null
+++ b/graphics/vv/files/patch-vv_vvBlendImageActor.cxx
@@ -0,0 +1,56 @@
+Update OpenGL and VTK headers for VTK 9 compatibility.
+
+VTK 9 removed several deprecated headers and changed OpenGL handling:
+- Removed vtk_glew.h and vtkOpenGL.h (no longer needed)
+- Added vtkOpenGLState.h and vtk_glad.h for modern OpenGL
+- Replaced vtkgl::BlendEquationEXT with standard glBlendEquation
+ (OpenGL 3.2+ has blend equations built-in, no extensions needed)
+
+--- vv/vvBlendImageActor.cxx.orig 2025-04-17 12:54:38 UTC
++++ vv/vvBlendImageActor.cxx
+@@ -3,7 +3,7 @@ - University of LYON http://www.universit
+
+ Authors belong to:
+ - University of LYON http://www.universite-lyon.fr/
+-- Léon Bérard cancer center http://www.centreleonberard.fr
++- L�on B�rard cancer center http://www.centreleonberard.fr
+ - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+@@ -17,11 +17,11 @@ - CeCILL-B http://www.cecill.info/licences/Licence_C
+ ===========================================================================**/
+
+ #include "vvBlendImageActor.h"
+-#include <vtk_glew.h>
+ #include <vtkOpenGLRenderWindow.h>
+ #include <vtkOpenGLRenderer.h>
+-#include <vtkOpenGL.h>
+ #include <vtkObjectFactory.h>
++#include <vtkOpenGLState.h>
++#include <vtk_glad.h>
+
+ vtkStandardNewMacro(vvBlendImageActor);
+
+@@ -45,19 +45,14 @@ void vvBlendImageActor::Render(vtkRenderer *ren)
+ VTK_IMAGE_ACTOR::Render(ren);
+
+ #else
+- vtkOpenGLExtensionManager *extensions = renwin->GetExtensionManager();
+- if (extensions->ExtensionSupported("GL_EXT_blend_minmax")) {
+- extensions->LoadExtension("GL_EXT_blend_minmax");
+- vtkgl::BlendEquationEXT( vtkgl::MAX );
+- }
++ // VTK 9 uses OpenGL 3.2+ which has blend equations built-in
++ glBlendEquation(GL_MAX);
+
+ //Call normal render
+ VTK_IMAGE_ACTOR::Render(ren);
+
+ //Move back blending to weighted sum
+- if (vtkgl::BlendEquationEXT!=0) {
+- vtkgl::BlendEquationEXT( vtkgl::FUNC_ADD );
+- }
++ glBlendEquation(GL_FUNC_ADD);
+ #endif
+ }
+
diff --git a/graphics/vv/files/patch-vv_vvSlicer.cxx b/graphics/vv/files/patch-vv_vvSlicer.cxx
new file mode 100644
index 000000000000..7612f66f5b5e
--- /dev/null
+++ b/graphics/vv/files/patch-vv_vvSlicer.cxx
@@ -0,0 +1,25 @@
+Update for VTK 9 compatibility.
+
+- Remove deprecated vtkToolkits.h header (no longer exists in VTK 9)
+- Convert vtkStdString to const char* when calling SetCaption()
+ (VTK 9 changed API to require explicit conversion)
+
+--- vv/vvSlicer.cxx.orig 2025-04-17 12:54:38 UTC
++++ vv/vvSlicer.cxx
+@@ -44,7 +44,6 @@
+ #include <vtkImageData.h>
+ #include <vtkImageActor.h>
+ #include <vvBlendImageActor.h>
+-#include <vtkToolkits.h>
+ #include <vtkObjectFactory.h>
+ #include <vtkPointData.h>
+ #include <vtkDataArray.h>
+@@ -1877,7 +1876,7 @@ void vvSlicer::DisplayLandmarks()
+ double *position = mLandClipper->GetOutput()->GetPoint(id);
+ vtkStdString label = static_cast<vtkStringArray*>(mLandClipper->GetOutput()->GetPointData()->GetAbstractArray("labels"))->GetValue(id);
+ vtkSmartPointer<vtkCaptionActor2D> label_actor = vtkSmartPointer<vtkCaptionActor2D>::New();
+- label_actor->SetCaption(label);
++ label_actor->SetCaption(label.c_str());
+ label_actor->SetAttachmentPoint(position);
+ label_actor->GetCaptionTextProperty()->SetColor(1,0,0);
+ label_actor->GetCaptionTextProperty()->SetOrientation(33.333333);