mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
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>
This commit is contained in:
parent
0ad6611952
commit
92dc35e2cf
1 changed files with 11 additions and 3 deletions
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue