1 |
commit: 36674d2c08d09829f2527026517c4d015ec5efb6 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 2 16:34:35 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 2 16:36:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36674d2c |
7 |
|
8 |
Revert "sys-apps/flashrom: switch to building with meson" |
9 |
|
10 |
Turns out that not only do upstream meson scripts require patching to |
11 |
handle all programmers flashrom supports, they also only appear to work |
12 |
on amd64. Sigh. |
13 |
|
14 |
This reverts commit b5a312d32873362067980b2a02886a4b79d08ca6. |
15 |
|
16 |
Bug: https://bugs.gentoo.org/720210 |
17 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
18 |
|
19 |
.../flashrom/files/flashrom-1.2_meson-fixes.patch | 263 --------------------- |
20 |
sys-apps/flashrom/flashrom-1.2-r2.ebuild | 147 ------------ |
21 |
2 files changed, 410 deletions(-) |
22 |
|
23 |
diff --git a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch |
24 |
deleted file mode 100644 |
25 |
index 84dec173676..00000000000 |
26 |
--- a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch |
27 |
+++ /dev/null |
28 |
@@ -1,263 +0,0 @@ |
29 |
---- a/meson.build |
30 |
-+++ b/meson.build |
31 |
-@@ -44,6 +44,7 @@ |
32 |
- config_gfxnvidia = get_option('config_gfxnvidia') |
33 |
- config_internal = get_option('config_internal') |
34 |
- config_it8212 = get_option('config_it8212') |
35 |
-+config_jlink_spi = get_option('config_jlink_spi') |
36 |
- config_linux_mtd = get_option('config_linux_mtd') |
37 |
- config_linux_spi = get_option('config_linux_spi') |
38 |
- config_mstarddc_spi = get_option('config_mstarddc_spi') |
39 |
-@@ -67,6 +68,9 @@ |
40 |
- deps = [] |
41 |
- srcs = [] |
42 |
- |
43 |
-+need_libftdi = false |
44 |
-+need_libpci = false |
45 |
-+need_libusb = false |
46 |
- need_raw_access = false |
47 |
- need_serial = false |
48 |
- |
49 |
-@@ -81,24 +85,24 @@ |
50 |
- add_project_arguments('-DHAVE_UTSNAME=1', language : 'c') |
51 |
- endif |
52 |
- |
53 |
--# some programmers require libusb |
54 |
--if get_option('usb') |
55 |
-- srcs += 'usbdev.c' |
56 |
-- deps += dependency('libusb-1.0') |
57 |
--else |
58 |
-+if get_option('no_libftdi_programmers') |
59 |
-+ message('Disabling ALL libftdi-based programmers') |
60 |
-+ config_ft2232_spi = false |
61 |
-+ config_usbblaster_spi = false |
62 |
-+endif |
63 |
-+ |
64 |
-+if get_option('no_libusb_programmers') |
65 |
-+ message('Disabling ALL libusb-based programmers') |
66 |
- config_ch341a_spi = false |
67 |
- config_dediprog = false |
68 |
-- config_digilent_spi = false |
69 |
- config_developerbox_spi = false |
70 |
-+ config_digilent_spi = false |
71 |
- config_pickit2_spi = false |
72 |
-+ config_stlinkv3_spi = false |
73 |
- endif |
74 |
- |
75 |
--# some programmers require libpci |
76 |
--if get_option('pciutils') |
77 |
-- srcs += 'pcidev.c' |
78 |
-- deps += dependency('libpci') |
79 |
-- cargs += '-DNEED_PCI=1' |
80 |
--else |
81 |
-+if get_option('no_libpci_programmers') |
82 |
-+ message('Disabling ALL libpci-based programmers') |
83 |
- config_atahpt = false |
84 |
- config_atapromise = false |
85 |
- config_atavia = false |
86 |
-@@ -121,14 +125,17 @@ |
87 |
- # set defines for configured programmers |
88 |
- if config_atahpt |
89 |
- srcs += 'atahpt.c' |
90 |
-+ need_libpci = true |
91 |
- cargs += '-DCONFIG_ATAHPT=1' |
92 |
- endif |
93 |
- if config_atapromise |
94 |
- srcs += 'atapromise.c' |
95 |
-+ need_libpci = true |
96 |
- cargs += '-DCONFIG_ATAPROMISE=1' |
97 |
- endif |
98 |
- if config_atavia |
99 |
- srcs += 'atavia.c' |
100 |
-+ need_libpci = true |
101 |
- cargs += '-DCONFIG_ATAVIA=1' |
102 |
- endif |
103 |
- if config_buspirate_spi |
104 |
-@@ -138,22 +145,27 @@ |
105 |
- endif |
106 |
- if config_ch341a_spi |
107 |
- srcs += 'ch341a_spi.c' |
108 |
-+ need_libusb = true |
109 |
- cargs += '-DCONFIG_CH341A_SPI=1' |
110 |
- endif |
111 |
- if config_dediprog |
112 |
- srcs += 'dediprog.c' |
113 |
-+ need_libusb = true |
114 |
- cargs += '-DCONFIG_DEDIPROG=1' |
115 |
- endif |
116 |
- if config_developerbox_spi |
117 |
- srcs += 'developerbox_spi.c' |
118 |
-+ need_libusb = true |
119 |
- cargs += '-DCONFIG_DEVELOPERBOX_SPI=1' |
120 |
- endif |
121 |
- if config_digilent_spi |
122 |
- srcs += 'digilent_spi.c' |
123 |
-+ need_libusb = true |
124 |
- cargs += '-DCONFIG_DIGILENT_SPI=1' |
125 |
- endif |
126 |
- if config_drkaiser |
127 |
- srcs += 'drkaiser.c' |
128 |
-+ need_libpci = true |
129 |
- cargs += '-DCONFIG_DRKAISER=1' |
130 |
- endif |
131 |
- if config_dummy |
132 |
-@@ -162,12 +174,13 @@ |
133 |
- endif |
134 |
- if config_ft2232_spi |
135 |
- srcs += 'ft2232_spi.c' |
136 |
-+ need_libftdi = true |
137 |
- cargs += '-DCONFIG_FT2232_SPI=1' |
138 |
-- deps += dependency('libftdi1') |
139 |
- cargs += '-DHAVE_FT232H=1' |
140 |
- endif |
141 |
- if config_gfxnvidia |
142 |
- srcs += 'gfxnvidia.c' |
143 |
-+ need_libpci = true |
144 |
- cargs += '-DCONFIG_GFXNVIDIA=1' |
145 |
- endif |
146 |
- if config_internal |
147 |
-@@ -186,6 +199,7 @@ |
148 |
- srcs += 'sb600spi.c' |
149 |
- srcs += 'wbsio_spi.c' |
150 |
- endif |
151 |
-+ need_libpci = true |
152 |
- config_bitbang_spi = true |
153 |
- cargs += '-DCONFIG_INTERNAL=1' |
154 |
- if get_option('config_internal_dmi') |
155 |
-@@ -195,6 +209,7 @@ |
156 |
- endif |
157 |
- if config_it8212 |
158 |
- srcs += 'it8212.c' |
159 |
-+ need_libpci = true |
160 |
- cargs += '-DCONFIG_IT8212=1' |
161 |
- endif |
162 |
- if config_linux_mtd |
163 |
-@@ -211,36 +226,44 @@ |
164 |
- endif |
165 |
- if config_nic3com |
166 |
- srcs += 'nic3com.c' |
167 |
-+ need_libpci = true |
168 |
- cargs += '-DCONFIG_NIC3COM=1' |
169 |
- endif |
170 |
- if config_nicintel |
171 |
- srcs += 'nicintel.c' |
172 |
-+ need_libpci = true |
173 |
- cargs += '-DCONFIG_NICINTEL=1' |
174 |
- endif |
175 |
- if config_nicintel_eeprom |
176 |
- srcs += 'nicintel_eeprom.c' |
177 |
-+ need_libpci = true |
178 |
- cargs += '-DCONFIG_NICINTEL_EEPROM=1' |
179 |
- endif |
180 |
- if config_nicintel_spi |
181 |
- srcs += 'nicintel_spi.c' |
182 |
-+ need_libpci = true |
183 |
- config_bitbang_spi = true |
184 |
- cargs += '-DCONFIG_NICINTEL_SPI=1' |
185 |
- endif |
186 |
- if config_nicnatsemi |
187 |
- srcs += 'nicnatsemi.c' |
188 |
-+ need_libpci = true |
189 |
- cargs += '-DCONFIG_NICNATSEMI=1' |
190 |
- endif |
191 |
- if config_nicrealtek |
192 |
- srcs += 'nicrealtek.c' |
193 |
-+ need_libpci = true |
194 |
- cargs += '-DCONFIG_NICREALTEK=1' |
195 |
- endif |
196 |
- if config_ogp_spi |
197 |
- config_bitbang_spi = true |
198 |
- srcs += 'ogp_spi.c' |
199 |
-+ need_libpci = true |
200 |
- cargs += '-DCONFIG_OGP_SPI=1' |
201 |
- endif |
202 |
- if config_pickit2_spi |
203 |
- srcs += 'pickit2_spi.c' |
204 |
-+ need_libusb = true |
205 |
- cargs += '-DCONFIG_PICKIT2_SPI=1' |
206 |
- endif |
207 |
- if config_pony_spi |
208 |
-@@ -252,15 +275,18 @@ |
209 |
- if config_rayer_spi |
210 |
- srcs += 'rayer_spi.c' |
211 |
- config_bitbang_spi = true |
212 |
-+ need_libpci = true |
213 |
- need_raw_access = true |
214 |
- cargs += '-DCONFIG_RAYER_SPI=1' |
215 |
- endif |
216 |
- if config_satamv |
217 |
- srcs += 'satamv.c' |
218 |
-+ need_libpci = true |
219 |
- cargs += '-DCONFIG_SATAMV=1' |
220 |
- endif |
221 |
- if config_satasii |
222 |
- srcs += 'satasii.c' |
223 |
-+ need_libpci = true |
224 |
- cargs += '-DCONFIG_SATASII=1' |
225 |
- endif |
226 |
- if config_serprog |
227 |
-@@ -270,12 +296,19 @@ |
228 |
- endif |
229 |
- if config_usbblaster_spi |
230 |
- srcs += 'usbblaster_spi.c' |
231 |
-+ need_libftdi = true |
232 |
- cargs += '-DCONFIG_USBBLASTER_SPI=1' |
233 |
- endif |
234 |
- if config_stlinkv3_spi |
235 |
- srcs += 'stlinkv3_spi.c' |
236 |
-+ need_libusb = true |
237 |
- cargs += '-DCONFIG_STLINKV3_SPI=1' |
238 |
- endif |
239 |
-+if config_jlink_spi |
240 |
-+ srcs += 'jlink_spi.c' |
241 |
-+ cargs += '-DCONFIG_JLINK_SPI=1' |
242 |
-+ deps += dependency('libjaylink') |
243 |
-+endif |
244 |
- |
245 |
- # bitbanging SPI infrastructure |
246 |
- if config_bitbang_spi |
247 |
-@@ -296,6 +329,25 @@ |
248 |
- srcs += 'serial.c' |
249 |
- endif |
250 |
- |
251 |
-+# some programmers require libftdi |
252 |
-+if need_libftdi |
253 |
-+ deps += dependency('libftdi1') |
254 |
-+endif |
255 |
-+ |
256 |
-+# some programmers require libpci |
257 |
-+if need_libpci |
258 |
-+ srcs += 'pcidev.c' |
259 |
-+ deps += dependency('libpci') |
260 |
-+ cargs += '-DNEED_PCI=1' |
261 |
-+endif |
262 |
-+ |
263 |
-+# some programmers require libusb |
264 |
-+if need_libusb |
265 |
-+ srcs += 'usbdev.c' |
266 |
-+ deps += dependency('libusb-1.0') |
267 |
-+endif |
268 |
-+ |
269 |
-+ |
270 |
- prefix = get_option('prefix') |
271 |
- sbindir = join_paths(prefix, get_option('sbindir')) |
272 |
- libdir = join_paths(prefix, get_option('libdir')) |
273 |
---- a/meson_options.txt |
274 |
-+++ b/meson_options.txt |
275 |
-@@ -1,5 +1,6 @@ |
276 |
--option('pciutils', type : 'boolean', value : true, description : 'use pciutils') |
277 |
--option('usb', type : 'boolean', value : true, description : 'use libusb1') |
278 |
-+option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi') |
279 |
-+option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci') |
280 |
-+option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb') |
281 |
- |
282 |
- option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers') |
283 |
- option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller') |
284 |
-@@ -16,6 +17,7 @@ |
285 |
- option('config_internal', type : 'boolean', value : true, description : 'internal/onboard') |
286 |
- option('config_internal_dmi', type : 'boolean', value : true, description : 'Use internal DMI parser') |
287 |
- option('config_it8212', type : 'boolean', value : true, description : 'ITE IT8212F PATA') |
288 |
-+option('config_jlink_spi', type : 'boolean', value : false, description : 'SEGGER J-Link and compatible') |
289 |
- option('config_linux_mtd', type : 'boolean', value : true, description : 'Linux MTD interfaces') |
290 |
- option('config_linux_spi', type : 'boolean', value : true, description : 'Linux spidev interfaces') |
291 |
- option('config_mstarddc_spi', type : 'boolean', value : false, description : 'MSTAR DDC support') |
292 |
|
293 |
diff --git a/sys-apps/flashrom/flashrom-1.2-r2.ebuild b/sys-apps/flashrom/flashrom-1.2-r2.ebuild |
294 |
deleted file mode 100644 |
295 |
index 7d87b514771..00000000000 |
296 |
--- a/sys-apps/flashrom/flashrom-1.2-r2.ebuild |
297 |
+++ /dev/null |
298 |
@@ -1,147 +0,0 @@ |
299 |
-# Copyright 1999-2020 Gentoo Authors |
300 |
-# Distributed under the terms of the GNU General Public License v2 |
301 |
- |
302 |
-EAPI=7 |
303 |
- |
304 |
-inherit meson |
305 |
- |
306 |
-if [[ ${PV} == "9999" ]] ; then |
307 |
- EGIT_REPO_URI="https://review.coreboot.org/flashrom.git" |
308 |
- inherit git-r3 |
309 |
-else |
310 |
- MY_P="${PN}-v${PV}" |
311 |
- SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2" |
312 |
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" |
313 |
- S="${WORKDIR}/${MY_P}" |
314 |
-fi |
315 |
- |
316 |
-DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips" |
317 |
-HOMEPAGE="https://flashrom.org/" |
318 |
- |
319 |
-LICENSE="GPL-2" |
320 |
-SLOT="0" |
321 |
- |
322 |
-# The defaults match the upstream meson_options.txt. |
323 |
-IUSE_PROGRAMMERS=" |
324 |
- atahpt |
325 |
- atapromise |
326 |
- +atavia |
327 |
- +buspirate-spi |
328 |
- +ch341a-spi |
329 |
- +dediprog |
330 |
- +developerbox-spi |
331 |
- +digilent-spi |
332 |
- +drkaiser |
333 |
- +dummy |
334 |
- +ft2232-spi |
335 |
- +gfxnvidia |
336 |
- +internal |
337 |
- +it8212 |
338 |
- jlink-spi |
339 |
- +linux-mtd |
340 |
- +linux-spi |
341 |
- mstarddc-spi |
342 |
- +nic3com |
343 |
- +nicintel |
344 |
- +nicintel-eeprom |
345 |
- +nicintel-spi |
346 |
- nicnatsemi |
347 |
- +nicrealtek |
348 |
- +ogp-spi |
349 |
- +pickit2-spi |
350 |
- +pony-spi |
351 |
- +rayer-spi |
352 |
- +satamv |
353 |
- +satasii |
354 |
- +serprog |
355 |
- +stlinkv3-spi |
356 |
- +usbblaster-spi |
357 |
-" |
358 |
-IUSE="${IUSE_PROGRAMMERS} +internal-dmi tools" |
359 |
- |
360 |
-LIB_DEPEND=" |
361 |
- atahpt? ( sys-apps/pciutils[static-libs(+)] ) |
362 |
- atapromise? ( sys-apps/pciutils[static-libs(+)] ) |
363 |
- atavia? ( sys-apps/pciutils[static-libs(+)] ) |
364 |
- ch341a-spi? ( virtual/libusb:1[static-libs(+)] ) |
365 |
- dediprog? ( virtual/libusb:1[static-libs(+)] ) |
366 |
- developerbox-spi? ( virtual/libusb:1[static-libs(+)] ) |
367 |
- digilent-spi? ( virtual/libusb:1[static-libs(+)] ) |
368 |
- drkaiser? ( sys-apps/pciutils[static-libs(+)] ) |
369 |
- ft2232-spi? ( dev-embedded/libftdi:=[static-libs(+)] ) |
370 |
- gfxnvidia? ( sys-apps/pciutils[static-libs(+)] ) |
371 |
- internal? ( sys-apps/pciutils[static-libs(+)] ) |
372 |
- it8212? ( sys-apps/pciutils[static-libs(+)] ) |
373 |
- jlink-spi? ( dev-embedded/libjaylink[static-libs(+)] ) |
374 |
- nic3com? ( sys-apps/pciutils[static-libs(+)] ) |
375 |
- nicintel-eeprom? ( sys-apps/pciutils[static-libs(+)] ) |
376 |
- nicintel-spi? ( sys-apps/pciutils[static-libs(+)] ) |
377 |
- nicintel? ( sys-apps/pciutils[static-libs(+)] ) |
378 |
- nicnatsemi? ( sys-apps/pciutils[static-libs(+)] ) |
379 |
- nicrealtek? ( sys-apps/pciutils[static-libs(+)] ) |
380 |
- ogp-spi? ( sys-apps/pciutils[static-libs(+)] ) |
381 |
- pickit2-spi? ( virtual/libusb:0[static-libs(+)] ) |
382 |
- rayer-spi? ( sys-apps/pciutils[static-libs(+)] ) |
383 |
- satamv? ( sys-apps/pciutils[static-libs(+)] ) |
384 |
- satasii? ( sys-apps/pciutils[static-libs(+)] ) |
385 |
- stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] ) |
386 |
- usbblaster-spi? ( dev-embedded/libftdi:=[static-libs(+)] ) |
387 |
-" |
388 |
-RDEPEND="${LIB_DEPEND//\[static-libs(+)]}" |
389 |
-DEPEND="${RDEPEND} |
390 |
- sys-apps/diffutils" |
391 |
-RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )" |
392 |
- |
393 |
-DOCS=( README Documentation/ ) |
394 |
- |
395 |
-PATCHES=( |
396 |
- "${FILESDIR}"/${PN}-1.2_meson-fixes.patch |
397 |
-) |
398 |
- |
399 |
-src_configure() { |
400 |
- local emesonargs=( |
401 |
- $(meson_use atahpt config_atahpt) |
402 |
- $(meson_use atapromise config_atapromise) |
403 |
- $(meson_use atavia config_atavia) |
404 |
- $(meson_use buspirate-spi config_buspirate_spi) |
405 |
- $(meson_use ch341a-spi config_ch341a_spi) |
406 |
- $(meson_use dediprog config_dediprog) |
407 |
- $(meson_use developerbox-spi config_developerbox_spi) |
408 |
- $(meson_use digilent-spi config_digilent_spi) |
409 |
- $(meson_use drkaiser config_drkaiser) |
410 |
- $(meson_use dummy config_dummy) |
411 |
- $(meson_use ft2232-spi config_ft2232_spi) |
412 |
- $(meson_use gfxnvidia config_gfxnvidia) |
413 |
- $(meson_use internal config_internal) |
414 |
- $(meson_use internal-dmi config_internal_dmi) |
415 |
- $(meson_use it8212 config_it8212) |
416 |
- $(meson_use jlink-spi config_jlink_spi) |
417 |
- $(meson_use linux-mtd config_linux_mtd) |
418 |
- $(meson_use linux-spi config_linux_spi) |
419 |
- $(meson_use mstarddc-spi config_mstarddc_spi) |
420 |
- $(meson_use nic3com config_nic3com) |
421 |
- $(meson_use nicintel-eeprom config_nicintel_eeprom) |
422 |
- $(meson_use nicintel-spi config_nicintel_spi) |
423 |
- $(meson_use nicintel config_nicintel) |
424 |
- $(meson_use nicnatsemi config_nicnatsemi) |
425 |
- $(meson_use nicrealtek config_nicrealtek) |
426 |
- $(meson_use ogp-spi config_ogp_spi) |
427 |
- $(meson_use pickit2-spi config_pickit2_spi) |
428 |
- $(meson_use pony-spi config_pony_spi) |
429 |
- $(meson_use rayer-spi config_rayer_spi) |
430 |
- $(meson_use satasii config_satamv) |
431 |
- $(meson_use satamv config_satasii) |
432 |
- $(meson_use stlinkv3-spi config_stlinkv3_spi) |
433 |
- $(meson_use serprog config_serprog) |
434 |
- $(meson_use usbblaster-spi config_usbblaster_spi) |
435 |
- ) |
436 |
- meson_src_configure |
437 |
-} |
438 |
- |
439 |
-src_install() { |
440 |
- meson_src_install |
441 |
- |
442 |
- if use tools; then |
443 |
- dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool |
444 |
- fi |
445 |
-} |