git: b6f0fbdb2d90 - main - sysutils/bsdsensors: New port: utility to read sensor data and control fan speed

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 19 Jan 2025 19:30:54 UTC
The branch main has been updated by vvd:

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

commit b6f0fbdb2d90744efa0e43c6bfc6a98628afa95b
Author:     Henry Hu <henry.hu.sh@gmail.com>
AuthorDate: 2025-01-19 19:26:43 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-01-19 19:26:43 +0000

    sysutils/bsdsensors: New port: utility to read sensor data and control fan speed
    
    Here's a new port, which provides a simple utility to read sensor data
    and control fan speed. Specifically, it supports a few Nuvoton embedded
    controllers, which are widely used in consumer-grade motherboards.
    
    The utility can
    * read temp sensor
    * read voltage sensor
    * read fan speed
    * read fan curve and control information
    * write fan curve and control params
    
    It's released under BSD 3-clause.
    
    https://github.com/HenryHu/bsdsensors
    
    PR:     284144
---
 sysutils/Makefile             |  1 +
 sysutils/bsdsensors/Makefile  | 20 ++++++++++++++++++++
 sysutils/bsdsensors/distinfo  |  3 +++
 sysutils/bsdsensors/pkg-descr |  4 ++++
 sysutils/bsdsensors/pkg-plist | 31 +++++++++++++++++++++++++++++++
 5 files changed, 59 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index 64919ddd5cd0..2404b05b7cfe 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -148,6 +148,7 @@
     SUBDIR += bsdhwmon
     SUBDIR += bsdinfo
     SUBDIR += bsdisks
+    SUBDIR += bsdsensors
     SUBDIR += bsdstats
     SUBDIR += bstack
     SUBDIR += btop
diff --git a/sysutils/bsdsensors/Makefile b/sysutils/bsdsensors/Makefile
new file mode 100644
index 000000000000..99b0e17dbeee
--- /dev/null
+++ b/sysutils/bsdsensors/Makefile
@@ -0,0 +1,20 @@
+PORTNAME=	bsdsensors
+DISTVERSION=	0.1.20250118
+CATEGORIES=	sysutils
+
+MAINTAINER=	henry.hu.sh@gmail.com
+COMMENT=	Tool to read sensors and control fan speed
+WWW=		https://github.com/henryhu/bsdsensors
+
+LICENSE=	BSD3CLAUSE
+
+LIB_DEPENDS=	libglog.so:devel/glog \
+		libprotobuf.so:devel/protobuf \
+		libgflags.so:devel/gflags \
+		libabsl_base.so:devel/abseil
+
+USES=		cmake
+USE_GITHUB=	yes
+GH_ACCOUNT=	henryhu
+
+.include <bsd.port.mk>
diff --git a/sysutils/bsdsensors/distinfo b/sysutils/bsdsensors/distinfo
new file mode 100644
index 000000000000..eee0f7885005
--- /dev/null
+++ b/sysutils/bsdsensors/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1737235824
+SHA256 (henryhu-bsdsensors-0.1.20250118_GH0.tar.gz) = e084cc1b4efa52753d52a08ecc3955d25e6d5492689a7df43e4a28631c5be5e3
+SIZE (henryhu-bsdsensors-0.1.20250118_GH0.tar.gz) = 33704
diff --git a/sysutils/bsdsensors/pkg-descr b/sysutils/bsdsensors/pkg-descr
new file mode 100644
index 000000000000..76d623e44a41
--- /dev/null
+++ b/sysutils/bsdsensors/pkg-descr
@@ -0,0 +1,4 @@
+bsdsensors is a utility to fetch system sensors and control fan speed.  It
+focuses on fetching sensors (such as temperature, fan speed, and voltage) from
+the embedded controller on the motherboard, and controlling fan speed through
+it.
diff --git a/sysutils/bsdsensors/pkg-plist b/sysutils/bsdsensors/pkg-plist
new file mode 100644
index 000000000000..591d5d20a1e9
--- /dev/null
+++ b/sysutils/bsdsensors/pkg-plist
@@ -0,0 +1,31 @@
+bin/bsdsensors
+include/bsdsensors/address.h
+include/bsdsensors/chip.h
+include/bsdsensors/chip_info.h
+include/bsdsensors/config.h
+include/bsdsensors/dev_db.h
+include/bsdsensors/fan_control.h
+include/bsdsensors/fan_speed.h
+include/bsdsensors/fintek_chip.h
+include/bsdsensors/fintek_chip_info.h
+include/bsdsensors/fintek_fan.h
+include/bsdsensors/fintek_temp_sensor.h
+include/bsdsensors/fintek_volt_sensor.h
+include/bsdsensors/ite_chip.h
+include/bsdsensors/ite_chip_info.h
+include/bsdsensors/microchip_chip.h
+include/bsdsensors/microchip_chip_info.h
+include/bsdsensors/nuvoton_chip.h
+include/bsdsensors/nuvoton_chip_info.h
+include/bsdsensors/nuvoton_fan_control.h
+include/bsdsensors/nuvoton_fan_speed.h
+include/bsdsensors/nuvoton_temp_sensor.h
+include/bsdsensors/nuvoton_volt_sensor.h
+include/bsdsensors/port_io.h
+include/bsdsensors/status.h
+include/bsdsensors/super_io.h
+include/bsdsensors/temp_sensor.h
+include/bsdsensors/util.h
+include/bsdsensors/value_util.h
+include/bsdsensors/volt_sensor.h
+lib/libbsdsensors.so