mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
Closes: https://github.com/gentoo/gentoo/pull/35759 Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com> Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
21 lines
881 B
Diff
21 lines
881 B
Diff
test-suite: set ROOT_INCLUDE_PATH if builddir is passed
|
|
|
|
Bug: https://github.com/vmc-project/geant4_vmc/pull/60
|
|
|
|
--- a/examples/test_suite.sh
|
|
+++ b/examples/test_suite.sh
|
|
@@ -193,8 +193,12 @@ fi
|
|
|
|
# Set path to shared libraries if --builddir is provided via the option
|
|
if [ "x${BUILDDIR}" != "x" ]; then
|
|
- LIBS_FROM_BUILDDIR=$(find ${BUILDDIR} -iname "*.so" -exec dirname {} \; | tr '\r\n' ':')
|
|
+ LIBS_FROM_BUILDDIR=$(find ${BUILDDIR} -iname "*.so" -exec dirname {} \; | uniq | tr '\r\n' ':')
|
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBS_FROM_BUILDDIR}
|
|
+ # In that case, also use headers from matching source dirs.
|
|
+ SOURCEDIR=$(readlink -f ../source/)
|
|
+ HEADERS_FROM_SOURCEDIR=$(find ${SOURCEDIR} -iname "*.h" -exec dirname {} \; | uniq | tr '\r\n' ':')
|
|
+ export ROOT_INCLUDE_PATH=${ROOT_INCLUDE_PATH}:${HEADERS_FROM_SOURCEDIR}
|
|
fi
|
|
|
|
# Create tmp dir from scratch
|