libraries/DevIL: Fix build with nvidia-texture-tools.

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Arn0 2022-05-29 14:06:51 +02:00 committed by Willy Sudiarto Raharjo
parent 7d7b934928
commit b567a9f61d
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -4,16 +4,13 @@
# Written by Phil Warner <pc_warner@yahoo.com>
# Modified by Robby Workman <rworkman@slackbuilds.org>
# Modified by Dugan Chen
# Yth | Pont-en-Royans, France | yth@ythogtha.org
# 20220416 bkw: Modified by SlackBuilds.org, BUILD=4:
# - remove some junk from the doc dir (Makefile, DocBuilder.java, etc).
# Yth | yth@ythogtha.org
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=DevIL
VERSION=${VERSION:-1.8.0}
BUILD=${BUILD:-4}
BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -67,18 +64,19 @@ if [ "$LIBDIRSUFFIX" = "64" ]; then
patch -p1 < $CWD/lib64.diff
fi
# -DIL_USE_DXTC_NVIDIA=YES breaks when nvidia-texture-tools is installed
mkdir -p DevIL/build
cd DevIL/build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=c++14 -fpermissive" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DIL_USE_DXTC_NVIDIA=NO \
-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
cd ../..
# 20220416 bkw: remove some cruft that isn't documentation:
rm -f DevIL-docs/{Makefile,*.dtd,*.xml,*.java}
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION