# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 inherit bsdmk freebsd flag-o-matic toolchain-funcs DESCRIPTION="FreeBSD kernel sources" SLOT="0" LICENSE="BSD zfs? ( CDDL )" IUSE="+build-kernel debug dtrace zfs" # Security Advisory and Errata patches. UPSTREAM_PATCHES=( "SA-16:15/sysarch-01.patch" "SA-16:18/atkbd.patch" "SA-16:19/sendmsg.patch" "SA-16:20/linux.patch" "SA-16:21/stat.patch" "EN-16:07/ipi.patch" "EN-16:08/zfs.patch" "EN-16:11/vmbus.patch" "EN-16:12/hv_storvsc.patch" "EN-16:13/vmbus.patch" "EN-16:14/hv_storvsc.patch" "EN-16:15/vmbus.patch" "EN-16:16/hv_storvsc.patch" "EN-16:17/vm.patch" ) if [[ ${PV} != *9999* ]]; then KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" SRC_URI="${SRC_URI} $(freebsd_upstream_patches)" fi EXTRACTONLY=" sys/ contrib/bmake/ usr.bin/bmake/ " RDEPEND="dtrace? ( >=sys-freebsd/freebsd-cddl-9.2_rc1 ) =sys-freebsd/freebsd-mk-defs-${RV}* !sys-freebsd/virtio-kmod !sys-fs/fuse4bsd !> "${conf}" use dtrace || echo 'nomakeoptions WITH_CTF' >> "${conf}" # Only used with USE=build-kernel, let the kernel build with its own flags, its safer. unset LDFLAGS CFLAGS CXXFLAGS ASFLAGS KERNEL } src_configure() { if use build-kernel ; then tc-export CC cd "${S}/$(tc-arch-kernel)/conf" || die config ${KERN_BUILD} || die fi } src_compile() { if use build-kernel ; then if has_version "=sys-freebsd/freebsd-cddl-9.2_beta1' ; then ewarn "GENERIC config require sys-freebsd/freebsd-cddl. Please emerge it." fi }