diff options
author | Yuta Satoh <nigoro.dev@gmail.com> | 2017-09-18 20:35:57 +0900 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-10-02 10:56:07 +0200 |
commit | c4e6110acc43e8b8148cfeafa9c441ecb0c2a9e0 (patch) | |
tree | 4f460d123f56875adfa04b36003666278d4b114c /sys-freebsd/boot0/boot0-11.1.ebuild | |
parent | eclass/freebsd.eclass: use install.sh when upgrading. (diff) | |
download | gentoo-c4e6110acc43e8b8148cfeafa9c441ecb0c2a9e0.tar.gz gentoo-c4e6110acc43e8b8148cfeafa9c441ecb0c2a9e0.tar.bz2 gentoo-c4e6110acc43e8b8148cfeafa9c441ecb0c2a9e0.zip |
sys-freebsd: bump to 11.1
The following bugs have been fixed:
- merged freebsd-libexec into freebsd-lib. #629166
- fix build failure with gcc-6. #629368
Diffstat (limited to 'sys-freebsd/boot0/boot0-11.1.ebuild')
-rw-r--r-- | sys-freebsd/boot0/boot0-11.1.ebuild | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/sys-freebsd/boot0/boot0-11.1.ebuild b/sys-freebsd/boot0/boot0-11.1.ebuild new file mode 100644 index 000000000000..2f95e76f3e23 --- /dev/null +++ b/sys-freebsd/boot0/boot0-11.1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2017 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's bootloader" +SLOT="0" + +IUSE="bzip2 ieee1394 tftp zfs" + +# Security Advisory and Errata patches. +# UPSTREAM_PATCHES=() + +if [[ ${PV} != *9999* ]]; then + KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" + SRC_URI="${SRC_URI} + $(freebsd_upstream_patches)" +fi + +EXTRACTONLY=" + sys/ + lib/ + contrib/bzip2/ + contrib/zlib/ +" + +RDEPEND="" +DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}* + =sys-freebsd/freebsd-lib-${RV}*" + +S="${WORKDIR}/sys/boot" + +PATCHES=( "${FILESDIR}/${PN}-11.0-gcc46.patch" + "${FILESDIR}/${PN}-add-nossp-cflags.patch" ) + +boot0_use_enable() { + use ${1} && mymakeopts="${mymakeopts} LOADER_${2}_SUPPORT=\"yes\"" + use ${1} || mymakeopts="${mymakeopts} WITHOUT_${2}= " +} + +pkg_setup() { + boot0_use_enable ieee1394 FIREWIRE + boot0_use_enable zfs ZFS + boot0_use_enable tftp TFTP + boot0_use_enable bzip2 BZIP2 +} + +src_prepare() { + sed -e '/-mno-align-long-strings/d' \ + -i "${S}"/i386/boot2/Makefile \ + -i "${S}"/i386/gptboot/Makefile \ + -i "${S}"/i386/gptzfsboot/Makefile \ + -i "${S}"/i386/zfsboot/Makefile || die + + mymakeopts="${mymakeopts} LOADER_NO_GELI_SUPPORT=yes" + export MAKEOBJDIRPREFIX="${WORKDIR}/build" +} + +src_compile() { + strip-flags + append-flags "-fno-strict-aliasing" + + cd "${WORKDIR}/lib/libstand" || die + freebsd_src_compile + + CFLAGS="${CFLAGS} -I${WORKDIR}/lib/libstand" + LDFLAGS="${LDFLAGS} -L${MAKEOBJDIRPREFIX}/${WORKDIR}/lib/libstand" + export LIBSTAND="${MAKEOBJDIRPREFIX}/${WORKDIR}/lib/libstand/libstand.a" + + cd "${S}" || die + NOFLAGSTRIP="yes" freebsd_src_compile +} + +src_install() { + dodir /boot/defaults + freebsd_src_install FILESDIR=/boot + + cd "${WORKDIR}/sys/$(tc-arch-kernel)/conf" || die + insinto /boot + newins GENERIC.hints device.hints + + echo 'CONFIG_PROTECT="/boot/device.hints"' > "${T}"/50boot0 + doenvd "${T}"/50boot0 +} |