2014-10-07 09:32:53 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# handle dependency on gperf
|
|
|
|
#
|
|
|
|
# Feature: gperf
|
|
|
|
# Usage: USES=gperf
|
|
|
|
#
|
|
|
|
# Take no arguments
|
|
|
|
|
2014-10-07 16:45:30 +00:00
|
|
|
.if !defined(_INCLUDE_USES_GPERF_MK)
|
2014-10-07 09:32:53 +00:00
|
|
|
_INCLUDE_USES_GPERF_MK= yes
|
|
|
|
|
|
|
|
.if !exists(/usr/bin/gperf)
|
2015-10-15 07:36:38 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf
|
2014-10-07 09:32:53 +00:00
|
|
|
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
|
2015-10-15 07:36:38 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf
|
2014-10-07 09:32:53 +00:00
|
|
|
GPERF= ${LOCALBASE}/bin/gperf
|
|
|
|
.else
|
|
|
|
GPERF= /usr/bin/gperf
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CONFIGURE_ENV+= GPERF=${GPERF}
|
|
|
|
MAKE_ENV+= GPERF=${GPERF}
|
|
|
|
|
|
|
|
.endif
|