The following commit has been merged in the master branch:
commit ef51c154b0c4d37c7c6726ce5b4e903397b76c26
Author: Raphaël Hertzog <[email protected]>
Date:   Sat Aug 15 21:45:20 2009 +0200

    dpkg-architecture: finish support of DEB_{HOST,BUILD}_ARCH_{BITS,ENDIAN}
    
    Enhanced cputable to describe the new columns.
    
    Let dpkg-dev depend on dpkg (>= 1.15.4) to ensure that we have an updated
    cputable (and so that a versioned build-dependency on dpkg-dev is enough to 
use
    this new feature).
    
    Document the new variables in the manual page dpkg-architecture(1).

diff --git a/cputable b/cputable
index 18dc14b..9ac39c6 100644
--- a/cputable
+++ b/cputable
@@ -12,6 +12,8 @@
 # targets in ‘dpkg-architecture’.
 # Column 3 is an extended regular expression used to match against the
 # CPU part of the output of the GNU config.guess script.
+# Column 4 is the size (in bits) of the integers/pointers
+# Column 5 is the endianness (byte ordering in numbers)
 #
 # <Debian name>        <GNU name>      <config.guess regex>    <Bits>  
<Endianness>
 i386           i486            (i[3456]86|pentium)     32      little
diff --git a/debian/changelog b/debian/changelog
index 05b7af8..6844105 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -61,6 +61,13 @@ dpkg (1.15.4) UNRELEASED; urgency=low
     information if the version provided is older than the one already listed
     in the available file. Thanks to Ian Jackson
     <[email protected]> for the patch. Closes: #496114
+  * dpkg-architecture can now export DEB_{HOST,BUILD}_ARCH_{BITS,ENDIAN}
+    (pointer size and endianness):
+    - cputable (in dpkg) modified to contain those information
+    - dpkg-dev depends on dpkg (>= 1.15.4) to ensure that we have an updated
+      cputable (and so that a versioned build-dependency on dpkg-dev is enough
+      to use this new feature)
+    Closes: #531307
 
   [ Modestas Vainius ]
   * Provide a meaningful label for dpkg-gensymbols diff.
diff --git a/debian/control b/debian/control
index 611b5c6..925a949 100644
--- a/debian/control
+++ b/debian/control
@@ -40,7 +40,7 @@ Package: dpkg-dev
 Section: utils
 Priority: optional
 Architecture: all
-Depends: dpkg (>= 1.14.6), perl5, perl-modules, bzip2, lzma,
+Depends: dpkg (>= 1.15.4), perl5, perl-modules, bzip2, lzma,
  patch (>= 2.2-1), make, binutils, libtimedate-perl
 Recommends: gcc | c-compiler, build-essential, fakeroot, gnupg, gpgv
 Suggests: debian-keyring, debian-maintainers
diff --git a/man/dpkg-architecture.1 b/man/dpkg-architecture.1
index e66de87..6ef4bfd 100644
--- a/man/dpkg-architecture.1
+++ b/man/dpkg-architecture.1
@@ -105,6 +105,10 @@ The Debian architecture of the build machine.
 The Debian system name of the build machine.
 .IP "\s-1DEB_BUILD_ARCH_CPU\s0" 4
 The Debian cpu name of the build machine.
+.IP "\s-1DEB_BUILD_ARCH_BITS\s0" 4
+The pointer size of the build machine (in bits).
+.IP "\s-1DEB_BUILD_ARCH_ENDIAN\s0" 4
+The endianness of the build machine (little / big).
 .IP "\s-1DEB_BUILD_GNU_TYPE\s0" 4
 The \s-1GNU\s0 system type of the build machine.
 .IP "\s-1DEB_BUILD_GNU_CPU\s0" 4
@@ -117,6 +121,10 @@ The Debian architecture of the host machine.
 The Debian system name of the host machine.
 .IP "\s-1DEB_HOST_ARCH_CPU\s0" 4
 The Debian cpu name of the host machine.
+.IP "\s-1DEB_BUILD_ARCH_BITS\s0" 4
+The pointer size of the host machine (in bits).
+.IP "\s-1DEB_BUILD_ARCH_ENDIAN\s0" 4
+The endianness of the host machine (little / big).
 .IP "\s-1DEB_HOST_GNU_TYPE\s0" 4
 The \s-1GNU\s0 system type of the host machine.
 .IP "\s-1DEB_HOST_GNU_CPU\s0" 4
@@ -179,11 +187,14 @@ Especially the \-\-print\-architecture option is 
unreliable since we have
 Debian architectures which don't equal a processor name.
 .
 .SH "BACKWARD COMPATIBILITY"
-The DEB_HOST_ARCH_CPU and DEB_HOST_ARCH_OS variables were only introduced
-in relatively recent versions of \fBdpkg\-architecture\fR (since dpkg 1.13.2),
-before this \fIdebian/rules\fR files tended to check the values of the
-DEB_HOST_GNU_CPU or DEB_HOST_GNU_TYPE variables which have been subject
-to change.
+The DEB_*_ARCH_BITS and DEB_*_ARCH_ENDIAN variables were introduced
+in dpkg-dev 1.15.4. Using them in \fIdebian/rules\fR thus requires a
+build-dependency on dpkg-dev (>= 1.15.4).
+.PP
+The DEB_HOST_ARCH_CPU and DEB_HOST_ARCH_OS variables were introduced
+in dpkg-dev 1.13.2. Before this \fIdebian/rules\fR files tended to check
+the values of the DEB_HOST_GNU_CPU or DEB_HOST_GNU_TYPE variables which
+have been subject to change.
 .PP
 Where \fIdebian/rules\fR files check these variables to decide how or what
 to compile, this should be updated to use the new variables and values.
diff --git a/scripts/dpkg-architecture.pl b/scripts/dpkg-architecture.pl
index 1047fd2..2060dca 100755
--- a/scripts/dpkg-architecture.pl
+++ b/scripts/dpkg-architecture.pl
@@ -126,10 +126,10 @@ while (@ARGV) {
 my %v;
 
 my @ordered = qw(DEB_BUILD_ARCH DEB_BUILD_ARCH_OS DEB_BUILD_ARCH_CPU
-                 DEB_BUILD_ARCH_BITS DEB_BUILD_ARCH_ENDIANNESS
+                 DEB_BUILD_ARCH_BITS DEB_BUILD_ARCH_ENDIAN
                  DEB_BUILD_GNU_CPU DEB_BUILD_GNU_SYSTEM DEB_BUILD_GNU_TYPE
                  DEB_HOST_ARCH DEB_HOST_ARCH_OS DEB_HOST_ARCH_CPU
-                 DEB_HOST_ARCH_BITS DEB_HOST_ARCH_ENDIANNESS
+                 DEB_HOST_ARCH_BITS DEB_HOST_ARCH_ENDIAN
                  DEB_HOST_GNU_CPU DEB_HOST_GNU_SYSTEM DEB_HOST_GNU_TYPE);
 
 $v{DEB_BUILD_ARCH} = get_raw_build_arch();
@@ -183,8 +183,8 @@ my $abi;
 ($v{DEB_HOST_GNU_CPU}, $v{DEB_HOST_GNU_SYSTEM}) = split(/-/, 
$v{DEB_HOST_GNU_TYPE}, 2);
 ($v{DEB_BUILD_GNU_CPU}, $v{DEB_BUILD_GNU_SYSTEM}) = split(/-/, 
$v{DEB_BUILD_GNU_TYPE}, 2);
 
-($v{DEB_HOST_ARCH_BITS}, $v{DEB_HOST_ARCH_ENDIANNESS}) = 
debarch_to_cpuattrs($v{DEB_HOST_ARCH});
-($v{DEB_BUILD_ARCH_BITS}, $v{DEB_BUILD_ARCH_ENDIANNESS}) = 
debarch_to_cpuattrs($v{DEB_BUILD_ARCH});
+($v{DEB_HOST_ARCH_BITS}, $v{DEB_HOST_ARCH_ENDIAN}) = 
debarch_to_cpuattrs($v{DEB_HOST_ARCH});
+($v{DEB_BUILD_ARCH_BITS}, $v{DEB_BUILD_ARCH_ENDIAN}) = 
debarch_to_cpuattrs($v{DEB_BUILD_ARCH});
 
 for my $k (@ordered) {
     $v{$k} = $ENV{$k} if (defined ($ENV{$k}) && !$force);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to