commit:     124fe3d1d0285a7420e52fb4c530e4c702f93a1b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 21 16:45:26 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jun 22 08:15:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=124fe3d1

net-p2p/retroshare: Fix build with Qt 5.15

Upstream patch needed quite some modifications to apply.

Closes: https://bugs.gentoo.org/728836
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/retroshare-0.6.5-qt-5.15.patch           | 99 ++++++++++++++++++++++
 net-p2p/retroshare/retroshare-0.6.5.ebuild         | 13 +--
 2 files changed, 107 insertions(+), 5 deletions(-)

diff --git a/net-p2p/retroshare/files/retroshare-0.6.5-qt-5.15.patch 
b/net-p2p/retroshare/files/retroshare-0.6.5-qt-5.15.patch
new file mode 100644
index 00000000000..21147a6391b
--- /dev/null
+++ b/net-p2p/retroshare/files/retroshare-0.6.5-qt-5.15.patch
@@ -0,0 +1,99 @@
+From bbaad838572b5fba6109bc7d3b5c55c2c68e6cdc Mon Sep 17 00:00:00 2001
+From: Phenom <[email protected]>
+Date: Mon, 1 Jun 2020 13:44:43 +0200
+Subject: [PATCH] Fix build with Qt 5.15+
+
+---
+ retroshare-gui/src/gui/elastic/elnode.h        |  8 +++++---
+ .../src/gui/gxs/GxsCommentTreeWidget.cpp       | 16 +++++++++-------
+ retroshare-gui/src/gui/gxs/GxsIdDetails.cpp    | 18 ++++++++++--------
+ 3 files changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/retroshare-gui/src/gui/elastic/elnode.h 
b/retroshare-gui/src/gui/elastic/elnode.h
+index 1e0edd1a87..33043ddab3 100644
+--- a/retroshare-gui/src/gui/elastic/elnode.h
++++ b/retroshare-gui/src/gui/elastic/elnode.h
+@@ -26,6 +26,10 @@
+ #ifndef ELNODE_H
+ #define ELNODE_H
+ 
++#include "graphwidget.h"
++
++#include <retroshare/rstypes.h>
++
+ #include <QApplication>
+ #if QT_VERSION >= 0x040600
+ #include <QGraphicsObject>
+@@ -36,9 +40,7 @@
+ #include <QGraphicsItem>
+ #endif
+ #include <QList>
+-
+-#include <retroshare/rstypes.h>
+-#include "graphwidget.h"
++#include <QPainterPath>
+ 
+ class Edge;
+ QT_BEGIN_NAMESPACE
+--- a/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp
++++ b/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp
+@@ -18,6 +18,12 @@
+  *                                                                            
 *
+  
*******************************************************************************/
+ 
++#include "GxsCommentTreeWidget.h"
++
++#include "gui/common/RSElidedItemDelegate.h"
++#include "gui/gxs/GxsCreateCommentDialog.h"
++#include "gui/gxs/GxsIdTreeWidgetItem.h"
++
+ #include <QAbstractTextDocumentLayout>
+ #include <QApplication>
+ #include <QClipboard>
+@@ -25,13 +31,9 @@
+ #include <QMenu>
+ #include <QMimeData>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QTextDocument>
+ 
+-#include "gui/common/RSElidedItemDelegate.h"
+-#include "gui/gxs/GxsCommentTreeWidget.h"
+-#include "gui/gxs/GxsCreateCommentDialog.h"
+-#include "gui/gxs/GxsIdTreeWidgetItem.h"
+-
+ #include <iostream>
+ 
+ #define PCITEM_COLUMN_COMMENT         0
+diff --git a/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp 
b/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp
+--- a/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp
++++ b/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp
+@@ -18,19 +18,21 @@
+  *                                                                            
 *
+  
*******************************************************************************/
+ 
+-#include <QApplication>
+-#include <QThread>
+-#include <QTimerEvent>
+-#include <QMutexLocker>
++#include "GxsIdDetails.h"
+ 
+-#include <math.h>
+-#include "GxsIdDetails.h"
+ #include "retroshare-gui/RsAutoUpdatePage.h"
+ 
+ #include <retroshare/rspeers.h>
+ 
+-#include <iostream>
++#include <QApplication>
++#include <QMutexLocker>
+ #include <QPainter>
++#include <QPainterPath>
++#include <QThread>
++#include <QTimerEvent>
++
++#include <iostream>
++#include <cmath>
+ 
+ /* Images for tag icons */
+ #define IMAGE_LOADING     ":/images/folder-draft.png"

diff --git a/net-p2p/retroshare/retroshare-0.6.5.ebuild 
b/net-p2p/retroshare/retroshare-0.6.5.ebuild
index ab3d11026c9..b2c53a2a283 100644
--- a/net-p2p/retroshare/retroshare-0.6.5.ebuild
+++ b/net-p2p/retroshare/retroshare-0.6.5.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit desktop qmake-utils xdg-utils
+inherit desktop eutils qmake-utils xdg-utils
 
 DESCRIPTION="P2P private sharing application"
 HOMEPAGE="https://retroshare.cc";
@@ -13,7 +13,6 @@ 
SRC_URI="https://github.com/RetroShare/RetroShare/releases/download/v${PV}/Retro
 LICENSE="AGPL-3 GPL-2 GPL-3 Apache-2.0 LGPL-3"
 SLOT="0"
 KEYWORDS="amd64 x86"
-
 IUSE="cli control-socket gnome-keyring +gui +jsonapi service +sqlcipher webui 
+xapian"
 
 REQUIRED_USE="
@@ -60,10 +59,14 @@ BDEPEND="dev-util/cmake
                )
        )"
 
-src_unpack() {
-       default
+PATCHES=( "${FILESDIR}/${P}-qt-5.15.patch" )
 
-       mv RetroShare ${P} || die
+S="${WORKDIR}"/RetroShare
+
+src_prepare() {
+       # CRLF endings break patch...
+       edos2unix retroshare-gui/src/gui/elastic/elnode.h
+       default
 }
 
 src_configure() {

Reply via email to