diff --git a/0001-Allow-style-without-type-attribute.patch b/0001-Allow-style-without-type-attribute.patch deleted file mode 100644 index 57bf271e85d568ec6ce016679923275e66662a0b..0000000000000000000000000000000000000000 --- a/0001-Allow-style-without-type-attribute.patch +++ /dev/null @@ -1,76 +0,0 @@ -From cb6fce016d88622cc361a9f609518db753502e46 Mon Sep 17 00:00:00 2001 -From: Chih-Hsuan Yen -Date: Wed, 23 Jan 2019 16:41:35 +0800 -Subject: [PATCH] Allow ", -+ "", -+ }; -+ const int COUNT = sizeof(svgs) / sizeof(svgs[0]); -+ QImage images[COUNT]; -+ QPainter p; -+ -+ for (int i = 0; i < COUNT; ++i) { -+ QByteArray data(svgs[i]); -+ QSvgRenderer renderer(data); -+ images[i] = QImage(50, 50, QImage::Format_ARGB32_Premultiplied); -+ images[i].fill(-1); -+ p.begin(&images[i]); -+ renderer.render(&p); -+ p.end(); -+ } -+ QCOMPARE(images[0], images[1]); -+} -+ - QTEST_MAIN(tst_QSvgRenderer) - #include "tst_qsvgrenderer.moc" --- -2.18.1 - diff --git a/qt5-qtsvg.spec b/qt5-qtsvg.spec index f24a280e828dde9361c179556acbf352baca0293..bbae9396b98fd063329678b8f2b075e8b74e67fb 100644 --- a/qt5-qtsvg.spec +++ b/qt5-qtsvg.spec @@ -1,12 +1,14 @@ -Name: qt5-qtsvg -Version: 5.11.1 -Release: 6 -Summary: Qt GUI toolkit for rendering and displaying SVG -License: LGPLv2 with exceptions or GPLv3 with exceptions -Url: http://www.qt.io -Source0: https://download.qt.io/new_archive/qt/5.11/%{version}/submodules/qtsvg-everywhere-src-%{version}.tar.xz -Patch0001: qtsvg-opensource-src-5.6.0-beta1-example-install.patch -Patch0002: 0001-Allow-style-without-type-attribute.patch +Name: qt5-qtsvg +Version: 5.15.2 +Release: 1 +Summary: Qt GUI toolkit for rendering and displaying SVG +License: LGPLv2 with exceptions or GPLv3 with exceptions +Url: http://www.qt.io +%global majmin %(echo %{version} | cut -d. -f1-2) +Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/qtsvg-everywhere-src-%{version}.tar.xz +Patch0: qtsvg-5.15.2-clamp-parsed-doubles-to-float-representtable-values.patch + +BuildRequires: make BuildRequires: qt5-qtbase-devel >= %{version} pkgconfig(zlib) qt5-qtbase-private-devel %{?_qt5:Requires: %{_qt5} = %{_qt5_version}} @@ -52,6 +54,7 @@ popd %dir %{_qt5_libdir}/cmake/Qt5Svg/ %{_qt5_libdir}/{libQt5Svg.so.5*,cmake/Qt5Svg/Qt5Svg_*Plugin.cmake} %{_qt5_plugindir}/{iconengines/libqsvgicon.so,imageformats/libqsvg.so} +%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QSvg*Plugin.cmake %files devel %{_qt5_examplesdir}/ @@ -61,6 +64,9 @@ popd %{_qt5_archdatadir}/mkspecs/modules/qt_lib_svg*.pri %changelog +* Wed Dec 29 2021 peijiankang - 5.15.2-1 +- update to upstream version 5.15.2 + * Wed Dec 08 2021 liuxinhao - 5.11.1-6 - Allow style without type attribute diff --git a/qt5-qtsvg.yaml b/qt5-qtsvg.yaml index 8c797f1133fcfc2c6534b24aefa67fb8c5197687..154a0c51dbc0ca537aa5059a81ed33ffdef69724 100644 --- a/qt5-qtsvg.yaml +++ b/qt5-qtsvg.yaml @@ -1,4 +1,4 @@ version_control: git src_repo: https://code.qt.io/qt/qtsvg.git -tag_prefix: ^v -seperator: . +tag_prefix: "^v" +separator: "." diff --git a/qtsvg-5.15.2-clamp-parsed-doubles-to-float-representtable-values.patch b/qtsvg-5.15.2-clamp-parsed-doubles-to-float-representtable-values.patch new file mode 100644 index 0000000000000000000000000000000000000000..83db8645c37fdc64d613a188140886d8aad125c2 --- /dev/null +++ b/qtsvg-5.15.2-clamp-parsed-doubles-to-float-representtable-values.patch @@ -0,0 +1,30 @@ +diff -up qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp.orig qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp +--- qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp.orig 2020-10-27 09:02:11.000000000 +0100 ++++ qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp 2021-03-09 17:48:50.187425243 +0100 +@@ -65,6 +65,7 @@ + #include "private/qmath_p.h" + + #include "float.h" ++#include + + QT_BEGIN_NAMESPACE + +@@ -672,6 +673,9 @@ static qreal toDouble(const QChar *&str) + val = -val; + } else { + val = QByteArray::fromRawData(temp, pos).toDouble(); ++ // Do not tolerate values too wild to be represented normally by floats ++ if (std::fpclassify(float(val)) != FP_NORMAL) ++ val = 0; + } + return val; + +@@ -3043,6 +3047,8 @@ static QSvgStyleProperty *createRadialGr + ncy = toDouble(cy); + if (!r.isEmpty()) + nr = toDouble(r); ++ if (nr < 0.5) ++ nr = 0.5; + + qreal nfx = ncx; + if (!fx.isEmpty()) diff --git a/qtsvg-everywhere-src-5.11.1.tar.xz b/qtsvg-everywhere-src-5.11.1.tar.xz deleted file mode 100644 index 9d71de09f4da7594fdf7c888dd8c30c500d18e40..0000000000000000000000000000000000000000 Binary files a/qtsvg-everywhere-src-5.11.1.tar.xz and /dev/null differ diff --git a/qtsvg-everywhere-src-5.15.2.tar.xz b/qtsvg-everywhere-src-5.15.2.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..eb11c2de0a05530e534bbc871c2bf1547da225bf Binary files /dev/null and b/qtsvg-everywhere-src-5.15.2.tar.xz differ diff --git a/qtsvg-opensource-src-5.6.0-beta1-example-install.patch b/qtsvg-opensource-src-5.6.0-beta1-example-install.patch deleted file mode 100644 index d2eb649fa5d2052dead40a2b83f68ac58012d368..0000000000000000000000000000000000000000 --- a/qtsvg-opensource-src-5.6.0-beta1-example-install.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/examples/svg/richtext/textobject/textobject.pro b/examples/svg/richtext/textobject/textobject.pro -index 8892ae7..f9ec7c6 100644 ---- a/examples/svg/richtext/textobject/textobject.pro -+++ b/examples/svg/richtext/textobject/textobject.pro -@@ -14,6 +14,6 @@ INSTALLS += target - - wince*{ - filesToDeploy.files = files/*.svg -- filesToDeploy.path = files -+ filesToDeploy.path = $$[QT_INSTALL_EXAMPLES]/svg/richtext/textobject/files - DEPLOYMENT += filesToDeploy - }