sci-libs/dart: respect LDFLAGS

Closes: https://bugs.gentoo.org/791418
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-09-07 12:44:49 +02:00
parent df3ff1d923
commit bc0713ed1c
3 changed files with 19 additions and 6 deletions

View File

@@ -14,10 +14,12 @@ 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 +ipopt +nlopt ode openscenegraph python test tutorials urdfdom"
IUSE="bullet doc examples extras glut +ipopt +nlopt ode openscenegraph python test tests tutorials urdfdom"
#TODO: pagmo
#TODO: unbundle imgui
RESTRICT="!test? ( test )"
PATCHES=( "${FILESDIR}/${PN}-respect-ldflags.patch" )
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
@@ -28,7 +30,6 @@ RDEPEND="
app-arch/lz4
>=dev-cpp/eigen-3.0.5
dev-libs/boost
dev-libs/tinyxml
dev-libs/tinyxml2
>=sci-libs/libccd-2.0
>=media-libs/assimp-3.0.0
@@ -76,10 +77,10 @@ src_configure() {
src_compile() {
cmake_src_compile
use examples && cmake_src_compile examples
# use python && cmake_src_compile dartpy
# use test && cmake_src_compile tests
# use tutorials && cmake_src_compile tutorials
use examples && cmake_build examples
use python && cmake_build dartpy # no work to do ...
use test && cmake_build tests
use tutorials && cmake_build tutorials
}
src_install() {

View File

@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -220,7 +220,7 @@
endif()
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_DEBUG} -pg")
- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
# Enforce to colorize compilation output
if(${DART_FORCE_COLORED_OUTPUT})

View File

@@ -17,6 +17,7 @@
<flag name="nlopt">NLopt Optimization Support</flag>
<flag name="ode">ODE Collision Detector Support</flag>
<flag name="openscenegraph">OpenSceneGraph GUI and examples</flag>
<flag name="tests">Build the tests</flag>
<flag name="tutorials">Build the tutorials</flag>
<flag name="urdfdom">URDF parser</flag>
</use>