Introduce a new category, "crypto", with a special property: If the user trunk
authorfredb <fredb@pkgsrc.org>
Wed, 06 Sep 2000 20:28:32 +0000
branchtrunk
changeset 14090 2398ba20dce6
parent 14089 6b2673e2c499
child 14091 8878158b8839
Introduce a new category, "crypto", with a special property: If the user sets MKCRYPTO=no, packages in this category won't be fetched, installed, built, or packaged. Also, binary package users forbidden, by law, from using strong cryptography would presumably find the list on the category's automatically generated web page useful for ensuring compliance.
Makefile
crypto/Makefile
mk/bsd.pkg.mk
mk/mk.conf.example
--- a/Makefile	Wed Sep 06 18:39:24 2000 +0000
+++ b/Makefile	Wed Sep 06 20:28:32 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2000/05/12 18:42:22 sakamoto Exp $
+# $NetBSD: Makefile,v 1.36 2000/09/06 20:28:32 fredb Exp $
 # FreeBSD Id: Makefile,v 1.35 1997/08/19 07:10:01 fenner Exp
 #
 
@@ -18,6 +18,7 @@
 SUBDIR += comms
 SUBDIR += converters
 SUBDIR += cross
+SUBDIR += crypto
 SUBDIR += databases
 SUBDIR += devel
 SUBDIR += editors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/Makefile	Wed Sep 06 20:28:32 2000 +0000
@@ -0,0 +1,6 @@
+# $NetBSD: Makefile,v 1.1 2000/09/06 20:28:32 fredb Exp $
+#
+
+    SUBDIR += # Nothing here!
+
+.include "../mk/bsd.pkg.subdir.mk"
--- a/mk/bsd.pkg.mk	Wed Sep 06 18:39:24 2000 +0000
+++ b/mk/bsd.pkg.mk	Wed Sep 06 20:28:32 2000 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.pkg.mk,v 1.563 2000/09/06 03:58:23 jlam Exp $
+#	$NetBSD: bsd.pkg.mk,v 1.564 2000/09/06 20:28:32 fredb Exp $
 #
 # This file is in the public domain.
 #
@@ -956,21 +956,24 @@
 # Many ways to disable a package.
 #
 # If we're in BATCH mode and the package is interactive, or we're
-# in interactive mode and the package is non-interactive, skip all
-# the important targets.  The reason we have two modes is that
-# one might want to leave a build in BATCH mode running
-# overnight, then come back in the morning and do _only_ the
-# interactive ones that required your intervention.
-#
-# Don't attempt to build packages that require Motif if you don't
-# have Motif.
+# in interactive mode and the package is non-interactive, skip
+# all the important targets. The reason we have two modes is that
+# one might want to leave a build in BATCH mode running overnight,
+# then come back in the morning and do _only_ the interactive ones
+# that required your intervention.
 #
 # Ignore packages that can't be resold if building for a CDROM.
 #
-# Don't build a package if it's restricted and we don't want to get
-# into that.
+# Don't build a package if it's restricted and we don't want to
+# get into that.
+#
+# Don't attempt to build packages against X if we don't have X.
 #
 # Don't build a package if it's broken.
+#
+# If so specified, for whatever reason, don't build any packages
+# from the "crypto" category
+#
 ################################################################
 
 .if !defined(NO_IGNORE)
@@ -1000,6 +1003,12 @@
 .if defined(BROKEN)
 IGNORE+= "${PKGNAME} is marked as broken:" ${BROKEN:Q}
 .endif
+.if defined(MKCRYPTO) && ${MKCRYPTO} != "YES"
+_crypto:= ${CATEGORIES:Mcrypto}
+.  if defined(_crypto)
+IGNORE+= "${PKGNAME} may not be built, because it contains strong cryptography"
+.  endif
+.endif # MKCRYPTO != YES
 
 .if defined(LICENSE)
 .  ifdef ACCEPTABLE_LICENSES
--- a/mk/mk.conf.example	Wed Sep 06 18:39:24 2000 +0000
+++ b/mk/mk.conf.example	Wed Sep 06 20:28:32 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf.example,v 1.150 2000/09/06 18:39:24 fredb Exp $
+# $NetBSD: mk.conf.example,v 1.151 2000/09/06 20:28:33 fredb Exp $
 #
 
 # Sample /etc/mk.conf file, which can be used to set specific values
@@ -30,6 +30,11 @@
 # Possible: defined, not defined
 # Default: not defined
 
+#MKCRYPTO= no
+# Don't fetch, build or install any package in the "crypto" category.
+# Possible: not defined, YES, defined
+# Default: not defined (same as YES)
+
 #OBJMACHINE=
 # use machine-specific object directories, e.g.  work.i386, work.sparc
 # Possible: defined, not defined