Page MenuHomeFreeBSD

D47068.1779059657.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D47068.1779059657.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,22 @@
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
+BOOTFWDIR?= /boot/firmware
+_SHAREMODE= 0444
+NO_BUILD= yes
+PLIST= ${WRKDIR}/PLIST
+.else
USES= kmod uidfix
-
MAKE_ENV+= FWSRCDIR=${WRKSRC}/fw
+.endif
post-extract:
@${MKDIR} ${WRKSRC}/fw
@@ -93,6 +106,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} ${BOOTFWDIR}/${_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 +140,16 @@
${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-install:
+ (cd ${WRKSRC}/fw/ && ${COPYTREE_SHARE} . ${STAGEDIR}/${BOOTFWDIR})
+.endif
+
+.include <bsd.port.post.mk>

File Metadata

Mime Type
text/plain
Expires
Sun, May 17, 11:14 PM (44 m, 45 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28711264
Default Alt Text
D47068.1779059657.diff (2 KB)

Event Timeline