- Add an OPTION to build with leak debugging support

- Add an OPTION to build without legacy code
- Fix Qt4 includes (fixes a conflict when both Qt3 and Qt4 are installed)
  Reported upstream: http://www.vtk.org/Bug/view.php?id=13888
This commit is contained in:
Pietro Cerutti 2013-02-18 15:28:05 +00:00
parent 68de448f3f
commit 6f210fbe44
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=312511
3 changed files with 111 additions and 27 deletions

View file

@ -1,4 +1,4 @@
# Created by: Mykola Khotyaintsev <ko@irfu.se>,
# Created by: Mykola Khotyaintsev <ko@irfu.se>
# $FreeBSD$
PORTNAME= vtk
@ -29,13 +29,16 @@ USE_LDCONFIG= ${PREFIX}/lib/vtk-${PORTVERSION:R}
CXXFLAGS+= -DUSE_INTERP_ERRORLINE
MAKE_JOBS_SAFE= yes
OPTIONS_DEFINE= SHARED VTKMPEG2 GL2PS OSMESA QT4 JAVA PYTHON TCLTK
OPTIONS_DEFAULT=SHARED GL2PS QT4 PYTHON TCLTK
OPTIONS_DEFINE= SHARED VTKMPEG2 GL2PS OSMESA QT4 JAVA PYTHON TCLTK \
DBGLEAKS LEGACY
OPTIONS_DEFAULT=SHARED GL2PS QT4 PYTHON TCLTK LEGACY
SHARED_DESC= Build shared libraries
VTKMPEG2_DESC= Patented MPEG2 encoder module
GL2PS_DESC= OpenGL to PostScript conversion module
OSMESA_DESC= Use Mesa for off-screen rendering
DBGLEAKS_DESC= Build leak checking support
LEGACY_DESC= Include legacy code
PLIST_SUB+= VER1="${PORTVERSION}" \
VER2="${PORTVERSION:R}" \
@ -172,6 +175,7 @@ IGNORE= java wrapping requires shared libraries.\
.if ${ARCH} == "amd64"
CXXFLAGS+= -fPIC
.endif
CATEGORIES+= java
USE_JAVA= yes
JAVA_VENDOR= openjdk
JAVA_VERSION= 1.6+
@ -193,6 +197,20 @@ PLIST_SUB+= WRAPPING=""
PLIST_SUB+= WRAPPING="@comment "
.endif
.if ${PORT_OPTIONS:MDBGLEAKS}
CMAKE_ARGS+= -DVTK_DEBUG_LEAKS:BOOL=ON
.else
CMAKE_ARGS+= -DVTK_DEBUG_LEAKS:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MLEGACY}
CMAKE_ARGS+= -DVTK_LEGACY_REMOVE:BOOL=OFF
PLIST_SUB+= LEGACY=""
.else
CMAKE_ARGS+= -DVTK_LEGACY_REMOVE:BOOL=ON
PLIST_SUB+= LEGACY="@comment "
.endif
post-patch:
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \
${WRKSRC}/Hybrid/vtkVRMLImporter.cxx

66
math/vtk5/files/patch-qt4 Normal file
View file

@ -0,0 +1,66 @@
--- GUISupport/Qt/vtkQtConnection.h.orig 2013-02-18 14:31:05.000000000 +0100
+++ GUISupport/Qt/vtkQtConnection.h 2013-02-18 14:30:33.000000000 +0100
@@ -33,7 +33,7 @@
#include "vtkObject.h"
#include "vtkCommand.h" // for event defines
-#include "qobject.h"
+#include <QObject>
class QObject;
class vtkCallbackCommand;
--- GUISupport/Qt/QVTKWidget.cxx.orig 2013-02-18 14:31:29.000000000 +0100
+++ GUISupport/Qt/QVTKWidget.cxx 2013-02-18 14:34:52.000000000 +0100
@@ -38,11 +38,12 @@
#include "QVTKInteractorAdapter.h"
#include "QVTKInteractor.h"
-#include "qevent.h"
-#include "qapplication.h"
-#include "qpainter.h"
-#include "qsignalmapper.h"
-#include "qtimer.h"
+#include <QEvent>
+#include <QKeyEvent>
+#include <QApplication>
+#include <QPainter>
+#include <QSignalMapper>
+#include <QTimer>
#if defined(Q_WS_X11)
#include "qx11info_x11.h"
#endif
--- GUISupport/Qt/vtkQtSQLQuery.cxx.orig 2013-02-18 14:39:23.000000000 +0100
+++ GUISupport/Qt/vtkQtSQLQuery.cxx 2013-02-18 14:39:53.000000000 +0100
@@ -19,7 +19,7 @@
-------------------------------------------------------------------------*/
// Check for Qt SQL module before defining this class.
-#include <qglobal.h>
+#include <Qt/qglobal.h>
#if (QT_EDITION & QT_MODULE_SQL)
#include "vtkQtSQLQuery.h"
--- GUISupport/Qt/vtkQtConnection.cxx.orig 2013-02-18 14:43:41.000000000 +0100
+++ GUISupport/Qt/vtkQtConnection.cxx 2013-02-18 14:43:54.000000000 +0100
@@ -28,8 +28,8 @@
#include "vtkEventQtSlotConnect.h"
#include "vtkCallbackCommand.h"
-#include <qobject.h>
-#include <qmetaobject.h>
+#include <QObject>
+#include <QMetaObject>
// constructor
vtkQtConnection::vtkQtConnection(vtkEventQtSlotConnect* owner)
--- GUISupport/Qt/vtkQtSQLDatabase.cxx.orig 2013-02-18 14:44:08.000000000 +0100
+++ GUISupport/Qt/vtkQtSQLDatabase.cxx 2013-02-18 14:44:16.000000000 +0100
@@ -19,7 +19,7 @@
-------------------------------------------------------------------------*/
// Check for Qt SQL module before defining this class.
-#include <qglobal.h>
+#include <Qt/qglobal.h>
#if (QT_EDITION & QT_MODULE_SQL)
#include "vtkQtSQLDatabase.h"

View file

@ -962,7 +962,7 @@ include/vtk-%%VER2%%/vtkExodusIIReaderParser.h
include/vtk-%%VER2%%/vtkExodusIIReaderVariableCheck.h
include/vtk-%%VER2%%/vtkExodusIIWriter.h
include/vtk-%%VER2%%/vtkExodusModel.h
include/vtk-%%VER2%%/vtkExodusReader.h
%%LEGACY%%include/vtk-%%VER2%%/vtkExodusReader.h
include/vtk-%%VER2%%/vtkExpandSelectedGraph.h
include/vtk-%%VER2%%/vtkExplicitCell.h
include/vtk-%%VER2%%/vtkExporter.h
@ -1204,7 +1204,7 @@ include/vtk-%%VER2%%/vtkIdFilter.h
include/vtk-%%VER2%%/vtkIdList.h
include/vtk-%%VER2%%/vtkIdListCollection.h
include/vtk-%%VER2%%/vtkIdTypeArray.h
include/vtk-%%VER2%%/vtkIdentColoredPainter.h
%%LEGACY%%include/vtk-%%VER2%%/vtkIdentColoredPainter.h
include/vtk-%%VER2%%/vtkIdentityTransform.h
include/vtk-%%VER2%%/vtkImageAccumulate.h
include/vtk-%%VER2%%/vtkImageActor.h
@ -1322,7 +1322,7 @@ include/vtk-%%VER2%%/vtkImageSobel2D.h
include/vtk-%%VER2%%/vtkImageSobel3D.h
include/vtk-%%VER2%%/vtkImageSource.h
include/vtk-%%VER2%%/vtkImageSpatialAlgorithm.h
include/vtk-%%VER2%%/vtkImageSpatialFilter.h
%%LEGACY%%include/vtk-%%VER2%%/vtkImageSpatialFilter.h
include/vtk-%%VER2%%/vtkImageStencil.h
include/vtk-%%VER2%%/vtkImageStencilAlgorithm.h
include/vtk-%%VER2%%/vtkImageStencilData.h
@ -1637,7 +1637,7 @@ include/vtk-%%VER2%%/vtkPDataSetReader.h
include/vtk-%%VER2%%/vtkPDataSetWriter.h
include/vtk-%%VER2%%/vtkPDescriptiveStatistics.h
include/vtk-%%VER2%%/vtkPExodusIIReader.h
include/vtk-%%VER2%%/vtkPExodusReader.h
%%LEGACY%%include/vtk-%%VER2%%/vtkPExodusReader.h
include/vtk-%%VER2%%/vtkPExtractArraysOverTime.h
include/vtk-%%VER2%%/vtkPExtractHistogram2D.h
include/vtk-%%VER2%%/vtkPHardwareSelector.h
@ -2286,7 +2286,7 @@ include/vtk-%%VER2%%/vtkViewUpdater.h
include/vtk-%%VER2%%/vtkViewport.h
include/vtk-%%VER2%%/vtkViewsInstantiator.h
include/vtk-%%VER2%%/vtkVisibilitySort.h
include/vtk-%%VER2%%/vtkVisibleCellSelector.h
%%LEGACY%%include/vtk-%%VER2%%/vtkVisibleCellSelector.h
include/vtk-%%VER2%%/vtkVoidArray.h
include/vtk-%%VER2%%/vtkVolume.h
include/vtk-%%VER2%%/vtkVolume16Reader.h
@ -2845,24 +2845,24 @@ include/vtk-%%VER2%%/vtknetcdf/include/netcdfcpp.h
include/vtk-%%VER2%%/vtknetcdf/include/vtk_netcdf_config.h
include/vtk-%%VER2%%/vtknetcdf/include/vtk_netcdf_mangle.h
include/vtk-%%VER2%%/vtksqlite/vtk_sqlite3.h
include/vtk-%%VER2%%/vtkstd/algorithm
include/vtk-%%VER2%%/vtkstd/deque
include/vtk-%%VER2%%/vtkstd/exception
include/vtk-%%VER2%%/vtkstd/functional
include/vtk-%%VER2%%/vtkstd/iterator
include/vtk-%%VER2%%/vtkstd/limits
include/vtk-%%VER2%%/vtkstd/list
include/vtk-%%VER2%%/vtkstd/map
include/vtk-%%VER2%%/vtkstd/memory
include/vtk-%%VER2%%/vtkstd/new
include/vtk-%%VER2%%/vtkstd/numeric
include/vtk-%%VER2%%/vtkstd/queue
include/vtk-%%VER2%%/vtkstd/set
include/vtk-%%VER2%%/vtkstd/stack
include/vtk-%%VER2%%/vtkstd/stdexcept
include/vtk-%%VER2%%/vtkstd/string
include/vtk-%%VER2%%/vtkstd/utility
include/vtk-%%VER2%%/vtkstd/vector
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/algorithm
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/deque
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/exception
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/functional
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/iterator
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/limits
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/list
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/map
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/memory
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/new
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/numeric
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/queue
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/set
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/stack
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/stdexcept
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/string
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/utility
%%LEGACY%%include/vtk-%%VER2%%/vtkstd/vector
include/vtk-%%VER2%%/vtksys/Base64.h
include/vtk-%%VER2%%/vtksys/CommandLineArguments.hxx
include/vtk-%%VER2%%/vtksys/Configure.h
@ -3172,7 +3172,7 @@ lib/vtk-%%VER2%%/vtkWidgetsKit.cmake
@dirrm include/vtk-%%VER2%%/vtksys/stl
@dirrm include/vtk-%%VER2%%/vtksys/ios
@dirrm include/vtk-%%VER2%%/vtksys
@dirrm include/vtk-%%VER2%%/vtkstd
%%LEGACY%%@dirrm include/vtk-%%VER2%%/vtkstd
@dirrm include/vtk-%%VER2%%/vtksqlite
@dirrm include/vtk-%%VER2%%/vtknetcdf/include
@dirrm include/vtk-%%VER2%%/vtknetcdf