From: PHO Date: Wed, 20 Jun 2012 09:32:27 +0000 (+0900) Subject: support for PKG_CONFIG_PATH X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=autobuild.git;a=commitdiff_plain;h=4dd854cdecf6e203ea3966969332a592a826ffe5 support for PKG_CONFIG_PATH --- diff --git a/Build.rc.example b/Build.rc.example index 09795f9..f074d17 100644 --- a/Build.rc.example +++ b/Build.rc.example @@ -17,6 +17,13 @@ setPath PATH \ "/usr/bin" \ "/bin" +# ----------------------------------------------------------------------------- +# The PKG_CONFIG_PATH environment variable to be set during the +# build. (Default: empty) +# +setPath PKG_CONFIG_PATH \ + "/usr/pkg/bin" + # ----------------------------------------------------------------------------- # The extra arguments to be passed to "./configure". # diff --git a/lib/setPath.bash b/lib/setPath.bash index 5158dd6..f41363f 100644 --- a/lib/setPath.bash +++ b/lib/setPath.bash @@ -21,8 +21,16 @@ function setPath () { done esac - # THINKME: Special case for PATH: we prepend "$prefix/bin" to it. - if [[ $var = "PATH" ]]; then - PATH="$prefix/bin:$PATH" - fi + case "$var" in + "PATH") + # THINKME: Special case for PATH: we prepend "$prefix/bin" + # to it. + PATH="$prefix/bin:$PATH";; + "PKG_CONFIG_PATH") + # THINKME: Special case for PKG_CONFIG_PATH: we prepend + # "$prefix/lib/pkgconfig" to it. + PKG_CONFIG_PATH="$prefix/lib/pkgconfig";; + *) + ;; + esac } diff --git a/src/functions.bash b/src/functions.bash index fe7f3df..a9ac44f 100644 --- a/src/functions.bash +++ b/src/functions.bash @@ -12,6 +12,7 @@ function setConfigArgs () { configArgs=( \ --prefix="$prefix" \ PATH="$PATH" \ + PKG_CONFIG_PATH="$PKG_CONFIG_PATH" \ "$@" \ ) }