Index: sysutils/zol-kmod/Makefile =================================================================== --- sysutils/zol-kmod/Makefile +++ sysutils/zol-kmod/Makefile @@ -10,45 +10,42 @@ COMMENT= ZFS LICENSE= CDDL +LICENSE_FILE= ${WRKSRC:H}/LICENSE -USES= kmod +USES= kmod uidfix USE_GITHUB= yes GH_ACCOUNT= zfsonfreebsd GH_PROJECT= ZoF GH_TAGNAME= 7ee98db - +WRKSRC_SUBDIR= module +MAKEFILE= Makefile.bsd PLIST_FILES= ${KMODDIR}/zfs.ko OPTIONS_DEFINE= DEBUG GCOV OPTIONS_SUB= yes -GCOV_DESC= Build kernel module with GCOV support (Requires gcc) -.include +DEBUG_MAKE_ENV= WITH_DEBUG=true +DEBUG_PLIST_FILES= ${KMODDIR}/zfs.ko.debug -.if (${OSVERSION} < 1200504) || (${OSVERSION} >= 1300000 && ${OSVERSION} < 1300013) -IGNORE= needs FreeBSD 12/13 with AES-CCM support -.endif +GCOV_DESC= GNU coverage support (requires GCC) +GCOV_USE= GCC=any +GCOV_MAKE_ENV= WITH_GCOV=true -.if ${PORT_OPTIONS:MDEBUG} -MAKE_OPTS+= WITH_DEBUG=true -PLIST_FILES+= ${KMODDIR}/zfs.ko.debug -.endif +.include -.if ${PORT_OPTIONS:MGCOV} -USE_GCC=yes -MAKE_OPTS+= WITH_GCOV=true +.if ${OPSYS} == FreeBSD && (${OSVERSION} < 1200504 || (${OSVERSION} >= 1300000 && ${OSVERSION} < 1300013)) +IGNORE= needs FreeBSD 12/13 with AES-CCM support .endif post-patch: - ${CP} ${FILESDIR}/zfs_gitrev.h ${WRKSRC}/include + @${REINPLACE_CMD} -e '/git[[:>:]]/d' \ + ${WRKSRC:H}/scripts/make_gitrev.sh -do-build: - (cd ${WRKSRC}/module/ && make -f Makefile.bsd CC=${CC} ${MAKE_OPTS}) +do-configure: + ${SETENV} ZFS_GIT_REV="${GH_TAGNAME}" ${SH} \ + ${WRKSRC:H}/scripts/make_gitrev.sh -do-install: - ${INSTALL} ${WRKSRC}/module/zfs.ko ${STAGEDIR}${KMODDIR} -.if ${PORT_OPTIONS:MDEBUG} - ${INSTALL} ${WRKSRC}/module/zfs.ko.debug ${STAGEDIR}${KMODDIR} -.endif +do-install-DEBUG-on: + ${INSTALL_KLD} ${WRKSRC}/zfs.ko.debug ${STAGEDIR}${KMODDIR} -.include +.include