mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
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
This commit is contained in:
parent
a4155c67ec
commit
a32ac3883f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370280
35
Mk/Uses/gperf.mk
Normal file
35
Mk/Uses/gperf.mk
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user