1 |
commit: ef4f1f4c420f0eb075d979ecc76e85e2a4488706 |
2 |
Author: John Helmert III <ajak <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 7 01:09:35 2022 +0000 |
4 |
Commit: John Helmert III <ajak <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 6 22:38:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef4f1f4c |
7 |
|
8 |
sys-firmware/seabios: add 1.16.0 |
9 |
|
10 |
Drop keywords for arm, hppa, riscv, ia64, s390, sparc since iasl isn't |
11 |
keyworded there yet. |
12 |
|
13 |
Signed-off-by: John Helmert III <ajak <AT> gentoo.org> |
14 |
|
15 |
sys-firmware/seabios/Manifest | 1 + |
16 |
sys-firmware/seabios/files/README | 2 - |
17 |
sys-firmware/seabios/seabios-1.16.0.ebuild | 142 +++++++++++++++++++++++++++++ |
18 |
3 files changed, 143 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/sys-firmware/seabios/Manifest b/sys-firmware/seabios/Manifest |
21 |
index 1f37057de6a9..53fef7c53118 100644 |
22 |
--- a/sys-firmware/seabios/Manifest |
23 |
+++ b/sys-firmware/seabios/Manifest |
24 |
@@ -3,3 +3,4 @@ DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96e |
25 |
DIST seabios-1.14.0-bin.tar.xz 170160 BLAKE2B 1ab471ce0c6e27633ec42a66e3069496be84de713baab5de4f297821bd0da26404f7f70abc82e223ec5aa317a878889ae92b019988c72d24f77e7dcc5865f916 SHA512 7964e9bb7dff4fd6593f5d6d64efc4b1460750461b86635dbe5255d2086d619f51711d7a35e4dc20e556f705091c0950afabeddcd2e8876f05ce14f9ca73ed71 |
26 |
DIST seabios-1.14.0-r2-bin.tar.xz 132256 BLAKE2B 7d38949de254d6e3699d463a66c363156aa36bfe16c18bea48c55a61bdc423184175fd5427d3246a78d9c6335e61e5baa982f67e7406c5525e405b4383530d41 SHA512 5ce0e407b97e878842fbd7ad2f9e8a65f2565a5aa43d08e01cff024352780f55f8669958c58d20770db7f90e87cc52c860af831cefe3846227e7b45cd9dc33ee |
27 |
DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146 |
28 |
+DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f |
29 |
|
30 |
diff --git a/sys-firmware/seabios/files/README b/sys-firmware/seabios/files/README |
31 |
deleted file mode 100644 |
32 |
index a7aed6d46cf6..000000000000 |
33 |
--- a/sys-firmware/seabios/files/README |
34 |
+++ /dev/null |
35 |
@@ -1,2 +0,0 @@ |
36 |
-The configuration files config.vga-xxx are based on the variants found in |
37 |
-the qemu/roms/ tree. |
38 |
|
39 |
diff --git a/sys-firmware/seabios/seabios-1.16.0.ebuild b/sys-firmware/seabios/seabios-1.16.0.ebuild |
40 |
new file mode 100644 |
41 |
index 000000000000..4ba443b19f0b |
42 |
--- /dev/null |
43 |
+++ b/sys-firmware/seabios/seabios-1.16.0.ebuild |
44 |
@@ -0,0 +1,142 @@ |
45 |
+# Copyright 1999-2022 Gentoo Authors |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+ |
48 |
+EAPI=8 |
49 |
+ |
50 |
+PYTHON_COMPAT=( python3_{8..10} ) |
51 |
+ |
52 |
+inherit toolchain-funcs python-any-r1 |
53 |
+ |
54 |
+# SeaBIOS maintainers sometimes don't release stable tarballs or stable |
55 |
+# binaries to generate the stable tarball the following is necessary: |
56 |
+# git clone git://git.seabios.org/seabios.git && cd seabios |
57 |
+# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV} |
58 |
+ |
59 |
+if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then |
60 |
+ EGIT_REPO_URI="git://git.seabios.org/seabios.git" |
61 |
+ inherit git-r3 |
62 |
+else |
63 |
+ SRC_URI="https://www.seabios.org/downloads/${P}.tar.gz" |
64 |
+ #KEYWORDS="~alpha ~amd64 ~arm64 ~loong ~m68k ~mips ~ppc ~ppc64 ~x86" |
65 |
+fi |
66 |
+ |
67 |
+DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" |
68 |
+HOMEPAGE="https://www.seabios.org/" |
69 |
+ |
70 |
+LICENSE="LGPL-3 GPL-3" |
71 |
+SLOT="0" |
72 |
+IUSE="debug +seavgabios" |
73 |
+ |
74 |
+BDEPEND=" |
75 |
+ >=sys-power/iasl-20060912 |
76 |
+ ${PYTHON_DEPS}" |
77 |
+RDEPEND="!sys-firmware/seabios-bin" |
78 |
+ |
79 |
+choose_target_chost() { |
80 |
+ if [[ -n "${CC}" ]]; then |
81 |
+ ${CC} -dumpmachine |
82 |
+ return |
83 |
+ fi |
84 |
+ |
85 |
+ if use amd64 || use x86; then |
86 |
+ # Use the native compiler |
87 |
+ echo "${CHOST}" |
88 |
+ return |
89 |
+ fi |
90 |
+ |
91 |
+ local i |
92 |
+ for i in x86_64 i686 i586 i486 i386 ; do |
93 |
+ i=${i}-pc-linux-gnu |
94 |
+ type -P ${i}-gcc > /dev/null && echo ${i} && return |
95 |
+ done |
96 |
+} |
97 |
+ |
98 |
+pkg_pretend() { |
99 |
+ ewarn "You have decided to compile your own SeaBIOS. This is not" |
100 |
+ ewarn "supported by upstream unless you use their recommended" |
101 |
+ ewarn "toolchain (which you are not)." |
102 |
+ elog |
103 |
+ ewarn "If you are intending to use this build with QEMU, realize" |
104 |
+ ewarn "you will not receive any support if you have compiled your" |
105 |
+ ewarn "own SeaBIOS. Virtual machines subtly fail based on changes" |
106 |
+ ewarn "in SeaBIOS." |
107 |
+ if [[ -z "$(choose_target_chost)" ]]; then |
108 |
+ elog |
109 |
+ eerror "Before you can compile ${PN}, you need to install a x86 cross-compiler" |
110 |
+ eerror "Run the following commands:" |
111 |
+ eerror " emerge crossdev" |
112 |
+ eerror " crossdev --stable -t x86_64-pc-linux-gnu" |
113 |
+ die "cross-compiler is needed" |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_prepare() { |
118 |
+ default |
119 |
+ |
120 |
+ # Ensure precompiled iasl files are never used |
121 |
+ find "${WORKDIR}" -name '*.hex' -delete || die |
122 |
+} |
123 |
+ |
124 |
+src_configure() { |
125 |
+ tc-ld-disable-gold #438058 |
126 |
+ |
127 |
+ if use debug ; then |
128 |
+ echo "CONFIG_DEBUG_LEVEL=8" >.config |
129 |
+ fi |
130 |
+ _emake config |
131 |
+} |
132 |
+ |
133 |
+_emake() { |
134 |
+ LANG=C \ |
135 |
+ emake V=1 \ |
136 |
+ CPP="$(tc-getPROG CPP cpp)" \ |
137 |
+ CC="$(tc-getCC)" \ |
138 |
+ LD="$(tc-getLD)" \ |
139 |
+ AR="$(tc-getAR)" \ |
140 |
+ AS="$(tc-getAS)" \ |
141 |
+ OBJCOPY="$(tc-getOBJCOPY)" \ |
142 |
+ RANLIB="$(tc-getRANLIB)" \ |
143 |
+ OBJDUMP="$(tc-getOBJDUMP)" \ |
144 |
+ STRIP="$(tc-getSTRIP)" \ |
145 |
+ HOST_CC="$(tc-getBUILD_CC)" \ |
146 |
+ VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \ |
147 |
+ "$@" |
148 |
+} |
149 |
+ |
150 |
+src_compile() { |
151 |
+ local TARGET_CHOST=$(choose_target_chost) |
152 |
+ |
153 |
+ cp "${FILESDIR}/seabios/config.seabios-256k" .config || die |
154 |
+ _emake oldnoconfig |
155 |
+ CHOST="${TARGET_CHOST}" _emake iasl |
156 |
+ CHOST="${TARGET_CHOST}" _emake out/bios.bin |
157 |
+ mv out/bios.bin ../bios-256k.bin || die |
158 |
+ |
159 |
+ if use seavgabios ; then |
160 |
+ local config t targets=( |
161 |
+ cirrus |
162 |
+ isavga |
163 |
+ qxl |
164 |
+ stdvga |
165 |
+ virtio |
166 |
+ vmware |
167 |
+ ) |
168 |
+ for t in "${targets[@]}" ; do |
169 |
+ _emake clean distclean |
170 |
+ cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die |
171 |
+ _emake oldnoconfig |
172 |
+ CHOST="${TARGET_CHOST}" _emake out/vgabios.bin |
173 |
+ cp out/vgabios.bin ../vgabios-${t}.bin || die |
174 |
+ done |
175 |
+ fi |
176 |
+} |
177 |
+ |
178 |
+src_install() { |
179 |
+ insinto /usr/share/seabios |
180 |
+ doins ../bios-256k.bin |
181 |
+ |
182 |
+ if use seavgabios ; then |
183 |
+ insinto /usr/share/seavgabios |
184 |
+ doins ../vgabios*.bin |
185 |
+ fi |
186 |
+} |