From 2fc482b6273fa54d9274b4ab4b1d7625d355c301 Mon Sep 17 00:00:00 2001 From: jlam Date: Thu, 7 Feb 2002 15:26:36 +0000 Subject: buildlink.mk for devel/cdk provided in pkg/15517 by by Amitai Schlair with minor change by me. --- devel/cdk/buildlink.mk | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 devel/cdk/buildlink.mk 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 -- cgit v1.2.3