Date: Tue, 7 Oct 2014 09:32:54 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r370280 - head/Mk/Uses Message-ID: <201410070932.s979WsIa071100@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue Oct 7 09:32:53 2014 New Revision: 370280 URL: https://svnweb.freebsd.org/changeset/ports/370280 QAT: https://qat.redports.org/buildarchive/r370280/ Log: Add a use to handle gperf dependency It uses gperf from base if it exists and its version is 3.x.x Otherwise it uses gperf from ports Added: head/Mk/Uses/gperf.mk (contents, props changed) Added: head/Mk/Uses/gperf.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Uses/gperf.mk Tue Oct 7 09:32:53 2014 (r370280) @@ -0,0 +1,35 @@ +# $FreeBSD$ +# +# handle dependency on gperf +# +# Feature: gperf +# Usage: USES=gperf +# +# Take no arguments + +.if !defined(_INCLUDE_USES_GPERG_MK) +_INCLUDE_USES_GPERF_MK= yes + +.if !exists(/usr/bin/gperf) +BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf +GPERF= ${LOCALBASE}/bin/gperf +.else +_GPERF_VERSION!= /usr/bin/gperf --version | head -1 || true +_GPERF_MAJ_VERSION= ${_GPERF_VERSION:M[0-9].[0-9].[0-9]:C/.*([0-9]).[0-9].[0-9].*/\1/g} + +.if empty(_GPERF_MAJ_VERSION) +_GPERF_MAJ_VERSION= 0 +.endif + +.if ${_GPERF_MAJ_VERSION} < 3 +BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf +GPERF= ${LOCALBASE}/bin/gperf +.else +GPERF= /usr/bin/gperf +.endif +.endif + +CONFIGURE_ENV+= GPERF=${GPERF} +MAKE_ENV+= GPERF=${GPERF} + +.endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410070932.s979WsIa071100>