1 |
commit: 1cfd854753dc82931f2a28aa2a6b220578ef35f7 |
2 |
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 27 18:55:59 2016 +0000 |
4 |
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 27 20:59:59 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cfd8547 |
7 |
|
8 |
net-p2p/retroshare: backport upstream fixes for building with Qt5 and new C++ ABI |
9 |
|
10 |
Gentoo-Bug: 584832 |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
.../files/retroshare-0.6.0-c11-compat.patch | 145 +++++++++++++++++++++ |
15 |
net-p2p/retroshare/retroshare-0.6.0.ebuild | 3 + |
16 |
2 files changed, 148 insertions(+) |
17 |
|
18 |
diff --git a/net-p2p/retroshare/files/retroshare-0.6.0-c11-compat.patch b/net-p2p/retroshare/files/retroshare-0.6.0-c11-compat.patch |
19 |
new file mode 100644 |
20 |
index 0000000..b3d8f3b |
21 |
--- /dev/null |
22 |
+++ b/net-p2p/retroshare/files/retroshare-0.6.0-c11-compat.patch |
23 |
@@ -0,0 +1,145 @@ |
24 |
+commit aca88308eae16ab67627593c0df2fce7beb02e89 |
25 |
+Author: zeners <zener@×××.at> |
26 |
+Date: Tue Mar 29 21:22:14 2016 +0200 |
27 |
+ |
28 |
+ compatible to g++11 / QT5 |
29 |
+ |
30 |
+ method suggested by cyril |
31 |
+ |
32 |
+diff --git a/libretroshare/src/pqi/pqiqosstreamer.cc b/libretroshare/src/pqi/pqiqosstreamer.cc |
33 |
+index 898f2b5..fc0dc20 100644 |
34 |
+--- a/libretroshare/src/pqi/pqiqosstreamer.cc |
35 |
++++ b/libretroshare/src/pqi/pqiqosstreamer.cc |
36 |
+@@ -25,6 +25,8 @@ |
37 |
+ |
38 |
+ #include "pqiqosstreamer.h" |
39 |
+ |
40 |
++const float pqiQoSstreamer::PQI_QOS_STREAMER_ALPHA = 2.0f ; |
41 |
++ |
42 |
+ pqiQoSstreamer::pqiQoSstreamer(PQInterface *parent, RsSerialiser *rss, const RsPeerId& peerid, BinInterface *bio_in, int bio_flagsin) |
43 |
+ : pqithreadstreamer(parent,rss,peerid,bio_in,bio_flagsin), pqiQoS(PQI_QOS_STREAMER_MAX_LEVELS, PQI_QOS_STREAMER_ALPHA) |
44 |
+ { |
45 |
+diff --git a/libretroshare/src/pqi/pqiqosstreamer.h b/libretroshare/src/pqi/pqiqosstreamer.h |
46 |
+index b85ac32..574ba94 100644 |
47 |
+--- a/libretroshare/src/pqi/pqiqosstreamer.h |
48 |
++++ b/libretroshare/src/pqi/pqiqosstreamer.h |
49 |
+@@ -34,7 +34,7 @@ class pqiQoSstreamer: public pqithreadstreamer, public pqiQoS |
50 |
+ pqiQoSstreamer(PQInterface *parent, RsSerialiser *rss, const RsPeerId& peerid, BinInterface *bio_in, int bio_flagsin); |
51 |
+ |
52 |
+ static const uint32_t PQI_QOS_STREAMER_MAX_LEVELS = 10 ; |
53 |
+- static const float PQI_QOS_STREAMER_ALPHA = 2.0 ; |
54 |
++ static const float PQI_QOS_STREAMER_ALPHA ; |
55 |
+ |
56 |
+ virtual void locked_storeInOutputQueue(void *ptr,int priority) ; |
57 |
+ virtual int locked_out_queue_size() const { return _total_item_count ; } |
58 |
+diff --git a/libretroshare/src/retroshare/rsreputations.h b/libretroshare/src/retroshare/rsreputations.h |
59 |
+index 484aabb..8db42ee 100644 |
60 |
+--- a/libretroshare/src/retroshare/rsreputations.h |
61 |
++++ b/libretroshare/src/retroshare/rsreputations.h |
62 |
+@@ -31,8 +31,8 @@ |
63 |
+ class RsReputations |
64 |
+ { |
65 |
+ public: |
66 |
+- static const float REPUTATION_THRESHOLD_ANTI_SPAM = 1.4f ; |
67 |
+- static const float REPUTATION_THRESHOLD_DEFAULT = 1.0f ; |
68 |
++ static const float REPUTATION_THRESHOLD_ANTI_SPAM; |
69 |
++ static const float REPUTATION_THRESHOLD_DEFAULT; |
70 |
+ |
71 |
+ // This is the interface file for the reputation system |
72 |
+ // |
73 |
+diff --git a/libretroshare/src/rsserver/p3face-server.cc b/libretroshare/src/rsserver/p3face-server.cc |
74 |
+index 746ebac..b769136 100644 |
75 |
+--- a/libretroshare/src/rsserver/p3face-server.cc |
76 |
++++ b/libretroshare/src/rsserver/p3face-server.cc |
77 |
+@@ -69,6 +69,10 @@ static double getCurrentTS() |
78 |
+ return cts; |
79 |
+ } |
80 |
+ |
81 |
++const double RsServer::minTimeDelta = 0.1; // 25; |
82 |
++const double RsServer::maxTimeDelta = 0.5; |
83 |
++const double RsServer::kickLimit = 0.15; |
84 |
++ |
85 |
+ |
86 |
+ RsServer::RsServer() |
87 |
+ : coreMutex("RsServer") |
88 |
+diff --git a/libretroshare/src/rsserver/p3face.h b/libretroshare/src/rsserver/p3face.h |
89 |
+index 23efa58..51f05a5 100644 |
90 |
+--- a/libretroshare/src/rsserver/p3face.h |
91 |
++++ b/libretroshare/src/rsserver/p3face.h |
92 |
+@@ -194,9 +194,9 @@ class RsServer: public RsControl, public RsTickingThread |
93 |
+ double mAvgTickRate ; |
94 |
+ double mTimeDelta ; |
95 |
+ |
96 |
+- static const double minTimeDelta = 0.1; // 25; |
97 |
+- static const double maxTimeDelta = 0.5; |
98 |
+- static const double kickLimit = 0.15; |
99 |
++ static const double minTimeDelta; // 25; |
100 |
++ static const double maxTimeDelta; |
101 |
++ static const double kickLimit; |
102 |
+ }; |
103 |
+ |
104 |
+ /* Helper function to convert windows paths |
105 |
+diff --git a/libretroshare/src/services/p3gxsreputation.cc b/libretroshare/src/services/p3gxsreputation.cc |
106 |
+index dd7a46d..b78ca1f 100644 |
107 |
+--- a/libretroshare/src/services/p3gxsreputation.cc |
108 |
++++ b/libretroshare/src/services/p3gxsreputation.cc |
109 |
+@@ -303,6 +303,10 @@ void p3GxsReputation::updateActiveFriends() |
110 |
+ |
111 |
+ } |
112 |
+ |
113 |
++const float RsReputations::REPUTATION_THRESHOLD_ANTI_SPAM = 1.4f ; |
114 |
++const float RsReputations::REPUTATION_THRESHOLD_DEFAULT = 1.0f ; |
115 |
++ |
116 |
++ |
117 |
+ static RsReputations::Opinion safe_convert_uint32t_to_opinion(uint32_t op) |
118 |
+ { |
119 |
+ return RsReputations::Opinion(std::min((uint32_t)op,UPPER_LIMIT)) ; |
120 |
+diff --git a/retroshare-gui/src/gui/elastic/node.cpp b/retroshare-gui/src/gui/elastic/node.cpp |
121 |
+index 7755172..bc33151 100644 |
122 |
+--- a/retroshare-gui/src/gui/elastic/node.cpp |
123 |
++++ b/retroshare-gui/src/gui/elastic/node.cpp |
124 |
+@@ -87,6 +87,12 @@ Node::Node(const std::string& node_string,GraphWidget::NodeType type,GraphWidget |
125 |
+ _auth = GraphWidget::ELASTIC_NODE_AUTH_FULL ; |
126 |
+ } |
127 |
+ |
128 |
++const float Node::MASS_FACTOR = 10 ; |
129 |
++const float Node::FRICTION_FACTOR = 10.8f ; |
130 |
++const float Node::REPULSION_FACTOR = 4; |
131 |
++const float Node::NODE_DISTANCE = 130.0f ; |
132 |
++ |
133 |
++ |
134 |
+ void Node::addEdge(Edge *edge) |
135 |
+ { |
136 |
+ edgeList << edge; |
137 |
+diff --git a/retroshare-gui/src/gui/elastic/node.h b/retroshare-gui/src/gui/elastic/node.h |
138 |
+index d7bcd5f..13c717b 100644 |
139 |
+--- a/retroshare-gui/src/gui/elastic/node.h |
140 |
++++ b/retroshare-gui/src/gui/elastic/node.h |
141 |
+@@ -118,10 +118,10 @@ private: |
142 |
+ RsPeerId _ssl_id ; |
143 |
+ RsPgpId _gpg_id ; |
144 |
+ |
145 |
+- static const float MASS_FACTOR = 10 ; |
146 |
+- static const float FRICTION_FACTOR = 10.8 ; |
147 |
+- static const float REPULSION_FACTOR = 4 ; |
148 |
+- static const float NODE_DISTANCE = 130.0 ; |
149 |
++ static const float MASS_FACTOR; |
150 |
++ static const float FRICTION_FACTOR; |
151 |
++ static const float REPULSION_FACTOR; |
152 |
++ static const float NODE_DISTANCE; |
153 |
+ }; |
154 |
+ |
155 |
+ #endif |
156 |
+diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp |
157 |
+index fe2e1aa..a3381b2 100644 |
158 |
+--- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp |
159 |
++++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp |
160 |
+@@ -1565,7 +1565,7 @@ void GxsForumThreadWidget::setMsgReadStatus(QList<QTreeWidgetItem*> &rows, bool |
161 |
+ // LIKE THIS BELOW... |
162 |
+ //std::string grpId = (*Row)->data(COLUMN_THREAD_DATA, ROLE_THREAD_GROUPID).toString().toStdString(); |
163 |
+ |
164 |
+- RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), msgId); |
165 |
++ RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), RsGxsMessageId(msgId)); |
166 |
+ |
167 |
+ uint32_t token; |
168 |
+ rsGxsForums->setMessageReadStatus(token, msgPair, read); |
169 |
|
170 |
diff --git a/net-p2p/retroshare/retroshare-0.6.0.ebuild b/net-p2p/retroshare/retroshare-0.6.0.ebuild |
171 |
index 7088971..bf71893 100644 |
172 |
--- a/net-p2p/retroshare/retroshare-0.6.0.ebuild |
173 |
+++ b/net-p2p/retroshare/retroshare-0.6.0.ebuild |
174 |
@@ -78,6 +78,8 @@ DEPEND="${RDEPEND} |
175 |
|
176 |
S="${WORKDIR}/RetroShare-${PV}" |
177 |
|
178 |
+PATCHES=( "${FILESDIR}/${P}-c11-compat.patch" ) |
179 |
+ |
180 |
src_prepare() { |
181 |
local dir |
182 |
|
183 |
@@ -99,6 +101,7 @@ src_prepare() { |
184 |
retroshare-gui/src/retroshare-gui.pro \ |
185 |
retroshare-nogui/src/retroshare-nogui.pro || die 'sed on retroshare-gui/src/retroshare-gui.pro failed' |
186 |
|
187 |
+ epatch ${PATCHES[@]} |
188 |
eapply_user |
189 |
} |