summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2017-01-12 20:37:22 +0100
committerMichel Zou2017-01-12 20:37:22 +0100
commit9011a4cb5bb0998bf7de9430ac1b6c1d3b6a3efe (patch)
tree76a04fe0ec25754d9cd7f7d586e302e3244047b4
parent8d24b86d27a0ee7fe840c7b6feb775836d01f06e (diff)
downloadaur-9011a4cb5bb0998bf7de9430ac1b6c1d3b6a3efe.tar.gz
swig3011
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--swig3011-truediv.patch189
3 files changed, 195 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ba5de326e56..f4993cb1b9a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Fri Nov 18 12:20:11 UTC 2016
+# Thu Jan 12 19:37:22 UTC 2017
pkgbase = openturns
pkgdesc = Uncertainty treatment library
pkgver = 1.8
@@ -20,7 +20,9 @@ pkgbase = openturns
depends = r
backup = etc/openturns/openturns.conf
source = https://github.com/openturns/openturns/archive/v1.8.tar.gz
+ source = swig3011-truediv.patch
sha256sums = a857564257fdb42a0808ef806dfdaa17265d56653634b375f57885106007f687
+ sha256sums = SKIP
pkgname = openturns
diff --git a/PKGBUILD b/PKGBUILD
index edad135c5f6..864973c48e4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,11 +8,12 @@ url="http://www.openturns.org/"
depends=('libxml2' 'muparser' 'intel-tbb' 'hmat-oss' 'python-matplotlib' 'nlopt' 'r')
makedepends=('cmake' 'swig' 'boost')
backup=('etc/openturns/openturns.conf')
-source=("https://github.com/openturns/openturns/archive/v$pkgver.tar.gz")
-sha256sums=('a857564257fdb42a0808ef806dfdaa17265d56653634b375f57885106007f687')
+source=("https://github.com/openturns/openturns/archive/v$pkgver.tar.gz" swig3011-truediv.patch)
+sha256sums=('a857564257fdb42a0808ef806dfdaa17265d56653634b375f57885106007f687' SKIP)
build() {
cd openturns-$pkgver
+ patch -p1 -i ../swig3011-truediv.patch
R CMD INSTALL --library=$PWD utils/rot_1.4.6.tar.gz
export R_LIBS=$PWD
cmake -DCMAKE_INSTALL_PREFIX=/usr \
diff --git a/swig3011-truediv.patch b/swig3011-truediv.patch
new file mode 100644
index 00000000000..587422971ce
--- /dev/null
+++ b/swig3011-truediv.patch
@@ -0,0 +1,189 @@
+From a6244164a06262f86409d7a1b21aec01e2771423 Mon Sep 17 00:00:00 2001
+From: Julien Schueller <schueller@phimeca.com>
+Date: Mon, 28 Nov 2016 14:55:03 +0100
+Subject: [PATCH] Hide _truediv from swig 3.0.11
+
+---
+ python/src/ComplexMatrix.i | 6 ++++--
+ python/src/Distribution.i | 4 +++-
+ python/src/DistributionImplementation.i | 2 ++
+ python/src/HermitianMatrix.i | 2 ++
+ python/src/Matrix.i | 7 ++++---
+ python/src/NumericalSample.i | 2 ++
+ python/src/SquareComplexMatrix.i | 2 ++
+ python/src/SquareMatrix.i | 2 ++
+ python/src/SymmetricMatrix.i | 2 ++
+ python/src/TriangularComplexMatrix.i | 2 ++
+ python/src/TriangularMatrix.i | 2 ++
+ 12 files changed, 30 insertions(+), 7 deletions(-)
+
+diff --git a/python/src/ComplexMatrix.i b/python/src/ComplexMatrix.i
+index 52ef93b..979ce9a 100644
+--- a/python/src/ComplexMatrix.i
++++ b/python/src/ComplexMatrix.i
+@@ -50,9 +50,11 @@ namespace OT {
+ OTComplexMatrixGetAccessors()
+
+ ComplexMatrix __rmul__(NumericalComplex s) { return s * (*self); }
+-
++
++#if SWIG_VERSION < 0x030011
+ ComplexMatrix __truediv__(NumericalComplex s) { return (*self) / s; }
+-
++#endif
++
+ ComplexMatrix __matmul__(const ComplexMatrix & other) { return *self * other; }
+
+ ComplexMatrix __matmul__(const Matrix & other) { return *self * other; }
+diff --git a/python/src/Distribution.i b/python/src/Distribution.i
+index d93bea7..bed5f58 100644
+--- a/python/src/Distribution.i
++++ b/python/src/Distribution.i
+@@ -171,7 +171,9 @@ Distribution __div__(NumericalScalar s)
+ return (*self) / s;
+ }
+
+-Distribution __truediv__(NumericalScalar s) { return (*self) / s; }
++#if SWIG_VERSION < 0x030011
++ Distribution __truediv__(NumericalScalar s) { return (*self) / s; }
++#endif
+
+ } // class Distribution
+ } // namespace OT
+diff --git a/python/src/DistributionImplementation.i b/python/src/DistributionImplementation.i
+index 5d93c3b..dbea3a1 100644
+--- a/python/src/DistributionImplementation.i
++++ b/python/src/DistributionImplementation.i
+@@ -57,9 +57,11 @@ namespace OT {
+
+ DistributionImplementation(const DistributionImplementation & other) { return new OT::DistributionImplementation(other); }
+
++#if SWIG_VERSION < 0x030011
+ Pointer<DistributionImplementation> __truediv__(const NumericalScalar s) { return (*self) / s; }
+
+ Pointer<DistributionImplementation> __truediv__(const DistributionImplementation & d) { return (*self) / d; }
++#endif
+
+ Pointer<DistributionImplementation> __pow__(const NumericalScalar s) { return self->pow(s); }
+
+diff --git a/python/src/HermitianMatrix.i b/python/src/HermitianMatrix.i
+index f17684f..487ce9b 100644
+--- a/python/src/HermitianMatrix.i
++++ b/python/src/HermitianMatrix.i
+@@ -28,7 +28,9 @@ namespace OT {
+ HermitianMatrix __rmul__(NumericalComplex s) { return s * (*self); }
+ ComplexMatrix __rmul__(const ComplexMatrix & m) { return m * (*self); }
+
++#if SWIG_VERSION < 0x030011
+ HermitianMatrix __truediv__(NumericalComplex s) { return (*self) / s; }
++#endif
+
+ } // HermitianMatrix
+ } // OT
+diff --git a/python/src/Matrix.i b/python/src/Matrix.i
+index dcc5146..3987b03 100644
+--- a/python/src/Matrix.i
++++ b/python/src/Matrix.i
+@@ -333,10 +333,11 @@ namespace OT {
+ OTMatrixAccessors()
+
+ Matrix __rmul__(const NumericalScalar s) { return s * (*self); }
+-
+- Matrix __truediv__(const NumericalScalar s) { return (*self) / s; }
+-
+ Matrix __matmul__(const Matrix & other) { return *self * other; }
+
++#if SWIG_VERSION < 0x030011
++ Matrix __truediv__(const NumericalScalar s) { return (*self) / s; }
++#endif
++
+ } // Matrix
+ } // OT
+diff --git a/python/src/NumericalSample.i b/python/src/NumericalSample.i
+index 94897af..c78e86e 100644
+--- a/python/src/NumericalSample.i
++++ b/python/src/NumericalSample.i
+@@ -413,11 +413,13 @@ NumericalSample(PyObject * pyObj, UnsignedInteger dimension)
+
+ Bool __eq__(const NumericalSample & other) { return (*self) == other; }
+
++#if SWIG_VERSION < 0x030011
+ NumericalSample __truediv__(const NumericalScalar & u) { return (*self) / u; }
+
+ NumericalSample __truediv__(const NumericalPoint & v) { return (*self) / v; }
+
+ NumericalSample __truediv__(const SquareMatrix & m) { return (*self) / m; }
++#endif
+
+ } // %extend
+ } // namespace OT
+diff --git a/python/src/SquareComplexMatrix.i b/python/src/SquareComplexMatrix.i
+index 5293448..dcaac6a 100644
+--- a/python/src/SquareComplexMatrix.i
++++ b/python/src/SquareComplexMatrix.i
+@@ -20,7 +20,9 @@ namespace OT {
+
+ OTComplexMatrixGetAccessors()
+
++#if SWIG_VERSION < 0x030011
+ SquareComplexMatrix __truediv__(NumericalComplex s) { return (*self) / s; }
++#endif
+
+ } // SquareComplexMatrix
+ } // OT
+diff --git a/python/src/SquareMatrix.i b/python/src/SquareMatrix.i
+index 1f1ca41..e1cf0f1 100644
+--- a/python/src/SquareMatrix.i
++++ b/python/src/SquareMatrix.i
+@@ -25,7 +25,9 @@ namespace OT {
+
+ OTMatrixAccessors()
+
++#if SWIG_VERSION < 0x030011
+ SquareMatrix __truediv__(NumericalScalar s) { return (*self) / s; }
++#endif
+
+ } // SquareMatrix
+ } // OT
+diff --git a/python/src/SymmetricMatrix.i b/python/src/SymmetricMatrix.i
+index c8fb82c..33d807e 100644
+--- a/python/src/SymmetricMatrix.i
++++ b/python/src/SymmetricMatrix.i
+@@ -35,7 +35,9 @@ namespace OT {
+ SymmetricMatrix __rmul__(NumericalScalar s) { return s * (*self); }
+ Matrix __rmul__(const Matrix & m) { return m * (*self); }
+
++#if SWIG_VERSION < 0x030011
+ SymmetricMatrix __truediv__(NumericalScalar s) { return (*self) / s; }
++#endif
+
+ } // SymmetricMatrix
+ } // OT
+diff --git a/python/src/TriangularComplexMatrix.i b/python/src/TriangularComplexMatrix.i
+index 18083ac..97bdb70 100644
+--- a/python/src/TriangularComplexMatrix.i
++++ b/python/src/TriangularComplexMatrix.i
+@@ -21,7 +21,9 @@ namespace OT {
+ TriangularComplexMatrix __rmul__(NumericalComplex s) { return s * (*self); }
+ ComplexMatrix __rmul__(const ComplexMatrix & m) { return m * (*self); }
+
++#if SWIG_VERSION < 0x030011
+ TriangularComplexMatrix __truediv__(NumericalComplex s) { return (*self) / s; }
++#endif
+
+ } // TriangularComplexMatrix
+ } // OT
+diff --git a/python/src/TriangularMatrix.i b/python/src/TriangularMatrix.i
+index 5fb6777..c023370 100644
+--- a/python/src/TriangularMatrix.i
++++ b/python/src/TriangularMatrix.i
+@@ -21,7 +21,9 @@ namespace OT {
+ TriangularMatrix __rmul__(NumericalScalar s) { return s * (*self); }
+ Matrix __rmul__(const Matrix & m) { return m * (*self); }
+
++#if SWIG_VERSION < 0x030011
+ TriangularMatrix __truediv__(NumericalScalar s) { return (*self) / s; }
++#endif
+
+ } // TriangularMatrix
+ } // OT