Index: dcompiler.mk =================================================================== --- dcompiler.mk (nonexistent) +++ dcompiler.mk (working copy) @@ -0,0 +1,64 @@ +# $FreeBSD$ +# +# This file contains logic to ease porting of D binaries using the +# ldc2|gdc|dmd (ldmd2|gdmd) commands. +# +# Feature: d compiler +# Usage: USES=dcompiler +# Valid ARGS: (none), minver +# +# (none) Setup DC +# minver Checks to make sure that the d compiler version >= +# minver. +# +# You can set the following variables to control the process. +# +# DC +# The path to the choossen/found compiler (ldc2|gdc|dmd) +# +# DC_COMPAT +# The path to a dmd compatible compiler driver like ldmd2|gdmd|dmd +# +# DFLAGS +# Addional DFLAGS variables to be passed to the D compiler +# +# MAINTAINER: ddegroot@talon.nl + +.if !defined(_INCLUDE_USES_D_MK) +_INCLUDE_USES_D_MK= yes + +.if !empty(d_ARGS) && ${d_ARGS:Nminver} +IGNORE= USES=d only accepts no arguments or 'modules' +.endif + +# Settable variables +#DFLAGS+= + +# Read-only variables +#DC= ${LOCALBASE}/bin/gdc +#DC_COMPAT= ${LOCALBASE}/bin/gdmd + +#.if ${d_ARGS:Mminver} +#.else +#.endif + +.if exists(${LOCALBASE}/bin/ldc2) +DC= ${LOCALBASE}/bin/ldc2 +DC_COMPAT= ${LOCALBASE}/bin/ldmd2 +BUILD_DEPENDS+= ${DC}:lang/ldc +.elif exists(${LOCALBASE}/bin/gdc*) +DC= ${LOCALBASE}/bin/gdc +DC_COMPAT= ${LOCALBASE}/bin/gdmd +BUILD_DEPENDS+= ${DC}:lang/gdc +.elif exists(${LOCALBASE}/bin/dmd) +DC= ${LOCALBASE}/bin/dmd +DC_COMPAT= ${LOCALBASE}/bin/dmd +BUILD_DEPENDS+= ${DC}:lang/dmd +.else +DC= ${LOCALBASE}/bin/ldc2 +DC_COMPAT= ${LOCALBASE}/bin/ldmd2 +BUILD_DEPENDS+= ${DC}:lang/ldc +.endif + +_USES_POST+= dcompiler +.endif # !defined(_INCLUDE_USES_DCOMPILER_MK) Property changes on: dcompiler.mk ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property