From 25cdb1a051ae2667f0d2c8ec42613527bc378762 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 28 Apr 2014 16:18:58 +0100 Subject: [PATCH] Add upstream patch which fixes FTBFS on aarch64 --- gsl-bug39055.patch | 80 ++++++++++++++++++++++++++++++++++++++++++++++ gsl.spec | 17 ++++++---- 2 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 gsl-bug39055.patch diff --git a/gsl-bug39055.patch b/gsl-bug39055.patch new file mode 100644 index 0000000..1591ea1 --- /dev/null +++ b/gsl-bug39055.patch @@ -0,0 +1,80 @@ +From 9cc12d0377dd634b1b97954d076b715f982853b7 Mon Sep 17 00:00:00 2001 +From: Patrick Alken +Date: Fri, 04 Apr 2014 19:36:16 +0000 +Subject: bug fix in sorting of complex numbers (bug #39055) + +--- +diff --git a/poly/test.c b/poly/test.c +index 9c147f6..d090802 100644 +--- a/poly/test.c ++++ b/poly/test.c +@@ -25,11 +25,21 @@ + #include + #include + ++/* sort by Re(z) then by Im(z) */ + static int + cmp_cplx(const double *a, const double *b) + { +- double t = (a[0] * a[0] + a[1] * a[1]) - (b[0] * b[0] + b[1] * b[1]); +- return t < 0.0 ? -1 : t > 0.0 ? 1 : 0; ++ double r = a[0] - b[0]; ++ ++ if (r == 0.0) ++ { ++ double t = a[1] - b[1]; ++ return t < 0.0 ? -1 : t > 0.0 ? 1 : 0; ++ } ++ else if (r < 0.0) ++ return -1; ++ else ++ return 1; + } + + int +@@ -534,25 +544,26 @@ main (void) + Problem reported by Munagala Ramanath (bug #39055) + */ + +- double a[16] = { 32, -48, -8, 28, -8, 16, -16, 12, -16, 6, 10, -17, 10, 2, -4, 1 }; ++ double a[16] = { 32, -48, -8, 28, -8, 16, -16, 12, ++ -16, 6, 10, -17, 10, 2, -4, 1 }; + double z[16*2]; + +- double expected[16*20] = { +- 1.0000000000000000, 0.00000000000000000, +- 1.0000000000000000, 0.00000000000000000, +- -1.0000000000000000, 0.00000000000000000, +- -0.65893856175240950, 0.83459757287426684, +- -0.65893856175240950, -0.83459757287426684, +- -0.070891117403341281, -1.1359249087587791, +- -0.070891117403341281, 1.1359249087587791, +- 1.1142366961812986, -0.48083981203389980, +- 1.1142366961812986, 0.48083981203389980, +- -1.3066982484920768, 0.00000000000000000, +- 0.57284747839410854, 1.1987808988289705, +- 0.57284747839410854, -1.1987808988289705, +- -1.6078107423472359, 0.00000000000000000, +- 2.0000000000000000, 0.00000000000000000, +- 2.0000000000000000, 0.00000000000000000 }; ++ double expected[16*2] = { ++ -1.6078107423472359, 0.00000000000000000, ++ -1.3066982484920768, 0.00000000000000000, ++ -1.0000000000000000, 0.00000000000000000, ++ -0.65893856175240950, -0.83459757287426684, ++ -0.65893856175240950, 0.83459757287426684, ++ -0.070891117403341281, -1.1359249087587791, ++ -0.070891117403341281, 1.1359249087587791, ++ 0.57284747839410854, -1.1987808988289705, ++ 0.57284747839410854, 1.1987808988289705, ++ 1.0000000000000000, 0.00000000000000000, ++ 1.0000000000000000, 0.00000000000000000, ++ 1.1142366961812986, -0.48083981203389980, ++ 1.1142366961812986, 0.48083981203389980, ++ 2.0000000000000000, 0.00000000000000000, ++ 2.0000000000000000, 0.00000000000000000 }; + + int i; + +-- +cgit v0.9.0.2 diff --git a/gsl.spec b/gsl.spec index 0fe7c1b..f2909d0 100644 --- a/gsl.spec +++ b/gsl.spec @@ -1,17 +1,18 @@ Summary: The GNU Scientific Library for numerical analysis Name: gsl Version: 1.16 -Release: 12%{?dist} +Release: 13%{?dist} URL: http://www.gnu.org/software/gsl/ -Source: ftp://ftp.gnu.org/gnu/gsl/%{name}-%{version}.tar.gz -Patch0: gsl-1.10-lib64.patch -Patch1: gsl-1.14-link.patch # info part of this package is under GFDL license # eigen/nonsymmv.c and eigen/schur.c # contains rutiens which are part of LAPACK - under BSD style license License: GPLv3 and GFDL and BSD Group: System Environment/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Source: ftp://ftp.gnu.org/gnu/gsl/%{name}-%{version}.tar.gz +Patch0: gsl-1.10-lib64.patch +Patch1: gsl-1.14-link.patch +Patch2: gsl-bug39055.patch BuildRequires: pkgconfig %description @@ -34,6 +35,7 @@ developing programs using the GSL (GNU Scientific Library). %setup -q %patch0 -p1 -b .lib64 %patch1 -p1 -b .libs +%patch2 -p1 -b .bug39055 iconv -f windows-1252 -t utf-8 THANKS > THANKS.aux touch -r THANKS THANKS.aux mv THANKS.aux THANKS @@ -74,7 +76,6 @@ if [ "$1" = 0 ]; then fi %files -%defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO %{_libdir}/*so.* %{_bindir}/gsl-histogram @@ -83,7 +84,6 @@ fi %{_mandir}/man1/gsl-randist.1* %files devel -%defattr(-,root,root,-) %doc AUTHORS COPYING %{_bindir}/gsl-config* %{_datadir}/aclocal/* @@ -95,6 +95,9 @@ fi %{_mandir}/man3/*.3* %changelog +* Mon Apr 28 2014 Peter Robinson 1.16-13 +- Add upstream patch which fixes FTBFS on aarch64 + * Sat Feb 15 2014 Susi Lehtola - 1.16-12 - Drop ATLAS linkage patch: by design, the CBLAS library must be defined at link time to allow use of more optimized implementations.