summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-03-06 14:50:45 +0000
committeragc <agc@pkgsrc.org>2001-03-06 14:50:45 +0000
commit9c273b7c7868294492e69114f75fc6c8a7f8b809 (patch)
tree79a56aded63101364f49a0cfee8382d077c50970 /mk/bsd.prefs.mk
parent8c6280da9e876740e653af52f6c30ffc1c94fd30 (diff)
downloadpkgsrc-9c273b7c7868294492e69114f75fc6c8a7f8b809.tar.gz
Add support for message digests other than md5 into pkgsrc. This is done
by using the pkgsrc/pkgtools/digest package, and adding dependencies in bsd.pkg.mk to make sure that that package is up to date. There is no discernable performance decrease in using sha1 checksums over md5 ones, and most people advocate the use of sha1 or rmd160 over md5. As part of this change, move the initial setting of LOCALBASE, X11BASE and CROSSBASE into bsd.prefs.mk from bsd.pkg.mk. Addresses PR 11809.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk27
1 files changed, 26 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 430794abed7..d62d13d110f 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.21 2000/12/03 14:10:03 wiz Exp $
+# $NetBSD: bsd.prefs.mk,v 1.22 2001/03/06 14:50:46 agc Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -143,4 +143,29 @@ NEED_NCURSES= YES
# recursive dependency problems!)
.endif # USE_CURSES
+##### Some overrides of defaults below on a per-OS basis.
+.if (${OPSYS} == "NetBSD")
+LOCALBASE?= ${DESTDIR}/usr/pkg
+.elif (${OPSYS} == "SunOS")
+X11BASE?= ${DESTDIR}/usr/openwin
+.endif
+
+LOCALBASE?= ${DESTDIR}/usr/local
+X11BASE?= ${DESTDIR}/usr/X11R6
+CROSSBASE?= ${LOCALBASE}/cross
+
+.ifndef DIGEST
+DIGEST:= ${LOCALBASE}/bin/digest
+MAKEFLAGS+= DIGEST=${DIGEST}
+.endif
+
+.if !defined(DIGEST_VERSION)
+.if exists(${DIGEST})
+DIGEST_VERSION!= ${DIGEST} -V
+.else
+DIGEST_VERSION= ${DIGEST_REQD}
+.endif
+MAKEFLAGS+= DIGEST_VERSION="${DIGEST_VERSION}"
+.endif
+
.endif # BSD_PKG_MK