pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/kdeartwork3 Resolve base class ambiguity in opera...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/838a08227c1d
branches:  trunk
changeset: 648747:838a08227c1d
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Mar 18 10:27:54 2015 +0000

description:
Resolve base class ambiguity in operators. Help finding exit(3).

diffstat:

 misc/kdeartwork3/distinfo                                             |   6 +-
 misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_rkodesolver.cpp |  12 +++
 misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_rotation.cpp    |  40 ++++++++++
 misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_vec3.cpp        |  15 +++
 misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_vec3.h          |  26 ++++++
 5 files changed, 98 insertions(+), 1 deletions(-)

diffs (124 lines):

diff -r ce5ef426f777 -r 838a08227c1d misc/kdeartwork3/distinfo
--- a/misc/kdeartwork3/distinfo Wed Mar 18 10:26:53 2015 +0000
+++ b/misc/kdeartwork3/distinfo Wed Mar 18 10:27:54 2015 +0000
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.35 2008/08/27 12:18:13 markd Exp $
+$NetBSD: distinfo,v 1.36 2015/03/18 10:27:54 joerg Exp $
 
 SHA1 (kdeartwork-3.5.10.tar.bz2) = 928079e1bd54062b53a7cac192998a4c44022003
 RMD160 (kdeartwork-3.5.10.tar.bz2) = 4078546bb1cdab86a7510f5bcd6aac54751fe47b
 Size (kdeartwork-3.5.10.tar.bz2) = 16621355 bytes
 SHA1 (patch-aa) = 22c752e2d6b9a1bca140e78bd1ec0f29c5257f26
+SHA1 (patch-kscreensaver_kdesavers_rkodesolver.cpp) = 28a6b808c871d3f7144a473d8a696a3ac7651882
+SHA1 (patch-kscreensaver_kdesavers_rotation.cpp) = 86b745d74174a179eb68cbfe61dd28f0d6b33cd6
+SHA1 (patch-kscreensaver_kdesavers_vec3.cpp) = 693ab92f18ea08a2cbf7ed9ebea9e07237eab33d
+SHA1 (patch-kscreensaver_kdesavers_vec3.h) = 2672edfaf4466da1affa7783796929c2fd85f86f
diff -r ce5ef426f777 -r 838a08227c1d misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_rkodesolver.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_rkodesolver.cpp     Wed Mar 18 10:27:54 2015 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-kscreensaver_kdesavers_rkodesolver.cpp,v 1.1 2015/03/18 10:27:54 joerg Exp $
+
+--- kscreensaver/kdesavers/rkodesolver.cpp.orig        2015-03-17 22:50:05.000000000 +0000
++++ kscreensaver/kdesavers/rkodesolver.cpp
+@@ -10,6 +10,7 @@
+ //
+ //============================================================================
+ 
++#include <cstdlib>
+ #include <kdebug.h>
+ #include "rkodesolver.h"
+ 
diff -r ce5ef426f777 -r 838a08227c1d misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_rotation.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_rotation.cpp        Wed Mar 18 10:27:54 2015 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-kscreensaver_kdesavers_rotation.cpp,v 1.1 2015/03/18 10:27:54 joerg Exp $
+
+--- kscreensaver/kdesavers/rotation.cpp.orig   2015-03-17 22:45:37.000000000 +0000
++++ kscreensaver/kdesavers/rotation.cpp
+@@ -123,9 +123,9 @@ std::valarray<double> EulerOdeSolver::f(
+    ypr[2] = -(B-A)/C * omega_body[0] * omega_body[1]; // r'
+ 
+    // e1', e2', e3'
+-   ypr[std::slice(3,3,1)] = vec3<double>::crossprod(omega, e1);
+-   ypr[std::slice(6,3,1)] = vec3<double>::crossprod(omega, e2);
+-   ypr[std::slice(9,3,1)] = vec3<double>::crossprod(omega, e3);
++   ypr[std::slice(3,3,1)] = std::valarray<double>(vec3<double>::crossprod(omega, e1));
++   ypr[std::slice(6,3,1)] = std::valarray<double>(vec3<double>::crossprod(omega, e2));
++   ypr[std::slice(9,3,1)] = std::valarray<double>(vec3<double>::crossprod(omega, e3));
+ 
+    return ypr;
+ }
+@@ -529,15 +529,17 @@ void KRotationSaver::initData()
+    e3_body.rotate(-m_initEulerTheta*e1_body);
+    // omega_body = L_body * J_body^(-1)
+    vec3<double> omega_body = e3_body * m_Lz;
+-   omega_body /= J;
++   std::valarray<double> &omega_body_ = omega_body;
++   std::valarray<double> &J_ = J;
++   omega_body_ /= J_;
+ 
+    // assemble initial y for solver
+    std::valarray<double> y(12);
+-   y[std::slice(0,3,1)] = omega_body;
++   y[std::slice(0,3,1)] = std::valarray<double>(omega_body);
+    // 3 basis vectors of body system in fixed coordinates
+-   y[std::slice(3,3,1)] = e1t;
+-   y[std::slice(6,3,1)] = e2t;
+-   y[std::slice(9,3,1)] = e3t;
++   y[std::slice(3,3,1)] = std::valarray<double>(e1t);
++   y[std::slice(6,3,1)] = std::valarray<double>(e2t);
++   y[std::slice(9,3,1)] = std::valarray<double>(e3t);
+ 
+    // initial rotation vector
+    omega
diff -r ce5ef426f777 -r 838a08227c1d misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_vec3.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_vec3.cpp    Wed Mar 18 10:27:54 2015 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-kscreensaver_kdesavers_vec3.cpp,v 1.1 2015/03/18 10:27:54 joerg Exp $
+
+--- kscreensaver/kdesavers/vec3.cpp.orig       2015-03-17 22:51:32.000000000 +0000
++++ kscreensaver/kdesavers/vec3.cpp
+@@ -59,7 +59,9 @@ vec3<T>& vec3<T>::rotate(const vec3<T>& 
+       // part of vector which is parallel to r
+       vec3<T> par(r*(*this)/(r*r) * r);
+       // part of vector which is perpendicular to r
+-      vec3<T> perp(*this - par);
++      vec3<T> perp(*this);
++      std::valarray<T> &perp_ = perp;
++      perp -= std::valarray<T>(par);
+       // rotation direction, size of perp
+       vec3<T> rotdir(norm(perp) * normalized(crossprod(r,perp)));
+       *this = par + cos(phi)*perp + sin(phi)*rotdir;
diff -r ce5ef426f777 -r 838a08227c1d misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_vec3.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/kdeartwork3/patches/patch-kscreensaver_kdesavers_vec3.h      Wed Mar 18 10:27:54 2015 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-kscreensaver_kdesavers_vec3.h,v 1.1 2015/03/18 10:27:54 joerg Exp $
+
+--- kscreensaver/kdesavers/vec3.h.orig 2015-03-17 22:44:04.000000000 +0000
++++ kscreensaver/kdesavers/vec3.h
+@@ -148,7 +148,9 @@ inline vec3<T>::vec3(const std::slice_ar
+ template<typename T>
+ inline vec3<T> operator+(vec3<T> a, const vec3<T>& b)
+ {
+-   a += b;   /* valarray<T>::operator+=(const valarray<T>&) */
++   std::valarray<T> &a_ = a;
++   const std::valarray<T> &b_ = b;
++   a_ += b_;   /* valarray<T>::operator+=(const valarray<T>&) */
+    return a;
+ }
+ 
+@@ -158,7 +160,9 @@ inline vec3<T> operator+(vec3<T> a, cons
+ template<typename T>
+ inline T operator*(vec3<T> a, const vec3<T>& b)
+ {
+-   a *= b;   /* valarray<T>::operator*=(const T&) */
++   std::valarray<T> &a_ = a;
++   const std::valarray<T> &b_ = b;
++   a_ *= b_;   /* valarray<T>::operator*=(const valarray<T>&) */
+    return a.sum();
+ }
+ 



Home | Main Index | Thread Index | Old Index