2023-03-30 22:19:59 +02:00
|
|
|
VERSION=0.8.4
|
2022-01-13 13:54:19 +01:00
|
|
|
rm -rf AUTHORS inc LICENSE src *.zip
|
2023-03-30 22:19:59 +02:00
|
|
|
curl -L -O https://github.com/thorvg/thorvg/archive/v$VERSION.zip
|
2022-01-13 13:54:19 +01:00
|
|
|
bsdtar --strip-components=1 -xvf *.zip
|
|
|
|
rm *.zip
|
2022-10-13 17:03:36 +02:00
|
|
|
rm -rf .github docs pc res test tools tvgcompat .git* *.md *.txt wasm_build.sh
|
2022-01-13 13:54:19 +01:00
|
|
|
find . -type f -name 'meson.build' -delete
|
|
|
|
rm -rf src/bin src/bindings src/examples src/wasm
|
2022-10-13 17:03:36 +02:00
|
|
|
rm -rf src/lib/gl_engine src/loaders/external_jpg src/loaders/png
|
2022-01-13 13:54:19 +01:00
|
|
|
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
|
2022-11-29 17:22:05 +01:00
|
|
|
for source in $(find ./ -type f \( -iname \*.h -o -iname \*.cpp \)); do
|
|
|
|
sed -i -e '$a\' $source
|
|
|
|
done
|