git: 41227f92dded - main - science/py-veusz: fix build on powerpc*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 09 Mar 2023 09:49:33 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=41227f92dded1be28f72ad85d8de4c995b7a57d0

commit 41227f92dded1be28f72ad85d8de4c995b7a57d0
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-09 09:49:10 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-09 09:49:10 +0000

    science/py-veusz: fix build on powerpc*
    
    Namespace collision with LLVM:
    src/threed/objects.cpp:180:24: error: expected unqualified-id
          const ValVector& vec_step = stepindex==0 ? pos1 : pos2;
                           ^
    src/threed/objects.cpp:188:47: error: expected expression
              for(unsigned stepi=0; stepi<vec_step.size(); ++stepi)
                                                  ^
    src/threed/objects.cpp:191:46: error: expected body of lambda expression
                  pt(vidx_step) = vec_step[stepi];
                                                 ^
    3 errors generated.
---
 .../py-veusz/files/patch-src_threed_objects.cpp    | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/science/py-veusz/files/patch-src_threed_objects.cpp b/science/py-veusz/files/patch-src_threed_objects.cpp
new file mode 100644
index 000000000000..36d24001000d
--- /dev/null
+++ b/science/py-veusz/files/patch-src_threed_objects.cpp
@@ -0,0 +1,24 @@
+--- src/threed/objects.cpp.orig	2023-03-08 19:51:09 UTC
++++ src/threed/objects.cpp
+@@ -177,7 +177,7 @@ void Mesh::getLineFragments(const Mat4& perspM, const 
+       if(hidehorzline && stepindex==0) continue;
+       if(hidevertline && stepindex==1) continue;
+ 
+-      const ValVector& vec_step = stepindex==0 ? pos1 : pos2;
++      const ValVector& vec_step_ = stepindex==0 ? pos1 : pos2;
+       const ValVector& vec_const = stepindex==0 ? pos2 : pos1;
+       const unsigned vidx_step = stepindex==0 ? vidx_1 : vidx_2;
+       const unsigned vidx_const = stepindex==0 ? vidx_2 : vidx_1;
+@@ -185,10 +185,10 @@ void Mesh::getLineFragments(const Mat4& perspM, const 
+       for(unsigned consti=0; consti<vec_const.size(); ++consti)
+         {
+           pt(vidx_const) = vec_const[consti];
+-          for(unsigned stepi=0; stepi<vec_step.size(); ++stepi)
++          for(unsigned stepi=0; stepi<vec_step_.size(); ++stepi)
+             {
+               double heightsval = heights[stepindex==0 ? stepi*n2+consti : consti*n2+stepi];
+-              pt(vidx_step) = vec_step[stepi];
++              pt(vidx_step) = vec_step_[stepi];
+               pt(vidx_h) = heightsval;
+ 
+               // shuffle new to old positions and calculate new new