From 2abf30836637bab5221636f13c3347b470fbca99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Veyret?= Date: Sun, 10 Jul 2016 08:38:54 +0200 Subject: [PATCH] sys-boot/refind: use flags for rEFInd, bug #566930 --- sys-boot/refind/metadata.xml | 45 +++++++++++++++++++++++++++++------- sys-boot/refind/refind-0.10.2.ebuild | 29 ++++++++++++++++++----- 2 files changed, 60 insertions(+), 14 deletions(-) diff --git a/sys-boot/refind/metadata.xml b/sys-boot/refind/metadata.xml index a5bf904..0d50b4f 100644 --- a/sys-boot/refind/metadata.xml +++ b/sys-boot/refind/metadata.xml @@ -1,4 +1,4 @@ - + @@ -6,16 +6,44 @@ Sam Jorna - sveyret@gmail.com - Stephane Veyret + sveyret@gmail.com + Stéphane Veyret Proxy - Maintainer.CC on bugs - + - proxy-maint@gentoo.org - Proxy Maintainers + proxy-maint@gentoo.org + Proxy Maintainers - EFI Boot Manager - Gestionnaire d'amorçage EFI + +A graphical boot manager for EFI- and UEFI-based computers, such as all +Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a +boot menu showing all the EFI boot loaders on the EFI-accessible +partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot +entries on UEFI PCs with CSMs. EFI-compatbile OSes, including Linux, +provide boot loaders that rEFInd can detect and launch. rEFInd can launch +Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and +later kernels with EFI stub support. EFI filesystem drivers for ext2/3/4fs, +ReiserFS, Btrfs, NTFS, HFS+, and ISO-9660 enable rEFInd to read boot +loaders from these filesystems, too. rEFInd's ability to detect boot +loaders at runtime makes it very easy to use, particularly when paired with +Linux kernels that provide EFI stub support. + + +Un gestionnaire d'amorçage pour ordinateur EFI ou UEFI tel que tous les Macs +contenant un processeur Intel et les PC récents (2011 et après). rEFInd affiche +un menu d'amorçage montrant tous les gestionnaires d'amorçage sur les +partitions EFI accessibles et optionnellement les partitions démarrable en BIOS +sur Macs et les entrées BIOS sur les PC UEFI avec CSM. Les systèmes +d'exploitation compatibles EFI, incluant Linux, fournissent des gestionnaires +d'amorçage que rEFInd détect et démarre. rEFInd peut démarrer les gestionnaires +d'amorçage EFI Linux tel que ELILO, GRUB Legacy, GRUB 2 ainsi que les noyaux +3.3.0 et suivants avec le support EFI stub. Les pilotes EFI pour les sytèmes de +fichiers ext2/3/4fs, ReiserFS, Btrfs, NTFS, HFS+ et ISO-9660 permettent à +rEFInd de lire les gestionnaires d'amorçage également depuis ces systèmes de +fichiers. La capacité de rEFInd à détecter les gestionnaires d'amorçage au +moment de l'exécution le rend très facile à utiliser, en particulier associé à +des noyau Linux qui fournissent un support EFI stub. + Builds the EFI binary ext2 filesystem driver Builds the EFI binary ext4 filesystem driver @@ -40,3 +68,4 @@ refind + diff --git a/sys-boot/refind/refind-0.10.2.ebuild b/sys-boot/refind/refind-0.10.2.ebuild index db4455b..7bc07d7 100644 --- a/sys-boot/refind/refind-0.10.2.ebuild +++ b/sys-boot/refind/refind-0.10.2.ebuild @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 +EAPI=6 -inherit eutils +inherit eutils toolchain-funcs flag-o-matic DESCRIPTION="The rEFInd UEFI Boot Manager by Rod Smith" HOMEPAGE="http://www.rodsbooks.com/refind/" @@ -40,9 +40,27 @@ pkg_setup() { } src_compile() { + # Prepare flags + append-cflags "-fno-strict-aliasing" "-fno-stack-protector" "-fshort-wchar" "-Wall" + + local make_flags=( + ARCH="${BUILDARCH}" + GENFW="/usr/bin/GenFw" + CC="$(tc-getCC)" + AS="$(tc-getAS)" + LD="$(tc-getLD)" + AR="$(tc-getAR)" + RANLIB="$(tc-getRANLIB)" + OBJCOPY="$(tc-getOBJCOPY)" + CFLAGS="${CFLAGS}" + LDFLAGS="${LDFLAGS}" + GNUEFI_LDFLAGS="-T \$(GNUEFI_LDSCRIPT) -shared -nostdlib -Bsymbolic \ + -L\$(EFILIB) -L\$(GNUEFILIB) \$(CRTOBJS) -znocombreloc -zdefs" + ) + # Make main EFI - all_target=gnuefi - emake ARCH=${BUILDARCH} ${all_target} + export all_target=gnuefi + emake "${make_flags[@]}" ${all_target} # Make filesystem drivers export gnuefi_target="_gnuefi" @@ -50,8 +68,7 @@ src_compile() { fs=${fs#+} if use "${fs}"; then einfo "Building ${fs} filesystem driver" - rm -f "${S}/filesystems/fsw_efi.o" - emake -C "${S}/filesystems" ARCH=${BUILDARCH} ${fs}${gnuefi_target} + emake "${make_flags[@]}" -C "${S}/filesystems" ${fs}${gnuefi_target} fi done } -- 2.7.3