Inroduce --kde option for src subcommand

It apply KDE patch collection to Qt 5.15.2 source
`aqt src 5.15.2 linux desktop --kde`

Patch collection is based on Qt 5.15.2, so only the version can be patched.

Ref #231

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura
2021-06-19 14:53:04 +09:00
parent fac014216f
commit 99b9c216a5
6 changed files with 246 additions and 7 deletions

2
.gitignore vendored
View File

@@ -12,4 +12,4 @@ _build
ci/*.matrix.gen.yml
docs/_build
aqtinstall.log
Qt/

View File

@@ -288,5 +288,9 @@ class Settings:
def zipcmd(self):
return self.config.get("aqt", "7zcmd", fallback="7z")
@property
def kde_patches(self):
return self.config.getlist("kde_patches", "patches", fallback=[])
Settings = Settings()

View File

@@ -297,7 +297,6 @@ class Cli:
)
def _run_src_doc_examples(self, flavor, args):
start_time = time.perf_counter()
self.show_aqt_version()
target = args.target
os_name = args.host
@@ -364,23 +363,46 @@ class Cli:
exit(1)
self.call_installer(srcdocexamples_archives, base_dir, sevenzip, keep)
self.logger.info("Finished installation")
def run_src(self, args):
"""Run src subcommand"""
if args.kde:
if args.qt_version != "5.15.2":
print("KDE patch: unsupported version!!")
exit(1)
start_time = time.perf_counter()
self._run_src_doc_examples("src", args)
if args.kde:
if args.outputdir is None:
target_dir = os.path.join(os.getcwd(), args.qt_version, "Src")
else:
target_dir = os.path.join(args.outputdir, args.qt_version, "Src")
Updater.patch_kde(target_dir)
self.logger.info(
"Time elapsed: {time:.8f} second".format(
time=time.perf_counter() - start_time
)
)
def run_src(self, args):
"""Run src subcommand"""
self._run_src_doc_examples("src", args)
def run_examples(self, args):
"""Run example subcommand"""
start_time = time.perf_counter()
self._run_src_doc_examples("examples", args)
self.logger.info(
"Time elapsed: {time:.8f} second".format(
time=time.perf_counter() - start_time
)
)
def run_doc(self, args):
"""Run doc subcommand"""
start_time = time.perf_counter()
self._run_src_doc_examples("doc", args)
self.logger.info(
"Time elapsed: {time:.8f} second".format(
time=time.perf_counter() - start_time
)
)
def run_tool(self, args):
"""Run tool subcommand"""
@@ -616,6 +638,7 @@ class Cli:
self._set_common_argument(src_parser)
self._set_common_options(src_parser)
self._set_module_options(src_parser)
src_parser.add_argument("--kde", action="store_true", help="patching with KDE patch kit.")
#
tools_parser = subparsers.add_parser("tool")
tools_parser.set_defaults(func=self.run_tool)

View File

@@ -17,3 +17,202 @@ fallbacks:
https://ftp.jaist.ac.jp/pub/qtproject
http://ftp1.nluug.nl/languages/qt
https://mirrors.dotsrc.org/qtproject
[kde_patches]
patches:
0001-toolchain.prf-Use-vswhere-to-obtain-VS-installation-.patch
0002-Fix-allocated-memory-of-QByteArray-returned-by-QIODe.patch
0003-Update-CLDR-to-v37-adding-Nigerian-Pidgin-as-a-new-l.patch
0004-QLayout-docs-explain-better-what-the-QWidget-ctor-ar.patch
0005-QMacStyle-fix-tab-rendering.patch
0006-QMacStyle-more-pixel-refinements.patch
0007-Deprecate-ordering-on-QItemSelectionRange.patch
0008-Deprecate-QLocale-Language-entries-that-no-locale-da.patch
0009-Deprecate-old-aliases-for-two-countries-and-several-.patch
0010-QAbstractItemModelTester-don-t-rely-on-hasChildren.patch
0011-Doc-Remove-mentioning-of-old-macos-versions-from-QSe.patch
0012-Pass-SameSite-through-QNetworkCookie.patch
0013-doc-fix-typo-consise-concise.patch
0014-Selftest-copy-XAUTHORITY-environment-variable.patch
0015-Fix-delay-first-time-a-font-is-used.patch
0016-Fix-QScreen-orientation-not-being-updated-when-setti.patch
0017-Android-Request-cursor-to-be-in-proper-position.patch
0018-testlib-Let-logger-report-whether-it-is-logging-to-s.patch
0019-Android-disable-Gradle-caching-by-default.patch
0020-Android-replace-stacktrace-with-debug-message-in-sea.patch
0021-Use-void-instead-of-Q_UNUSED.patch
0022-Don-t-show-QPushButton-as-hovered-unless-the-mouse-i.patch
0023-MinGW-Fix-assert-in-QCoreApplication-arguments-when-.patch
0024-QCombobox-propagate-the-palette-to-the-embedded-line.patch
0025-QMarginsF-document-that-isNull-operator-operator-are.patch
0026-qmake-vcxproj-Fix-handling-of-extra-compiler-outputs.patch
0027-Android-fix-documentation-about-ANDROID_EXTRA_LIBS.patch
0028-Offscreen-QPA-implement-a-native-interface.patch
0029-DropSite-example-support-markdown.patch
0030-Do-not-define-dynamic_cast.patch
0031-Android-fix-crash-by-passing-the-right-Handle-to-dls.patch
0032-testlib-Add-private-API-to-add-test-logger.patch
0033-Update-third-party-md4c-to-version-0.4.6.patch
0034-moc-Handle-include-in-enum-take-2.patch
0035-InputMethod-should-call-reset-function-when-proxywid.patch
0036-Add-possibility-to-set-QNX-Screen-pipeline-value.patch
0037-qglobal-Only-define-QT_ENSURE_STACK_ALIGNED_FOR_SSE-.patch
0038-macOS-FreeType-fix-crash-with-non-printable-unicode.patch
0039-Linux-fix-crash-in-AtSpi-adaptor-when-handling-windo.patch
0040-Add-_MSC_VER-check-to-MSVC-ARM-compiler-workaround.patch
0041-QMap-suppress-warning-about-strict-aliasing-violatio.patch
0042-Add-changes-file-for-Qt-5.15.2.patch
0043-Set-the-url-to-have-the-AtNx-filename-if-one-is-foun.patch
0044-QMap-don-t-tell-everyone-QMapNode-has-no-friends.patch
0045-QNAM-Work-around-QObject-finicky-orphan-cleanup-deta.patch
0046-xcb-ensure-that-available-glx-version-is-greater-tha.patch
0047-Protect-QImage-colorspace-transform-on-shutdown.patch
0048-Fix-qstylesheetstyle-clip-border-error.patch
0049-Correct-processEvents-documentation.patch
0050-Update-CLDR-to-v38.patch
0051-Fix-compilation-when-using-no-mimetype-database.patch
0052-Reduce-memory-reallocations-in-QTextTablePrivate-upd.patch
0053-Fix-regular-expression-initialize-with-incorrect-fil.patch
0054-Cocoa-Allow-CMD-H-to-hide-the-application-when-a-too.patch
0055-Fix-pcre2-feature-conditions.patch
0056-Q_PRIMITIVE_TYPE-improve-the-documentation.patch
0057-QAsn1Element-Read-value-in-blocks-to-avoid-oom-at-wr.patch
0058-Android-Don-t-use-putIfAbsent-as-that-is-not-availab.patch
0059-QMutex-order-reads-from-QMutexPrivate-waiters-and-QB.patch
0060-Android-Add-the-QtAndroidBearer.jar-to-the-jar-depen.patch
0061-Android-Add-the-required-linker-flags-for-unwinding-.patch
0062-Android-recommend-against-using-ANDROID_ABIS-inside-.patch
0063-Android-fix-android-java-and-templates-targets-with-.patch
0064-QCharRef-properly-disable-assignment-from-char.patch
0065-Android-Treat-ACTION_CANCEL-as-TouchPointReleased.patch
0066-Fix-misidentification-of-some-shearing-QTransforms-a.patch
0067-Fix-QGraphicsItem-crash-if-click-right-button-of-mou.patch
0068-Bump-version.patch
0069-Android-Ensure-windows-always-have-a-geometry-on-cre.patch
0070-macOS-Account-for-Big-Sur-always-enabling-layer-back.patch
0071-Fix-shaping-problems-on-iOS-14-macOS-11.patch
0072-Link-to-qAlpha-in-qRgb-and-qRgba-docs.patch
0073-HTTP2-fix-crash-from-assertion.patch
0074-Fuzzing-Add-a-test-for-QDateTime-fromString.patch
0075-QSocks5SocketEngine-Fix-out-of-bounds-access-of-QBA.patch
0076-Use-QTRY_COMPARE-in-an-attempt-to-make-the-test-less.patch
0077-Doc-Document-QGradient-Preset-enum-values.patch
0078-Doc-Fix-documentation-warnings-for-Qt-XML.patch
0079-Doc-Fix-documentation-warnings-in-Qt-Network.patch
0080-Ensure-that-QMenu-is-polished-before-setting-the-scr.patch
0081-widgets-Don-t-report-new-focus-object-during-clearFo.patch
0082-QDtls-remove-redundant-RAII-struct.patch
0083-macOS-Propagate-device-pixel-ratio-of-system-tray-ic.patch
0084-tst_qocsp-improve-code-coverage.patch
0085-Doc-explain-how-to-create-a-test-touch-device-for-us.patch
0086-macOS-Upgrade-supported-SDK-to-11.0.patch
0087-Fix-logic-error-in-QString-replace-ch-after-cs.patch
0088-Be-more-consistent-when-converting-JSON-values-from-.patch
0089-QCoreApplication-add-more-information-to-processEven.patch
0090-Fix-QSFPM-not-emitting-dataChanged-when-source-model.patch
0091-Android-Fix-android-accessibility-not-being-set-acti.patch
0092-Fix-x-height-name-in-stylesheet-docs.patch
0093-QMutex-Work-around-ICC-bug-in-dealing-with-constexpr.patch
0094-wasm-fix-resizing-of-qwidget-windows.patch
0095-Avoid-integer-overflow-and-division-by-zero.patch
0096-QPasswordDigestor-improve-code-coverage.patch
0097-QStackedLayout-fix-a-memory-leak.patch
0098-Limit-value-in-setFontWeightFromValue.patch
0099-Doc-Fix-documentation-of-qmake-s-exists-function.patch
0100-QVLA-do-not-include-QtTest.patch
0101-Clean-up-docs-of-QCalendar-related-QLocale-toString-.patch
0102-Change-android-target-SDK-version-to-29.patch
0103-QVLA-always-use-new-to-create-new-objects.patch
0104-QPushButton-fix-support-of-style-sheet-rule-for-text.patch
0105-Limit-pen-width-to-maximal-32767.patch
0106-Doc-Consistently-use-book-style-capitalization-for-Q.patch
0107-qstring.h-fix-warnings-about-shortening-qsizetype-to.patch
0108-Fix-invalid-QSortFilterProxyModel-dataChanged-parame.patch
0109-Minor-refactor-of-installMetaFile.patch
0110-Return-a-more-useful-date-time-on-parser-failure-in-.patch
0111-QCalendar-increase-coverage-by-tests.patch
0112-Bounds-check-time-zone-offsets-when-parsing.patch
0113-Network-self-test-make-it-work-with-docker-container.patch
0114-QSslConfiguration-improve-code-coverage.patch
0115-Add-new-way-to-mess-up-projects-with-QMAKE_INSTALL_R.patch
0116-Install-3rd-party-headers-and-meta-for-static-builds.patch
0117-Create-qtlibjpeg-for-jpeg-image-plugin.patch
0118-QStandardPaths-Don-t-change-permissions-of-XDG_RUNTI.patch
0119-tst_QSslCertificate-improve-code-coverage.patch
0120-Let-QXcbConnection-getTimestamp-properly-exit-when-X.patch
0121-QDtls-cookie-verifier-make-sure-a-server-can-re-use-.patch
0122-QMacStyle-remove-vertical-adjustment-for-inactive-ta.patch
0123-Revert-xcb-add-xcb-util-dependency-for-xcb-image.patch
0124-Containers-call-constructors-even-for-primitive-type.patch
0125-Android-print-tailored-warning-if-qml-dependency-pat.patch
0126-Cosmetic-stroker-avoid-overflows-for-non-finite-coor.patch
0127-QSslCipher-improve-its-code-coverage-and-auto-tests.patch
0128-tst_qsslkey-handle-QT_NO_SSL-properly.patch
0129-Add-the-Qt-6.0-deprecation-macros.patch
0130-wasm-fix-mouse-double-click.patch
0131-Android-avoid-reflection-with-ClipData-addItem.patch
0132-QHeaderView-fix-spurious-sorting.patch
0133-Fix-exception-with-Android-5.x.patch
0134-Http2-Remove-errored-out-requests-from-queue.patch
0135-Http2-don-t-call-ensureConnection-when-there-s-no-re.patch
0136-Fix-QTranslator-load-search-order-not-following-uiLa.patch
0137-Avoid-signed-overflow-in-moc.patch
0138-Android-Kill-calls-to-deprecated-func-in-API-29.patch
0139-Doc-Improve-_CAST_FROM_ASCII-documentation.patch
0140-Improve-documented-function-argument-names.patch
0141-Fix-QImage-setPixelColor-on-RGBA64_Premultiplied.patch
0142-macOS-Make-sure-that-the-reserved-characters-are-not.patch
0143-Enable-testing-for-whether-a-calendar-registered-its.patch
0144-tests-add-a-shortcut-to-quit-app-in-allcursors.patch
0145-QSslSocket-Don-t-call-transmit-in-unencrypted-mode.patch
0146-QStringView-operator-operator-operator-currently-Qt6.patch
0147-QCborStreamReader-move-the-readStringChunk-code-to-t.patch
0148-Improve-the-documentation-for-QElapsedTimer-restart-.patch
0149-QSslSocket-verify-do-not-alter-the-default-configura.patch
0150-Fix-tst_QFontDatabase-aliases-failure-with-ambiguous.patch
0151-QStyleAnimation-make-sure-the-last-frame-of-animatio.patch
0152-PCRE-update-to-10.36.patch
0153-tst_QCborValue-adjust-the-size-of-the-minimum-string.patch
0154-macOS-Always-allow-interacting-with-popup-windows-du.patch
0155-macOS-Add-missing-QT_MANGLE_NAMESPACE.patch
0156-QSplashScreen-draw-pixmap-with-SmoothTransfrom.patch
0157-Android-Qml-accessibility-fixes.patch
0158-Http2-set-the-reply-s-error-code-and-string-on-error.patch
0159-Try-again-to-fix-Clang-s-Wconstant-logical-operand-w.patch
0160-Revert-Android-print-tailored-warning-if-qml-depende.patch
0161-QUrl-fix-parsing-of-empty-IPv6-addresses.patch
0162-tst_QSslError-improve-the-code-coverage-as-pointed-a.patch
0163-macOS-Disable-WA_QuitOnClose-on-menu-item-widget-con.patch
0164-QString-fix-count-QRegularExpression.patch
0165-QString-lastIndexOf-fix-off-by-one-for-zero-length-m.patch
0166-secureudpclient-a-speculative-fix-for-non-reproducib.patch
0167-Android-don-t-use-avx-and-avx2-when-building-for-And.patch
0168-Fuzzing-Provide-link-to-oss-fuzz.patch
0169-Blacklist-tst_QMdiArea-updateScrollBars-on-macos.patch
0170-Fix-build-with-GCC-11-include-limits.patch
0171-Build-fixes-for-GCC-11.patch
0172-Partially-revert-813a928c7c3cf98670b6043149880ed5c95.patch
0173-Fix-removing-columns-when-QSortFilterProxyModel-has-.patch
0174-Fix-get-out-of-bounds-index-in-QSortFilterProxyModel.patch
0175-Fix-handling-of-surrogates-in-QBidiAlgorithm.patch
0176-Avoid-undefined-color-values-in-corrupt-xpm-image.patch
0177-Gracefully-reject-requests-for-absurd-font-sizes.patch
0178-Don-t-own-unique-name-for-QDBusTrayIcon.patch
0179-QAbstractItemModelTester-fix-false-positive-when-mod.patch
0180-Fix-QAbstractItemModelTester-false-positive.patch
0181-Deprecate-QMutex-in-recursive-mode.patch
0182-Fix-QAbstractItemModelTester-false-positive.patch
0183-Fix-crash-on-serializing-default-constructed-QTimeZo.patch
0184-Fix-QTreeModel-calling-beginRemoveRows-twice.patch
0185-QConcatenateTablesProxyModel-skip-dataChanged-in-hid.patch
0186-QComboBox-fix-select-all-columns-in-the-view.patch
0187-QTableView-honor-spans-when-calculating-height-width.patch
0188-TableView-Trigger-the-resizing-of-editors-resizing-a.patch
0189-Fix-no-mapping-for-SysReq-key.patch
0190-qdbus-add-support-for-aay-QByteArrayList.patch
0191-QRandom-drop-a-usage-of-std-is_literal_type.patch
0192-fix-Optimize-the-performance-of-the-inotify-file-sys.patch
0193-Remove-the-unnecessary-template-parameter-from-the-c.patch
0194-Fix-memory-leak-when-using-small-caps-font.patch
0195-Make-sure-_q_printerChanged-is-called-even-if-only-p.patch
0196-fix-Alt-shortcut-on-non-US-layouts.patch

View File

@@ -18,13 +18,16 @@
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import logging
import os
import pathlib
import subprocess
import patch
from semantic_version import SimpleSpec, Version
from aqt.helper import Settings
class Updater:
def __init__(self, prefix: pathlib.Path, logger):
@@ -291,3 +294,12 @@ class Updater:
)
except IOError as e:
raise e
@classmethod
def patch_kde(cls, src_dir):
logger = logging.getLogger("aqt")
PATCH_URL_BASE = "https://raw.githubusercontent.com/miurahr/kde-qt-patch/main/patches/"
for p in Settings.kde_patches:
logger.info("Apply patch: " + p)
patchfile = patch.fromurl(PATCH_URL_BASE + p)
patchfile.apply(strip=True, root=os.path.join(src_dir, "qtbase"))

View File

@@ -34,6 +34,7 @@ python_requires = >= 3.6
install_requires =
requests
semantic_version
patch>=1.16
py7zr>=0.15.1
texttable
setup_requires =