1 |
commit: aee0712e4c0cf7c15440ebfca9eff372ce93d2b1 |
2 |
Author: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 3 16:13:41 2021 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 3 16:16:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aee0712e |
7 |
|
8 |
sys-apps/memtest86+: attempt fix for "oversized on x86_64" |
9 |
|
10 |
Fix from https://bugzilla.redhat.com/show_bug.cgi?id=620846#c10 |
11 |
|
12 |
Bug: https://bugs.gentoo.org/613196 |
13 |
|
14 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
15 |
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> |
16 |
|
17 |
sys-apps/memtest86+/memtest86+-5.31b-r2.ebuild | 116 +++++++++++++++++++++++++ |
18 |
1 file changed, 116 insertions(+) |
19 |
|
20 |
diff --git a/sys-apps/memtest86+/memtest86+-5.31b-r2.ebuild b/sys-apps/memtest86+/memtest86+-5.31b-r2.ebuild |
21 |
new file mode 100644 |
22 |
index 000000000000..3962c3e9f986 |
23 |
--- /dev/null |
24 |
+++ b/sys-apps/memtest86+/memtest86+-5.31b-r2.ebuild |
25 |
@@ -0,0 +1,116 @@ |
26 |
+# Copyright 1999-2021 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=7 |
30 |
+ |
31 |
+inherit mount-boot toolchain-funcs |
32 |
+ |
33 |
+DESCRIPTION="Memory tester based on memtest86" |
34 |
+HOMEPAGE="http://www.memtest.org/" |
35 |
+SRC_URI="http://www.memtest.org/download/${PV}/${P}.tar.gz" |
36 |
+ |
37 |
+LICENSE="GPL-2" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="-* ~amd64 ~x86" |
40 |
+IUSE="+boot floppy iso serial" |
41 |
+ |
42 |
+BOOTDIR="/boot/memtest86plus" |
43 |
+QA_PRESTRIPPED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest" |
44 |
+QA_FLAGS_IGNORED="${BOOTDIR#/}/memtest usr/share/${PN}/memtest" |
45 |
+ |
46 |
+RDEPEND="floppy? ( sys-fs/mtools )" |
47 |
+DEPEND="${RDEPEND}" |
48 |
+BDEPEND="iso? ( app-cdr/cdrtools )" |
49 |
+ |
50 |
+PATCHES=( |
51 |
+ "${FILESDIR}/${P}-gcc-473.patch" |
52 |
+ "${FILESDIR}/${P}-hardcoded_cc.patch" |
53 |
+ "${FILESDIR}/${P}-no-clean.patch" #557890 |
54 |
+ "${FILESDIR}/${P}-objcopy.patch" |
55 |
+ "${FILESDIR}/${P}-test-random-cflags.patch" #590974 |
56 |
+ "${FILESDIR}/${P}-fix-gcc8-freeze-crash.patch" |
57 |
+) |
58 |
+ |
59 |
+pkg_pretend() { |
60 |
+ use boot && mount-boot_pkg_pretend |
61 |
+} |
62 |
+ |
63 |
+src_prepare() { |
64 |
+ sed -i -e 's,0x10000,0x100000,' memtest.lds || die |
65 |
+ sed -i 's:genisoimage:mkisofs:' makeiso.sh || die |
66 |
+ |
67 |
+ if use serial ; then |
68 |
+ sed -i -e '/^#define SERIAL_CONSOLE_DEFAULT/s:0:1:' \ |
69 |
+ config.h || die "sed failed" |
70 |
+ fi |
71 |
+ #613196 |
72 |
+ use amd64 && sed -i -e's,$(LD) -s -T memtest.lds,$(LD) -s -T memtest.lds -z max-page-size=0x1000,' Makefile |
73 |
+ default |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ tc-ld-disable-gold #580212 |
78 |
+ tc-export AS CC LD |
79 |
+} |
80 |
+ |
81 |
+src_compile() { |
82 |
+ emake OBJCOPY="$(tc-getOBJCOPY)" |
83 |
+ if use iso ; then |
84 |
+ ./makeiso.sh || die |
85 |
+ fi |
86 |
+} |
87 |
+ |
88 |
+src_test() { :; } |
89 |
+ |
90 |
+src_install() { |
91 |
+ if use boot ; then |
92 |
+ insinto "${BOOTDIR}" |
93 |
+ doins memtest memtest.bin |
94 |
+ fi |
95 |
+ |
96 |
+ insinto /usr/share/${PN} |
97 |
+ use iso && newins mt*.iso memtest.iso |
98 |
+ doins memtest memtest.bin |
99 |
+ |
100 |
+ exeinto /etc/grub.d |
101 |
+ newexe "${FILESDIR}"/39_${PN}-r1 39_${PN} |
102 |
+ |
103 |
+ dodoc README README.build-process FAQ changelog |
104 |
+ |
105 |
+ if use floppy ; then |
106 |
+ dobin "${FILESDIR}"/make-memtest86+-boot-floppy |
107 |
+ doman "${FILESDIR}"/make-memtest86+-boot-floppy.1 |
108 |
+ fi |
109 |
+} |
110 |
+ |
111 |
+pkg_preinst() { |
112 |
+ use boot && mount-boot_pkg_preinst |
113 |
+} |
114 |
+ |
115 |
+pkg_postinst() { |
116 |
+ if use boot; then |
117 |
+ mount-boot_pkg_postinst |
118 |
+ |
119 |
+ elog "memtest86+ has been installed in ${BOOTDIR}/" |
120 |
+ elog "You may wish to update your bootloader configs:" |
121 |
+ elog " - For grub2 just re-run grub-mkconfig -o /boot/grub/grub.cfg, since a" |
122 |
+ elog " config generator has been installed at /etc/grub.d/39_${PN}" |
123 |
+ elog " - For lilo, add the following to /etc/lilo.conf and re-run lilo:" |
124 |
+ elog " > image = ${BOOTDIR}/memtest.bin" |
125 |
+ elog " > label = ${PN}" |
126 |
+ elog "" |
127 |
+ elog "Note: For older configs, you might have to change from 'memtest' to 'memtest.bin'." |
128 |
+ fi |
129 |
+ |
130 |
+ if use boot && [ -e /sys/firmware/efi ]; then |
131 |
+ ewarn "WARNING: You appear to be booted in EFI mode but ${PN} is a BIOS-only tool." |
132 |
+ fi |
133 |
+} |
134 |
+ |
135 |
+pkg_prerm() { |
136 |
+ use boot && mount-boot_pkg_prerm |
137 |
+} |
138 |
+ |
139 |
+pkg_postrm() { |
140 |
+ use boot && mount-boot_pkg_postrm |
141 |
+} |