]> gitweb @ CieloNegro.org - autobuild.git/commitdiff
support for PKG_CONFIG_PATH
authorPHO <pho@cielonegro.org>
Wed, 20 Jun 2012 09:32:27 +0000 (18:32 +0900)
committerPHO <pho@cielonegro.org>
Wed, 20 Jun 2012 09:32:27 +0000 (18:32 +0900)
Build.rc.example
lib/setPath.bash
src/functions.bash

index 09795f90b2b1a6a4d335c51200a3c856103ed9b8..f074d1711462091e00c6970319e2e7164e858f4f 100644 (file)
@@ -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".
 #
index 5158dd64e1e785c4e69e28a475e847c038170c71..f41363fb9deba77bad72095311870c2ca031f437 100644 (file)
@@ -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
 }
index fe7f3df92058bd4484547a19d7d4ba90a96acd2e..a9ac44fab090a51816c24cc5a6af4677fba6f09a 100644 (file)
@@ -12,6 +12,7 @@ function setConfigArgs () {
     configArgs=( \
         --prefix="$prefix" \
         PATH="$PATH" \
+        PKG_CONFIG_PATH="$PKG_CONFIG_PATH" \
         "$@" \
         )
 }