public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2020-04-28  9:34 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2020-04-28  9:34 UTC (permalink / raw
  To: gentoo-commits

commit:     b5a312d32873362067980b2a02886a4b79d08ca6
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 28 09:31:40 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Apr 28 09:34:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5a312d3

sys-apps/flashrom: switch to building with meson

Much simpler ebuild, libflashrom is shared, and most importantly - it
gets an auto-generated pkg-config file. Upstream meson scripts have for
now, as previously mentioned, not reached feature parity with the
Makefile but with some patching, we can now at least support all the
programmers.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../flashrom/files/flashrom-1.2_meson-fixes.patch  | 263 +++++++++++++++++++++
 sys-apps/flashrom/flashrom-1.2-r2.ebuild           | 147 ++++++++++++
 2 files changed, 410 insertions(+)

diff --git a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
new file mode 100644
index 00000000000..84dec173676
--- /dev/null
+++ b/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
@@ -0,0 +1,263 @@
+--- a/meson.build
++++ b/meson.build
+@@ -44,6 +44,7 @@
+ config_gfxnvidia = get_option('config_gfxnvidia')
+ config_internal = get_option('config_internal')
+ config_it8212 = get_option('config_it8212')
++config_jlink_spi = get_option('config_jlink_spi')
+ config_linux_mtd = get_option('config_linux_mtd')
+ config_linux_spi = get_option('config_linux_spi')
+ config_mstarddc_spi = get_option('config_mstarddc_spi')
+@@ -67,6 +68,9 @@
+ deps = []
+ srcs = []
+ 
++need_libftdi = false
++need_libpci = false
++need_libusb = false
+ need_raw_access = false
+ need_serial = false
+ 
+@@ -81,24 +85,24 @@
+   add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
+ endif
+ 
+-# some programmers require libusb
+-if get_option('usb')
+-  srcs += 'usbdev.c'
+-  deps += dependency('libusb-1.0')
+-else
++if get_option('no_libftdi_programmers')
++  message('Disabling ALL libftdi-based programmers')
++  config_ft2232_spi = false
++  config_usbblaster_spi = false
++endif
++
++if get_option('no_libusb_programmers')
++  message('Disabling ALL libusb-based programmers')
+   config_ch341a_spi = false
+   config_dediprog = false
+-  config_digilent_spi = false
+   config_developerbox_spi = false
++  config_digilent_spi = false
+   config_pickit2_spi = false
++  config_stlinkv3_spi = false
+ endif
+ 
+-# some programmers require libpci
+-if get_option('pciutils')
+-  srcs += 'pcidev.c'
+-  deps += dependency('libpci')
+-  cargs += '-DNEED_PCI=1'
+-else
++if get_option('no_libpci_programmers')
++  message('Disabling ALL libpci-based programmers')
+   config_atahpt = false
+   config_atapromise = false
+   config_atavia = false
+@@ -121,14 +125,17 @@
+ # set defines for configured programmers
+ if config_atahpt
+   srcs += 'atahpt.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAHPT=1'
+ endif
+ if config_atapromise
+   srcs += 'atapromise.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAPROMISE=1'
+ endif
+ if config_atavia
+   srcs += 'atavia.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAVIA=1'
+ endif
+ if config_buspirate_spi
+@@ -138,22 +145,27 @@
+ endif
+ if config_ch341a_spi
+   srcs += 'ch341a_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_CH341A_SPI=1'
+ endif
+ if config_dediprog
+   srcs += 'dediprog.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DEDIPROG=1'
+ endif
+ if config_developerbox_spi
+   srcs += 'developerbox_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DEVELOPERBOX_SPI=1'
+ endif
+ if config_digilent_spi
+   srcs += 'digilent_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DIGILENT_SPI=1'
+ endif
+ if config_drkaiser
+   srcs += 'drkaiser.c'
++  need_libpci = true
+   cargs += '-DCONFIG_DRKAISER=1'
+ endif
+ if config_dummy
+@@ -162,12 +174,13 @@
+ endif
+ if config_ft2232_spi
+   srcs += 'ft2232_spi.c'
++  need_libftdi = true
+   cargs += '-DCONFIG_FT2232_SPI=1'
+-  deps += dependency('libftdi1')
+   cargs += '-DHAVE_FT232H=1'
+ endif
+ if config_gfxnvidia
+   srcs += 'gfxnvidia.c'
++  need_libpci = true
+   cargs += '-DCONFIG_GFXNVIDIA=1'
+ endif
+ if config_internal
+@@ -186,6 +199,7 @@
+     srcs += 'sb600spi.c'
+     srcs += 'wbsio_spi.c'
+   endif
++  need_libpci = true
+   config_bitbang_spi = true
+   cargs += '-DCONFIG_INTERNAL=1'
+   if get_option('config_internal_dmi')
+@@ -195,6 +209,7 @@
+ endif
+ if config_it8212
+   srcs += 'it8212.c'
++  need_libpci = true
+   cargs += '-DCONFIG_IT8212=1'
+ endif
+ if config_linux_mtd
+@@ -211,36 +226,44 @@
+ endif
+ if config_nic3com
+   srcs += 'nic3com.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NIC3COM=1'
+ endif
+ if config_nicintel
+   srcs += 'nicintel.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICINTEL=1'
+ endif
+ if config_nicintel_eeprom
+   srcs += 'nicintel_eeprom.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICINTEL_EEPROM=1'
+ endif
+ if config_nicintel_spi
+   srcs += 'nicintel_spi.c'
++  need_libpci = true
+   config_bitbang_spi = true
+   cargs += '-DCONFIG_NICINTEL_SPI=1'
+ endif
+ if config_nicnatsemi
+   srcs += 'nicnatsemi.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICNATSEMI=1'
+ endif
+ if config_nicrealtek
+   srcs += 'nicrealtek.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICREALTEK=1'
+ endif
+ if config_ogp_spi
+   config_bitbang_spi = true
+   srcs += 'ogp_spi.c'
++  need_libpci = true
+   cargs += '-DCONFIG_OGP_SPI=1'
+ endif
+ if config_pickit2_spi
+   srcs += 'pickit2_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_PICKIT2_SPI=1'
+ endif
+ if config_pony_spi
+@@ -252,15 +275,18 @@
+ if config_rayer_spi
+   srcs += 'rayer_spi.c'
+   config_bitbang_spi = true
++  need_libpci = true
+   need_raw_access = true
+   cargs += '-DCONFIG_RAYER_SPI=1'
+ endif
+ if config_satamv
+   srcs += 'satamv.c'
++  need_libpci = true
+   cargs += '-DCONFIG_SATAMV=1'
+ endif
+ if config_satasii
+   srcs += 'satasii.c'
++  need_libpci = true
+   cargs += '-DCONFIG_SATASII=1'
+ endif
+ if config_serprog
+@@ -270,12 +296,19 @@
+ endif
+ if config_usbblaster_spi
+   srcs += 'usbblaster_spi.c'
++  need_libftdi = true
+   cargs += '-DCONFIG_USBBLASTER_SPI=1'
+ endif
+ if config_stlinkv3_spi
+   srcs += 'stlinkv3_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_STLINKV3_SPI=1'
+ endif
++if config_jlink_spi
++  srcs += 'jlink_spi.c'
++  cargs += '-DCONFIG_JLINK_SPI=1'
++  deps += dependency('libjaylink')
++endif
+ 
+ # bitbanging SPI infrastructure
+ if config_bitbang_spi
+@@ -296,6 +329,25 @@
+   srcs += 'serial.c'
+ endif
+ 
++# some programmers require libftdi
++if need_libftdi
++  deps += dependency('libftdi1')
++endif
++
++# some programmers require libpci
++if need_libpci
++  srcs += 'pcidev.c'
++  deps += dependency('libpci')
++  cargs += '-DNEED_PCI=1'
++endif
++
++# some programmers require libusb
++if need_libusb
++  srcs += 'usbdev.c'
++  deps += dependency('libusb-1.0')
++endif
++
++
+ prefix = get_option('prefix')
+ sbindir = join_paths(prefix, get_option('sbindir'))
+ libdir = join_paths(prefix, get_option('libdir'))
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,5 +1,6 @@
+-option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
+-option('usb', type : 'boolean', value : true, description : 'use libusb1')
++option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi')
++option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci')
++option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb')
+ 
+ option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
+ option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')
+@@ -16,6 +17,7 @@
+ option('config_internal', type : 'boolean', value : true, description : 'internal/onboard')
+ option('config_internal_dmi', type : 'boolean', value : true, description : 'Use internal DMI parser')
+ option('config_it8212', type : 'boolean', value : true, description : 'ITE IT8212F PATA')
++option('config_jlink_spi', type : 'boolean', value : false, description : 'SEGGER J-Link and compatible')
+ option('config_linux_mtd', type : 'boolean', value : true, description : 'Linux MTD interfaces')
+ option('config_linux_spi', type : 'boolean', value : true, description : 'Linux spidev interfaces')
+ option('config_mstarddc_spi', type : 'boolean', value : false, description : 'MSTAR DDC support')

diff --git a/sys-apps/flashrom/flashrom-1.2-r2.ebuild b/sys-apps/flashrom/flashrom-1.2-r2.ebuild
new file mode 100644
index 00000000000..7d87b514771
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-1.2-r2.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
+	inherit git-r3
+else
+	MY_P="${PN}-v${PV}"
+	SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="https://flashrom.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+# The defaults match the upstream meson_options.txt.
+IUSE_PROGRAMMERS="
+	atahpt
+	atapromise
+	+atavia
+	+buspirate-spi
+	+ch341a-spi
+	+dediprog
+	+developerbox-spi
+	+digilent-spi
+	+drkaiser
+	+dummy
+	+ft2232-spi
+	+gfxnvidia
+	+internal
+	+it8212
+	jlink-spi
+	+linux-mtd
+	+linux-spi
+	mstarddc-spi
+	+nic3com
+	+nicintel
+	+nicintel-eeprom
+	+nicintel-spi
+	nicnatsemi
+	+nicrealtek
+	+ogp-spi
+	+pickit2-spi
+	+pony-spi
+	+rayer-spi
+	+satamv
+	+satasii
+	+serprog
+	+stlinkv3-spi
+	+usbblaster-spi
+"
+IUSE="${IUSE_PROGRAMMERS} +internal-dmi tools"
+
+LIB_DEPEND="
+	atahpt? ( sys-apps/pciutils[static-libs(+)] )
+	atapromise? ( sys-apps/pciutils[static-libs(+)] )
+	atavia? ( sys-apps/pciutils[static-libs(+)] )
+	ch341a-spi? ( virtual/libusb:1[static-libs(+)] )
+	dediprog? ( virtual/libusb:1[static-libs(+)] )
+	developerbox-spi? ( virtual/libusb:1[static-libs(+)] )
+	digilent-spi? ( virtual/libusb:1[static-libs(+)] )
+	drkaiser? ( sys-apps/pciutils[static-libs(+)] )
+	ft2232-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
+	gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
+	internal? ( sys-apps/pciutils[static-libs(+)] )
+	it8212? ( sys-apps/pciutils[static-libs(+)] )
+	jlink-spi? ( dev-embedded/libjaylink[static-libs(+)] )
+	nic3com? ( sys-apps/pciutils[static-libs(+)] )
+	nicintel-eeprom? ( sys-apps/pciutils[static-libs(+)] )
+	nicintel-spi? ( sys-apps/pciutils[static-libs(+)] )
+	nicintel? ( sys-apps/pciutils[static-libs(+)] )
+	nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
+	nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
+	ogp-spi? ( sys-apps/pciutils[static-libs(+)] )
+	pickit2-spi? ( virtual/libusb:0[static-libs(+)] )
+	rayer-spi? ( sys-apps/pciutils[static-libs(+)] )
+	satamv? ( sys-apps/pciutils[static-libs(+)] )
+	satasii? ( sys-apps/pciutils[static-libs(+)] )
+	stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] )
+	usbblaster-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
+"
+RDEPEND="${LIB_DEPEND//\[static-libs(+)]}"
+DEPEND="${RDEPEND}
+	sys-apps/diffutils"
+RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
+
+DOCS=( README Documentation/ )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.2_meson-fixes.patch
+)
+
+src_configure() {
+	local emesonargs=(
+		$(meson_use atahpt config_atahpt)
+		$(meson_use atapromise config_atapromise)
+		$(meson_use atavia config_atavia)
+		$(meson_use buspirate-spi config_buspirate_spi)
+		$(meson_use ch341a-spi config_ch341a_spi)
+		$(meson_use dediprog config_dediprog)
+		$(meson_use developerbox-spi config_developerbox_spi)
+		$(meson_use digilent-spi config_digilent_spi)
+		$(meson_use drkaiser config_drkaiser)
+		$(meson_use dummy config_dummy)
+		$(meson_use ft2232-spi config_ft2232_spi)
+		$(meson_use gfxnvidia config_gfxnvidia)
+		$(meson_use internal config_internal)
+		$(meson_use internal-dmi config_internal_dmi)
+		$(meson_use it8212 config_it8212)
+		$(meson_use jlink-spi config_jlink_spi)
+		$(meson_use linux-mtd config_linux_mtd)
+		$(meson_use linux-spi config_linux_spi)
+		$(meson_use mstarddc-spi config_mstarddc_spi)
+		$(meson_use nic3com config_nic3com)
+		$(meson_use nicintel-eeprom config_nicintel_eeprom)
+		$(meson_use nicintel-spi config_nicintel_spi)
+		$(meson_use nicintel config_nicintel)
+		$(meson_use nicnatsemi config_nicnatsemi)
+		$(meson_use nicrealtek config_nicrealtek)
+		$(meson_use ogp-spi config_ogp_spi)
+		$(meson_use pickit2-spi config_pickit2_spi)
+		$(meson_use pony-spi config_pony_spi)
+		$(meson_use rayer-spi config_rayer_spi)
+		$(meson_use satasii config_satamv)
+		$(meson_use satamv config_satasii)
+		$(meson_use stlinkv3-spi config_stlinkv3_spi)
+		$(meson_use serprog config_serprog)
+		$(meson_use usbblaster-spi config_usbblaster_spi)
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+
+	if use tools; then
+		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
+	fi
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2020-05-02 16:37 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2020-05-02 16:37 UTC (permalink / raw
  To: gentoo-commits

commit:     36674d2c08d09829f2527026517c4d015ec5efb6
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat May  2 16:34:35 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat May  2 16:36:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36674d2c

Revert "sys-apps/flashrom: switch to building with meson"

Turns out that not only do upstream meson scripts require patching to
handle all programmers flashrom supports, they also only appear to work
on amd64. Sigh.

This reverts commit b5a312d32873362067980b2a02886a4b79d08ca6.

Bug: https://bugs.gentoo.org/720210
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../flashrom/files/flashrom-1.2_meson-fixes.patch  | 263 ---------------------
 sys-apps/flashrom/flashrom-1.2-r2.ebuild           | 147 ------------
 2 files changed, 410 deletions(-)

diff --git a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
deleted file mode 100644
index 84dec173676..00000000000
--- a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
+++ /dev/null
@@ -1,263 +0,0 @@
---- a/meson.build
-+++ b/meson.build
-@@ -44,6 +44,7 @@
- config_gfxnvidia = get_option('config_gfxnvidia')
- config_internal = get_option('config_internal')
- config_it8212 = get_option('config_it8212')
-+config_jlink_spi = get_option('config_jlink_spi')
- config_linux_mtd = get_option('config_linux_mtd')
- config_linux_spi = get_option('config_linux_spi')
- config_mstarddc_spi = get_option('config_mstarddc_spi')
-@@ -67,6 +68,9 @@
- deps = []
- srcs = []
- 
-+need_libftdi = false
-+need_libpci = false
-+need_libusb = false
- need_raw_access = false
- need_serial = false
- 
-@@ -81,24 +85,24 @@
-   add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
- endif
- 
--# some programmers require libusb
--if get_option('usb')
--  srcs += 'usbdev.c'
--  deps += dependency('libusb-1.0')
--else
-+if get_option('no_libftdi_programmers')
-+  message('Disabling ALL libftdi-based programmers')
-+  config_ft2232_spi = false
-+  config_usbblaster_spi = false
-+endif
-+
-+if get_option('no_libusb_programmers')
-+  message('Disabling ALL libusb-based programmers')
-   config_ch341a_spi = false
-   config_dediprog = false
--  config_digilent_spi = false
-   config_developerbox_spi = false
-+  config_digilent_spi = false
-   config_pickit2_spi = false
-+  config_stlinkv3_spi = false
- endif
- 
--# some programmers require libpci
--if get_option('pciutils')
--  srcs += 'pcidev.c'
--  deps += dependency('libpci')
--  cargs += '-DNEED_PCI=1'
--else
-+if get_option('no_libpci_programmers')
-+  message('Disabling ALL libpci-based programmers')
-   config_atahpt = false
-   config_atapromise = false
-   config_atavia = false
-@@ -121,14 +125,17 @@
- # set defines for configured programmers
- if config_atahpt
-   srcs += 'atahpt.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_ATAHPT=1'
- endif
- if config_atapromise
-   srcs += 'atapromise.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_ATAPROMISE=1'
- endif
- if config_atavia
-   srcs += 'atavia.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_ATAVIA=1'
- endif
- if config_buspirate_spi
-@@ -138,22 +145,27 @@
- endif
- if config_ch341a_spi
-   srcs += 'ch341a_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_CH341A_SPI=1'
- endif
- if config_dediprog
-   srcs += 'dediprog.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DEDIPROG=1'
- endif
- if config_developerbox_spi
-   srcs += 'developerbox_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DEVELOPERBOX_SPI=1'
- endif
- if config_digilent_spi
-   srcs += 'digilent_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DIGILENT_SPI=1'
- endif
- if config_drkaiser
-   srcs += 'drkaiser.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_DRKAISER=1'
- endif
- if config_dummy
-@@ -162,12 +174,13 @@
- endif
- if config_ft2232_spi
-   srcs += 'ft2232_spi.c'
-+  need_libftdi = true
-   cargs += '-DCONFIG_FT2232_SPI=1'
--  deps += dependency('libftdi1')
-   cargs += '-DHAVE_FT232H=1'
- endif
- if config_gfxnvidia
-   srcs += 'gfxnvidia.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_GFXNVIDIA=1'
- endif
- if config_internal
-@@ -186,6 +199,7 @@
-     srcs += 'sb600spi.c'
-     srcs += 'wbsio_spi.c'
-   endif
-+  need_libpci = true
-   config_bitbang_spi = true
-   cargs += '-DCONFIG_INTERNAL=1'
-   if get_option('config_internal_dmi')
-@@ -195,6 +209,7 @@
- endif
- if config_it8212
-   srcs += 'it8212.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_IT8212=1'
- endif
- if config_linux_mtd
-@@ -211,36 +226,44 @@
- endif
- if config_nic3com
-   srcs += 'nic3com.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NIC3COM=1'
- endif
- if config_nicintel
-   srcs += 'nicintel.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICINTEL=1'
- endif
- if config_nicintel_eeprom
-   srcs += 'nicintel_eeprom.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICINTEL_EEPROM=1'
- endif
- if config_nicintel_spi
-   srcs += 'nicintel_spi.c'
-+  need_libpci = true
-   config_bitbang_spi = true
-   cargs += '-DCONFIG_NICINTEL_SPI=1'
- endif
- if config_nicnatsemi
-   srcs += 'nicnatsemi.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICNATSEMI=1'
- endif
- if config_nicrealtek
-   srcs += 'nicrealtek.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICREALTEK=1'
- endif
- if config_ogp_spi
-   config_bitbang_spi = true
-   srcs += 'ogp_spi.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_OGP_SPI=1'
- endif
- if config_pickit2_spi
-   srcs += 'pickit2_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_PICKIT2_SPI=1'
- endif
- if config_pony_spi
-@@ -252,15 +275,18 @@
- if config_rayer_spi
-   srcs += 'rayer_spi.c'
-   config_bitbang_spi = true
-+  need_libpci = true
-   need_raw_access = true
-   cargs += '-DCONFIG_RAYER_SPI=1'
- endif
- if config_satamv
-   srcs += 'satamv.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_SATAMV=1'
- endif
- if config_satasii
-   srcs += 'satasii.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_SATASII=1'
- endif
- if config_serprog
-@@ -270,12 +296,19 @@
- endif
- if config_usbblaster_spi
-   srcs += 'usbblaster_spi.c'
-+  need_libftdi = true
-   cargs += '-DCONFIG_USBBLASTER_SPI=1'
- endif
- if config_stlinkv3_spi
-   srcs += 'stlinkv3_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_STLINKV3_SPI=1'
- endif
-+if config_jlink_spi
-+  srcs += 'jlink_spi.c'
-+  cargs += '-DCONFIG_JLINK_SPI=1'
-+  deps += dependency('libjaylink')
-+endif
- 
- # bitbanging SPI infrastructure
- if config_bitbang_spi
-@@ -296,6 +329,25 @@
-   srcs += 'serial.c'
- endif
- 
-+# some programmers require libftdi
-+if need_libftdi
-+  deps += dependency('libftdi1')
-+endif
-+
-+# some programmers require libpci
-+if need_libpci
-+  srcs += 'pcidev.c'
-+  deps += dependency('libpci')
-+  cargs += '-DNEED_PCI=1'
-+endif
-+
-+# some programmers require libusb
-+if need_libusb
-+  srcs += 'usbdev.c'
-+  deps += dependency('libusb-1.0')
-+endif
-+
-+
- prefix = get_option('prefix')
- sbindir = join_paths(prefix, get_option('sbindir'))
- libdir = join_paths(prefix, get_option('libdir'))
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -1,5 +1,6 @@
--option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
--option('usb', type : 'boolean', value : true, description : 'use libusb1')
-+option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi')
-+option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci')
-+option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb')
- 
- option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
- option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')
-@@ -16,6 +17,7 @@
- option('config_internal', type : 'boolean', value : true, description : 'internal/onboard')
- option('config_internal_dmi', type : 'boolean', value : true, description : 'Use internal DMI parser')
- option('config_it8212', type : 'boolean', value : true, description : 'ITE IT8212F PATA')
-+option('config_jlink_spi', type : 'boolean', value : false, description : 'SEGGER J-Link and compatible')
- option('config_linux_mtd', type : 'boolean', value : true, description : 'Linux MTD interfaces')
- option('config_linux_spi', type : 'boolean', value : true, description : 'Linux spidev interfaces')
- option('config_mstarddc_spi', type : 'boolean', value : false, description : 'MSTAR DDC support')

diff --git a/sys-apps/flashrom/flashrom-1.2-r2.ebuild b/sys-apps/flashrom/flashrom-1.2-r2.ebuild
deleted file mode 100644
index 7d87b514771..00000000000
--- a/sys-apps/flashrom/flashrom-1.2-r2.ebuild
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit meson
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
-	inherit git-r3
-else
-	MY_P="${PN}-v${PV}"
-	SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
-	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
-HOMEPAGE="https://flashrom.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-# The defaults match the upstream meson_options.txt.
-IUSE_PROGRAMMERS="
-	atahpt
-	atapromise
-	+atavia
-	+buspirate-spi
-	+ch341a-spi
-	+dediprog
-	+developerbox-spi
-	+digilent-spi
-	+drkaiser
-	+dummy
-	+ft2232-spi
-	+gfxnvidia
-	+internal
-	+it8212
-	jlink-spi
-	+linux-mtd
-	+linux-spi
-	mstarddc-spi
-	+nic3com
-	+nicintel
-	+nicintel-eeprom
-	+nicintel-spi
-	nicnatsemi
-	+nicrealtek
-	+ogp-spi
-	+pickit2-spi
-	+pony-spi
-	+rayer-spi
-	+satamv
-	+satasii
-	+serprog
-	+stlinkv3-spi
-	+usbblaster-spi
-"
-IUSE="${IUSE_PROGRAMMERS} +internal-dmi tools"
-
-LIB_DEPEND="
-	atahpt? ( sys-apps/pciutils[static-libs(+)] )
-	atapromise? ( sys-apps/pciutils[static-libs(+)] )
-	atavia? ( sys-apps/pciutils[static-libs(+)] )
-	ch341a-spi? ( virtual/libusb:1[static-libs(+)] )
-	dediprog? ( virtual/libusb:1[static-libs(+)] )
-	developerbox-spi? ( virtual/libusb:1[static-libs(+)] )
-	digilent-spi? ( virtual/libusb:1[static-libs(+)] )
-	drkaiser? ( sys-apps/pciutils[static-libs(+)] )
-	ft2232-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
-	gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
-	internal? ( sys-apps/pciutils[static-libs(+)] )
-	it8212? ( sys-apps/pciutils[static-libs(+)] )
-	jlink-spi? ( dev-embedded/libjaylink[static-libs(+)] )
-	nic3com? ( sys-apps/pciutils[static-libs(+)] )
-	nicintel-eeprom? ( sys-apps/pciutils[static-libs(+)] )
-	nicintel-spi? ( sys-apps/pciutils[static-libs(+)] )
-	nicintel? ( sys-apps/pciutils[static-libs(+)] )
-	nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
-	nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
-	ogp-spi? ( sys-apps/pciutils[static-libs(+)] )
-	pickit2-spi? ( virtual/libusb:0[static-libs(+)] )
-	rayer-spi? ( sys-apps/pciutils[static-libs(+)] )
-	satamv? ( sys-apps/pciutils[static-libs(+)] )
-	satasii? ( sys-apps/pciutils[static-libs(+)] )
-	stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] )
-	usbblaster-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
-"
-RDEPEND="${LIB_DEPEND//\[static-libs(+)]}"
-DEPEND="${RDEPEND}
-	sys-apps/diffutils"
-RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
-
-DOCS=( README Documentation/ )
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-1.2_meson-fixes.patch
-)
-
-src_configure() {
-	local emesonargs=(
-		$(meson_use atahpt config_atahpt)
-		$(meson_use atapromise config_atapromise)
-		$(meson_use atavia config_atavia)
-		$(meson_use buspirate-spi config_buspirate_spi)
-		$(meson_use ch341a-spi config_ch341a_spi)
-		$(meson_use dediprog config_dediprog)
-		$(meson_use developerbox-spi config_developerbox_spi)
-		$(meson_use digilent-spi config_digilent_spi)
-		$(meson_use drkaiser config_drkaiser)
-		$(meson_use dummy config_dummy)
-		$(meson_use ft2232-spi config_ft2232_spi)
-		$(meson_use gfxnvidia config_gfxnvidia)
-		$(meson_use internal config_internal)
-		$(meson_use internal-dmi config_internal_dmi)
-		$(meson_use it8212 config_it8212)
-		$(meson_use jlink-spi config_jlink_spi)
-		$(meson_use linux-mtd config_linux_mtd)
-		$(meson_use linux-spi config_linux_spi)
-		$(meson_use mstarddc-spi config_mstarddc_spi)
-		$(meson_use nic3com config_nic3com)
-		$(meson_use nicintel-eeprom config_nicintel_eeprom)
-		$(meson_use nicintel-spi config_nicintel_spi)
-		$(meson_use nicintel config_nicintel)
-		$(meson_use nicnatsemi config_nicnatsemi)
-		$(meson_use nicrealtek config_nicrealtek)
-		$(meson_use ogp-spi config_ogp_spi)
-		$(meson_use pickit2-spi config_pickit2_spi)
-		$(meson_use pony-spi config_pony_spi)
-		$(meson_use rayer-spi config_rayer_spi)
-		$(meson_use satasii config_satamv)
-		$(meson_use satamv config_satasii)
-		$(meson_use stlinkv3-spi config_stlinkv3_spi)
-		$(meson_use serprog config_serprog)
-		$(meson_use usbblaster-spi config_usbblaster_spi)
-	)
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-
-	if use tools; then
-		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
-	fi
-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2020-11-09 16:22 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2020-11-09 16:22 UTC (permalink / raw
  To: gentoo-commits

commit:     b053316c6417ee2313bf324020ef4de56ec3c333
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 28 09:31:40 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Nov  9 16:18:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b053316c

sys-apps/flashrom: reintroduce a meson-based 1.2 ebuild

Still doesn't work with most, if not all, non-x86 arches - but if the
alternative is messing with the upstream Makefile in order to address
problems such as Bug #753383, I would rather work on fixing Meson
scripts.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../flashrom/files/flashrom-1.2_meson-fixes.patch  | 263 +++++++++++++++++++++
 sys-apps/flashrom/flashrom-1.2-r3.ebuild           | 147 ++++++++++++
 2 files changed, 410 insertions(+)

diff --git a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
new file mode 100644
index 00000000000..84dec173676
--- /dev/null
+++ b/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
@@ -0,0 +1,263 @@
+--- a/meson.build
++++ b/meson.build
+@@ -44,6 +44,7 @@
+ config_gfxnvidia = get_option('config_gfxnvidia')
+ config_internal = get_option('config_internal')
+ config_it8212 = get_option('config_it8212')
++config_jlink_spi = get_option('config_jlink_spi')
+ config_linux_mtd = get_option('config_linux_mtd')
+ config_linux_spi = get_option('config_linux_spi')
+ config_mstarddc_spi = get_option('config_mstarddc_spi')
+@@ -67,6 +68,9 @@
+ deps = []
+ srcs = []
+ 
++need_libftdi = false
++need_libpci = false
++need_libusb = false
+ need_raw_access = false
+ need_serial = false
+ 
+@@ -81,24 +85,24 @@
+   add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
+ endif
+ 
+-# some programmers require libusb
+-if get_option('usb')
+-  srcs += 'usbdev.c'
+-  deps += dependency('libusb-1.0')
+-else
++if get_option('no_libftdi_programmers')
++  message('Disabling ALL libftdi-based programmers')
++  config_ft2232_spi = false
++  config_usbblaster_spi = false
++endif
++
++if get_option('no_libusb_programmers')
++  message('Disabling ALL libusb-based programmers')
+   config_ch341a_spi = false
+   config_dediprog = false
+-  config_digilent_spi = false
+   config_developerbox_spi = false
++  config_digilent_spi = false
+   config_pickit2_spi = false
++  config_stlinkv3_spi = false
+ endif
+ 
+-# some programmers require libpci
+-if get_option('pciutils')
+-  srcs += 'pcidev.c'
+-  deps += dependency('libpci')
+-  cargs += '-DNEED_PCI=1'
+-else
++if get_option('no_libpci_programmers')
++  message('Disabling ALL libpci-based programmers')
+   config_atahpt = false
+   config_atapromise = false
+   config_atavia = false
+@@ -121,14 +125,17 @@
+ # set defines for configured programmers
+ if config_atahpt
+   srcs += 'atahpt.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAHPT=1'
+ endif
+ if config_atapromise
+   srcs += 'atapromise.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAPROMISE=1'
+ endif
+ if config_atavia
+   srcs += 'atavia.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAVIA=1'
+ endif
+ if config_buspirate_spi
+@@ -138,22 +145,27 @@
+ endif
+ if config_ch341a_spi
+   srcs += 'ch341a_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_CH341A_SPI=1'
+ endif
+ if config_dediprog
+   srcs += 'dediprog.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DEDIPROG=1'
+ endif
+ if config_developerbox_spi
+   srcs += 'developerbox_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DEVELOPERBOX_SPI=1'
+ endif
+ if config_digilent_spi
+   srcs += 'digilent_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DIGILENT_SPI=1'
+ endif
+ if config_drkaiser
+   srcs += 'drkaiser.c'
++  need_libpci = true
+   cargs += '-DCONFIG_DRKAISER=1'
+ endif
+ if config_dummy
+@@ -162,12 +174,13 @@
+ endif
+ if config_ft2232_spi
+   srcs += 'ft2232_spi.c'
++  need_libftdi = true
+   cargs += '-DCONFIG_FT2232_SPI=1'
+-  deps += dependency('libftdi1')
+   cargs += '-DHAVE_FT232H=1'
+ endif
+ if config_gfxnvidia
+   srcs += 'gfxnvidia.c'
++  need_libpci = true
+   cargs += '-DCONFIG_GFXNVIDIA=1'
+ endif
+ if config_internal
+@@ -186,6 +199,7 @@
+     srcs += 'sb600spi.c'
+     srcs += 'wbsio_spi.c'
+   endif
++  need_libpci = true
+   config_bitbang_spi = true
+   cargs += '-DCONFIG_INTERNAL=1'
+   if get_option('config_internal_dmi')
+@@ -195,6 +209,7 @@
+ endif
+ if config_it8212
+   srcs += 'it8212.c'
++  need_libpci = true
+   cargs += '-DCONFIG_IT8212=1'
+ endif
+ if config_linux_mtd
+@@ -211,36 +226,44 @@
+ endif
+ if config_nic3com
+   srcs += 'nic3com.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NIC3COM=1'
+ endif
+ if config_nicintel
+   srcs += 'nicintel.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICINTEL=1'
+ endif
+ if config_nicintel_eeprom
+   srcs += 'nicintel_eeprom.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICINTEL_EEPROM=1'
+ endif
+ if config_nicintel_spi
+   srcs += 'nicintel_spi.c'
++  need_libpci = true
+   config_bitbang_spi = true
+   cargs += '-DCONFIG_NICINTEL_SPI=1'
+ endif
+ if config_nicnatsemi
+   srcs += 'nicnatsemi.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICNATSEMI=1'
+ endif
+ if config_nicrealtek
+   srcs += 'nicrealtek.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICREALTEK=1'
+ endif
+ if config_ogp_spi
+   config_bitbang_spi = true
+   srcs += 'ogp_spi.c'
++  need_libpci = true
+   cargs += '-DCONFIG_OGP_SPI=1'
+ endif
+ if config_pickit2_spi
+   srcs += 'pickit2_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_PICKIT2_SPI=1'
+ endif
+ if config_pony_spi
+@@ -252,15 +275,18 @@
+ if config_rayer_spi
+   srcs += 'rayer_spi.c'
+   config_bitbang_spi = true
++  need_libpci = true
+   need_raw_access = true
+   cargs += '-DCONFIG_RAYER_SPI=1'
+ endif
+ if config_satamv
+   srcs += 'satamv.c'
++  need_libpci = true
+   cargs += '-DCONFIG_SATAMV=1'
+ endif
+ if config_satasii
+   srcs += 'satasii.c'
++  need_libpci = true
+   cargs += '-DCONFIG_SATASII=1'
+ endif
+ if config_serprog
+@@ -270,12 +296,19 @@
+ endif
+ if config_usbblaster_spi
+   srcs += 'usbblaster_spi.c'
++  need_libftdi = true
+   cargs += '-DCONFIG_USBBLASTER_SPI=1'
+ endif
+ if config_stlinkv3_spi
+   srcs += 'stlinkv3_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_STLINKV3_SPI=1'
+ endif
++if config_jlink_spi
++  srcs += 'jlink_spi.c'
++  cargs += '-DCONFIG_JLINK_SPI=1'
++  deps += dependency('libjaylink')
++endif
+ 
+ # bitbanging SPI infrastructure
+ if config_bitbang_spi
+@@ -296,6 +329,25 @@
+   srcs += 'serial.c'
+ endif
+ 
++# some programmers require libftdi
++if need_libftdi
++  deps += dependency('libftdi1')
++endif
++
++# some programmers require libpci
++if need_libpci
++  srcs += 'pcidev.c'
++  deps += dependency('libpci')
++  cargs += '-DNEED_PCI=1'
++endif
++
++# some programmers require libusb
++if need_libusb
++  srcs += 'usbdev.c'
++  deps += dependency('libusb-1.0')
++endif
++
++
+ prefix = get_option('prefix')
+ sbindir = join_paths(prefix, get_option('sbindir'))
+ libdir = join_paths(prefix, get_option('libdir'))
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,5 +1,6 @@
+-option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
+-option('usb', type : 'boolean', value : true, description : 'use libusb1')
++option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi')
++option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci')
++option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb')
+ 
+ option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
+ option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')
+@@ -16,6 +17,7 @@
+ option('config_internal', type : 'boolean', value : true, description : 'internal/onboard')
+ option('config_internal_dmi', type : 'boolean', value : true, description : 'Use internal DMI parser')
+ option('config_it8212', type : 'boolean', value : true, description : 'ITE IT8212F PATA')
++option('config_jlink_spi', type : 'boolean', value : false, description : 'SEGGER J-Link and compatible')
+ option('config_linux_mtd', type : 'boolean', value : true, description : 'Linux MTD interfaces')
+ option('config_linux_spi', type : 'boolean', value : true, description : 'Linux spidev interfaces')
+ option('config_mstarddc_spi', type : 'boolean', value : false, description : 'MSTAR DDC support')

diff --git a/sys-apps/flashrom/flashrom-1.2-r3.ebuild b/sys-apps/flashrom/flashrom-1.2-r3.ebuild
new file mode 100644
index 00000000000..7d87b514771
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-1.2-r3.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
+	inherit git-r3
+else
+	MY_P="${PN}-v${PV}"
+	SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="https://flashrom.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+# The defaults match the upstream meson_options.txt.
+IUSE_PROGRAMMERS="
+	atahpt
+	atapromise
+	+atavia
+	+buspirate-spi
+	+ch341a-spi
+	+dediprog
+	+developerbox-spi
+	+digilent-spi
+	+drkaiser
+	+dummy
+	+ft2232-spi
+	+gfxnvidia
+	+internal
+	+it8212
+	jlink-spi
+	+linux-mtd
+	+linux-spi
+	mstarddc-spi
+	+nic3com
+	+nicintel
+	+nicintel-eeprom
+	+nicintel-spi
+	nicnatsemi
+	+nicrealtek
+	+ogp-spi
+	+pickit2-spi
+	+pony-spi
+	+rayer-spi
+	+satamv
+	+satasii
+	+serprog
+	+stlinkv3-spi
+	+usbblaster-spi
+"
+IUSE="${IUSE_PROGRAMMERS} +internal-dmi tools"
+
+LIB_DEPEND="
+	atahpt? ( sys-apps/pciutils[static-libs(+)] )
+	atapromise? ( sys-apps/pciutils[static-libs(+)] )
+	atavia? ( sys-apps/pciutils[static-libs(+)] )
+	ch341a-spi? ( virtual/libusb:1[static-libs(+)] )
+	dediprog? ( virtual/libusb:1[static-libs(+)] )
+	developerbox-spi? ( virtual/libusb:1[static-libs(+)] )
+	digilent-spi? ( virtual/libusb:1[static-libs(+)] )
+	drkaiser? ( sys-apps/pciutils[static-libs(+)] )
+	ft2232-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
+	gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
+	internal? ( sys-apps/pciutils[static-libs(+)] )
+	it8212? ( sys-apps/pciutils[static-libs(+)] )
+	jlink-spi? ( dev-embedded/libjaylink[static-libs(+)] )
+	nic3com? ( sys-apps/pciutils[static-libs(+)] )
+	nicintel-eeprom? ( sys-apps/pciutils[static-libs(+)] )
+	nicintel-spi? ( sys-apps/pciutils[static-libs(+)] )
+	nicintel? ( sys-apps/pciutils[static-libs(+)] )
+	nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
+	nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
+	ogp-spi? ( sys-apps/pciutils[static-libs(+)] )
+	pickit2-spi? ( virtual/libusb:0[static-libs(+)] )
+	rayer-spi? ( sys-apps/pciutils[static-libs(+)] )
+	satamv? ( sys-apps/pciutils[static-libs(+)] )
+	satasii? ( sys-apps/pciutils[static-libs(+)] )
+	stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] )
+	usbblaster-spi? ( dev-embedded/libftdi:=[static-libs(+)] )
+"
+RDEPEND="${LIB_DEPEND//\[static-libs(+)]}"
+DEPEND="${RDEPEND}
+	sys-apps/diffutils"
+RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
+
+DOCS=( README Documentation/ )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.2_meson-fixes.patch
+)
+
+src_configure() {
+	local emesonargs=(
+		$(meson_use atahpt config_atahpt)
+		$(meson_use atapromise config_atapromise)
+		$(meson_use atavia config_atavia)
+		$(meson_use buspirate-spi config_buspirate_spi)
+		$(meson_use ch341a-spi config_ch341a_spi)
+		$(meson_use dediprog config_dediprog)
+		$(meson_use developerbox-spi config_developerbox_spi)
+		$(meson_use digilent-spi config_digilent_spi)
+		$(meson_use drkaiser config_drkaiser)
+		$(meson_use dummy config_dummy)
+		$(meson_use ft2232-spi config_ft2232_spi)
+		$(meson_use gfxnvidia config_gfxnvidia)
+		$(meson_use internal config_internal)
+		$(meson_use internal-dmi config_internal_dmi)
+		$(meson_use it8212 config_it8212)
+		$(meson_use jlink-spi config_jlink_spi)
+		$(meson_use linux-mtd config_linux_mtd)
+		$(meson_use linux-spi config_linux_spi)
+		$(meson_use mstarddc-spi config_mstarddc_spi)
+		$(meson_use nic3com config_nic3com)
+		$(meson_use nicintel-eeprom config_nicintel_eeprom)
+		$(meson_use nicintel-spi config_nicintel_spi)
+		$(meson_use nicintel config_nicintel)
+		$(meson_use nicnatsemi config_nicnatsemi)
+		$(meson_use nicrealtek config_nicrealtek)
+		$(meson_use ogp-spi config_ogp_spi)
+		$(meson_use pickit2-spi config_pickit2_spi)
+		$(meson_use pony-spi config_pony_spi)
+		$(meson_use rayer-spi config_rayer_spi)
+		$(meson_use satasii config_satamv)
+		$(meson_use satamv config_satasii)
+		$(meson_use stlinkv3-spi config_stlinkv3_spi)
+		$(meson_use serprog config_serprog)
+		$(meson_use usbblaster-spi config_usbblaster_spi)
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+
+	if use tools; then
+		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
+	fi
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2020-11-09 17:42 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2020-11-09 17:42 UTC (permalink / raw
  To: gentoo-commits

commit:     0202348e1e89c3ee6459dc8f6dafca5a2cedaa29
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  9 17:31:56 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Nov  9 17:41:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0202348e

sys-apps/flashrom-1.2-r3: install the man page

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/flashrom-1.2_meson-install-manpage.patch | 43 ++++++++++++++++++++++
 sys-apps/flashrom/flashrom-1.2-r3.ebuild           |  1 +
 2 files changed, 44 insertions(+)

diff --git a/sys-apps/flashrom/files/flashrom-1.2_meson-install-manpage.patch b/sys-apps/flashrom/files/flashrom-1.2_meson-install-manpage.patch
new file mode 100644
index 00000000000..8783cfeefa7
--- /dev/null
+++ b/sys-apps/flashrom/files/flashrom-1.2_meson-install-manpage.patch
@@ -0,0 +1,43 @@
+This is essentially the upstream commit 7aea04f7099ad4dde7b1f5900b54ef603eadf25e,
+modified so that MAN_DATE is set to simply '-' - the commit generates
+the date using the script util/getrevision.sh, which is not included in
+release tarballs.
+
+--- a/flashrom.8.tmpl
++++ b/flashrom.8.tmpl
+@@ -40,7 +40,7 @@
+ .    \}
+ .  \}
+ ..
+-.TH FLASHROM 8 "" ""
++.TH FLASHROM 8 "@MAN_DATE@" "@VERSION@" "@MAN_DATE@"
+ .SH NAME
+ flashrom \- detect, read, write, verify and erase flash chips
+ .SH SYNOPSIS
+--- a/meson.build
++++ b/meson.build
+@@ -321,6 +321,7 @@ endif
+ prefix = get_option('prefix')
+ sbindir = join_paths(prefix, get_option('sbindir'))
+ libdir = join_paths(prefix, get_option('libdir'))
++mandir = join_paths(prefix, get_option('mandir'))
+ 
+ install_headers([
+     'libflashrom.h',
+@@ -394,6 +395,16 @@ pkgg.generate(
+   description : 'library to interact with flashrom',
+ )
+ 
++conf.set('VERSION', version)
++conf.set('MAN_DATE', '-')
++configure_file(
++  input : 'flashrom.8.tmpl',
++  output : 'flashrom.8',
++  configuration : conf,
++  install: true,
++  install_dir: join_paths(mandir, 'man8'),
++)
++
+ flashrom_dep = declare_dependency(
+   link_with : flashrom,
+   include_directories : include_directories('.'),

diff --git a/sys-apps/flashrom/flashrom-1.2-r3.ebuild b/sys-apps/flashrom/flashrom-1.2-r3.ebuild
index 7d87b514771..732c1ed8d28 100644
--- a/sys-apps/flashrom/flashrom-1.2-r3.ebuild
+++ b/sys-apps/flashrom/flashrom-1.2-r3.ebuild
@@ -96,6 +96,7 @@ DOCS=( README Documentation/ )
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.2_meson-fixes.patch
+	"${FILESDIR}"/${PN}-1.2_meson-install-manpage.patch
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2021-05-17 12:58 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2021-05-17 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     5c80fe109a9f39146e37ad4fa4bbfd809d72e4ce
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon May 17 12:57:07 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon May 17 12:58:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c80fe10

sys-apps/flashrom: migrate the live ebuild to Meson

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../flashrom/files/flashrom-9999_meson-fixes.patch | 263 +++++++++++++++++++++
 sys-apps/flashrom/flashrom-9999.ebuild             | 119 +++++-----
 2 files changed, 322 insertions(+), 60 deletions(-)

diff --git a/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch
new file mode 100644
index 00000000000..64d2cebff54
--- /dev/null
+++ b/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch
@@ -0,0 +1,263 @@
+--- a/meson.build
++++ b/meson.build
+@@ -2,7 +2,7 @@ project('flashromutils', 'c',
+   version : run_command('util/getversion.sh', '-v').stdout().strip(),
+   license : 'GPL-2.0',
+   meson_version : '>=0.50.0',
+-  default_options : ['warning_level=2', 'c_std=c99'],
++  default_options : ['warning_level=2', 'c_std=gnu99'],
+ )
+ 
+ # libtool versioning
+@@ -74,6 +74,10 @@ cargs = []
+ deps = []
+ srcs = []
+ 
++config_bitbang_spi = false
++need_libftdi = false
++need_libpci = false
++need_libusb = false
+ need_raw_access = false
+ need_serial = false
+ 
+@@ -88,27 +92,25 @@ if cc.check_header('sys/utsname.h')
+   add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
+ endif
+ 
+-# some programmers require libusb
+-if get_option('usb')
+-  srcs += 'usbdev.c'
+-  srcs += 'usb_device.c'
+-  deps += dependency('libusb-1.0')
+-else
++if get_option('no_libftdi_programmers')
++  message('Disabling ALL libftdi-based programmers')
++  config_ft2232_spi = false
++  config_usbblaster_spi = false
++endif
++
++if get_option('no_libusb_programmers')
++  message('Disabling ALL libusb-based programmers')
+   config_ch341a_spi = false
+   config_dediprog = false
+   config_digilent_spi = false
+   config_developerbox_spi = false
+   config_pickit2_spi = false
+   config_raiden_debug_spi = false
++  config_stlinkv3_spi = false
+ endif
+ 
+-# some programmers require libpci
+-if get_option('pciutils')
+-  srcs += 'pcidev.c'
+-  deps += dependency('libpci')
+-  need_raw_access = true
+-  cargs += '-DNEED_PCI=1'
+-else
++if get_option('no_libpci_programmers')
++  message('Disabling ALL libpci-based programmers')
+   config_atahpt = false
+   config_atapromise = false
+   config_atavia = false
+@@ -130,14 +132,17 @@ endif
+ # set defines for configured programmers
+ if config_atahpt
+   srcs += 'atahpt.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAHPT=1'
+ endif
+ if config_atapromise
+   srcs += 'atapromise.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAPROMISE=1'
+ endif
+ if config_atavia
+   srcs += 'atavia.c'
++  need_libpci = true
+   cargs += '-DCONFIG_ATAVIA=1'
+ endif
+ if config_buspirate_spi
+@@ -147,18 +152,22 @@ if config_buspirate_spi
+ endif
+ if config_ch341a_spi
+   srcs += 'ch341a_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_CH341A_SPI=1'
+ endif
+ if config_dediprog
+   srcs += 'dediprog.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DEDIPROG=1'
+ endif
+ if config_developerbox_spi
+   srcs += 'developerbox_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DEVELOPERBOX_SPI=1'
+ endif
+ if config_digilent_spi
+   srcs += 'digilent_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_DIGILENT_SPI=1'
+ endif
+ if config_jlink_spi
+@@ -168,6 +177,7 @@ if config_jlink_spi
+ endif
+ if config_drkaiser
+   srcs += 'drkaiser.c'
++  need_libpci = true
+   cargs += '-DCONFIG_DRKAISER=1'
+ endif
+ if config_dummy
+@@ -176,16 +186,18 @@ if config_dummy
+ endif
+ if config_ft2232_spi
+   srcs += 'ft2232_spi.c'
++  need_libftdi = true
+   cargs += '-DCONFIG_FT2232_SPI=1'
+-  deps += dependency('libftdi1')
+   cargs += '-DHAVE_FT232H=1'
+ endif
+ if config_gfxnvidia
+   srcs += 'gfxnvidia.c'
++  need_libpci = true
+   cargs += '-DCONFIG_GFXNVIDIA=1'
+ endif
+ if config_raiden_debug_spi
+   srcs += 'raiden_debug_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_RAIDEN_DEBUG_SPI=1'
+ endif
+ if config_internal
+@@ -204,6 +216,7 @@ if config_internal
+     srcs += 'sb600spi.c'
+     srcs += 'wbsio_spi.c'
+   endif
++  need_libpci = true
+   config_bitbang_spi = true
+   cargs += '-DCONFIG_INTERNAL=1'
+   if get_option('config_internal_dmi')
+@@ -217,6 +230,7 @@ if config_ene_lpc
+ endif
+ if config_it8212
+   srcs += 'it8212.c'
++  need_libpci = true
+   cargs += '-DCONFIG_IT8212=1'
+ endif
+ if config_linux_mtd
+@@ -237,36 +251,44 @@ if config_mstarddc_spi
+ endif
+ if config_nic3com
+   srcs += 'nic3com.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NIC3COM=1'
+ endif
+ if config_nicintel
+   srcs += 'nicintel.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICINTEL=1'
+ endif
+ if config_nicintel_eeprom
+   srcs += 'nicintel_eeprom.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICINTEL_EEPROM=1'
+ endif
+ if config_nicintel_spi
+   srcs += 'nicintel_spi.c'
++  need_libpci = true
+   config_bitbang_spi = true
+   cargs += '-DCONFIG_NICINTEL_SPI=1'
+ endif
+ if config_nicnatsemi
+   srcs += 'nicnatsemi.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICNATSEMI=1'
+ endif
+ if config_nicrealtek
+   srcs += 'nicrealtek.c'
++  need_libpci = true
+   cargs += '-DCONFIG_NICREALTEK=1'
+ endif
+ if config_ogp_spi
+   config_bitbang_spi = true
+   srcs += 'ogp_spi.c'
++  need_libpci = true
+   cargs += '-DCONFIG_OGP_SPI=1'
+ endif
+ if config_pickit2_spi
+   srcs += 'pickit2_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_PICKIT2_SPI=1'
+ endif
+ if config_pony_spi
+@@ -283,10 +305,12 @@ if config_rayer_spi
+ endif
+ if config_satamv
+   srcs += 'satamv.c'
++  need_libpci = true
+   cargs += '-DCONFIG_SATAMV=1'
+ endif
+ if config_satasii
+   srcs += 'satasii.c'
++  need_libpci = true
+   cargs += '-DCONFIG_SATASII=1'
+ endif
+ if config_serprog
+@@ -296,10 +320,12 @@ if config_serprog
+ endif
+ if config_usbblaster_spi
+   srcs += 'usbblaster_spi.c'
++  need_libftdi = true
+   cargs += '-DCONFIG_USBBLASTER_SPI=1'
+ endif
+ if config_stlinkv3_spi
+   srcs += 'stlinkv3_spi.c'
++  need_libusb = true
+   cargs += '-DCONFIG_STLINKV3_SPI=1'
+ endif
+ if config_lspcon_i2c_spi
+@@ -322,6 +348,26 @@ if host_machine.system() == 'linux'
+   cargs += '-DCONFIG_I2C_SUPPORT=1'
+ endif
+ 
++# some programmers require libftdi
++if need_libftdi
++  deps += dependency('libftdi1')
++endif
++
++# some programmers require libpci
++if need_libpci
++  srcs += 'pcidev.c'
++  deps += dependency('libpci')
++  need_raw_access = true
++  cargs += '-DNEED_PCI=1'
++endif
++
++# some programmers require libusb
++if need_libusb
++  srcs += 'usbdev.c'
++  srcs += 'usb_device.c'
++  deps += dependency('libusb-1.0')
++endif
++
+ # raw memory, MSR or PCI port I/O access
+ if need_raw_access
+   srcs += 'hwaccess.c'
+@@ -335,6 +381,7 @@ if need_serial
+   srcs += 'serial.c'
+ endif
+ 
++
+ prefix = get_option('prefix')
+ sbindir = join_paths(prefix, get_option('sbindir'))
+ libdir = join_paths(prefix, get_option('libdir'))
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,5 +1,6 @@
+-option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
+-option('usb', type : 'boolean', value : true, description : 'use libusb1')
++option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi')
++option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci')
++option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb')
+ option('print_wiki', type : 'boolean', value : true,  description : 'Print Wiki')
+ 
+ option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')

diff --git a/sys-apps/flashrom/flashrom-9999.ebuild b/sys-apps/flashrom/flashrom-9999.ebuild
index fe588c7916e..293b7023f21 100644
--- a/sys-apps/flashrom/flashrom-9999.ebuild
+++ b/sys-apps/flashrom/flashrom-9999.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=7
 
-inherit toolchain-funcs
+inherit meson
+
 if [[ ${PV} == "9999" ]] ; then
 	EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
 	inherit git-r3
@@ -19,12 +20,11 @@ HOMEPAGE="https://flashrom.org/"
 
 LICENSE="GPL-2"
 SLOT="0"
-# The defaults match the upstream Makefile.
-# Note: Do not list bitbang_spi as it is not a programmer; it's a backend used
-# by some other spi programmers.
+
+# The defaults match the upstream meson_options.txt.
 IUSE_PROGRAMMERS="
 	atahpt
-	+atapromise
+	atapromise
 	+atavia
 	+buspirate-spi
 	+ch341a-spi
@@ -59,11 +59,10 @@ IUSE_PROGRAMMERS="
 	+satamv
 	+satasii
 	+serprog
-	stlinkv3-spi
+	+stlinkv3-spi
 	+usbblaster-spi
 "
-
-IUSE="${IUSE_PROGRAMMERS} +internal-dmi static tools +wiki"
+IUSE="${IUSE_PROGRAMMERS} +internal-dmi tools +wiki"
 
 LIB_DEPEND="
 	atahpt? ( sys-apps/pciutils[static-libs(+)] )
@@ -87,74 +86,74 @@ LIB_DEPEND="
 	nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
 	ogp-spi? ( sys-apps/pciutils[static-libs(+)] )
 	pickit2-spi? ( virtual/libusb:0[static-libs(+)] )
+	raiden-debug-spi? ( virtual/libusb:0[static-libs(+)] )
 	rayer-spi? ( sys-apps/pciutils[static-libs(+)] )
 	satamv? ( sys-apps/pciutils[static-libs(+)] )
 	satasii? ( sys-apps/pciutils[static-libs(+)] )
 	stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] )
 	usbblaster-spi? ( dev-embedded/libftdi:1=[static-libs(+)] )
 "
-RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+RDEPEND="${LIB_DEPEND//\[static-libs(+)]}"
 DEPEND="${RDEPEND}
-	static? ( ${LIB_DEPEND} )
 	sys-apps/diffutils"
-BDEPEND="virtual/pkgconfig"
 RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
 
-_flashrom_enable() {
-	local c="CONFIG_${2:-$(echo "$1" | tr '[:lower:]-' '[:upper:]_')}"
-	args+=( "${c}=$(usex $1 yes no)" )
-}
-flashrom_enable() {
-	local u
-	for u ; do _flashrom_enable "${u}" ; done
-}
+DOCS=( README Documentation/ )
 
-src_compile() {
-	# Help keep things in sync.
-	local sprogs=$(echo $(
-		grep -o 'CONFIG_[A-Z0-9_]*' flashrom.c | \
-			LC_ALL=C sort -u | \
-			sed 's:^CONFIG_::' | \
-			tr '[:upper:]_' '[:lower:]-' | \
-			grep -v ni845x-spi))
-	local eprogs=$(echo ${IUSE_PROGRAMMERS} | sed -E 's/\B[-+]\b//g')
-	if [[ ${sprogs} != "${eprogs}" ]] ; then
-		eerror "The ebuild needs to be kept in sync."
-		eerror "IUSE set to: ${eprogs}"
-		eerror "flashrom.c : ${sprogs}"
-		die "sync IUSE to the list of source programmers"
-	fi
-
-	# Turn USE flags into CONFIG_xxx settings.
-	local args=()
-	flashrom_enable ${eprogs}
-	_flashrom_enable wiki PRINT_WIKI
-	_flashrom_enable static STATIC
-
-	# You have to specify at least one programmer, and if you specify more than
-	# one programmer you have to include either dummy or internal in the list.
-	# We pick dummy as the default because internal requires libpci.
-	if ! use internal && ! use dummy ; then
-		if [[ ${#args[@]} -ne 1 ]] ; then
-			ewarn "You have to specify at least one programmer, and if you specify"
-			ewarn "more than one programmer, you have to enable either dummy or"
-			ewarn "internal as well.  'dummy' will be the default now."
-			args+=( CONFIG_DUMMY=yes )
-		fi
-	fi
+PATCHES=(
+	"${FILESDIR}"/${PN}-9999_meson-fixes.patch
+)
 
-	tc-export AR CC PKG_CONFIG RANLIB
-	emake WARNERROR=no "${args[@]}" all libflashrom.a
+src_configure() {
+	local emesonargs=(
+		$(meson_use atahpt config_atahpt)
+		$(meson_use atapromise config_atapromise)
+		$(meson_use atavia config_atavia)
+		$(meson_use buspirate-spi config_buspirate_spi)
+		$(meson_use ch341a-spi config_ch341a_spi)
+		$(meson_use dediprog config_dediprog)
+		$(meson_use developerbox-spi config_developerbox_spi)
+		$(meson_use digilent-spi config_digilent_spi)
+		$(meson_use drkaiser config_drkaiser)
+		$(meson_use dummy config_dummy)
+		$(meson_use ene-lpc config_ene_lpc)
+		$(meson_use ft2232-spi config_ft2232_spi)
+		$(meson_use gfxnvidia config_gfxnvidia)
+		$(meson_use internal config_internal)
+		$(meson_use internal-dmi config_internal_dmi)
+		$(meson_use it8212 config_it8212)
+		$(meson_use jlink-spi config_jlink_spi)
+		$(meson_use linux-mtd config_linux_mtd)
+		$(meson_use linux-spi config_linux_spi)
+		$(meson_use lspcon-i2c-spi config_lspcon_i2c_spi)
+		$(meson_use mec1308 config_mec1308)
+		$(meson_use mstarddc-spi config_mstarddc_spi)
+		$(meson_use nic3com config_nic3com)
+		$(meson_use nicintel-eeprom config_nicintel_eeprom)
+		$(meson_use nicintel-spi config_nicintel_spi)
+		$(meson_use nicintel config_nicintel)
+		$(meson_use nicnatsemi config_nicnatsemi)
+		$(meson_use nicrealtek config_nicrealtek)
+		$(meson_use ogp-spi config_ogp_spi)
+		$(meson_use pickit2-spi config_pickit2_spi)
+		$(meson_use pony-spi config_pony_spi)
+		$(meson_use raiden-debug-spi config_raiden_debug_spi)
+		$(meson_use rayer-spi config_rayer_spi)
+		$(meson_use realtek-mst-i2c-spi config_realtek_mst_i2c_spi)
+		$(meson_use satamv config_satamv)
+		$(meson_use satasii config_satasii)
+		$(meson_use stlinkv3-spi config_stlinkv3_spi)
+		$(meson_use serprog config_serprog)
+		$(meson_use usbblaster-spi config_usbblaster_spi)
+		$(meson_use wiki print_wiki)
+	)
+	meson_src_configure
 }
 
 src_install() {
-	dosbin flashrom
-	doman flashrom.8
-	dodoc README Documentation/*.txt
-	dolib.a libflashrom.a
-	doheader libflashrom.h
+	meson_src_install
 
 	if use tools; then
-		dosbin util/ich_descriptors_tool/ich_descriptors_tool
+		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
 	fi
 }


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2021-11-16 15:06 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2021-11-16 15:06 UTC (permalink / raw
  To: gentoo-commits

commit:     79dea382ce9cc55c44b2f9d8d256f1615112eb5c
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 16 15:05:46 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Nov 16 15:05:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79dea382

sys-apps/flashrom-9999: do not auto-build tests if cmocka is present

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../flashrom/files/flashrom-9999_meson-fixes.patch | 54 ++++++++++++++++------
 sys-apps/flashrom/flashrom-9999.ebuild             |  2 +-
 2 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch
index 63c2e2ef7553..7651585f4f6a 100644
--- a/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch
+++ b/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch
@@ -9,7 +9,7 @@
  )
  
  # libtool versioning
-@@ -74,6 +74,10 @@ cargs = []
+@@ -105,6 +105,10 @@ cargs = []
  deps = []
  srcs = []
  
@@ -20,7 +20,7 @@
  need_raw_access = false
  need_serial = false
  
-@@ -88,27 +92,25 @@ if cc.check_header('sys/utsname.h')
+@@ -119,27 +123,25 @@ if cc.check_header('sys/utsname.h')
    add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
  endif
  
@@ -59,7 +59,7 @@
    config_atahpt = false
    config_atapromise = false
    config_atavia = false
-@@ -130,14 +132,17 @@ endif
+@@ -161,14 +163,17 @@ endif
  # set defines for configured programmers
  if config_atahpt
    srcs += 'atahpt.c'
@@ -77,7 +77,7 @@
    cargs += '-DCONFIG_ATAVIA=1'
  endif
  if config_buspirate_spi
-@@ -147,18 +152,22 @@ if config_buspirate_spi
+@@ -178,18 +183,22 @@ if config_buspirate_spi
  endif
  if config_ch341a_spi
    srcs += 'ch341a_spi.c'
@@ -100,7 +100,7 @@
    cargs += '-DCONFIG_DIGILENT_SPI=1'
  endif
  if config_jlink_spi
-@@ -168,6 +177,7 @@ if config_jlink_spi
+@@ -199,6 +208,7 @@ if config_jlink_spi
  endif
  if config_drkaiser
    srcs += 'drkaiser.c'
@@ -108,7 +108,7 @@
    cargs += '-DCONFIG_DRKAISER=1'
  endif
  if config_dummy
-@@ -176,16 +186,18 @@ if config_dummy
+@@ -207,16 +217,18 @@ if config_dummy
  endif
  if config_ft2232_spi
    srcs += 'ft2232_spi.c'
@@ -128,7 +128,7 @@
    cargs += '-DCONFIG_RAIDEN_DEBUG_SPI=1'
  endif
  if config_internal
-@@ -204,6 +216,7 @@ if config_internal
+@@ -235,6 +247,7 @@ if config_internal
      srcs += 'sb600spi.c'
      srcs += 'wbsio_spi.c'
    endif
@@ -136,7 +136,7 @@
    config_bitbang_spi = true
    cargs += '-DCONFIG_INTERNAL=1'
    if get_option('config_internal_dmi')
-@@ -217,6 +230,7 @@ if config_ene_lpc
+@@ -244,6 +257,7 @@ if config_internal
  endif
  if config_it8212
    srcs += 'it8212.c'
@@ -144,7 +144,7 @@
    cargs += '-DCONFIG_IT8212=1'
  endif
  if config_linux_mtd
-@@ -237,36 +251,44 @@ if config_mstarddc_spi
+@@ -260,36 +274,44 @@ if config_mstarddc_spi
  endif
  if config_nic3com
    srcs += 'nic3com.c'
@@ -189,7 +189,7 @@
    cargs += '-DCONFIG_PICKIT2_SPI=1'
  endif
  if config_pony_spi
-@@ -283,10 +305,12 @@ if config_rayer_spi
+@@ -306,10 +328,12 @@ if config_rayer_spi
  endif
  if config_satamv
    srcs += 'satamv.c'
@@ -202,7 +202,7 @@
    cargs += '-DCONFIG_SATASII=1'
  endif
  if config_serprog
-@@ -296,10 +320,12 @@ if config_serprog
+@@ -319,10 +343,12 @@ if config_serprog
  endif
  if config_usbblaster_spi
    srcs += 'usbblaster_spi.c'
@@ -215,8 +215,8 @@
    cargs += '-DCONFIG_STLINKV3_SPI=1'
  endif
  if config_lspcon_i2c_spi
-@@ -322,6 +348,26 @@ if host_machine.system() == 'linux'
-   cargs += '-DCONFIG_I2C_SUPPORT=1'
+@@ -344,6 +370,26 @@ if host_machine.system() == 'linux'
+   srcs += 'i2c_helper_linux.c'
  endif
  
 +# some programmers require libftdi
@@ -242,14 +242,40 @@
  # raw memory, MSR or PCI port I/O access
  if need_raw_access
    srcs += 'hwaccess.c'
+@@ -493,10 +539,12 @@ executable(
+ subdir('util')
+ 
+ # unit-test framework
++if get_option('build_tests')
++
+ cmocka_dep = dependency(
+   'cmocka',
+   fallback: ['cmocka', 'cmocka_dep'],
+-  required: false
++  required: true
+ )
+ flashrom_test_dep = declare_dependency(
+   include_directories : include_directories('.'),
+@@ -519,3 +567,5 @@ flashrom_test_dep = declare_dependency(
+ if cmocka_dep.found()
+   subdir('tests')
+ endif
++
++endif
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -1,5 +1,6 @@
+@@ -1,9 +1,12 @@
 -option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
 -option('usb', type : 'boolean', value : true, description : 'use libusb1')
 +option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi')
 +option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci')
 +option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb')
  option('print_wiki', type : 'boolean', value : true,  description : 'Print Wiki')
+ option('default_programmer_name', type : 'string', description : 'default programmer')
+ option('default_programmer_args', type : 'string', description : 'default programmer arguments')
  
++option('build_tests', type : 'boolean', value : false, description : 'build the test suite')
++
  option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
+ option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')
+ option('config_atavia', type : 'boolean', value : true, description : 'VIA VT6421A LPC memory')

diff --git a/sys-apps/flashrom/flashrom-9999.ebuild b/sys-apps/flashrom/flashrom-9999.ebuild
index 333373eb5f83..58c8150f039c 100644
--- a/sys-apps/flashrom/flashrom-9999.ebuild
+++ b/sys-apps/flashrom/flashrom-9999.ebuild
@@ -101,13 +101,13 @@ BDEPEND="test? ( dev-util/cmocka )"
 
 DOCS=( README Documentation/ )
 
-# TODO: cmocka automagic
 PATCHES=(
 	"${FILESDIR}"/${PN}-9999_meson-fixes.patch
 )
 
 src_configure() {
 	local emesonargs=(
+		$(meson_use test build_tests)
 		$(meson_use atahpt config_atahpt)
 		$(meson_use atapromise config_atapromise)
 		$(meson_use atavia config_atavia)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2022-03-11 16:40 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2022-03-11 16:40 UTC (permalink / raw
  To: gentoo-commits

commit:     f9226e226265bc83bfb9427deec51f1bbbb67192
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 11 16:00:52 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Mar 11 16:40:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9226e22

sys-apps/flashrom: remove live ebuild

Live ebuilds are only useful if someone is interested in keeping
them functional. I am not, especially given how large a patch is
currently required for dependencies of Meson builds to be sane.

Closes: https://bugs.gentoo.org/834021
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../flashrom/files/flashrom-9999_meson-fixes.patch | 281 ---------------------
 sys-apps/flashrom/flashrom-9999.ebuild             | 159 ------------
 sys-apps/flashrom/metadata.xml                     |   5 +-
 3 files changed, 1 insertion(+), 444 deletions(-)

diff --git a/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch
deleted file mode 100644
index 7651585f4f6a..000000000000
--- a/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch
+++ /dev/null
@@ -1,281 +0,0 @@
---- a/meson.build
-+++ b/meson.build
-@@ -2,7 +2,7 @@ project('flashromutils', 'c',
-   version : run_command('util/getversion.sh', '-v').stdout().strip(),
-   license : 'GPL-2.0',
-   meson_version : '>=0.50.0',
--  default_options : ['warning_level=2', 'c_std=c99'],
-+  default_options : ['warning_level=2', 'c_std=gnu99'],
- )
- 
- # libtool versioning
-@@ -105,6 +105,10 @@ cargs = []
- deps = []
- srcs = []
- 
-+config_bitbang_spi = false
-+need_libftdi = false
-+need_libpci = false
-+need_libusb = false
- need_raw_access = false
- need_serial = false
- 
-@@ -119,27 +123,25 @@ if cc.check_header('sys/utsname.h')
-   add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
- endif
- 
--# some programmers require libusb
--if get_option('usb')
--  srcs += 'usbdev.c'
--  srcs += 'usb_device.c'
--  deps += dependency('libusb-1.0')
--else
-+if get_option('no_libftdi_programmers')
-+  message('Disabling ALL libftdi-based programmers')
-+  config_ft2232_spi = false
-+  config_usbblaster_spi = false
-+endif
-+
-+if get_option('no_libusb_programmers')
-+  message('Disabling ALL libusb-based programmers')
-   config_ch341a_spi = false
-   config_dediprog = false
-   config_digilent_spi = false
-   config_developerbox_spi = false
-   config_pickit2_spi = false
-   config_raiden_debug_spi = false
-+  config_stlinkv3_spi = false
- endif
- 
--# some programmers require libpci
--if get_option('pciutils')
--  srcs += 'pcidev.c'
--  deps += dependency('libpci')
--  need_raw_access = true
--  cargs += '-DNEED_PCI=1'
--else
-+if get_option('no_libpci_programmers')
-+  message('Disabling ALL libpci-based programmers')
-   config_atahpt = false
-   config_atapromise = false
-   config_atavia = false
-@@ -161,14 +163,17 @@ endif
- # set defines for configured programmers
- if config_atahpt
-   srcs += 'atahpt.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_ATAHPT=1'
- endif
- if config_atapromise
-   srcs += 'atapromise.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_ATAPROMISE=1'
- endif
- if config_atavia
-   srcs += 'atavia.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_ATAVIA=1'
- endif
- if config_buspirate_spi
-@@ -178,18 +183,22 @@ if config_buspirate_spi
- endif
- if config_ch341a_spi
-   srcs += 'ch341a_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_CH341A_SPI=1'
- endif
- if config_dediprog
-   srcs += 'dediprog.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DEDIPROG=1'
- endif
- if config_developerbox_spi
-   srcs += 'developerbox_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DEVELOPERBOX_SPI=1'
- endif
- if config_digilent_spi
-   srcs += 'digilent_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DIGILENT_SPI=1'
- endif
- if config_jlink_spi
-@@ -199,6 +208,7 @@ if config_jlink_spi
- endif
- if config_drkaiser
-   srcs += 'drkaiser.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_DRKAISER=1'
- endif
- if config_dummy
-@@ -207,16 +217,18 @@ if config_dummy
- endif
- if config_ft2232_spi
-   srcs += 'ft2232_spi.c'
-+  need_libftdi = true
-   cargs += '-DCONFIG_FT2232_SPI=1'
--  deps += dependency('libftdi1')
-   cargs += '-DHAVE_FT232H=1'
- endif
- if config_gfxnvidia
-   srcs += 'gfxnvidia.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_GFXNVIDIA=1'
- endif
- if config_raiden_debug_spi
-   srcs += 'raiden_debug_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_RAIDEN_DEBUG_SPI=1'
- endif
- if config_internal
-@@ -235,6 +247,7 @@ if config_internal
-     srcs += 'sb600spi.c'
-     srcs += 'wbsio_spi.c'
-   endif
-+  need_libpci = true
-   config_bitbang_spi = true
-   cargs += '-DCONFIG_INTERNAL=1'
-   if get_option('config_internal_dmi')
-@@ -244,6 +257,7 @@ if config_internal
- endif
- if config_it8212
-   srcs += 'it8212.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_IT8212=1'
- endif
- if config_linux_mtd
-@@ -260,36 +274,44 @@ if config_mstarddc_spi
- endif
- if config_nic3com
-   srcs += 'nic3com.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NIC3COM=1'
- endif
- if config_nicintel
-   srcs += 'nicintel.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICINTEL=1'
- endif
- if config_nicintel_eeprom
-   srcs += 'nicintel_eeprom.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICINTEL_EEPROM=1'
- endif
- if config_nicintel_spi
-   srcs += 'nicintel_spi.c'
-+  need_libpci = true
-   config_bitbang_spi = true
-   cargs += '-DCONFIG_NICINTEL_SPI=1'
- endif
- if config_nicnatsemi
-   srcs += 'nicnatsemi.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICNATSEMI=1'
- endif
- if config_nicrealtek
-   srcs += 'nicrealtek.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_NICREALTEK=1'
- endif
- if config_ogp_spi
-   config_bitbang_spi = true
-   srcs += 'ogp_spi.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_OGP_SPI=1'
- endif
- if config_pickit2_spi
-   srcs += 'pickit2_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_PICKIT2_SPI=1'
- endif
- if config_pony_spi
-@@ -306,10 +328,12 @@ if config_rayer_spi
- endif
- if config_satamv
-   srcs += 'satamv.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_SATAMV=1'
- endif
- if config_satasii
-   srcs += 'satasii.c'
-+  need_libpci = true
-   cargs += '-DCONFIG_SATASII=1'
- endif
- if config_serprog
-@@ -319,10 +343,12 @@ if config_serprog
- endif
- if config_usbblaster_spi
-   srcs += 'usbblaster_spi.c'
-+  need_libftdi = true
-   cargs += '-DCONFIG_USBBLASTER_SPI=1'
- endif
- if config_stlinkv3_spi
-   srcs += 'stlinkv3_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_STLINKV3_SPI=1'
- endif
- if config_lspcon_i2c_spi
-@@ -344,6 +370,26 @@ if host_machine.system() == 'linux'
-   srcs += 'i2c_helper_linux.c'
- endif
- 
-+# some programmers require libftdi
-+if need_libftdi
-+  deps += dependency('libftdi1')
-+endif
-+
-+# some programmers require libpci
-+if need_libpci
-+  srcs += 'pcidev.c'
-+  deps += dependency('libpci')
-+  need_raw_access = true
-+  cargs += '-DNEED_PCI=1'
-+endif
-+
-+# some programmers require libusb
-+if need_libusb
-+  srcs += 'usbdev.c'
-+  srcs += 'usb_device.c'
-+  deps += dependency('libusb-1.0')
-+endif
-+
- # raw memory, MSR or PCI port I/O access
- if need_raw_access
-   srcs += 'hwaccess.c'
-@@ -493,10 +539,12 @@ executable(
- subdir('util')
- 
- # unit-test framework
-+if get_option('build_tests')
-+
- cmocka_dep = dependency(
-   'cmocka',
-   fallback: ['cmocka', 'cmocka_dep'],
--  required: false
-+  required: true
- )
- flashrom_test_dep = declare_dependency(
-   include_directories : include_directories('.'),
-@@ -519,3 +567,5 @@ flashrom_test_dep = declare_dependency(
- if cmocka_dep.found()
-   subdir('tests')
- endif
-+
-+endif
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -1,9 +1,12 @@
--option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
--option('usb', type : 'boolean', value : true, description : 'use libusb1')
-+option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi')
-+option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci')
-+option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb')
- option('print_wiki', type : 'boolean', value : true,  description : 'Print Wiki')
- option('default_programmer_name', type : 'string', description : 'default programmer')
- option('default_programmer_args', type : 'string', description : 'default programmer arguments')
- 
-+option('build_tests', type : 'boolean', value : false, description : 'build the test suite')
-+
- option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
- option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')
- option('config_atavia', type : 'boolean', value : true, description : 'VIA VT6421A LPC memory')

diff --git a/sys-apps/flashrom/flashrom-9999.ebuild b/sys-apps/flashrom/flashrom-9999.ebuild
deleted file mode 100644
index 58c8150f039c..000000000000
--- a/sys-apps/flashrom/flashrom-9999.ebuild
+++ /dev/null
@@ -1,159 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
-	inherit git-r3
-else
-	MY_P="${PN}-v${PV}"
-	SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
-	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
-HOMEPAGE="https://flashrom.org/Flashrom"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-# The defaults match the upstream meson_options.txt.
-IUSE_PROGRAMMERS="
-	atahpt
-	atapromise
-	+atavia
-	+buspirate-spi
-	+ch341a-spi
-	+dediprog
-	+developerbox-spi
-	+digilent-spi
-	+drkaiser
-	+dummy
-	+ft2232-spi
-	+gfxnvidia
-	+internal
-	+it8212
-	jlink-spi
-	+linux-mtd
-	+linux-spi
-	lspcon-i2c-spi
-	mstarddc-spi
-	+nic3com
-	+nicintel
-	+nicintel-eeprom
-	+nicintel-spi
-	nicnatsemi
-	+nicrealtek
-	+ogp-spi
-	+pickit2-spi
-	+pony-spi
-	+raiden-debug-spi
-	+rayer-spi
-	realtek-mst-i2c-spi
-	+satamv
-	+satasii
-	+serprog
-	+stlinkv3-spi
-	+usbblaster-spi
-"
-IUSE="${IUSE_PROGRAMMERS} +internal-dmi test tools +wiki"
-
-RESTRICT="!test? ( test )"
-
-LIB_DEPEND="
-	atahpt? ( sys-apps/pciutils[static-libs(+)] )
-	atapromise? ( sys-apps/pciutils[static-libs(+)] )
-	atavia? ( sys-apps/pciutils[static-libs(+)] )
-	ch341a-spi? ( virtual/libusb:1[static-libs(+)] )
-	dediprog? ( virtual/libusb:1[static-libs(+)] )
-	developerbox-spi? ( virtual/libusb:1[static-libs(+)] )
-	digilent-spi? ( virtual/libusb:1[static-libs(+)] )
-	drkaiser? ( sys-apps/pciutils[static-libs(+)] )
-	ft2232-spi? ( dev-embedded/libftdi:1=[static-libs(+)] )
-	gfxnvidia? ( sys-apps/pciutils[static-libs(+)] )
-	internal? ( sys-apps/pciutils[static-libs(+)] )
-	it8212? ( sys-apps/pciutils[static-libs(+)] )
-	jlink-spi? ( dev-embedded/libjaylink[static-libs(+)] )
-	nic3com? ( sys-apps/pciutils[static-libs(+)] )
-	nicintel-eeprom? ( sys-apps/pciutils[static-libs(+)] )
-	nicintel-spi? ( sys-apps/pciutils[static-libs(+)] )
-	nicintel? ( sys-apps/pciutils[static-libs(+)] )
-	nicnatsemi? ( sys-apps/pciutils[static-libs(+)] )
-	nicrealtek? ( sys-apps/pciutils[static-libs(+)] )
-	ogp-spi? ( sys-apps/pciutils[static-libs(+)] )
-	pickit2-spi? ( virtual/libusb:0[static-libs(+)] )
-	raiden-debug-spi? ( virtual/libusb:0[static-libs(+)] )
-	rayer-spi? ( sys-apps/pciutils[static-libs(+)] )
-	satamv? ( sys-apps/pciutils[static-libs(+)] )
-	satasii? ( sys-apps/pciutils[static-libs(+)] )
-	stlinkv3-spi? ( virtual/libusb:1[static-libs(+)] )
-	usbblaster-spi? ( dev-embedded/libftdi:1=[static-libs(+)] )
-"
-RDEPEND="${LIB_DEPEND//\[static-libs(+)]}"
-DEPEND="${RDEPEND}
-	sys-apps/diffutils"
-RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
-BDEPEND="test? ( dev-util/cmocka )"
-
-DOCS=( README Documentation/ )
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-9999_meson-fixes.patch
-)
-
-src_configure() {
-	local emesonargs=(
-		$(meson_use test build_tests)
-		$(meson_use atahpt config_atahpt)
-		$(meson_use atapromise config_atapromise)
-		$(meson_use atavia config_atavia)
-		$(meson_use buspirate-spi config_buspirate_spi)
-		$(meson_use ch341a-spi config_ch341a_spi)
-		$(meson_use dediprog config_dediprog)
-		$(meson_use developerbox-spi config_developerbox_spi)
-		$(meson_use digilent-spi config_digilent_spi)
-		$(meson_use drkaiser config_drkaiser)
-		$(meson_use dummy config_dummy)
-		$(meson_use ft2232-spi config_ft2232_spi)
-		$(meson_use gfxnvidia config_gfxnvidia)
-		$(meson_use internal config_internal)
-		$(meson_use internal-dmi config_internal_dmi)
-		$(meson_use it8212 config_it8212)
-		$(meson_use jlink-spi config_jlink_spi)
-		$(meson_use linux-mtd config_linux_mtd)
-		$(meson_use linux-spi config_linux_spi)
-		$(meson_use lspcon-i2c-spi config_lspcon_i2c_spi)
-		$(meson_use mstarddc-spi config_mstarddc_spi)
-		$(meson_use nic3com config_nic3com)
-		$(meson_use nicintel-eeprom config_nicintel_eeprom)
-		$(meson_use nicintel-spi config_nicintel_spi)
-		$(meson_use nicintel config_nicintel)
-		$(meson_use nicnatsemi config_nicnatsemi)
-		$(meson_use nicrealtek config_nicrealtek)
-		$(meson_use ogp-spi config_ogp_spi)
-		$(meson_use pickit2-spi config_pickit2_spi)
-		$(meson_use pony-spi config_pony_spi)
-		$(meson_use raiden-debug-spi config_raiden_debug_spi)
-		$(meson_use rayer-spi config_rayer_spi)
-		$(meson_use realtek-mst-i2c-spi config_realtek_mst_i2c_spi)
-		$(meson_use satamv config_satamv)
-		$(meson_use satasii config_satasii)
-		$(meson_use stlinkv3-spi config_stlinkv3_spi)
-		$(meson_use serprog config_serprog)
-		$(meson_use usbblaster-spi config_usbblaster_spi)
-		$(meson_use wiki print_wiki)
-	)
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-
-	if use tools; then
-		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
-	fi
-}

diff --git a/sys-apps/flashrom/metadata.xml b/sys-apps/flashrom/metadata.xml
index a60db379da54..454e1bbd085b 100644
--- a/sys-apps/flashrom/metadata.xml
+++ b/sys-apps/flashrom/metadata.xml
@@ -24,7 +24,6 @@
 		<flag name="jlink-spi">Support for SEGGER J-Link and compatible devices</flag>
 		<flag name="linux-mtd">Enable support for Linux mtd SPI flash devices</flag>
 		<flag name="linux-spi">Enable support for Linux userspace spidev interface</flag>
-		<flag name="lspcon-i2c-spi">Enable support for Parade lspcon USB-C to HDMI protocol translator</flag>
 		<flag name="mstarddc-spi">Support for SPI flash ROMs accessible through DDC in MSTAR-equipped displays</flag>
 		<flag name="nic3com">Enable 3Com NIC programmer</flag>
 		<flag name="nicintel">Support for Intel NICs</flag>
@@ -35,11 +34,9 @@
 		<flag name="ogp-spi">Enable support for OGP (Open Graphics Project) SPI flashing</flag>
 		<flag name="pickit2-spi">SUpport for SPI flash ROMs accessible via Microchip PICkit2</flag>
 		<flag name="pony-spi">Enable support for SI-Prog like hardware by Lancos</flag>
-		<flag name="raiden-debug-spi">Enable ChromiumOS Servo DUT debug board</flag>
 		<flag name="rayer-spi">RayeR SPIPGM hardware support</flag>
-		<flag name="realtek-mst-i2c-spi">Enable support for Realtek MultiStream Transport (MST)</flag>
-		<flag name="satasii">Enable programmer for SiI SATA controllers</flag>
 		<flag name="satamv">Enable programmer for Marvell SATA controllers</flag>
+		<flag name="satasii">Enable programmer for SiI SATA controllers</flag>
 		<flag name="stlinkv3-spi">Enable SPI programmer using STLINK-V3</flag>
 		<flag name="serprog">Enable Serial Flasher programmer</flag>
 		<flag name="tools">Install ich_descriptor_tool, a tool for reading descriptor-mode SPI-flash images for Intel chipsets</flag>


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2023-06-12 23:22 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2023-06-12 23:22 UTC (permalink / raw
  To: gentoo-commits

commit:     bee3bcde7d86726cb8386d85a4c93b8d5df7aced
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 12 23:20:43 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Jun 12 23:22:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bee3bcde

sys-apps/flashrom: backport possible "incomplete spi master definition" fix to 1.3.0

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../flashrom/files/flashrom-1.3.0_spi-master.patch | 285 +++++++++++++++++++++
 sys-apps/flashrom/flashrom-1.3.0-r1.ebuild         | 132 ++++++++++
 2 files changed, 417 insertions(+)

diff --git a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
new file mode 100644
index 000000000000..72298f8cfca3
--- /dev/null
+++ b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
@@ -0,0 +1,285 @@
+Backported upstream commit
+https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f396719
+
+--- a/bitbang_spi.c
++++ b/bitbang_spi.c
+@@ -148,7 +148,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= bitbang_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ int register_spi_bitbang_master(const struct bitbang_spi_master *master, void *spi_data)
+--- a/buspirate_spi.c
++++ b/buspirate_spi.c
+@@ -183,7 +183,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= buspirate_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static const struct buspirate_speeds spispeeds[] = {
+--- a/ch341a_spi.c
++++ b/ch341a_spi.c
+@@ -418,7 +418,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= ch341a_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int ch341a_spi_init(const struct programmer_cfg *cfg)
+--- a/dediprog.c
++++ b/dediprog.c
+@@ -1038,7 +1038,6 @@
+ 	.write_256	= dediprog_spi_write_256,
+ 	.write_aai	= dediprog_spi_write_aai,
+ 	.shutdown	= dediprog_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ /*
+--- a/digilent_spi.c
++++ b/digilent_spi.c
+@@ -338,7 +338,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= digilent_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static bool default_reset(struct libusb_device_handle *handle)
+--- a/dirtyjtag_spi.c
++++ b/dirtyjtag_spi.c
+@@ -198,7 +198,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= dirtyjtag_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int dirtyjtag_spi_init(const struct programmer_cfg *cfg)
+--- a/ft2232_spi.c
++++ b/ft2232_spi.c
+@@ -301,7 +301,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= ft2232_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ /* Returns 0 upon success, a negative number upon errors. */
+--- a/include/chipdrivers.h
++++ b/include/chipdrivers.h
+@@ -26,6 +26,7 @@
+ int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+ int spi_chip_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+ int spi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start, int unsigned len);
++bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode);
+ 
+ /* spi25.c */
+ int probe_spi_rdid(struct flashctx *flash);
+--- a/include/programmer.h
++++ b/include/programmer.h
+@@ -312,7 +312,7 @@
+ 	int (*write_256)(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+ 	int (*write_aai)(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+ 	int (*shutdown)(void *data);
+-	bool (*probe_opcode)(struct flashctx *flash, uint8_t opcode);
++	bool (*probe_opcode)(const struct flashctx *flash, uint8_t opcode); /* NULL func implies true. */
+ 	void *data;
+ };
+ 
+@@ -322,7 +322,6 @@
+ int default_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
+ int default_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+ int default_spi_write_aai(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
+-bool default_spi_probe_opcode(struct flashctx *flash, uint8_t opcode);
+ int register_spi_master(const struct spi_master *mst, void *data);
+ 
+ /* The following enum is needed by ich_descriptor_tool and ich* code as well as in chipset_enable.c. */
+--- a/it87spi.c
++++ b/it87spi.c
+@@ -320,7 +320,6 @@
+ 	.write_256	= it8716f_spi_chip_write_256,
+ 	.write_aai	= spi_chip_write_1,
+ 	.shutdown	= it8716f_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static uint16_t it87spi_probe(const struct programmer_cfg *cfg, uint16_t port)
+--- a/jlink_spi.c
++++ b/jlink_spi.c
+@@ -190,7 +190,6 @@
+ 	.write_aai	= default_spi_write_aai,
+ 	.features	= SPI_MASTER_4BA,
+ 	.shutdown	= jlink_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int jlink_spi_init(const struct programmer_cfg *cfg)
+--- a/linux_spi.c
++++ b/linux_spi.c
+@@ -121,7 +121,6 @@
+ 	.write_256	= linux_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= linux_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ /* Read max buffer size from sysfs, or use page size as fallback. */
+--- a/mediatek_i2c_spi.c
++++ b/mediatek_i2c_spi.c
+@@ -461,7 +461,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= mediatek_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int get_params(const struct programmer_cfg *cfg, bool *allow_brick)
+--- a/mstarddc_spi.c
++++ b/mstarddc_spi.c
+@@ -147,7 +147,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= mstarddc_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ /* Returns 0 upon success, a negative number upon errors. */
+--- a/ni845x_spi.c
++++ b/ni845x_spi.c
+@@ -537,7 +537,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= ni845x_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int ni845x_spi_init(const struct programmer_cfg *cfg)
+--- a/parade_lspcon.c
++++ b/parade_lspcon.c
+@@ -435,7 +435,6 @@
+ 	.write_256	= parade_lspcon_write_256,
+ 	.write_aai	= parade_lspcon_write_aai,
+ 	.shutdown	= parade_lspcon_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int get_params(const struct programmer_cfg *cfg, bool *allow_brick)
+--- a/pickit2_spi.c
++++ b/pickit2_spi.c
+@@ -385,7 +385,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= pickit2_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int pickit2_spi_init(const struct programmer_cfg *cfg)
+--- a/raiden_debug_spi.c
++++ b/raiden_debug_spi.c
+@@ -1325,7 +1325,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= raiden_debug_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int match_endpoint(struct libusb_endpoint_descriptor const *descriptor,
+--- a/realtek_mst_i2c_spi.c
++++ b/realtek_mst_i2c_spi.c
+@@ -440,7 +440,6 @@
+ 	.write_256	= realtek_mst_i2c_spi_write_256,
+ 	.write_aai	= realtek_mst_i2c_spi_write_aai,
+ 	.shutdown	= realtek_mst_i2c_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int get_params(const struct programmer_cfg *cfg, bool *reset, bool *enter_isp, bool *allow_brick)
+--- a/sb600spi.c
++++ b/sb600spi.c
+@@ -581,7 +581,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= sb600spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static const struct spi_master spi_master_yangtze = {
+@@ -595,7 +594,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= sb600spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ int sb600_probe_spi(const struct programmer_cfg *cfg, struct pci_dev *dev)
+--- a/serprog.c
++++ b/serprog.c
+@@ -463,7 +463,6 @@
+ 	.read		= default_spi_read,
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int sp_check_opbuf_usage(int bytes_to_be_added)
+--- a/spi.c
++++ b/spi.c
+@@ -131,9 +131,11 @@
+ 	return flash->mst->spi.write_aai(flash, buf, start, len);
+ }
+ 
+-bool default_spi_probe_opcode(struct flashctx *flash, uint8_t opcode)
++bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode)
+ {
+-	return true;
++	if (!flash->mst->spi.probe_opcode)
++		return true; /* no probe_opcode implies default of supported. */
++	return flash->mst->spi.probe_opcode(flash, opcode);
+ }
+ 
+ int register_spi_master(const struct spi_master *mst, void *data)
+@@ -148,7 +150,7 @@
+ 	}
+ 
+ 	if (!mst->write_aai || !mst->write_256 || !mst->read || !mst->command ||
+-	    !mst->multicommand || !mst->probe_opcode ||
++	    !mst->multicommand ||
+ 	    ((mst->command == default_spi_send_command) &&
+ 	     (mst->multicommand == default_spi_send_multicommand))) {
+ 		msg_perr("%s called with incomplete master definition. "
+--- a/stlinkv3_spi.c
++++ b/stlinkv3_spi.c
+@@ -471,7 +471,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= stlinkv3_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ static int stlinkv3_spi_init(const struct programmer_cfg *cfg)
+--- a/usbblaster_spi.c
++++ b/usbblaster_spi.c
+@@ -173,7 +173,6 @@
+ 	.write_256	= default_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+ 	.shutdown	= usbblaster_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ /* Returns 0 upon success, a negative number upon errors. */
+--- a/wbsio_spi.c
++++ b/wbsio_spi.c
+@@ -193,7 +193,6 @@
+ 	.write_256	= spi_chip_write_1,
+ 	.write_aai	= spi_chip_write_1,
+ 	.shutdown	= wbsio_spi_shutdown,
+-	.probe_opcode	= default_spi_probe_opcode,
+ };
+ 
+ int wbsio_check_for_spi(void)

diff --git a/sys-apps/flashrom/flashrom-1.3.0-r1.ebuild b/sys-apps/flashrom/flashrom-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..3e8afdbc98d6
--- /dev/null
+++ b/sys-apps/flashrom/flashrom-1.3.0-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson
+
+MY_P="${PN}-v${PV}"
+SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
+HOMEPAGE="https://flashrom.org/Flashrom"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+# The defaults should match the upstream "default" flags in meson.build
+IUSE_PROGRAMMERS="
+	atahpt
+	atapromise
+	+atavia
+	+buspirate-spi
+	+ch341a-spi
+	+dediprog
+	+developerbox-spi
+	+digilent-spi
+	+dirtyjtag-spi
+	+drkaiser
+	+dummy
+	+ft2232-spi
+	+gfxnvidia
+	+internal
+	+it8212
+	jlink-spi
+	+linux-mtd
+	+linux-spi
+	mediatek-i2c-spi
+	mstarddc-spi
+	+nic3com
+	+nicintel
+	+nicintel-eeprom
+	+nicintel-spi
+	nicnatsemi
+	+nicrealtek
+	+ogp-spi
+	parade-lspcon
+	+pickit2-spi
+	+pony-spi
+	+raiden-debug-spi
+	+rayer-spi
+	realtek-mst-i2c-spi
+	+satamv
+	+satasii
+	+serprog
+	+stlinkv3-spi
+	+usbblaster-spi"
+IUSE="${IUSE_PROGRAMMERS} +internal-dmi test tools"
+
+RESTRICT="!test? ( test )"
+
+COMMON="atahpt? ( sys-apps/pciutils )
+	atapromise? ( sys-apps/pciutils )
+	atavia? ( sys-apps/pciutils )
+	ch341a-spi? ( virtual/libusb:1 )
+	dediprog? ( virtual/libusb:1 )
+	developerbox-spi? ( virtual/libusb:1 )
+	digilent-spi? ( virtual/libusb:1 )
+	dirtyjtag-spi? ( virtual/libusb:1 )
+	drkaiser? ( sys-apps/pciutils )
+	ft2232-spi? ( dev-embedded/libftdi:1= )
+	gfxnvidia? ( sys-apps/pciutils )
+	internal? ( sys-apps/pciutils )
+	it8212? ( sys-apps/pciutils )
+	jlink-spi? ( dev-embedded/libjaylink )
+	nic3com? ( sys-apps/pciutils )
+	nicintel? ( sys-apps/pciutils )
+	nicintel-eeprom? ( sys-apps/pciutils )
+	nicintel-spi? ( sys-apps/pciutils )
+	nicnatsemi? ( sys-apps/pciutils )
+	nicrealtek? ( sys-apps/pciutils )
+	ogp-spi? ( sys-apps/pciutils )
+	pickit2-spi? ( virtual/libusb:1 )
+	raiden-debug-spi? ( virtual/libusb:1 )
+	satamv? ( sys-apps/pciutils )
+	satasii? ( sys-apps/pciutils )
+	stlinkv3-spi? ( virtual/libusb:1 )
+	usbblaster-spi? ( dev-embedded/libftdi:1= )"
+RDEPEND="${COMMON}
+	!internal-dmi? ( sys-apps/dmidecode )"
+DEPEND="${COMMON}
+	sys-apps/diffutils
+	linux-mtd? ( sys-kernel/linux-headers )
+	linux-spi? ( sys-kernel/linux-headers )
+	mediatek-i2c-spi? ( sys-kernel/linux-headers )
+	mstarddc-spi? ( sys-kernel/linux-headers )
+	parade-lspcon? ( sys-kernel/linux-headers )
+	realtek-mst-i2c-spi? ( sys-kernel/linux-headers )"
+BDEPEND="test? ( dev-util/cmocka )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.3.0_spi-master.patch
+)
+
+DOCS=( README Documentation/ )
+
+src_configure() {
+	local programmers="$(printf '%s,' $(for flag in ${IUSE_PROGRAMMERS//+/}; do usev ${flag}; done))"
+	programmers="${programmers%,}"
+	programmers="${programmers//-/_}"
+	local emesonargs=(
+		-Dclassic_cli="enabled"
+		-Dprogrammer="${programmers}"
+		$(meson_feature test tests)
+		$(meson_feature tools ich_descriptors_tool)
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+
+	# Upstream requires libflashrom.a to be present at build time because the classic CLI
+	# executable uses internal symbols from that library. Therefore, we let it be built
+	# but keep it out of the installed tree.
+	find "${ED}" -name '*.a' -delete || die
+
+	if use tools; then
+		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
+	fi
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2024-04-24 13:27 Marek Szuba
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Szuba @ 2024-04-24 13:27 UTC (permalink / raw
  To: gentoo-commits

commit:     04d0f920c4169a94c463633b4eac93fcb3e535d6
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 13:18:14 2024 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 13:27:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04d0f920

sys-apps/flashrom: drop 1.2-r4, 1.3.0

Note that this drops flashrom on ppc64 to ~arch-only, owing to none of
the newer versions having been stabilised for this architecture for
almost a year.

Closes: https://bugs.gentoo.org/906737
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 sys-apps/flashrom/Manifest                         |   1 -
 .../flashrom/files/flashrom-1.2_meson-fixes.patch  | 289 ---------------------
 .../files/flashrom-1.2_meson-install-manpage.patch |  43 ---
 sys-apps/flashrom/flashrom-1.2-r4.ebuild           | 145 -----------
 sys-apps/flashrom/flashrom-1.3.0.ebuild            | 128 ---------
 5 files changed, 606 deletions(-)

diff --git a/sys-apps/flashrom/Manifest b/sys-apps/flashrom/Manifest
index 20d3cca7fc80..9814b3053ebe 100644
--- a/sys-apps/flashrom/Manifest
+++ b/sys-apps/flashrom/Manifest
@@ -1,2 +1 @@
-DIST flashrom-v1.2.tar.bz2 366995 BLAKE2B 091e01a91e12b486154ace334a5e74bccbb5f5311ad76e37f43a28167080757873d8c78b8f549d2e77eb984922c830895ba955b23eb6ee4fc24f1ffed259954b SHA512 8e01395a54d0d1344bc55e7e4975f43bb8e59ebe83fb5f2766d14f76756d718b487254ce9a19ef4093aed04fb9d40fff5fe8f709b18c512f6e6fad894f83d7b8
 DIST flashrom-v1.3.0.tar.bz2 489782 BLAKE2B e6d2284d83171b003b434251f060fa44edf32ecfd3d397bd4ba39b74c6a0b5c9d1659b703dd6b632b63aa4bf27d08c8aeece72920199712c6a4ae160b2eb3a8a SHA512 73b6e00bd3bc66c98d4ad53966a65b19d3d92f07d7b210d69e041d6f5788605b9791a9bf7aec0a52e13d19fcb62c4bdaf4bab9f805fc31468393ca313129a77b

diff --git a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
deleted file mode 100644
index bb185fae8223..000000000000
--- a/sys-apps/flashrom/files/flashrom-1.2_meson-fixes.patch
+++ /dev/null
@@ -1,289 +0,0 @@
---- a/meson.build
-+++ b/meson.build
-@@ -2,7 +2,7 @@
-   version : run_command('util/getversion.sh', '-v').stdout().strip(),
-   license : 'GPL-2.0',
-   meson_version : '>=0.47.0',
--  default_options : ['warning_level=2', 'c_std=c99'],
-+  default_options : ['warning_level=2', 'c_std=gnu99'],
- )
- 
- # libtool versioning
-@@ -44,6 +44,7 @@
- config_gfxnvidia = get_option('config_gfxnvidia')
- config_internal = get_option('config_internal')
- config_it8212 = get_option('config_it8212')
-+config_jlink_spi = get_option('config_jlink_spi')
- config_linux_mtd = get_option('config_linux_mtd')
- config_linux_spi = get_option('config_linux_spi')
- config_mstarddc_spi = get_option('config_mstarddc_spi')
-@@ -67,6 +68,10 @@
- deps = []
- srcs = []
- 
-+config_bitbang_spi = false
-+need_libftdi = false
-+need_libpci = false
-+need_libusb = false
- need_raw_access = false
- need_serial = false
- 
-@@ -81,24 +86,24 @@
-   add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
- endif
- 
--# some programmers require libusb
--if get_option('usb')
--  srcs += 'usbdev.c'
--  deps += dependency('libusb-1.0')
--else
-+if get_option('no_libftdi_programmers')
-+  message('Disabling ALL libftdi-based programmers')
-+  config_ft2232_spi = false
-+  config_usbblaster_spi = false
-+endif
-+
-+if get_option('no_libusb_programmers')
-+  message('Disabling ALL libusb-based programmers')
-   config_ch341a_spi = false
-   config_dediprog = false
--  config_digilent_spi = false
-   config_developerbox_spi = false
-+  config_digilent_spi = false
-   config_pickit2_spi = false
-+  config_stlinkv3_spi = false
- endif
- 
--# some programmers require libpci
--if get_option('pciutils')
--  srcs += 'pcidev.c'
--  deps += dependency('libpci')
--  cargs += '-DNEED_PCI=1'
--else
-+if get_option('no_libpci_programmers')
-+  message('Disabling ALL libpci-based programmers')
-   config_atahpt = false
-   config_atapromise = false
-   config_atavia = false
-@@ -121,14 +126,20 @@
- # set defines for configured programmers
- if config_atahpt
-   srcs += 'atahpt.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_ATAHPT=1'
- endif
- if config_atapromise
-   srcs += 'atapromise.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_ATAPROMISE=1'
- endif
- if config_atavia
-   srcs += 'atavia.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_ATAVIA=1'
- endif
- if config_buspirate_spi
-@@ -138,22 +149,28 @@
- endif
- if config_ch341a_spi
-   srcs += 'ch341a_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_CH341A_SPI=1'
- endif
- if config_dediprog
-   srcs += 'dediprog.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DEDIPROG=1'
- endif
- if config_developerbox_spi
-   srcs += 'developerbox_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DEVELOPERBOX_SPI=1'
- endif
- if config_digilent_spi
-   srcs += 'digilent_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_DIGILENT_SPI=1'
- endif
- if config_drkaiser
-   srcs += 'drkaiser.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_DRKAISER=1'
- endif
- if config_dummy
-@@ -162,12 +179,14 @@
- endif
- if config_ft2232_spi
-   srcs += 'ft2232_spi.c'
-+  need_libftdi = true
-   cargs += '-DCONFIG_FT2232_SPI=1'
--  deps += dependency('libftdi1')
-   cargs += '-DHAVE_FT232H=1'
- endif
- if config_gfxnvidia
-   srcs += 'gfxnvidia.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_GFXNVIDIA=1'
- endif
- if config_internal
-@@ -186,6 +205,8 @@
-     srcs += 'sb600spi.c'
-     srcs += 'wbsio_spi.c'
-   endif
-+  need_libpci = true
-+  need_raw_access = true
-   config_bitbang_spi = true
-   cargs += '-DCONFIG_INTERNAL=1'
-   if get_option('config_internal_dmi')
-@@ -195,6 +216,8 @@
- endif
- if config_it8212
-   srcs += 'it8212.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_IT8212=1'
- endif
- if config_linux_mtd
-@@ -211,36 +234,51 @@
- endif
- if config_nic3com
-   srcs += 'nic3com.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_NIC3COM=1'
- endif
- if config_nicintel
-   srcs += 'nicintel.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_NICINTEL=1'
- endif
- if config_nicintel_eeprom
-   srcs += 'nicintel_eeprom.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_NICINTEL_EEPROM=1'
- endif
- if config_nicintel_spi
-   srcs += 'nicintel_spi.c'
-+  need_libpci = true
-+  need_raw_access = true
-   config_bitbang_spi = true
-   cargs += '-DCONFIG_NICINTEL_SPI=1'
- endif
- if config_nicnatsemi
-   srcs += 'nicnatsemi.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_NICNATSEMI=1'
- endif
- if config_nicrealtek
-   srcs += 'nicrealtek.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_NICREALTEK=1'
- endif
- if config_ogp_spi
-   config_bitbang_spi = true
-   srcs += 'ogp_spi.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_OGP_SPI=1'
- endif
- if config_pickit2_spi
-   srcs += 'pickit2_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_PICKIT2_SPI=1'
- endif
- if config_pony_spi
-@@ -252,15 +290,20 @@
- if config_rayer_spi
-   srcs += 'rayer_spi.c'
-   config_bitbang_spi = true
-+  need_libpci = true
-   need_raw_access = true
-   cargs += '-DCONFIG_RAYER_SPI=1'
- endif
- if config_satamv
-   srcs += 'satamv.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_SATAMV=1'
- endif
- if config_satasii
-   srcs += 'satasii.c'
-+  need_libpci = true
-+  need_raw_access = true
-   cargs += '-DCONFIG_SATASII=1'
- endif
- if config_serprog
-@@ -270,12 +313,19 @@
- endif
- if config_usbblaster_spi
-   srcs += 'usbblaster_spi.c'
-+  need_libftdi = true
-   cargs += '-DCONFIG_USBBLASTER_SPI=1'
- endif
- if config_stlinkv3_spi
-   srcs += 'stlinkv3_spi.c'
-+  need_libusb = true
-   cargs += '-DCONFIG_STLINKV3_SPI=1'
- endif
-+if config_jlink_spi
-+  srcs += 'jlink_spi.c'
-+  cargs += '-DCONFIG_JLINK_SPI=1'
-+  deps += dependency('libjaylink')
-+endif
- 
- # bitbanging SPI infrastructure
- if config_bitbang_spi
-@@ -296,6 +346,25 @@
-   srcs += 'serial.c'
- endif
- 
-+# some programmers require libftdi
-+if need_libftdi
-+  deps += dependency('libftdi1')
-+endif
-+
-+# some programmers require libpci
-+if need_libpci
-+  srcs += 'pcidev.c'
-+  deps += dependency('libpci')
-+  cargs += '-DNEED_PCI=1'
-+endif
-+
-+# some programmers require libusb
-+if need_libusb
-+  srcs += 'usbdev.c'
-+  deps += dependency('libusb-1.0')
-+endif
-+
-+
- prefix = get_option('prefix')
- sbindir = join_paths(prefix, get_option('sbindir'))
- libdir = join_paths(prefix, get_option('libdir'))
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -1,5 +1,6 @@
--option('pciutils', type : 'boolean', value : true, description : 'use pciutils')
--option('usb', type : 'boolean', value : true, description : 'use libusb1')
-+option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi')
-+option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci')
-+option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb')
- 
- option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers')
- option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller')
-@@ -16,6 +17,7 @@
- option('config_internal', type : 'boolean', value : true, description : 'internal/onboard')
- option('config_internal_dmi', type : 'boolean', value : true, description : 'Use internal DMI parser')
- option('config_it8212', type : 'boolean', value : true, description : 'ITE IT8212F PATA')
-+option('config_jlink_spi', type : 'boolean', value : false, description : 'SEGGER J-Link and compatible')
- option('config_linux_mtd', type : 'boolean', value : true, description : 'Linux MTD interfaces')
- option('config_linux_spi', type : 'boolean', value : true, description : 'Linux spidev interfaces')
- option('config_mstarddc_spi', type : 'boolean', value : false, description : 'MSTAR DDC support')

diff --git a/sys-apps/flashrom/files/flashrom-1.2_meson-install-manpage.patch b/sys-apps/flashrom/files/flashrom-1.2_meson-install-manpage.patch
deleted file mode 100644
index 8783cfeefa7e..000000000000
--- a/sys-apps/flashrom/files/flashrom-1.2_meson-install-manpage.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-This is essentially the upstream commit 7aea04f7099ad4dde7b1f5900b54ef603eadf25e,
-modified so that MAN_DATE is set to simply '-' - the commit generates
-the date using the script util/getrevision.sh, which is not included in
-release tarballs.
-
---- a/flashrom.8.tmpl
-+++ b/flashrom.8.tmpl
-@@ -40,7 +40,7 @@
- .    \}
- .  \}
- ..
--.TH FLASHROM 8 "" ""
-+.TH FLASHROM 8 "@MAN_DATE@" "@VERSION@" "@MAN_DATE@"
- .SH NAME
- flashrom \- detect, read, write, verify and erase flash chips
- .SH SYNOPSIS
---- a/meson.build
-+++ b/meson.build
-@@ -321,6 +321,7 @@ endif
- prefix = get_option('prefix')
- sbindir = join_paths(prefix, get_option('sbindir'))
- libdir = join_paths(prefix, get_option('libdir'))
-+mandir = join_paths(prefix, get_option('mandir'))
- 
- install_headers([
-     'libflashrom.h',
-@@ -394,6 +395,16 @@ pkgg.generate(
-   description : 'library to interact with flashrom',
- )
- 
-+conf.set('VERSION', version)
-+conf.set('MAN_DATE', '-')
-+configure_file(
-+  input : 'flashrom.8.tmpl',
-+  output : 'flashrom.8',
-+  configuration : conf,
-+  install: true,
-+  install_dir: join_paths(mandir, 'man8'),
-+)
-+
- flashrom_dep = declare_dependency(
-   link_with : flashrom,
-   include_directories : include_directories('.'),

diff --git a/sys-apps/flashrom/flashrom-1.2-r4.ebuild b/sys-apps/flashrom/flashrom-1.2-r4.ebuild
deleted file mode 100644
index 2bb0b89fed55..000000000000
--- a/sys-apps/flashrom/flashrom-1.2-r4.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit meson
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
-	inherit git-r3
-else
-	MY_P="${PN}-v${PV}"
-	SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
-	KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
-HOMEPAGE="https://flashrom.org/Flashrom"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-# The defaults match the upstream meson_options.txt.
-IUSE_PROGRAMMERS="
-	atahpt
-	atapromise
-	+atavia
-	+buspirate-spi
-	+ch341a-spi
-	+dediprog
-	+developerbox-spi
-	+digilent-spi
-	+drkaiser
-	+dummy
-	+ft2232-spi
-	+gfxnvidia
-	+internal
-	+it8212
-	jlink-spi
-	+linux-mtd
-	+linux-spi
-	mstarddc-spi
-	+nic3com
-	+nicintel
-	+nicintel-eeprom
-	+nicintel-spi
-	nicnatsemi
-	+nicrealtek
-	+ogp-spi
-	+pickit2-spi
-	+pony-spi
-	+rayer-spi
-	+satamv
-	+satasii
-	+serprog
-	+stlinkv3-spi
-	+usbblaster-spi
-"
-IUSE="${IUSE_PROGRAMMERS} +internal-dmi tools"
-
-RDEPEND="atahpt? ( sys-apps/pciutils )
-	atapromise? ( sys-apps/pciutils )
-	atavia? ( sys-apps/pciutils )
-	ch341a-spi? ( virtual/libusb:1 )
-	dediprog? ( virtual/libusb:1 )
-	developerbox-spi? ( virtual/libusb:1 )
-	digilent-spi? ( virtual/libusb:1 )
-	drkaiser? ( sys-apps/pciutils )
-	ft2232-spi? ( dev-embedded/libftdi:1= )
-	gfxnvidia? ( sys-apps/pciutils )
-	internal? ( sys-apps/pciutils )
-	it8212? ( sys-apps/pciutils )
-	jlink-spi? ( dev-embedded/libjaylink )
-	nic3com? ( sys-apps/pciutils )
-	nicintel-eeprom? ( sys-apps/pciutils )
-	nicintel-spi? ( sys-apps/pciutils )
-	nicintel? ( sys-apps/pciutils )
-	nicnatsemi? ( sys-apps/pciutils )
-	nicrealtek? ( sys-apps/pciutils )
-	ogp-spi? ( sys-apps/pciutils )
-	pickit2-spi? ( virtual/libusb:1 )
-	rayer-spi? ( sys-apps/pciutils )
-	satamv? ( sys-apps/pciutils )
-	satasii? ( sys-apps/pciutils )
-	stlinkv3-spi? ( virtual/libusb:1 )
-	usbblaster-spi? ( dev-embedded/libftdi:1= )"
-DEPEND="${RDEPEND}
-	sys-apps/diffutils"
-RDEPEND+=" !internal-dmi? ( sys-apps/dmidecode )"
-
-DOCS=( README Documentation/ )
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-1.2_meson-fixes.patch
-	"${FILESDIR}"/${PN}-1.2_meson-install-manpage.patch
-)
-
-src_configure() {
-	local emesonargs=(
-		$(meson_use atahpt config_atahpt)
-		$(meson_use atapromise config_atapromise)
-		$(meson_use atavia config_atavia)
-		$(meson_use buspirate-spi config_buspirate_spi)
-		$(meson_use ch341a-spi config_ch341a_spi)
-		$(meson_use dediprog config_dediprog)
-		$(meson_use developerbox-spi config_developerbox_spi)
-		$(meson_use digilent-spi config_digilent_spi)
-		$(meson_use drkaiser config_drkaiser)
-		$(meson_use dummy config_dummy)
-		$(meson_use ft2232-spi config_ft2232_spi)
-		$(meson_use gfxnvidia config_gfxnvidia)
-		$(meson_use internal config_internal)
-		$(meson_use internal-dmi config_internal_dmi)
-		$(meson_use it8212 config_it8212)
-		$(meson_use jlink-spi config_jlink_spi)
-		$(meson_use linux-mtd config_linux_mtd)
-		$(meson_use linux-spi config_linux_spi)
-		$(meson_use mstarddc-spi config_mstarddc_spi)
-		$(meson_use nic3com config_nic3com)
-		$(meson_use nicintel-eeprom config_nicintel_eeprom)
-		$(meson_use nicintel-spi config_nicintel_spi)
-		$(meson_use nicintel config_nicintel)
-		$(meson_use nicnatsemi config_nicnatsemi)
-		$(meson_use nicrealtek config_nicrealtek)
-		$(meson_use ogp-spi config_ogp_spi)
-		$(meson_use pickit2-spi config_pickit2_spi)
-		$(meson_use pony-spi config_pony_spi)
-		$(meson_use rayer-spi config_rayer_spi)
-		$(meson_use satamv config_satamv)
-		$(meson_use satasii config_satasii)
-		$(meson_use stlinkv3-spi config_stlinkv3_spi)
-		$(meson_use serprog config_serprog)
-		$(meson_use usbblaster-spi config_usbblaster_spi)
-	)
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-
-	if use tools; then
-		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
-	fi
-}

diff --git a/sys-apps/flashrom/flashrom-1.3.0.ebuild b/sys-apps/flashrom/flashrom-1.3.0.ebuild
deleted file mode 100644
index 1281c12fa3c3..000000000000
--- a/sys-apps/flashrom/flashrom-1.3.0.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson
-
-MY_P="${PN}-v${PV}"
-SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2"
-KEYWORDS="amd64 arm arm64 ppc ~ppc64 ~riscv x86"
-S="${WORKDIR}/${MY_P}"
-
-DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
-HOMEPAGE="https://flashrom.org/Flashrom"
-
-LICENSE="GPL-2"
-SLOT="0"
-
-# The defaults should match the upstream "default" flags in meson.build
-IUSE_PROGRAMMERS="
-	atahpt
-	atapromise
-	+atavia
-	+buspirate-spi
-	+ch341a-spi
-	+dediprog
-	+developerbox-spi
-	+digilent-spi
-	+dirtyjtag-spi
-	+drkaiser
-	+dummy
-	+ft2232-spi
-	+gfxnvidia
-	+internal
-	+it8212
-	jlink-spi
-	+linux-mtd
-	+linux-spi
-	mediatek-i2c-spi
-	mstarddc-spi
-	+nic3com
-	+nicintel
-	+nicintel-eeprom
-	+nicintel-spi
-	nicnatsemi
-	+nicrealtek
-	+ogp-spi
-	parade-lspcon
-	+pickit2-spi
-	+pony-spi
-	+raiden-debug-spi
-	+rayer-spi
-	realtek-mst-i2c-spi
-	+satamv
-	+satasii
-	+serprog
-	+stlinkv3-spi
-	+usbblaster-spi"
-IUSE="${IUSE_PROGRAMMERS} +internal-dmi test tools"
-
-RESTRICT="!test? ( test )"
-
-COMMON="atahpt? ( sys-apps/pciutils )
-	atapromise? ( sys-apps/pciutils )
-	atavia? ( sys-apps/pciutils )
-	ch341a-spi? ( virtual/libusb:1 )
-	dediprog? ( virtual/libusb:1 )
-	developerbox-spi? ( virtual/libusb:1 )
-	digilent-spi? ( virtual/libusb:1 )
-	dirtyjtag-spi? ( virtual/libusb:1 )
-	drkaiser? ( sys-apps/pciutils )
-	ft2232-spi? ( dev-embedded/libftdi:1= )
-	gfxnvidia? ( sys-apps/pciutils )
-	internal? ( sys-apps/pciutils )
-	it8212? ( sys-apps/pciutils )
-	jlink-spi? ( dev-embedded/libjaylink )
-	nic3com? ( sys-apps/pciutils )
-	nicintel? ( sys-apps/pciutils )
-	nicintel-eeprom? ( sys-apps/pciutils )
-	nicintel-spi? ( sys-apps/pciutils )
-	nicnatsemi? ( sys-apps/pciutils )
-	nicrealtek? ( sys-apps/pciutils )
-	ogp-spi? ( sys-apps/pciutils )
-	pickit2-spi? ( virtual/libusb:1 )
-	raiden-debug-spi? ( virtual/libusb:1 )
-	satamv? ( sys-apps/pciutils )
-	satasii? ( sys-apps/pciutils )
-	stlinkv3-spi? ( virtual/libusb:1 )
-	usbblaster-spi? ( dev-embedded/libftdi:1= )"
-RDEPEND="${COMMON}
-	!internal-dmi? ( sys-apps/dmidecode )"
-DEPEND="${COMMON}
-	sys-apps/diffutils
-	linux-mtd? ( sys-kernel/linux-headers )
-	linux-spi? ( sys-kernel/linux-headers )
-	mediatek-i2c-spi? ( sys-kernel/linux-headers )
-	mstarddc-spi? ( sys-kernel/linux-headers )
-	parade-lspcon? ( sys-kernel/linux-headers )
-	realtek-mst-i2c-spi? ( sys-kernel/linux-headers )"
-BDEPEND="test? ( dev-util/cmocka )"
-
-DOCS=( README Documentation/ )
-
-src_configure() {
-	local programmers="$(printf '%s,' $(for flag in ${IUSE_PROGRAMMERS//+/}; do usev ${flag}; done))"
-	programmers="${programmers%,}"
-	programmers="${programmers//-/_}"
-	local emesonargs=(
-		-Dclassic_cli="enabled"
-		-Dprogrammer="${programmers}"
-		$(meson_feature test tests)
-		$(meson_feature tools ich_descriptors_tool)
-	)
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-
-	# Upstream requires libflashrom.a to be present at build time because the classic CLI
-	# executable uses internal symbols from that library. Therefore, we let it be built
-	# but keep it out of the installed tree.
-	find "${ED}" -name '*.a' -delete || die
-
-	if use tools; then
-		dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool
-	fi
-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/
@ 2024-06-28 19:08 Fabian Groffen
  0 siblings, 0 replies; 10+ messages in thread
From: Fabian Groffen @ 2024-06-28 19:08 UTC (permalink / raw
  To: gentoo-commits

commit:     b3a9f5e9e86ba28ddf9888c2867467c71129bbbd
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 28 19:00:39 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jun 28 19:08:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3a9f5e9

sys-apps/flashrom-1.3.0-r2: fix libflashrom mapfile #928955

Closes: https://bugs.gentoo.org/928955
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 .../files/flashrom-1.3.0-libflashrom.patch         | 32 ++++++++++++++++++++++
 .../files/flashrom-1.3.0-llvm-dummyflasher.patch   | 11 ++++++++
 sys-apps/flashrom/flashrom-1.3.0-r2.ebuild         |  1 +
 3 files changed, 44 insertions(+)

diff --git a/sys-apps/flashrom/files/flashrom-1.3.0-libflashrom.patch b/sys-apps/flashrom/files/flashrom-1.3.0-libflashrom.patch
new file mode 100644
index 000000000000..d228d8be5577
--- /dev/null
+++ b/sys-apps/flashrom/files/flashrom-1.3.0-libflashrom.patch
@@ -0,0 +1,32 @@
+commit b544f055c32dd9c839cdf49009531decb80af8e5
+Author: Fabian Groffen <grobian@gentoo.org>
+Date:   Fri Jun 28 20:46:25 2024 +0200
+
+    libflashrom.map: remove non-existant functions
+    
+    Remove symbol names from the map that do not exist in the code.
+    https://bugs.gentoo.org/928955
+    
+    Change-Id: I30bab842d9cbd2daaa9902fd3223f47145cb0e7f
+    Signed-off-by: Fabian Groffen <grobian@gentoo.org>
+
+diff --git a/libflashrom.map b/libflashrom.map
+index 77abf727..e1cdfa6a 100644
+--- a/libflashrom.map
++++ b/libflashrom.map
+@@ -1,7 +1,5 @@
+ LIBFLASHROM_1.0 {
+   global:
+-    flashrom_board_info;
+-    flashrom_chipset_info;
+     flashrom_data_free;
+     flashrom_flag_get;
+     flashrom_flag_set;
+@@ -9,7 +7,6 @@ LIBFLASHROM_1.0 {
+     flashrom_flash_getsize;
+     flashrom_flash_probe;
+     flashrom_flash_release;
+-    flashrom_flashchip_info;
+     flashrom_image_read;
+     flashrom_image_verify;
+     flashrom_image_write;

diff --git a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch b/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch
new file mode 100644
index 000000000000..22243937b960
--- /dev/null
+++ b/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch
@@ -0,0 +1,11 @@
+--- a/dummyflasher.c
++++ b/dummyflasher.c
+@@ -930,7 +930,7 @@
+ 	.read		= default_spi_read,
+ 	.write_256	= dummy_spi_write_256,
+ 	.write_aai	= default_spi_write_aai,
+-	.probe_opcode	= dummy_spi_probe_opcode,
++	.probe_opcode	= &dummy_spi_probe_opcode,
+ };
+ 
+ static const struct par_master par_master_dummyflasher = {

diff --git a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild b/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild
index d9bda60a6cdd..0607f1d76a6d 100644
--- a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild
+++ b/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild
@@ -104,6 +104,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-1.3.0_spi-master.patch
 	"${FILESDIR}"/${PN}-1.3.0-c99.patch
 	"${FILESDIR}"/${PN}-1.3.0-llvm-dummyflasher.patch
+	"${FILESDIR}"/${PN}-1.3.0-libflashrom.patch
 )
 
 DOCS=( README Documentation/ )


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-28 19:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-09 17:42 [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/ Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2024-06-28 19:08 Fabian Groffen
2024-04-24 13:27 Marek Szuba
2023-06-12 23:22 Marek Szuba
2022-03-11 16:40 Marek Szuba
2021-11-16 15:06 Marek Szuba
2021-05-17 12:58 Marek Szuba
2020-11-09 16:22 Marek Szuba
2020-05-02 16:37 Marek Szuba
2020-04-28  9:34 Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox