Browse Source

pkg-config: cleaned code generating and exporting PKG_CONFIG_PATH

karasz/new-early
Alejandro Mery 15 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 # set the PKG_CONFIG_PATH variable
# #
PKG_CONFIG_PATH= export PKG_CONFIG_PATH=$(ls -1d \
for x in {,/usr,/usr/X11*,/usr/local,/opt/*,$HOME}/{lib,lib64,share}/pkgconfig; do /{,usr,usr/X11*,usr/local,opt/*}/{lib,lib64,share}/pkgconfig/ \
[ -d "$x" ] && PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}$x" 2> /dev/null | tr '\n' ':' | sed -e 's|/\+:|:|g' -e 's|/\+|/|g' -e 's|:$||')
done
export PKG_CONFIG_PATH

13
base/pkgconfig/parse-config

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

Loading…
Cancel
Save