From f6d446db455c8feedd94b337900770496ef02c91 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Thu, 31 May 2018 15:13:43 +0100 Subject: graphics/OpenCASCADE: Updated for version 7.3.0. Signed-off-by: David Spencer --- .../OpenCASCADE/020_vtk_InsertNextTupleValue.diff | 64 --------------- graphics/OpenCASCADE/OpenCASCADE.SlackBuild | 94 +++++++++------------- graphics/OpenCASCADE/OpenCASCADE.info | 8 +- graphics/OpenCASCADE/README | 11 ++- .../occt-7.3.0_vtk_InsertNextTupleValue.diff | 64 +++++++++++++++ 5 files changed, 111 insertions(+), 130 deletions(-) delete mode 100644 graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff create mode 100644 graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff (limited to 'graphics/OpenCASCADE') diff --git a/graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff b/graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff deleted file mode 100644 index 25e99d568d..0000000000 --- a/graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff +++ /dev/null @@ -1,64 +0,0 @@ ---- src/IVtkVTK/IVtkVTK_ShapeData.cxx.orig 2015-09-26 00:18:54.000000000 +1000 -+++ src/IVtkVTK/IVtkVTK_ShapeData.cxx 2018-01-11 09:16:59.734906202 +1000 -@@ -80,9 +80,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 - } - - //================================================================ -@@ -97,9 +103,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 - } - - //================================================================ -@@ -124,9 +136,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 - anIdList->Delete(); - } - } -@@ -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/OpenCASCADE.SlackBuild b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild index 4f0e2fd4ac..b9ce861e66 100644 --- a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild +++ b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild @@ -25,11 +25,12 @@ # Maintained by David Spencer PRGNAM=OpenCASCADE -VERSION=${VERSION:-6.9.1} -BUILD=${BUILD:-3} +VERSION=${VERSION:-7.3.0} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -SRCNAM=$(echo $PRGNAM | tr '[:upper:]' '[:lower:]') +SRCNAM=occt +SRCVER=V$(echo $VERSION | tr . _) if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -63,9 +64,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tgz -cd $SRCNAM-$VERSION +rm -rf $SRCNAM-$SRCVER +tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz +cd $SRCNAM-$SRCVER chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -73,51 +74,36 @@ 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 {} \; -# Update automake config, and de-version the VTK sonames -# (* Note, VTK 7.1.0 is now required *) -sed -i \ - -e 's/INCLUDES =/AM_CPPFLAGS =/' \ - adm/lin/amk/*/Makefile.am -sed -i \ - -e 's/vtkRenderingOpenGL/vtkRenderingOpenGL2/g' \ - -e 's/AM_INIT_AUTOMAKE(\[foreign])/AM_INIT_AUTOMAKE([foreign subdir-objects])/' \ - -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' \ - -e '/CSF_VTK_LIB/s/-6\.1//g' \ - configure.ac - # Thanks to Chris Willing for the fix for VTK-8.1.0 compatibility. -patch -p0 < $CWD/020_vtk_InsertNextTupleValue.diff - -./build_configure - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS -DvtkFloatingPointType=double -Dnullptr=NULL" \ -./configure \ - --prefix=/opt/${PRGNAM} \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --with-tcl=/usr/lib${LIBDIRSUFFIX} \ - --with-tk=/usr/lib${LIBDIRSUFFIX} \ - --with-vtk-library=/usr/lib${LIBDIRSUFFIX} \ - --with-vtk-include=/usr/include/VTK \ - --disable-debug \ - --enable-production \ - --build=$ARCH-slackware-linux - -# Change the resulting Makefile so that we can use DESTDIR -sed -e "s|\$(prefix)|\$(DESTDIR)\$(prefix)|g" -i Makefile - -make -make install DESTDIR=$PKG - -# Correct path of source files -mv $PKG/opt/$PRGNAM/config.h $PKG/opt/$PRGNAM/src/ -# Remove unnecessary (and confusing) files -rm -r $PKG/opt/$PRGNAM/Linux $PKG/opt/$PRGNAM/*.sh -# Add some missed files -cp -a data samples $PKG/opt/$PRGNAM +# This new version of the patch is still needed for occt 7.3.0 :( +patch -p0 < $CWD/occt-7.3.0_vtk_InsertNextTupleValue.diff + +# Fix bogus install path +sed -i -e 's|\${INSTALL_DIR}/\${INSTALL_DIR_CMAKE}/OpenCASCADECompile|${INSTALL_DIR_CMAKE}/OpenCASCADECompile|' \ + CMakeLists.txt + +# Strictly speaking VTK is optional, but the only user of OCC in SBo is FreeCAD, +# and FreeCAD wants OCC's VTK support. :) + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_DIR_LIB=lib${LIBDIRSUFFIX} \ + -DINSTALL_DIR_CMAKE=lib${LIBDIRSUFFIX}/cmake/opencascade \ + -DINSTALL_DIR_DOC=doc/$PRGNAM-$VERSION \ + -DUSE_GLES2=OFF \ + -DUSE_FFMPEG=${WITH_FFMPEG:-OFF} \ + -DUSE_FREEIMAGE=${WITH_FREEIMAGE:-OFF} \ + -DUSE_GL2PS=${WITH_GL2PS:-OFF} \ + -DUSE_TBB=${WITH_TBB:-OFF} \ + -DUSE_VTK=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -128,14 +114,6 @@ cp -a \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# If you want *all* documentation in the package, use INSTALL_FULL_DOCS=yes -# but be warned: we're talking about ~ 520MB of documentation... -if [ "${INSTALL_FULL_DOCS:-no}" = "yes" ]; then - cp -a \ - doc/* \ - $PKG/usr/doc/$PRGNAM-$VERSION -fi - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/graphics/OpenCASCADE/OpenCASCADE.info b/graphics/OpenCASCADE/OpenCASCADE.info index a2bee3cabb..1d193a9409 100644 --- a/graphics/OpenCASCADE/OpenCASCADE.info +++ b/graphics/OpenCASCADE/OpenCASCADE.info @@ -1,8 +1,8 @@ PRGNAM="OpenCASCADE" -VERSION="6.9.1" -HOMEPAGE="http://www.opencascade.org/" -DOWNLOAD="https://sources.archlinux.org/other/community/opencascade/opencascade-6.9.1.tgz" -MD5SUM="7f2e645b5010d190c9bb35dc457f9a7c" +VERSION="7.3.0" +HOMEPAGE="https://www.opencascade.org/" +DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/OpenCASCADE/occt-V7_3_0.tar.gz" +MD5SUM="68156b53f8c944fd244df3eb0d25f5c6" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="VTK" diff --git a/graphics/OpenCASCADE/README b/graphics/OpenCASCADE/README index 9719c3cf62..3d45c027c1 100644 --- a/graphics/OpenCASCADE/README +++ b/graphics/OpenCASCADE/README @@ -5,9 +5,12 @@ 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. -If you want the complete documentation installed with this (and add about -600MB to the package), start the script with: +ffmpeg, FreeImage, tbb and gl2ps are optional dependencies. - INSTALL_FULL_DOCS=yes ./OpenCASCADE.SlackBuild +* 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 -FreeImage, tbb and gl2ps are optional dependencies. +For example: + FFMPEG=yes 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 new file mode 100644 index 0000000000..9062cc5cd7 --- /dev/null +++ b/graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff @@ -0,0 +1,64 @@ +--- 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 + } -- cgit v1.2.3