git: 6247964e51aa - main - net/wifi-firmware-*: use metaport for "base" and switch to Makefile.inc

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 12 May 2023 11:58:29 UTC
The branch main has been updated by bz:

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

commit 6247964e51aa9d2dd972fb4c545c97164bda609c
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-05-08 20:54:50 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-05-12 11:57:09 +0000

    net/wifi-firmware-*: use metaport for "base" and switch to Makefile.inc
    
    Rename the wifi-firmware-base to wifi-firmware-kmod (similar to
    gpu-firmware-mod).  The former was never build so technically it
    is no move.  Make the new subdir a metaport including all
    wireless firmware.
    Move the old Makefile to Makefile.inc and adjust the child ports
    accordingly.
    
    This solves two problems: (1) the base port is now buildable and (2)
    there is a single port to depend on to add all the needed firmware
    files to, e.g., put on a release media.
    
    Suggested by:   amdmi3
    PR:             270742
    Reviewed by:    ehaupt, jrm
    Approved by:    ehaupt, jrm
    Differential Revision: https://reviews.freebsd.org/D40014
---
 net/Makefile                                           |  2 +-
 net/wifi-firmware-ath10k-kmod/Makefile                 |  4 ++--
 net/wifi-firmware-ath11k-kmod/Makefile                 |  4 ++--
 net/wifi-firmware-base/pkg-descr                       |  1 -
 net/wifi-firmware-kmod/Makefile                        | 18 ++++++++++++++++++
 .../Makefile => wifi-firmware-kmod/Makefile.inc}       |  0
 net/wifi-firmware-kmod/pkg-descr                       |  1 +
 net/wifi-firmware-mt76-kmod/Makefile                   |  4 ++--
 net/wifi-firmware-rtw88-kmod/Makefile                  |  4 ++--
 net/wifi-firmware-rtw89-kmod/Makefile                  |  4 ++--
 10 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/net/Makefile b/net/Makefile
index 7e8140d7f268..71460e1d9aa9 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1584,7 +1584,7 @@
     SUBDIR += widentd
     SUBDIR += wifi-firmware-ath10k-kmod
     SUBDIR += wifi-firmware-ath11k-kmod
-    SUBDIR += wifi-firmware-base
+    SUBDIR += wifi-firmware-kmod
     SUBDIR += wifi-firmware-mt76-kmod
     SUBDIR += wifi-firmware-rtw88-kmod
     SUBDIR += wifi-firmware-rtw89-kmod
diff --git a/net/wifi-firmware-ath10k-kmod/Makefile b/net/wifi-firmware-ath10k-kmod/Makefile
index 2355138b86ef..20003c3ce348 100644
--- a/net/wifi-firmware-ath10k-kmod/Makefile
+++ b/net/wifi-firmware-ath10k-kmod/Makefile
@@ -1,4 +1,4 @@
-BASEDIR=	${.CURDIR}/../wifi-firmware-base
+BASEDIR=	${.CURDIR}/../wifi-firmware-kmod
 
 FWDRV=		ath10k
 FWSUBDIR=	ath10k
@@ -85,4 +85,4 @@ DISTFILES_lic=	\
 	${DISTFILES_QCA9984_hw10_lic} \
 	${DISTFILES_QCA99X0_hw20_lic}
 
-.include "${BASEDIR}/Makefile"
+.include "${BASEDIR}/Makefile.inc"
diff --git a/net/wifi-firmware-ath11k-kmod/Makefile b/net/wifi-firmware-ath11k-kmod/Makefile
index 1f70ff0b7833..4f4e1566a73d 100644
--- a/net/wifi-firmware-ath11k-kmod/Makefile
+++ b/net/wifi-firmware-ath11k-kmod/Makefile
@@ -1,4 +1,4 @@
-BASEDIR=	${.CURDIR}/../wifi-firmware-base
+BASEDIR=	${.CURDIR}/../wifi-firmware-kmod
 
 FWDRV=		ath11k
 FWSUBDIR=	ath11k
@@ -102,4 +102,4 @@ DISTFILES_lic=	\
 #	${DISTFILES_WCN6855_hw20_lic} \
 #	${DISTFILES_WCN6750_hw10_lic}
 
-.include "${BASEDIR}/Makefile"
+.include "${BASEDIR}/Makefile.inc"
diff --git a/net/wifi-firmware-base/pkg-descr b/net/wifi-firmware-base/pkg-descr
deleted file mode 100644
index 0825791ccf13..000000000000
--- a/net/wifi-firmware-base/pkg-descr
+++ /dev/null
@@ -1 +0,0 @@
-WiFi firmware build master port.
diff --git a/net/wifi-firmware-kmod/Makefile b/net/wifi-firmware-kmod/Makefile
new file mode 100644
index 000000000000..53a4ff214678
--- /dev/null
+++ b/net/wifi-firmware-kmod/Makefile
@@ -0,0 +1,18 @@
+PORTNAME=	wifi-firmware-kmod
+PORTVERSION=	20230508
+CATEGORIES=	net
+
+MAINTAINER=	bz@FreeBSD.org
+COMMENT=	Firmware modules for WiFi NIC drivers
+WWW=		https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/
+
+RUN_DEPENDS=	\
+		wifi-firmware-ath10k-kmod>0:net/wifi-firmware-ath10k-kmod \
+		wifi-firmware-ath11k-kmod>0:net/wifi-firmware-ath11k-kmod \
+		wifi-firmware-mt76-kmod>0:net/wifi-firmware-mt76-kmod \
+		wifi-firmware-rtw88-kmod>0:net/wifi-firmware-rtw88-kmod \
+		wifi-firmware-rtw89-kmod>0:net/wifi-firmware-rtw89-kmod
+
+USES=		metaport
+
+.include <bsd.port.mk>
diff --git a/net/wifi-firmware-base/Makefile b/net/wifi-firmware-kmod/Makefile.inc
similarity index 100%
rename from net/wifi-firmware-base/Makefile
rename to net/wifi-firmware-kmod/Makefile.inc
diff --git a/net/wifi-firmware-kmod/pkg-descr b/net/wifi-firmware-kmod/pkg-descr
new file mode 100644
index 000000000000..a11045a83f3f
--- /dev/null
+++ b/net/wifi-firmware-kmod/pkg-descr
@@ -0,0 +1 @@
+Meta port for the firmware modules for the WiFi NIC drivers.
diff --git a/net/wifi-firmware-mt76-kmod/Makefile b/net/wifi-firmware-mt76-kmod/Makefile
index cb75f071f4f3..86692cd413a9 100644
--- a/net/wifi-firmware-mt76-kmod/Makefile
+++ b/net/wifi-firmware-mt76-kmod/Makefile
@@ -1,4 +1,4 @@
-BASEDIR=	${.CURDIR}/../wifi-firmware-base
+BASEDIR=	${.CURDIR}/../wifi-firmware-kmod
 
 FWDRV=		mt76
 FWSUBDIR=	mediatek
@@ -28,4 +28,4 @@ DISTFILES_fw= \
 	${DISTFILES_mt7921}
 DISTFILES_lic=
 
-.include "${BASEDIR}/Makefile"
+.include "${BASEDIR}/Makefile.inc"
diff --git a/net/wifi-firmware-rtw88-kmod/Makefile b/net/wifi-firmware-rtw88-kmod/Makefile
index 01eed314d6be..aa4a8a5b38bc 100644
--- a/net/wifi-firmware-rtw88-kmod/Makefile
+++ b/net/wifi-firmware-rtw88-kmod/Makefile
@@ -1,4 +1,4 @@
-BASEDIR=	${.CURDIR}/../wifi-firmware-base
+BASEDIR=	${.CURDIR}/../wifi-firmware-kmod
 
 FWDRV=		rtw88
 FWSUBDIR=	rtw88
@@ -31,4 +31,4 @@ DISTFILES_fw= \
 DISTFILES_lic= \
 	${FWSUBDIR}/README${DISTURL_SUFFIX}
 
-.include "${BASEDIR}/Makefile"
+.include "${BASEDIR}/Makefile.inc"
diff --git a/net/wifi-firmware-rtw89-kmod/Makefile b/net/wifi-firmware-rtw89-kmod/Makefile
index 6f88b11697a2..d3b1b197997e 100644
--- a/net/wifi-firmware-rtw89-kmod/Makefile
+++ b/net/wifi-firmware-rtw89-kmod/Makefile
@@ -1,4 +1,4 @@
-BASEDIR=	${.CURDIR}/../wifi-firmware-base
+BASEDIR=	${.CURDIR}/../wifi-firmware-kmod
 
 FWDRV=		rtw89
 FWSUBDIR=	rtw89
@@ -25,4 +25,4 @@ DISTFILES_fw= \
 
 DISTFILES_lic=
 
-.include "${BASEDIR}/Makefile"
+.include "${BASEDIR}/Makefile.inc"