Tags 838733 +patch
thanks

On 24/09/16 23:19, Michael Banck wrote:
So it seems the fix is simply to replace Eigen::Vector3d with Eigen::Matrix<
qreal , 3 , 1>. I've just set off a test build with that change, will report
results in the morning.
Let us know how it goes.
I got it to build,  debdiff attatched, no intent to NMU.


diff -Nru avogadro-1.1.1/debian/changelog avogadro-1.1.1/debian/changelog
--- avogadro-1.1.1/debian/changelog     2016-08-04 17:06:58.000000000 +0000
+++ avogadro-1.1.1/debian/changelog     2016-09-24 02:16:01.000000000 +0000
@@ -1,3 +1,10 @@
+avogadro (1.1.1-1~exp3.2) UNRELEASED; urgency=medium
+
+  * Patch for BTS, no intent to NMU
+  * Fix qreal VS double issue.
+
+ -- Peter Michael Green <plugw...@debian.org>  Sat, 24 Sep 2016 02:16:01 +0000
+
 avogadro (1.1.1-1~exp3.1) experimental; urgency=medium
 
   * Non-maintainer upload.
diff -Nru avogadro-1.1.1/debian/patches/fix-qreal-vs-double.patch 
avogadro-1.1.1/debian/patches/fix-qreal-vs-double.patch
--- avogadro-1.1.1/debian/patches/fix-qreal-vs-double.patch     1970-01-01 
00:00:00.000000000 +0000
+++ avogadro-1.1.1/debian/patches/fix-qreal-vs-double.patch     2016-09-24 
02:16:01.000000000 +0000
@@ -0,0 +1,95 @@
+Description: Fix qreal VS double issue.
+ Vector3d is an alias for Eigen::Matrix< double , 3 , 1> but electronDensity 
+ expects Eigen::Matrix< qreal , 3 , 1> therefore the code broke on arm
+ platforms where qreal is defined (in qt4) as float. This patch changes the
+ code to construct the correct type.
+Author: Peter Michael Green <plugw...@debian.org>
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2016-09-24
+
+Index: avogadro-1.1.1/libavogadro/src/extensions/qtaim/qtaimcubature.cpp
+===================================================================
+--- avogadro-1.1.1.orig/libavogadro/src/extensions/qtaim/qtaimcubature.cpp
++++ avogadro-1.1.1/libavogadro/src/extensions/qtaim/qtaimcubature.cpp
+@@ -1189,7 +1189,7 @@ QList<QVariant> QTAIMEvaluateProperty(QL
+ 
+   QList<QVariant> valueList;
+ 
+-  double initialElectronDensity=eval.electronDensity( 
Eigen::Vector3d(x0,y0,z0) );
++  double initialElectronDensity=eval.electronDensity( Eigen::Matrix< qreal , 
3 , 1>(x0,y0,z0) );
+ 
+   // if less than some small value, then return zero for all integrands.
+   if( initialElectronDensity < 1.e-5 )
+@@ -1254,7 +1254,7 @@ QList<QVariant> QTAIMEvaluateProperty(QL
+       {
+         if( modeList.at(m) == 0 )
+         {
+-          valueList.append(eval.electronDensity( Eigen::Vector3d(x0,y0,z0) ));
++          valueList.append(eval.electronDensity( Eigen::Matrix< qreal , 3 , 
1>(x0,y0,z0) ));
+         }
+         else
+         {
+@@ -1472,7 +1472,7 @@ QList<QVariant> QTAIMEvaluatePropertyRTP
+ 
+   QList<QVariant> valueList;
+ 
+-  double initialElectronDensity=eval.electronDensity( 
Eigen::Vector3d(x0,y0,z0) );
++  double initialElectronDensity=eval.electronDensity( Eigen::Matrix< qreal , 
3 , 1>(x0,y0,z0) );
+ 
+   // if less than some small value, then return zero for all integrands.
+   if( initialElectronDensity < 1.e-5 )
+@@ -1540,7 +1540,7 @@ QList<QVariant> QTAIMEvaluatePropertyRTP
+         {
+           valueList.append(
+ 
+-              r0*r0*sin(t0)*eval.electronDensity( Eigen::Vector3d(x0,y0,z0) )
++              r0*r0*sin(t0)*eval.electronDensity( Eigen::Matrix< qreal , 3 , 
1>(x0,y0,z0) )
+ 
+               );
+         }
+@@ -1738,7 +1738,7 @@ void property_r(unsigned int ndim, const
+   {
+     if( mode==0 )
+     {
+-      fval[m]=r*r*eval.electronDensity( Eigen::Vector3d(x,y,z) );
++      fval[m]=r*r*eval.electronDensity( Eigen::Matrix< qreal , 3 , 1>(x,y,z) 
);
+     }
+   }
+ 
+@@ -1846,7 +1846,7 @@ QList<QVariant> QTAIMEvaluatePropertyTP(
+   qreal x=xyzl(0);
+   qreal y=xyzl(1);
+   qreal z=xyzl(2);
+-  qreal leftElectronDensity=eval.electronDensity( Eigen::Vector3d(x,y,z) );
++  qreal leftElectronDensity=eval.electronDensity( Eigen::Matrix< qreal , 3 , 
1>(x,y,z) );
+ 
+   if( leftElectronDensity < 1.e-5 )
+   {
+@@ -1896,7 +1896,7 @@ QList<QVariant> QTAIMEvaluatePropertyTP(
+   x=xyzr(0);
+   y=xyzr(1);
+   z=xyzr(2);
+-  qreal rightElectronDensity=eval.electronDensity( Eigen::Vector3d(x,y,z) );
++  qreal rightElectronDensity=eval.electronDensity( Eigen::Matrix< qreal , 3 , 
1>(x,y,z) );
+ 
+   if( rightElectronDensity < 1.e-5 )
+   {
+@@ -1959,7 +1959,7 @@ QList<QVariant> QTAIMEvaluatePropertyTP(
+     x=xyzm(0);
+     y=xyzm(1);
+     z=xyzm(2);
+-    qreal midpointElectronDensity=eval.electronDensity( 
Eigen::Vector3d(x,y,z) );
++    qreal midpointElectronDensity=eval.electronDensity( Eigen::Matrix< qreal 
, 3 , 1>(x,y,z) );
+ 
+     if( midpointElectronDensity < 1.e-5 )
+     {
diff -Nru avogadro-1.1.1/debian/patches/series 
avogadro-1.1.1/debian/patches/series
--- avogadro-1.1.1/debian/patches/series        2016-08-04 17:06:12.000000000 
+0000
+++ avogadro-1.1.1/debian/patches/series        2016-09-24 02:16:01.000000000 
+0000
@@ -3,3 +3,4 @@
 probe-X11-paths-with-find_package.patch
 eigen3.patch
 gcc-version.diff
+fix-qreal-vs-double.patch

Reply via email to