summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2024-07-02 16:01:33 +0200
committerFabian Groffen <grobian@gentoo.org>2024-07-02 16:03:25 +0200
commitdc64c2c846bf8301f6a4295fbd2777cf357ef88b (patch)
treee3f8c522e4913039734bde9d82ad8e4f8a029379
parentdev-python/apprise: enable py3.13 (diff)
downloadgentoo-dc64c2c846bf8301f6a4295fbd2777cf357ef88b.tar.gz
gentoo-dc64c2c846bf8301f6a4295fbd2777cf357ef88b.tar.bz2
gentoo-dc64c2c846bf8301f6a4295fbd2777cf357ef88b.zip
sys-apps/flashrom-1.3.0-r3: fix function definition mismatch for real
Previous patch was bonkers and caused by spi_master backport patch that was adapted in a wrong way. Fix for real now by (not) changing the signature. 1.4.0 should resolve this entire mess for us. Closes: https://bugs.gentoo.org/915617 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch11
-rw-r--r--sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch8
-rw-r--r--sys-apps/flashrom/flashrom-1.3.0-r3.ebuild (renamed from sys-apps/flashrom/flashrom-1.3.0-r2.ebuild)6
3 files changed, 11 insertions, 14 deletions
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
deleted file mode 100644
index 22243937b960..000000000000
--- a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/files/flashrom-1.3.0_spi-master.patch b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
index 72298f8cfca3..ae2641af4a0a 100644
--- a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
+++ b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch
@@ -1,6 +1,10 @@
Backported upstream commit
https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f396719
+This commit didn't apply straight because const/non-const changes were
+made inbetween, so there are some additional changes to silence more
+picky compilers like https://bugs.gentoo.org/915617
+
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -148,7 +148,6 @@
@@ -77,7 +81,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39
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);
++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode);
/* spi25.c */
int probe_spi_rdid(struct flashctx *flash);
@@ -235,7 +239,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39
}
-bool default_spi_probe_opcode(struct flashctx *flash, uint8_t opcode)
-+bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode)
++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode)
{
- return true;
+ if (!flash->mst->spi.probe_opcode)
diff --git a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild b/sys-apps/flashrom/flashrom-1.3.0-r3.ebuild
index 0607f1d76a6d..ce98d59584d8 100644
--- a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild
+++ b/sys-apps/flashrom/flashrom-1.3.0-r3.ebuild
@@ -103,7 +103,6 @@ BDEPEND="test? ( dev-util/cmocka )"
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
)
@@ -116,6 +115,11 @@ src_prepare() {
sed -i -e 's/-DCONFIG_LINUX_MTD=1/-UCONFIG_LINUX_MTD/' \
meson.build || die
fi
+
+ # enable warnings
+ sed -i \
+ -e 's:^warning_flags = \[:warning_flags = \[ '"'-Wall'"' \]\nno = \[:' \
+ meson.build || die
}
src_configure() {