[magics] 01/05: FIx bad gfortran hard-coded in cmake
Alastair McKinstry
mckinstry at moszumanska.debian.org
Sat Oct 29 17:17:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to tag debian/2.28.0-3
in repository magics.
commit 866b160642f77bb8d782203dfb839dd5e2c49023
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Wed May 25 17:48:50 2016 +0100
FIx bad gfortran hard-coded in cmake
---
debian/changelog | 7 ++++
debian/patches/g++-6.patch | 100 +++++++++++++++++++++++++++++++++++++++++++++
debian/rules | 5 +++
3 files changed, 112 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 91add04..00d2f5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+magics++ (2.28.0-2) UNRELEASED; urgency=medium
+
+ * Standards-Version: 3.9.8
+ * Fix incorrect libgfortran path shipped in cmake files.
+
+ -- Alastair McKinstry <mckinstry at debian.org> Wed, 25 May 2016 17:46:52 +0100
+
magics++ (2.28.0-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/patches/g++-6.patch b/debian/patches/g++-6.patch
new file mode 100644
index 0000000..2e8c8ee
--- /dev/null
+++ b/debian/patches/g++-6.patch
@@ -0,0 +1,100 @@
+Description: For c++14, need to disambiguate isnan()
+Author: Alastair McKinstry <mckinstry at debian.org>
+Last-Update: 2016-05-02
+Forwarded: no
+
+Index: magics++-2.28.0/src/decoders/GribRegularInterpretor.cc
+===================================================================
+--- magics++-2.28.0.orig/src/decoders/GribRegularInterpretor.cc
++++ magics++-2.28.0/src/decoders/GribRegularInterpretor.cc
+@@ -2054,14 +2054,14 @@ void GribLambertInterpretor::interpretAs
+ double val2 = ((lon22 - lon) / (lon22 - lon21))
+ * val21
+ + ((lon - lon21) / (lon22 - lon21)) * val22;
+- if (isnan(val1)) {
+- if (isnan(val2)) {
++ if (std::isnan(val1)) {
++ if (std::isnan(val2)) {
+ val = missing;
+ } else
+ val = ((lat - lat11) / (lat22 - lat11))
+ * val2;
+ } else {
+- if (isnan(val2)) {
++ if (std::isnan(val2)) {
+ val = ((lat22 - lat) / (lat22 - lat11))
+ * val1;
+ } else {
+@@ -2072,11 +2072,11 @@ void GribLambertInterpretor::interpretAs
+ }
+ }
+
+- if (isnan(val) || isinf(val) || isinf(-val)) {
++ if (std::isnan(val) || std::isinf(val) || std::isinf(-val)) {
+ val = missing;
+ }
+ }
+- if (isnan(val))
++ if (std::isnan(val))
+ val = missing;
+ if ((**matrix)[index.second + (index.first * im)]
+ == missing) {
+Index: magics++-2.28.0/src/decoders/NetcdfOrcaInterpretor.cc
+===================================================================
+--- magics++-2.28.0.orig/src/decoders/NetcdfOrcaInterpretor.cc
++++ magics++-2.28.0/src/decoders/NetcdfOrcaInterpretor.cc
+@@ -207,15 +207,15 @@ bool NetcdfOrcaInterpretor::interpretAsM
+ double val1 = ((lon12 - lon )/(lon12-lon11))*val11 + ((lon - lon11)/(lon12-lon11))*val12;
+
+ double val2 = ((lon22 - lon )/(lon22-lon21))*val21 + ((lon - lon21)/(lon22-lon21))*val22;
+- if ( isnan(val1) ) {
+- if ( isnan(val2) ) {
++ if ( std::isnan(val1) ) {
++ if ( std::isnan(val2) ) {
+ val = missing;
+ }
+ else
+ val = ((lat - lat11)/(lat22-lat11))*val2;
+ }
+ else {
+- if ( isnan(val2) ) {
++ if ( std::isnan(val2) ) {
+ val = ((lat22 - lat )/(lat22-lat11))*val1;
+ }
+ else {
+@@ -223,11 +223,11 @@ bool NetcdfOrcaInterpretor::interpretAsM
+ }
+ }
+
+- if (isnan(val) || isinf(val) || isinf(-val) ) {
++ if (std::isnan(val) || std::isinf(val) || std::isinf(-val) ) {
+ val = missing;
+ }
+ }
+- if (isnan(val) ) val = missing;
++ if (std::isnan(val) ) val = missing;
+ if ( (*matrix)[index.second +( index.first*im)] == missing )
+ (*matrix)[index.second +( index.first*im)] = val;
+
+@@ -293,7 +293,7 @@ bool NetcdfOrcaInterpretor::interpretAsP
+
+ while (lat != latm.end() ) {
+ double value = *val;
+- if (isnan(value) )
++ if (std::isnan(value) )
+ value = missing;
+
+ if ( value != missing) {
+Index: magics++-2.28.0/src/decoders/NetcdfGeoMatrixInterpretor.cc
+===================================================================
+--- magics++-2.28.0.orig/src/decoders/NetcdfGeoMatrixInterpretor.cc
++++ magics++-2.28.0/src/decoders/NetcdfGeoMatrixInterpretor.cc
+@@ -90,7 +90,7 @@ bool NetcdfGeoMatrixInterpretor::interpr
+ netcdf.get(field_, data, first, last);
+ int i = 0;
+ for (vector<double>::iterator d = data.begin(); d != data.end(); ++d ) {
+- if ( !isnan(*d) ) {
++ if ( !std::isnan(*d) ) {
+ matrix_->push_back(*d);
+
+ }
diff --git a/debian/rules b/debian/rules
index 4a5aa40..1c67a16 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,10 @@ export DH_VERBOSE=1
%:
dh $@ --parallel --with python2 --with-buildsystem=cmake --builddirectory=$(BUILDDIR)
+# To fix cmake output change these
+OLD_GF_PATH=$(shell gfortran -print-search-dirs | grep install | cut -f2 -d' ' )libgfortran.so
+NEW_GF_PATH:=$(LIBDIR)/libgfortran.so
+
export extra_flags += \
-DCMAKE_PREFIX_PATH=${LIBDIR}/cmake/grib_api \
-DBUILD_SITE=debian \
@@ -108,6 +112,7 @@ override_dh_auto_install:
sed -e 's%$${_IMPORT_PREFIX}/lib%$(LIBDIR)%' \
< debian/tmp/usr/share/magics/cmake/magics-targets-none.cmake \
| sed -e 's%$${_IMPORT_PREFIX}/bin%/usr/bin%' \
+ | sed -e 's%$(OLD_GF_PATH)%$(NEW_GF_PATH)%' \
> debian/tmp/$(LIBDIR)/cmake/magics/magics-targets-none.cmake
rm -r debian/tmp/usr/share/magics/cmake
dh_python2 /usr/lib/python2.7/site-packages/Magics
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/magics.git
More information about the debian-science-commits
mailing list