Index: kernel-2.eclass =================================================================== RCS file: /home/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v retrieving revision 1.32 diff -u -b -B -r1.32 kernel-2.eclass --- kernel-2.eclass 14 Mar 2004 06:43:16 -0000 1.32 +++ kernel-2.eclass 18 Mar 2004 07:21:30 -0000 @@ -98,6 +98,33 @@ echo ">>> version.h compiled successfully." } +unpack_2_6() { + cd ${S} + # Part of the new magic to put output files seperate from + # source files! (see bug #32737!) + + # Only do some magic if a KBUILD_OUTPUT_PREFIX is set + if [ -n "${KBUILD_OUTPUT_PREFIX}" ] + then + local koutput="`echo ${KBUILD_OUTPUT_PREFIX} | tr -s /`/${KV}" + # We let the makefile figure the version on the fly + # So we really only want to configure the prefix here + local KOmakefile="`echo ${KBUILD_OUTPUT_PREFIX} | tr -s /`/\$(VERSION).\$(PATCHLEVEL).\$(SUBLEVEL)\$(EXTRAVERSION)" + mkdir -p ${koutput} + einfo "Setting kernel output directory to ${koutput}" + mv Makefile ${T}/Makefile + # Add the KBUILD_OUTPUT variable after the EXTRAVERSION line + sed -e "s:^\(EXTRAVERSION.*\):\1\nKBUILD_OUTPUT=${KOmakefile}\n:" \ + ${T}/Makefile > Makefile + else + ewarn "You've elected not to use Gentoo's new 'koutput' feature." + ewarn "As a result, some kernel modules will require /usr/src/linux" + ewarn "to be writable by portage, which is a security concern." + ## FIXME - path to doc!!! + ewarn "For more info on enabling koutput, see http://dev.gentoo.org/~latexer/2.6-koutput-user.html" + fi +} + universal_unpack() { # remove all backup files find . -iname "*~" -exec rm {} \; 2> /dev/null @@ -559,6 +586,7 @@ [ -n "${UNIPATCH_LIST}" -o -n "${UNIPATCH_LIST_DEFAULT}" ] && unipatch "${UNIPATCH_LIST_DEFAULT} ${UNIPATCH_LIST}" [ -z "${K_NOSETEXTRAVERSION}" ] && unpack_set_extraversion [ $(kernel_is_2_4) $? == 0 ] && unpack_2_4 + [ $(kernel_is_2_6) $? == 0 ] && unpack_2_6 } src_compile() {