pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Fri Oct 11 12:53:14 UTC 2024

Modified Files:
        pkgsrc/mk/checksum: bsd.checksum-vars.mk
        pkgsrc/mk/fetch: bsd.fetch-vars.mk
        pkgsrc/mk/patch: bsd.patch-vars.mk
        pkgsrc/mk/tools: digest.mk

Log Message:
mk: Add mktool support to digest.

mktool is an optional external tool, available from pkgtools/mktool or
"cargo install mktool", that provides a "mktool digest" command that is
compatible with pkgtools/digest.

After installing, set TOOLS_PLATFORM.mktool=/path/to/mktool to enable it.

The benefit of using mktool for the DIGEST tool is that it eliminates the
dependency on pkgtools/digest for almost every package.  This has a
particular impact in bulk builds, where dependencies are installed fresh for
every single package build.

Currently "mktool digest" only implements the algorithms that are actually
used (or have been used in the past) by pkgsrc, though adding support for
e.g. tiger and whirlpool would be trivial.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/mk/checksum/bsd.checksum-vars.mk
cvs rdiff -u -r1.27 -r1.28 pkgsrc/mk/fetch/bsd.fetch-vars.mk
cvs rdiff -u -r1.7 -r1.8 pkgsrc/mk/patch/bsd.patch-vars.mk
cvs rdiff -u -r1.6 -r1.7 pkgsrc/mk/tools/digest.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/bsd.checksum-vars.mk
diff -u pkgsrc/mk/checksum/bsd.checksum-vars.mk:1.3 pkgsrc/mk/checksum/bsd.checksum-vars.mk:1.4
--- pkgsrc/mk/checksum/bsd.checksum-vars.mk:1.3 Sun Jan  7 11:23:37 2018
+++ pkgsrc/mk/checksum/bsd.checksum-vars.mk     Fri Oct 11 12:53:13 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.checksum-vars.mk,v 1.3 2018/01/07 11:23:37 rillig Exp $
+# $NetBSD: bsd.checksum-vars.mk,v 1.4 2024/10/11 12:53:13 jperkin Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
@@ -12,6 +12,6 @@
 
 DISTINFO_FILE?=                ${PKGDIR}/distinfo
 
-.if !empty(_CKSUMFILES)
+.if !empty(_CKSUMFILES) && empty(TOOLS_PLATFORM.mktool)
 USE_TOOLS+=    digest:bootstrap
 .endif

Index: pkgsrc/mk/fetch/bsd.fetch-vars.mk
diff -u pkgsrc/mk/fetch/bsd.fetch-vars.mk:1.27 pkgsrc/mk/fetch/bsd.fetch-vars.mk:1.28
--- pkgsrc/mk/fetch/bsd.fetch-vars.mk:1.27      Mon May 13 08:09:30 2024
+++ pkgsrc/mk/fetch/bsd.fetch-vars.mk   Fri Oct 11 12:53:13 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.fetch-vars.mk,v 1.27 2024/05/13 08:09:30 wiz Exp $
+# $NetBSD: bsd.fetch-vars.mk,v 1.28 2024/10/11 12:53:13 jperkin Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
@@ -106,7 +106,8 @@ NO_SKIP=            # defined
 _BOOTSTRAP_VERBOSE=    # defined
 .endif
 
-.if !empty(_CKSUMFILES) && defined(FAILOVER_FETCH)
+.if !empty(_CKSUMFILES) && defined(FAILOVER_FETCH) \
+  && empty(TOOLS_PLATFORM.mktool)
 USE_TOOLS+=    digest:bootstrap
 .endif
 

Index: pkgsrc/mk/patch/bsd.patch-vars.mk
diff -u pkgsrc/mk/patch/bsd.patch-vars.mk:1.7 pkgsrc/mk/patch/bsd.patch-vars.mk:1.8
--- pkgsrc/mk/patch/bsd.patch-vars.mk:1.7       Mon Jun  9 14:47:03 2008
+++ pkgsrc/mk/patch/bsd.patch-vars.mk   Fri Oct 11 12:53:13 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.patch-vars.mk,v 1.7 2008/06/09 14:47:03 sketch Exp $
+# $NetBSD: bsd.patch-vars.mk,v 1.8 2024/10/11 12:53:13 jperkin Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
@@ -35,7 +35,8 @@ local_patches=        ${:!echo ${LOCALPATCHES}/
 .if !empty(PATCHFILES) || !empty(pkgsrc_patches) || !empty(local_patches)
 USE_TOOLS+=    patch
 .endif
-.if !empty(PATCHFILES) || !empty(pkgsrc_patches)
+.if (!empty(PATCHFILES) || !empty(pkgsrc_patches)) \
+  && empty(TOOLS_PLATFORM.mktool)
 USE_TOOLS+=    digest:bootstrap
 .endif
 

Index: pkgsrc/mk/tools/digest.mk
diff -u pkgsrc/mk/tools/digest.mk:1.6 pkgsrc/mk/tools/digest.mk:1.7
--- pkgsrc/mk/tools/digest.mk:1.6       Tue Jun 27 10:27:21 2023
+++ pkgsrc/mk/tools/digest.mk   Fri Oct 11 12:53:14 2024
@@ -1,4 +1,4 @@
-# $NetBSD: digest.mk,v 1.6 2023/06/27 10:27:21 riastradh Exp $
+# $NetBSD: digest.mk,v 1.7 2024/10/11 12:53:14 jperkin Exp $
 #
 # Copyright (c) 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -43,7 +43,9 @@
 DIGEST_REQD?=          20211023
 
 .if !defined(TOOLS_IGNORE.digest) && !empty(USE_TOOLS:C/:.*//:Mdigest)
-.  if ${PKGPATH} == pkgtools/digest
+.  if !empty(TOOLS_PLATFORM.mktool)
+DIGEST?=               ${TOOLS_PLATFORM.mktool} digest
+.  elif ${PKGPATH} == pkgtools/digest
 MAKEFLAGS+=            TOOLS_IGNORE.digest=
 .  else
 .    if defined(TOOLS_PLATFORM.digest) && !empty(TOOLS_PLATFORM.digest)



Home | Main Index | Thread Index | Old Index