1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit bsdmk freebsd flag-o-matic
9 DESCRIPTION="FreeBSD's bootloader"
11 KEYWORDS="~sparc-fbsd ~x86-fbsd"
13 IUSE="bzip2 ieee1394 tftp zfs"
15 SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
18 DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}*
19 =sys-freebsd/freebsd-lib-${RV}*"
21 S="${WORKDIR}/sys/boot"
23 PATCHES=( "${FILESDIR}"/${P}-zfsboot-makefile.patch )
26 use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\""
30 boot0_use_enable ieee1394 FIREWIRE
31 boot0_use_enable zfs ZFS
32 boot0_use_enable tftp TFTP
33 boot0_use_enable bzip2 BZIP2
37 sed -e '/-fomit-frame-pointer/d' -e '/-mno-align-long-strings/d' \
38 -i "${S}"/i386/boot2/Makefile \
39 -i "${S}"/i386/gptboot/Makefile \
40 -i "${S}"/i386/gptzfsboot/Makefile \
41 -i "${S}"/i386/zfsboot/Makefile || die
46 append-flags "-I/usr/include/libstand/"
47 append-flags "-fno-strict-aliasing"
48 NOFLAGSTRIP="yes" freebsd_src_compile
53 mkinstall FILESDIR=/boot || die "mkinstall failed"