<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/e967b6b8c0e96ca35dd5ca478dfd88a9f58a746a">https://github.com/macports/macports-ports/commit/e967b6b8c0e96ca35dd5ca478dfd88a9f58a746a</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit e967b6b8c0e96ca35dd5ca478dfd88a9f58a746a
</span>Author: Davide `rainbow` Gerhard <rainbow@irh.it>
AuthorDate: Fri Jan 25 08:38:31 2019 +0100
<span style='display:block; white-space:pre;color:#404040;'> new Portfile flashrom: universal flash programming utility
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> flashrom is a utility for identifying, reading, writing, verifying and
</span><span style='display:block; white-space:pre;color:#404040;'> erasing flash chips.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The patch is needed because libusb 1.0.22 marked libusb_set_debug
</span><span style='display:block; white-space:pre;color:#404040;'> as deprecated. With the next release could be deleted.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Tested with buspirate on
</span><span style='display:block; white-space:pre;color:#404040;'> macOS 10.14.3 18D42
</span><span style='display:block; white-space:pre;color:#404040;'> Xcode 10.1 10B61
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Signed-off-by: Davide `rainbow` Gerhard <rainbow@irh.it>
</span>---
sysutils/flashrom/Portfile | 59 ++++++++++++++++++++++
.../files/patch-libusb_set_debug-deprecated.diff | 35 +++++++++++++
2 files changed, 94 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/flashrom/Portfile b/sysutils/flashrom/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..e2032dc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/flashrom/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,59 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name flashrom
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories sysutils
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license GPL-2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers ra1nb0w openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description universal flash programming utility
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description utility for identifying, reading, writing, verifying and erasing flash chips.\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mainboards, network/graphics/storage controller cards, and various other \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ programmer devices.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.flashrom.org/Flashrom
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://download.flashrom.org/releases/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_bzip2 yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 b2e0c62d8a0ae592a6d84b69c5f5ea3283dcfefe \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 321693
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# needed until next version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-libusb_set_debug-deprecated.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build port:pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib port:libftdi0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libusb-compat \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libusb
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_configure no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.env CONFIG_GFXNVIDIA=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_NIC3COM=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_NICREALTEK=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_NICNATSEMI=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_NICINTEL=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_NICINTEL_SPI=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_NICINTEL_EEPROM=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_OGP_SPI=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_SATAMV=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_SATASII=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_DRKAISER=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_RAYER_SPI=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_INTERNAL=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_IT8212=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_ATAHPT=0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CONFIG_ATAVIA=0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot.env [option build.env]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-build {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|sbin|bin|g" ${worksrcpath}/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|/usr/local|/opt/local|g" ${worksrcpath}/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.cmd ./flashrom --version
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/flashrom/files/patch-libusb_set_debug-deprecated.diff b/sysutils/flashrom/files/patch-libusb_set_debug-deprecated.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..34e9e72
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/flashrom/files/patch-libusb_set_debug-deprecated.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 291764a70e6d8b212680e311bfb0825abf2b9a2f Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Alex James <theracermaster@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sat, 14 Apr 2018 22:59:57 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] ch341a_spi: Avoid deprecated libusb functions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+libusb 1.0.22 marked libusb_set_debug as deprecated. For such versions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+of libusb, use libusb_set_option instead.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Change-Id: Ib71ebe812316eaf49136979a942a946ef9e4d487
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Signed-off-by: Alex James <theracermaster@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Reviewed-on: https://review.coreboot.org/25681
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Tested-by: Nico Huber <nico.h@gmx.de>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Reviewed-by: David Hendricks <david.hendricks@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ch341a_spi.c | 7 ++++++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 6 insertions(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/ch341a_spi.c b/ch341a_spi.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 95e9c9577..ee18624ea 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ch341a_spi.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ch341a_spi.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -441,7 +441,12 @@ int ch341a_spi_init(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- libusb_set_debug(NULL, 3); // Enable information, warning and error messages (only).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Enable information, warning, and error messages (only). */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if LIBUSB_API_VERSION < 0x01000106
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ libusb_set_debug(NULL, 3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uint16_t vid = devs_ch341a_spi[0].vendor_id;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uint16_t pid = devs_ch341a_spi[0].device_id;
</span></pre><pre style='margin:0'>
</pre>