diff options
author | Andre Klitzing | 2024-03-12 10:43:56 +0100 |
---|---|---|
committer | Andre Klitzing | 2024-03-12 10:43:56 +0100 |
commit | 569a8c7e90a0b59036f257209b9c72a945ee880a (patch) | |
tree | af366fe967bd9d01e1bc854486fc7e7b0756a2db | |
parent | 2f61db6b02c397d584e2e42fc8a6c061f24c7199 (diff) | |
download | aur-569a8c7e90a0b59036f257209b9c72a945ee880a.tar.gz |
Fix Qt6 issues
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | qt6.patch | 24 |
3 files changed, 38 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = tortoisehg pkgdesc = Graphical tools for Mercurial pkgver = 6.6.3 - pkgrel = 2 + pkgrel = 3 url = https://foss.heptapod.net/mercurial/tortoisehg/thg arch = any license = GPL @@ -18,6 +18,8 @@ pkgbase = tortoisehg optdepends = python-pygments: syntax highlighting optdepends = python-nautilus: Python binding for Nautilus components source = https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-6.6.3.tar.gz + source = qt6.patch sha256sums = f69835379ba3d596990809b837cb684707d51e67bb9c0b0d319917491805bdeb + sha256sums = e557a4e0495c793581cef41d28670e574584ee5a45507917c404e66ded255331 pkgname = tortoisehg @@ -5,7 +5,7 @@ # AUR Category: devel pkgname=tortoisehg pkgver=6.6.3 -pkgrel=2 +pkgrel=3 pkgdesc="Graphical tools for Mercurial" arch=('any') url="https://foss.heptapod.net/mercurial/tortoisehg/thg" @@ -14,7 +14,14 @@ makedepends=(python-build python-installer python-wheel python-setuptools) depends=('python' 'mercurial>=6.0' 'python-qscintilla-qt6' 'python-iniparse' 'qt6-svg' 'python-pyqt6') optdepends=('python-pygments: syntax highlighting' 'python-nautilus: Python binding for Nautilus components') -source=("https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-$pkgver.tar.gz") +source=("https://www.mercurial-scm.org/release/tortoisehg/targz/tortoisehg-$pkgver.tar.gz" + "qt6.patch" + ) + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 -i ${srcdir}/qt6.patch +} build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -35,4 +42,5 @@ package() { rm -rf python*/site-packages/hgext3rd/__pycache__/ } -sha256sums=('f69835379ba3d596990809b837cb684707d51e67bb9c0b0d319917491805bdeb') +sha256sums=('f69835379ba3d596990809b837cb684707d51e67bb9c0b0d319917491805bdeb' + 'e557a4e0495c793581cef41d28670e574584ee5a45507917c404e66ded255331') diff --git a/qt6.patch b/qt6.patch new file mode 100644 index 000000000000..ce12ff888f3a --- /dev/null +++ b/qt6.patch @@ -0,0 +1,24 @@ +diff --git a/tortoisehg/hgqt/commit.py b/tortoisehg/hgqt/commit.py +--- a/tortoisehg/hgqt/commit.py ++++ b/tortoisehg/hgqt/commit.py +@@ -504,7 +504,7 @@ class CommitWidget(QWidget, qtlib.TaskWi + committb.setPopupMode(QToolButton.ToolButtonPopupMode.MenuButtonPopup) + fmk = lambda s: committb.fontMetrics().horizontalAdvance(hglib.tounicode(s[2])) + committb._width = (max(pycompat.maplist(fmk, acts)) +- + 4*committb.menuButtonWidth()) ++ + committb.width()) + + class CommitButtonMenu(QMenu): + def __init__(self, parent, repo): +diff --git a/tortoisehg/hgqt/qtlib.py b/tortoisehg/hgqt/qtlib.py +--- a/tortoisehg/hgqt/qtlib.py ++++ b/tortoisehg/hgqt/qtlib.py +@@ -939,6 +939,8 @@ class CustomPrompt(QMessageBox): + self.setEscapeButton(btn) + + def run(self) -> int: ++ if QT_API == "PyQt6": ++ return self.exec() - 1 + return self.exec() + + def keyPressEvent(self, event: QKeyEvent) -> None: |