1 |
commit: ef1f64452bc61dc3139696482eef10e875e331b9 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Mar 27 20:26:32 2022 +0000 |
4 |
Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de> |
5 |
CommitDate: Sun Mar 27 21:28:24 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ef1f6445 |
7 |
|
8 |
sci-libs/dart: add 6.12.1 |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
sci-libs/dart/Manifest | 1 + |
13 |
sci-libs/dart/dart-6.12.1.ebuild | 162 +++++++++++++++++++++ |
14 |
.../dart/files/dart-6.12.1-respect-cflags.patch | 11 ++ |
15 |
.../dart/files/dart-6.12.1-use-system-gtest.patch | 31 ++++ |
16 |
.../dart-6.12.1-use-system-lodepng-imgui.patch | 149 +++++++++++++++++++ |
17 |
sci-libs/dart/metadata.xml | 1 + |
18 |
6 files changed, 355 insertions(+) |
19 |
|
20 |
diff --git a/sci-libs/dart/Manifest b/sci-libs/dart/Manifest |
21 |
index 461c20c15..46b234018 100644 |
22 |
--- a/sci-libs/dart/Manifest |
23 |
+++ b/sci-libs/dart/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST dart-6.10.1.tar.gz 15867405 BLAKE2B 64c42ce1d808a88df53f4292df30c0bc58b52f864342ac0b353ad0496d41bd4986ad231cb08869058a16591350acf0fc0c12ae15d574d919c1c27f102028f608 SHA512 8abbf883628442ed5166e436349de8caaaf72a0ecfa88e75b986a550d617bd9b5df8ff32e32395e941ba12b7ad359be15b2ab2f566d99aa6c603bd0ebade1df0 |
26 |
+DIST dart-6.12.1.tar.gz 15990308 BLAKE2B d361dfad70745aa3747ea09f9f80a0b52051cb3e5d9a961995d469ab33086bf8d4068f95dbd4af8d0e2b23d5fbb0fa49dc63d823ffa52bbe750745093a6b54eb SHA512 f386f646f13989dad66efbe126691553b280bf6441edad1c03059d6ae650384652da538edd3d27f3404ba76b9d6f9348e5b1c0998d7673e856cc488b91a677ff |
27 |
|
28 |
diff --git a/sci-libs/dart/dart-6.12.1.ebuild b/sci-libs/dart/dart-6.12.1.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000..aac4ae640 |
31 |
--- /dev/null |
32 |
+++ b/sci-libs/dart/dart-6.12.1.ebuild |
33 |
@@ -0,0 +1,162 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{8..10} ) |
40 |
+ |
41 |
+inherit cmake python-single-r1 |
42 |
+ |
43 |
+DESCRIPTION="Dynamic Animation and Robotics Toolkit" |
44 |
+HOMEPAGE=" |
45 |
+ https://dartsim.github.io |
46 |
+ https://github.com/dartsim/dart |
47 |
+" |
48 |
+SRC_URI="https://github.com/dartsim/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
49 |
+ |
50 |
+LICENSE="BSD-2" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64" |
53 |
+IUSE="bullet doc examples extras glut gui +ipopt +nlopt ode python test tests tutorials urdfdom |
54 |
+cpu_flags_x86_mmx cpu_flags_x86_mmxext cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 |
55 |
+cpu_flags_x86_ssse3 cpu_flags_x86_sse4a cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_avx |
56 |
+cpu_flags_x86_avx2 cpu_flags_x86_avx512dq cpu_flags_x86_avx512f cpu_flags_x86_avx512vl |
57 |
+cpu_flags_x86_3dnow cpu_flags_x86_3dnowext cpu_flags_ppc_vsx cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 |
58 |
+cpu_flags_ppc_altivec cpu_flags_arm_neon cpu_flags_arm_iwmmxt cpu_flags_arm_iwmmxt2 cpu_flags_arm_neon" |
59 |
+#TODO: pagmo |
60 |
+ |
61 |
+RDEPEND=" |
62 |
+ app-arch/lz4 |
63 |
+ >=dev-cpp/eigen-3.0.5 |
64 |
+ dev-libs/boost |
65 |
+ dev-libs/tinyxml2 |
66 |
+ >=sci-libs/libccd-2.0 |
67 |
+ >=media-libs/assimp-3.0.0 |
68 |
+ >=sci-libs/fcl-0.2.9 |
69 |
+ sci-libs/flann |
70 |
+ sci-libs/octomap |
71 |
+ |
72 |
+ bullet? ( sci-physics/bullet ) |
73 |
+ examples? ( |
74 |
+ dev-cpp/tiny-dnn |
75 |
+ dev-libs/urdfdom |
76 |
+ ) |
77 |
+ extras? ( dev-libs/urdfdom ) |
78 |
+ glut? ( media-libs/freeglut ) |
79 |
+ gui? ( |
80 |
+ dev-games/openscenegraph |
81 |
+ media-libs/imgui:=[opengl(-)] |
82 |
+ media-libs/lodepng:= |
83 |
+ virtual/opengl |
84 |
+ x11-libs/libXi |
85 |
+ x11-libs/libXmu |
86 |
+ ) |
87 |
+ ipopt? ( sci-libs/ipopt ) |
88 |
+ nlopt? ( >=sci-libs/nlopt-2.4.1 ) |
89 |
+ ode? ( dev-games/ode ) |
90 |
+ python? ( |
91 |
+ ${PYTHON_DEPS} |
92 |
+ $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]') |
93 |
+ ) |
94 |
+ urdfdom? ( dev-libs/urdfdom ) |
95 |
+" |
96 |
+DEPEND=" |
97 |
+ ${RDEPEND} |
98 |
+ examples? ( dev-libs/urdfdom_headers ) |
99 |
+ extras? ( dev-libs/urdfdom_headers ) |
100 |
+ test? ( |
101 |
+ dev-cpp/gtest |
102 |
+ python? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') ) |
103 |
+ ) |
104 |
+ urdfdom? ( dev-libs/urdfdom_headers ) |
105 |
+" |
106 |
+BDEPEND=" |
107 |
+ app-text/dos2unix |
108 |
+ doc? ( app-doc/doxygen ) |
109 |
+ test? ( python? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') ) ) |
110 |
+" |
111 |
+ |
112 |
+RESTRICT="!test? ( test )" |
113 |
+PATCHES=( |
114 |
+ "${FILESDIR}/${PN}-respect-ldflags.patch" |
115 |
+ "${FILESDIR}/${P}-respect-cflags.patch" |
116 |
+ "${FILESDIR}/${P}-use-system-gtest.patch" |
117 |
+ "${FILESDIR}/${P}-use-system-lodepng-imgui.patch" |
118 |
+) |
119 |
+REQUIRED_USE=" |
120 |
+ examples? ( gui ) |
121 |
+ python? ( |
122 |
+ ${PYTHON_REQUIRED_USE} |
123 |
+ gui |
124 |
+ ) |
125 |
+ |
126 |
+ || ( ipopt nlopt ) |
127 |
+" |
128 |
+ |
129 |
+pkg_setup() { |
130 |
+ use python && python-single-r1_pkg_setup |
131 |
+} |
132 |
+ |
133 |
+src_prepare() { |
134 |
+ # delete bundled gtest |
135 |
+ rm -r unittests/gtest || die |
136 |
+ rm -r dart/external/{imgui,lodepng} || die |
137 |
+ dos2unix unittests/CMakeLists.txt || die |
138 |
+ cmake_src_prepare |
139 |
+} |
140 |
+ |
141 |
+src_configure() { |
142 |
+ local simd=OFF |
143 |
+ use cpu_flags_x86_mmx && simd=ON |
144 |
+ use cpu_flags_x86_mmxext && simd=ON |
145 |
+ use cpu_flags_x86_sse && simd=ON |
146 |
+ use cpu_flags_x86_sse2 && simd=ON |
147 |
+ use cpu_flags_x86_sse3 && simd=ON |
148 |
+ use cpu_flags_x86_ssse3 && simd=ON |
149 |
+ use cpu_flags_x86_sse4a && simd=ON |
150 |
+ use cpu_flags_x86_sse4_1 && simd=ON |
151 |
+ use cpu_flags_x86_sse4_2 && simd=ON |
152 |
+ use cpu_flags_x86_avx && simd=ON |
153 |
+ use cpu_flags_x86_avx2 && simd=ON |
154 |
+ use cpu_flags_x86_avx512dq && simd=ON |
155 |
+ use cpu_flags_x86_avx512f && simd=ON |
156 |
+ use cpu_flags_x86_avx512vl && simd=ON |
157 |
+ use cpu_flags_x86_3dnow && simd=ON |
158 |
+ use cpu_flags_x86_3dnowext && simd=ON |
159 |
+ use cpu_flags_ppc_vsx && simd=ON |
160 |
+ use cpu_flags_ppc_vsx2 && simd=ON |
161 |
+ use cpu_flags_ppc_vsx3 && simd=ON |
162 |
+ use cpu_flags_ppc_altivec && simd=ON |
163 |
+ use cpu_flags_arm_neon && simd=ON |
164 |
+ use cpu_flags_arm_iwmmxt && simd=ON |
165 |
+ use cpu_flags_arm_iwmmxt2 && simd=ON |
166 |
+ use cpu_flags_arm_neon && simd=ON |
167 |
+ |
168 |
+ local mycmakeargs=( |
169 |
+ -DBUILD_SHARED_LIBS=ON |
170 |
+ -DCMAKE_BUILD_TYPE=Release |
171 |
+ -DDART_CODECOV=OFF |
172 |
+ -DDART_VERBOSE=ON |
173 |
+ -DDART_TREAT_WARNINGS_AS_ERRORS=OFF |
174 |
+ |
175 |
+ -DDART_BUILD_EXTRAS=$(usex extras) |
176 |
+ -DDART_BUILD_GUI_OSG=$(usex gui) |
177 |
+ -DDART_ENABLE_SIMD="${simd}" |
178 |
+ ) |
179 |
+ cmake_src_configure |
180 |
+} |
181 |
+ |
182 |
+src_compile() { |
183 |
+ cmake_src_compile |
184 |
+ use examples && cmake_build examples |
185 |
+ use python && cmake_build dartpy # no work to do ... |
186 |
+ use test && cmake_build tests |
187 |
+ use tutorials && cmake_build tutorials |
188 |
+} |
189 |
+ |
190 |
+src_install() { |
191 |
+ cmake_src_install |
192 |
+ #TODO: python examples tests tutorials |
193 |
+ mv "${ED}/usr/share/doc/dart" "${ED}/usr/share/doc/${PF}" || die |
194 |
+ docompress -x "/usr/share/doc/${PF}" |
195 |
+} |
196 |
|
197 |
diff --git a/sci-libs/dart/files/dart-6.12.1-respect-cflags.patch b/sci-libs/dart/files/dart-6.12.1-respect-cflags.patch |
198 |
new file mode 100644 |
199 |
index 000000000..1c3f45d58 |
200 |
--- /dev/null |
201 |
+++ b/sci-libs/dart/files/dart-6.12.1-respect-cflags.patch |
202 |
@@ -0,0 +1,11 @@ |
203 |
+--- a/CMakeLists.txt |
204 |
++++ b/CMakeLists.txt |
205 |
+@@ -208,7 +208,7 @@ |
206 |
+ if(GCC_VERSION VERSION_LESS 7.3.0) |
207 |
+ message(FATAL_ERROR "The installed g++ version is ${GCC_VERSION}. ${PROJECT_NAME} requires g++ 7.3.0 or greater.") |
208 |
+ endif() |
209 |
+- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") |
210 |
++ set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG") |
211 |
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -fno-omit-frame-pointer -fno-inline-functions -fno-inline-functions-called-once -fno-optimize-sibling-calls") |
212 |
+ if(DART_FAST_DEBUG) |
213 |
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1") |
214 |
|
215 |
diff --git a/sci-libs/dart/files/dart-6.12.1-use-system-gtest.patch b/sci-libs/dart/files/dart-6.12.1-use-system-gtest.patch |
216 |
new file mode 100644 |
217 |
index 000000000..37cdd9ecf |
218 |
--- /dev/null |
219 |
+++ b/sci-libs/dart/files/dart-6.12.1-use-system-gtest.patch |
220 |
@@ -0,0 +1,31 @@ |
221 |
+--- a/unittests/CMakeLists.txt |
222 |
++++ b/unittests/CMakeLists.txt |
223 |
+@@ -31,18 +31,7 @@ |
224 |
+ # |
225 |
+ |
226 |
+ # GoogleTest setup |
227 |
+-include_directories(BEFORE SYSTEM ${DART_SOURCE_DIR}/unittests/gtest/include) |
228 |
+-include_directories(BEFORE SYSTEM ${DART_SOURCE_DIR}/unittests/gtest) |
229 |
+-add_library(gtest STATIC gtest/src/gtest-all.cc) |
230 |
+-add_library(gtest_main STATIC gtest/src/gtest_main.cc) |
231 |
+-target_link_libraries(gtest_main gtest) |
232 |
+-if(NOT WIN32) |
233 |
+- target_link_libraries(gtest pthread) |
234 |
+-endif() |
235 |
+-set_target_properties( |
236 |
+- gtest PROPERTIES |
237 |
+- ARCHIVE_OUTPUT_DIRECTORY ${DART_BINARY_DIR}/lib |
238 |
+-) |
239 |
++include_directories(BEFORE SYSTEM /usr/include/gtest) |
240 |
+ |
241 |
+ #=============================================================================== |
242 |
+ # This function uses following global properties: |
243 |
+@@ -66,7 +55,7 @@ |
244 |
+ |
245 |
+ add_executable(${target_name} ${sources}) |
246 |
+ add_test(${target_name} ${target_name}) |
247 |
+- target_link_libraries(${target_name} dart gtest gtest_main) |
248 |
++ target_link_libraries(${target_name} dart gtest) |
249 |
+ |
250 |
+ dart_format_add(${sources}) |
251 |
+ |
252 |
|
253 |
diff --git a/sci-libs/dart/files/dart-6.12.1-use-system-lodepng-imgui.patch b/sci-libs/dart/files/dart-6.12.1-use-system-lodepng-imgui.patch |
254 |
new file mode 100644 |
255 |
index 000000000..1d90631e9 |
256 |
--- /dev/null |
257 |
+++ b/sci-libs/dart/files/dart-6.12.1-use-system-lodepng-imgui.patch |
258 |
@@ -0,0 +1,149 @@ |
259 |
+--- a/dart/external/CMakeLists.txt |
260 |
++++ b/dart/external/CMakeLists.txt |
261 |
+@@ -1,5 +1,3 @@ |
262 |
+ add_subdirectory(convhull_3d) |
263 |
+-add_subdirectory(imgui) |
264 |
+ add_subdirectory(ikfast) |
265 |
+-add_subdirectory(lodepng) |
266 |
+ add_subdirectory(odelcpsolver) |
267 |
+--- a/dart/gui/CMakeLists.txt |
268 |
++++ b/dart/gui/CMakeLists.txt |
269 |
+@@ -42,14 +42,15 @@ |
270 |
+ dart_add_library(${target_name} |
271 |
+ ${hdrs} ${srcs} ${dart_gui_headers} ${dart_gui_sources} |
272 |
+ ) |
273 |
++target_include_directories(${target_name} PRIVATE /usr/include/imgui) |
274 |
+ target_link_libraries(${target_name} |
275 |
+ PUBLIC |
276 |
+ dart-utils |
277 |
+ OpenGL::GL |
278 |
+ OpenGL::GLU |
279 |
+ GLUT::GLUT |
280 |
+- ${PROJECT_NAME}-external-lodepng |
281 |
+- ${PROJECT_NAME}-external-imgui |
282 |
++ -limgui |
283 |
++ lodepng |
284 |
+ ) |
285 |
+ |
286 |
+ # Component |
287 |
+@@ -59,8 +60,6 @@ |
288 |
+ ${PROJECT_NAME} |
289 |
+ ${component_name} |
290 |
+ utils |
291 |
+- external-lodepng |
292 |
+- external-imgui |
293 |
+ ) |
294 |
+ add_component_dependency_packages(${PROJECT_NAME} ${component_name} OpenGL) |
295 |
+ if(NOT WIN32 OR CYGWIN) |
296 |
+--- a/dart/gui/glut/GlutWindow.cpp |
297 |
++++ b/dart/gui/glut/GlutWindow.cpp |
298 |
+@@ -30,7 +30,7 @@ |
299 |
+ * POSSIBILITY OF SUCH DAMAGE. |
300 |
+ */ |
301 |
+ |
302 |
+-#include "dart/external/lodepng/lodepng.h" |
303 |
++#include "lodepng.h" |
304 |
+ #include "dart/gui/glut/Window.hpp" |
305 |
+ |
306 |
+ #ifdef _WIN32 |
307 |
+--- a/dart/gui/osg/ImGuiHandler.cpp |
308 |
++++ b/dart/gui/osg/ImGuiHandler.cpp |
309 |
+@@ -44,8 +44,8 @@ |
310 |
+ #include <osg/RenderInfo> |
311 |
+ |
312 |
+ #include "dart/common/Console.hpp" |
313 |
+-#include "dart/external/imgui/imgui.h" |
314 |
+-#include "dart/external/imgui/imgui_impl_opengl2.h" |
315 |
++#include "imgui/imgui.h" |
316 |
++#include "imgui/imgui_impl_opengl2.h" |
317 |
+ #include "dart/gui/osg/ImGuiWidget.hpp" |
318 |
+ |
319 |
+ namespace dart { |
320 |
+--- a/dart/gui/osg/ImGuiWidget.cpp |
321 |
++++ b/dart/gui/osg/ImGuiWidget.cpp |
322 |
+@@ -38,7 +38,7 @@ |
323 |
+ |
324 |
+ #include "dart/gui/osg/ImGuiWidget.hpp" |
325 |
+ |
326 |
+-#include "dart/external/imgui/imgui.h" |
327 |
++#include "imgui/imgui.h" |
328 |
+ |
329 |
+ namespace dart { |
330 |
+ namespace gui { |
331 |
+--- a/examples/atlas_simbicon/AtlasSimbiconWidget.cpp |
332 |
++++ b/examples/atlas_simbicon/AtlasSimbiconWidget.cpp |
333 |
+@@ -38,7 +38,7 @@ |
334 |
+ |
335 |
+ #include "AtlasSimbiconWidget.hpp" |
336 |
+ |
337 |
+-#include "dart/external/imgui/imgui.h" |
338 |
++#include "imgui/imgui.h" |
339 |
+ |
340 |
+ #include "AtlasSimbiconWorldNode.hpp" |
341 |
+ |
342 |
+--- a/examples/box_stacking/main.cpp |
343 |
++++ b/examples/box_stacking/main.cpp |
344 |
+@@ -33,7 +33,7 @@ |
345 |
+ #include <iostream> |
346 |
+ |
347 |
+ #include <dart/dart.hpp> |
348 |
+-#include <dart/external/imgui/imgui.h> |
349 |
++#include "imgui/imgui.h" |
350 |
+ #include <dart/gui/osg/osg.hpp> |
351 |
+ #include <dart/utils/utils.hpp> |
352 |
+ |
353 |
+--- a/examples/fetch/main.cpp |
354 |
++++ b/examples/fetch/main.cpp |
355 |
+@@ -32,7 +32,7 @@ |
356 |
+ |
357 |
+ #include <dart/collision/bullet/bullet.hpp> |
358 |
+ #include <dart/dart.hpp> |
359 |
+-#include <dart/external/imgui/imgui.h> |
360 |
++#include "imgui/imgui.h" |
361 |
+ #include <dart/gui/osg/osg.hpp> |
362 |
+ #include <dart/utils/utils.hpp> |
363 |
+ |
364 |
+--- a/examples/heightmap/main.cpp |
365 |
++++ b/examples/heightmap/main.cpp |
366 |
+@@ -33,7 +33,7 @@ |
367 |
+ #include <cmath> |
368 |
+ |
369 |
+ #include <dart/dart.hpp> |
370 |
+-#include <dart/external/imgui/imgui.h> |
371 |
++#include "imgui/imgui.h" |
372 |
+ #include <dart/gui/osg/osg.hpp> |
373 |
+ #include <dart/utils/urdf/urdf.hpp> |
374 |
+ #include <dart/utils/utils.hpp> |
375 |
+--- a/examples/imgui/main.cpp |
376 |
++++ b/examples/imgui/main.cpp |
377 |
+@@ -31,7 +31,7 @@ |
378 |
+ */ |
379 |
+ |
380 |
+ #include <dart/dart.hpp> |
381 |
+-#include <dart/external/imgui/imgui.h> |
382 |
++#include "imgui/imgui.h" |
383 |
+ #include <dart/gui/osg/osg.hpp> |
384 |
+ |
385 |
+ //============================================================================== |
386 |
+--- a/examples/point_cloud/main.cpp |
387 |
++++ b/examples/point_cloud/main.cpp |
388 |
+@@ -33,7 +33,7 @@ |
389 |
+ #include <cmath> |
390 |
+ |
391 |
+ #include <dart/dart.hpp> |
392 |
+-#include <dart/external/imgui/imgui.h> |
393 |
++#include "imgui/imgui.h" |
394 |
+ #include <dart/gui/osg/osg.hpp> |
395 |
+ #include <dart/utils/urdf/urdf.hpp> |
396 |
+ #include <dart/utils/utils.hpp> |
397 |
+--- a/examples/tinkertoy/TinkertoyWidget.cpp |
398 |
++++ b/examples/tinkertoy/TinkertoyWidget.cpp |
399 |
+@@ -38,7 +38,7 @@ |
400 |
+ |
401 |
+ #include "TinkertoyWidget.hpp" |
402 |
+ |
403 |
+-#include "dart/external/imgui/imgui.h" |
404 |
++#include "imgui/imgui.h" |
405 |
+ |
406 |
+ #include "TinkertoyWorldNode.hpp" |
407 |
+ |
408 |
|
409 |
diff --git a/sci-libs/dart/metadata.xml b/sci-libs/dart/metadata.xml |
410 |
index 486eef082..2d537d0c1 100644 |
411 |
--- a/sci-libs/dart/metadata.xml |
412 |
+++ b/sci-libs/dart/metadata.xml |
413 |
@@ -13,6 +13,7 @@ |
414 |
<flag name="bullet">Bullet Collision Detector Support</flag> |
415 |
<flag name="examples">Build the examples</flag> |
416 |
<flag name="extras">Build the experimental projects that are derived from the core DART project</flag> |
417 |
+ <flag name="gui">OpenSceneGraph GUI</flag> |
418 |
<flag name="ipopt">IPopt Optimization Support</flag> |
419 |
<flag name="nlopt">NLopt Optimization Support</flag> |
420 |
<flag name="ode">ODE Collision Detector Support</flag> |