diff -Nru astropy-healpix-0.4/debian/changelog astropy-healpix-0.4/debian/changelog --- astropy-healpix-0.4/debian/changelog 2019-01-21 13:24:19.000000000 +0000 +++ astropy-healpix-0.4/debian/changelog 2019-03-06 03:53:26.000000000 +0000 @@ -1,3 +1,27 @@ +astropy-healpix (0.4-5) unstable; urgency=medium + + * Compile with -ffloat-store on i386 to fix unit test failures due + to unwanted floating point precision. (Closes: #921324) + + -- Leo Singer Tue, 05 Mar 2019 22:53:26 -0500 + +astropy-healpix (0.4-4) unstable; urgency=medium + + * Include python3-astropy as a build dependeny on all + architectures, including i386. + + -- Leo Singer Thu, 24 Jan 2019 10:34:27 -0500 + +astropy-healpix (0.4-3) unstable; urgency=medium + + * Add python3-healpy as a build dependency on all architectures + except for i386 (for which python3-healpy does not yet build.) + * Add patch to fix unit test failures on 32-bit systems by writing + 64-bit integer literals portably as (int64_t)4 rather than 4L. + * Add patch to fix implicit declaration warning. + + -- Leo Singer Mon, 21 Jan 2019 15:39:38 -0500 + astropy-healpix (0.4-2) unstable; urgency=medium * Add patch to replace np.asscalar with ndarray.item to fix a diff -Nru astropy-healpix-0.4/debian/control astropy-healpix-0.4/debian/control --- astropy-healpix-0.4/debian/control 2019-01-21 13:23:47.000000000 +0000 +++ astropy-healpix-0.4/debian/control 2019-03-06 03:49:29.000000000 +0000 @@ -7,7 +7,7 @@ python3-all-dev, python3-astropy, python3-astropy-helpers, - python3-healpy [any-ia64 any-amd64 any-arm64 any-ppc64 any-ppc64el any-sparc64], + python3-healpy (>= 1.12.8-8), python3-hypothesis, python3-numpy, python3-pytest, diff -Nru astropy-healpix-0.4/debian/patches/0004-Specify-64-bit-integer-literals-portably.patch astropy-healpix-0.4/debian/patches/0004-Specify-64-bit-integer-literals-portably.patch --- astropy-healpix-0.4/debian/patches/0004-Specify-64-bit-integer-literals-portably.patch 1970-01-01 00:00:00.000000000 +0000 +++ astropy-healpix-0.4/debian/patches/0004-Specify-64-bit-integer-literals-portably.patch 2019-03-06 03:49:29.000000000 +0000 @@ -0,0 +1,77 @@ +From: Leo Singer +Date: Mon, 21 Jan 2019 14:45:05 -0500 +Subject: Specify 64-bit integer literals portably + +On a 32-bit architecture, the expression `4L` is not a 64-bit +literal. On the other hand, `(int64_t)4` is. + +This fixes unit test errors on 32-bit architectures (armhf). +--- + cextern/astrometry.net/healpix.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/cextern/astrometry.net/healpix.c b/cextern/astrometry.net/healpix.c +index 8e17e89..c5f3e4b 100644 +--- a/cextern/astrometry.net/healpix.c ++++ b/cextern/astrometry.net/healpix.c +@@ -198,7 +198,7 @@ Const int64_t healpixl_ring_to_xy(int64_t ring, int Nside) { + v = F1*Nside - ringind - 1; + x = v - y; + return healpixl_compose_xy(bighp, x, y, Nside); +- } else if (ringind < 3L*Nside) { ++ } else if (ringind < (int64_t)3*Nside) { + int panel; + int ind; + int bottomleft; +@@ -211,7 +211,7 @@ Const int64_t healpixl_ring_to_xy(int64_t ring, int Nside) { + panel = longind / Nside; + ind = longind % Nside; + bottomleft = ind < (ringind - Nside + 1) / 2; +- topleft = ind < (3L*Nside - ringind + 1)/2; ++ topleft = ind < ((int64_t)3*Nside - ringind + 1)/2; + + if (!bottomleft && topleft) { + // top row. +@@ -226,7 +226,7 @@ Const int64_t healpixl_ring_to_xy(int64_t ring, int Nside) { + // right side. + bighp = 4 + (panel + 1) % 4; + if (bighp == 4) { +- longind -= (4L*Nside - 1); ++ longind -= ((int64_t)4*Nside - 1); + // Gah! Wacky hack - it seems that since + // "longind" is negative in this case, the + // rounding behaves differently, so we end up +@@ -300,7 +300,7 @@ Const int64_t healpixl_xy_to_ring(int64_t hp, int Nside) { + [3Nside, 4Nside-1] : s pole + */ + // this probably can't happen... +- if ((ring < 1) || (ring >= 4L*Nside)) { ++ if ((ring < 1) || (ring >= (int64_t)4*Nside)) { + //fprintf(stderr, "Invalid ring index: %i %i\n", ring, 4*Nside); + return -1; + } +@@ -312,13 +312,13 @@ Const int64_t healpixl_xy_to_ring(int64_t hp, int Nside) { + index += ((bighp % 4) * ring); + // offset from the other rings + index += (int64_t)ring*(ring-1)*2; +- } else if (ring >= 3L*Nside) { ++ } else if (ring >= (int64_t)3*Nside) { + // south polar. + // Here I first flip everything so that we label the pixels + // at zero starting in the southeast corner, increasing to the + // west and north, then subtract that from the total number of + // healpixels. +- int ri = 4L*Nside - ring; ++ int ri = (int64_t)4*Nside - ring; + // index within this healpix + index = (ri-1) - x; + // big healpixes +@@ -451,7 +451,7 @@ void healpixl_decompose_xy(int64_t finehp, + int64_t hp; + int64_t ns2 = (int64_t)Nside * (int64_t)Nside; + assert(Nside > 0); +- assert(finehp < (12L * ns2)); ++ assert(finehp < ((int64_t)12 * ns2)); + assert(finehp >= 0); + if (pbighp) { + int bighp = (int)(finehp / ns2); diff -Nru astropy-healpix-0.4/debian/patches/0005-Fix-implicit-declaration-warning-for-vasprintf.patch astropy-healpix-0.4/debian/patches/0005-Fix-implicit-declaration-warning-for-vasprintf.patch --- astropy-healpix-0.4/debian/patches/0005-Fix-implicit-declaration-warning-for-vasprintf.patch 1970-01-01 00:00:00.000000000 +0000 +++ astropy-healpix-0.4/debian/patches/0005-Fix-implicit-declaration-warning-for-vasprintf.patch 2019-03-06 03:49:29.000000000 +0000 @@ -0,0 +1,20 @@ +From: Leo Singer +Date: Mon, 21 Jan 2019 14:57:27 -0500 +Subject: Fix implicit declaration warning for vasprintf + +--- + cextern/astrometry.net/bl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cextern/astrometry.net/bl.c b/cextern/astrometry.net/bl.c +index 4be0d3f..a142a59 100644 +--- a/cextern/astrometry.net/bl.c ++++ b/cextern/astrometry.net/bl.c +@@ -3,6 +3,7 @@ + # Licensed under a 3-clause BSD style license - see LICENSE + */ + ++#define _GNU_SOURCE /* for GNU extension vasprintf() */ + #include + #include + #include diff -Nru astropy-healpix-0.4/debian/patches/series astropy-healpix-0.4/debian/patches/series --- astropy-healpix-0.4/debian/patches/series 2019-01-21 13:23:31.000000000 +0000 +++ astropy-healpix-0.4/debian/patches/series 2019-03-06 03:49:29.000000000 +0000 @@ -1,3 +1,5 @@ 0001-Use-astropy_helpers-provided-by-the-system.patch 0002-Increase-tolerance-in-flaky-test.patch 0003-Replace-deprecated-np.asscalar-with-ndarray.item.patch +0004-Specify-64-bit-integer-literals-portably.patch +0005-Fix-implicit-declaration-warning-for-vasprintf.patch diff -Nru astropy-healpix-0.4/debian/rules astropy-healpix-0.4/debian/rules --- astropy-healpix-0.4/debian/rules 2019-01-21 03:46:01.000000000 +0000 +++ astropy-healpix-0.4/debian/rules 2019-03-06 03:51:34.000000000 +0000 @@ -9,6 +9,11 @@ # Astropy-affiliated packages do. export PYBUILD_AFTER_INSTALL := find {destdir} -name '*.c' -delete +ifeq ($(DEB_HOST_ARCH),i386) + export DEB_CFLAGS_MAINT_APPEND := -ffloat-store +endif + + %: dh $@ --with python3 --buildsystem=pybuild