git: f8c5e9663322 - main - sysutils/superiotool: update 20121019 -> 4.18

From: Kurt Jaeger <pi_at_FreeBSD.org>
Date: Tue, 10 Jan 2023 19:10:43 UTC
The branch main has been updated by pi:

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

commit f8c5e966332207ee64542e35f20484771e914c69
Author:     Johannes Totz <jo@bruelltuete.com>
AuthorDate: 2023-01-10 19:06:02 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2023-01-10 19:06:02 +0000

    sysutils/superiotool: update 20121019 -> 4.18
    
    PR:             264018
    Author:         Johannes Totz <jo@bruelltuete.com>
    Changes:        https://coreboot.org/releases/coreboot-4.18-relnotes.txt
                    and many more
    Reviewed by:    avg
    Approved by:    avg
    Differential Revision:  https://reviews.freebsd.org/D34094
---
 sysutils/superiotool/Makefile             | 19 +++++++------
 sysutils/superiotool/distinfo             |  5 ++--
 sysutils/superiotool/files/patch-Makefile | 47 +++++++------------------------
 3 files changed, 24 insertions(+), 47 deletions(-)

diff --git a/sysutils/superiotool/Makefile b/sysutils/superiotool/Makefile
index 1b621fbedf07..29407d310c58 100644
--- a/sysutils/superiotool/Makefile
+++ b/sysutils/superiotool/Makefile
@@ -1,26 +1,29 @@
 PORTNAME=	superiotool
-DISTVERSION=	20121019
-PORTREVISION=	1
+DISTVERSION=	4.18
+PORTEPOCH=	1
 CATEGORIES=	sysutils
-MASTER_SITES=	LOCAL/avg \
-		http://www.icyb.net.ua/~avg/distfiles/
+MASTER_SITES=	https://coreboot.org/releases/
+DISTFILES=	coreboot-4.18.tar.xz
 
 MAINTAINER=	avg@FreeBSD.org
 COMMENT=	Helper tool for Super I/O chip detection and analysis
 WWW=		http://www.coreboot.org/Superiotool
 
-LIB_DEPENDS=	libpci.so:devel/libpci
+LICENSE=	GPLv2
 
-ONLY_FOR_ARCHS=	i386 amd64
+ONLY_FOR_ARCHS=	amd64 i386
 ONLY_FOR_ARCHS_REASON=	this tool is for x86-specific hardware
 
+LIB_DEPENDS=	libpci.so:devel/libpci
+
 USES=		gmake tar:bzip2
 
 PLIST_FILES=	sbin/superiotool \
 		man/man8/superiotool.8.gz
 
-WRKSRC=		${WRKDIR}/${PORTNAME}
-UPSTREAM_VERS=	4.0-2827-g1a00cf0
+WRKSRC=		${WRKDIR}/coreboot-${DISTVERSION}
+WRKSRC_SUBDIR=	util/superiotool
+#UPSTREAM_VERS=	4.17-8da4bfe5b
 MAKE_ENV+=	VERSION=-DSUPERIOTOOL_VERSION='\"${UPSTREAM_VERS}\"'
 
 post-patch:
diff --git a/sysutils/superiotool/distinfo b/sysutils/superiotool/distinfo
index 0519162e163f..e3963e102c27 100644
--- a/sysutils/superiotool/distinfo
+++ b/sysutils/superiotool/distinfo
@@ -1,2 +1,3 @@
-SHA256 (superiotool-20121019.tar.bz2) = d4140f3a50e53f46dd9b1edfc8353113f29f437201907d613150d431dbfc7a62
-SIZE (superiotool-20121019.tar.bz2) = 29827
+TIMESTAMP = 1673376441
+SHA256 (coreboot-4.18.tar.xz) = 068f242857911c52090ecbf586a65802c5dead6c82e8bf2047d10ce8e5f28128
+SIZE (coreboot-4.18.tar.xz) = 57868424
diff --git a/sysutils/superiotool/files/patch-Makefile b/sysutils/superiotool/files/patch-Makefile
index 8de94e3a0b81..32ebe2658a8f 100644
--- a/sysutils/superiotool/files/patch-Makefile
+++ b/sysutils/superiotool/files/patch-Makefile
@@ -1,49 +1,22 @@
---- Makefile.orig	2012-10-19 16:44:32.000000000 +0300
-+++ Makefile	2012-10-20 01:32:35.427651135 +0300
-@@ -20,28 +20,24 @@
- 
- PROGRAM = superiotool
- 
--CC      = gcc
--INSTALL = /usr/bin/install
--PREFIX  = /usr/local
-+CC      ?= gcc
-+INSTALL ?= /usr/bin/install
-+PREFIX  ?= /usr/local
+--- Makefile.orig	2022-10-16 20:14:31 UTC
++++ Makefile
+@@ -8,7 +8,7 @@ PREFIX  ?= /usr/local
  
  # Set the superiotool version string to the output of 'git describe'.
  
 -VERSION := -D'SUPERIOTOOL_VERSION="$(shell git describe 2>/dev/null)"'
--
--CFLAGS += -O2 -Wall -Wstrict-prototypes -Wundef -Wstrict-aliasing \
--         -Werror-implicit-function-declaration -ansi -pedantic $(VERSION)
--LDFLAGS += -lz
-+VERSION ?= -D'SUPERIOTOOL_VERSION="$(shell git describe 2>/dev/null)"'
- 
- OBJS = superiotool.o serverengines.o ali.o fintek.o ite.o nsc.o nuvoton.o \
-        smsc.o winbond.o infineon.o
++#VERSION := -D'SUPERIOTOOL_VERSION="$(shell git describe 2>/dev/null)"'
  
--OS_ARCH = $(shell uname)
-+OS_ARCH = FreeBSD
- ifeq ($(OS_ARCH), Darwin)
- LIBS = -framework IOKit -framework DirectHW -lpci -lz
- endif
- ifeq ($(OS_ARCH), FreeBSD)
--CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
--         -Werror-implicit-function-declaration -ansi $(VERSION) \
-+CFLAGS += -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \
-+         -Werror-implicit-function-declaration $(VERSION) \
-          -I/usr/local/include
- LDFLAGS += -L/usr/local/lib
- LIBS = -lz
-@@ -69,8 +65,8 @@ $(PROGRAM): $(OBJS) superiotool.h
+ CFLAGS += -O2 -Wall -Wstrict-prototypes -Wundef -Wstrict-aliasing \
+          -Werror-implicit-function-declaration -ansi -pedantic $(VERSION)
+@@ -56,8 +56,8 @@ install: $(PROGRAM)
  install: $(PROGRAM)
  	mkdir -p $(DESTDIR)$(PREFIX)/sbin
  	$(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/sbin
 -	mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8
--	$(INSTALL) $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8
+-	$(INSTALL) -p -m644 $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8
 +	mkdir -p $(DESTDIR)$(PREFIX)/man/man8
-+	$(INSTALL) $(PROGRAM).8 $(DESTDIR)$(PREFIX)/man/man8
++	$(INSTALL) -p -m644 $(PROGRAM).8 $(DESTDIR)$(PREFIX)/man/man8
  
  clean:
- 	rm -f $(PROGRAM) *.o
+ 	rm -f $(PROGRAM) *.o junit.xml