summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-11-20 17:19:59 +0000
committerrillig <rillig@pkgsrc.org>2007-11-20 17:19:59 +0000
commit4bd807b4a6ad6fb05f9cbc6efa8c7848bf1fbb92 (patch)
tree6206ae09ff5535204f1f852c7b04c29254154c8d
parentc0e67be63f5363aac20f5c437f4f5a1eb3d865ed (diff)
downloadpkgsrc-4bd807b4a6ad6fb05f9cbc6efa8c7848bf1fbb92.tar.gz
Added an empty default definition for USE_FEATURES, which makes the
remaining code shorter.
-rw-r--r--mk/features/features-vars.mk21
-rw-r--r--mk/features/features.mk4
2 files changed, 13 insertions, 12 deletions
diff --git a/mk/features/features-vars.mk b/mk/features/features-vars.mk
index 9a449e11ac0..8c08d349f11 100644
--- a/mk/features/features-vars.mk
+++ b/mk/features/features-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: features-vars.mk,v 1.10 2007/11/06 22:48:15 rillig Exp $
+# $NetBSD: features-vars.mk,v 1.11 2007/11/20 17:19:59 rillig Exp $
#
# The platforms that are supported by pkgsrc differ in the amount of
# functions they provide in the C library (libc). Functions that are
@@ -64,6 +64,7 @@ _PKG_VARS.features= USE_FEATURES
_SYS_VARS.features= MISSING_FEATURES
MISSING_FEATURES= # empty
+USE_FEATURES?= # none
#
# Handle "inet6" feature specially -- we always add it to
@@ -76,7 +77,7 @@ MISSING_FEATURES+= inet6
.endif
.for _feature_ in err warn
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if (${OPSYS} != NetBSD) && (${OPSYS} != FreeBSD) && (${OPSYS} != DragonFly)
MISSING_FEATURES+= ${_feature_}
. endif
@@ -84,7 +85,7 @@ MISSING_FEATURES+= ${_feature_}
.endfor
.for _feature_ in fts_close fts_open fts_read fts_set
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if !exists(/usr/include/fts.h)
MISSING_FEATURES+= ${_feature_}
. endif
@@ -92,7 +93,7 @@ MISSING_FEATURES+= ${_feature_}
.endfor
.for _feature_ in getopt_long
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if !exists(/usr/include/getopt.h)
MISSING_FEATURES+= ${_feature_}
. endif
@@ -100,7 +101,7 @@ MISSING_FEATURES+= ${_feature_}
.endfor
.for _feature_ in getprogname setprogname
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if (${OPSYS} != NetBSD) && (${OPSYS} != FreeBSD) && (${OPSYS} != DragonFly)
MISSING_FEATURES+= ${_feature_}
. endif
@@ -108,7 +109,7 @@ MISSING_FEATURES+= ${_feature_}
.endfor
.for _feature_ in glob
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if !exists(/usr/include/glob.h)
MISSING_FEATURES+= ${_feature_}
. endif
@@ -116,7 +117,7 @@ MISSING_FEATURES+= ${_feature_}
.endfor
.for _feature_ in regcomp
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if !exists(/usr/include/regex.h)
MISSING_FEATURES+= ${_feature_}
. endif
@@ -124,7 +125,7 @@ MISSING_FEATURES+= ${_feature_}
.endfor
.for _feature_ in snprintf vsnprintf
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if ${OPSYS} == "IRIX"
MISSING_FEATURES+= ${_feature_}
. endif
@@ -132,13 +133,13 @@ MISSING_FEATURES+= ${_feature_}
.endfor
.for _feature_ in utimes
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:M${_feature_})
+. if !empty(USE_FEATURES:M${_feature_})
. if ${OPSYS} == "Interix"
MISSING_FEATURES+= ${_feature_}
. endif
. endif
.endfor
-.if defined(USE_FEATURES) && !empty(USE_FEATURES:Mnbcompat)
+.if !empty(USE_FEATURES:Mnbcompat)
MISSING_FEATURES+= nbcompat
.endif
diff --git a/mk/features/features.mk b/mk/features/features.mk
index 9606af6fc87..adff091bee1 100644
--- a/mk/features/features.mk
+++ b/mk/features/features.mk
@@ -1,4 +1,4 @@
-# $NetBSD: features.mk,v 1.3 2007/09/08 05:06:40 jlam Exp $
+# $NetBSD: features.mk,v 1.4 2007/11/20 17:19:59 rillig Exp $
#
# This file is included by bsd.pkg.mk.
#
@@ -19,7 +19,7 @@
# so check that it appears in both before failing the package
# build.
#
-. if defined(USE_FEATURES) && !empty(USE_FEATURES:Minet6)
+. if !empty(USE_FEATURES:Minet6)
. if !empty(MISSING_FEATURES:Minet6)
PKG_FAIL_REASON+= "${PKGNAME} requires IPv6 support"
. endif