Lines 9-15
inherit bsdmk freebsd flag-o-matic toolchain-funcs
Link Here
|
9 |
DESCRIPTION="FreeBSD kernel sources" |
9 |
DESCRIPTION="FreeBSD kernel sources" |
10 |
SLOT="0" |
10 |
SLOT="0" |
11 |
|
11 |
|
12 |
IUSE="+build-generic dtrace profile" |
12 |
IUSE="+build-generic debug dtrace profile zfs" |
13 |
|
13 |
|
14 |
if [[ ${PV} != *9999* ]]; then |
14 |
if [[ ${PV} != *9999* ]]; then |
15 |
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
15 |
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
Lines 29-35
RESTRICT="strip binchecks"
Link Here
|
29 |
|
29 |
|
30 |
S="${WORKDIR}/sys" |
30 |
S="${WORKDIR}/sys" |
31 |
|
31 |
|
32 |
KERN_BUILD=GENERIC |
32 |
KERN_BUILD=GENTOO |
33 |
|
33 |
|
34 |
PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch" |
34 |
PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch" |
35 |
"${FILESDIR}/${PN}-9.2-gentoo.patch" |
35 |
"${FILESDIR}/${PN}-9.2-gentoo.patch" |
Lines 42-48
PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch"
Link Here
|
42 |
"${FILESDIR}/${PN}-9.2-gentoo-gcc.patch" |
42 |
"${FILESDIR}/${PN}-9.2-gentoo-gcc.patch" |
43 |
"${FILESDIR}/${PN}-7.0-tmpfs_whiteout_stub.patch" ) |
43 |
"${FILESDIR}/${PN}-7.0-tmpfs_whiteout_stub.patch" ) |
44 |
|
44 |
|
|
|
45 |
pkg_setup() { |
46 |
use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL=" |
47 |
} |
48 |
|
45 |
src_prepare() { |
49 |
src_prepare() { |
|
|
50 |
local conf="${S}/$(tc-arch-kernel)/conf/${KERN_BUILD}" |
51 |
|
46 |
# This replaces the gentoover patch, it doesn't need reapply every time. |
52 |
# This replaces the gentoover patch, it doesn't need reapply every time. |
47 |
sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \ |
53 |
sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \ |
48 |
-e 's:^BRANCH=.*:BRANCH="Gentoo":' \ |
54 |
-e 's:^BRANCH=.*:BRANCH="Gentoo":' \ |
Lines 60-65
src_prepare() {
Link Here
|
60 |
-i "${S}/conf/kern.pre.mk" \ |
66 |
-i "${S}/conf/kern.pre.mk" \ |
61 |
-i "${S}/conf/kmod.mk" || die |
67 |
-i "${S}/conf/kmod.mk" || die |
62 |
|
68 |
|
|
|
69 |
# Set the kernel configuration using USE flags. |
70 |
cp -f "${FILESDIR}/config-GENTOO" "${conf}" || die |
71 |
use debug || echo 'nomakeoptions DEBUG' >> "${conf}" |
72 |
use dtrace || echo 'nomakeoptions WITH_CTF' >> "${conf}" |
73 |
|
63 |
# Only used with USE=build-generic, let the kernel build with its own flags, its safer. |
74 |
# Only used with USE=build-generic, let the kernel build with its own flags, its safer. |
64 |
unset LDFLAGS CFLAGS CXXFLAGS ASFLAGS KERNEL |
75 |
unset LDFLAGS CFLAGS CXXFLAGS ASFLAGS KERNEL |
65 |
} |
76 |
} |
Lines 74-85
src_configure() {
Link Here
|
74 |
|
85 |
|
75 |
src_compile() { |
86 |
src_compile() { |
76 |
if use build-generic ; then |
87 |
if use build-generic ; then |
77 |
local myconf |
|
|
78 |
use dtrace || myconf="-DNO_CTF " |
79 |
|
80 |
cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die |
88 |
cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die |
81 |
freebsd_src_compile depend ${myconf} |
89 |
freebsd_src_compile depend |
82 |
freebsd_src_compile ${myconf} |
90 |
freebsd_src_compile |
83 |
else |
91 |
else |
84 |
einfo "Nothing to compile.." |
92 |
einfo "Nothing to compile.." |
85 |
fi |
93 |
fi |