Wookey wrote:

> I shall stick it in experimental forthwith and you can take a look and see. 

gah, tollef uploaded a 0.28 in the meantime so that didn't work.

I'll have to update my stuff.

We'll here's the important bit in the meantime:

Which doesn't default to including non-multiarched stuff, but explain
how you can. I think in debian we are aiming for doing this the slow,
correct way (by multiarching everything). Feel free to argue for
enabling this by default (and having a comment about turning it off instead)

Anyway, assuming no-one objects violently I propose to put this in
pkg-config ASAP, as it's way better than the current situation.

#! /bin/sh
# pkg-config wrapper for cross-building
# Sets pkg-config search path to search multiarch and historical 
cross-compiling paths.

# If the user has already set PKG_CONFIG_LIBDIR, believe it (even if empty): 
# it's documented to be an override
if [ x"${PKG_CONFIG_LIBDIR+set}" = x ]; then
  # GNU triplet for the compiler, e.g. i486-linux-gnu for Debian i386,
  # i686-linux-gnu for Ubuntu i386
  basename="`basename "$0"`"
  triplet="${basename%-pkg-config}"
  # Normalized multiarch path if any, e.g. i386-linux-gnu for i386
  multiarch="`dpkg-architecture -t"${triplet}" -qDEB_HOST_MULTIARCH 
2>/dev/null`"

  PKG_CONFIG_LIBDIR="/usr/local/${triplet}/lib/pkgconfig"
  # For a native build we would also want to append /usr/local/lib/pkgconfig
  # at this point; but this is a cross-building script, so don't
  PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/local/share/pkgconfig"

  if [ -n "$multiarch" ]; then
    PKG_CONFIG_LIBDIR="/usr/local/lib/${multiarch}/pkgconfig:$PKG_CONFIG_LIBDIR"
    PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/lib/${multiarch}/pkgconfig"
  fi

  PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/${triplet}/lib/pkgconfig"
  # For a native build we would also want to append /usr/lib/pkgconfig
  # at this point; but this is a cross-building script, so don't
  # If you want to allow use of un-multiarched -dev packages for crossing 
  # (at the risk of finding build-arch stuff you didn't want, if not in a clean 
chroot)
  # Uncomment the next line:
  # PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/lib/pkgconfig" 
  PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/share/pkgconfig"

  export PKG_CONFIG_LIBDIR
fi

exec pkg-config $@



Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to