Page MenuHomeFreeBSD

D47068.1779102744.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D47068.1779102744.diff

diff --git a/net/wifi-firmware-kmod/Makefile.inc b/net/wifi-firmware-kmod/Makefile.inc
--- a/net/wifi-firmware-kmod/Makefile.inc
+++ b/net/wifi-firmware-kmod/Makefile.inc
@@ -82,9 +82,21 @@
ONLY_FOR_ARCHS= aarch64 amd64 i386
ONLY_FOR_ARCHS_REASON= LinuxKPI driver only available for these architectures
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 1500014
+# src.git main 479905a1ed26c54ef29cdff65cf25f7feade654b allows direct loading
+# of firmware files. For anything before that we still need to create kernel
+# modules. We need to write a PLIST file so we can then simply use
+# COPYTREE_SHARE with adjusted permissions to copy the files over.
+USES= uidfix
+BOOTFIRMWAREDIR?= /boot/firmware
+_SHAREMODE= 0444
+PLIST= ${WRKDIR}/PLIST
+.else
USES= kmod uidfix
-
MAKE_ENV+= FWSRCDIR=${WRKSRC}/fw
+.endif
post-extract:
@${MKDIR} ${WRKSRC}/fw
@@ -93,6 +105,17 @@
@${CP} ${DISTDIR}/${DIST_SUBDIR}/WHENCE${DISTURL_SUFFIX} ${WRKSRC}/WHENCE.in
@${SED} -e "s@%%XXX%%@${WHENCE_REGEX:Q}@g" ${FILESDIR}/WHENCE.awk.in > ${WRKSRC}/WHENCE.awk
@${AWK} -f ${WRKSRC}/WHENCE.awk ${WRKSRC}/WHENCE.in > ${WRKSRC}/WHENCE
+################################################################################
+.if ${OSVERSION} >= 1500014
+.for _f in ${DISTFILES_${FLAVOR}}
+ # Create firmware source directory and copy in distfile.
+ @${MKDIR} ${WRKSRC}/fw/${_f:H}
+ ${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@}
+ @${ECHO_CMD} ${BOOTFIRMWAREDIR}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@} >> ${PLIST}
+.endfor
+.else
+################################################################################
+# Build kernel modules.
# Prepare toplevel Makefile and Makefile.inc.
@${ECHO_CMD} "SUBDIR=" > ${WRKSRC}/Makefile
@${SED} -e "s@%%FWDRV%%@${FWDRV}@g" \
@@ -116,9 +139,19 @@
${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@}
.endfor
@${ECHO_CMD} '.include <bsd.subdir.mk>' >> ${WRKSRC}/Makefile
+################################################################################
+.endif
# Copy in additional licenses files.
.for _f in ${DISTFILES_${FLAVOR}_lic}
${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g}
.endfor
-.include <bsd.port.mk>
+.if ${OSVERSION} >= 1500014
+do-build:
+ ${DO_NADA}
+
+do-install:
+ (cd ${WRKSRC}/fw/ && ${COPYTREE_SHARE} . ${STAGEDIR}/${BOOTFIRMWAREDIR})
+.endif
+
+.include <bsd.port.post.mk>

File Metadata

Mime Type
text/plain
Expires
Mon, May 18, 11:12 AM (12 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28715998
Default Alt Text
D47068.1779102744.diff (2 KB)

Event Timeline