Package: dpkg-cross Version: 2.5.3+adhoc Severity: normal Tags: patch Hi,
this patch implements basic multiarch support by simply copying files in /usr/{include,lib}/$DEB_HOST_GNU_ARCH to the destination package. I am not 100% sure this will be sufficient for all packages to work, although I think that packages that would expect us to do some transformation here would also fail when Debian switches to multiarch. Severity "normal" since this is urgent to get into Debian before eglibc switches. The patch might apply at an offset, as I built it on top of the ad-hoc architecture definition patch. Simon -- Package-specific info: -- (/etc/dpkg-cross/cross-compile not submitted) -- -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores) Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dpkg-cross depends on: ii binutils-multiarch 2.19.51.20090827-1 Binary utilities that support mult ii debconf [debconf-2 1.5.27 Debian configuration management sy ii dpkg-dev 1.15.3.1+adhoc Debian package development tools ii libdebian-dpkgcros 2.5.3+adhoc+multiarch functions to aid cross-compiling D ii perl 5.10.0-25 Larry Wall's Practical Extraction Versions of packages dpkg-cross recommends: ii fakeroot 1.13 Gives a fake root environment dpkg-cross suggests no packages. -- debconf information: * dpkg-cross/default-arch: None
diff -Nru dpkg-cross-2.5.3+adhoc/Debian/DpkgCross.pm dpkg-cross-2.5.3+adhoc+multiarch/Debian/DpkgCross.pm --- dpkg-cross-2.5.3+adhoc/Debian/DpkgCross.pm 2009-09-04 16:43:39.000000000 +0200 +++ dpkg-cross-2.5.3+adhoc+multiarch/Debian/DpkgCross.pm 2009-09-07 12:52:54.000000000 +0200 @@ -404,6 +404,7 @@ $crosslib64 ||= $crosslib . "64"; $crosslib32 ||= $crosslib . "32"; + $config{'crosstype'} = $deb_host_gnu_type; $config{'crossbase'} = $crossbase; $config{'crossprefix'} = $crossprefix; $config{'crossdir'} = $crossdir; diff -Nru dpkg-cross-2.5.3+adhoc/debian/changelog dpkg-cross-2.5.3+adhoc+multiarch/debian/changelog --- dpkg-cross-2.5.3+adhoc/debian/changelog 2009-09-04 16:40:09.000000000 +0200 +++ dpkg-cross-2.5.3+adhoc+multiarch/debian/changelog 2009-09-07 12:29:12.000000000 +0200 @@ -1,3 +1,9 @@ +dpkg-cross (2.5.3+adhoc+multiarch) unstable; urgency=low + + * Add multiarch support patch + + -- Simon Richter <s...@debian.org> Mon, 07 Sep 2009 12:28:55 +0200 + dpkg-cross (2.5.3+adhoc) unstable; urgency=low * Add ad-hoc arch definition patch diff -Nru dpkg-cross-2.5.3+adhoc/dpkg-cross dpkg-cross-2.5.3+adhoc+multiarch/dpkg-cross --- dpkg-cross-2.5.3+adhoc/dpkg-cross 2009-09-04 16:41:18.000000000 +0200 +++ dpkg-cross-2.5.3+adhoc+multiarch/dpkg-cross 2009-09-07 12:52:02.000000000 +0200 @@ -215,7 +215,7 @@ @keepdeps $dpkg_statfile $progname $debname $anyway $cross2cross $crossdir $crosslib $crosslib64 $crosslib32 $crossinc $data $len $retval $dpkg_cmd $mode $pkg @exlist $conffile $removedeps $keepdeps -$DPKGCROSSVERSION $keep_temp $gnuarch); +$DPKGCROSSVERSION $keep_temp $gnuarch $crosstype); $dpkg_statfile = "/var/lib/dpkg/status"; &read_config; @@ -721,6 +721,7 @@ return 1; } my $config = &get_config; + $crosstype = $$config{'crosstype'}; $crossinc = $$config{'crossinc'}; $crossdir = $$config{'crossdir'}; $crosslib = $$config{'crosslib'}; @@ -765,6 +766,10 @@ } close(FROM); close(TO); + } elsif (m:^/usr/include/$crosstype/:) { + link_file("$src$_", "$dst$_") or goto fail; + } elsif (m:^/usr/lib/$crosstype/:) { + link_file("$src$_", "$dst$_") or goto fail; } elsif (m:^/usr(/X11R6)?/include/:) { # regular file under /usr/include or /usr/X11R6/include link_file("$src$_", "$dst$crossinc/$'") or goto fail;