Compare commits

..

No commits in common. "3a5eb5cac3d3c2ff9b8cb80c646a63deb3d7b28c" and "d9c41eb508fc0c3ab85494e3732bc36304968564" have entirely different histories.

6 changed files with 39 additions and 100 deletions

View File

@ -1,43 +1,26 @@
%global qt_module qtsvg Name: qt5-qtsvg
Version: 5.11.1
Summary: Qt5 - Support for rendering and displaying SVG Release: 4
Name: qt5-%{qt_module} Summary: Qt GUI toolkit for rendering and displaying SVG
Version: 5.15.10 License: LGPLv2 with exceptions or GPLv3 with exceptions
Release: 1
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
Url: http://www.qt.io Url: http://www.qt.io
%global majmin %(echo %{version} | cut -d. -f1-2) Source0: https://download.qt.io/archive/qt/5.11/%{version}/submodules/qtsvg-everywhere-src-%{version}.tar.xz
Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-opensource-src-%{version}.tar.xz Patch0001: qtsvg-opensource-src-5.6.0-beta1-example-install.patch
BuildRequires: qt5-qtbase-devel >= %{version} pkgconfig(zlib) qt5-qtbase-private-devel
Patch0: qtsvg-CVE-2023-32573.patch %{?_qt5:Requires: %{_qt5} = %{_qt5_version}}
BuildRequires: make
BuildRequires: qt5-qtbase-devel >= %{version}
BuildRequires: pkgconfig(zlib)
BuildRequires: qt5-qtbase-private-devel
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
%description %description
Scalable Vector Graphics (SVG) is an XML-based language for describing The Qt SVG module provides functionality for displaying SVG images in
two-dimensional vector graphics. Qt provides classes for rendering and widget, and to create SVG files using drawing commands.
displaying SVG drawings in widgets and on other paint devices.
%package devel %package devel
Summary: Development files for %{name} Summary: Library and header files of libdwarf for qt5-qtsvg
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name} = %{version}-%{release} qt5-qtbase-devel
Requires: qt5-qtbase-devel%{?_isa} Provides: %{name}-examples = %{version}-%{release}
Obsoletes: %{name}-examples < %{version}-%{release}
%description devel %description devel
%{summary}. qt5-qtsvg-devel provides libraries and header files for qt5-qtsvg.
%package examples
Summary: Programming examples for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description examples
%{summary}.
%prep %prep
%autosetup -n qtsvg-everywhere-src-%{version} -p1 %autosetup -n qtsvg-everywhere-src-%{version} -p1
@ -60,45 +43,23 @@ for prl_file in libQt5*.prl ; do
done done
popd popd
%post -p /sbin/ldconfig
%ldconfig_scriptlets %postun -p /sbin/ldconfig
%files %files
%license LICENSE.* %license LICENSE.*
%{_qt5_libdir}/libQt5Svg.so.5* %dir %{_qt5_libdir}/cmake/Qt5Svg/
%{_qt5_plugindir}/iconengines/libqsvgicon.so %{_qt5_libdir}/{libQt5Svg.so.5*,cmake/Qt5Svg/Qt5Svg_*Plugin.cmake}
%{_qt5_plugindir}/imageformats/libqsvg.so %{_qt5_plugindir}/{iconengines/libqsvgicon.so,imageformats/libqsvg.so}
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QSvg*Plugin.cmake
%files devel %files devel
%{_qt5_examplesdir}/
%{_qt5_headerdir}/QtSvg/ %{_qt5_headerdir}/QtSvg/
%{_qt5_libdir}/libQt5Svg.so
%{_qt5_libdir}/libQt5Svg.prl
%dir %{_qt5_libdir}/cmake/Qt5Svg/
%{_qt5_libdir}/cmake/Qt5Svg/Qt5SvgConfig*.cmake %{_qt5_libdir}/cmake/Qt5Svg/Qt5SvgConfig*.cmake
%{_qt5_libdir}/pkgconfig/Qt5Svg.pc %{_qt5_libdir}/{libQt5Svg.so,libQt5Svg.prl,pkgconfig/Qt5Svg.pc}
%{_qt5_archdatadir}/mkspecs/modules/qt_lib_svg*.pri %{_qt5_archdatadir}/mkspecs/modules/qt_lib_svg*.pri
%files examples
%{_qt5_examplesdir}/
%changelog %changelog
* Mon Aug 21 2023 huayadong <huayadong@kylinos.cn> - 5.15.10-1
- update to version 5.15.10-1
* Thu Jan 13 2022 wangkai <wangkai385@huawei.com> - 5.15.2-2
- Fix CVE-2021-45930
* Wed Dec 29 2021 peijiankang <peijiankang@kylinos.cn> - 5.15.2-1
- update to upstream version 5.15.2
* Wed Dec 08 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 5.11.1-6
- Allow style without type attribute
* Mon Sep 14 2020 liuweibo <liuweibo10@huawei.com> - 5.11.1-5
- Fix Source0
* Fri Jan 10 2020 zhouyihang <zhouyihang1@huawei.com> - 5.11.1-4 * Fri Jan 10 2020 zhouyihang <zhouyihang1@huawei.com> - 5.11.1-4
- change the source to valid address - change the source to valid address

View File

@ -1,4 +1,4 @@
version_control: git version_control: git
src_repo: https://code.qt.io/qt/qtsvg.git src_repo: https://code.qt.io/qt/qtsvg.git
tag_prefix: "^v" tag_prefix: ^v
separator: "." seperator: .

View File

@ -1,34 +0,0 @@
--- a/src/svg/qsvgfont_p.h
+++ b/src/svg/qsvgfont_p.h
@@ -74,6 +74,7 @@ public:
class Q_SVG_PRIVATE_EXPORT QSvgFont : public QSvgRefCounted
{
public:
+ static constexpr qreal DEFAULT_UNITS_PER_EM = 1000;
QSvgFont(qreal horizAdvX);
void setFamilyName(const QString &name);
@@ -86,9 +87,7 @@ public:
void draw(QPainter *p, const QPointF &point, const QString &str, qreal pixelSize, Qt::Alignment alignment) const;
public:
QString m_familyName;
- qreal m_unitsPerEm;
- qreal m_ascent;
- qreal m_descent;
+ qreal m_unitsPerEm = DEFAULT_UNITS_PER_EM;
qreal m_horizAdvX;
QHash<QChar, QSvgGlyph> m_glyphs;
};
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2668,7 +2668,7 @@ static bool parseFontFaceNode(QSvgStyleProperty *parent,
qreal unitsPerEm = toDouble(unitsPerEmStr);
if (!unitsPerEm)
- unitsPerEm = 1000;
+ unitsPerEm = QSvgFont::DEFAULT_UNITS_PER_EM;
if (!name.isEmpty())
font->setFamilyName(name);

Binary file not shown.

View File

@ -0,0 +1,12 @@
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
}