[gentoo-commits] repo/proj/guru:dev commit in: sci-libs/dart/, sci-libs/dart/files/

2022-04-22 Thread Alessandro Barbieri
commit: 8983c9529f931d9e61c41e5d863b881d7cf95ac3
Author: Alessandro Barbieri  gmail  com>
AuthorDate: Sat Apr 23 00:52:47 2022 +
Commit: Alessandro Barbieri  gmail  com>
CommitDate: Sat Apr 23 01:52:55 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8983c952

sci-libs/dart: fix examples/tutorials installation

Signed-off-by: Alessandro Barbieri  gmail.com>

 .../{dart-6.12.1.ebuild => dart-6.12.1-r1.ebuild}  | 36 --
 .../files/dart-6.12.1-no-deprecated-examples.patch |  9 ++
 2 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/sci-libs/dart/dart-6.12.1.ebuild 
b/sci-libs/dart/dart-6.12.1-r1.ebuild
similarity index 83%
rename from sci-libs/dart/dart-6.12.1.ebuild
rename to sci-libs/dart/dart-6.12.1-r1.ebuild
index 9186f3021..58aa8a47e 100644
--- a/sci-libs/dart/dart-6.12.1.ebuild
+++ b/sci-libs/dart/dart-6.12.1-r1.ebuild
@@ -5,6 +5,8 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{8..10} )
 
+CMAKE_BUILD_TYPE="Release"
+
 inherit cmake python-single-r1
 
 DESCRIPTION="Dynamic Animation and Robotics Toolkit"
@@ -45,7 +47,7 @@ RDEPEND="
glut? ( media-libs/freeglut )
gui? (
dev-games/openscenegraph
-   media-libs/imgui:=[opengl(-)]
+   media-libs/imgui:=[glut(-)?,opengl(-)]
media-libs/lodepng:=
virtual/opengl
x11-libs/libXi
@@ -67,10 +69,7 @@ DEPEND="
dev-cpp/gtest
dev-libs/urdfdom_headers
)
-   test? (
-   dev-cpp/gtest
-   python? ( $(python_gen_cond_dep 
'dev-python/pytest[${PYTHON_USEDEP}]') )
-   )
+   test? ( dev-cpp/gtest )
urdfdom? ( dev-libs/urdfdom_headers )
 "
 BDEPEND="
@@ -81,6 +80,7 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 PATCHES=(
+   "${FILESDIR}/${P}-no-deprecated-examples.patch"
"${FILESDIR}/${PN}-respect-ldflags.patch"
"${FILESDIR}/${P}-respect-cflags.patch"
"${FILESDIR}/${P}-use-system-gtest.patch"
@@ -88,6 +88,7 @@ PATCHES=(
 )
 REQUIRED_USE="
examples? ( gui )
+   gui? ( glut )
python? (
${PYTHON_REQUIRED_USE}
gui
@@ -101,9 +102,11 @@ pkg_setup() {
 }
 
 src_prepare() {
-   # delete bundled gtest
+   # delete bundled libs
rm -r unittests/gtest || die
rm -r dart/external/{imgui,lodepng} || die
+   # delete deprecated examples
+   rm -r examples/deprecated_examples || die
dos2unix unittests/CMakeLists.txt || die
cmake_src_prepare
 }
@@ -135,9 +138,10 @@ src_configure() {
use cpu_flags_arm_iwmmxt2 && simd=ON
use cpu_flags_arm_neon && simd=ON
 
+   export ODE_DIR="${EPREFIX}/usr"
+
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-   -DCMAKE_BUILD_TYPE=Release
-DDART_CODECOV=OFF
-DDART_VERBOSE=ON
-DDART_TREAT_WARNINGS_AS_ERRORS=OFF
@@ -152,14 +156,26 @@ src_configure() {
 src_compile() {
cmake_src_compile
use examples && cmake_build examples
-   use python && cmake_build dartpy # no work to do ...
+   use python && cmake_build dartpy
use test && cmake_build tests
use tutorials && cmake_build tutorials
 }
 
 src_install() {
cmake_src_install
-   #TODO: python examples tests tutorials
-   mv "${ED}/usr/share/doc/dart" "${ED}/usr/share/doc/${PF}" || die
+   #TODO: python (?)
+   if ! use examples ; then
+   rm -rf "${ED}/usr/share/doc/dart/examples" || die
+   fi
+   if ! use tutorials ; then
+   rm -rf "${ED}/usr/share/doc/dart/tutorials" || die
+   fi
+   if use examples || use tutorials ; then
+   exeinto "/usr/libexec/${PN}"
+   doexe "${BUILD_DIR}"/bin/*
+   fi
+#  use python && cmake_build install-dartpy
+   mv "${ED}/usr/share/doc/dart/data" "${ED}/usr/share/${PN}" || die
+   mv "${ED}"/usr/share/doc/dart/* "${ED}/usr/share/doc/${PF}" || die
docompress -x "/usr/share/doc/${PF}"
 }

diff --git a/sci-libs/dart/files/dart-6.12.1-no-deprecated-examples.patch 
b/sci-libs/dart/files/dart-6.12.1-no-deprecated-examples.patch
new file mode 100644
index 0..a16045d94
--- /dev/null
+++ b/sci-libs/dart/files/dart-6.12.1-no-deprecated-examples.patch
@@ -0,0 +1,9 @@
+--- a/examples/CMakeLists.txt
 b/examples/CMakeLists.txt
+@@ -27,6 +27,3 @@
+ 
+ # MJCF model based examples
+ add_subdirectory(fetch)
+-
+-# Deprecated examples
+-add_subdirectory(deprecated_examples)



[gentoo-commits] repo/proj/guru:dev commit in: sci-libs/dart/, sci-libs/dart/files/

2022-03-27 Thread Alessandro Barbieri
commit: ef1f64452bc61dc3139696482eef10e875e331b9
Author: Alessandro Barbieri  gmail  com>
AuthorDate: Sun Mar 27 20:26:32 2022 +
Commit: Alessandro Barbieri  gmail  com>
CommitDate: Sun Mar 27 21:28:24 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ef1f6445

sci-libs/dart: add 6.12.1

Signed-off-by: Alessandro Barbieri  gmail.com>

 sci-libs/dart/Manifest |   1 +
 sci-libs/dart/dart-6.12.1.ebuild   | 162 +
 .../dart/files/dart-6.12.1-respect-cflags.patch|  11 ++
 .../dart/files/dart-6.12.1-use-system-gtest.patch  |  31 
 .../dart-6.12.1-use-system-lodepng-imgui.patch | 149 +++
 sci-libs/dart/metadata.xml |   1 +
 6 files changed, 355 insertions(+)

diff --git a/sci-libs/dart/Manifest b/sci-libs/dart/Manifest
index 461c20c15..46b234018 100644
--- a/sci-libs/dart/Manifest
+++ b/sci-libs/dart/Manifest
@@ -1 +1,2 @@
 DIST dart-6.10.1.tar.gz 15867405 BLAKE2B 
64c42ce1d808a88df53f4292df30c0bc58b52f864342ac0b353ad0496d41bd4986ad231cb08869058a16591350acf0fc0c12ae15d574d919c1c27f102028f608
 SHA512 
8abbf883628442ed5166e436349de8caaaf72a0ecfa88e75b986a550d617bd9b5df8ff32e32395e941ba12b7ad359be15b2ab2f566d99aa6c603bd0ebade1df0
+DIST dart-6.12.1.tar.gz 15990308 BLAKE2B 
d361dfad70745aa3747ea09f9f80a0b52051cb3e5d9a961995d469ab33086bf8d4068f95dbd4af8d0e2b23d5fbb0fa49dc63d823ffa52bbe750745093a6b54eb
 SHA512 
f386f646f13989dad66efbe126691553b280bf6441edad1c03059d6ae650384652da538edd3d27f3404ba76b9d6f9348e5b1c0998d7673e856cc488b91a677ff

diff --git a/sci-libs/dart/dart-6.12.1.ebuild b/sci-libs/dart/dart-6.12.1.ebuild
new file mode 100644
index 0..aac4ae640
--- /dev/null
+++ b/sci-libs/dart/dart-6.12.1.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake python-single-r1
+
+DESCRIPTION="Dynamic Animation and Robotics Toolkit"
+HOMEPAGE="
+   https://dartsim.github.io
+   https://github.com/dartsim/dart
+"
+SRC_URI="https://github.com/dartsim/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="bullet doc examples extras glut gui +ipopt +nlopt ode python test tests 
tutorials urdfdom
+cpu_flags_x86_mmx cpu_flags_x86_mmxext cpu_flags_x86_sse cpu_flags_x86_sse2 
cpu_flags_x86_sse3
+cpu_flags_x86_ssse3 cpu_flags_x86_sse4a cpu_flags_x86_sse4_1 
cpu_flags_x86_sse4_2 cpu_flags_x86_avx
+cpu_flags_x86_avx2 cpu_flags_x86_avx512dq cpu_flags_x86_avx512f 
cpu_flags_x86_avx512vl
+cpu_flags_x86_3dnow cpu_flags_x86_3dnowext cpu_flags_ppc_vsx 
cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3
+cpu_flags_ppc_altivec cpu_flags_arm_neon cpu_flags_arm_iwmmxt 
cpu_flags_arm_iwmmxt2 cpu_flags_arm_neon"
+#TODO: pagmo
+
+RDEPEND="
+   app-arch/lz4
+   >=dev-cpp/eigen-3.0.5
+   dev-libs/boost
+   dev-libs/tinyxml2
+   >=sci-libs/libccd-2.0
+   >=media-libs/assimp-3.0.0
+   >=sci-libs/fcl-0.2.9
+   sci-libs/flann
+   sci-libs/octomap
+
+   bullet? ( sci-physics/bullet )
+   examples? (
+   dev-cpp/tiny-dnn
+   dev-libs/urdfdom
+   )
+   extras? ( dev-libs/urdfdom )
+   glut? ( media-libs/freeglut )
+   gui? (
+   dev-games/openscenegraph
+   media-libs/imgui:=[opengl(-)]
+   media-libs/lodepng:=
+   virtual/opengl
+   x11-libs/libXi
+   x11-libs/libXmu
+   )
+   ipopt? ( sci-libs/ipopt )
+   nlopt? ( >=sci-libs/nlopt-2.4.1 )
+   ode? ( dev-games/ode )
+   python? (
+   ${PYTHON_DEPS}
+   $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
+   )
+   urdfdom? ( dev-libs/urdfdom )
+"
+DEPEND="
+   ${RDEPEND}
+   examples? ( dev-libs/urdfdom_headers )
+   extras? ( dev-libs/urdfdom_headers )
+   test? (
+   dev-cpp/gtest
+   python? ( $(python_gen_cond_dep 
'dev-python/pytest[${PYTHON_USEDEP}]') )
+   )
+   urdfdom? ( dev-libs/urdfdom_headers )
+"
+BDEPEND="
+   app-text/dos2unix
+   doc? ( app-doc/doxygen )
+   test? ( python? ( $(python_gen_cond_dep 
'dev-python/pytest[${PYTHON_USEDEP}]') ) )
+"
+
+RESTRICT="!test? ( test )"
+PATCHES=(
+   "${FILESDIR}/${PN}-respect-ldflags.patch"
+   "${FILESDIR}/${P}-respect-cflags.patch"
+   "${FILESDIR}/${P}-use-system-gtest.patch"
+   "${FILESDIR}/${P}-use-system-lodepng-imgui.patch"
+)
+REQUIRED_USE="
+   examples? ( gui )
+   python? (
+   ${PYTHON_REQUIRED_USE}
+   gui
+   )
+
+   || ( ipopt nlopt )
+"
+
+pkg_setup() {
+   use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+   # delete bundled gtest
+   rm -r unittests/gtest || die
+   rm -r dart/external/{imgui,lodepng} || die
+   dos2unix