void-packages/srcpkgs/python3-orocos-kdl/patches/sip.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

113 lines
4 KiB
Diff

From f8d488cad733d2c2c6fe6911dc2e72e014ad0002 Mon Sep 17 00:00:00 2001
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Fri, 26 Jun 2020 17:04:12 +0200
Subject: [PATCH] Declare assignment operator private for SIP (Closes: #260)
Starting with v4.19.23 SIP expects a working operator= or one marked
private explicitly. All classes in this PR have a reference member
(&chain) resulting in the compiler deleting the default assignment
operator. This PR makes this known to SIP as well.
[ Rebased against release version by Andrew J. Hesford. ]
---
diff -ur python_orocos_kdl/PyKDL.orig/dynamics.sip python_orocos_kdl/PyKDL/dynamics.sip
--- a/python_orocos_kdl/PyKDL/dynamics.sip 2020-10-08 09:41:13.830476720 -0400
+++ b/python_orocos_kdl/PyKDL/dynamics.sip 2020-10-08 09:41:58.875476576 -0400
@@ -72,4 +72,6 @@
int JntToCoriolis(const JntArray &q, const JntArray &q_dot, JntArray &coriolis);
int JntToMass(const JntArray &q, JntSpaceInertiaMatrix& H);
int JntToGravity(const JntArray &q,JntArray &gravity);
+private:
+ ChainDynParam& operator=(const ChainDynParam&);
};
diff -ur python_orocos_kdl/PyKDL.orig/kinfam.sip python_orocos_kdl/PyKDL/kinfam.sip
--- a/python_orocos_kdl/PyKDL/kinfam.sip 2020-10-08 09:41:13.830476720 -0400
+++ b/python_orocos_kdl/PyKDL/kinfam.sip 2020-10-08 09:47:26.314475457 -0400
@@ -344,6 +344,8 @@
ChainFkSolverPos_recursive(const Chain& chain);
virtual int JntToCart(const JntArray& q_in, Frame& p_out,int segmentNr=-1);
virtual void updateInternalDataStructures();
+private:
+ ChainFkSolverPos_recursive& operator=(const ChainFkSolverPos_recursive&);
};
class ChainFkSolverVel_recursive : ChainFkSolverVel
@@ -357,6 +359,8 @@
virtual int JntToCart(const JntArrayVel& q_in ,FrameVel& out,int
segmentNr=-1 );
virtual void updateInternalDataStructures();
+private:
+ ChainFkSolverVel_recursive& operator=(const ChainFkSolverVel_recursive&);
};
class ChainIkSolverPos : SolverI {
@@ -392,6 +396,8 @@
virtual int CartToJnt(const JntArray& q_init , const Frame& p_in ,JntArray& q_out);
virtual void updateInternalDataStructures();
+private:
+ ChainIkSolverPos_NR& operator=(const ChainIkSolverPos_NR&);
};
class ChainIkSolverPos_NR_JL : ChainIkSolverPos
@@ -407,6 +413,8 @@
virtual int CartToJnt(const JntArray& q_init , const Frame& p_in ,JntArray& q_out);
virtual void updateInternalDataStructures();
+private:
+ ChainIkSolverPos_NR_JL& operator=(const ChainIkSolverPos_NR_JL&);
};
class ChainIkSolverVel_pinv : ChainIkSolverVel
@@ -420,6 +428,8 @@
virtual int CartToJnt(const JntArray& q_in, const Twist& v_in, JntArray& qdot_out);
virtual void updateInternalDataStructures();
+private:
+ ChainIkSolverVel_pinv& operator=(const ChainIkSolverVel_pinv&);
};
class ChainIkSolverVel_wdls : ChainIkSolverVel
@@ -506,6 +516,8 @@
void setLambda(const double& lambda);
+private:
+ ChainIkSolverVel_wdls& operator=(const ChainIkSolverVel_wdls&);
};
@@ -520,6 +532,8 @@
virtual int CartToJnt(const JntArray& q_init , const Frame& p_in ,JntArray& q_out);
virtual void updateInternalDataStructures();
+private:
+ ChainIkSolverPos_LMA& operator=(const ChainIkSolverPos_LMA&);
};
@@ -546,6 +560,8 @@
const JntArray& getOptPos()const /Factory/;
const double& getAlpha()const /Factory/;
+private:
+ ChainIkSolverVel_pinv_nso& operator=(const ChainIkSolverVel_pinv_nso&);
};
class ChainIkSolverVel_pinv_givens : ChainIkSolverVel
@@ -559,6 +575,8 @@
virtual int CartToJnt(const JntArray& q_in, const Twist& v_in, JntArray& qdot_out);
virtual void updateInternalDataStructures();
+private:
+ ChainIkSolverVel_pinv_givens& operator=(const ChainIkSolverVel_pinv_givens&);
};
class ChainJntToJacSolver : SolverI
@@ -571,4 +589,6 @@
ChainJntToJacSolver(const Chain& chain);
int JntToJac(const JntArray& q_in,Jacobian& jac);
virtual void updateInternalDataStructures();
+private:
+ ChainJntToJacSolver& operator=(const ChainJntToJacSolver&);
};