diff options
author | jlam <jlam@pkgsrc.org> | 2004-03-10 17:57:14 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-03-10 17:57:14 +0000 |
commit | d0b4c54eb698e718080690cf98ab5b8bbb4001e0 (patch) | |
tree | 1226d07b8f66083168895189decc88848b70903f /security/PAM | |
parent | 9d61fef8537aed11013bf556e319b2d8e398a11b (diff) | |
download | pkgsrc-d0b4c54eb698e718080690cf98ab5b8bbb4001e0.tar.gz |
Split out the code that deals with checking whether the software is
built-in or not into a separate builtin.mk file. The code to deal
checking for built-in software is much simpler to deal with in pkgsrc.
The buildlink3.mk file for a package will be of the usual format
regardless of the package, which makes it simpler for packagers to
update a package.
The builtin.mk file for a package must define a single yes/no variable
USE_BUILTIN.<pkg> that is used by bsd.buildlink3.mk to decide whether
to use the built-in software or to use the pkgsrc software.
Diffstat (limited to 'security/PAM')
-rw-r--r-- | security/PAM/buildlink3.mk | 52 | ||||
-rw-r--r-- | security/PAM/builtin.mk | 15 |
2 files changed, 22 insertions, 45 deletions
diff --git a/security/PAM/buildlink3.mk b/security/PAM/buildlink3.mk index 8716a50b62d..658a2bc520f 100644 --- a/security/PAM/buildlink3.mk +++ b/security/PAM/buildlink3.mk @@ -1,56 +1,18 @@ -# $NetBSD: buildlink3.mk,v 1.11 2004/02/18 16:35:27 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.12 2004/03/10 17:57:14 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ PAM_BUILDLINK3_MK:= ${PAM_BUILDLINK3_MK}+ -.include "../../mk/bsd.prefs.mk" +.if !empty(BUILDLINK_DEPTH:M+) +BUILDLINK_DEPENDS+= pam +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Npam} +BUILDLINK_PACKAGES+= pam .if !empty(PAM_BUILDLINK3_MK:M+) -BUILDLINK_PACKAGES+= pam BUILDLINK_DEPENDS.pam+= PAM>=0.75 BUILDLINK_PKGSRCDIR.pam?= ../../security/PAM .endif # PAM_BUILDLINK3_MK -BUILDLINK_CHECK_BUILTIN.pam?= NO - -.if !defined(BUILDLINK_IS_BUILTIN.pam) -BUILDLINK_IS_BUILTIN.pam= NO -. if exists(/usr/include/security/pam_appl.h) -BUILDLINK_IS_BUILTIN.pam= YES -. endif -.endif - -.if !empty(BUILDLINK_CHECK_BUILTIN.pam:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.pam= YES -.endif - -.if !defined(BUILDLINK_USE_BUILTIN.pam) -. if !empty(BUILDLINK_IS_BUILTIN.pam:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.pam= YES -. else -BUILDLINK_USE_BUILTIN.pam= NO -. endif - -. if !empty(PREFER_NATIVE:M[yY][eE][sS]) && \ - !empty(BUILDLINK_IS_BUILTIN.pam:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.pam= YES -. endif -. if !empty(PREFER_PKGSRC:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.pam= NO -. endif -. if !empty(PREFER_NATIVE:Mpam) && \ - !empty(BUILDLINK_IS_BUILTIN.pam:M[yY][eE][sS]) -BUILDLINK_USE_BUILTIN.pam= YES -. endif -. if !empty(PREFER_PKGSRC:Mpam) -BUILDLINK_USE_BUILTIN.pam= NO -. endif -.endif - -.if !empty(BUILDLINK_USE_BUILTIN.pam:M[nN][oO]) -. if !empty(BUILDLINK_DEPTH:M+) -BUILDLINK_DEPENDS+= pam -. endif -.endif - BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/security/PAM/builtin.mk b/security/PAM/builtin.mk new file mode 100644 index 00000000000..cd234981780 --- /dev/null +++ b/security/PAM/builtin.mk @@ -0,0 +1,15 @@ +# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $ + +.if !defined(IS_BUILTIN.pam) +IS_BUILTIN.pam= no +. if exists(/usr/include/security/pam_appl.h) +IS_BUILTIN.pam= yes +. endif +.endif + +CHECK_BUILTIN.pam?= no +.if !empty(CHECK_BUILTIN.pam:M[yY][eE][sS]) +USE_BUILTIN.pam= yes +.endif + +USE_BUILTIN.pam?= ${IS_BUILTIN.pam} |