- # We do not want portage's install root ($D) present. Check only for
- # this if the .la is being installed.
- if test "$installed" = yes && test "$D"; then
- eval mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`"
- else
- mynewdependency_lib="$libdir/$name"
- fi
- # Do not add duplicates
- if test "$mynewdependency_lib"; then
- if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
- newdependency_libs="$newdependency_libs $mynewdependency_lib"
- fi
- fi
- ;;
- *)
- if test "$installed" = yes; then
- # Rather use S=WORKDIR if our version of portage supports it.
- # This is because some ebuild (gcc) do not use $S as buildroot.
- if test "$PWORKDIR"; then
- S="$PWORKDIR"
- fi
- # We do not want portage's build root ($S) present.
- if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then
- mynewdependency_lib=""
- # We do not want portage's install root ($D) present.
- elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then
- eval mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`"
- else
- mynewdependency_lib="$deplib"
- fi
- else
- mynewdependency_lib="$deplib"
- fi
- # Do not add duplicates
- if test "$mynewdependency_lib"; then
- if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
- newdependency_libs="$newdependency_libs $mynewdependency_lib"
- fi
- fi