Browse Source

pkg-config: cleaned code generating and exporting PKG_CONFIG_PATH

karasz/new-early
Alejandro Mery 16 years ago
parent
commit
c85b613adf
  1. 8
      base/pkgconfig/etc_profile.d_pkgconfig.txt
  2. 13
      base/pkgconfig/parse-config

8
base/pkgconfig/etc_profile.d_pkgconfig.txt

@ -14,8 +14,6 @@
# set the PKG_CONFIG_PATH variable
#
PKG_CONFIG_PATH=
for x in {,/usr,/usr/X11*,/usr/local,/opt/*,$HOME}/{lib,lib64,share}/pkgconfig; do
[ -d "$x" ] && PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}$x"
done
export PKG_CONFIG_PATH
export PKG_CONFIG_PATH=$(ls -1d \
/{,usr,usr/X11*,usr/local,opt/*}/{lib,lib64,share}/pkgconfig/ \
2> /dev/null | tr '\n' ':' | sed -e 's|/\+:|:|g' -e 's|/\+|/|g' -e 's|:$||')

13
base/pkgconfig/parse-config

@ -15,15 +15,12 @@
if atstage cross; then
#export PKG_CONFIG_DEBUG_SPEW=yes
PKG_CONFIG_SYSROOT_DIR=$base/build/$SDECFG_ID
PKG_CONFIG_PATH=
for x in $PKG_CONFIG_SYSROOT_DIR/{,usr,usr/X11*,usr/local,opt/*}/{lib,lib64,share}/pkgconfig; do
[ -d "$x" ] && PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}$x"
done
export PKG_CONFIG_PATH
export PKG_CONFIG_SYSROOT_DIR
export PKG_CONFIG_LIBDIR=$PKG_CONFIG_PATH # needed, otherwse system is used
export PKG_CONFIG_SYSROOT_DIR="$base/build/$SDECFG_ID"
export PKG_CONFIG_PATH=$(ls -1d \
"$PKG_CONFIG_SYSROOT_DIR"/{,usr,usr/X11*,usr/local,opt/*}/{lib,lib64,share}/pkgconfig/ \
2> /dev/null | tr '\n' ':' | sed -e 's|/\+:|:|g' -e 's|/\+|/|g' -e 's|:$||')
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_PATH" # needed, otherwse system is used
# as we use PKG_CONFIG_SYSROOT_DIR, make sure $root doesn't leak on .pc files
#

Loading…
Cancel
Save