virtualx-engine/thirdparty/thorvg/update-thorvg.sh
Rémi Verschelde 99b450762b thorvg: Sync with 0.8.2, cleanup SCsub and fix includes
We were compiling `src/loaders/external_png` but using the header from
`src/loaders/png`, leading to `-Wodr` warnings.

Remove unused bundled lodepng code since we use `external_png` (libpng).

Whitespace changes are from upstream, will attempt PR'ing a cleanup there for
future updates.
2022-10-13 17:05:41 +02:00

28 lines
751 B
Bash
Executable file

VERSION=0.8.2
rm -rf AUTHORS inc LICENSE src *.zip
curl -L -O https://github.com/Samsung/thorvg/archive/v$VERSION.zip
bsdtar --strip-components=1 -xvf *.zip
rm *.zip
rm -rf .github docs pc res test tools tvgcompat .git* *.md *.txt wasm_build.sh
find . -type f -name 'meson.build' -delete
rm -rf src/bin src/bindings src/examples src/wasm
rm -rf src/lib/gl_engine src/loaders/external_jpg src/loaders/png
cat << EOF > inc/config.h
#ifndef THORVG_CONFIG_H
#define THORVG_CONFIG_H
#define THORVG_SW_RASTER_SUPPORT 1
#define THORVG_SVG_LOADER_SUPPORT 1
#define THORVG_PNG_LOADER_SUPPORT 1
#define THORVG_TVG_LOADER_SUPPORT 1
#define THORVG_TVG_SAVER_SUPPORT 1
#define THORVG_JPG_LOADER_SUPPORT 1
#define THORVG_VERSION_STRING "$VERSION"
#endif
EOF