From 8bb1e56b11b4ea6eb4e057776c08323cdbc2a905 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Thu, 31 May 2018 16:30:20 +0100 Subject: graphics/FreeCAD: Update to build with OpenCASCADE 7.3.0. Signed-off-by: David Spencer --- graphics/FreeCAD/FreeCAD.SlackBuild | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/graphics/FreeCAD/FreeCAD.SlackBuild b/graphics/FreeCAD/FreeCAD.SlackBuild index dc09930805b7..47b0dc08e9a6 100644 --- a/graphics/FreeCAD/FreeCAD.SlackBuild +++ b/graphics/FreeCAD/FreeCAD.SlackBuild @@ -71,6 +71,19 @@ 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 {} \; +# SBo's OpenCASCADE 6.9.1 includes were in /opt/OpenCASCADE, but for 7.3.0 +# the includes are in /usr/include/opencascade, so let's accept either :) +if [ -d /usr/include/opencascade ]; then + occinc=/usr/include/opencascade +elif [ -d /opt/OpenCASCADE/inc ]; then + occinc=/opt/OpenCASCADE/inc + # However, 6.9.1's libs are in /usr/lib${LIBDIRSUFFIX} just like 7.3.0 + # (see OCC_LIBRARY below) +else + echo "OpenCASCADE include directory was not found" + exit 1 +fi + mkdir build cd build cmake \ @@ -78,7 +91,7 @@ cd build -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/opt/$PRGNAM \ -DDOCDIR=/usr/doc/$PRGNAM-$VERSION \ - -DOCC_INCLUDE_DIR:PATH=/opt/OpenCASCADE/inc \ + -DOCC_INCLUDE_DIR:PATH=$occinc \ -DOCC_LIBRARY:PATH=/usr/lib${LIBDIRSUFFIX} \ -DRESOURCEDIR=/opt/$PRGNAM/share/data \ -DBUILD_FEM=OFF \ -- cgit v1.2.3