summaryrefslogtreecommitdiff
path: root/security/libdes/builtin.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-12-05 05:35:28 +0000
committerjlam <jlam@pkgsrc.org>2004-12-05 05:35:28 +0000
commit87a70328bc0bf6d94b6283678c994f0e4035f320 (patch)
treee63ed25c12a05326a9c99d3c4d6ee12ad1e37351 /security/libdes/builtin.mk
parent835c300b47fa95beb7f8f287fde55e647ab88d50 (diff)
downloadpkgsrc-87a70328bc0bf6d94b6283678c994f0e4035f320.tar.gz
Follow template builtin.mk file in bsd.builtin.mk.
Diffstat (limited to 'security/libdes/builtin.mk')
-rw-r--r--security/libdes/builtin.mk31
1 files changed, 20 insertions, 11 deletions
diff --git a/security/libdes/builtin.mk b/security/libdes/builtin.mk
index b8468f41bde..35a8b2504ba 100644
--- a/security/libdes/builtin.mk
+++ b/security/libdes/builtin.mk
@@ -1,18 +1,27 @@
-# $NetBSD: builtin.mk,v 1.1 2004/07/31 05:31:57 tv Exp $
+# $NetBSD: builtin.mk,v 1.2 2004/12/05 05:35:28 jlam Exp $
.if !defined(IS_BUILTIN.libdes)
IS_BUILTIN.libdes= no
-. if exists(/usr/include/libdes.h)
+. if exists(/usr/include/libdes.h) || exists(/usr/include/des.h)
IS_BUILTIN.libdes= yes
-. elif exists(/usr/include/des.h)
-
-IS_BUILTIN.libdes= yes
-BUILDLINK_TARGETS+= buildlink-libdes-libdes-h
-
-buildlink-libdes-libdes-h:
- ${LN} -s -f /usr/include/des.h ${BUILDLINK_DIR}/include/libdes.h
-
. endif
.endif # IS_BUILTIN.libdes
-USE_BUILTIN.libdes?= ${IS_BUILTIN.libdes}
+USE_BUILTIN.libdes?= ${IS_BUILTIN.libdes}
+
+CHECK_BUILTIN.libdes?= no
+.if !empty(CHECK_BUILTIN.libdes:M[nN][oO])
+. if !empty(USE_BUILTIN.libdes:M[yY][eE][sS])
+BUILDLINK_TARGETS+= buildlink-libdes-libdes-h
+. if !target(buildlink-libdes-libdes-h)
+.PHONY: buildlink-libdes-libdes-h
+buildlink-libdes-libdes-h:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ dest="${BUILDLINK_DIR}/include/libdes.h"; \
+ src="/usr/include/des.h"; \
+ if ${TEST} ! -f "$$dest" -a -f "$$src"; then \
+ ${LN} -fs $$src $$dest; \
+ fi
+. endif
+. endif # USE_BUILTIN.libdes == yes
+.endif # CHECK_BUILTIN.libdes