1 |
commit: 431e3685b3b65d0660a958fbee48dd2b42196b75 |
2 |
Author: Slawomir Lis <slis <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 15 19:38:16 2019 +0000 |
4 |
Commit: Slawek Lis <slis <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 15 19:38:16 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=431e3685 |
7 |
|
8 |
media-gfx/librecad: Patch for compilation errors with gcc-9 |
9 |
|
10 |
Merged commit d0a0ef284b7fcc5c0d65b92c30855f62b637653f from librecad repo |
11 |
|
12 |
Closes: https://bugs.gentoo.org/685906 |
13 |
Package-Manager: Portage-2.3.71, Repoman-2.3.16 |
14 |
Signed-off-by: Slawek Lis <slis <AT> gentoo.org> |
15 |
|
16 |
.../librecad/files/librecad-2.1.3-gcc-9.patch | 209 +++++++++++++++++++++ |
17 |
media-gfx/librecad/librecad-2.1.3-r5.ebuild | 51 +++++ |
18 |
2 files changed, 260 insertions(+) |
19 |
|
20 |
diff --git a/media-gfx/librecad/files/librecad-2.1.3-gcc-9.patch b/media-gfx/librecad/files/librecad-2.1.3-gcc-9.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..f8214f29fab |
23 |
--- /dev/null |
24 |
+++ b/media-gfx/librecad/files/librecad-2.1.3-gcc-9.patch |
25 |
@@ -0,0 +1,209 @@ |
26 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp b/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp |
27 |
+index c14da00e4..f305408aa 100644 |
28 |
+--- a/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp |
29 |
++++ b/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp |
30 |
+@@ -36,11 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
31 |
+ #include "rs_preview.h" |
32 |
+ #include "rs_debug.h" |
33 |
+ |
34 |
+-namespace{ |
35 |
+-//list of entity types supported by current action |
36 |
+-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle}; |
37 |
+-} |
38 |
+- |
39 |
+ struct RS_ActionDrawCircleTan1_2P::Points { |
40 |
+ std::vector<RS_Vector> points; |
41 |
+ RS_CircleData cData; |
42 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan1_2p.h b/librecad/src/actions/rs_actiondrawcircletan1_2p.h |
43 |
+index a6f40a6ea..b5976c9f6 100644 |
44 |
+--- a/librecad/src/actions/rs_actiondrawcircletan1_2p.h |
45 |
++++ b/librecad/src/actions/rs_actiondrawcircletan1_2p.h |
46 |
+@@ -79,6 +79,9 @@ class RS_ActionDrawCircleTan1_2P : public RS_PreviewActionInterface { |
47 |
+ private: |
48 |
+ struct Points; |
49 |
+ std::unique_ptr<Points> pPoints; |
50 |
++ |
51 |
++ //list of entity types supported by current action |
52 |
++ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle}; |
53 |
+ }; |
54 |
+ |
55 |
+ #endif |
56 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan2.cpp b/librecad/src/actions/rs_actiondrawcircletan2.cpp |
57 |
+index d0558f05b..820e42266 100644 |
58 |
+--- a/librecad/src/actions/rs_actiondrawcircletan2.cpp |
59 |
++++ b/librecad/src/actions/rs_actiondrawcircletan2.cpp |
60 |
+@@ -33,10 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
61 |
+ #include "rs_preview.h" |
62 |
+ #include "rs_debug.h" |
63 |
+ |
64 |
+-namespace { |
65 |
+-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle}; |
66 |
+-} |
67 |
+- |
68 |
+ struct RS_ActionDrawCircleTan2::Points { |
69 |
+ RS_CircleData cData; |
70 |
+ RS_Vector coord; |
71 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan2.h b/librecad/src/actions/rs_actiondrawcircletan2.h |
72 |
+index bed568970..5b2040e90 100644 |
73 |
+--- a/librecad/src/actions/rs_actiondrawcircletan2.h |
74 |
++++ b/librecad/src/actions/rs_actiondrawcircletan2.h |
75 |
+@@ -77,6 +77,9 @@ class RS_ActionDrawCircleTan2 : public RS_PreviewActionInterface { |
76 |
+ private: |
77 |
+ struct Points; |
78 |
+ std::unique_ptr<Points> pPoints; |
79 |
++ |
80 |
++ //list of entity types supported by current action |
81 |
++ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle}; |
82 |
+ }; |
83 |
+ |
84 |
+ #endif |
85 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp b/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp |
86 |
+index 324c16686..51cd29a19 100644 |
87 |
+--- a/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp |
88 |
++++ b/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp |
89 |
+@@ -35,10 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
90 |
+ #include "rs_preview.h" |
91 |
+ #include "rs_debug.h" |
92 |
+ |
93 |
+-namespace { |
94 |
+-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle}; |
95 |
+-} |
96 |
+- |
97 |
+ struct RS_ActionDrawCircleTan2_1P::Points { |
98 |
+ RS_Vector point; |
99 |
+ RS_CircleData cData; |
100 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan2_1p.h b/librecad/src/actions/rs_actiondrawcircletan2_1p.h |
101 |
+index 40c239037..e44a56c36 100644 |
102 |
+--- a/librecad/src/actions/rs_actiondrawcircletan2_1p.h |
103 |
++++ b/librecad/src/actions/rs_actiondrawcircletan2_1p.h |
104 |
+@@ -73,6 +73,9 @@ class RS_ActionDrawCircleTan2_1P : public RS_PreviewActionInterface { |
105 |
+ private: |
106 |
+ struct Points; |
107 |
+ std::unique_ptr<Points> pPoints; |
108 |
++ |
109 |
++ //list of entity types supported by current action |
110 |
++ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle}; |
111 |
+ }; |
112 |
+ |
113 |
+ #endif |
114 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan3.cpp b/librecad/src/actions/rs_actiondrawcircletan3.cpp |
115 |
+index 026ed30e5..eaca13d63 100644 |
116 |
+--- a/librecad/src/actions/rs_actiondrawcircletan3.cpp |
117 |
++++ b/librecad/src/actions/rs_actiondrawcircletan3.cpp |
118 |
+@@ -35,10 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
119 |
+ #include "rs_preview.h" |
120 |
+ #include "rs_debug.h" |
121 |
+ |
122 |
+-namespace { |
123 |
+-auto enTypeList={RS2::EntityArc, RS2::EntityCircle, RS2::EntityLine, RS2::EntityPoint}; |
124 |
+-} |
125 |
+- |
126 |
+ struct RS_ActionDrawCircleTan3::Points { |
127 |
+ std::vector<RS_AtomicEntity*> circles; |
128 |
+ std::shared_ptr<RS_CircleData> cData{std::make_shared<RS_CircleData>()}; |
129 |
+diff --git a/librecad/src/actions/rs_actiondrawcircletan3.h b/librecad/src/actions/rs_actiondrawcircletan3.h |
130 |
+index d0cabfa2d..3201c5f88 100644 |
131 |
+--- a/librecad/src/actions/rs_actiondrawcircletan3.h |
132 |
++++ b/librecad/src/actions/rs_actiondrawcircletan3.h |
133 |
+@@ -78,6 +78,8 @@ class RS_ActionDrawCircleTan3 : public RS_PreviewActionInterface { |
134 |
+ struct Points; |
135 |
+ std::unique_ptr<Points> pPoints; |
136 |
+ |
137 |
++ //list of entity types supported by current action |
138 |
++ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityArc, RS2::EntityCircle, RS2::EntityLine, RS2::EntityPoint}; |
139 |
+ }; |
140 |
+ |
141 |
+ #endif |
142 |
+diff --git a/librecad/src/actions/rs_actiondrawlinerelangle.cpp b/librecad/src/actions/rs_actiondrawlinerelangle.cpp |
143 |
+index 8415dd604..b9ce996fe 100644 |
144 |
+--- a/librecad/src/actions/rs_actiondrawlinerelangle.cpp |
145 |
++++ b/librecad/src/actions/rs_actiondrawlinerelangle.cpp |
146 |
+@@ -38,11 +38,6 @@ |
147 |
+ #include "rs_preview.h" |
148 |
+ #include "rs_debug.h" |
149 |
+ |
150 |
+-namespace { |
151 |
+-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle, |
152 |
+- RS2::EntityEllipse}; |
153 |
+-} |
154 |
+- |
155 |
+ RS_ActionDrawLineRelAngle::RS_ActionDrawLineRelAngle( |
156 |
+ RS_EntityContainer& container, |
157 |
+ RS_GraphicView& graphicView, |
158 |
+diff --git a/librecad/src/actions/rs_actiondrawlinerelangle.h b/librecad/src/actions/rs_actiondrawlinerelangle.h |
159 |
+index 1e102792d..71e5185b7 100644 |
160 |
+--- a/librecad/src/actions/rs_actiondrawlinerelangle.h |
161 |
++++ b/librecad/src/actions/rs_actiondrawlinerelangle.h |
162 |
+@@ -110,6 +110,9 @@ class RS_ActionDrawLineRelAngle : public RS_PreviewActionInterface { |
163 |
+ * Is the angle fixed? |
164 |
+ */ |
165 |
+ bool fixedAngle; |
166 |
++ |
167 |
++ //list of entity types supported by current action |
168 |
++ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle,RS2::EntityEllipse}; |
169 |
+ }; |
170 |
+ |
171 |
+ #endif |
172 |
+diff --git a/librecad/src/actions/rs_actiondrawlinetangent1.cpp b/librecad/src/actions/rs_actiondrawlinetangent1.cpp |
173 |
+index 197b0cb6c..47a93c766 100644 |
174 |
+--- a/librecad/src/actions/rs_actiondrawlinetangent1.cpp |
175 |
++++ b/librecad/src/actions/rs_actiondrawlinetangent1.cpp |
176 |
+@@ -36,12 +36,6 @@ |
177 |
+ #include "rs_preview.h" |
178 |
+ #include "rs_debug.h" |
179 |
+ |
180 |
+-namespace{ |
181 |
+-auto circleType={RS2::EntityArc, RS2::EntityCircle, |
182 |
+- RS2::EntityEllipse, RS2::EntitySplinePoints |
183 |
+- }; |
184 |
+-} |
185 |
+- |
186 |
+ RS_ActionDrawLineTangent1::RS_ActionDrawLineTangent1( |
187 |
+ RS_EntityContainer& container, |
188 |
+ RS_GraphicView& graphicView) |
189 |
+diff --git a/librecad/src/actions/rs_actiondrawlinetangent1.h b/librecad/src/actions/rs_actiondrawlinetangent1.h |
190 |
+index 0f76b3684..d20d302dd 100644 |
191 |
+--- a/librecad/src/actions/rs_actiondrawlinetangent1.h |
192 |
++++ b/librecad/src/actions/rs_actiondrawlinetangent1.h |
193 |
+@@ -66,6 +66,12 @@ class RS_ActionDrawLineTangent1 : public RS_PreviewActionInterface { |
194 |
+ std::unique_ptr<RS_Vector> point; |
195 |
+ /** Chosen entity */ |
196 |
+ RS_Entity* circle; |
197 |
++ |
198 |
++ //list of entity types supported by current action |
199 |
++ const std::initializer_list<RS2::EntityType> circleType { RS2::EntityArc, |
200 |
++ RS2::EntityCircle, |
201 |
++ RS2::EntityEllipse, |
202 |
++ RS2::EntitySplinePoints }; |
203 |
+ }; |
204 |
+ |
205 |
+ #endif |
206 |
+diff --git a/librecad/src/actions/rs_actiondrawlinetangent2.cpp b/librecad/src/actions/rs_actiondrawlinetangent2.cpp |
207 |
+index fed3545e0..0f1600e53 100644 |
208 |
+--- a/librecad/src/actions/rs_actiondrawlinetangent2.cpp |
209 |
++++ b/librecad/src/actions/rs_actiondrawlinetangent2.cpp |
210 |
+@@ -35,10 +35,6 @@ |
211 |
+ #include "rs_preview.h" |
212 |
+ #include "rs_debug.h" |
213 |
+ |
214 |
+-namespace{ |
215 |
+-auto circleType={RS2::EntityArc, RS2::EntityCircle, RS2::EntityEllipse}; |
216 |
+-} |
217 |
+- |
218 |
+ RS_ActionDrawLineTangent2::RS_ActionDrawLineTangent2( |
219 |
+ RS_EntityContainer& container, |
220 |
+ RS_GraphicView& graphicView) |
221 |
+diff --git a/librecad/src/actions/rs_actiondrawlinetangent2.h b/librecad/src/actions/rs_actiondrawlinetangent2.h |
222 |
+index b0d884cd7..95d82465d 100644 |
223 |
+--- a/librecad/src/actions/rs_actiondrawlinetangent2.h |
224 |
++++ b/librecad/src/actions/rs_actiondrawlinetangent2.h |
225 |
+@@ -68,6 +68,9 @@ class RS_ActionDrawLineTangent2 : public RS_PreviewActionInterface { |
226 |
+ /** 2nd chosen entity */ |
227 |
+ RS_Entity* circle2; |
228 |
+ bool valid; |
229 |
++ |
230 |
++ //list of entity types supported by current action |
231 |
++ const std::initializer_list<RS2::EntityType> circleType {RS2::EntityArc, RS2::EntityCircle, RS2::EntityEllipse}; |
232 |
+ }; |
233 |
+ |
234 |
+ #endif |
235 |
|
236 |
diff --git a/media-gfx/librecad/librecad-2.1.3-r5.ebuild b/media-gfx/librecad/librecad-2.1.3-r5.ebuild |
237 |
new file mode 100644 |
238 |
index 00000000000..2c3fc115cc9 |
239 |
--- /dev/null |
240 |
+++ b/media-gfx/librecad/librecad-2.1.3-r5.ebuild |
241 |
@@ -0,0 +1,51 @@ |
242 |
+# Copyright 1999-2019 Gentoo Authors |
243 |
+# Distributed under the terms of the GNU General Public License v2 |
244 |
+ |
245 |
+EAPI=6 |
246 |
+ |
247 |
+inherit desktop qmake-utils |
248 |
+ |
249 |
+DESCRIPTION="Generic 2D CAD program" |
250 |
+HOMEPAGE="https://www.librecad.org/" |
251 |
+SRC_URI="https://github.com/LibreCAD/LibreCAD/archive/${PV/_/}.tar.gz -> ${P}.tar.gz" |
252 |
+ |
253 |
+LICENSE="GPL-2" |
254 |
+SLOT="0" |
255 |
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
256 |
+ |
257 |
+IUSE="3d debug doc tools" |
258 |
+ |
259 |
+RDEPEND=" |
260 |
+ dev-cpp/muParser |
261 |
+ dev-libs/boost:= |
262 |
+ dev-qt/qtcore:5 |
263 |
+ dev-qt/qtgui:5 |
264 |
+ dev-qt/qtprintsupport:5 |
265 |
+ dev-qt/qtsvg:5 |
266 |
+ dev-qt/qtwidgets:5 |
267 |
+ media-libs/freetype:2" |
268 |
+DEPEND="${RDEPEND} |
269 |
+ dev-qt/linguist-tools:5 |
270 |
+ dev-qt/qthelp:5 |
271 |
+ dev-qt/qtxml:5 |
272 |
+" |
273 |
+ |
274 |
+S="${WORKDIR}/LibreCAD-${PV}" |
275 |
+ |
276 |
+PATCHES=( "${FILESDIR}/${P}-qt-5.11.patch" "${FILESDIR}/${P}-gcc-9.patch" ) |
277 |
+ |
278 |
+src_configure() { |
279 |
+ eqmake5 -r |
280 |
+} |
281 |
+ |
282 |
+src_install() { |
283 |
+ dobin unix/librecad |
284 |
+ use tools && dobin unix/ttf2lff |
285 |
+ insinto /usr/share/${PN} |
286 |
+ doins -r unix/resources/* |
287 |
+ use doc && docinto html && dodoc -r librecad/support/doc/* |
288 |
+ insinto /usr/share/appdata |
289 |
+ doins unix/appdata/librecad.appdata.xml |
290 |
+ doicon librecad/res/main/${PN}.png |
291 |
+ make_desktop_entry ${PN} LibreCAD ${PN} Graphics |
292 |
+} |