pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/checksum
Module Name: pkgsrc
Committed By: jperkin
Date: Fri Oct 11 11:40:29 UTC 2024
Modified Files:
pkgsrc/mk/checksum: checksum.mk
Log Message:
mk: Add mktool support to distinfo.
mktool is an optional external tool, available from pkgtools/mktool or
"cargo install mktool", that provides significant performance improvements
compared to distinfo.awk, while being 100% compatible.
After installing, set TOOLS_PLATFORM.mktool=/path/to/mktool to enable it.
Comparing the time taken to run "bmake distinfo" on a SmartOS host inside
www/grafana, distinfo.awk takes:
real 3m37.603s
user 1m16.887s
sys 1m53.369s
while mktool takes:
real 0m12.516s
user 0m10.314s
sys 0m8.485s
It should be noted that the vast majority of that time is in the generation
of the distinfo input file. mktool itself takes around 2 seconds. Patches
to improve input file generation are available, but are dependent on bmake
with temporary file support due to argmax limits on NetBSD.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/mk/checksum/checksum.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/checksum/checksum.mk
diff -u pkgsrc/mk/checksum/checksum.mk:1.31 pkgsrc/mk/checksum/checksum.mk:1.32
--- pkgsrc/mk/checksum/checksum.mk:1.31 Fri Oct 11 11:20:23 2024
+++ pkgsrc/mk/checksum/checksum.mk Fri Oct 11 11:40:29 2024
@@ -1,4 +1,4 @@
-# $NetBSD: checksum.mk,v 1.31 2024/10/11 11:20:23 jperkin Exp $
+# $NetBSD: checksum.mk,v 1.32 2024/10/11 11:40:29 jperkin Exp $
#
# See bsd.checksum.mk for helpful comments.
#
@@ -53,9 +53,13 @@ checksum checksum-phase:
fi
.endif
+.if !empty(TOOLS_PLATFORM.mktool)
+_DISTINFO_CMD= ${TOOLS_PLATFORM.mktool} distinfo
+.else
_DISTINFO_CMD= ${PKGSRC_SETENV} DIGEST=${TOOLS_DIGEST:Q} SED=${TOOLS_SED:Q} \
TEST=${TOOLS_TEST:Q} WC=${TOOLS_WC:Q} \
${AWK} -f ${PKGSRCDIR}/mk/checksum/distinfo.awk --
+.endif
.if exists(${DISTDIR})
_DISTINFO_ARGS_COMMON+= -d ${DISTDIR}
Home |
Main Index |
Thread Index |
Old Index