summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/OpenCASCADE/OpenCASCADE.SlackBuild94
-rw-r--r--graphics/OpenCASCADE/OpenCASCADE.info8
-rw-r--r--graphics/OpenCASCADE/README11
-rw-r--r--graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff (renamed from graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff)12
4 files changed, 53 insertions, 72 deletions
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 <baildon.research@googlemail.com>
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/020_vtk_InsertNextTupleValue.diff b/graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff
index 25e99d568d..9062cc5cd7 100644
--- a/graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff
+++ b/graphics/OpenCASCADE/occt-7.3.0_vtk_InsertNextTupleValue.diff
@@ -1,6 +1,6 @@
---- 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 @@
+--- 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;
@@ -16,7 +16,7 @@
}
//================================================================
-@@ -97,9 +103,15 @@
+@@ -98,9 +104,15 @@
vtkIdType aPoints[2] = { thePointId1, thePointId2 };
myPolyData->InsertNextCell (VTK_LINE, 2, aPoints);
const vtkIdType aShapeIDVTK = theShapeID;
@@ -32,7 +32,7 @@
}
//================================================================
-@@ -124,9 +136,15 @@
+@@ -125,9 +137,15 @@
myPolyData->InsertNextCell (VTK_POLY_LINE, anIdList);
const vtkIdType aShapeIDVTK = theShapeID;
@@ -45,9 +45,9 @@
+ 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);