浏览代码

Add Qt5 5.15.18 stack and qt5-build.eclass

Restored from ::gentoo history after treeclean, for x2goclient.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
k4be 1 月之前
父节点
当前提交
b129a2af32
共有 39 个文件被更改,包括 2241 次插入 和 0 次删除
  1. 2 0
      dev-qt/linguist-tools/Manifest
  2. 37 0
      dev-qt/linguist-tools/linguist-tools-5.15.18.ebuild
  3. 20 0
      dev-qt/linguist-tools/metadata.xml
  4. 3 0
      dev-qt/qtcore/Manifest
  5. 20 0
      dev-qt/qtcore/metadata.xml
  6. 165 0
      dev-qt/qtcore/qtcore-5.15.18.ebuild
  7. 3 0
      dev-qt/qtdbus/Manifest
  8. 17 0
      dev-qt/qtdbus/metadata.xml
  9. 45 0
      dev-qt/qtdbus/qtdbus-5.15.18.ebuild
  10. 6 0
      dev-qt/qtdeclarative/Manifest
  11. 42 0
      dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch
  12. 91 0
      dev-qt/qtdeclarative/files/qtdeclarative-5.15.18-CVE-2025-12385.patch
  13. 26 0
      dev-qt/qtdeclarative/metadata.xml
  14. 69 0
      dev-qt/qtdeclarative/qtdeclarative-5.15.18-r1.ebuild
  15. 3 0
      dev-qt/qtgui/Manifest
  16. 28 0
      dev-qt/qtgui/metadata.xml
  17. 184 0
      dev-qt/qtgui/qtgui-5.15.18-r1.ebuild
  18. 3 0
      dev-qt/qtnetwork/Manifest
  19. 22 0
      dev-qt/qtnetwork/metadata.xml
  20. 62 0
      dev-qt/qtnetwork/qtnetwork-5.15.18.ebuild
  21. 6 0
      dev-qt/qtsvg/Manifest
  22. 18 0
      dev-qt/qtsvg/metadata.xml
  23. 25 0
      dev-qt/qtsvg/qtsvg-5.15.18.ebuild
  24. 3 0
      dev-qt/qttest/Manifest
  25. 17 0
      dev-qt/qttest/metadata.xml
  26. 33 0
      dev-qt/qttest/qttest-5.15.18.ebuild
  27. 6 0
      dev-qt/qtwayland/Manifest
  28. 24 0
      dev-qt/qtwayland/metadata.xml
  29. 55 0
      dev-qt/qtwayland/qtwayland-5.15.18.ebuild
  30. 3 0
      dev-qt/qtwidgets/Manifest
  31. 20 0
      dev-qt/qtwidgets/metadata.xml
  32. 63 0
      dev-qt/qtwidgets/qtwidgets-5.15.18.ebuild
  33. 1 0
      dev-qt/qtx11extras/Manifest
  34. 17 0
      dev-qt/qtx11extras/metadata.xml
  35. 22 0
      dev-qt/qtx11extras/qtx11extras-5.15.18.ebuild
  36. 3 0
      dev-qt/qtxml/Manifest
  37. 17 0
      dev-qt/qtxml/metadata.xml
  38. 29 0
      dev-qt/qtxml/qtxml-5.15.18.ebuild
  39. 1031 0
      eclass/qt5-build.eclass

+ 2 - 0
dev-qt/linguist-tools/Manifest

@@ -0,0 +1,2 @@
+DIST qttools-5.15.18-gentoo-kde-1.tar.xz 2336 BLAKE2B 0ddc602b0b0edddbd7ff5cb435a6ab63ea4c9a159513c3b42e553ad68fb297239893b1d55e1ed1ff143d7af624e4d47cd07e5e2e564f4fe022b987b589f8d05d SHA512 e96f2d01a3526b1ebc3fb9afd04a38b42336d159961f53e348798cd0c4548abdae96569b670521b077daaf2fd64a29eedf9dd3b0cb7a131d5ec77deaec37cb5e
+DIST qttools-everywhere-opensource-src-5.15.18.tar.xz 8876416 BLAKE2B f546692ac9faccd617838432c001f7d574c7137ff44326d6d1e207a3eea913592c7857a15c91cbbadf0451512c256f4a99d43694b35f84fc758aa2a55118be75 SHA512 30a278df553ff3bb64927a4a5be0370b070131ec2970410095b4618e6a0f6e7c45374abf37c458b69dd9e4f7cecb98289b8e777cf5bc85b09f0b5cd278a40a70

+ 37 - 0
dev-qt/linguist-tools/linguist-tools-5.15.18.ebuild

@@ -0,0 +1,37 @@
+# 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
+
+QT5_MODULE="qttools"
+inherit qt5-build
+
+DESCRIPTION="Tools for working with Qt translation data files"
+
+IUSE="qml"
+
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	=dev-qt/qtxml-${QT5_PV}*
+	qml? ( =dev-qt/qtdeclarative-${QT5_PV}* )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+	src/linguist
+)
+
+src_prepare() {
+	sed -i -e '/SUBDIRS += linguist/d' \
+		src/linguist/linguist.pro || die
+
+	qt_use_disable_mod qml qmldevtools-private \
+		src/linguist/lupdate/lupdate.pro
+
+	qt5-build_src_prepare
+}

+ 20 - 0
dev-qt/linguist-tools/metadata.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<use>
+		<flag name="qml">Enable QML support in lupdate</flag>
+	</use>
+	<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>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 3 - 0
dev-qt/qtcore/Manifest

@@ -0,0 +1,3 @@
+DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
+DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
+DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206

+ 20 - 0
dev-qt/qtcore/metadata.xml

@@ -0,0 +1,20 @@
+<?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>
+	<use>
+		<flag name="old-kernel">Disable syscalls not available on Linux kernels older than 4.11</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://qt-project.atlassian.net/</bugs-to>
+		<doc>https://doc.qt.io/</doc>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 165 - 0
dev-qt/qtcore/qtcore-5.15.18.ebuild

@@ -0,0 +1,165 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Looking for Qt 6? It is packaged differently to Qt 5 with different
+# package names: https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes
+
+if [[ ${PV} != *9999* ]]; then
+	QT5_KDEPATCHSET_REV=1
+	KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit linux-info flag-o-matic toolchain-funcs qt5-build
+
+DESCRIPTION="Cross-platform application development framework"
+SLOT=5/${QT5_PV}
+
+IUSE="icu old-kernel"
+
+DEPEND="
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2[pcre16,unicode]
+	virtual/zlib:=
+	icu? ( dev-libs/icu:= )
+	!icu? ( virtual/libiconv )
+"
+RDEPEND="${DEPEND}
+	!<dev-qt/designer-${QT5_PV}:5
+	!<dev-qt/qt3d-${QT5_PV}:5
+	!<dev-qt/qtbluetooth-${QT5_PV}:5
+	!<dev-qt/qtcharts-${QT5_PV}:5
+	!<dev-qt/qtconcurrent-${QT5_PV}:5
+	!<dev-qt/qtdatavis3d-${QT5_PV}:5
+	!<dev-qt/qtdbus-${QT5_PV}:5
+	!<dev-qt/qtdeclarative-${QT5_PV}:5
+	!<dev-qt/qtgamepad-${QT5_PV}:5
+	!<dev-qt/qtgraphicaleffects-${QT5_PV}:5
+	!<dev-qt/qtgui-${QT5_PV}:5
+	!<dev-qt/qthelp-${QT5_PV}:5
+	!<dev-qt/qtimageformats-${QT5_PV}:5
+	!<dev-qt/qtlocation-${QT5_PV}:5
+	!<dev-qt/qtmultimedia-${QT5_PV}:5
+	!<dev-qt/qtnetwork-${QT5_PV}:5
+	!<dev-qt/qtnetworkauth-${QT5_PV}:5
+	!<dev-qt/qtopengl-${QT5_PV}:5
+	!<dev-qt/qtpositioning-${QT5_PV}:5
+	!<dev-qt/qtprintsupport-${QT5_PV}:5
+	!<dev-qt/qtquickcontrols-${QT5_PV}:5
+	!<dev-qt/qtquickcontrols2-${QT5_PV}:5
+	!<dev-qt/qtquicktimeline-${QT5_PV}:5
+	!<dev-qt/qtscript-${QT5_PV}:5
+	!<dev-qt/qtscxml-${QT5_PV}:5
+	!<dev-qt/qtsensors-${QT5_PV}:5
+	!<dev-qt/qtserialbus-${QT5_PV}:5
+	!<dev-qt/qtserialport-${QT5_PV}:5
+	!<dev-qt/qtspeech-${QT5_PV}:5
+	!<dev-qt/qtsql-${QT5_PV}:5
+	!<dev-qt/qtsvg-${QT5_PV}:5
+	!<dev-qt/qttest-${QT5_PV}:5
+	!<dev-qt/qtvirtualkeyboard-${QT5_PV}:5
+	!<dev-qt/qtwayland-${QT5_PV}:5
+	!<dev-qt/qtwebchannel-${QT5_PV}:5
+	!<dev-qt/qtwebengine-${QT5_PV}:5
+	!<dev-qt/qtwebsockets-${QT5_PV}:5
+	!<dev-qt/qtwebview-${QT5_PV}:5
+	!<dev-qt/qtwidgets-${QT5_PV}:5
+	!<dev-qt/qtx11extras-${QT5_PV}:5
+	!<dev-qt/qtxml-${QT5_PV}:5
+	!<dev-qt/qtxmlpatterns-${QT5_PV}:5
+"
+
+QT5_TARGET_SUBDIRS=(
+	src/tools/bootstrap
+	src/tools/moc
+	src/tools/rcc
+	src/corelib
+	src/tools/qlalr
+	doc
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	!:network
+	!:sql
+	!:testlib
+	!:xml
+)
+
+pkg_pretend() {
+	use kernel_linux || return
+	get_running_version
+	if kernel_is -lt 4 11 && ! use old-kernel; then
+		ewarn "The running kernel is older than 4.11. USE=old-kernel is needed for"
+		ewarn "dev-qt/qtcore to function on this kernel properly. Bugs #669994, #672856"
+	fi
+}
+
+src_prepare() {
+	# don't add -O3 to CXXFLAGS, bug 549140
+	sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die
+
+	# fix missing qt_version_tag symbol w/ LTO, bug 674382
+	sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
+
+	# Broken with FORTIFY_SOURCE=3
+	#
+	# Our toolchain sets F_S=2 by default w/ >= -O2, so we need
+	# to unset F_S first, then explicitly set 2, to negate any default
+	# and anything set by the user if they're choosing 3 (or if they've
+	# modified GCC to set 3).
+	#
+	# Refs:
+	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105078
+	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105709
+	# https://bugreports.qt.io/browse/QTBUG-103782
+	# bug #847145
+	if tc-enables-fortify-source ; then
+		# We can't unconditionally do this b/c we fortify needs
+		# some level of optimisation.
+		filter-flags -D_FORTIFY_SOURCE=3
+		# (Qt doesn't seem to respect CPPFLAGS?)
+		append-flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+	fi
+
+	qt5-build_src_prepare
+
+	# workaround for a79a370c (...Annotate-QMutex-...patch) adding a header
+	qt5_syncqt_version
+}
+
+src_configure() {
+	local myconf=(
+		$(qt_use icu)
+		$(qt_use !icu iconv)
+	)
+	use old-kernel && myconf+=(
+		-no-feature-renameat2 # needs Linux 3.16, bug 669994
+		-no-feature-getentropy # needs Linux 3.17, bug 669994
+		-no-feature-statx # needs Linux 4.11, bug 672856
+	)
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+	qt5_symlink_binary_to_path qmake 5
+
+	local flags=(
+		DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG
+		OPENGL OPENSSL SSL WIDGETS
+	)
+
+	for flag in ${flags[@]}; do
+		cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die
+
+			#if defined(QT_NO_${flag}) && defined(QT_${flag})
+			# undef QT_NO_${flag}
+			#elif !defined(QT_NO_${flag}) && !defined(QT_${flag})
+			# define QT_NO_${flag}
+			#endif
+		_EOF_
+	done
+}

+ 3 - 0
dev-qt/qtdbus/Manifest

@@ -0,0 +1,3 @@
+DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
+DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
+DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206

+ 17 - 0
dev-qt/qtdbus/metadata.xml

@@ -0,0 +1,17 @@
+<?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>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 45 - 0
dev-qt/qtdbus/qtdbus-5.15.18.ebuild

@@ -0,0 +1,45 @@
+# 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
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Qt5 module for inter-process communication over the D-Bus protocol"
+
+IUSE=""
+
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	sys-apps/dbus
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+	src/dbus
+	src/tools/qdbusxml2cpp
+	src/tools/qdbuscpp2xml
+)
+
+QT5_GENTOO_CONFIG=(
+	:dbus
+	:dbus-linked:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:dbus
+	:dbus-linked
+)
+
+src_configure() {
+	local myconf=(
+		-dbus-linked
+	)
+	qt5-build_src_configure
+}

+ 6 - 0
dev-qt/qtdeclarative/Manifest

@@ -0,0 +1,6 @@
+DIST qtdeclarative-5.15.18-gentoo-kde-1.tar.xz 19304 BLAKE2B ec246d080eeeeeedb3d358c322faf8392cd106ffb6a0cda2ccbe1fd3776e7fdd2d76c8d8cd56e954b8fa11b466a6b6592e6134a8ba771b1433ba74c9fa0e00cd SHA512 f7636a405a0602b476bc4034382b275c14e3e7d166314042c7ea6bfb79f30aba7c79b540c4ec2352bb2e7fbed51b5bab52ddbf6458a579c9ba4fa2d6aad30a55
+DIST qtdeclarative-everywhere-opensource-src-5.15.18.tar.xz 21588352 BLAKE2B 9daf4a86e39db46d12350cc2e17cba1d23c8777a5c3193a76bd66c68ff252c94d616717a4b13cebe25707a6acd42084a1a02d372862d0b0f7418373b267be94b SHA512 73c45c47b5074b6bc1127abb1b3cf1cd751deeb80c2f9c86a675c7323fecf20bd83363fad95803bc72cf494ae4679c1f38a02387363f266c093c707e700c9ea2
+DIST qtdeclarative-everywhere-src-6.10.1.tar.xz 37552260 BLAKE2B 32895b277b194dc89fb009edda071d1bee40a99432f422eacb3890173bff334c788eb741152dfe39d8b511b30d7d0d052627ece566f2a86b04bc88bebc600c1d SHA512 e433ae1e282175d251c3257eed775bc5835f564bbd7f34244c9765af59eee2b97f4b2852d59987942315cda14a763c65e509553439e2a4c2ac2652ea9e7a56b6
+DIST qtdeclarative-everywhere-src-6.10.2.tar.xz 38060952 BLAKE2B 32f82c9a7856d1d67d03b292cccdee7d2c22c2667d0dcda47b491a1e5d8e15af33c8d88d5c5c8fbb6fbaffc408f73b6e6ec6cfbfd6794da0e404277ce87c0fbe SHA512 93b76ea0c9a804042335e6c476fc1b9a987ea29b3c5c18fbda2266cba14c7c9c7f0c91ac5de23eeb06748dfa3009d91ea72e7b7df7c0940273cdcf3ca7638d98
+DIST qtdeclarative-everywhere-src-6.10.3.tar.xz 38084496 BLAKE2B acefeb2f998001cd811d4ca62799cb44ed57e743a1198f58fe4d84f920b438496e45bf2cd71d08da83cf566bde09c4b2c284fb655bbcc607fd1c29d4c1c9a809 SHA512 187a525b73595e7c4d89c98be657df4f480114957649813aa9ecd3fba23f56f20c8804f2ab507d83a5fb6120a2c6c36751fe5c80f43f9feb6c3479a733fb6684
+DIST qtdeclarative-everywhere-src-6.11.1.tar.xz 38744644 BLAKE2B ea428a3930276dbf4db912f905aa885971de13f4b35034b6819c93af938d1d36d6b0cc13c3e54c1cd7bb8c375e4744bdd98af1ea9105ced5ad982e6aa550357a SHA512 91d657a33b3bf8fc79f1116561f125b3905b590e94504dcb3e4feead71f209b35b42a9da783d4568f756b22fd7a0e9802e1a9039553d400fe33417562776a1d6

+ 42 - 0
dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch

@@ -0,0 +1,42 @@
+From cc5387ad22ca503d167fd66e2429107d45b937af Mon Sep 17 00:00:00 2001
+From: David Redondo <qt@david-redondo.de>
+Date: Wed, 13 May 2020 11:04:23 +0200
+Subject: [PATCH] QQuickItemView: Fix max(X/Y)Extent()
+
+QQuickFlickable maxXExtent() and maxYExtent() return the amount of space
+that is not shown when inside a ScrollView. QQuickItemView however just
+returned width() if vertical and height() if horizontal. In these cases
+just defer to the QQuickFlickable base implementation like minXExtent()
+and minYExtent() already do.
+
+Fixes: QTBUG-83890
+Pick-to: 5.15
+Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb
+---
+ src/quick/items/qquickitemview.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
+index 7fb392233e4..ab130ac6857 100644
+--- a/src/quick/items/qquickitemview.cpp
++++ b/src/quick/items/qquickitemview.cpp
+@@ -1393,7 +1393,7 @@ qreal QQuickItemView::maxYExtent() const
+ {
+     Q_D(const QQuickItemView);
+     if (d->layoutOrientation() == Qt::Horizontal)
+-        return height();
++        return QQuickFlickable::maxYExtent();
+ 
+     if (d->vData.maxExtentDirty) {
+         d->maxExtent = d->maxExtentForAxis(d->vData, false);
+@@ -1421,7 +1421,7 @@ qreal QQuickItemView::maxXExtent() const
+ {
+     Q_D(const QQuickItemView);
+     if (d->layoutOrientation() == Qt::Vertical)
+-        return width();
++        return QQuickFlickable::maxXExtent();
+ 
+     if (d->hData.maxExtentDirty) {
+         d->maxExtent = d->maxExtentForAxis(d->hData, true);
+-- 
+2.16.3

+ 91 - 0
dev-qt/qtdeclarative/files/qtdeclarative-5.15.18-CVE-2025-12385.patch

@@ -0,0 +1,91 @@
+From f78bc0b2c6884fd730bf34a931870d67936cf01d Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Sun, 7 Dec 2025 11:44:35 +0100
+Subject: [PATCH] Increase robustness of <img> tag in Text component
+
+For Text.StyledText, there was no protection against <img> tags
+with very large widths or heights. This could cause an application
+to spend a very long time processing a layout and sometimes crash
+if the size was too large.
+
+We reuse the internal coord limit in QPainter as our maximum size
+here, similar to what we do in Qt Svg for instance.
+
+For Text.RichText, there were no issues in release builds, but in
+debug builds, you could trigger an overflow assert when rounding
+the number if it exceeded INT_MAX. For this, we simply cap the
+width and height at INT_MAX.
+
+Fixes: QTBUG-141515
+Pick-to: 5.15
+Change-Id: I4bcba16158f5f495a0de38963316effc4c46aae1
+Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
+(cherry picked from commit 4aaf9bf21f7cc69d73066785e254b664fcc82025)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+(cherry picked from commit 907c7ceb7b27586039262567273efd5ec79e6202)
+(cherry picked from commit c4b74f27058b302a101befc2c1967f8c00b41be7)
+
+This is actually a manual patch based on
+https://download.qt.io/official_releases/qt/6.5/CVE-2025-12385-qtdeclarative-6.5-0002.diff
+---
+ src/quick/items/qquicktextdocument.cpp |  4 ++--
+ src/quick/util/qquickstyledtext.cpp    | 19 +++++++++++++++++--
+ 2 files changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/src/quick/items/qquicktextdocument.cpp b/src/quick/items/qquicktextdocument.cpp
+index 021bbca0f6..67ed63d0de 100644
+--- a/src/quick/items/qquicktextdocument.cpp
++++ b/src/quick/items/qquicktextdocument.cpp
+@@ -138,9 +138,9 @@ QSizeF QQuickTextDocumentWithImageResources::intrinsicSize(
+     if (format.isImageFormat()) {
+         QTextImageFormat imageFormat = format.toImageFormat();
+ 
+-        const int width = qRound(imageFormat.width());
++        int width = qRound(qBound(qreal(INT_MIN), imageFormat.width(), qreal(INT_MAX)));
+         const bool hasWidth = imageFormat.hasProperty(QTextFormat::ImageWidth) && width > 0;
+-        const int height = qRound(imageFormat.height());
++        const int height = qRound(qBound(qreal(INT_MIN), imageFormat.height(), qreal(INT_MAX)));
+         const bool hasHeight = imageFormat.hasProperty(QTextFormat::ImageHeight) && height > 0;
+ 
+         QSizeF size(width, height);
+diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
+index a25af90414..120a2593d3 100644
+--- a/src/quick/util/qquickstyledtext.cpp
++++ b/src/quick/util/qquickstyledtext.cpp
+@@ -45,6 +45,11 @@
+ #include <qmath.h>
+ #include "qquickstyledtext_p.h"
+ #include <QQmlContext>
++#include <QtGui/private/qoutlinemapper_p.h>
++
++#ifndef QQUICKSTYLEDPARSER_COORD_LIMIT
++#  define QQUICKSTYLEDPARSER_COORD_LIMIT QT_RASTER_COORD_LIMIT
++#endif
+ 
+ Q_LOGGING_CATEGORY(lcStyledText, "qt.quick.styledtext")
+ 
+@@ -694,9 +699,19 @@ void QQuickStyledTextPrivate::parseImageAttributes(const QChar *&ch, const QStri
+             if (attr.first == QLatin1String("src")) {
+                 image->url =  QUrl(attr.second.toString());
+             } else if (attr.first == QLatin1String("width")) {
+-                image->size.setWidth(attr.second.toString().toInt());
++                bool ok;
++                int v = attr.second.toString().toInt(&ok);
++                if (ok && v <= QQUICKSTYLEDPARSER_COORD_LIMIT)
++                    image->size.setWidth(v);
++                else
++                    qCWarning(lcStyledText) << "Invalid width provided for <img>";
+             } else if (attr.first == QLatin1String("height")) {
+-                image->size.setHeight(attr.second.toString().toInt());
++                bool ok;
++                int v = attr.second.toString().toInt(&ok);
++                if (ok && v <= QQUICKSTYLEDPARSER_COORD_LIMIT)
++                    image->size.setHeight(v);
++                else
++                    qCWarning(lcStyledText) << "Invalid height provided for <img>";
+             } else if (attr.first == QLatin1String("align")) {
+                 if (attr.second.toString() == QLatin1String("top")) {
+                     image->align = QQuickStyledTextImgTag::Top;
+-- 
+2.52.0
+

+ 26 - 0
dev-qt/qtdeclarative/metadata.xml

@@ -0,0 +1,26 @@
+<?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>
+	<use>
+		<flag name="localstorage">Build the LocalStorage import for QtQuick (requires QtSql)</flag>
+		<flag name="network">Enable QtNetwork support</flag>
+		<flag name="opengl">Enable OpenGL support</flag>
+		<flag name="qmlls">Build the qmlls tool using <pkg>dev-qt/qtlanguageserver</pkg></flag>
+		<flag name="sql">Enable QtSQL support</flag>
+		<flag name="widgets">Enable QtWidgets support</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://qt-project.atlassian.net/</bugs-to>
+		<doc>https://doc.qt.io/</doc>
+		<remote-id type="github">qt/qtdeclarative</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>

+ 69 - 0
dev-qt/qtdeclarative/qtdeclarative-5.15.18-r1.ebuild

@@ -0,0 +1,69 @@
+# Copyright 2009-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
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit flag-o-matic python-any-r1 qt5-build
+
+DESCRIPTION="The QML and Quick modules for the Qt5 framework"
+
+IUSE="cpu_flags_x86_sse2 gles2-only +jit localstorage vulkan +widgets"
+REQUIRED_USE="jit? ( x86? ( cpu_flags_x86_sse2 ) )"
+
+# qtgui[gles2-only=] is needed because of bug 504322
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*
+	=dev-qt/qtgui-${QT5_PV}*:5=[gles2-only=,vulkan=]
+	=dev-qt/qtnetwork-${QT5_PV}*
+	=dev-qt/qttest-${QT5_PV}*
+	media-libs/libglvnd
+	localstorage? ( =dev-qt/qtsql-${QT5_PV}* )
+	widgets? ( =dev-qt/qtwidgets-${QT5_PV}*[gles2-only=] )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.14.2-QQuickItemView-fix-maxXY-extent.patch" # QTBUG-83890
+	"${FILESDIR}/${P}-CVE-2025-12385.patch" # bug 966269, QTBUG-141515
+)
+
+src_prepare() {
+	qt_use_disable_mod localstorage sql \
+		src/imports/imports.pro
+
+	qt_use_disable_mod widgets widgets \
+		src/src.pro \
+		src/qmltest/qmltest.pro \
+		tests/auto/auto.pro \
+		tools/tools.pro \
+		tools/qmlscene/qmlscene.pro \
+		tools/qml/qml.pro
+
+	qt5-build_src_prepare
+}
+
+src_configure() {
+	replace-flags "-Os" "-O2" # bug 840861
+
+	local myqmakeargs=(
+		--
+		-qml-debug
+		$(qt_use jit feature-qml-jit)
+	)
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+	qt5_symlink_binary_to_path qml 5
+	qt5_symlink_binary_to_path qmleasing 5
+	qt5_symlink_binary_to_path qmlpreview 5
+	qt5_symlink_binary_to_path qmlscene 5
+}

+ 3 - 0
dev-qt/qtgui/Manifest

@@ -0,0 +1,3 @@
+DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
+DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
+DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206

+ 28 - 0
dev-qt/qtgui/metadata.xml

@@ -0,0 +1,28 @@
+<?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>
+	<use>
+		<flag name="eglfs">Build the EGL Full Screen/Single Surface platform plugin</flag>
+		<flag name="evdev">Enable support for input devices via evdev</flag>
+		<flag name="ibus">Build the IBus input method plugin</flag>
+		<flag name="libinput">Enable support for input devices via <pkg>dev-libs/libinput</pkg></flag>
+		<flag name="linuxfb">Enable Linux framebuffer support for embedded devices</flag>
+		<flag name="tslib">Enable support for touchscreen devices via <pkg>x11-libs/tslib</pkg></flag>
+		<flag name="tuio">Build plugin to receive touch events over the TUIO protocol</flag>
+		<flag name="wayland">Provide <pkg>dev-qt/qtwayland</pkg> to ensure Qt applications can be run as Wayland clients</flag>
+		<flag name="X">Build the XCB platform plugin and enable X11 integration</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://qt-project.atlassian.net/</bugs-to>
+		<doc>https://doc.qt.io/</doc>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 184 - 0
dev-qt/qtgui/qtgui-5.15.18-r1.ebuild

@@ -0,0 +1,184 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Looking for Qt 6? It is packaged differently to Qt 5 with different
+# package names: https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes
+
+if [[ ${PV} != *9999* ]]; then
+	QT5_KDEPATCHSET_REV=1
+	KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+SLOT=5/${QT5_PV} # bug 707658
+IUSE="accessibility dbus egl eglfs evdev gles2-only ibus jpeg +libinput
+	linuxfb +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+	|| ( eglfs linuxfb vnc wayland X )
+	accessibility? ( dbus X )
+	eglfs? ( egl )
+	ibus? ( dbus )
+	libinput? ( udev )
+	X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+	dev-libs/glib:2
+	dev-libs/md4c
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	dev-util/gtk-update-icon-cache
+	media-libs/fontconfig
+	media-libs/freetype:2
+	media-libs/harfbuzz:=
+	virtual/zlib:=
+	accessibility? ( app-accessibility/at-spi2-core:2 )
+	dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+	eglfs? (
+		media-libs/mesa[gbm(+)]
+		x11-libs/libdrm
+	)
+	evdev? ( sys-libs/mtdev )
+	jpeg? ( media-libs/libjpeg-turbo:= )
+	gles2-only? ( media-libs/libglvnd )
+	!gles2-only? ( media-libs/libglvnd[X] )
+	libinput? (
+		dev-libs/libinput:=
+		x11-libs/libxkbcommon
+	)
+	png? ( media-libs/libpng:= )
+	tslib? ( >=x11-libs/tslib-1.21 )
+	tuio? ( =dev-qt/qtnetwork-${QT5_PV}* )
+	udev? ( virtual/libudev:= )
+	vnc? ( =dev-qt/qtnetwork-${QT5_PV}* )
+	vulkan? ( dev-util/vulkan-headers )
+	X? (
+		x11-libs/libICE
+		x11-libs/libSM
+		x11-libs/libX11
+		x11-libs/libxcb:=
+		x11-libs/libxkbcommon[X]
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+"
+DEPEND="${RDEPEND}
+	evdev? ( sys-kernel/linux-headers )
+	linuxfb? ( sys-kernel/linux-headers )
+	udev? ( sys-kernel/linux-headers )
+	X? ( x11-base/xorg-proto )
+"
+PDEPEND="
+	ibus? ( app-i18n/ibus )
+	wayland? ( =dev-qt/qtwayland-${QT5_PV}* )
+"
+
+QT5_TARGET_SUBDIRS=(
+	src/tools/qvkgen
+	src/gui
+	src/openglextensions
+	src/platformheaders
+	src/platformsupport
+	src/plugins/generic
+	src/plugins/imageformats
+	src/plugins/platforms
+	src/plugins/platforminputcontexts
+)
+
+QT5_GENTOO_CONFIG=(
+	accessibility:accessibility-atspi-bridge
+	egl:egl:
+	eglfs:eglfs:
+	eglfs:eglfs_egldevice:
+	eglfs:eglfs_gbm:
+	evdev:evdev:
+	evdev:mtdev:
+	:fontconfig:
+	:system-freetype:FREETYPE
+	!:no-freetype:
+	gles2-only::OPENGL_ES
+	gles2-only:opengles2:OPENGL_ES_2
+	!:no-gui:
+	:system-harfbuzz:
+	!:no-harfbuzz:
+	jpeg:system-jpeg:IMAGEFORMAT_JPEG
+	!jpeg:no-jpeg:
+	libinput
+	libinput:xkbcommon:
+	:opengl
+	png:png:
+	png:system-png:IMAGEFORMAT_PNG
+	!png:no-png:
+	tslib:tslib:
+	udev:libudev:
+	vulkan:vulkan:
+	X:xcb:
+	X:xcb-glx:
+	X:xcb-plugin:
+	X:xcb-render:
+	X:xcb-sm:
+	X:xcb-xlib:
+	X:xcb-xinput:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:gui
+)
+
+src_prepare() {
+	# don't add -O3 to CXXFLAGS, bug 549140
+	sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
+	# egl_x11 is activated when both egl and X are enabled
+	use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
+
+	qt_use_disable_config dbus dbus \
+		src/platformsupport/themes/genericunix/genericunix.pri
+
+	qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
+
+	qt_use_disable_mod ibus dbus \
+		src/plugins/platforminputcontexts/platforminputcontexts.pro
+
+	use vnc || sed -i -e '/SUBDIRS += vnc/d' \
+		src/plugins/platforms/platforms.pro || die
+
+	qt5-build_src_prepare
+}
+
+src_configure() {
+	local myconf=(
+		$(qt_use accessibility feature-accessibility-atspi-bridge)
+		$(usev dbus -dbus-linked)
+		$(qt_use egl)
+		$(qt_use eglfs)
+		$(usev eglfs '-gbm -kms')
+		$(qt_use evdev)
+		$(qt_use evdev mtdev)
+		-fontconfig
+		-system-freetype
+		-gui
+		-system-harfbuzz
+		$(qt_use jpeg libjpeg system)
+		$(qt_use libinput)
+		$(qt_use linuxfb)
+		-opengl $(usex gles2-only es2 desktop)
+		$(qt_use png libpng system)
+		$(qt_use tslib)
+		$(qt_use udev libudev)
+		$(qt_use vulkan)
+		$(qt_use X xcb)
+		$(usev X '-xcb-xlib')
+	)
+	if use libinput || use X; then
+		myconf+=( -xkbcommon )
+	fi
+	qt5-build_src_configure
+}

+ 3 - 0
dev-qt/qtnetwork/Manifest

@@ -0,0 +1,3 @@
+DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
+DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
+DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206

+ 22 - 0
dev-qt/qtnetwork/metadata.xml

@@ -0,0 +1,22 @@
+<?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>
+	<use>
+		<flag name="gssapi">Enable support for GSSAPI (<pkg>virtual/krb5</pkg>)</flag>
+		<flag name="libproxy">Use <pkg>net-libs/libproxy</pkg> for automatic
+			HTTP/SOCKS proxy configuration</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://qt-project.atlassian.net/</bugs-to>
+		<doc>https://doc.qt.io/</doc>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 62 - 0
dev-qt/qtnetwork/qtnetwork-5.15.18.ebuild

@@ -0,0 +1,62 @@
+# 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
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+IUSE="gssapi libproxy sctp +ssl"
+
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	virtual/zlib:=
+	gssapi? ( virtual/krb5 )
+	libproxy? ( net-libs/libproxy )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	ssl? ( >=dev-libs/openssl-1.1.1:0= )
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+	src/network
+	src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+	libproxy:libproxy:
+	ssl::SSL
+	ssl::OPENSSL
+	ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:network
+)
+
+src_configure() {
+	local myconf=(
+		$(qt_use gssapi feature-gssapi)
+		$(qt_use libproxy)
+		$(qt_use sctp)
+		$(usev ssl -openssl-linked)
+	)
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+
+	# workaround for bug 652650
+	if use ssl; then
+		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
+			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
+	fi
+}

+ 6 - 0
dev-qt/qtsvg/Manifest

@@ -0,0 +1,6 @@
+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.1.tar.xz 2613980 BLAKE2B 13fddc7721c097ab9e315ca27aa7ba5a808fdef878afcadca76228d83eb10d4605b1d00d519e2100fb7b712c35664b126fbb3e2b9ada1d8f470607b2ad2532d2 SHA512 26d061a24e7196edf07c508ae12bf2d2f1f99cdb9a99ab993aefd0b9d135a6da00eef805f00cbdf022f7b3255f378bc491be1534f3837858078285d543bbe2c7
+DIST qtsvg-everywhere-src-6.10.2.tar.xz 2614740 BLAKE2B 9936efc2ead690b7810c96c8517d9789bbf4912cad07d1d403e5816ec18b3441d14394672dec82eade551dffa69d0436714be812bcc888d8a1b552587e08c6c2 SHA512 b455d7be4d6e320bbabf8f7c4936a46b248c5782226ca0c5249354efc6ea3b9463a1518de22a54605281c0ec2088b851db6ec824dceaf2beeff55896844651f1
+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

+ 18 - 0
dev-qt/qtsvg/metadata.xml

@@ -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>

+ 25 - 0
dev-qt/qtsvg/qtsvg-5.15.18.ebuild

@@ -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}* )
+"

+ 3 - 0
dev-qt/qttest/Manifest

@@ -0,0 +1,3 @@
+DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
+DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
+DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206

+ 17 - 0
dev-qt/qttest/metadata.xml

@@ -0,0 +1,17 @@
+<?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>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 33 - 0
dev-qt/qttest/qttest-5.15.18.ebuild

@@ -0,0 +1,33 @@
+# 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
+
+QT5_MODULE="qtbase"
+VIRTUALX_REQUIRED="test"
+inherit qt5-build
+
+DESCRIPTION="Unit testing library for the Qt5 framework"
+
+IUSE=""
+
+RDEPEND="=dev-qt/qtcore-${QT5_PV}*:5="
+DEPEND="${RDEPEND}
+	test? (
+		=dev-qt/qtgui-${QT5_PV}*
+		=dev-qt/qtxml-${QT5_PV}*
+	)
+"
+
+QT5_TARGET_SUBDIRS=(
+	src/testlib
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:testlib
+)

+ 6 - 0
dev-qt/qtwayland/Manifest

@@ -0,0 +1,6 @@
+DIST qtwayland-5.15.18-gentoo-kde-1.tar.xz 45732 BLAKE2B e9498684aad8205487a8beb6c6408851009b9eeb7ed8e5ae809f26bbb4e1ce5970bdabd0fc79562747b7af6acf5f77e0faea854a646e0039889c3ae7001afb8f SHA512 65851f53e2a534cb6aab8d547543a1864243a7dd07f8766cf68ba0bbfd2fca6e011f6b9a68beabf0f2b806eacd48adacf876f8ba571c7747dcfce6a5687bee7b
+DIST qtwayland-everywhere-opensource-src-5.15.18.tar.xz 547760 BLAKE2B e41148764c0926109a35ef62bdfd59b031c42ed245783400a139da872ee6a83f9e4480e357ebd7561c3eeacb4cac612e94d0817f4bbe5a66131fab3a5a3596d7 SHA512 9e0d07a4a91eb6dd1bde6b211bae2b64f2035a28176c277adb86ab5d3a281c7740930dc304db94990c1d2277ef54d17b934f99326413719626fb161b612c033f
+DIST qtwayland-everywhere-src-6.10.1.tar.xz 901632 BLAKE2B c9d6ef7116afae89d22bdfc6f2221621cd288f462bf33d75bd79dd6c1afcf5d1660d04320c5134b52c7960a54986bb9242bfef48fa20ca3a96fd910fbb809de1 SHA512 77084b4fcf1549a5e35b4d6cf54940893adf4825f83585989b0072cb8607a419a6d01a97756b4a3c3fd994e02be099c98c70df52af522ae03f2aaea27dc7962e
+DIST qtwayland-everywhere-src-6.10.2.tar.xz 901748 BLAKE2B c1c8ac0626e021e7755b2f8d4cd9a7463683a3f5987ebd98c6649e8b3f6dbef37e4d3afba56912842908a828c89084173a7a08059b0feca1612620a62f0a15f2 SHA512 c485421ffcbd03a55560272c08ae3b1ad5ea5d7b97e3cacff700bfdc8a458520d040c3443a2ec14d822af8f3fdb9754c32c065c73b586c8db8ea32bedba164b9
+DIST qtwayland-everywhere-src-6.10.3.tar.xz 901620 BLAKE2B b90e9f2c50d54d08b2bf234f4c93dccbe5d5413715c91ebc09cf725e1e95e927bfa7d9b18f095e2d9646b2701261954dde29e916ce86ab8721ddbe2bfa90ca71 SHA512 e8fd87143b8a0def113d02ae43931ed8c8b5f1917926481398bf0b617a0c70ef79ba20bf8359881f902b318b7412765a8a479c50d55a7267723cb9c76bd8d4b1
+DIST qtwayland-everywhere-src-6.11.1.tar.xz 903616 BLAKE2B 50452f6c9cb21c8b60687898b74651e67a87da0063c968a4cbb9eae2d0c45697fada478d93d35d74870dc925c9457d0b9b3ed23389ab7a9e013e7872041855fb SHA512 97c9aa8a75d68d3ba5f28e86dd2af7fc3fd2a32a190ffc4c5b5145a98e7657627dbb2b63893f241d009baa72de7beaebfcf91282e731b7985c240d204c5aab9b

+ 24 - 0
dev-qt/qtwayland/metadata.xml

@@ -0,0 +1,24 @@
+<?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>
+	<use>
+		<flag name="compositor">Enable support for the wayland compositor / server APIs</flag>
+		<flag name="gnome">Build the GNOME-like decoration plugin (loaded by default with GNOME)</flag>
+		<flag name="qml">Build QML/QtQuick bindings and imports</flag>
+		<flag name="vulkan">Enable support for Vulkan-based server buffer integration</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://qt-project.atlassian.net/</bugs-to>
+		<doc>https://doc.qt.io/</doc>
+		<remote-id type="github">qt/qtwayland</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>

+ 55 - 0
dev-qt/qtwayland/qtwayland-5.15.18.ebuild

@@ -0,0 +1,55 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Looking for Qt 6? It is packaged differently to Qt 5 with different
+# package names: https://wiki.gentoo.org/wiki/Project:Qt/Qt6_migration_notes
+
+if [[ ${PV} != *9999* ]]; then
+	QT5_KDEPATCHSET_REV=1
+	KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
+fi
+
+inherit qt5-build
+
+DESCRIPTION="Wayland platform plugin for Qt"
+
+SLOT=5/${QT5_PV} # bug 815646
+IUSE="compositor vulkan"
+
+RDEPEND="
+	dev-libs/wayland
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	=dev-qt/qtgui-${QT5_PV}*:5=[egl,libinput,vulkan=]
+	media-libs/libglvnd
+	x11-libs/libxkbcommon
+	compositor? ( =dev-qt/qtdeclarative-${QT5_PV}*:5= )
+"
+DEPEND="${RDEPEND}
+	vulkan? ( dev-util/vulkan-headers )
+"
+BDEPEND="dev-util/wayland-scanner"
+
+src_configure() {
+	local myqmakeargs=(
+		--
+		-no-feature-xcomposite-egl
+		-no-feature-xcomposite-glx
+		$(qt_use compositor feature-wayland-server)
+		$(qt_use compositor feature-wayland-dmabuf-server-buffer)
+		$(qt_use compositor feature-wayland-drm-egl-server-buffer)
+		$(qt_use compositor feature-wayland-shm-emulation-server-buffer)
+	)
+
+	use compositor && myqmakeargs+=(
+		$(qt_use vulkan feature-wayland-vulkan-server-buffer)
+	)
+
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+	rm "${D}${QT5_BINDIR}"/qtwaylandscanner || die
+}

+ 3 - 0
dev-qt/qtwidgets/Manifest

@@ -0,0 +1,3 @@
+DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
+DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
+DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206

+ 20 - 0
dev-qt/qtwidgets/metadata.xml

@@ -0,0 +1,20 @@
+<?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>
+	<use>
+		<flag name="gtk">Build the GTK platform theme plugin</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://qt-project.atlassian.net/</bugs-to>
+		<doc>https://doc.qt.io/</doc>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 63 - 0
dev-qt/qtwidgets/qtwidgets-5.15.18.ebuild

@@ -0,0 +1,63 @@
+# 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
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Set of components for creating classic desktop-style UIs for the Qt5 framework"
+
+# keep IUSE defaults in sync with qtgui
+IUSE="dbus gles2-only gtk +png +X"
+REQUIRED_USE="gtk? ( dbus )"
+
+DEPEND="
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	=dev-qt/qtgui-${QT5_PV}*:5=[gles2-only=,png=,X?]
+	dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+	gtk? (
+		dev-libs/glib:2
+		=dev-qt/qtgui-${QT5_PV}*:5=[dbus]
+		x11-libs/gtk+:3[X]
+		x11-libs/libX11
+		x11-libs/pango
+	)
+"
+RDEPEND="${DEPEND}"
+
+QT5_TARGET_SUBDIRS=(
+	src/tools/uic
+	src/widgets
+	src/plugins/platformthemes
+)
+
+QT5_GENTOO_CONFIG=(
+	dbus:xdgdesktopportal:
+	gtk:gtk3:
+	::widgets
+	!:no-widgets:
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:widgets
+)
+
+src_configure() {
+	local myconf=(
+		-opengl $(usex gles2-only es2 desktop)
+		$(usev dbus -dbus-linked)
+		$(qt_use gtk)
+		-gui
+		$(qt_use png libpng system)
+		-widgets
+		$(qt_use X xcb)
+		$(usev X '-xcb-xlib -xkbcommon')
+	)
+	qt5-build_src_configure
+}

+ 1 - 0
dev-qt/qtx11extras/Manifest

@@ -0,0 +1 @@
+DIST qtx11extras-everywhere-opensource-src-5.15.18.tar.xz 123980 BLAKE2B 30b23aeea766d694c7b9097ba655ed2a3057543a58ab937925b0725af53676cf3490ec2c0eb1c69b353c1dcf34e8c7d5f2107e965617d1622b36f67120d0972b SHA512 7e12f87da4a2c8333adc09f0069cfdbb6b81e778b0e261b13a8631a90bc21deb831fc4d74229e977afa864919ef6dbe98fc37ef29eeffee52cacef21af4216f7

+ 17 - 0
dev-qt/qtx11extras/metadata.xml

@@ -0,0 +1,17 @@
+<?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>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 22 - 0
dev-qt/qtx11extras/qtx11extras-5.15.18.ebuild

@@ -0,0 +1,22 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qt5-build
+
+DESCRIPTION="Linux/X11-specific support library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+	KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
+fi
+
+IUSE=""
+
+RDEPEND="
+	=dev-qt/qtcore-${QT5_PV}*
+	=dev-qt/qtgui-${QT5_PV}*[X]
+"
+DEPEND="${RDEPEND}
+	test? ( =dev-qt/qtwidgets-${QT5_PV}* )
+"

+ 3 - 0
dev-qt/qtxml/Manifest

@@ -0,0 +1,3 @@
+DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
+DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
+DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206

+ 17 - 0
dev-qt/qtxml/metadata.xml

@@ -0,0 +1,17 @@
+<?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>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

+ 29 - 0
dev-qt/qtxml/qtxml-5.15.18.ebuild

@@ -0,0 +1,29 @@
+# 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
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Implementation of SAX and DOM for the Qt5 framework"
+
+IUSE=""
+
+RDEPEND="=dev-qt/qtcore-${QT5_PV}*:5="
+DEPEND="${RDEPEND}
+	test? ( =dev-qt/qtnetwork-${QT5_PV}* )
+"
+
+QT5_TARGET_SUBDIRS=(
+	src/xml
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:xml
+)

+ 1031 - 0
eclass/qt5-build.eclass

@@ -0,0 +1,1031 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: qt5-build.eclass
+# @MAINTAINER:
+# qt@gentoo.org
+# @AUTHOR:
+# Davide Pesavento <pesa@gentoo.org>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: Eclass for Qt5 split ebuilds.
+# @DEAD
+# @DESCRIPTION:
+# This eclass contains various functions that are used when building Qt5.
+
+case ${EAPI} in
+	8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_QT5_BUILD_ECLASS} ]]; then
+_QT5_BUILD_ECLASS=1
+
+[[ ${CATEGORY} != dev-qt ]] &&
+	die "${ECLASS} is only to be used for building Qt 5"
+
+# @ECLASS_VARIABLE: QT5_BUILD_TYPE
+# @DESCRIPTION:
+# Default value is "release".
+# If PV matches "*9999*", this is automatically set to "live".
+QT5_BUILD_TYPE=release
+if [[ ${PV} == *9999* ]]; then
+	QT5_BUILD_TYPE=live
+fi
+readonly QT5_BUILD_TYPE
+
+# @ECLASS_VARIABLE: QT5_KDEPATCHSET_REV
+# @DEFAULT_UNSET
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Downstream generated patchset revision pulled from KDE's Qt5PatchCollection,
+# with the patchset having been generated in the following way from upstream's
+# qt module git repository:
+# @CODE
+# git format-patch v${PV}-lts-lgpl..origin/gentoo-kde/${PV} \
+#	-o ${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}
+# @CODE
+# Used for SRC_URI and applied in src_prepare.
+# Must be set before inheriting the eclass.
+
+# @ECLASS_VARIABLE: QT5_MODULE
+# @PRE_INHERIT
+# @DESCRIPTION:
+# The upstream name of the module this package belongs to. Used for
+# SRC_URI and EGIT_REPO_URI. Must be set before inheriting the eclass.
+: "${QT5_MODULE:=${PN}}"
+
+# @ECLASS_VARIABLE: QT5_PV
+# @DESCRIPTION:
+# 3-component version for use in dependency declarations on other dev-qt/ pkgs.
+QT5_PV=$(ver_cut 1-3)
+readonly QT5_PV
+
+# @ECLASS_VARIABLE: _QT5_P
+# @INTERNAL
+# @DESCRIPTION:
+# The upstream package name of the module this package belongs to.
+# Used for SRC_URI and S.
+
+# @ECLASS_VARIABLE: _QT5_GENTOOPATCHSET_REV
+# @DEFAULT_UNSET
+# @INTERNAL
+# @DESCRIPTION:
+# Gentoo downstream patchset version applied over qtbase. Used for SRC_URI and
+# applied in src_prepare.
+
+# @ECLASS_VARIABLE: QT5_TARGET_SUBDIRS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array variable containing the source directories that should be built.
+# All paths must be relative to ${S}.
+
+# @ECLASS_VARIABLE: QT5_GENTOO_CONFIG
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array of <useflag:feature:macro> triplets that are evaluated in src_install
+# to generate the per-package list of enabled QT_CONFIG features and macro
+# definitions, which are then merged together with all other Qt5 packages
+# installed on the system to obtain the global qconfig.{h,pri} files.
+
+# @ECLASS_VARIABLE: QT5_GENTOO_PRIVATE_CONFIG
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array of <useflag:feature> pairs that are evaluated in src_install
+# to generate the per-package list of enabled QT.global_private features,
+# which are then merged together with all other Qt5 packages installed on the
+# system to obtain the global qmodule.pri file.
+
+# @ECLASS_VARIABLE: VIRTUALX_REQUIRED
+# @PRE_INHERIT
+# @DESCRIPTION:
+# For proper description see virtualx.eclass man page.
+# Here we redefine default value to be manual, if your package needs virtualx
+# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
+: "${VIRTUALX_REQUIRED:=manual}"
+
+inherit estack flag-o-matic toolchain-funcs virtualx
+
+if [[ ${PN} != qtwebengine ]]; then
+	case ${PV} in
+		*9999)
+			inherit kde.org # kde/5.15 branch
+			;;
+		5.15.??*)
+			# official stable release
+			_QT5_P=${QT5_MODULE}-everywhere-opensource-src-${PV}
+			HOMEPAGE="https://www.qt.io/"
+			case ${PV} in
+				5.15.17)
+					SRC_URI="https://download.qt.io/official_releases/qt/${PV%.*}/${PV}/submodules/${_QT5_P}.tar.xz"
+					;;
+				*)
+					SRC_URI="https://download.qt.io/archive/qt/${PV%.*}/${PV}/submodules/${_QT5_P}.tar.xz"
+					;;
+			esac
+			# KDE Qt5PatchCollection on top of tag v${PV}-lts-lgpl
+			if [[ -n ${QT5_KDEPATCHSET_REV} ]]; then
+				HOMEPAGE+=" https://invent.kde.org/qt/qt/${QT5_MODULE} https://community.kde.org/Qt5PatchCollection"
+				SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}.tar.xz"
+			fi
+			S="${WORKDIR}"/${_QT5_P/opensource-}
+			;;
+	esac
+fi
+
+if [[ ${QT5_MODULE} == qtbase ]]; then
+	_QT5_GENTOOPATCHSET_REV=6
+	SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/qtbase-5.15-gentoo-patchset-${_QT5_GENTOOPATCHSET_REV}.tar.xz"
+fi
+
+# @ECLASS_VARIABLE: QT5_BUILD_DIR
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# Build directory for out-of-source builds.
+: "${QT5_BUILD_DIR:=${S}_build}"
+
+LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3"
+
+case ${PN} in
+	assistant|linguist|qdbus|qdbusviewer|pixeltool)
+		SLOT=0 ;;
+	linguist-tools|qdoc|qtdiag|qtgraphicaleffects|qtimageformats| \
+	qtpaths|qtplugininfo|qtquickcontrols|qtquicktimeline| \
+	qttranslations|qtwaylandscanner|qtxmlpatterns)
+		SLOT=5 ;;
+	*)
+		SLOT=5/$(ver_cut 1-2) ;;
+esac
+
+IUSE="debug test"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+	RESTRICT="test" # bug 457182
+else
+	RESTRICT="!test? ( test )"
+fi
+
+BDEPEND="
+	dev-lang/perl
+	virtual/pkgconfig
+"
+if [[ ${PN} != qttest ]]; then
+	DEPEND+=" test? ( =dev-qt/qttest-${QT5_PV}* )"
+fi
+
+######  Phase functions  ######
+
+# @FUNCTION: qt5-build_src_prepare
+# @DESCRIPTION:
+# Prepares the environment and patches the sources if necessary.
+qt5-build_src_prepare() {
+	qt5_prepare_env
+
+	# Workaround for bug #915203
+	# Upstream: https://bugreports.qt.io/browse/QTBUG-111514
+	if [[ ${PN} != qtcore ]]; then
+		append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+	fi
+
+	# many bugs, no one to fix
+	filter-lto
+
+	if [[ ${QT5_BUILD_TYPE} == live ]] || [[ -n ${KDE_ORG_COMMIT} ]]; then
+		if [[ -n ${KDE_ORG_COMMIT} ]]; then
+			einfo "Preparing KDE Qt5PatchCollection snapshot at ${KDE_ORG_COMMIT}"
+			mkdir -p .git || die # need to fake a git repository for configure
+		fi
+	fi
+
+	if [[ ${QT5_MODULE} == qtbase ]]; then
+		qt5_symlink_tools_to_build_dir
+
+		# Avoid unnecessary qmake recompilations
+		sed -i -e "/Creating qmake/i if [ '!' -e \"\$outpath/bin/qmake\" ]; then" \
+			-e '/echo "Done."/a fi' configure || die "sed failed (skip qmake bootstrap)"
+
+		# Respect CXX in bsymbolic_functions, fvisibility, precomp, and a few other tests
+		sed -i -e "/^QMAKE_CONF_COMPILER=/ s:=.*:=\"$(tc-getCXX)\":" \
+			configure || die "sed failed (QMAKE_CONF_COMPILER)"
+
+		# Respect build variables in configure tests (bug #639494)
+		sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die
+	fi
+
+	[[ -n ${QT5_KDEPATCHSET_REV} ]] && eapply "${WORKDIR}/${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}"
+
+	if [[ ${QT5_MODULE} == qtbase ]]; then
+		[[ -n ${_QT5_GENTOOPATCHSET_REV} ]] && eapply "${WORKDIR}/qtbase-5.15-gentoo-patchset-${_QT5_GENTOOPATCHSET_REV}"
+
+		# Respect CC, CXX, *FLAGS, MAKEOPTS and EXTRA_EMAKE when bootstrapping qmake
+		sed -i -e "/outpath\/qmake\".*\"*\$MAKE\"*)/ s|)| \
+			${MAKEOPTS} ${EXTRA_EMAKE} 'CC=$(tc-getCC)' 'CXX=$(tc-getCXX)' \
+			'QMAKE_CFLAGS=${CFLAGS}' 'QMAKE_CXXFLAGS=${CXXFLAGS}' 'QMAKE_LFLAGS=${LDFLAGS}'&|" \
+			-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
+			configure || die "sed failed (respect env for qmake build)"
+		sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \
+			qmake/Makefile.unix || die "sed failed (CPPFLAGS for qmake build)"
+	fi
+
+	default
+}
+
+# @FUNCTION: qt5-build_src_configure
+# @DESCRIPTION:
+# Runs qmake in the target directories. For packages
+# in qtbase, ./configure is also run before qmake.
+qt5-build_src_configure() {
+	if [[ ${QT5_MODULE} == qtbase ]]; then
+		qt5_base_configure
+	fi
+	if [[ ${QT5_MODULE} == qttools ]]; then
+		qt5_tools_configure
+	fi
+
+	qt5_foreach_target_subdir qt5_qmake
+}
+
+# @FUNCTION: qt5-build_src_compile
+# @DESCRIPTION:
+# Runs emake in the target directories.
+qt5-build_src_compile() {
+	qt5_foreach_target_subdir emake
+}
+
+# @FUNCTION: qt5-build_src_test
+# @DESCRIPTION:
+# Runs tests in the target directories.
+qt5-build_src_test() {
+	# disable broken cmake tests (bug 474004)
+	local myqmakeargs=("${myqmakeargs[@]}" -after SUBDIRS-=cmake SUBDIRS-=installed_cmake)
+
+	qt5_foreach_target_subdir qt5_qmake
+	qt5_foreach_target_subdir emake
+
+	# create a custom testrunner script that correctly sets
+	# LD_LIBRARY_PATH before executing the given test
+	local testrunner=${QT5_BUILD_DIR}/gentoo-testrunner
+	cat > "${testrunner}" <<-_EOF_ || die
+	#!/bin/sh
+	export LD_LIBRARY_PATH="${QT5_BUILD_DIR}/lib:${QT5_LIBDIR}"
+	"\$@"
+	_EOF_
+	chmod +x "${testrunner}"
+
+	set -- qt5_foreach_target_subdir emake TESTRUNNER="'${testrunner}'" check
+	if [[ ${VIRTUALX_REQUIRED} == test ]]; then
+		virtx "$@"
+	else
+		"$@"
+	fi
+}
+
+# @FUNCTION: qt5-build_src_install
+# @DESCRIPTION:
+# Runs emake install in the target directories.
+qt5-build_src_install() {
+	qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install
+
+	if [[ ${PN} == qtcore ]]; then
+		pushd "${QT5_BUILD_DIR}" >/dev/null || die
+
+		set -- emake INSTALL_ROOT="${D}" \
+			sub-qmake-qmake-aux-pro-install_subtargets \
+			install_{syncqt,mkspecs}
+
+		einfo "Running $*"
+		"$@"
+
+		popd >/dev/null || die
+
+		# install an empty Gentoo/gentoo-qconfig.h in ${D}
+		# so that it's placed under package manager control
+		> "${T}"/gentoo-qconfig.h
+		(
+			insinto "${QT5_HEADERDIR#"${EPREFIX}"}"/Gentoo
+			doins "${T}"/gentoo-qconfig.h
+		)
+
+		# include gentoo-qconfig.h at the beginning of QtCore/qconfig.h
+		sed -i -e '1i #include <Gentoo/gentoo-qconfig.h>\n' \
+			"${D}${QT5_HEADERDIR}"/QtCore/qconfig.h \
+			|| die "sed failed (qconfig.h)"
+	fi
+
+	qt5_install_module_config
+
+	# prune libtool files
+	find "${D}" -name '*.la' -type f -delete || die
+}
+
+# @FUNCTION: qt5-build_pkg_postinst
+# @DESCRIPTION:
+# Regenerate configuration after installation or upgrade/downgrade.
+qt5-build_pkg_postinst() {
+	qt5_regenerate_global_configs
+}
+
+# @FUNCTION: qt5-build_pkg_postrm
+# @DESCRIPTION:
+# Regenerate configuration when a module is completely removed.
+qt5-build_pkg_postrm() {
+	if [[ -z ${REPLACED_BY_VERSION} && ${PN} != qtcore ]]; then
+		qt5_regenerate_global_configs
+	fi
+}
+
+
+######  Public helpers  ######
+
+# @FUNCTION: qt5_configure_oos_quirk
+# @USAGE: <file> or <file> <path>
+# @DESCRIPTION:
+# Quirk for out-of-source builds. Runs qmake in root directory, copies
+# generated pri <file> from source <path> to build dir <path>.
+# If no <path> is given, <file> is copied to ${QT5_BUILD_DIR}.
+qt5_configure_oos_quirk() {
+	if [[ "$#" == 2 ]]; then
+		local source="${2}/${1}"
+		local dest="${QT5_BUILD_DIR}/${2}"
+	elif [[ "$#" == 1 ]]; then
+		local source="${1}"
+		local dest="${QT5_BUILD_DIR}"
+	else
+		die "${FUNCNAME[0]} must be passed either one or two arguments"
+	fi
+
+	mkdir -p "${dest}" || die
+	qt5_qmake "${QT5_BUILD_DIR}"
+	cp "${source}" "${dest}" || die
+}
+
+# @FUNCTION: qt5_syncqt_version
+# @DESCRIPTION:
+# Wrapper for Qt5 syncqt.pl to sync header files for ${PV} (required to run if
+# headers are added/removed by patching)
+qt5_syncqt_version() {
+	if [[ ${PV} == *9999* ]]; then
+		return
+	fi
+
+	local syncqt
+	if [[ ${PN} == qtcore ]]; then
+		syncqt=bin/syncqt.pl
+	else
+		syncqt=${QT5_BINDIR}/syncqt.pl
+	fi
+
+	perl ${syncqt} -version ${PV} || die
+}
+
+# @FUNCTION: qt5_symlink_binary_to_path
+# @USAGE: <target binary name> [suffix]
+# @DESCRIPTION:
+# Symlink a given binary from QT5_BINDIR to QT5_PREFIX/bin, with optional suffix
+qt5_symlink_binary_to_path() {
+	[[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument"
+
+	dosym -r "${QT5_BINDIR}"/${1} /usr/bin/${1}${2}
+}
+
+# @FUNCTION: qt_use
+# @USAGE: <flag> [feature] [enableval]
+# @DESCRIPTION:
+# <flag> is the name of a flag in IUSE.
+#
+# Outputs "-${enableval}-${feature}" if <flag> is enabled, "-no-${feature}"
+# otherwise. If [feature] is not specified, <flag> is used in its place.
+# If [enableval] is not specified, the "-${enableval}" prefix is omitted.
+qt_use() {
+	[[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument"
+
+	usex "$1" "${3:+-$3}-${2:-$1}" "-no-${2:-$1}"
+}
+
+# @FUNCTION: qt_use_compile_test
+# @USAGE: <flag> [config]
+# @DESCRIPTION:
+# <flag> is the name of a flag in IUSE.
+# [config] is the argument of qtCompileTest, defaults to <flag>.
+#
+# This function is useful to disable optional dependencies that are checked
+# at qmake-time using the qtCompileTest() function. If <flag> is disabled,
+# the compile test is skipped and the dependency is assumed to be unavailable,
+# i.e. the corresponding feature will be disabled. Note that all invocations
+# of this function must happen before calling qt5-build_src_configure.
+qt_use_compile_test() {
+	[[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument"
+
+	if ! use "$1"; then
+		mkdir -p "${QT5_BUILD_DIR}" || die
+		echo "CONFIG += done_config_${2:-$1}" >> "${QT5_BUILD_DIR}"/.qmake.cache || die
+	fi
+}
+
+# @FUNCTION: qt_use_disable_config
+# @USAGE: <flag> <config> <files...>
+# @DESCRIPTION:
+# <flag> is the name of a flag in IUSE.
+# <config> is the (lowercase) name of a Qt5 config entry.
+# <files...> is a list of one or more qmake project files.
+#
+# This function patches <files> to treat <config> as disabled
+# when <flag> is disabled, otherwise it does nothing.
+# This can be useful to avoid an automagic dependency when the config entry
+# is enabled on the system but the corresponding USE flag is disabled.
+qt_use_disable_config() {
+	[[ $# -ge 3 ]] || die "${FUNCNAME}() requires at least three arguments"
+
+	local flag=$1
+	local config=$2
+	shift 2
+
+	if ! use "${flag}"; then
+		echo "$@" | xargs sed -i -e "s/qtConfig(${config})/false/g" || die
+	fi
+}
+
+# @FUNCTION: qt_use_disable_mod
+# @USAGE: <flag> <module> <files...>
+# @DESCRIPTION:
+# <flag> is the name of a flag in IUSE.
+# <module> is the (lowercase) name of a Qt5 module.
+# <files...> is a list of one or more qmake project files.
+#
+# This function patches <files> to treat <module> as not installed
+# when <flag> is disabled, otherwise it does nothing.
+# This can be useful to avoid an automagic dependency when the module
+# is present on the system but the corresponding USE flag is disabled.
+qt_use_disable_mod() {
+	[[ $# -ge 3 ]] || die "${FUNCNAME}() requires at least three arguments"
+
+	local flag=$1
+	local module=$2
+	shift 2
+
+	if ! use "${flag}"; then
+		echo "$@" | xargs sed -i -e "s/qtHaveModule(${module})/false/g" || die
+	fi
+}
+
+
+######  Internal functions  ######
+
+# @FUNCTION: qt5_prepare_env
+# @INTERNAL
+# @DESCRIPTION:
+# Prepares the environment for building Qt.
+qt5_prepare_env() {
+	# setup installation directories
+	# note: keep paths in sync with qmake-utils.eclass
+	QT5_PREFIX=${EPREFIX}/usr
+	QT5_HEADERDIR=${QT5_PREFIX}/include/qt5
+	QT5_LIBDIR=${QT5_PREFIX}/$(get_libdir)
+	QT5_ARCHDATADIR=${QT5_PREFIX}/$(get_libdir)/qt5
+	QT5_BINDIR=${QT5_ARCHDATADIR}/bin
+	QT5_PLUGINDIR=${QT5_ARCHDATADIR}/plugins
+	QT5_LIBEXECDIR=${QT5_ARCHDATADIR}/libexec
+	QT5_IMPORTDIR=${QT5_ARCHDATADIR}/imports
+	QT5_QMLDIR=${QT5_ARCHDATADIR}/qml
+	QT5_DATADIR=${QT5_PREFIX}/share/qt5
+	QT5_DOCDIR=${QT5_PREFIX}/share/qt5-doc
+	QT5_TRANSLATIONDIR=${QT5_DATADIR}/translations
+	QT5_EXAMPLESDIR=${QT5_DATADIR}/examples
+	QT5_TESTSDIR=${QT5_DATADIR}/tests
+	QT5_SYSCONFDIR=${EPREFIX}/etc/xdg
+	readonly QT5_PREFIX QT5_HEADERDIR QT5_LIBDIR QT5_ARCHDATADIR \
+		QT5_BINDIR QT5_PLUGINDIR QT5_LIBEXECDIR QT5_IMPORTDIR \
+		QT5_QMLDIR QT5_DATADIR QT5_DOCDIR QT5_TRANSLATIONDIR \
+		QT5_EXAMPLESDIR QT5_TESTSDIR QT5_SYSCONFDIR
+
+	if [[ ${QT5_MODULE} == qtbase ]]; then
+		# see mkspecs/features/qt_config.prf
+		export QMAKEMODULES="${QT5_BUILD_DIR}/mkspecs/modules:${S}/mkspecs/modules:${QT5_ARCHDATADIR}/mkspecs/modules"
+	fi
+}
+
+# @FUNCTION: qt5_foreach_target_subdir
+# @INTERNAL
+# @DESCRIPTION:
+# Executes the command given as argument from inside each directory
+# listed in QT5_TARGET_SUBDIRS. Handles autotests subdirs automatically.
+qt5_foreach_target_subdir() {
+	[[ -z ${QT5_TARGET_SUBDIRS[@]} ]] && QT5_TARGET_SUBDIRS=("")
+
+	local subdir=
+	for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do
+		if [[ ${EBUILD_PHASE} == test ]]; then
+			subdir=tests/auto${subdir#src}
+			[[ -d ${S}/${subdir} ]] || continue
+		fi
+
+		local msg="Running $* ${subdir:+in ${subdir}}"
+		einfo "${msg}"
+
+		mkdir -p "${QT5_BUILD_DIR}/${subdir}" || die -n || return $?
+		pushd "${QT5_BUILD_DIR}/${subdir}" >/dev/null || die -n || return $?
+
+		"$@" || die -n "${msg} failed" || return $?
+
+		popd >/dev/null || die -n || return $?
+	done
+}
+
+# @FUNCTION: qt5_symlink_tools_to_build_dir
+# @INTERNAL
+# @DESCRIPTION:
+# Symlinks qmake and a few other tools to QT5_BUILD_DIR,
+# so that they can be used when building other modules.
+qt5_symlink_tools_to_build_dir() {
+	local tool= tools=()
+	if [[ ${PN} != qtcore ]]; then
+		tools+=(qmake moc rcc qlalr)
+		[[ ${PN} != qtdbus ]] && tools+=(qdbuscpp2xml qdbusxml2cpp)
+		[[ ${PN} != qtwidgets ]] && tools+=(uic)
+	fi
+
+	mkdir -p "${QT5_BUILD_DIR}"/bin || die
+	pushd "${QT5_BUILD_DIR}"/bin >/dev/null || die
+
+	for tool in "${tools[@]}"; do
+		[[ -e ${QT5_BINDIR}/${tool} ]] || continue
+		ln -s "${QT5_BINDIR}/${tool}" . || die "failed to symlink ${tool}"
+	done
+
+	popd >/dev/null || die
+}
+
+# @FUNCTION: qt5_base_configure
+# @INTERNAL
+# @DESCRIPTION:
+# Runs ./configure for modules belonging to qtbase.
+qt5_base_configure() {
+	# setup toolchain variables used by configure
+	tc-export AR CC CXX OBJDUMP RANLIB STRIP
+	export LD="$(tc-getCXX)"
+
+	# bug 633838
+	unset QMAKESPEC XQMAKESPEC QMAKEPATH QMAKEFEATURES
+
+	# configure arguments
+	local conf=(
+		# installation paths
+		-prefix "${QT5_PREFIX}"
+		-bindir "${QT5_BINDIR}"
+		-headerdir "${QT5_HEADERDIR}"
+		-libdir "${QT5_LIBDIR}"
+		-archdatadir "${QT5_ARCHDATADIR}"
+		-plugindir "${QT5_PLUGINDIR}"
+		-libexecdir "${QT5_LIBEXECDIR}"
+		-importdir "${QT5_IMPORTDIR}"
+		-qmldir "${QT5_QMLDIR}"
+		-datadir "${QT5_DATADIR}"
+		-docdir "${QT5_DOCDIR}"
+		-translationdir "${QT5_TRANSLATIONDIR}"
+		-sysconfdir "${QT5_SYSCONFDIR}"
+		-examplesdir "${QT5_EXAMPLESDIR}"
+		-testsdir "${QT5_TESTSDIR}"
+
+		# force appropriate compiler
+		$(if use kernel_linux; then
+			if tc-is-gcc; then
+				echo -platform linux-g++
+			elif tc-is-clang; then
+				echo -platform linux-clang
+			fi
+		fi)
+
+		# configure in release mode by default,
+		# override via the CONFIG qmake variable
+		-release
+		-no-separate-debug-info
+
+		# no need to forcefully build host tools in optimized mode,
+		# just follow the overall debug/release build type
+		-no-optimized-tools
+
+		# licensing stuff
+		-opensource -confirm-license
+
+		# autodetect the highest supported version of the C++ standard
+		#-c++std <c++11|c++14|c++1z>
+
+		# build shared libraries
+		-shared
+
+		# disabling accessibility is not recommended by upstream, as
+		# it will break QStyle and may break other internal parts of Qt
+		-accessibility
+
+		# disable all SQL drivers by default, override in qtsql
+		-no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc
+		-no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds
+
+		# MIPS DSP instruction set extensions
+		$(is-flagq -mno-dsp   && echo -no-mips_dsp)
+		$(is-flagq -mno-dspr2 && echo -no-mips_dspr2)
+
+		# bug #773199 and friends
+		$(tc-cpp-is-true "defined(__SSE2__)" ${CFLAGS} ${CXXFLAGS} || echo -no-feature-sse2)
+
+		# use pkg-config to detect include and library paths
+		-pkg-config
+
+		# prefer system libraries (only common hard deps here)
+		-system-zlib
+		-system-pcre
+		-system-doubleconversion
+
+		# disable everything to prevent automagic deps (part 1)
+		-no-mtdev
+		-no-journald -no-syslog
+		-no-libpng -no-libjpeg
+		-no-freetype -no-harfbuzz
+		-no-openssl -no-libproxy
+		-no-feature-gssapi
+		-no-xcb-xlib
+
+		# bug 672340
+		-no-xkbcommon
+		-no-bundled-xcb-xinput
+
+		# cannot use -no-gif because there is no way to override it later
+		#-no-gif
+
+		# always enable glib event loop support
+		-glib
+
+		# disable everything to prevent automagic deps (part 2)
+		-no-gtk
+
+		# exclude examples and tests from default build
+		-nomake examples
+		-nomake tests
+		-no-compile-examples
+
+		# disable rpath on non-prefix (bugs 380415 and 417169)
+		$(usex prefix '' -no-rpath)
+
+		# print verbose information about each configure test
+		-verbose
+
+		# disable everything to prevent automagic deps (part 3)
+		-no-cups -no-evdev -no-tslib -no-icu -no-fontconfig -no-dbus
+
+		# let portage handle stripping
+		-no-strip
+
+		# precompiled headers can cause problems on hardened, so turn them off
+		-no-pch
+
+		# link-time code generation is not something we want to enable by default
+		-no-ltcg
+
+		# Qt 5 doesn't support -mno-direct-extern-access, so uses
+		# -Bsymbolic, which causes issues for consumers if not linking
+		# corectly (bug #754021).
+		-no-reduce-relocations
+
+		# use the system linker (gold will be selected automagically otherwise)
+		$(tc-ld-is-gold && echo -use-gold-linker || echo -no-use-gold-linker)
+
+		# disable all platform plugins by default, override in qtgui
+		-no-xcb -no-eglfs -no-kms -no-gbm -no-directfb -no-linuxfb
+
+		# always enable session management support: it doesn't need extra deps
+		# at configure time and turning it off is dangerous, see bug 518262
+		-sm
+
+		# typedef qreal to double (warning: changing this flag breaks the ABI)
+		-qreal double
+
+		# disable OpenGL and EGL support by default, override in qtgui,
+		# qtopengl, qtprintsupport and qtwidgets
+		-no-opengl -no-egl
+
+		# disable libinput-based generic plugin by default, override in qtgui
+		-no-libinput
+
+		# respect system proxies by default: it's the most natural
+		# setting, and it'll become the new upstream default in 5.8
+		-system-proxies
+
+		# do not build with -Werror
+		-no-warnings-are-errors
+
+		# enable in respective modules to avoid poisoning QT.global_private.enabled_features
+		-no-gui -no-widgets
+
+		# QTBUG-76521, default will change to zstd in Qt6
+		-no-zstd
+
+		# module-specific options
+		"${myconf[@]}"
+	)
+
+	pushd "${QT5_BUILD_DIR}" >/dev/null || die
+
+	einfo "Configuring with: ${conf[@]}"
+	"${S}"/configure "${conf[@]}" || die "configure failed"
+
+	# a forwarding header is no longer created since 5.8, causing the system
+	# config to always be used. bug 599636
+	# ${S}/include does not exist in live sources or kde.org snapshots
+	local basedir="${S}/"
+	if [[ ${QT5_BUILD_TYPE} == live ]] || [[ -n ${KDE_ORG_COMMIT} ]]; then
+		basedir=""
+	fi
+	cp src/corelib/global/qconfig.h "${basedir}"include/QtCore/ || die
+
+	popd >/dev/null || die
+
+}
+
+# @FUNCTION: qt5_tools_configure
+# @INTERNAL
+# @DESCRIPTION:
+# Most of qttools require files that are only generated when qmake is
+# run in the root directory. Related bugs: 676948, 716514.
+# Runs qt5_qmake in root directory to create qttools-config.pri and copy to
+# ${QT5_BUILD_DIR}, disabling modules other than ${PN} belonging to qttools.
+qt5_tools_configure() {
+	# configure arguments
+	local qmakeargs=(
+		--
+		# not packaged in Gentoo
+		-no-feature-distancefieldgenerator
+		-no-feature-kmap2qmap
+		-no-feature-macdeployqt
+		-no-feature-makeqpf
+		-no-feature-qev
+		-no-feature-qtattributionsscanner
+		-no-feature-windeployqt
+		-no-feature-winrtrunner
+	)
+
+	local i module=${PN}
+	case ${PN} in
+		linguist-tools) module=linguist ;;
+		*) ;;
+	esac
+	for i in assistant designer linguist pixeltool qdbus qdoc qtdiag qtpaths qtplugininfo; do
+		[[ ${module} != ${i} ]] && qmakeargs+=( -no-feature-${i} )
+	done
+
+	# allow the ebuild to override what we set here
+	myqmakeargs=( "${qmakeargs[@]}" "${myqmakeargs[@]}" )
+
+	qt5_configure_oos_quirk qttools-config.pri
+}
+
+# @FUNCTION: qt5_qmake_args
+# @INTERNAL
+# @DESCRIPTION:
+# Helper function to get the various toolchain-related variables.
+qt5_qmake_args() {
+	echo \
+		QMAKE_AR=\"$(tc-getAR)\" \
+		QMAKE_CC=\"$(tc-getCC)\" \
+		QMAKE_LINK_C=\"$(tc-getCC)\" \
+		QMAKE_LINK_C_SHLIB=\"$(tc-getCC)\" \
+		QMAKE_CXX=\"$(tc-getCXX)\" \
+		QMAKE_LINK=\"$(tc-getCXX)\" \
+		QMAKE_LINK_SHLIB=\"$(tc-getCXX)\" \
+		QMAKE_OBJCOPY=\"$(tc-getOBJCOPY)\" \
+		QMAKE_RANLIB= \
+		QMAKE_STRIP=\"$(tc-getSTRIP)\" \
+		QMAKE_CFLAGS=\"${CFLAGS}\" \
+		QMAKE_CFLAGS_RELEASE= \
+		QMAKE_CFLAGS_DEBUG= \
+		QMAKE_CXXFLAGS=\"${CXXFLAGS}\" \
+		QMAKE_CXXFLAGS_RELEASE= \
+		QMAKE_CXXFLAGS_DEBUG= \
+		QMAKE_LFLAGS=\"${LDFLAGS}\" \
+		QMAKE_LFLAGS_RELEASE= \
+		QMAKE_LFLAGS_DEBUG=
+}
+
+# @FUNCTION: qt5_qmake
+# @INTERNAL
+# @DESCRIPTION:
+# Helper function that runs qmake in the current target subdir.
+# Intended to be called by qt5_foreach_target_subdir().
+qt5_qmake() {
+	local projectdir=${PWD/#${QT5_BUILD_DIR}/${S}}
+	local qmakepath=
+	if [[ ${QT5_MODULE} == qtbase ]]; then
+		qmakepath=${QT5_BUILD_DIR}/bin
+	else
+		qmakepath=${QT5_BINDIR}
+	fi
+
+	"${qmakepath}"/qmake \
+		"${projectdir}" \
+		CONFIG+=$(usex debug debug release) \
+		CONFIG-=$(usex debug release debug) \
+		QMAKE_AR="$(tc-getAR) cqs" \
+		QMAKE_CC="$(tc-getCC)" \
+		QMAKE_LINK_C="$(tc-getCC)" \
+		QMAKE_LINK_C_SHLIB="$(tc-getCC)" \
+		QMAKE_CXX="$(tc-getCXX)" \
+		QMAKE_LINK="$(tc-getCXX)" \
+		QMAKE_LINK_SHLIB="$(tc-getCXX)" \
+		QMAKE_OBJCOPY="$(tc-getOBJCOPY)" \
+		QMAKE_RANLIB= \
+		QMAKE_STRIP="$(tc-getSTRIP)" \
+		QMAKE_CFLAGS="${CFLAGS}" \
+		QMAKE_CFLAGS_RELEASE= \
+		QMAKE_CFLAGS_DEBUG= \
+		QMAKE_CXXFLAGS="${CXXFLAGS}" \
+		QMAKE_CXXFLAGS_RELEASE= \
+		QMAKE_CXXFLAGS_DEBUG= \
+		QMAKE_LFLAGS="${LDFLAGS}" \
+		QMAKE_LFLAGS_RELEASE= \
+		QMAKE_LFLAGS_DEBUG= \
+		"${myqmakeargs[@]}" \
+		|| die "qmake failed (${projectdir#${S}/})"
+}
+
+# @FUNCTION: qt5_install_module_config
+# @INTERNAL
+# @DESCRIPTION:
+# Creates and installs gentoo-specific ${PN}-qconfig.{h,pri} and
+# ${PN}-qmodule.pri files.
+qt5_install_module_config() {
+	local x qconfig_add= qconfig_remove= qprivateconfig_add= qprivateconfig_remove=
+
+	> "${T}"/${PN}-qconfig.h
+	> "${T}"/${PN}-qconfig.pri
+	> "${T}"/${PN}-qmodule.pri
+
+	# generate qconfig_{add,remove} and ${PN}-qconfig.h
+	for x in "${QT5_GENTOO_CONFIG[@]}"; do
+		local flag=${x%%:*}
+		x=${x#${flag}:}
+		local feature=${x%%:*}
+		x=${x#${feature}:}
+		local macro=${x}
+		macro=$(tr 'a-z-' 'A-Z_' <<< "${macro}")
+
+		if [[ -z ${flag} ]] || { [[ ${flag} != '!' ]] && use ${flag}; }; then
+			[[ -n ${feature} ]] && qconfig_add+=" ${feature}"
+			[[ -n ${macro} ]] && echo "#define QT_${macro}" >> "${T}"/${PN}-qconfig.h
+		else
+			[[ -n ${feature} ]] && qconfig_remove+=" ${feature}"
+			[[ -n ${macro} ]] && echo "#define QT_NO_${macro}" >> "${T}"/${PN}-qconfig.h
+		fi
+	done
+
+	# install ${PN}-qconfig.h
+	[[ -s ${T}/${PN}-qconfig.h ]] && (
+		insinto "${QT5_HEADERDIR#"${EPREFIX}"}"/Gentoo
+		doins "${T}"/${PN}-qconfig.h
+	)
+
+	# generate and install ${PN}-qconfig.pri
+	[[ -n ${qconfig_add} ]] && echo "QCONFIG_ADD=${qconfig_add}" >> "${T}"/${PN}-qconfig.pri
+	[[ -n ${qconfig_remove} ]] && echo "QCONFIG_REMOVE=${qconfig_remove}" >> "${T}"/${PN}-qconfig.pri
+	[[ -s ${T}/${PN}-qconfig.pri ]] && (
+		insinto "${QT5_ARCHDATADIR#"${EPREFIX}"}"/mkspecs/gentoo
+		doins "${T}"/${PN}-qconfig.pri
+	)
+
+	# generate qprivateconfig
+	for x in "${QT5_GENTOO_PRIVATE_CONFIG[@]}"; do
+		local flag=${x%%:*}
+		x=${x#${flag}:}
+		local feature=${x%%:*}
+		x=${x#${feature}:}
+
+		if [[ -z ${flag} ]] || { [[ ${flag} != '!' ]] && use ${flag}; }; then
+			[[ -n ${feature} ]] && qprivateconfig_add+=" ${feature}"
+		else
+			[[ -n ${feature} ]] && qprivateconfig_remove+=" ${feature}"
+		fi
+	done
+
+	# generate and install ${PN}-qmodule.pri
+	[[ -n ${qprivateconfig_add} ]] && echo "QT.global_private.enabled_features = ${qprivateconfig_add}" >> "${T}"/${PN}-qmodule.pri
+	[[ -n ${qprivateconfig_remove} ]] && echo "QT.global_private.disabled_features = ${qprivateconfig_remove}" >> "${T}"/${PN}-qmodule.pri
+	[[ -s ${T}/${PN}-qmodule.pri ]] && (
+		insinto "${QT5_ARCHDATADIR#"${EPREFIX}"}"/mkspecs/gentoo
+		doins "${T}"/${PN}-qmodule.pri
+	)
+
+	# install the original {qconfig,qmodule}.pri from qtcore
+	[[ ${PN} == qtcore ]] && (
+		insinto "${QT5_ARCHDATADIR#"${EPREFIX}"}"/mkspecs/gentoo
+		newins "${D}${QT5_ARCHDATADIR}"/mkspecs/qconfig.pri qconfig-qtcore.pri
+		newins "${D}${QT5_ARCHDATADIR}"/mkspecs/qmodule.pri qmodule-qtcore.pri
+	)
+}
+
+# @FUNCTION: qt5_regenerate_global_configs
+# @INTERNAL
+# @DESCRIPTION:
+# Generates Gentoo-specific qconfig.{h,pri} and qmodule.pri according to the
+# build configuration.
+# Don't call die here because dying in pkg_post{inst,rm} only makes things worse.
+qt5_regenerate_global_configs() {
+	einfo "Regenerating gentoo-qconfig.h"
+
+	find "${ROOT}${QT5_HEADERDIR}"/Gentoo \
+		-name '*-qconfig.h' -a \! -name 'gentoo-qconfig.h' -type f \
+		-execdir cat '{}' + | sort -u > "${T}"/gentoo-qconfig.h
+
+	[[ -s ${T}/gentoo-qconfig.h ]] || ewarn "Generated gentoo-qconfig.h is empty"
+	cp "${T}"/gentoo-qconfig.h "${ROOT}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h \
+		|| eerror "Failed to install new gentoo-qconfig.h"
+
+	einfo "Updating QT_CONFIG in qconfig.pri"
+
+	local qconfig_pri=${ROOT}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri
+	local qconfig_pri_orig=${ROOT}${QT5_ARCHDATADIR}/mkspecs/gentoo/qconfig-qtcore.pri
+	if [[ -f ${qconfig_pri} ]]; then
+		local x qconfig_add= qconfig_remove=
+		local qt_config new_qt_config=
+		if [[ -f ${qconfig_pri_orig} ]]; then
+			qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri_orig}")
+		else
+			qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri}")
+		fi
+
+		# generate list of QT_CONFIG entries from the existing list,
+		# appending QCONFIG_ADD and excluding QCONFIG_REMOVE
+		eshopts_push -s nullglob
+		for x in "${ROOT}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
+			qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=\s*//p' "${x}")"
+			qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=\s*//p' "${x}")"
+		done
+		eshopts_pop
+		for x in ${qt_config} ${qconfig_add}; do
+			if ! has "${x}" ${new_qt_config} ${qconfig_remove}; then
+				new_qt_config+=" ${x}"
+			fi
+		done
+
+		# now replace the existing QT_CONFIG with the generated list
+		sed -i -e "s/^QT_CONFIG\s*+=.*/QT_CONFIG +=${new_qt_config}/" \
+			"${qconfig_pri}" || eerror "Failed to sed QT_CONFIG in ${qconfig_pri}"
+	else
+		ewarn "${qconfig_pri} does not exist or is not a regular file"
+	fi
+
+	einfo "Updating QT.global_private in qmodule.pri"
+
+	local qmodule_pri=${ROOT}${QT5_ARCHDATADIR}/mkspecs/qmodule.pri
+	local qmodule_pri_orig=${ROOT}${QT5_ARCHDATADIR}/mkspecs/gentoo/qmodule-qtcore.pri
+	if [[ -f ${qmodule_pri} && -f ${qmodule_pri_orig} ]]; then
+		local x
+		local qprivateconfig_enabled= qprivateconfig_disabled=
+		local qprivateconfig_orig_enabled= qprivateconfig_orig_disabled=
+		local new_qprivateconfig_enabled= new_qprivateconfig_disabled=
+
+		# generate lists of QT.global_private.{dis,en}abled_features
+		qprivateconfig_orig_enabled="$(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${qmodule_pri_orig}")"
+		qprivateconfig_orig_disabled="$(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${qmodule_pri_orig}")"
+		eshopts_push -s nullglob
+		for x in "${ROOT}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qmodule.pri; do
+			qprivateconfig_enabled+=" $(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${x}")"
+			qprivateconfig_disabled+=" $(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${x}")"
+		done
+		eshopts_pop
+
+		# anything enabled is enabled, but anything disabled is
+		# only disabled if it isn't enabled somewhere else.
+		# this is because we need to forcibly disable some stuff
+		# in qtcore to support split qtbase.
+		new_qprivateconfig_enabled=${qprivateconfig_enabled}
+		for x in ${qprivateconfig_disabled}; do
+			if ! has "${x}" ${qprivateconfig_enabled}; then
+				new_qprivateconfig_disabled+=" ${x}"
+			fi
+		done
+
+		# check all items from the original qtcore qmodule.pri,
+		# and add them to the appropriate list if not overridden
+		# elsewhere
+		for x in ${qprivateconfig_orig_enabled}; do
+			if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then
+				new_qprivateconfig_enabled+=" ${x}"
+			fi
+		done
+		for x in ${qprivateconfig_orig_disabled}; do
+			if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then
+				new_qprivateconfig_disabled+=" ${x}"
+			fi
+		done
+
+		# now replace the existing QT.global_private.{dis,en}abled_features
+		# with the generated list
+		sed \
+			-e "s/^QT.global_private.enabled_features\s*=.*/QT.global_private.enabled_features =${new_qprivateconfig_enabled}/" \
+			-e "s/^QT.global_private.disabled_features\s*=.*/QT.global_private.disabled_features =${new_qprivateconfig_disabled}/" \
+			-i "${qmodule_pri}" || eerror "Failed to sed QT.global_private.enabled_features in ${qmodule_pri}"
+	else
+		ewarn "${qmodule_pri} or ${qmodule_pri_orig} does not exist or is not a regular file"
+	fi
+}
+
+fi
+
+EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm