aboutsummaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorChristoph Moench-Tegeder <cmt@FreeBSD.org>2021-07-07 07:54:41 +0000
committerChristoph Moench-Tegeder <cmt@FreeBSD.org>2021-07-07 07:55:32 +0000
commitf3c231d641aa6fa2a29dc5d7767eb22caf3c4b5b (patch)
treec50ff48b973cb00a3b6bb6d62313632d469e8005 /cad
parent53c01d65985faea7bd864702cefb2f9e6ef4d3a8 (diff)
downloadports-f3c231d641aa6fa2a29dc5d7767eb22caf3c4b5b.tar.gz
ports-f3c231d641aa6fa2a29dc5d7767eb22caf3c4b5b.zip
cad/opencascade: switch to vtk9
- switches opencascade to vtk9 to enable upcoming import of cad/py-ocp - cad/freecad has to switch vtk8 -> vtk9, too - this requires upstream commit 0cfea3fee3e7848bbf043d2b1a19f6405d7ebe25 "Make smesh compile with vtk9" - while touching this, fixes vtk module detection - clean up VTK_DIR usage: that variable does not exist in FreeCAD's build system anymore (for quite some time, actually) Obtained from: opencascade upstream: Kirill Gavrilov Obtained from: freecad upstream: committed by github/wwmayer Differential Revision: D30934 Reported by: thierry@ Submitted by: thierry@
Diffstat (limited to 'cad')
-rw-r--r--cad/freecad/Makefile10
-rw-r--r--cad/freecad/distinfo2
-rw-r--r--cad/freecad/files/patch-cMake_FreeCAD__Helpers_SetupSalomeSMESH.cmake40
-rw-r--r--cad/opencascade/Makefile12
-rw-r--r--cad/opencascade/files/patch-adm_cmake_occt__csf.cmake5
-rw-r--r--cad/opencascade/files/patch-adm_cmake_occt__macros.cmake6
-rw-r--r--cad/opencascade/files/patch-adm_templates_OpenCASCADEConfig.cmake.in4
-rw-r--r--cad/opencascade/files/patch-adm_templates_custom.install.sh.in4
-rw-r--r--cad/opencascade/files/patch-src_DrawResources_CheckCommands.tcl21
-rw-r--r--cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw.cxx15
-rw-r--r--cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw__Interactor.cxx16
-rw-r--r--cad/opencascade/files/patch-src_Standard_Standard__CString.cxx4
12 files changed, 107 insertions, 32 deletions
diff --git a/cad/freecad/Makefile b/cad/freecad/Makefile
index c4e79075928c..722c12aaab37 100644
--- a/cad/freecad/Makefile
+++ b/cad/freecad/Makefile
@@ -1,11 +1,14 @@
PORTNAME= FreeCAD
DISTVERSION= 0.19.2
-PORTREVISION= 2
+PORTREVISION= 3
# use these for bugfixes/snapshots
# DISTVERSION= 0.18-16093 # git rev-list --count
# DISTVERSIONSUFFIX= -g690774c0e
CATEGORIES= cad
+PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES= 0cfea3fee3e7848bbf043d2b1a19f6405d7ebe25.patch:-p1
+
MAINTAINER= cmt@FreeBSD.org
COMMENT= General purpose 3D CAD modeller
@@ -22,7 +25,7 @@ LIB_DEPENDS= libexpat.so:textproc/expat2 \
libCoin.so:graphics/Coin \
libpng.so:graphics/png \
libtiff.so:graphics/tiff \
- libvtkFiltersTexture-8.2.so:math/vtk8 \
+ libvtksys-${VTK_VER}.so:math/vtk${VTK_VER:R} \
libTKernel.so:cad/opencascade \
libxerces-c.so:textproc/xerces-c3 \
libboost_thread.so:devel/boost-libs \
@@ -43,6 +46,8 @@ USE_QT= buildtools concurrent core gui network opengl printsupport \
qmake_build svg webkit widgets xml xmlpatterns
USE_LDCONFIG= yes
+VTK_VER= 9.0
+
DOS2UNIX_GLOB= *.txt *.h *.cpp *.py *.qss *.csv *.pov *.stp *.ui *.wrl *.WRL
CMAKE_ARGS+= -DOCC_INCLUDE_DIR="${LOCALBASE}/include/OpenCASCADE" \
@@ -55,7 +60,6 @@ CMAKE_ARGS+= -DOCC_INCLUDE_DIR="${LOCALBASE}/include/OpenCASCADE" \
-DBUILD_ASSEMBLY="OFF" -DBUILD_FLAT_MESH="ON" \
-DPYSIDE2RCCBINARY="${RCC}" \
-DPYSIDE2UICBINARY="${UIC}" \
- -DVTK_DIR:PATH=${LOCALBASE}/lib/vtk-8.2/cmake/vtk-8.2 \
-DBUILD_ENABLE_CXX_STD=C++17
CMAKE_INSTALL_PREFIX= ${PREFIX}/${PORTNAME}
diff --git a/cad/freecad/distinfo b/cad/freecad/distinfo
index 9c0a49aae4b7..0d679a782f99 100644
--- a/cad/freecad/distinfo
+++ b/cad/freecad/distinfo
@@ -1,3 +1,5 @@
TIMESTAMP = 1619964737
SHA256 (FreeCAD-FreeCAD-0.19.2_GH0.tar.gz) = 47e39e3d6fcafe6e0c68923fb1b86acda16986268e5e6011694057b940139fba
SIZE (FreeCAD-FreeCAD-0.19.2_GH0.tar.gz) = 296987961
+SHA256 (0cfea3fee3e7848bbf043d2b1a19f6405d7ebe25.patch) = 71a2ad3bc210281d151add9e73beab78eaa1cc6d94bf97db865b4171f8d56d4d
+SIZE (0cfea3fee3e7848bbf043d2b1a19f6405d7ebe25.patch) = 34604
diff --git a/cad/freecad/files/patch-cMake_FreeCAD__Helpers_SetupSalomeSMESH.cmake b/cad/freecad/files/patch-cMake_FreeCAD__Helpers_SetupSalomeSMESH.cmake
new file mode 100644
index 000000000000..2b3bc745c000
--- /dev/null
+++ b/cad/freecad/files/patch-cMake_FreeCAD__Helpers_SetupSalomeSMESH.cmake
@@ -0,0 +1,40 @@
+--- cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake.orig 2021-04-15 09:17:08 UTC
++++ cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake
+@@ -12,24 +12,24 @@ macro(SetupSalomeSMESH)
+
+ #if we use smesh we definitely also need vtk, no matter of external or internal smesh
+ set (VTK_COMPONENTS
+- vtkCommonCore
+- vtkCommonDataModel
+- vtkFiltersVerdict
+- vtkIOXML
+- vtkFiltersCore
+- vtkFiltersGeneral
+- vtkIOLegacy
+- vtkFiltersExtraction
+- vtkFiltersSources
+- vtkFiltersGeometry
++ CommonCore
++ tkCommonDataModel
++ tkFiltersVerdict
++ tkIOXML
++ tkFiltersCore
++ tkFiltersGeneral
++ tkIOLegacy
++ tkFiltersExtraction
++ tkFiltersSources
++ tkFiltersGeometry
+ )
+
+ # check which modules are available
+ if(UNIX OR WIN32)
+- find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
+- list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2)
++ find_package(VTK COMPONENTS CommonCore REQUIRED NO_MODULE)
++ list(APPEND VTK_COMPONENTS IOMPIParallel ParallelMPI hdf5 FiltersParallelDIY2 RenderingCore InteractionStyle RenderingFreeType RenderingOpenGL2)
+ foreach(_module ${VTK_COMPONENTS})
+- list (FIND VTK_MODULES_ENABLED ${_module} _index)
++ list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index)
+ if (${_index} GREATER -1)
+ list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
+ endif()
diff --git a/cad/opencascade/Makefile b/cad/opencascade/Makefile
index 5b163334736f..3ff291a6a28c 100644
--- a/cad/opencascade/Makefile
+++ b/cad/opencascade/Makefile
@@ -2,7 +2,7 @@
PORTNAME= opencascade
PORTVERSION= 7.5.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= cad science
MASTER_SITES= LOCAL/thierry
@@ -18,8 +18,8 @@ BUILD_DEPENDS= rapidjson>0:devel/rapidjson \
${LOCALBASE}/lib/qt5/bin/qmake:devel/qt5-qmake \
${LOCALBASE}/lib/qt5/bin/moc:devel/qt5-buildtools
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
- libvtksys-${VTKVER}.so:math/vtk8 \
- libfreetype.so:print/freetype2
+ libfreetype.so:print/freetype2 \
+ libvtksys-${VTKVER}.so:math/vtk${VTKVER:R}
RUN_DEPENDS= bash:shells/bash
# Check ${WRKSRC}/dox/overview/overview.md
@@ -27,7 +27,7 @@ RUN_DEPENDS= bash:shells/bash
USES= alias:10 cmake compiler:c++14-lang dos2unix \
gl python qt:5 shebangfix tk tar:tgz xorg
USE_XORG= ice sm x11 xext xi xmu xt
-USE_GL= gl glu
+USE_GL= egl gl glesv2 glu
DOS2UNIX_FILES= adm/templates/*
SHEBANG_FILES= adm/templates/*.sh \
@@ -38,7 +38,7 @@ SHEBANG_FILES= adm/templates/*.sh \
gendoc
ENVSH= adm/templates/env.sh
-VTKVER= 8.2
+VTKVER= 9.0
OPTIONS_DEFINE= DOCS DOXYGEN FFMPEG VIS
VIS_DESC= Build Visualizazion module (requires OpenGL, freetype, ftgl)
@@ -59,7 +59,7 @@ CMAKE_ARGS+= -DINSTALL_DIR=${OCCROOT} \
-DUSE_TBB:BOOL=OFF \
-DUSE_RAPIDJSON:BOOL=ON \
-DUSE_VTK:BOOL=ON \
- -DVTK_DIR:PATH=${LOCALBASE}/lib/vtk-${VTKVER}/cmake/vtk-${VTKVER}
+ -D3RDPARTY_VTK_INCLUDE_DIR:PATH=${LOCALBASE}/include/vtk-${VTKVER}
# TODO: TBB to be replaced by onetbb later
#CMAKE_ARGS+= -DUSE_EIGEN:BOOL=ON -DUSE_TBB:BOOL=ON
diff --git a/cad/opencascade/files/patch-adm_cmake_occt__csf.cmake b/cad/opencascade/files/patch-adm_cmake_occt__csf.cmake
index 904f6ae7d25a..0a8b0fdb286e 100644
--- a/cad/opencascade/files/patch-adm_cmake_occt__csf.cmake
+++ b/cad/opencascade/files/patch-adm_cmake_occt__csf.cmake
@@ -1,9 +1,10 @@
---- adm/cmake/occt_csf.cmake.orig 2018-05-25 19:13:23 UTC
+--- adm/cmake/occt_csf.cmake.orig 2020-11-03 14:49:43 UTC
+++ adm/cmake/occt_csf.cmake
-@@ -116,6 +116,5 @@ if (WIN32)
+@@ -124,7 +124,6 @@ else()
set (CSF_OpenGlLibs "GL")
endif()
set (CSF_XwLibs "X11 Xext Xmu Xi")
- set (CSF_dl "dl")
+ set (CSF_fontconfig "fontconfig")
endif()
endif()
diff --git a/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake b/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake
index f4128a3ddc7d..d56ea8699ddf 100644
--- a/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake
+++ b/cad/opencascade/files/patch-adm_cmake_occt__macros.cmake
@@ -1,6 +1,6 @@
---- adm/cmake/occt_macros.cmake.orig 2018-05-25 19:13:23 UTC
+--- adm/cmake/occt_macros.cmake.orig 2020-11-03 14:49:43 UTC
+++ adm/cmake/occt_macros.cmake
-@@ -53,7 +53,7 @@ macro (OCCT_MAKE_OS_WITH_BITNESS)
+@@ -47,7 +47,7 @@ macro (OCCT_MAKE_OS_WITH_BITNESS)
elseif(APPLE)
set (OS_WITH_BIT "mac${COMPILER_BITNESS}")
else()
@@ -9,7 +9,7 @@
endif()
endmacro()
-@@ -337,7 +337,7 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_F
+@@ -336,7 +336,7 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARG
configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/${OCCT_INSTALL_DIR_PREFIX}/${HEADER_FILE_NAME}" @ONLY)
endforeach()
diff --git a/cad/opencascade/files/patch-adm_templates_OpenCASCADEConfig.cmake.in b/cad/opencascade/files/patch-adm_templates_OpenCASCADEConfig.cmake.in
index 06c2689a20e8..b84b8b2d32c5 100644
--- a/cad/opencascade/files/patch-adm_templates_OpenCASCADEConfig.cmake.in
+++ b/cad/opencascade/files/patch-adm_templates_OpenCASCADEConfig.cmake.in
@@ -1,6 +1,6 @@
---- adm/templates/OpenCASCADEConfig.cmake.in.orig 2017-12-27 14:54:08 UTC
+--- adm/templates/OpenCASCADEConfig.cmake.in.orig 2021-06-26 15:04:30 UTC
+++ adm/templates/OpenCASCADEConfig.cmake.in
-@@ -31,11 +31,11 @@ if (OpenCASCADE_INSTALL_PREFIX MATCHES "
+@@ -36,11 +36,11 @@ if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_
endif()
# Set OpenCASCADE paths to headers, binaries, libraries, resources, tests, samples, data
diff --git a/cad/opencascade/files/patch-adm_templates_custom.install.sh.in b/cad/opencascade/files/patch-adm_templates_custom.install.sh.in
index 7994fab5deff..ac764e67831a 100644
--- a/cad/opencascade/files/patch-adm_templates_custom.install.sh.in
+++ b/cad/opencascade/files/patch-adm_templates_custom.install.sh.in
@@ -1,6 +1,6 @@
---- adm/templates/custom.install.sh.in.orig 2017-12-27 14:54:08 UTC
+--- adm/templates/custom.install.sh.in.orig 2021-06-26 15:04:30 UTC
+++ adm/templates/custom.install.sh.in
-@@ -21,14 +21,14 @@ if [ "$1" == "@BIN_LETTER@" ]; then
+@@ -20,14 +20,14 @@ if [ "$1" == "@BIN_LETTER@" ]; then
export TCL_VERSION_WITH_DOT="@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
export TK_VERSION_WITH_DOT="@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
diff --git a/cad/opencascade/files/patch-src_DrawResources_CheckCommands.tcl b/cad/opencascade/files/patch-src_DrawResources_CheckCommands.tcl
index ed30fa375382..20df73cb3858 100644
--- a/cad/opencascade/files/patch-src_DrawResources_CheckCommands.tcl
+++ b/cad/opencascade/files/patch-src_DrawResources_CheckCommands.tcl
@@ -1,6 +1,6 @@
---- src/DrawResources/CheckCommands.tcl.orig 2018-05-25 19:13:38 UTC
+--- src/DrawResources/CheckCommands.tcl.orig 2020-11-03 14:49:56 UTC
+++ src/DrawResources/CheckCommands.tcl
-@@ -1036,6 +1036,7 @@ help checkplatform {
+@@ -1053,6 +1053,7 @@ help checkplatform {
-windows : return 1 if current platform is 'Windows', overwise return 0
-linux : return 1 if current platform is 'Linux', overwise return 0
-osx : return 1 if current platform is 'MacOS X', overwise return 0
@@ -8,7 +8,7 @@
Only one option can be used at once.
If no option is given, procedure will return the name of current platform.
-@@ -1044,9 +1045,11 @@ proc checkplatform {args} {
+@@ -1061,9 +1062,11 @@ proc checkplatform {args} {
set check_for_windows false
set check_for_linux false
set check_for_macosx false
@@ -20,7 +20,7 @@
{"-osx" check_for_macosx 0}}
_check_args ${args} ${options} "checkplatform"
-@@ -1055,17 +1058,19 @@ proc checkplatform {args} {
+@@ -1072,17 +1075,19 @@ proc checkplatform {args} {
set current_platform Windows
} elseif { $::tcl_platform(os) == "Linux" } {
set current_platform Linux
@@ -42,21 +42,18 @@
error "Error: wrong usage of command checkplatform, only single option can be used at once"
}
-@@ -1074,11 +1079,16 @@ proc checkplatform {args} {
+@@ -1091,8 +1096,13 @@ proc checkplatform {args} {
return 1
}
- # checking for Mac OS X platforms
+ # checking for Linux platforms
if { ${check_for_linux} && ${current_platform} == "Linux" } {
- return 1
- }
-
-+ # checking for FreeBSD platforms
-+ if { ${check_for_freebsd} && ${current_platform} == "FreeBSD" } {
+ return 1
+ }
+
- # checking for Mac OS X platforms
- if { ${check_for_macosx} && ${current_platform} == "MacOS" } {
++ # checking for FreeBSD platforms
++ if { ${check_for_freebsd} && ${current_platform} == "FreeBSD" } {
return 1
+ }
+
diff --git a/cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw.cxx b/cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw.cxx
new file mode 100644
index 000000000000..3184727b086b
--- /dev/null
+++ b/cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw.cxx
@@ -0,0 +1,15 @@
+--- src/IVtkDraw/IVtkDraw.cxx.orig 2020-11-03 14:50:01 UTC
++++ src/IVtkDraw/IVtkDraw.cxx
+@@ -36,6 +36,12 @@
+ #include <V3d_TypeOfOrientation.hxx>
+ #include <Aspect_DisplayConnection.hxx>
+
++// Preventing naming collisions between
++// GLX and VTK versions 9.0 and above
++#ifdef AllValues
++#undef AllValues
++#endif
++
+ #include <IVtk_Types.hxx>
+ #include <IVtkVTK_ShapeData.hxx>
+ #include <IVtkOCC_Shape.hxx>
diff --git a/cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw__Interactor.cxx b/cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw__Interactor.cxx
new file mode 100644
index 000000000000..290e6a0bbc53
--- /dev/null
+++ b/cad/opencascade/files/patch-src_IVtkDraw_IVtkDraw__Interactor.cxx
@@ -0,0 +1,16 @@
+--- src/IVtkDraw/IVtkDraw_Interactor.cxx.orig 2020-11-03 14:50:01 UTC
++++ src/IVtkDraw/IVtkDraw_Interactor.cxx
+@@ -20,6 +20,13 @@
+ #include <vtkWin32OpenGLRenderWindow.h>
+ #else
+ #include <GL/glx.h>
++
++// Preventing naming collisions between
++// GLX and VTK versions 9.0 and above
++#ifdef AllValues
++#undef AllValues
++#endif
++
+ #include <vtkXRenderWindowInteractor.h>
+ #include <vtkXOpenGLRenderWindow.h>
+ #endif
diff --git a/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx b/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx
index a6755f655f11..a8162b9e0c23 100644
--- a/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx
+++ b/cad/opencascade/files/patch-src_Standard_Standard__CString.cxx
@@ -1,6 +1,6 @@
---- src/Standard/Standard_CString.cxx.orig 2017-08-30 13:28:31 UTC
+--- src/Standard/Standard_CString.cxx.orig 2020-11-03 14:50:08 UTC
+++ src/Standard/Standard_CString.cxx
-@@ -81,7 +81,7 @@ Standard_Integer HashCodes (const Standa
+@@ -83,7 +83,7 @@ Standard_Integer HashCodes (const Standard_CString the
// strtod, strtol, strtoll functions. For other system with locale-depended
// implementations problems may appear if "C" locale is not set explicitly.
#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__MINGW32__)