summaryrefslogtreecommitdiff
path: root/security/tcp_wrappers
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-03-10 17:57:14 +0000
committerjlam <jlam@pkgsrc.org>2004-03-10 17:57:14 +0000
commitd0b4c54eb698e718080690cf98ab5b8bbb4001e0 (patch)
tree1226d07b8f66083168895189decc88848b70903f /security/tcp_wrappers
parent9d61fef8537aed11013bf556e319b2d8e398a11b (diff)
downloadpkgsrc-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/tcp_wrappers')
-rw-r--r--security/tcp_wrappers/buildlink3.mk39
-rw-r--r--security/tcp_wrappers/builtin.mk15
2 files changed, 23 insertions, 31 deletions
diff --git a/security/tcp_wrappers/buildlink3.mk b/security/tcp_wrappers/buildlink3.mk
index b2f6e8f58d2..d2108db559e 100644
--- a/security/tcp_wrappers/buildlink3.mk
+++ b/security/tcp_wrappers/buildlink3.mk
@@ -1,41 +1,18 @@
-# $NetBSD: buildlink3.mk,v 1.5 2004/01/24 03:12:32 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2004/03/10 17:57:15 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
TCP_WRAPPERS_BUILDLINK3_MK:= ${TCP_WRAPPERS_BUILDLINK3_MK}+
-.include "../../mk/bsd.prefs.mk"
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= tcp_wrappers
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntcp_wrappers}
+BUILDLINK_PACKAGES+= tcp_wrappers
.if !empty(TCP_WRAPPERS_BUILDLINK3_MK:M+)
-BUILDLINK_PACKAGES+= tcp_wrappers
BUILDLINK_DEPENDS.tcp_wrappers+= tcp_wrappers>=7.6.1nb1
BUILDLINK_PKGSRCDIR.tcp_wrappers?= ../../security/tcp_wrappers
.endif # TCP_WRAPPERS_BUILDLINK3_MK
-BUILDLINK_CHECK_BUILTIN.tcp_wrappers?= NO
-
-.if !defined(BUILDLINK_IS_BUILTIN.tcp_wrappers)
-BUILDLINK_IS_BUILTIN.tcp_wrappers= NO
-. if exists(/usr/include/tcpd.h)
-BUILDLINK_IS_BUILTIN.tcp_wrappers= YES
-. endif
-.endif
-
-.if !empty(BUILDLINK_CHECK_BUILTIN.tcp_wrappers:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.tcp_wrappers= YES
-.endif
-
-.if !defined(BUILDLINK_USE_BUILTIN.tcp_wrappers)
-. if !empty(BUILDLINK_IS_BUILTIN.tcp_wrappers:M[nN][oO])
-BUILDLINK_USE_BUILTIN.tcp_wrappers= NO
-. else
-BUILDLINK_USE_BUILTIN.tcp_wrappers= YES
-. endif
-.endif
-
-.if !empty(BUILDLINK_USE_BUILTIN.tcp_wrappers:M[nN][oO])
-. if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= tcp_wrappers
-. endif
-.endif
-
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/security/tcp_wrappers/builtin.mk b/security/tcp_wrappers/builtin.mk
new file mode 100644
index 00000000000..468cc9ec558
--- /dev/null
+++ b/security/tcp_wrappers/builtin.mk
@@ -0,0 +1,15 @@
+# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:15 jlam Exp $
+
+.if !defined(IS_BUILTIN.tcp_wrappers)
+IS_BUILTIN.tcp_wrappers= no
+. if exists(/usr/include/tcpd.h)
+IS_BUILTIN.tcp_wrappers= yes
+. endif
+.endif
+
+CHECK_BUILTIN.tcp_wrappers?= no
+.if !empty(CHECK_BUILTIN.tcp_wrappers:M[yY][eE][sS])
+USE_BUILTIN.tcp_wrappers= yes
+.endif
+
+USE_BUILTIN.tcp_wrappers?= ${IS_BUILTIN.tcp_wrappers}