Package: meson
Version: 0.49.0-1
File: /usr/share/meson/debcrossgen
Severity: normal
Tags: patch

debcrossgen yields wrong cpu and cpu_family values for armhf and
mips64el. The attached patch fixes that. Please consider applying it.

Helmut
diff --minimal -Nru meson-0.49.0/debian/changelog meson-0.49.0/debian/changelog
--- meson-0.49.0/debian/changelog       2018-12-09 18:56:53.000000000 +0100
+++ meson-0.49.0/debian/changelog       2019-01-12 13:36:52.000000000 +0100
@@ -1,3 +1,10 @@
+meson (0.49.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debcrossgen: fix cpu fields for armhf and mips64el. Closes: #-1.
+
+ -- Helmut Grohne <[email protected]>  Sat, 12 Jan 2019 13:36:52 +0100
+
 meson (0.49.0-1) unstable; urgency=medium
 
   * New upstream release. Closes: #894774, #914543, #913263.
diff --minimal -Nru meson-0.49.0/debian/debcrossgen 
meson-0.49.0/debian/debcrossgen
--- meson-0.49.0/debian/debcrossgen     2018-04-23 02:26:52.000000000 +0200
+++ meson-0.49.0/debian/debcrossgen     2019-01-12 13:36:52.000000000 +0100
@@ -42,6 +42,10 @@
             return f
     raise ValueError("%s not found on $PATH" % program)
 
+cpu_family_map = dict(mips64el="mips64")
+cpu_map = dict(armhf="arm7hlf",
+               mips64el="mips64")
+
 def run(options):
     if options.arch is None:
         cmd = ['dpkg-architecture']
@@ -57,8 +61,10 @@
         data[k] = v
     host_arch = data['DEB_HOST_GNU_TYPE']
     host_os = data['DEB_HOST_ARCH_OS']
-    host_cpu_family = data['DEB_HOST_GNU_CPU']
-    host_cpu = data['DEB_HOST_ARCH'] # Not really correct, should be arm7hlf 
etc but it is not exposed.
+    host_cpu_family = cpu_family_map.get(data['DEB_HOST_GNU_CPU'],
+                                         data['DEB_HOST_GNU_CPU'])
+    host_cpu = cpu_map.get(data['DEB_HOST_ARCH'],
+                           data['DEB_HOST_ARCH'])
     host_endian = data['DEB_HOST_ARCH_ENDIAN']
     with open(options.outfile, "w") as ofile:
         ofile.write('[binaries]\n')

Reply via email to