Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/, sys-apps/flashrom/files/
Date: Wed, 27 Jan 2021 17:29:59
Message-Id: 1611767526.3ed18f288b06f8e7bb64b34313c97b8a8b318c0c.marecki@gentoo
1 commit: 3ed18f288b06f8e7bb64b34313c97b8a8b318c0c
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 27 17:12:06 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 27 17:12:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ed18f28
7
8 sys-apps/flashrom: remove old
9
10 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
11
12 .../flashrom-1.2_make-libflashrom-usable.patch | 70 --------
13 sys-apps/flashrom/flashrom-1.2-r1.ebuild | 162 -------------------
14 sys-apps/flashrom/flashrom-1.2-r2.ebuild | 180 ---------------------
15 3 files changed, 412 deletions(-)
16
17 diff --git a/sys-apps/flashrom/files/flashrom-1.2_make-libflashrom-usable.patch b/sys-apps/flashrom/files/flashrom-1.2_make-libflashrom-usable.patch
18 deleted file mode 100644
19 index ea15a423059..00000000000
20 --- a/sys-apps/flashrom/files/flashrom-1.2_make-libflashrom-usable.patch
21 +++ /dev/null
22 @@ -1,70 +0,0 @@
23 -1. Add an (extremely primitive) rule for generating a pkgconfig file
24 - for libflashrom, as fwupd cannot find it without one. Note that this
25 - rule depends on several variables to be passed to make, see ebuilds
26 - using this patch for details;
27 -2. Tweak the way library dependencies are passed around a bit to make it
28 - easier to inject them into said pkgconfig file;
29 -3. Move print.o from CLI_OBJS to LIB_OBJS - it contains the array
30 - 'boards_known' which is used in library code. Upstream have already
31 - fixed this in Meson files but not in the Makefile.
32 -
33 -diff -urN a/flashrom.pc.in b/flashrom.pc.in
34 ---- a/flashrom.pc.in 1970-01-01 01:00:00.000000000 +0100
35 -+++ b/flashrom.pc.in 2020-07-28 22:47:01.928679346 +0200
36 -@@ -0,0 +1,9 @@
37 -+prefix=@PREFIX@
38 -+libdir=${prefix}/@LIBDIR@
39 -+includedir=${prefix}/@INCLUDEDIR@
40 -+
41 -+Name: libflashrom
42 -+Description: library to interact with flashrom
43 -+Version: @VERSION@
44 -+Libs: -L${libdir} -lflashrom @LIBS@
45 -+Cflags: -I${includedir}
46 -diff -urN a/Makefile b/Makefile
47 ---- a/Makefile 2019-12-31 18:25:41.000000000 +0100
48 -+++ b/Makefile 2020-07-28 23:18:41.019492448 +0200
49 -@@ -570,12 +570,12 @@
50 - ###############################################################################
51 - # Library code.
52 -
53 --LIB_OBJS = libflashrom.o layout.o flashrom.o udelay.o programmer.o helpers.o ich_descriptors.o fmap.o
54 -+LIB_OBJS = libflashrom.o layout.o flashrom.o udelay.o programmer.o helpers.o ich_descriptors.o fmap.o print.o
55 -
56 - ###############################################################################
57 - # Frontend related stuff.
58 -
59 --CLI_OBJS = cli_classic.o cli_output.o cli_common.o print.o
60 -+CLI_OBJS = cli_classic.o cli_output.o cli_common.o
61 -
62 - # versioninfo.inc stores metadata required to build a packaged flashrom. It is generated by the export rule and
63 - # imported below. If versioninfo.inc is not found and the variables are not defined by the user, the info will
64 -@@ -1130,11 +1130,16 @@
65 - @+$(MAKE) -C util/ich_descriptors_tool/ TARGET_OS=$(TARGET_OS) EXEC_SUFFIX=$(EXEC_SUFFIX)
66 - endif
67 -
68 -+ALL_LIBS = $(LIBS) $(PCILIBS) $(FEATURE_LIBS) $(USBLIBS) $(USB1LIBS) $(JAYLINKLIBS) $(NI845X_LIBS)
69 -+
70 -+flashrom.pc:
71 -+ sed -e "s#@PREFIX@#$(PREFIX)#" -e "s#@LIBDIR@#$(LIBDIR)#" -e "s#@INCLUDEDIR@#$(INCLUDEDIR)#" -e "s#@VERSION@#$(VERSION)#" -e "s#@LIBS@#$(ALL_LIBS)#" < $@.in > $@.tmp && mv $@.tmp $@
72 -+
73 - $(PROGRAM)$(EXEC_SUFFIX): $(OBJS)
74 -- $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(LIBS) $(PCILIBS) $(FEATURE_LIBS) $(USBLIBS) $(USB1LIBS) $(JAYLINKLIBS) $(NI845X_LIBS)
75 -+ $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJS) $(ALL_LIBS)
76 -
77 --libflashrom.a: $(LIBFLASHROM_OBJS)
78 -- $(AR) rcs $@ $^
79 -+libflashrom.a: $(LIBFLASHROM_OBJS) flashrom.pc
80 -+ $(AR) rcs $@ $(LIBFLASHROM_OBJS)
81 - $(RANLIB) $@
82 -
83 - # TAROPTIONS reduces information leakage from the packager's system.
84 -@@ -1149,7 +1154,7 @@
85 - # This includes all frontends and libflashrom.
86 - # We don't use EXEC_SUFFIX here because we want to clean everything.
87 - clean:
88 -- rm -f $(PROGRAM) $(PROGRAM).exe libflashrom.a *.o *.d $(PROGRAM).8 $(PROGRAM).8.html $(BUILD_DETAILS_FILE)
89 -+ rm -f $(PROGRAM) $(PROGRAM).exe libflashrom.a flashrom.pc *.o *.d $(PROGRAM).8 $(PROGRAM).8.html $(BUILD_DETAILS_FILE)
90 - @+$(MAKE) -C util/ich_descriptors_tool/ clean
91 -
92 - distclean: clean
93
94 diff --git a/sys-apps/flashrom/flashrom-1.2-r1.ebuild b/sys-apps/flashrom/flashrom-1.2-r1.ebuild
95 deleted file mode 100644
96 index e984e762420..00000000000
97 --- a/sys-apps/flashrom/flashrom-1.2-r1.ebuild
98 +++ /dev/null
99 @@ -1,162 +0,0 @@
100 -# Copyright 1999-2020 Gentoo Authors
101 -# Distributed under the terms of the GNU General Public License v2
102 -
103 -EAPI=7
104 -
105 -inherit flag-o-matic toolchain-funcs
106 -
107 -if [[ ${PV} == "9999" ]] ; then
108 - EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
109 - inherit git-r3
110 -else
111 - MY_P="${PN}-v${PV}"
112 - SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
113 - KEYWORDS="amd64 arm arm64 ppc ppc64 sparc x86"
114 - S="${WORKDIR}/${MY_P}"
115 -fi
116 -
117 -DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
118 -HOMEPAGE="https://flashrom.org/"
119 -
120 -LICENSE="GPL-2"
121 -SLOT="0"
122 -# The defaults match the upstream Makefile.
123 -# Note: Do not list bitbang_spi as it is not a programmer; it's a backend used
124 -# by some other spi programmers.
125 -IUSE_PROGRAMMERS="
126 - atahpt
127 - +atapromise
128 - +atavia
129 - +buspirate-spi
130 - +ch341a-spi
131 - +dediprog
132 - +developerbox-spi
133 - +digilent-spi
134 - +drkaiser
135 - +dummy
136 - +ft2232-spi
137 - +gfxnvidia
138 - +internal
139 - +it8212
140 - jlink-spi
141 - +linux-mtd
142 - +linux-spi
143 - mstarddc-spi
144 - +nic3com
145 - +nicintel
146 - +nicintel-eeprom
147 - +nicintel-spi
148 - nicnatsemi
149 - +nicrealtek
150 - +ogp-spi
151 - +pickit2-spi
152 - +pony-spi
153 - +rayer-spi
154 - +satamv
155 - +satasii
156 - +serprog
157 - stlinkv3-spi
158 - +usbblaster-spi
159 -"
160 -
161 -IUSE="${IUSE_PROGRAMMERS} +internal-dmi static tools +wiki"
162 -
163 -LIB_DEPEND="
164 - atahpt? ( sys-apps/pciutils[static-libs(+)] )
165 - atapromise? ( sys-apps/pciutils[static-libs(+)] )
166 - atavia? ( sys-apps/pciutils[static-libs(+)] )
167 - ch341a-spi? ( virtual/libusb:1[static-libs(+)] )
168 - dediprog? ( virtual/libusb:1[static-libs(+)] )
169 - developerbox-spi? ( virtual/libusb:1[static-libs(+)] )
170 - digilent-spi? ( virtual/libusb:1[static-libs(+)] )
171 - drkaiser? ( sys-apps/pciutils[static-libs(+)] )
172 - ft2232-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
173 - gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
174 - internal? ( sys-apps/pciutils[static-libs(+)] )
175 - it8212? ( sys-apps/pciutils[static-libs(+)] )
176 - jlink-spi? ( dev-embedded/libjaylink[static-libs(+)] )
177 - nic3com? ( sys-apps/pciutils[static-libs(+)] )
178 - nicintel-eeprom? ( sys-apps/pciutils[static-libs(+)] )
179 - nicintel-spi? ( sys-apps/pciutils[static-libs(+)] )
180 - nicintel? ( sys-apps/pciutils[static-libs(+)] )
181 - nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
182 - nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
183 - ogp-spi? ( sys-apps/pciutils[static-libs(+)] )
184 - pickit2-spi? ( virtual/libusb:0[static-libs(+)] )
185 - rayer-spi? ( sys-apps/pciutils[static-libs(+)] )
186 - satamv? ( sys-apps/pciutils[static-libs(+)] )
187 - satasii? ( sys-apps/pciutils[static-libs(+)] )
188 - stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] )
189 - usbblaster-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
190 -"
191 -RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
192 -DEPEND="${RDEPEND}
193 - static? ( ${LIB_DEPEND} )
194 - sys-apps/diffutils"
195 -RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
196 -
197 -_flashrom_enable() {
198 - local c="CONFIG_${2:-$(echo "$1" | tr '[:lower:]-' '[:upper:]_')}"
199 - args+=( "${c}=$(usex $1 yes no)" )
200 -}
201 -flashrom_enable() {
202 - local u
203 - for u ; do _flashrom_enable "${u}" ; done
204 -}
205 -
206 -src_prepare() {
207 - # To make libflashrom.a actually useful
208 - append-flags -fPIC
209 -
210 - default
211 -}
212 -
213 -src_compile() {
214 - # Help keep things in sync.
215 - local sprogs=$(echo $(
216 - grep -o 'CONFIG_[A-Z0-9_]*' flashrom.c | \
217 - LC_ALL=C sort -u | \
218 - sed 's:^CONFIG_::' | \
219 - tr '[:upper:]_' '[:lower:]-' | \
220 - grep -v ni845x-spi))
221 - local eprogs=$(echo ${IUSE_PROGRAMMERS} | sed -E 's/\B[-+]\b//g')
222 - if [[ ${sprogs} != "${eprogs}" ]] ; then
223 - eerror "The ebuild needs to be kept in sync."
224 - eerror "IUSE set to: ${eprogs}"
225 - eerror "flashrom.c : ${sprogs}"
226 - die "sync IUSE to the list of source programmers"
227 - fi
228 -
229 - # Turn USE flags into CONFIG_xxx settings.
230 - local args=()
231 - flashrom_enable ${eprogs}
232 - _flashrom_enable wiki PRINT_WIKI
233 - _flashrom_enable static STATIC
234 -
235 - # You have to specify at least one programmer, and if you specify more than
236 - # one programmer you have to include either dummy or internal in the list.
237 - # We pick dummy as the default because internal requires libpci.
238 - if ! use internal && ! use dummy ; then
239 - if [[ ${#args[@]} -ne 1 ]] ; then
240 - ewarn "You have to specify at least one programmer, and if you specify"
241 - ewarn "more than one programmer, you have to enable either dummy or"
242 - ewarn "internal as well. 'dummy' will be the default now."
243 - args+=( CONFIG_DUMMY=yes )
244 - fi
245 - fi
246 -
247 - tc-export AR CC PKG_CONFIG RANLIB
248 - emake WARNERROR=no "${args[@]}" all libflashrom.a
249 -}
250 -
251 -src_install() {
252 - dosbin flashrom
253 - doman flashrom.8
254 - dodoc README Documentation/*.txt
255 - dolib.a libflashrom.a
256 - doheader libflashrom.h
257 -
258 - if use tools; then
259 - dosbin util/ich_descriptors_tool/ich_descriptors_tool
260 - fi
261 -}
262
263 diff --git a/sys-apps/flashrom/flashrom-1.2-r2.ebuild b/sys-apps/flashrom/flashrom-1.2-r2.ebuild
264 deleted file mode 100644
265 index d8bff2a09ca..00000000000
266 --- a/sys-apps/flashrom/flashrom-1.2-r2.ebuild
267 +++ /dev/null
268 @@ -1,180 +0,0 @@
269 -# Copyright 1999-2020 Gentoo Authors
270 -# Distributed under the terms of the GNU General Public License v2
271 -
272 -EAPI=7
273 -
274 -inherit flag-o-matic toolchain-funcs
275 -
276 -if [[ ${PV} == "9999" ]] ; then
277 - EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
278 - inherit git-r3
279 -else
280 - MY_P="${PN}-v${PV}"
281 - SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
282 - KEYWORDS="amd64 arm ~arm64 ppc ppc64 sparc x86"
283 - S="${WORKDIR}/${MY_P}"
284 -fi
285 -
286 -DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
287 -HOMEPAGE="https://flashrom.org/"
288 -
289 -LICENSE="GPL-2"
290 -SLOT="0"
291 -# The defaults match the upstream Makefile.
292 -# Note: Do not list bitbang_spi as it is not a programmer; it's a backend used
293 -# by some other spi programmers.
294 -IUSE_PROGRAMMERS="
295 - atahpt
296 - +atapromise
297 - +atavia
298 - +buspirate-spi
299 - +ch341a-spi
300 - +dediprog
301 - +developerbox-spi
302 - +digilent-spi
303 - +drkaiser
304 - +dummy
305 - +ft2232-spi
306 - +gfxnvidia
307 - +internal
308 - +it8212
309 - jlink-spi
310 - +linux-mtd
311 - +linux-spi
312 - mstarddc-spi
313 - +nic3com
314 - +nicintel
315 - +nicintel-eeprom
316 - +nicintel-spi
317 - nicnatsemi
318 - +nicrealtek
319 - +ogp-spi
320 - +pickit2-spi
321 - +pony-spi
322 - +rayer-spi
323 - +satamv
324 - +satasii
325 - +serprog
326 - stlinkv3-spi
327 - +usbblaster-spi
328 -"
329 -
330 -IUSE="${IUSE_PROGRAMMERS} +internal-dmi static tools +wiki"
331 -
332 -LIB_DEPEND="
333 - atahpt? ( sys-apps/pciutils[static-libs(+)] )
334 - atapromise? ( sys-apps/pciutils[static-libs(+)] )
335 - atavia? ( sys-apps/pciutils[static-libs(+)] )
336 - ch341a-spi? ( virtual/libusb:1[static-libs(+)] )
337 - dediprog? ( virtual/libusb:1[static-libs(+)] )
338 - developerbox-spi? ( virtual/libusb:1[static-libs(+)] )
339 - digilent-spi? ( virtual/libusb:1[static-libs(+)] )
340 - drkaiser? ( sys-apps/pciutils[static-libs(+)] )
341 - ft2232-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
342 - gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
343 - internal? ( sys-apps/pciutils[static-libs(+)] )
344 - it8212? ( sys-apps/pciutils[static-libs(+)] )
345 - jlink-spi? ( dev-embedded/libjaylink[static-libs(+)] )
346 - nic3com? ( sys-apps/pciutils[static-libs(+)] )
347 - nicintel-eeprom? ( sys-apps/pciutils[static-libs(+)] )
348 - nicintel-spi? ( sys-apps/pciutils[static-libs(+)] )
349 - nicintel? ( sys-apps/pciutils[static-libs(+)] )
350 - nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
351 - nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
352 - ogp-spi? ( sys-apps/pciutils[static-libs(+)] )
353 - pickit2-spi? ( virtual/libusb:0[static-libs(+)] )
354 - rayer-spi? ( sys-apps/pciutils[static-libs(+)] )
355 - satamv? ( sys-apps/pciutils[static-libs(+)] )
356 - satasii? ( sys-apps/pciutils[static-libs(+)] )
357 - stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] )
358 - usbblaster-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
359 -"
360 -RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
361 -DEPEND="${RDEPEND}
362 - static? ( ${LIB_DEPEND} )
363 - sys-apps/diffutils"
364 -RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
365 -
366 -PATCHES=(
367 - "${FILESDIR}"/${PN}-1.2_make-libflashrom-usable.patch
368 -)
369 -
370 -_flashrom_enable() {
371 - local c="CONFIG_${2:-$(echo "$1" | tr '[:lower:]-' '[:upper:]_')}"
372 - args+=( "${c}=$(usex $1 yes no)" )
373 -}
374 -flashrom_enable() {
375 - local u
376 - for u ; do _flashrom_enable "${u}" ; done
377 -}
378 -
379 -src_prepare() {
380 - # To make libflashrom.a actually useful
381 - append-flags -fPIC
382 -
383 - default
384 -}
385 -
386 -src_compile() {
387 - # Help keep things in sync.
388 - local sprogs=$(echo $(
389 - grep -o 'CONFIG_[A-Z0-9_]*' flashrom.c | \
390 - LC_ALL=C sort -u | \
391 - sed 's:^CONFIG_::' | \
392 - tr '[:upper:]_' '[:lower:]-' | \
393 - grep -v ni845x-spi))
394 - local eprogs=$(echo ${IUSE_PROGRAMMERS} | sed -E 's/\B[-+]\b//g')
395 - if [[ ${sprogs} != "${eprogs}" ]] ; then
396 - eerror "The ebuild needs to be kept in sync."
397 - eerror "IUSE set to: ${eprogs}"
398 - eerror "flashrom.c : ${sprogs}"
399 - die "sync IUSE to the list of source programmers"
400 - fi
401 -
402 - # Turn USE flags into CONFIG_xxx settings.
403 - local args=()
404 - flashrom_enable ${eprogs}
405 - _flashrom_enable wiki PRINT_WIKI
406 - _flashrom_enable static STATIC
407 -
408 - # You have to specify at least one programmer, and if you specify more than
409 - # one programmer you have to include either dummy or internal in the list.
410 - # We pick dummy as the default because internal requires libpci.
411 - if ! use internal && ! use dummy ; then
412 - if [[ ${#args[@]} -ne 1 ]] ; then
413 - ewarn "You have to specify at least one programmer, and if you specify"
414 - ewarn "more than one programmer, you have to enable either dummy or"
415 - ewarn "internal as well. 'dummy' will be the default now."
416 - args+=( CONFIG_DUMMY=yes )
417 - fi
418 - fi
419 -
420 - tc-export AR CC PKG_CONFIG RANLIB
421 - # PREFIX, INCLUDEDIR and LIBDIR are injected into the libflashrom pkgconfig
422 - # file, which is why we pass them here even though src_install() puts all
423 - # files in correct locations without employing make.
424 - # VERSION too goes into the pkgconfig file, and we override the upstream
425 - # value to get rid of the prefix 'v'.
426 - emake \
427 - INCLUDEDIR="include" \
428 - LIBDIR="$(get_libdir)" \
429 - PREFIX="${EPREFIX}/usr" \
430 - VERSION="${PV}" \
431 - WARNERROR=no "${args[@]}" \
432 - all libflashrom.a
433 -}
434 -
435 -src_install() {
436 - dosbin flashrom
437 - doman flashrom.8
438 - dodoc README Documentation/*.txt
439 - dolib.a libflashrom.a
440 - doheader libflashrom.h
441 -
442 - insinto /usr/$(get_libdir)/pkgconfig
443 - doins ${PN}.pc
444 -
445 - if use tools; then
446 - dosbin util/ich_descriptors_tool/ich_descriptors_tool
447 - fi
448 -}