https://flashrom.org/Flashrom/1.2 has lots of (build) fixes and drops devel/libusb-compat, I've also added libusb1 explicitly as LDEP (even though it's pulled in through libftdi1).
I also added patch comments and removed the redundant PLIST entry for README which is taken care of automatically these days. Keeps working on the internal programmer of my X230. Feedback? OK? Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/flashrom/Makefile,v retrieving revision 1.15 diff -u -p -r1.15 Makefile --- Makefile 23 Apr 2020 15:06:27 -0000 1.15 +++ Makefile 13 Jun 2020 13:12:55 -0000 @@ -4,8 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 COMMENT= flash ROM programmer for BIOS etc -V= 1.1 -REVISION= 3 +V= 1.2 DISTNAME= flashrom-v${V} PKGNAME= flashrom-${V} EXTRACT_SUFX= .tar.bz2 @@ -19,15 +18,15 @@ MAINTAINER= Stuart Henderson <sthen@open # GPLv2 PERMIT_PACKAGE= Yes -WANTLIB= c ftdi1 usb-1.0 usb z +WANTLIB= c ftdi1 usb-1.0 z MASTER_SITES= https://download.flashrom.org/releases/ # pciutils' libpci.a is linked statically; a patched version is required. BUILD_DEPENDS= sysutils/pciutils:patch RUN_DEPENDS= sysutils/dmidecode -LIB_DEPENDS= devel/libusb-compat \ - devel/libftdi1 +LIB_DEPENDS= devel/libftdi1 \ + devel/libusb1 MAKE_FLAGS= LDFLAGS="-L./pciutils/lib" WARNERROR=no FAKE_FLAGS= PREFIX="${TRUEPREFIX}" MANDIR="${TRUEPREFIX}/man" Index: distinfo =================================================================== RCS file: /cvs/ports/sysutils/flashrom/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo 5 Jul 2019 16:01:57 -0000 1.5 +++ distinfo 13 Jun 2020 01:20:41 -0000 @@ -1,2 +1,2 @@ -SHA256 (flashrom-v1.1.tar.bz2) = rq2pxwwiQhIXxmk1YYDA3t3Qtgh25j0iJOMmC5DBThk= -SIZE (flashrom-v1.1.tar.bz2) = 348458 +SHA256 (flashrom-v1.2.tar.bz2) = 4fjZWIH1pDZd/lh3bOgh387g8Tj3XQ9E+KPNAy2epCs= +SIZE (flashrom-v1.2.tar.bz2) = 366995 Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/sysutils/flashrom/patches/patch-Makefile,v retrieving revision 1.4 diff -u -p -r1.4 patch-Makefile --- patches/patch-Makefile 5 Jul 2019 16:01:57 -0000 1.4 +++ patches/patch-Makefile 13 Jun 2020 01:20:41 -0000 @@ -7,7 +7,7 @@ fix clock_gettime detection. Index: Makefile --- Makefile.orig +++ Makefile -@@ -1075,7 +1075,6 @@ FEATURE_CFLAGS += $(call debug_shell,grep -q "UTSNAME +@@ -1120,7 +1120,6 @@ FEATURE_CFLAGS += $(call debug_shell,grep -q "UTSNAME FEATURE_LIBS += $(call debug_shell,grep -q "NEEDLIBZ := yes" .libdeps && printf "%s" "-lz") FEATURE_CFLAGS += $(call debug_shell,grep -q "CLOCK_GETTIME := yes" .features && printf "%s" "-D'HAVE_CLOCK_GETTIME=1'") @@ -15,7 +15,7 @@ Index: Makefile LIBFLASHROM_OBJS = $(CHIP_OBJS) $(PROGRAMMER_OBJS) $(LIB_OBJS) OBJS = $(CLI_OBJS) $(LIBFLASHROM_OBJS) -@@ -1153,11 +1152,7 @@ endif +@@ -1198,11 +1197,7 @@ endif define LIBPCI_TEST /* Avoid a failing test due to libpci header symbol shadowing breakage */ #define index shadow_workaround_index @@ -28,7 +28,7 @@ Index: Makefile struct pci_access *pacc; int main(int argc, char **argv) { -@@ -1172,11 +1167,7 @@ export LIBPCI_TEST +@@ -1217,11 +1212,7 @@ export LIBPCI_TEST define PCI_GET_DEV_TEST /* Avoid a failing test due to libpci header symbol shadowing breakage */ #define index shadow_workaround_index @@ -41,7 +41,7 @@ Index: Makefile struct pci_access *pacc; struct pci_dev *dev = {0}; int main(int argc, char **argv) -@@ -1490,8 +1481,8 @@ endif +@@ -1529,8 +1520,8 @@ endif ( echo "not found."; echo "UTSNAME := no" >> .features.tmp ) } 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE) @printf "Checking for clock_gettime support... " | tee -a $(BUILD_DETAILS_FILE) @echo "$$CLOCK_GETTIME_TEST" >.featuretest.c Index: patches/patch-flashrom_8_tmpl =================================================================== RCS file: /cvs/ports/sysutils/flashrom/patches/patch-flashrom_8_tmpl,v retrieving revision 1.2 diff -u -p -r1.2 patch-flashrom_8_tmpl --- patches/patch-flashrom_8_tmpl 5 Jul 2019 16:01:57 -0000 1.2 +++ patches/patch-flashrom_8_tmpl 13 Jun 2020 13:21:10 -0000 @@ -1,9 +1,11 @@ $OpenBSD: patch-flashrom_8_tmpl,v 1.2 2019/07/05 16:01:57 sthen Exp $ +Emphasise single user mode preference to changing securelevel(7). + Index: flashrom.8.tmpl --- flashrom.8.tmpl.orig +++ flashrom.8.tmpl -@@ -1268,7 +1268,7 @@ On OpenBSD, you can obtain raw access permission by se +@@ -1369,7 +1369,7 @@ On OpenBSD, you can obtain raw access permission by se .B "securelevel=-1" in .B "/etc/rc.securelevel" Index: patches/patch-hwaccess_c =================================================================== RCS file: /cvs/ports/sysutils/flashrom/patches/patch-hwaccess_c,v retrieving revision 1.4 diff -u -p -r1.4 patch-hwaccess_c --- patches/patch-hwaccess_c 5 Jul 2019 16:01:57 -0000 1.4 +++ patches/patch-hwaccess_c 13 Jun 2020 13:20:41 -0000 @@ -1,9 +1,11 @@ $OpenBSD: patch-hwaccess_c,v 1.4 2019/07/05 16:01:57 sthen Exp $ +Emphasise single user mode preference to changing securelevel(7). + Index: hwaccess.c --- hwaccess.c.orig +++ hwaccess.c -@@ -120,8 +120,8 @@ int rget_io_perms(void) +@@ -121,8 +121,8 @@ int rget_io_perms(void) msg_perr("ERROR: Could not get I/O privileges (%s).\n", strerror(errno)); msg_perr("You need to be root.\n"); #if defined (__OpenBSD__) Index: patches/patch-physmap_c =================================================================== RCS file: /cvs/ports/sysutils/flashrom/patches/patch-physmap_c,v retrieving revision 1.3 diff -u -p -r1.3 patch-physmap_c --- patches/patch-physmap_c 5 Jul 2019 16:01:57 -0000 1.3 +++ patches/patch-physmap_c 13 Jun 2020 13:21:10 -0000 @@ -1,5 +1,7 @@ $OpenBSD: patch-physmap_c,v 1.3 2019/07/05 16:01:57 sthen Exp $ +Emphasise single user mode preference to changing securelevel(7). + Index: physmap.c --- physmap.c.orig +++ physmap.c