Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 566930 | Differences between
and this patch

Collapse All | Expand All

(-)a/sys-boot/refind/metadata.xml (-8 / +39 lines)
Lines 1-4 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
2
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
<pkgmetadata>
3
<pkgmetadata>
4
	<maintainer type="person">
4
	<maintainer type="person">
Lines 6-21 Link Here
6
		<name>Sam Jorna</name>
6
		<name>Sam Jorna</name>
7
	</maintainer>
7
	</maintainer>
8
	<maintainer type="person">
8
	<maintainer type="person">
9
                <email>sveyret@gmail.com</email>
9
		<email>sveyret@gmail.com</email>
10
                <name>Stephane Veyret</name>
10
		<name>Stéphane Veyret</name>
11
		<description>Proxy - Maintainer.CC on bugs</description>
11
		<description>Proxy - Maintainer.CC on bugs</description>
12
        </maintainer>
12
	</maintainer>
13
	<maintainer type="project">
13
	<maintainer type="project">
14
                <email>proxy-maint@gentoo.org</email>
14
		<email>proxy-maint@gentoo.org</email>
15
                <name>Proxy Maintainers</name>
15
		<name>Proxy Maintainers</name>
16
	</maintainer>
16
	</maintainer>
17
	<longdescription lang="en">EFI Boot Manager</longdescription>
17
	<longdescription lang="en">
18
	<longdescription lang="fr">Gestionnaire d'amorçage EFI</longdescription>
18
A graphical boot manager for EFI- and UEFI-based computers, such as all
19
Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a
20
boot menu showing all the EFI boot loaders on the EFI-accessible
21
partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot
22
entries on UEFI PCs with CSMs. EFI-compatbile OSes, including Linux,
23
provide boot loaders that rEFInd can detect and launch. rEFInd can launch
24
Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and
25
later kernels with EFI stub support. EFI filesystem drivers for ext2/3/4fs,
26
ReiserFS, Btrfs, NTFS, HFS+, and ISO-9660 enable rEFInd to read boot
27
loaders from these filesystems, too. rEFInd's ability to detect boot
28
loaders at runtime makes it very easy to use, particularly when paired with
29
Linux kernels that provide EFI stub support.
30
	</longdescription>
31
	<longdescription lang="fr">
32
Un gestionnaire d'amorçage pour ordinateur EFI ou UEFI tel que tous les Macs
33
contenant un processeur Intel et les PC récents (2011 et après). rEFInd affiche
34
un menu d'amorçage montrant tous les gestionnaires d'amorçage sur les
35
partitions EFI accessibles et optionnellement les partitions démarrable en BIOS
36
sur Macs et les entrées BIOS sur les PC UEFI avec CSM. Les systèmes
37
d'exploitation compatibles EFI, incluant Linux, fournissent des gestionnaires
38
d'amorçage que rEFInd détect et démarre. rEFInd peut démarrer les gestionnaires
39
d'amorçage EFI Linux tel que ELILO, GRUB Legacy, GRUB 2 ainsi que les noyaux
40
3.3.0 et suivants avec le support EFI stub. Les pilotes EFI pour les sytèmes de
41
fichiers ext2/3/4fs, ReiserFS, Btrfs, NTFS, HFS+ et ISO-9660 permettent à
42
rEFInd de lire les gestionnaires d'amorçage également depuis ces systèmes de
43
fichiers. La capacité de rEFInd à détecter les gestionnaires d'amorçage au
44
moment de l'exécution le rend très facile à utiliser, en particulier associé à
45
des noyau Linux qui fournissent un support EFI stub.
46
	</longdescription>
19
	<use lang="en">
47
	<use lang="en">
20
		<flag name="ext2">Builds the EFI binary ext2 filesystem driver</flag>
48
		<flag name="ext2">Builds the EFI binary ext2 filesystem driver</flag>
21
		<flag name="ext4">Builds the EFI binary ext4 filesystem driver</flag>
49
		<flag name="ext4">Builds the EFI binary ext4 filesystem driver</flag>
Lines 24-29 Link Here
24
		<flag name="hfs">Builds the EFI binary hfs filesystem driver</flag>
52
		<flag name="hfs">Builds the EFI binary hfs filesystem driver</flag>
25
		<flag name="btrfs">Builds the EFI binary btrfs filesystem driver</flag>
53
		<flag name="btrfs">Builds the EFI binary btrfs filesystem driver</flag>
26
		<flag name="ntfs">Builds the EFI binary ntfs filesystem driver</flag>
54
		<flag name="ntfs">Builds the EFI binary ntfs filesystem driver</flag>
55
		<flag name="gnuefi">Compile using GNU-EFI instead of Tianocore</flag>
27
		<flag name="doc">Install document files</flag>
56
		<flag name="doc">Install document files</flag>
28
	</use>
57
	</use>
29
	<use lang="fr">
58
	<use lang="fr">
Lines 34-42 Link Here
34
		<flag name="hfs">Construire le gestionnaire EFI pour le système de fichier hfs</flag>
63
		<flag name="hfs">Construire le gestionnaire EFI pour le système de fichier hfs</flag>
35
		<flag name="btrfs">Construire le gestionnaire EFI pour le système de fichier btrfs</flag>
64
		<flag name="btrfs">Construire le gestionnaire EFI pour le système de fichier btrfs</flag>
36
		<flag name="ntfs">Construire le gestionnaire EFI pour le système de fichier ntfs</flag>
65
		<flag name="ntfs">Construire le gestionnaire EFI pour le système de fichier ntfs</flag>
66
		<flag name="gnuefi">Compiler en utilisant GNU-EFI au lieu de Tianocore</flag>
37
		<flag name="doc">Installer les fichiers de documentation</flag>
67
		<flag name="doc">Installer les fichiers de documentation</flag>
38
	</use>
68
	</use>
39
	<upstream>
69
	<upstream>
40
		<remote-id type="sourceforge">refind</remote-id>
70
		<remote-id type="sourceforge">refind</remote-id>
41
	</upstream>
71
	</upstream>
42
</pkgmetadata>
72
</pkgmetadata>
73
(-)a/sys-boot/refind/refind-0.10.2.ebuild (-10 / +67 lines)
Lines 2-10 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
3
# $Id$
4
4
5
EAPI=5
5
EAPI=6
6
6
7
inherit eutils
7
inherit eutils toolchain-funcs flag-o-matic
8
8
9
DESCRIPTION="The rEFInd UEFI Boot Manager by Rod Smith"
9
DESCRIPTION="The rEFInd UEFI Boot Manager by Rod Smith"
10
HOMEPAGE="http://www.rodsbooks.com/refind/"
10
HOMEPAGE="http://www.rodsbooks.com/refind/"
Lines 15-23 LICENSE="BSD GPL-2 GPL-3 FDL-1.3" Link Here
15
SLOT="0"
15
SLOT="0"
16
KEYWORDS="~amd64 ~x86"
16
KEYWORDS="~amd64 ~x86"
17
FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs"
17
FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs"
18
IUSE="${FS_USE} doc"
18
IUSE="${FS_USE} -gnuefi doc"
19
19
20
DEPEND=">=sys-boot/gnu-efi-3.0.2"
20
DEPEND="gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
21
	!gnuefi? ( >=sys-boot/udk-2015 )"
21
22
22
DOCS="NEWS.txt README.txt docs/refind docs/Styles"
23
DOCS="NEWS.txt README.txt docs/refind docs/Styles"
23
24
Lines 39-57 pkg_setup() { Link Here
39
	fi
40
	fi
40
}
41
}
41
42
43
src_prepare() {
44
	eapply_user
45
	for f in "${S}"/*/Make.tiano "${S}"/Make.common; do
46
		sed -i -e 's/^\(include .*target.txt.*\)$/#\1/' \
47
			-e 's@^\(TIANO_INCLUDE_DIRS\s*=\s*-I\s*\).*$@\1/usr/include/udk \\@' \
48
			-e '/^\s*-I \$(EDK2BASE).*$/d' \
49
			"${f}" || die "Failed to patch Tianocore make file in" \
50
			$(basename $(dirname ${f}))
51
	done
52
	for f in "${S}"/*/Make.tiano; do
53
		sed -i -e 's@^\(EFILIB\s*=\s*\).*$@\1/usr/lib@' \
54
			-e 's@\$(EFILIB).*/\([^/]*\).lib@-l\1@' \
55
			-e 's/\(--start-group\s*\$(ALL_EFILIBS)\)/-L \$(EFILIB) \1/' \
56
			"${f}" || die "Failed to patch Tianocore make file in" \
57
			$(basename $(dirname ${f}))
58
	done
59
	sed -i -e '/Guids/i#include "AutoGen.h"\n' "${S}/filesystems/AutoGen.c"
60
	for f in "${S}"/*/AutoGen.c; do
61
		cat >>"${f}" <<EOF
62
63
#define _PCD_TOKEN_PcdFixedDebugPrintErrorLevel  11U
64
#define _PCD_SIZE_PcdFixedDebugPrintErrorLevel 4
65
#define _PCD_GET_MODE_SIZE_PcdFixedDebugPrintErrorLevel  _PCD_SIZE_PcdFixedDebugPrintErrorLevel 
66
#define _PCD_VALUE_PcdFixedDebugPrintErrorLevel  0xFFFFFFFFU
67
GLOBAL_REMOVE_IF_UNREFERENCED const UINT32 _gPcd_FixedAtBuild_PcdFixedDebugPrintErrorLevel = _PCD_VALUE_PcdFixedDebugPrintErrorLevel;
68
extern const  UINT32  _gPcd_FixedAtBuild_PcdFixedDebugPrintErrorLevel;
69
#define _PCD_GET_MODE_32_PcdFixedDebugPrintErrorLevel  _gPcd_FixedAtBuild_PcdFixedDebugPrintErrorLevel
70
//#define _PCD_SET_MODE_32_PcdFixedDebugPrintErrorLevel  ASSERT(FALSE)  // It is not allowed to set value for a FIXED_AT_BUILD PCD
71
EOF
72
	done
73
}
74
42
src_compile() {
75
src_compile() {
76
	# Prepare flags
77
	[[ $EFIARCH == x64 ]] && pecoff_header_size='0x228' \
78
		|| pecoff_header_size='0x220'
79
80
	append-cflags "-fno-strict-aliasing" "-fno-stack-protector" "-fshort-wchar" "-Wall"
81
82
	local make_flags=(
83
		ARCH="${BUILDARCH}"
84
		GENFW="/usr/bin/GenFw"
85
		CC="$(tc-getCC)"
86
		AS="$(tc-getAS)"
87
		LD="$(tc-getLD)"
88
		AR="$(tc-getAR)"
89
		RANLIB="$(tc-getRANLIB)"
90
		OBJCOPY="$(tc-getOBJCOPY)"
91
		#CFLAGS="${CFLAGS}"
92
		LDFLAGS="${LDFLAGS}"
93
		GNUEFI_LDFLAGS="-T \$(GNUEFI_LDSCRIPT) -shared -nostdlib -Bsymbolic \
94
			-L\$(EFILIB) -L\$(GNUEFILIB) \$(CRTOBJS) -znocombreloc -zdefs"
95
		TIANO_LDSCRIPT="/usr/lib/GccBase.lds"
96
		TIANO_LDFLAGS="-n -q --gc-sections -nostdlib \
97
			--script=\$(TIANO_LDSCRIPT) \
98
			--defsym=PECOFF_HEADER_SIZE=${pecoff_header_size} \
99
			--entry \$(ENTRYPOINT) -u \$(ENTRYPOINT) -m \$(LD_CODE)"
100
	)
101
43
	# Make main EFI
102
	# Make main EFI
44
	all_target=gnuefi
103
	use gnuefi && export all_target=gnuefi || export all_target=tiano
45
	emake ARCH=${BUILDARCH} ${all_target}
104
	emake "${make_flags[@]}" ${all_target}
46
105
47
	# Make filesystem drivers
106
	# Make filesystem drivers
48
	export gnuefi_target="_gnuefi"
107
	use gnuefi && export gnuefi_target="_gnuefi"
49
	for fs in ${FS_USE}; do
108
	for fs in ${FS_USE}; do
50
		fs=${fs#+}
109
		fs=${fs#+}
51
		if use "${fs}"; then
110
		if use "${fs}"; then
52
			einfo "Building ${fs} filesystem driver"
111
			einfo "Building ${fs} filesystem driver"
53
			rm -f "${S}/filesystems/fsw_efi.o"
112
			emake "${make_flags[@]}" -C "${S}/filesystems" ${fs}${gnuefi_target}
54
			emake -C "${S}/filesystems" ARCH=${BUILDARCH} ${fs}${gnuefi_target}
55
		fi
113
		fi
56
	done
114
	done
57
}
115
}
58
- 

Return to bug 566930