From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B25D61382C5 for ; Tue, 17 Apr 2018 12:10:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6D46E0984; Tue, 17 Apr 2018 12:10:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B6B0EE0984 for ; Tue, 17 Apr 2018 12:10:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 846F9335C7D for ; Tue, 17 Apr 2018 12:10:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 54235294 for ; Tue, 17 Apr 2018 12:10:28 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1523966543.17c9422f299fc3fb4d56715a9ff1a0d5a53174b6.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/qgit/, dev-vcs/qgit/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch dev-vcs/qgit/qgit-2.7-r1.ebuild X-VCS-Directories: dev-vcs/qgit/files/ dev-vcs/qgit/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 17c9422f299fc3fb4d56715a9ff1a0d5a53174b6 X-VCS-Branch: master Date: Tue, 17 Apr 2018 12:10:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f1efd9f5-89e8-4aa5-ae9c-1af560bed1bf X-Archives-Hash: 5196f7aa10939a0ce90167404b88c1ee commit: 17c9422f299fc3fb4d56715a9ff1a0d5a53174b6 Author: Andreas Sturmlechner gentoo org> AuthorDate: Tue Apr 17 11:31:36 2018 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Apr 17 12:02:23 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17c9422f dev-vcs/qgit: Fix build with Qt 5.11 Package-Manager: Portage-2.3.29, Repoman-2.3.9 dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch | 51 +++++++++++++++++++++++ dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch | 24 +++++++++++ dev-vcs/qgit/qgit-2.7-r1.ebuild | 32 ++++++++++++++ 3 files changed, 107 insertions(+) diff --git a/dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch b/dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch new file mode 100644 index 00000000000..17f940aa23b --- /dev/null +++ b/dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch @@ -0,0 +1,51 @@ +From e60ae49271e06384163afa1ebd1e562eb7c520ed Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Thu, 15 Feb 2018 17:39:22 +0000 +Subject: [PATCH] Add high DPI support + +--- + src/listview.cpp | 11 ++++++++++- + src/qgit.cpp | 5 ++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/listview.cpp b/src/listview.cpp +index dd6a8cb..e4f094e 100644 +--- a/src/listview.cpp ++++ b/src/listview.cpp +@@ -884,7 +884,16 @@ void ListViewDelegate::addTextPixmap(QPixmap** pp, SCRef txt, const QStyleOption + int pw = fm.boundingRect(txt).width() + 2 * spacing; + int ph = fm.height(); + +- QPixmap* newPm = new QPixmap(ofs + pw, ph); ++ QSize pixmapSize(ofs + pw, ph); ++ ++#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) ++ qreal dpr = qApp->devicePixelRatio(); ++ QPixmap* newPm = new QPixmap(pixmapSize * dpr); ++ newPm->setDevicePixelRatio(dpr); ++#else ++ QPixmap* newPm = new QPixmap(pixmapSize); ++#endif ++ + QPainter p; + p.begin(newPm); + if (!pm->isNull()) { +diff --git a/src/qgit.cpp b/src/qgit.cpp +index 266a7b8..b01c49e 100644 +--- a/src/qgit.cpp ++++ b/src/qgit.cpp +@@ -18,7 +18,10 @@ using namespace QGit; + int main(int argc, char* argv[]) { + + QApplication app(argc, argv); +- QCoreApplication::setOrganizationName(ORG_KEY); ++#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) ++ app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); ++#endif ++ QCoreApplication::setOrganizationName(ORG_KEY); + QCoreApplication::setApplicationName(APP_KEY); + + /* On Windows msysgit exec directory is set up +-- +2.15.1 + diff --git a/dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch b/dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch new file mode 100644 index 00000000000..a92e1e50f72 --- /dev/null +++ b/dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch @@ -0,0 +1,24 @@ +From 563bc3ab3f928a3ba1c22e5e62ab8cbe15c6bc15 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Tue, 17 Apr 2018 13:28:19 +0200 +Subject: [PATCH] Fix build with Qt 5.11 (missing header) + +--- + src/patchview.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/patchview.cpp b/src/patchview.cpp +index 5e3765d..afa796e 100644 +--- a/src/patchview.cpp ++++ b/src/patchview.cpp +@@ -6,6 +6,7 @@ + Copyright: See COPYING file that comes with this distribution + + */ ++#include + #include + #include "common.h" + #include "git.h" +-- +2.17.0 + diff --git a/dev-vcs/qgit/qgit-2.7-r1.ebuild b/dev-vcs/qgit/qgit-2.7-r1.ebuild new file mode 100644 index 00000000000..b7930738aca --- /dev/null +++ b/dev-vcs/qgit/qgit-2.7-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils + +DESCRIPTION="Qt GUI for git repositories" +HOMEPAGE="http://libre.tibirna.org/projects/qgit/wiki/QGit" +SRC_URI="https://github.com/tibirna/qgit/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" +IUSE="" + +DEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 +" +RDEPEND="${DEPEND} + dev-vcs/git + !dev-vcs/qgit:2 +" + +S=${WORKDIR}/${PN}-${P} + +PATCHES=( + "${FILESDIR}/${P}-highdpi-support.patch" + "${FILESDIR}/${P}-qt-5.11.patch" +)