libraries/wxWidgets: Autodetect NanoSVG.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Brent Spillner 2023-12-03 17:47:23 +10:00 committed by Willy Sudiarto Raharjo
parent 4558e8d249
commit 80da576240
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 17 additions and 1 deletions

View file

@ -5,6 +5,13 @@ controls and utilities.
webkit2gtk is an optional dependency of this package. This will
provide webview support.
nanosvg is another optional dependency. By default, the
SlackBuild script checks for the nanosvg system headers and
disables SVG support if they are not found; you can force
different behavior (e.g. using wxWidgets' internal copy of
nanosvg, or always disabling SVG support) with the "NANOSVG"
environment variable (see wxWidgets.SlackBuild for details).
Notes:
1. This package is NOT built using --enable-stl by default.

View file

@ -76,6 +76,15 @@ else
wk="OFF"
fi
# BCS: check for NanoSVG
test -f /usr/include/nanosvg/nanosvg.h
case "${NANOSVG:-auto}" in
no|off) nanosvg=OFF ;;
yes|on) [ $? = 0 ] && nanosvg=sys || nanosvg=builtin ;;
auto) [ $? = 0 ] && nanosvg=sys || nanosvg=OFF ;;
internal) nanosvg=builtin ;;
esac
set -e
rm -rf $PKG
@ -108,7 +117,7 @@ cmake -B build-gtk3 \
-DwxUSE_LIBTIFF=sys \
-DwxUSE_LIBLZMA=sys \
-DwxUSE_LIBMSPACK=ON \
-DwxUSE_NANOSVG=OFF \
-DwxUSE_NANOSVG=$nanosvg \
-DwxUSE_STL=$stl \
-DwxUSE_WEBVIEW_WEBKIT=$wk \
-DwxUSE_PRIVATE_FONTS=ON \