# Copyright 1999-2015 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" IUSE="+build-kernel debug dtrace zfs" # Security Advisory and Errata patches. UPSTREAM_PATCHES=( "SA-16:01/sctp.patch" "SA-16:03/linux.patch" "SA-16:04/linux.patch" "SA-16:05/tcp.patch" "SA-16:10/linux.patch" "SA-16:15/sysarch.patch" "EN-15:19/kqueue.patch" "EN-15:20/vm.patch" "EN-16:01/filemon.patch" "EN-16:02/pf-10.2.patch" "EN-16:04/hyperv.patch" "EN-16:05/hv_netvsc.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 }