1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00
freebsd-ports/Mk/Uses/pkgconfig.mk
Baptiste Daroussin ed31a0d5e6 Introduce USES= pkgconfig to replace USE_PKGCONFIG
It can take 3 arguments:
build (default,implicit) to add pkgconf into BUILD_DEPENDS
run to add pkgconf into RUN_DEPENDS
both to add pkgconf into both RUN and BUILD DEPENDS

This deprecates USE_PKGCONFIG, please convert your ports.
USE_PKGCONFIG will be removed as soon as it is no more used in
the ports tree
2013-04-22 22:25:20 +00:00

35 lines
810 B
Makefile

# $FreeBSD$
#
# handle dependency on the pkgconf port
#
# MAINTAINER: portmgr@FreeBSD.org
#
# Feature: pkgconfig
# Usage: USES=pkgconfig or USES=pkgconfig:ARGS
# Valid ARGS: build (default, implicit), run, both
#
#
.if !defined(_INCLUDE_USES_PKGCONFIG_MK)
_INCLUDE_USES_PKGCONFIG_MK= yes
_PKGCONFIG_DEPENDS= pkgconf:${PORTSDIR}/devel/pkgconf
.if !defined(pkgconfig_ARGS)
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
IGNORE= USES=pkgconfig - invalid args: [${pkgconfig_ARGS}] specifed
.endif
.endif