@@ -, +, @@ --- eclass/kernel-2.eclass | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) --- a/eclass/kernel-2.eclass +++ a/eclass/kernel-2.eclass @@ -1452,15 +1452,12 @@ kernel-2_src_unpack() { # fix a problem on ppc where TOUT writes to /usr/src/linux breaking sandbox # only do this for kernel < 2.6.27 since this file does not exist in later # kernels - if [[ -n ${KV_MINOR} ]] && ver_test ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} -lt 2.6.27; then - sed -i \ - -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \ - "${S}"/arch/ppc/Makefile - else - sed -i \ - -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \ - "${S}"/arch/powerpc/Makefile - fi + local ppc_makefile="${S}"/arch/powerpc/Makefile + [[ -n ${KV_MINOR} ]] && ver_test ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} -lt 2.6.27 && \ + ppc_makefile="${S}"/arch/ppc/Makefile + sed -i \ + -e 's|^\(TOUT.*:= \)\(\.tmp_gas_check\)|\1$(addsuffix /,$(T))\2|' \ + "${ppc_makefile}" } # @FUNCTION: kernel-2_src_prepare --