[arch-commits] Commit in eigen/trunk (PKGBUILD eigen-c++17.patch)

Antonio Rojas arojas at archlinux.org
Wed Jul 1 16:28:53 UTC 2020


    Date: Wednesday, July 1, 2020 @ 16:28:52
  Author: arojas
Revision: 390698

Fix c++20 compilation issue (FS#67163), download patch again now that gitlab doesn't inject its version number

Modified:
  eigen/trunk/PKGBUILD
Deleted:
  eigen/trunk/eigen-c++17.patch

-------------------+
 PKGBUILD          |   25 ++++++---------
 eigen-c++17.patch |   84 ----------------------------------------------------
 2 files changed, 11 insertions(+), 98 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-01 16:03:42 UTC (rev 390697)
+++ PKGBUILD	2020-07-01 16:28:52 UTC (rev 390698)
@@ -4,38 +4,35 @@
 
 pkgname=eigen
 pkgver=3.3.7
-pkgrel=6
+pkgrel=7
 pkgdesc="Lightweight C++ template library for vector and matrix math, a.k.a. linear algebra."
 arch=('any')
 url='https://eigen.tuxfamily.org'
 license=('GPL3' 'LGPL2.1' 'BSD' 'custom:MPL2' 'custom:MINPACK')
 makedepends=('cmake' 'pkg-config' 'freeglut' 'gcc-fortran' 'fftw' 'suitesparse' 'boost')
-replaces=('eigen3')
-provides=('eigen3')
 source=("${pkgname}-${pkgver}.tar.bz2::https://bitbucket.org/eigen/eigen/get/${pkgver}.tar.bz2"
-         eigen-c++17.patch)
+         eigen-c++17.patch::"https://gitlab.com/libeigen/eigen/-/commit/b3c4344a.patch"
+         eigen-c++20.patch::"https://gitlab.com/libeigen/eigen/-/commit/867a7565.patch")
 sha256sums=('9f13cf90dedbe3e52a19f43000d71fdf72e986beb9a5436dddcd61ff9d77a3ce'
-            'd62ece0e05e4fc85282ff462d86b08dc85ff16e991d7ae4ddf24c3f33fbe8c49')
+            '80c1e974e525c3327ae933d6f064c8fb270d8ca99e32369533aacff72ee9cfce'
+            '2b1929b165302be43614f86286712402a4cbfa4d176b3cafba9588d1d84dd210')
 
 prepare() {
-  mkdir -p build
-
   cd eigen-eigen-*
   patch -p1 -i ../eigen-c++17.patch # https://gitlab.com/libeigen/eigen/-/issues/1676  
+  patch -p1 -i ../eigen-c++20.patch # https://gitlab.com/libeigen/eigen/-/issues/1833
 }
 
 build() {
-  cd build
-  cmake ../eigen-eigen-* \
+  cmake -B build -S eigen-eigen-* \
     -DCMAKE_INSTALL_PREFIX=/usr
 }
 
 package() {
-  cd build
-  make DESTDIR="$pkgdir" install
+  DESTDIR="$pkgdir" cmake --install build
 
   # install custom licenses
-  install -Dm644 ../eigen-eigen-*/COPYING.MPL2 -t "$pkgdir/usr/share/licenses/$pkgname"
-  install -Dm644 ../eigen-eigen-*/COPYING.BSD -t "$pkgdir/usr/share/licenses/$pkgname"
-  install -Dm644 ../eigen-eigen-*/COPYING.MINPACK -t "$pkgdir/usr/share/licenses/$pkgname"
+  install -Dm644 eigen-eigen-*/COPYING.MPL2 -t "$pkgdir/usr/share/licenses/$pkgname"
+  install -Dm644 eigen-eigen-*/COPYING.BSD -t "$pkgdir/usr/share/licenses/$pkgname"
+  install -Dm644 eigen-eigen-*/COPYING.MINPACK -t "$pkgdir/usr/share/licenses/$pkgname"
 }

Deleted: eigen-c++17.patch
===================================================================
--- eigen-c++17.patch	2020-07-01 16:03:42 UTC (rev 390697)
+++ eigen-c++17.patch	2020-07-01 16:28:52 UTC (rev 390698)
@@ -1,84 +0,0 @@
-From 2aa9eb3ce8fa6b2d61dce5be9d6d6460a28080c4 Mon Sep 17 00:00:00 2001
-From: Gael Guennebaud <g.gael at free.fr>
-Date: Thu, 7 Feb 2019 15:21:35 +0100
-Subject: [PATCH] bug #1676: workaround GCC's bug in c++17 mode. (grafted from
- b3c4344a6852e55c849976dd46ec4e861399bf16 )
-
----
- Eigen/src/Core/DenseBase.h                | 4 ++--
- Eigen/src/Core/util/ForwardDeclarations.h | 6 +-----
- bench/bench_gemm.cpp                      | 5 +++--
- 3 files changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h
-index 90066ae73..a96aa7152 100644
---- a/Eigen/src/Core/DenseBase.h
-+++ b/Eigen/src/Core/DenseBase.h
-@@ -40,7 +40,7 @@ static inline void check_DenseIndex_is_signed() {
-   */
- template<typename Derived> class DenseBase
- #ifndef EIGEN_PARSED_BY_DOXYGEN
--  : public DenseCoeffsBase<Derived>
-+  : public DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value>
- #else
-   : public DenseCoeffsBase<Derived,DirectWriteAccessors>
- #endif // not EIGEN_PARSED_BY_DOXYGEN
-@@ -71,7 +71,7 @@ template<typename Derived> class DenseBase
-     typedef Scalar value_type;
-     
-     typedef typename NumTraits<Scalar>::Real RealScalar;
--    typedef DenseCoeffsBase<Derived> Base;
-+    typedef DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value> Base;
- 
-     using Base::derived;
-     using Base::const_cast_derived;
-diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h
-index ea107393a..134544f96 100644
---- a/Eigen/src/Core/util/ForwardDeclarations.h
-+++ b/Eigen/src/Core/util/ForwardDeclarations.h
-@@ -47,11 +47,7 @@ template<typename T> struct NumTraits;
- template<typename Derived> struct EigenBase;
- template<typename Derived> class DenseBase;
- template<typename Derived> class PlainObjectBase;
--
--
--template<typename Derived,
--         int Level = internal::accessors_level<Derived>::value >
--class DenseCoeffsBase;
-+template<typename Derived, int Level> class DenseCoeffsBase;
- 
- template<typename _Scalar, int _Rows, int _Cols,
-          int _Options = AutoAlign |
-diff --git a/bench/bench_gemm.cpp b/bench/bench_gemm.cpp
-index 8528c5587..dccab96a8 100644
---- a/bench/bench_gemm.cpp
-+++ b/bench/bench_gemm.cpp
-@@ -112,6 +112,7 @@ void matlab_cplx_cplx(const M& ar, const M& ai, const M& br, const M& bi, M& cr,
-   cr.noalias() -= ai * bi;
-   ci.noalias() += ar * bi;
-   ci.noalias() += ai * br;
-+  // [cr ci] += [ar ai] * br + [-ai ar] * bi
- }
- 
- void matlab_real_cplx(const M& a, const M& br, const M& bi, M& cr, M& ci)
-@@ -240,7 +241,7 @@ int main(int argc, char ** argv)
-     blas_gemm(a,b,r);
-     c.noalias() += a * b;
-     if(!r.isApprox(c)) {
--      std::cout << r  - c << "\n";
-+      std::cout << (r  - c).norm() << "\n";
-       std::cerr << "Warning, your product is crap!\n\n";
-     }
-   #else
-@@ -249,7 +250,7 @@ int main(int argc, char ** argv)
-       gemm(a,b,c);
-       r.noalias() += a.cast<Scalar>() .lazyProduct( b.cast<Scalar>() );
-       if(!r.isApprox(c)) {
--        std::cout << r - c << "\n";
-+        std::cout << (r  - c).norm() << "\n";
-         std::cerr << "Warning, your product is crap!\n\n";
-       }
-     }
--- 
-2.26.2
-


More information about the arch-commits mailing list