pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security * Rename the buildlink module name associated...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb8c706f2b72
branches:  trunk
changeset: 487413:fb8c706f2b72
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Jan 14 00:08:46 2005 +0000

description:
* Rename the buildlink module name associated with the security/PAM
  package from "pam" to "linux-pam".

* Rewrite PAM/builtin.mk to check that we have Linux-PAM, and re-classify
  MacOS X's PAM as Linux-PAM because it _is_, according to to Apple.
  Also don't use BUILDLINK_TRANSFORM.* to rewrite header file paths
  -- just use a symlink so that <security/*.h> can be used to find
  <pam/*.h>.

diffstat:

 security/PAM/buildlink3.mk          |  14 ++++----
 security/PAM/builtin.mk             |  60 ++++++++++++++++++++++--------------
 security/PAM/module.mk              |   6 +-
 security/cy-login/Makefile          |   4 +-
 security/cyrus-saslauthd/options.mk |   4 +-
 5 files changed, 50 insertions(+), 38 deletions(-)

diffs (164 lines):

diff -r c25cf3bae369 -r fb8c706f2b72 security/PAM/buildlink3.mk
--- a/security/PAM/buildlink3.mk        Thu Jan 13 23:00:06 2005 +0000
+++ b/security/PAM/buildlink3.mk        Fri Jan 14 00:08:46 2005 +0000
@@ -1,19 +1,19 @@
-# $NetBSD: buildlink3.mk,v 1.17 2004/11/25 22:47:15 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.18 2005/01/14 00:08:46 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 PAM_BUILDLINK3_MK:=    ${PAM_BUILDLINK3_MK}+
 
 .if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+=    pam
+BUILDLINK_DEPENDS+=    linux-pam
 .endif
 
-BUILDLINK_PACKAGES:=   ${BUILDLINK_PACKAGES:Npam}
-BUILDLINK_PACKAGES+=   pam
+BUILDLINK_PACKAGES:=   ${BUILDLINK_PACKAGES:Nlinux-pam}
+BUILDLINK_PACKAGES+=   linux-pam
 
 .if !empty(PAM_BUILDLINK3_MK:M+)
-BUILDLINK_DEPENDS.pam+=                PAM>=0.75
-BUILDLINK_RECOMMENDED.pam+=    PAM>=0.77nb4
-BUILDLINK_PKGSRCDIR.pam?=      ../../security/PAM
+BUILDLINK_DEPENDS.linux-pam+=          PAM>=0.75
+BUILDLINK_RECOMMENDED.linux-pam+=      PAM>=0.77nb4
+BUILDLINK_PKGSRCDIR.linux-pam?=                ../../security/PAM
 .endif # PAM_BUILDLINK3_MK
 
 .include "../../mk/dlopen.buildlink3.mk"
diff -r c25cf3bae369 -r fb8c706f2b72 security/PAM/builtin.mk
--- a/security/PAM/builtin.mk   Thu Jan 13 23:00:06 2005 +0000
+++ b/security/PAM/builtin.mk   Fri Jan 14 00:08:46 2005 +0000
@@ -1,38 +1,50 @@
-# $NetBSD: builtin.mk,v 1.9 2005/01/12 02:27:48 xtraeme Exp $
+# $NetBSD: builtin.mk,v 1.10 2005/01/14 00:08:46 jlam Exp $
 
 .include "../../mk/bsd.prefs.mk"
 
 _PAM_PAM_APPL_H=       /usr/include/pam/pam_appl.h
 _SECURITY_PAM_APPL_H=  /usr/include/security/pam_appl.h
 
-.if !defined(IS_BUILTIN.pam)
-IS_BUILTIN.pam=        no
+.if !defined(IS_BUILTIN.linux-pam)
+IS_BUILTIN.linux-pam=  no
 .  if empty(_SECURITY_PAM_APPL_H:M${LOCALBASE}/*) && \
       exists(${_SECURITY_PAM_APPL_H})
-IS_BUILTIN.pam=        yes
+IS_BUILTIN.linux-pam!= \
+       if ${GREP} -q "The Linux-PAM Framework layer API" ${_SECURITY_PAM_APPL_H}; then \
+               ${ECHO} "yes";                                          \
+       else                                                            \
+               ${ECHO} "no";                                           \
+       fi
+.  elif empty(_PAM_PAM_APPL_H:M${LOCALBASE}/*) && exists(${_PAM_PAM_APPL_H})
+#
+# MacOS X installs their PAM headers as /usr/include/pam/*.h, and their
+# PAM implementation is derived from Linux-PAM:
+#
+#      http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/pam.8.html
+#
+IS_BUILTIN.linux-pam=  yes
 .  endif
-.endif # IS_BUILTIN.pam
+BUILDLINK_VARS+=       IS_BUILTIN.linux-pam
+.endif # IS_BUILTIN.linux-pam
 
-.if !defined(USE_BUILTIN.pam)
-USE_BUILTIN.pam?=      ${IS_BUILTIN.pam}
-.  if empty(_PAM_PAM_APPL_H:M${LOCALBASE}/*) && exists(${_PAM_PAM_APPL_H})
-#
-# Treat MacOS X's PAM implementation as Linux-PAM-compatible.
-#
-USE_BUILTIN.pam=       yes
-.  endif
-.endif
+USE_BUILTIN.linux-pam?=        ${IS_BUILTIN.linux-pam}
 
-CHECK_BUILTIN.pam?=    no
-.if !empty(CHECK_BUILTIN.pam:M[nN][oO])
+CHECK_BUILTIN.linux-pam?=      no
+.if !empty(CHECK_BUILTIN.linux-pam:M[nN][oO])
+
+.  if !empty(USE_BUILTIN.linux-pam:M[yY][eE][sS])
+BUILDLINK_TARGETS+=    buildlink-pam-security
+.  endif
 
-.if !empty(USE_BUILTIN.pam:M[yY][eE][sS])
-.  if exists(${_SECURITY_PAM_APPL_H})
-BUILDLINK_TRANSFORM.pam+=      -e "s|/include/pam/|/include/security/|"
-BUILDLINK_FILES.pam+=          include/security/*.h
-.  else
-BUILDLINK_FILES.pam+=          include/pam/*.h
+.  if !target(buildlink-pam-security)
+.PHONY: buildlink-pam-security
+buildlink-pam-security:
+       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
+       if [ -d ${BUILDLINK_PREFIX.linux-pam}/include/pam ]; then       \
+               ${RM} -fr ${BUILDLINK_DIR}/include/security;            \
+               ${LN} -fs ${BUILDLINK_PREFIX.linux-pam}/include/pam     \
+                       ${BUILDLINK_DIR}/include/security;              \
+       fi
 .  endif
-.endif
 
-.endif # CHECK_BUILTIN.pam
+.endif # CHECK_BUILTIN.linux-pam
diff -r c25cf3bae369 -r fb8c706f2b72 security/PAM/module.mk
--- a/security/PAM/module.mk    Thu Jan 13 23:00:06 2005 +0000
+++ b/security/PAM/module.mk    Fri Jan 14 00:08:46 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: module.mk,v 1.2 2004/05/11 04:39:03 snj Exp $
+# $NetBSD: module.mk,v 1.3 2005/01/14 00:08:46 jlam Exp $
 
 .if !defined(PAM_MODULE_MK)
 PAM_MODULE_MK= # defined
@@ -7,8 +7,8 @@
 .  include "../../security/PAM/buildlink3.mk"
 .endif
 
-.if defined(DEFAULT_VIEW.pam)
-DEFAULT_VIEW.${PKGBASE}=       ${DEFAULT_VIEW.pam}
+.if defined(DEFAULT_VIEW.linux-pam)
+DEFAULT_VIEW.${PKGBASE}=       ${DEFAULT_VIEW.linux-pam}
 .endif
 
 PAM_MODULEDIR=         ${VIEWBASE}/lib/security
diff -r c25cf3bae369 -r fb8c706f2b72 security/cy-login/Makefile
--- a/security/cy-login/Makefile        Thu Jan 13 23:00:06 2005 +0000
+++ b/security/cy-login/Makefile        Fri Jan 14 00:08:46 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2004/12/03 15:15:07 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2005/01/14 00:08:46 jlam Exp $
 
 PKGNAME=       ${DISTNAME:S/cyrus-sasl/cy-login/}
 PKGREVISION=   1
@@ -15,7 +15,7 @@
 .if defined(USE_PAM)
 .  include "../../security/PAM/buildlink3.mk"
 BUILD_DEFS+=           USE_PAM
-CONFIGURE_ARGS+=       --with-pam=${BUILDLINK_PREFIX.pam}
+CONFIGURE_ARGS+=       --with-pam=${BUILDLINK_PREFIX.linux-pam}
 .endif
 
 BUILD_DIRS=    ${WRKSRC}/plugins
diff -r c25cf3bae369 -r fb8c706f2b72 security/cyrus-saslauthd/options.mk
--- a/security/cyrus-saslauthd/options.mk       Thu Jan 13 23:00:06 2005 +0000
+++ b/security/cyrus-saslauthd/options.mk       Fri Jan 14 00:08:46 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.3 2004/11/17 19:56:49 xtraeme Exp $
+# $NetBSD: options.mk,v 1.4 2005/01/14 00:08:46 jlam Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.cyrus-saslauthd
 PKG_SUPPORTED_OPTIONS= PAM kerberos ldap gssapi
@@ -9,7 +9,7 @@
 ###
 .if !empty(PKG_OPTIONS:MPAM)
 .  include "../../security/PAM/buildlink3.mk"
-CONFIGURE_ARGS+=       --with-pam=${BUILDLINK_PREFIX.pam}
+CONFIGURE_ARGS+=       --with-pam=${BUILDLINK_PREFIX.linux-pam}
 .endif
 
 ###



Home | Main Index | Thread Index | Old Index