summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam>2002-02-07 15:26:36 +0000
committerjlam <jlam>2002-02-07 15:26:36 +0000
commit2fc482b6273fa54d9274b4ab4b1d7625d355c301 (patch)
tree3ef1ee7d8a3f280e0efee4d94dcc7175c144e6fd /devel
parent26c309b7f6cc6d2b271348a7a997654a62b9269a (diff)
downloadpkgsrc-2fc482b6273fa54d9274b4ab4b1d7625d355c301.tar.gz
buildlink.mk for devel/cdk provided in pkg/15517 by by Amitai Schlair
<schmonz+netbsd@schmonz.com> with minor change by me.
Diffstat (limited to 'devel')
-rw-r--r--devel/cdk/buildlink.mk45
1 files changed, 45 insertions, 0 deletions
diff --git a/devel/cdk/buildlink.mk b/devel/cdk/buildlink.mk
new file mode 100644
index 00000000000..f5ac17e3101
--- /dev/null
+++ b/devel/cdk/buildlink.mk
@@ -0,0 +1,45 @@
+# $NetBSD: buildlink.mk,v 1.1 2002/02/07 15:26:36 jlam Exp $
+#
+# This Makefile fragment is included by packages that use cdk.
+#
+# To use this Makefile fragment, simply:
+#
+# (1) Optionally define USE_CDK to force use of cdk.
+# (2) Optionally define BUILDLINK_DEPENDS.cdk to the dependency pattern
+# for the version of cdk desired.
+
+.if !defined(CDK_BUILDLINK_MK)
+CDK_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.cdk?= cdk>=4.9.6
+
+.if defined(USE_CDK)
+_NEED_CDK= YES
+.elif exists(/usr/include/cdk/cdk.h)
+_NEED_CDK= NO
+.else
+_NEED_CDK= YES
+.endif
+
+.if ${_NEED_CDK} == "YES"
+EVAL_PREFIX+= BUILDLINK_PREFIX.cdk=cdk
+BUILDLINK_PREFIX.cdk_DEFAULT= ${LOCALBASE}
+DEPENDS+= ${BUILDLINK_DEPENDS.cdk}:../../devel/cdk
+.else
+BUILDLINK_PREFIX.cdk= /usr
+.endif
+
+BUILDLINK_FILES.cdk= include/cdk/*.h
+BUILDLINK_FILES.cdk+= lib/libcdk.*
+
+.include "../../devel/ncurses/buildlink.mk"
+
+BUILDLINK_TARGETS.cdk+= cdk-buildlink
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.cdk}
+
+pre-configure: ${BUILDLINK_TARGETS.cdk}
+cdk-buildlink: _BUILDLINK_USE
+
+.endif # CDK_BUILDLINK_MK