summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrh <rh@pkgsrc.org>2004-01-14 06:57:45 +0000
committerrh <rh@pkgsrc.org>2004-01-14 06:57:45 +0000
commit8c4d9ffa4817af7c39086952dc5af6b01e235394 (patch)
tree5ffb1a61fc3d3a38564ae47c71fbbbe418ec26c2 /mk
parent1ff129d48e130564c65ef2f5def212aa54b74065 (diff)
downloadpkgsrc-8c4d9ffa4817af7c39086952dc5af6b01e235394.tar.gz
Add *RECOMMENDED variables as discussed on tech-pkg@ to allow for a more
fine-grained distinction between required versions of pre-requisites (DEPENDS) and versions that are recommended for security or library ABI consistency reasons (RECOMMENDED). The contents of ${RECOMMENDED} are added to DEPENDS unless IGNORE_RECOMMENDED is set to YES, in which case a warning will be printed and IGNORE_RECOMMENDED will be added to BUILD_DEFS. Add a corresponding BUILDLINK_RECOMMENDED.<pkg> variable for use with buildlink2 and buildlink3.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.defaults.mk10
-rw-r--r--mk/bsd.pkg.mk15
-rw-r--r--mk/buildlink2/bsd.buildlink2.mk12
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk12
4 files changed, 45 insertions, 4 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk
index fef1556b03a..5497809d5a0 100644
--- a/mk/bsd.pkg.defaults.mk
+++ b/mk/bsd.pkg.defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.203 2004/01/11 17:03:47 kim Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.204 2004/01/14 06:57:45 rh Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@@ -85,6 +85,14 @@ PKGSRC_SLEEPSECS?= 5
# Possible: defined, not defined
# Default: not defined
+IGNORE_RECOMMENDED?= no
+# ignore package prerequisite recommendations. If this is set to
+# "no", all entries in RECOMMENDED will be added to DEPENDS.
+# If set to "yes", a warning will be printed if recommendations
+# are possibly ignored.
+# Possible: yes, no
+# Default: no
+
#PKG_REGISTER_SHELLS= YES
# Automatically register shells in /etc/shells
# Possible: YES, NO
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 99d5377b38d..32016454bc3 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1344 2004/01/13 00:40:25 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1345 2004/01/14 06:57:45 rh Exp $
#
# This file is in the public domain.
#
@@ -406,6 +406,14 @@ MAKE_ENV+= LIBTOOL="${PKGLIBTOOL} ${LIBTOOL_FLAGS}"
BUILD_DEPENDS+= gettext>=0.10.35nb1:../../devel/gettext
.endif
+.if defined(RECOMMENDED)
+. if !empty(IGNORE_RECOMMENDED:M[nN][oO])
+DEPENDS+= ${RECOMMENDED}
+. else
+BUILD_DEFS+= IGNORE_RECOMMENDED
+. endif
+.endif
+
EXTRACT_COOKIE= ${WRKDIR}/.extract_done
BUILDLINK_COOKIE= ${WRKDIR}/.buildlink_done
CONFIGURE_COOKIE= ${WRKDIR}/.configure_done
@@ -2480,6 +2488,11 @@ real-su-package: ${PLIST} ${DESCR}
@${ECHO_MSG} "${_PKGSRC_IN}> Warning: ${PKGNAME} may not be made available through FTP:"
@${ECHO_MSG} "${_PKGSRC_IN}> " ${NO_BIN_ON_FTP:Q}
. endif
+. if defined(RECOMMENDED) && !empty(IGNORE_RECOMMENDED:M[yY][eE][sS])
+ @${ECHO_MSG} "${_PKGSRC_IN}> Warning: dependency recommendations are being ignored!"
+ @${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} should not be uploaded nor"
+ @${ECHO_MSG} "${_PKGSRC_IN}> otherwise be used as a binary package!"
+. endif
.endif
# Some support rules for real-su-package
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk
index 167d5f78a13..55343b636b7 100644
--- a/mk/buildlink2/bsd.buildlink2.mk
+++ b/mk/buildlink2/bsd.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.104 2003/12/19 19:22:28 veego Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.105 2004/01/14 06:57:45 rh Exp $
#
# An example package buildlink2.mk file:
#
@@ -6,6 +6,7 @@
# BUILDLINK_PACKAGES+= foo
# BUILDLINK_PKGBASE.foo= foo-lib
# BUILDLINK_DEPENDS.foo?= foo-lib>=1.0
+# BUILDLINK_RECOMMENDED.foo?= foo-lib>=1.0nb1
# BUILDLINK_PKGSRCDIR.foo?= ../../category/foo-lib
#
# EVAL_PREFIX+= BUILDLINK_PREFIX.foo=foo-lib
@@ -140,6 +141,7 @@ BUILDLINK_DEPMETHOD.${_pkg_}= full
. endif
. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
_BUILDLINK_DEPMETHOD.${_pkg_}= DEPENDS
+_BUILDLINK_RECMETHOD.${_pkg_}= RECOMMENDED
. elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
_BUILDLINK_DEPMETHOD.${_pkg_}= BUILD_DEPENDS
. endif
@@ -150,6 +152,14 @@ ${_BUILDLINK_DEPMETHOD.${_pkg_}}+= \
${_depends_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
. endfor
. endif
+. if defined(BUILDLINK_RECOMMENDED.${_pkg_}) && \
+ defined(_BUILDLINK_RECMETHOD.${_pkg_}) && \
+ defined(BUILDLINK_PKGSRCDIR.${_pkg_})
+. for _rec_ in ${BUILDLINK_RECOMMENDED.${_pkg_}}
+${_BUILDLINK_RECMETHOD.${_pkg_}}+= \
+ ${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
+. endfor
+. endif
#
# BUILDLINK_PLIST_CMD.<pkg> is a sequence of shell commands that extracts
# a list of all of the files installed by <pkg>. This list is relative to
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index 28a3d30d84c..d484dfb244f 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.48 2004/01/13 07:52:37 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.49 2004/01/14 06:57:46 rh Exp $
#
# An example package buildlink3.mk file:
#
@@ -12,6 +12,7 @@
#
# .if !empty(FOO_BUILDLINK3_MK:M+)
# BUILDLINK_DEPENDS.foo?= foo-lib>=1.0
+# BUILDLINK_RECOMMENDED.foo?= foo-lib>=1.0nb1
# BUILDLINK_PKGSRCDIR.foo?= ../../category/foo-lib
# BUILDLINK_PACKAGES+= foo
#
@@ -110,6 +111,7 @@ BUILDLINK_DEPMETHOD.${_pkg_}= full
. endif
. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
_BLNK_DEPMETHOD.${_pkg_}= DEPENDS
+_BLNK_RECMETHOD.${_pkg_}= RECOMMENDED
. elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
_BLNK_DEPMETHOD.${_pkg_}= BUILD_DEPENDS
. endif
@@ -120,6 +122,14 @@ ${_BLNK_DEPMETHOD.${_pkg_}}+= \
${_depends_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
. endfor
. endif
+. if defined(BUILDLINK_RECOMMENDED.${_pkg_}) && \
+ defined(_BLNK_RECMETHOD.${_pkg_}) && \
+ defined(BUILDLINK_PKGSRCDIR.${_pkg_})
+. for _rec_ in ${BUILDLINK_RECOMMENDED.${_pkg_}}
+${_BLNK_RECMETHOD.${_pkg_}}+= \
+ ${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
+. endfor
+. endif
.endfor
# Generate default values for: