git: 5d01dea4a100 - main - sysutils/flashrom: fix linker error by LLVM17

From: Michael Zhilin <mizhka_at_FreeBSD.org>
Date: Mon, 12 Feb 2024 12:52:43 UTC
The branch main has been updated by mizhka:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5d01dea4a100a08ff5f7aac3855f19fd74e29060

commit 5d01dea4a100a08ff5f7aac3855f19fd74e29060
Author:     Michael Zhilin <mizhka@FreeBSD.org>
AuthorDate: 2024-02-11 17:18:34 +0000
Commit:     Michael Zhilin <mizhka@FreeBSD.org>
CommitDate: 2024-02-12 12:52:02 +0000

    sysutils/flashrom: fix linker error by LLVM17
    
    PR:             276288
    Reported by:    ohartmann@walstatt.org (O. Hartmann), pkg-fallout
    MFH:            2024Q1
    Sponsored by:   Postgres Professional
---
 sysutils/flashrom/Makefile                    |  2 +-
 sysutils/flashrom/files/patch-libflashrom.map | 18 ++++++++++++++++++
 sysutils/flashrom/files/patch-meson.build     | 11 +++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/sysutils/flashrom/Makefile b/sysutils/flashrom/Makefile
index 5fb28103b4af..5215361465a7 100644
--- a/sysutils/flashrom/Makefile
+++ b/sysutils/flashrom/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	flashrom
 PORTVERSION=	1.3.0
 DISTVERSIONPREFIX=	v
-PORTREVISION=   2
+PORTREVISION=	3
 CATEGORIES=	sysutils
 MASTER_SITES=	https://download.flashrom.org/releases/
 
diff --git a/sysutils/flashrom/files/patch-libflashrom.map b/sysutils/flashrom/files/patch-libflashrom.map
new file mode 100644
index 000000000000..438f9a51b39a
--- /dev/null
+++ b/sysutils/flashrom/files/patch-libflashrom.map
@@ -0,0 +1,18 @@
+--- libflashrom.map.orig	2024-02-01 08:22:08 UTC
++++ libflashrom.map
+@@ -1,7 +1,5 @@ LIBFLASHROM_1.0 {
+ 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/sysutils/flashrom/files/patch-meson.build b/sysutils/flashrom/files/patch-meson.build
new file mode 100644
index 000000000000..cef6c1d7d054
--- /dev/null
+++ b/sysutils/flashrom/files/patch-meson.build
@@ -0,0 +1,11 @@
+--- meson.build.orig	2023-04-27 13:51:02 UTC
++++ meson.build
+@@ -234,7 +234,7 @@ programmer = {
+   },
+   'internal' : {
+     'systems' : systems_hwaccess + ['linux'],
+-    'cpu_families' : (host_machine.system() == 'linux' ? [host_machine.cpu_family()] : ['x86', 'x86_64']),
++    'cpu_families' : (host_machine.system() in ['linux', 'freebsd'] ? [host_machine.cpu_family()] : ['x86', 'x86_64']),
+     'deps'    : [ libpci ],
+     'groups'  : [ group_internal ],
+     'srcs'    : (host_machine.cpu_family() in ['x86', 'x86_64'] ? files(