7eb860b1a9
Updated sys-kernel/linux-sabayon-sources-2.6.32 to provide compatiblity with the sys-kernel/linux-sabayon package, and provided an additional USE flag (sources_standalone) to toggle included files to provide a working set of kernel sources that doesn't have file collisions with the sys-kernel/linux-sabayon package. The default for the "sources_standalone" USE flage is disabled, which will provide a dependency on sys-kernel/linux-sabayon-2.6.32. This is the desired behavior for an entropy build of this package.
48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
# Copyright 2004-2009 Sabayon Linux
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
ETYPE="sources"
|
|
K_WANT_GENPATCHES=""
|
|
K_GENPATCHES_VER=""
|
|
K_SABPATCHES_VER="2"
|
|
K_SABKERNEL_NAME="sabayon"
|
|
inherit sabayon-kernel
|
|
KEYWORDS="~amd64 ~x86"
|
|
DESCRIPTION="Official Sabayon Linux Standard kernel sources"
|
|
RESTRICT="mirror"
|
|
IUSE="sources_standalone"
|
|
|
|
DEPEND="${DEPEND}
|
|
sources_standalone? ( !=sys-kernel/linux-sabayon-${PVR} )
|
|
!sources_standalone? ( =sys-kernel/linux-sabayon-${PVR} )"
|
|
|
|
src_compile() {
|
|
kernel-2_src_compile
|
|
}
|
|
|
|
### override sabayon-kernel-src_install()
|
|
src_install() {
|
|
|
|
local version_h_name="usr/src/linux-${KV_FULL}/include/linux"
|
|
local version_h="${ROOT}${version_h_name}"
|
|
if [ -f "${version_h}" ]; then
|
|
einfo "Discarding previously installed version.h to avoid collisions"
|
|
addwrite "/${version_h_name}"
|
|
rm -f "${version_h}"
|
|
fi
|
|
|
|
kernel-2_src_install
|
|
cd "${D}/usr/src/linux-${KV_FULL}"
|
|
local oldarch=${ARCH}
|
|
cp ${FILESDIR}/${P}-${ARCH}.config .config || die "cannot copy kernel config"
|
|
unset ARCH
|
|
if ! use sources_standalone; then
|
|
make modules_prepare || die "failed to run modules_prepare"
|
|
rm .config || die "cannot remove .config"
|
|
rm Makefile || die "cannot remove Makefile"
|
|
rm include/linux/version.h || die "cannot remove include/linux/version.h"
|
|
fi
|
|
ARCH=${oldarch}
|
|
|
|
}
|