aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorChristoph Willing <chris.willing@linux.com>2023-04-03 21:52:55 +1000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-08 09:16:37 +0700
commit0ce3f57d5e31d6a7e6bc63f4734efaad32d1ad5d (patch)
tree3bbb90456bbcf53a348cd2c0f9b267f39810ed0b /graphics
parent260fda7410618ee1d32cef9c78ba4ca0d845b050 (diff)
graphics/OpenCASCADE: Updated for version 7.7.0
Signed-off-by: Christoph Willing <chris.willing@linux.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/OpenCASCADE/OpenCASCADE.SlackBuild26
-rw-r--r--graphics/OpenCASCADE/OpenCASCADE.info6
-rw-r--r--graphics/OpenCASCADE/README5
-rw-r--r--graphics/OpenCASCADE/fix-flow-control-nesting.patch31
-rw-r--r--graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff64
-rw-r--r--graphics/OpenCASCADE/occt.git-7f523af8e8a63ee17d8fc26f107c191cd51dcd44.patch36
6 files changed, 52 insertions, 116 deletions
diff --git a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
index 301344e5269df..9be1dd9335e34 100644
--- a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
+++ b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
@@ -27,13 +27,12 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=OpenCASCADE
-VERSION=${VERSION:-7.3.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-7.7.0}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-SRCNAM=occt
-SRCVER=V$(echo $VERSION | tr . _)
+SRCNAM=opencascade
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -74,9 +73,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$SRCVER
-tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
-cd $SRCNAM-$SRCVER
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tgz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -84,11 +83,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch -p1 < $CWD/fix-flow-control-nesting.patch
-
-# Thanks to Chris Willing for the fix for VTK-8.1.0 compatibility.
-# This new version of the patch is still needed for occt 7.3.0 :(
-patch -p0 < $CWD/occt-7.3.0_vtk_InsertNextTupleValue.diff
+patch -p1 < $CWD/occt.git-7f523af8e8a63ee17d8fc26f107c191cd51dcd44.patch
+sed -i -e '/#include <iostream>/a#include <limits>' src/ViewerTest/ViewerTest_CmdParser.cxx
# Fix bogus install path
sed -i -e 's|\${INSTALL_DIR}/\${INSTALL_DIR_CMAKE}/OpenCASCADECompile|${INSTALL_DIR_CMAKE}/OpenCASCADECompile|' \
@@ -107,15 +103,15 @@ cd build
-DINSTALL_DIR_CMAKE=lib${LIBDIRSUFFIX}/cmake/opencascade \
-DINSTALL_DIR_DOC=doc/$PRGNAM-$VERSION \
-DUSE_GLES2=OFF \
- -DUSE_FFMPEG=${WITH_FFMPEG:-OFF} \
+ -DUSE_FFMPEG=ON \
-DUSE_FREEIMAGE=${WITH_FREEIMAGE:-OFF} \
-DUSE_GL2PS=${WITH_GL2PS:-OFF} \
-DUSE_TBB=${WITH_TBB:-OFF} \
-DUSE_VTK=ON \
- -D3RDPARTY_VTK_INCLUDE_DIR=/usr/include/vtk-9.0 \
+ -D3RDPARTY_VTK_INCLUDE_DIR=/usr/include/vtk-9.2 \
-D3RDPARTY_VTK_LIBRARY_DIR=/usr/lib${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release ..
- find . -name link.txt -exec sed -i s/vtkRenderingOpenGL/vtkRenderingOpenGL2/g {} +
+
make
make install DESTDIR=$PKG
cd ..
diff --git a/graphics/OpenCASCADE/OpenCASCADE.info b/graphics/OpenCASCADE/OpenCASCADE.info
index fc80a6bb7839e..fabbbcf5ca803 100644
--- a/graphics/OpenCASCADE/OpenCASCADE.info
+++ b/graphics/OpenCASCADE/OpenCASCADE.info
@@ -1,8 +1,8 @@
PRGNAM="OpenCASCADE"
-VERSION="7.3.0"
+VERSION="7.7.0"
HOMEPAGE="https://www.opencascade.com/"
-DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/OpenCASCADE/occt-V7_3_0.tar.gz"
-MD5SUM="68156b53f8c944fd244df3eb0d25f5c6"
+DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/OpenCASCADE/opencascade-7.7.0.tgz"
+MD5SUM="49ce04b520b99067ea5adc6df2c437e9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="VTK"
diff --git a/graphics/OpenCASCADE/README b/graphics/OpenCASCADE/README
index 3d45c027c1e0a..69878332b47ee 100644
--- a/graphics/OpenCASCADE/README
+++ b/graphics/OpenCASCADE/README
@@ -5,12 +5,11 @@ visualization, data exchange and rapid application development.
NOTE: This package needs about 2.5GB of space to build, so adapt your
OUTPUT / TMP variables if necessary.
-ffmpeg, FreeImage, tbb and gl2ps are optional dependencies.
+FreeImage, tbb and gl2ps are optional dependencies.
-* To build with ffmpeg support, use the option FFMPEG=yes
* To build with FreeImage support, use the option FREEIMAGE=yes
* To build with tbb support, use the option TBB=yes
* To build with gl2ps support, use the option GL2PS=yes
For example:
- FFMPEG=yes TBB=yes ./OpenCASCADE.SlackBuild
+ TBB=yes ./OpenCASCADE.SlackBuild
diff --git a/graphics/OpenCASCADE/fix-flow-control-nesting.patch b/graphics/OpenCASCADE/fix-flow-control-nesting.patch
deleted file mode 100644
index 7e2bb1d7b2ab6..0000000000000
--- a/graphics/OpenCASCADE/fix-flow-control-nesting.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From e69c42386239bcc08143607df12b8bb3f1ff14ba Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Wed, 24 Feb 2021 20:06:02 +0100
-Subject: [PATCH] adm/cmake/vtk.cmake: fix flow control nesting
-
-Fix an unbalanced nesting of flow control statements
-for >=cmake-3.20.0
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
----
- adm/cmake/vtk.cmake | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/adm/cmake/vtk.cmake b/adm/cmake/vtk.cmake
-index c5692fd6..00b7ff4a 100644
---- a/adm/cmake/vtk.cmake
-+++ b/adm/cmake/vtk.cmake
-@@ -156,8 +156,8 @@ if (VTK_FOUND)
- endif()
- endif()
- endif()
-- endif()
-- endforeach()
-+ endforeach()
-+ endif()
- endif()
-
- if (3RDPARTY_VTK_INCLUDE_DIRS)
---
-2.30.1
-
diff --git a/graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff b/graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff
deleted file mode 100644
index 9062cc5cd7704..0000000000000
--- a/graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff
+++ /dev/null
@@ -1,64 +0,0 @@
---- src/IVtkVTK/IVtkVTK_ShapeData.cxx.orig 2018-05-29 11:14:02.000000000 +0100
-+++ src/IVtkVTK/IVtkVTK_ShapeData.cxx 2018-05-31 14:07:39.166422383 +0100
-@@ -81,9 +81,15 @@
- vtkIdType aPointIdVTK = thePointId;
- myPolyData->InsertNextCell (VTK_VERTEX, 1, &aPointIdVTK);
- const vtkIdType aShapeIDVTK = theShapeID;
-+#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0)
- mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
- const vtkIdType aType = theMeshType;
- myMeshTypes->InsertNextTupleValue (&aType);
-+#else
-+ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
-+ const vtkIdType aType = theMeshType;
-+ myMeshTypes->InsertNextTypedTuple (&aType);
-+#endif
- }
-
- //================================================================
-@@ -98,9 +104,15 @@
- vtkIdType aPoints[2] = { thePointId1, thePointId2 };
- myPolyData->InsertNextCell (VTK_LINE, 2, aPoints);
- const vtkIdType aShapeIDVTK = theShapeID;
-+#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0)
- mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
- const vtkIdType aType = theMeshType;
- myMeshTypes->InsertNextTupleValue (&aType);
-+#else
-+ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
-+ const vtkIdType aType = theMeshType;
-+ myMeshTypes->InsertNextTypedTuple (&aType);
-+#endif
- }
-
- //================================================================
-@@ -125,9 +137,15 @@
-
- myPolyData->InsertNextCell (VTK_POLY_LINE, anIdList);
- const vtkIdType aShapeIDVTK = theShapeID;
-+#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0)
- mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
- const vtkIdType aType = theMeshType;
- myMeshTypes->InsertNextTupleValue (&aType);
-+#else
-+ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
-+ const vtkIdType aType = theMeshType;
-+ myMeshTypes->InsertNextTypedTuple (&aType);
-+#endif
- }
- }
-
-@@ -144,7 +162,13 @@
- vtkIdType aPoints[3] = { thePointId1, thePointId2, thePointId3 };
- myPolyData->InsertNextCell (VTK_TRIANGLE, 3, aPoints);
- const vtkIdType aShapeIDVTK = theShapeID;
-+#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0)
- mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK);
- const vtkIdType aType = theMeshType;
- myMeshTypes->InsertNextTupleValue (&aType);
-+#else
-+ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK);
-+ const vtkIdType aType = theMeshType;
-+ myMeshTypes->InsertNextTypedTuple (&aType);
-+#endif
- }
diff --git a/graphics/OpenCASCADE/occt.git-7f523af8e8a63ee17d8fc26f107c191cd51dcd44.patch b/graphics/OpenCASCADE/occt.git-7f523af8e8a63ee17d8fc26f107c191cd51dcd44.patch
new file mode 100644
index 0000000000000..039ce99950fa9
--- /dev/null
+++ b/graphics/OpenCASCADE/occt.git-7f523af8e8a63ee17d8fc26f107c191cd51dcd44.patch
@@ -0,0 +1,36 @@
+From: Aiden Grossman <agrossman154@yahoo.com>
+Date: Mon, 10 Oct 2022 18:25:13 +0000 (-0700)
+Subject: Fix naming conflict between X11 headers and VTK 9.2.2+
+X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=7f523af8e8a63ee17d8fc26f107c191cd51dcd44
+
+Fix naming conflict between X11 headers and VTK 9.2.2+
+
+Currently, the GLX headers include the X11 headers which use a
+preprocessor define to make Status an int. However, VTK has a class
+called Status, and this define replaces this class name with int which
+results in compilation errors. This patch undefs Status and Success,
+which are both defined in the X11 headers if they exist so that there
+are no conflicts within the VTK headers for newer versions.
+---
+
+diff --git a/src/IVtkDraw/IVtkDraw_Interactor.cxx b/src/IVtkDraw/IVtkDraw_Interactor.cxx
+index 08e5fe3dde..c8f3ebc860 100644
+--- a/src/IVtkDraw/IVtkDraw_Interactor.cxx
++++ b/src/IVtkDraw/IVtkDraw_Interactor.cxx
+@@ -27,6 +27,16 @@
+ #undef AllValues
+ #endif
+
++// Prevent naming collisions between X11
++// and VTK versions 9.2.0 and above.
++// X11 is included through glx
++#ifdef Status
++#undef Status
++#endif
++#ifdef Success
++#undef Success
++#endif
++
+ #include <vtkXRenderWindowInteractor.h>
+ #include <vtkXOpenGLRenderWindow.h>
+ #endif