summaryrefslogtreecommitdiffstats
path: root/graphics/OpenCASCADE
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/OpenCASCADE')
-rw-r--r--graphics/OpenCASCADE/OpenCASCADE.SlackBuild52
-rw-r--r--graphics/OpenCASCADE/OpenCASCADE.info6
-rw-r--r--graphics/OpenCASCADE/README5
-rw-r--r--graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff64
-rw-r--r--graphics/OpenCASCADE/occt.git-7f523af8e8a63ee17d8fc26f107c191cd51dcd44.patch36
5 files changed, 76 insertions, 87 deletions
diff --git a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
index b9ce861e66..d225d48942 100644
--- a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
+++ b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for OpenCASCADE
@@ -24,29 +24,42 @@
#
# Maintained by David Spencer <baildon.research@googlemail.com>
+# NOTE sbopkglint finds 3 non-execuatble bash scripts in /usr/bin
+# but I can't tell if they are needed there or not, so leaving them for now
+# - Dave W.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=OpenCASCADE
-VERSION=${VERSION:-7.3.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-7.7.0}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
-SRCNAM=occt
-SRCVER=V$(echo $VERSION | tr . _)
+SRCNAM=opencascade
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -64,9 +77,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 \
@@ -74,9 +87,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 {} \;
-# 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|' \
@@ -95,12 +107,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.3 \
+ -D3RDPARTY_VTK_LIBRARY_DIR=/usr/lib${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release ..
+
make
make install DESTDIR=$PKG
cd ..
@@ -114,8 +129,11 @@ cp -a \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# fix perms in docs dir
+chmod -c 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/graphics/OpenCASCADE/OpenCASCADE.info b/graphics/OpenCASCADE/OpenCASCADE.info
index fc80a6bb78..fabbbcf5ca 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 3d45c027c1..69878332b4 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/occt-7.3.0_vtk_InsertNextTupleValue.diff b/graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff
deleted file mode 100644
index 9062cc5cd7..0000000000
--- 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 0000000000..039ce99950
--- /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