summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
author Christoph Willing <chris.willing@linux.com>2024-09-10 13:49:59 +1000
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-09-14 23:36:49 +0700
commit92dc35e2cf239c13dd7a68105699311cf933f140 (patch)
tree726ba080afd5d9b524d45e8bf4f9c47ab9f39b6d /graphics
parent0ad66119528748344437b28ebc53e382f7c22dff (diff)
downloadslackbuilds-92dc35e2cf239c13dd7a68105699311cf933f140.tar.gz
slackbuilds-92dc35e2cf239c13dd7a68105699311cf933f140.tar.xz
graphics/OpenCASCADE: Fix cmake config. Check ffmpeg version
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.SlackBuild14
1 files changed, 11 insertions, 3 deletions
diff --git a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
index d225d48942..ce6b5a69c6 100644
--- a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
+++ b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild
@@ -32,7 +32,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=OpenCASCADE
VERSION=${VERSION:-7.7.0}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -72,6 +72,10 @@ else
LIBDIRSUFFIX=""
fi
+# OpenCASCADE doesn't yet built with ffmpeg-7.*
+use_ffmpeg="-DUSE_FFMPEG=ON "
+if [[ "$(ffmpeg -version | sed -n "s/ffmpeg version \([-0-9.]*\).*/\1/p;")" == "7"* ]]; then use_ffmpeg="-DUSE_FFMPEG=OFF "; fi
+
set -e
rm -rf $PKG
@@ -101,13 +105,13 @@ mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \
-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=ON \
+ $use_ffmpeg \
-DUSE_FREEIMAGE=${WITH_FREEIMAGE:-OFF} \
-DUSE_GL2PS=${WITH_GL2PS:-OFF} \
-DUSE_TBB=${WITH_TBB:-OFF} \
@@ -123,6 +127,10 @@ 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
+cd $PKG/usr/lib${LIBDIRSUFFIX}/cmake/opencascade
+sed -i -e 's/\\\${OCCT_INSTALL_BIN_LETTER}//' *.cmake
+cd -
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
LICENSE_LGPL_21.txt OCCT_LGPL_EXCEPTION.txt README.txt \