3 # handle dependency on gperf
10 .if !defined(_INCLUDE_USES_GPERF_MK)
11 _INCLUDE_USES_GPERF_MK= yes
13 .if !exists(/usr/bin/gperf)
14 BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:devel/gperf
15 GPERF= ${LOCALBASE}/bin/gperf
17 _GPERF_VERSION!= /usr/bin/gperf --version | head -1 || true
18 _GPERF_MAJ_VERSION= ${_GPERF_VERSION:M[0-9].[0-9].[0-9]:C/.*([0-9]).[0-9].[0-9].*/\1/g}
20 .if empty(_GPERF_MAJ_VERSION)
24 .if ${_GPERF_MAJ_VERSION} < 3
25 BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:devel/gperf
26 GPERF= ${LOCALBASE}/bin/gperf
32 CONFIGURE_ENV+= GPERF=${GPERF}
33 MAKE_ENV+= GPERF=${GPERF}