From cb7f28ad95b0df5487a0c8faec4a14ac01265317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 18 Jan 2022 12:31:05 +0100 Subject: [PATCH] thorvg: Fix missing `` includes for MinGW Fixes #56894. --- thirdparty/README.md | 2 + .../patches/thorvg-pr1159-mingw-fix.patch | 73 +++++++++++++++++++ .../thorvg/src/loaders/svg/tvgSvgLoader.cpp | 1 + .../thorvg/src/loaders/svg/tvgSvgPath.cpp | 1 + .../src/loaders/svg/tvgSvgSceneBuilder.cpp | 1 + .../thorvg/src/loaders/svg/tvgSvgUtil.cpp | 1 + .../thorvg/src/loaders/svg/tvgXmlParser.cpp | 1 + .../thorvg/src/savers/tvg/tvgTvgSaver.cpp | 2 + 8 files changed, 82 insertions(+) create mode 100644 thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch diff --git a/thirdparty/README.md b/thirdparty/README.md index 6183aaa03c9..2cb54589529 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -613,6 +613,8 @@ Files extracted from upstream source: See `thorvg/update-thorvg.sh` for extraction instructions. Set the version number and run the script. +Patches in the `patches` directory should be re-applied after updates. + ## vhacd diff --git a/thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch b/thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch new file mode 100644 index 00000000000..a1748803062 --- /dev/null +++ b/thirdparty/thorvg/patches/thorvg-pr1159-mingw-fix.patch @@ -0,0 +1,73 @@ +diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp +index def8ae169a..cf103774c5 100644 +--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp ++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp +@@ -51,6 +51,7 @@ + + #define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++. + ++#include + #include + #include + #include +diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp +index 2b62315de8..32685ee620 100644 +--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp ++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp +@@ -50,6 +50,7 @@ + + #define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++. + ++#include + #include + #include + #include +diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp +index 8701fe32b1..ae17634f31 100644 +--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp ++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp +@@ -49,6 +49,7 @@ + */ + + ++#include + #include + #include "tvgMath.h" + #include "tvgSvgLoaderCommon.h" +diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp +index d5b9cdcf7b..9f269b29a2 100644 +--- a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp ++++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp +@@ -20,6 +20,7 @@ + * SOFTWARE. + */ + ++#include + #include + #include + #include "tvgSvgUtil.h" +diff --git a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp +index 2e3d5928d9..1571aa4e25 100644 +--- a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp ++++ b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp +@@ -20,6 +20,7 @@ + * SOFTWARE. + */ + ++#include + #include + #include + +diff --git a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp +index 9450d80e88..9dd57e5a89 100644 +--- a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp ++++ b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp +@@ -24,6 +24,8 @@ + #include "tvgTvgSaver.h" + #include "tvgLzw.h" + ++#include ++ + #ifdef _WIN32 + #include + #else diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp index def8ae169a8..cf103774c59 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgLoader.cpp @@ -51,6 +51,7 @@ #define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++. +#include #include #include #include diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp index 2b62315de88..32685ee620b 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgPath.cpp @@ -50,6 +50,7 @@ #define _USE_MATH_DEFINES //Math Constants are not defined in Standard C/C++. +#include #include #include #include diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp index 8701fe32b11..ae17634f312 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgSceneBuilder.cpp @@ -49,6 +49,7 @@ */ +#include #include #include "tvgMath.h" #include "tvgSvgLoaderCommon.h" diff --git a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp index d5b9cdcf7bc..9f269b29a2d 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgSvgUtil.cpp @@ -20,6 +20,7 @@ * SOFTWARE. */ +#include #include #include #include "tvgSvgUtil.h" diff --git a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp index 2e3d5928d98..1571aa4e25e 100644 --- a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp +++ b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp @@ -20,6 +20,7 @@ * SOFTWARE. */ +#include #include #include diff --git a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp index 9450d80e88f..9dd57e5a89c 100644 --- a/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp +++ b/thirdparty/thorvg/src/savers/tvg/tvgTvgSaver.cpp @@ -24,6 +24,8 @@ #include "tvgTvgSaver.h" #include "tvgLzw.h" +#include + #ifdef _WIN32 #include #else