# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 inherit bsdmk freebsd flag-o-matic toolchain-funcs DESCRIPTION="FreeBSD kernel sources" SLOT="0" LICENSE="BSD dtrace? ( CDDL ) zfs? ( CDDL )" IUSE="+build-kernel debug dtrace zfs" # Security Advisory and Errata patches. UPSTREAM_PATCHES=( "SA-16:15/sysarch-01.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}" # hyperv fails to compile on x86-fbsd. if use x86-fbsd && [[ $(tc-getCC) == *gcc* ]] ; then echo 'nodevice hyperv' >> "${conf}" dummy_mk modules/hyperv fi # 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 }