diff options
author | bapt <bapt@FreeBSD.org> | 2013-04-23 06:25:20 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-04-23 06:25:20 +0800 |
commit | aefc9ed3a3a226316bc776cbe93cfd9c3d036d28 (patch) | |
tree | 8554d759bfd6a38c98a7062e4e529bf8a9f5f069 /Mk/Uses | |
parent | d845c4fc7f3c84ec9f8fcfae9600a013c579bbcc (diff) | |
download | freebsd-ports-gnome-aefc9ed3a3a226316bc776cbe93cfd9c3d036d28.tar.gz freebsd-ports-gnome-aefc9ed3a3a226316bc776cbe93cfd9c3d036d28.tar.zst freebsd-ports-gnome-aefc9ed3a3a226316bc776cbe93cfd9c3d036d28.zip |
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
Diffstat (limited to 'Mk/Uses')
-rw-r--r-- | Mk/Uses/pkgconfig.mk | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Mk/Uses/pkgconfig.mk b/Mk/Uses/pkgconfig.mk new file mode 100644 index 000000000000..481034652214 --- /dev/null +++ b/Mk/Uses/pkgconfig.mk @@ -0,0 +1,34 @@ +# $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 |