Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | pkgconfigdeps.sh: Change to restricting pkgconfig to the local directory |
| 2 | |
| 3 | Using PKG_CONFIG_PATH will allow pkg-config to fall back to the system paths, |
| 4 | we don't want this as it may lead to inaccurate results in some corner cases. |
| 5 | |
| 6 | PKG_CONFIG_LIBDIR will ensure pkg-config stays within the install directory. |
| 7 | |
| 8 | Upstream-Status: Inappropriate [configuration] |
| 9 | |
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
| 11 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 12 | Index: rpm/scripts/pkgconfigdeps.sh |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | =================================================================== |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 14 | --- rpm.orig/scripts/pkgconfigdeps.sh |
| 15 | +++ rpm/scripts/pkgconfigdeps.sh |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | @@ -18,8 +18,8 @@ case $1 in |
| 17 | *.pc) |
| 18 | # Query the dependencies of the package. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 19 | DIR=$(dirname ${filename}) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | - PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" |
| 21 | - export PKG_CONFIG_PATH |
| 22 | + PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" |
| 23 | + export PKG_CONFIG_LIBDIR |
| 24 | $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do |
| 25 | [ -n "$n" ] || continue |
| 26 | # We have a dependency. Make a note that we need the pkgconfig |
| 27 | @@ -42,8 +42,8 @@ case $1 in |
| 28 | [ -n "$oneshot" ] && echo "$oneshot"; oneshot="" |
| 29 | # Query the dependencies of the package. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 30 | DIR=$(dirname ${filename}) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | - PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" |
| 32 | - export PKG_CONFIG_PATH |
| 33 | + PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig" |
| 34 | + export PKG_CONFIG_LIBDIR |
| 35 | $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do |
| 36 | [ -n "$n" ] || continue |
| 37 | if [ -n "$r" ] && [ -n "$v" ]; then |