build-style/scons: use --install-sandbox for $DESTDIR
See https://scons.org/doc/production/HTML/scons-user.html#b-Install Some projects uses --prefix=$DESTDIR/usr must be fixed.
This commit is contained in:
parent
7b453245eb
commit
3936763f57
|
@ -9,18 +9,27 @@ do_build() {
|
|||
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
|
||||
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
|
||||
RANLIB="$RANLIB" ranlib="$RANLIB" \
|
||||
prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR} \
|
||||
prefix=/usr \
|
||||
${scons_use_destdir:+DESTDIR="${DESTDIR}"} \
|
||||
${scons_use_destdir:+destdir="${DESTDIR}"} \
|
||||
${make_build_args} ${make_build_target}
|
||||
}
|
||||
do_install() {
|
||||
: ${make_cmd:=scons}
|
||||
: ${make_install_target:=install}
|
||||
|
||||
local _sandbox=
|
||||
|
||||
if [ -z "$scons_use_destdir" ]; then _sandbox=yes ; fi
|
||||
|
||||
${make_cmd} ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \
|
||||
cc=$CC cxx=$CXX ccflags="$CFLAGS" \
|
||||
CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \
|
||||
cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \
|
||||
RANLIB="$RANLIB" ranlib="$RANLIB" \
|
||||
prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR} \
|
||||
prefix=/usr \
|
||||
${scons_use_destdir:+DESTDIR="${DESTDIR}"} \
|
||||
${scons_use_destdir:+destdir="${DESTDIR}"} \
|
||||
${_sandbox:+--install-sandbox="${DESTDIR}"} \
|
||||
${make_install_args} ${make_install_target}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue