2013-04-23 00:25:20 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# handle dependency on the pkgconf port
|
|
|
|
#
|
|
|
|
# Feature: pkgconfig
|
|
|
|
# Usage: USES=pkgconfig or USES=pkgconfig:ARGS
|
|
|
|
# Valid ARGS: build (default, implicit), run, both
|
|
|
|
#
|
2014-03-15 11:31:54 +01:00
|
|
|
# MAINTAINER: portmgr@FreeBSD.org
|
|
|
|
|
2013-04-23 00:25:20 +02:00
|
|
|
.if !defined(_INCLUDE_USES_PKGCONFIG_MK)
|
|
|
|
_INCLUDE_USES_PKGCONFIG_MK= yes
|
|
|
|
|
|
|
|
_PKGCONFIG_DEPENDS= pkgconf:${PORTSDIR}/devel/pkgconf
|
|
|
|
|
2014-09-28 18:36:31 +02:00
|
|
|
.if empty(pkgconfig_ARGS)
|
2013-04-23 00:25:20 +02:00
|
|
|
pkgconfig_ARGS= build
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${pkgconfig_ARGS} == "build"
|
|
|
|
BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS}
|
|
|
|
CONFIGURE_ENV+= PKG_CONFIG=pkgconf
|
|
|
|
.elif ${pkgconfig_ARGS} == "run"
|
|
|
|
RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS}
|
|
|
|
.elif ${pkgconfig_ARGS} == "both"
|
|
|
|
CONFIGURE_ENV+= PKG_CONFIG=pkgconf
|
|
|
|
BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS}
|
|
|
|
RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS}
|
|
|
|
.else
|
2013-11-20 13:30:29 +01:00
|
|
|
IGNORE= USES=pkgconfig - invalid args: [${pkgconfig_ARGS}] specified
|
2013-04-23 00:25:20 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.endif
|