| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/boot0-8.2.ebuild,v 1.1 2011/07/06 05:42:56 aballier Exp $
|
| 4 |
|
| 5 |
EAPI=2
|
| 6 |
|
| 7 |
inherit bsdmk freebsd flag-o-matic
|
| 8 |
|
| 9 |
DESCRIPTION="FreeBSD's bootloader"
|
| 10 |
SLOT="0"
|
| 11 |
KEYWORDS="~sparc-fbsd ~x86-fbsd"
|
| 12 |
|
| 13 |
IUSE="bzip2 ieee1394 tftp zfs"
|
| 14 |
|
| 15 |
SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
|
| 16 |
|
| 17 |
RDEPEND=""
|
| 18 |
DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}*
|
| 19 |
=sys-freebsd/freebsd-lib-${RV}*"
|
| 20 |
|
| 21 |
S="${WORKDIR}/sys/boot"
|
| 22 |
|
| 23 |
PATCHES=( "${FILESDIR}"/${P}-zfsboot-makefile.patch )
|
| 24 |
|
| 25 |
boot0_use_enable() {
|
| 26 |
use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\""
|
| 27 |
}
|
| 28 |
|
| 29 |
pkg_setup() {
|
| 30 |
boot0_use_enable ieee1394 FIREWIRE
|
| 31 |
boot0_use_enable zfs ZFS
|
| 32 |
boot0_use_enable tftp TFTP
|
| 33 |
boot0_use_enable bzip2 BZIP2
|
| 34 |
}
|
| 35 |
|
| 36 |
src_prepare() {
|
| 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
|
| 42 |
}
|
| 43 |
|
| 44 |
src_compile() {
|
| 45 |
strip-flags
|
| 46 |
append-flags "-I/usr/include/libstand/"
|
| 47 |
append-flags "-fno-strict-aliasing"
|
| 48 |
NOFLAGSTRIP="yes" freebsd_src_compile
|
| 49 |
}
|
| 50 |
|
| 51 |
src_install() {
|
| 52 |
dodir /boot/defaults
|
| 53 |
mkinstall FILESDIR=/boot || die "mkinstall failed"
|
| 54 |
}
|