Hector and I have tested this patch with normal builds, cross builds and cross compiler builds.
It does apply against dpkg 1.14.12 (albeit with offsets), it was developed against 1.14.11. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
--- dpkg.old/scripts/Dpkg/Shlibs.pm 2007-11-23 02:42:51.000000000 +0000 +++ dpkg-1.14.11/scripts/Dpkg/Shlibs.pm 2007-11-28 22:06:15.000000000 +0000 @@ -25,11 +25,28 @@ use Dpkg::Gettext; use Dpkg::ErrorHandling qw(syserr); use Dpkg::Shlibs::Objdump; +use Dpkg::Arch; use constant DEFAULT_LIBRARY_PATH => qw(/lib /usr/lib /lib32 /usr/lib32 /lib64 /usr/lib64 /emul/ia32-linux/lib /emul/ia32-linux/usr/lib); -our @librarypaths = (DEFAULT_LIBRARY_PATH); +my @shlibdeps=(); +# ARCH for some awkward builds +my $crossprefix = Dpkg::Arch::debarch_to_gnutriplet($ENV{ARCH}) if ($ENV{ARCH}); +# host for normal cross builds. +$crossprefix = $ENV{DEB_HOST_GNU_TYPE} + if (($ENV{DEB_HOST_GNU_TYPE}) and ($ENV{DEB_HOST_GNU_TYPE} ne $ENV{DEB_BUILD_GNU_TYPE})); +# target when building a cross compiler +$crossprefix = $ENV{DEB_TARGET_GNU_TYPE} + if (($ENV{DEB_TARGET_GNU_TYPE}) and ($ENV{DEB_TARGET_GNU_TYPE} ne $ENV{DEB_BUILD_GNU_TYPE})); +if ($crossprefix) +{ + @shlibdeps = ( "${crossprefix}/lib", "/usr/${crossprefix}/lib", + "/${crossprefix}/lib32", "/usr/${crossprefix}/lib32", + "/${crossprefix}/lib64", "/usr/${crossprefix}/lib64", + "/emul/ia32-linux/lib", "/emul/ia32-linux/usr/lib" ); +} +our @librarypaths = ((DEFAULT_LIBRARY_PATH), @shlibdeps); # Update library paths with LD_LIBRARY_PATH if ($ENV{LD_LIBRARY_PATH}) {
pgp0E6r06c5lk.pgp
Description: PGP signature