Add dev-qt from an older version of the gentoo repo

Qt5 has been removed, we restore it since we still use it.
This commit is contained in:
2026-07-03 09:45:00 +02:00
parent 2247967dd3
commit 692df50613
319 changed files with 15302 additions and 0 deletions

4
dev-qt/qtsvg/Manifest Normal file
View File

@ -0,0 +1,4 @@
DIST qtsvg-5.15.18-gentoo-kde-1.tar.xz 2872 BLAKE2B 2acf2cda848d8334803b05184ad1fb8d2cd254788d08ba6ea2d181e162ddd6ed8ac6fafc7776f553600aedefd6c3e7f3dc73e3458f74b6c95c1c0ab68edc5b14 SHA512 f64e4e6524faeb38a9ef62220b79a76483b6c62537ca5452b015a83a3e2e2eb81e86ce24449b7696d3ffb532da56c76e2ff4315d30a703764714c6aae71a7456
DIST qtsvg-everywhere-opensource-src-5.15.18.tar.xz 1867656 BLAKE2B 409336262a3fd8f2f3c7032306453e88c359cced9ca2cb9ebf488e3fe36d0bdffd18ef6336800f72eef7b28b620791f9d7d350eb44a4a9b9e4d1e9e28ef860cd SHA512 2c599bdd0b82eeb969233bac7cb5d53896d3d873ee37b72fead0c3ef38feaef84c8e0a42425ce3ae185ca0f4d8f4590ec95829fc815bda65dd546d1697de8493
DIST qtsvg-everywhere-src-6.10.3.tar.xz 2614032 BLAKE2B 08b903d04911ad280d7984a684945b1271e90d0d23f714a8acb42346f6d109db9159def1c86e053b4c49d18bfe7bfb1a39aed6584ddc2ee07bda39f5038bb9f3 SHA512 d75efa88382bd50704e185980014960d9baa3086ffd9530c6eb92ef277e15c804d93f9a20341849c0b64f9a013c31f3f690143ff3e024af8acfd3067a150ce78
DIST qtsvg-everywhere-src-6.11.1.tar.xz 2336944 BLAKE2B a6ec11928ee38719f77926693b5eb949ecdafc3a94da9693dcb9f0ad1207ec03abf66da2056757da9d01d211d94c28a8df96f75a0dced91e867f3e4b0a0d2f48 SHA512 6cbadc333d3616a361360043da9a6809d03ee131cfb0661c9d01901c4bcf1d074c19f04b959616a1d35b712f2f50c66b5c40ea7bf204e680d054d538aabcf3e7

View File

@ -0,0 +1,43 @@
https://bugs.gentoo.org/974278
https://codereview.qt-project.org/c/qt/qtsvg/+/732200
--- a/src/svg/qsvgstructure.cpp
+++ b/src/svg/qsvgstructure.cpp
@@ -415,7 +415,8 @@
const auto markers = markersForNode(node);
for (auto &i : markers) {
- QSvgMarker *markNode = static_cast<QSvgMarker*>(node->document()->namedNode(i.markerId));
- if (!markNode)
+ QSvgNode *referencedNode = node->document()->namedNode(i.markerId);
+ if (!referencedNode || referencedNode->type() != QSvgNode::Marker)
continue;
+ QSvgMarker *markNode = static_cast<QSvgMarker *>(referencedNode);
p->save();
@@ -722,6 +723,7 @@
// Chrome seems to return the mask of the mask if a mask is set on the mask
if (this->hasMask()) {
- QSvgMask *maskNode = static_cast<QSvgMask*>(document()->namedNode(this->maskId()));
- if (maskNode) {
+ QSvgNode *referencedNode = document()->namedNode(this->maskId());
+ if (referencedNode && referencedNode->type() == QSvgNode::Mask) {
+ QSvgMask *maskNode = static_cast<QSvgMask *>(referencedNode);
QRectF boundsRect;
return maskNode->createMask(p, states, localRect, &boundsRect);
--- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
+++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
@@ -1868,4 +1868,15 @@
QTest::newRow("excessive moveto in path") // id=406541912
<< R"(<svg><path stroke="#000" d="M- 7e8t9 ."/><marker id="c"/><use href=" c"/></svg>)"_ba;
+ // Bad-cast to QSvgMarker from QSvgLine -> Heap-buffer-overflow
+ QTest::newRow("line-as-marker") // id=496327371
+ << R"-(<svg><line x1="4" id="lledr" marker-end="url(#lledr)" stroke="#00f"/></svg>)-"_ba;
+ QTest::newRow("line-as-mask") // modeled after 496327371 to test similar problem, needs UBSAN
+ << R"-(<svg>
+ <defs>
+ <line x1="4" id="line"/>
+ <mask id="mask" width="2" height="2" mask="url(#line)"/>
+ </defs>
+ <rect width="2" height="2" mask="url(#mask)"/>
+ </svg>)-"_ba;
}

18
dev-qt/qtsvg/metadata.xml Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>qt@gentoo.org</email>
<name>Gentoo Qt Project</name>
</maintainer>
<upstream>
<bugs-to>https://qt-project.atlassian.net/</bugs-to>
<doc>https://doc.qt.io/</doc>
<remote-id type="github">qt/qtsvg</remote-id>
</upstream>
<slots>
<subslots>
Must only be used by packages that are known to use private parts of the Qt API.
</subslots>
</slots>
</pkgmetadata>

View File

@ -0,0 +1,25 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} != *9999* ]]; then
QT5_KDEPATCHSET_REV=1
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
fi
inherit qt5-build
DESCRIPTION="SVG rendering library for the Qt5 framework"
IUSE=""
RDEPEND="
=dev-qt/qtcore-${QT5_PV}*
=dev-qt/qtgui-${QT5_PV}*
=dev-qt/qtwidgets-${QT5_PV}*
virtual/zlib:=
"
DEPEND="${RDEPEND}
test? ( =dev-qt/qtxml-${QT5_PV}* )
"

View File

@ -0,0 +1,30 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit qt6-build toolchain-funcs
DESCRIPTION="SVG rendering library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
fi
RDEPEND="
~dev-qt/qtbase-${PV}:6[gui,widgets]
virtual/zlib:=
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-6.10.3-CVE-2026-6210.patch
)
src_test() {
# tst_QSvgRenderer::testFeColorMatrix (new in 6.7, likely low impact)
# is known failing on BE, could use more looking into (bug #935356)
[[ $(tc-endian) == big ]] && local CMAKE_SKIP_TESTS=( tst_qsvgrenderer )
qt6-build_src_test
}

View File

@ -0,0 +1,26 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit qt6-build toolchain-funcs
DESCRIPTION="SVG rendering library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
fi
RDEPEND="
~dev-qt/qtbase-${PV}:6[gui,widgets]
virtual/zlib:=
"
DEPEND="${RDEPEND}"
src_test() {
# tst_QSvgRenderer::testFeColorMatrix (new in 6.7, likely low impact)
# is known failing on BE, could use more looking into (bug #935356)
[[ $(tc-endian) == big ]] && local CMAKE_SKIP_TESTS=( tst_qsvgrenderer )
qt6-build_src_test
}

View File

@ -0,0 +1,26 @@
# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit qt6-build toolchain-funcs
DESCRIPTION="SVG rendering library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
fi
RDEPEND="
~dev-qt/qtbase-${PV}:6[gui,widgets]
virtual/zlib:=
"
DEPEND="${RDEPEND}"
src_test() {
# tst_QSvgRenderer::testFeColorMatrix (new in 6.7, likely low impact)
# is known failing on BE, could use more looking into (bug #935356)
[[ $(tc-endian) == big ]] && local CMAKE_SKIP_TESTS=( tst_qsvgrenderer )
qt6-build_src_test
}

View File

@ -0,0 +1,26 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit qt6-build toolchain-funcs
DESCRIPTION="SVG rendering library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
fi
RDEPEND="
~dev-qt/qtbase-${PV}:6[gui,widgets]
virtual/zlib:=
"
DEPEND="${RDEPEND}"
src_test() {
# tst_QSvgRenderer::testFeColorMatrix (new in 6.7, likely low impact)
# is known failing on BE, could use more looking into (bug #935356)
[[ $(tc-endian) == big ]] && local CMAKE_SKIP_TESTS=( tst_qsvgrenderer )
qt6-build_src_test
}

View File

@ -0,0 +1,26 @@
# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit qt6-build toolchain-funcs
DESCRIPTION="SVG rendering library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
fi
RDEPEND="
~dev-qt/qtbase-${PV}:6[gui,widgets]
virtual/zlib:=
"
DEPEND="${RDEPEND}"
src_test() {
# tst_QSvgRenderer::testFeColorMatrix (new in 6.7, likely low impact)
# is known failing on BE, could use more looking into (bug #935356)
[[ $(tc-endian) == big ]] && local CMAKE_SKIP_TESTS=( tst_qsvgrenderer )
qt6-build_src_test
}