From dbd39ca660cafa3d1f2acebf05c86bf17a035ff8 Mon Sep 17 00:00:00 2001 From: Ade Lovett Date: Wed, 17 Oct 2007 10:13:01 +0000 Subject: Migration from bison 1.x to 2.x PR: 117086 Tested by: -exp runs --- Mk/bsd.port.mk | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'Mk/bsd.port.mk') diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 5d066c754298..3aca1db9fe58 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -362,7 +362,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # - If set, this port uses the GNU version of the ghostscript # software instead of the GPL version, which is used otherwise. ## -# USE_BISON - If set, this port uses bison for building. +# USE_BISON - Implies that the port uses bison in one way or another: +# 'yes' (backwards compatibility) - use bison for building +# new features: 'build', 'run', 'both', implying build, +# runtime, and both build/run dependencies ## # USE_IMAKE - If set, this port uses imake. Implies USE_X_PREFIX. # XMKMF - Set to path of `xmkmf' if not in $PATH @@ -1926,7 +1929,26 @@ RUN_DEPENDS+= ${_GL_${_component}_RUN_DEPENDS} .endif .if defined(USE_BISON) -BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison +_BISON_DEPENDS= bison:${PORTSDIR}/devel/bison + +# XXX: backwards compatibility +. if ${USE_BISON:L} == "yes" +USE_BISON= build +pre-everything:: + @${ECHO_MSG} "WARNING: USE_BISON=yes deprecated, use build/run/both" +. endif + +. if ${USE_BISON:L} == "build" +BUILD_DEPENDS+= ${_BISON_DEPENDS} +. elif ${USE_BISON:L} == "run" +RUN_DEPENDS+= ${_BISON_DEPENDS} +. elif ${USE_BISON:L} == "both" +BUILD_DEPENDS+= ${_BISON_DEPENDS} +RUN_DEPENDS+= ${_BISON_DEPENDS} +. else +IGNORE= uses unknown USE_BISON construct +. endif + .endif .if !defined(_PERL_REFACTORING_COMPLETE) -- cgit v1.2.3