1 |
commit: a940ef1ee145a02b22243b17eb02f79f6eaa484c |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 30 20:54:20 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 30 21:11:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a940ef1e |
7 |
|
8 |
sys-boot/refind: remove dependency on sys-boot/udk |
9 |
|
10 |
UDK is py2-only and will likely be removed from Gentoo soon. In fact, it |
11 |
already got temporarily last-rited earlier on this week - and rEFInd |
12 |
along with it. Given we have been forcing USE=gnuefi for sys-boot/refind |
13 |
for years anyway, just make the gnu-efi dependency mandatory. |
14 |
|
15 |
Note that the use.force entry for USE=gnuefi is still there due to the |
16 |
fact most rEFInd versions in the tree still honour that flag, plus I |
17 |
want to make this change as minimally intrusive as possible. |
18 |
|
19 |
With apologies to the current maintainer should they get upset about |
20 |
this change having been made without them having okayed it, it's about |
21 |
making sure sys-boot/refind does not get last-rited again. |
22 |
|
23 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
24 |
|
25 |
sys-boot/refind/refind-0.12.0-r1.ebuild | 142 ++++++++++++++++++++++++++++++++ |
26 |
1 file changed, 142 insertions(+) |
27 |
|
28 |
diff --git a/sys-boot/refind/refind-0.12.0-r1.ebuild b/sys-boot/refind/refind-0.12.0-r1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..b595a111e7e |
31 |
--- /dev/null |
32 |
+++ b/sys-boot/refind/refind-0.12.0-r1.ebuild |
33 |
@@ -0,0 +1,142 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit multiprocessing toolchain-funcs |
40 |
+ |
41 |
+DESCRIPTION="The UEFI Boot Manager by Rod Smith" |
42 |
+HOMEPAGE="https://www.rodsbooks.com/refind/" |
43 |
+SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz" |
44 |
+ |
45 |
+LICENSE="BSD GPL-2 GPL-3 FDL-1.3" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64 ~x86" |
48 |
+FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs" |
49 |
+IUSE="${FS_USE} custom-cflags doc" |
50 |
+ |
51 |
+DEPEND=">=sys-boot/gnu-efi-3.0.2" |
52 |
+ |
53 |
+DOCS=(README.txt) |
54 |
+PATCHES=("${FILESDIR}/makefile.patch") |
55 |
+ |
56 |
+pkg_pretend() { |
57 |
+ if use custom-cflags; then |
58 |
+ ewarn |
59 |
+ ewarn "You have enabled building with USE=custom-cflags. Be aware that" |
60 |
+ ewarn "using this can result in EFI binaries that fail to run and may" |
61 |
+ ewarn "fail to build at all. This is strongly advised against by upstream." |
62 |
+ ewarn |
63 |
+ ewarn "See https://bugs.gentoo.org/598587#c3 for more information" |
64 |
+ ewarn |
65 |
+ fi |
66 |
+} |
67 |
+ |
68 |
+pkg_setup() { |
69 |
+ if use x86; then |
70 |
+ export EFIARCH=ia32 |
71 |
+ export BUILDARCH=ia32 |
72 |
+ elif use amd64; then |
73 |
+ export EFIARCH=x64 |
74 |
+ export BUILDARCH=x86_64 |
75 |
+ fi |
76 |
+} |
77 |
+ |
78 |
+src_prepare() { |
79 |
+ default |
80 |
+ |
81 |
+ # bug 598647 - PIE not supported |
82 |
+ sed -e '/^CFLAGS/s:$: -fno-PIE:' -i Make.common || die |
83 |
+} |
84 |
+ |
85 |
+src_compile() { |
86 |
+ # Update fs targets depending on uses |
87 |
+ local fs fs_names=() |
88 |
+ for fs in ${FS_USE}; do |
89 |
+ fs=${fs#+} |
90 |
+ if use "${fs}"; then |
91 |
+ fs_names+=(${fs}) |
92 |
+ fi |
93 |
+ done |
94 |
+ fs_names=("${fs_names[@]/%/_gnuefi}") |
95 |
+ |
96 |
+ # Prepare flags |
97 |
+ local make_flags=( |
98 |
+ ARCH="${BUILDARCH}" |
99 |
+ CC="$(tc-getCC)" |
100 |
+ AS="$(tc-getAS)" |
101 |
+ LD="$(tc-getLD)" |
102 |
+ AR="$(tc-getAR)" |
103 |
+ RANLIB="$(tc-getRANLIB)" |
104 |
+ OBJCOPY="$(tc-getOBJCOPY)" |
105 |
+ GNUEFILIB="/usr/$(get_libdir)" |
106 |
+ EFILIB="/usr/$(get_libdir)" |
107 |
+ EFICRT0="/usr/$(get_libdir)" |
108 |
+ EDK2BASE="${UDK_WORKSPACE}" |
109 |
+ EDK2_DRIVER_BASENAMES="${fs_names[@]}" |
110 |
+ FILESYSTEMS="${fs_names[@]}" |
111 |
+ FILESYSTEMS_GNUEFI="${fs_names[@]}" |
112 |
+ ) |
113 |
+ if use custom-cflags; then |
114 |
+ make_flags=(CFLAGS="${CFLAGS}" "${make_flags[@]}") |
115 |
+ fi |
116 |
+ |
117 |
+ emake "${make_flags[@]}" all_gnuefi |
118 |
+} |
119 |
+ |
120 |
+src_install() { |
121 |
+ exeinto "/usr/lib/${PN}" |
122 |
+ doexe refind-install |
123 |
+ dosym "../lib/${PN}/refind-install" "/usr/sbin/refind-install" |
124 |
+ |
125 |
+ if use doc; then |
126 |
+ doman "docs/man/"* |
127 |
+ DOCS+=(NEWS.txt docs/refind docs/Styles) |
128 |
+ fi |
129 |
+ einstalldocs |
130 |
+ |
131 |
+ insinto "/usr/lib/${PN}/refind" |
132 |
+ doins "refind/refind_${EFIARCH}.efi" |
133 |
+ doins "refind.conf-sample" |
134 |
+ doins -r images icons fonts banners |
135 |
+ |
136 |
+ if [[ -d "drivers_${EFIARCH}" ]]; then |
137 |
+ doins -r "drivers_${EFIARCH}" |
138 |
+ fi |
139 |
+ |
140 |
+ insinto "/usr/lib/${PN}/refind/tools_${EFIARCH}" |
141 |
+ doins "gptsync/gptsync_${EFIARCH}.efi" |
142 |
+ |
143 |
+ insinto "/etc/refind.d" |
144 |
+ doins -r "keys" |
145 |
+ |
146 |
+ dosbin "mkrlconf" |
147 |
+ dosbin "mvrefind" |
148 |
+ dosbin "refind-mkdefault" |
149 |
+} |
150 |
+ |
151 |
+pkg_postinst() { |
152 |
+ elog "rEFInd has been built and installed into ${EROOT}/usr/lib/${PN}" |
153 |
+ elog "You will need to use the command 'refind-install' to install" |
154 |
+ elog "the binaries into your EFI System Partition" |
155 |
+ elog "" |
156 |
+ elog "refind-install requires additional packages to be fully functional:" |
157 |
+ elog " app-crypt/sbsigntools for binary signing for use with SecureBoot" |
158 |
+ elog " sys-boot/efibootmgr for writing to NVRAM" |
159 |
+ elog " sys-apps/gptfdisk for ESP management" |
160 |
+ elog "" |
161 |
+ elog "refind-mkdefault requires >=dev-lang/python-3" |
162 |
+ elog "" |
163 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
164 |
+ elog "A sample configuration can be found at" |
165 |
+ elog "${EROOT}/usr/lib/${PN}/refind/refind.conf-sample" |
166 |
+ else |
167 |
+ if ver_test "${REPLACING_VERSIONS}" -lt "0.12.0"; then |
168 |
+ ewarn "This new version uses sys-apps/gptfdisk instead of sys-block/parted" |
169 |
+ ewarn "to manage ESP" |
170 |
+ ewarn "" |
171 |
+ fi |
172 |
+ ewarn "Note that this installation will not update any EFI binaries" |
173 |
+ ewarn "on your EFI System Partition - this needs to be done manually" |
174 |
+ fi |
175 |
+} |