diff options
author | Brent Spillner <spillner@acm.org> | 2023-12-03 17:47:23 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-12-03 18:20:39 +0700 |
commit | 80da576240caac2a0c746288868e9c10b6c46342 (patch) | |
tree | 335aabd5f3ca0111b9294852ad39cb084af114a9 /libraries | |
parent | 4558e8d249f22d2705db35671a256eae7a6b95d4 (diff) |
libraries/wxWidgets: Autodetect NanoSVG.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/wxWidgets/README | 7 | ||||
-rw-r--r-- | libraries/wxWidgets/wxWidgets.SlackBuild | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/libraries/wxWidgets/README b/libraries/wxWidgets/README index 16c1bd01a3896..441c51d749a71 100644 --- a/libraries/wxWidgets/README +++ b/libraries/wxWidgets/README @@ -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. diff --git a/libraries/wxWidgets/wxWidgets.SlackBuild b/libraries/wxWidgets/wxWidgets.SlackBuild index f0e9bdac072ee..d0bd31f4806ee 100644 --- a/libraries/wxWidgets/wxWidgets.SlackBuild +++ b/libraries/wxWidgets/wxWidgets.SlackBuild @@ -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 \ |