summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton2019-05-27 20:35:51 +0300
committerAnton2019-05-27 20:35:51 +0300
commit8d6f8a2de768b29c0667fe55c4865b82a038aa72 (patch)
treef36975b6a9e015381262587cf7a65f3efc5f8791
parentbba04654512ae04e2f5cc0f273f2dff6396d050a (diff)
downloadaur-8d6f8a2de768b29c0667fe55c4865b82a038aa72.tar.gz
Replaced 4 patches with sed commands
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD23
-rw-r--r--libcmatrix-3.11.0-fix-c++14.patch40
-rw-r--r--libcmatrix-3.2.1-gcc4.4.patch11
-rw-r--r--libcmatrix-3.2.1-gcc4.6.patch16
-rw-r--r--libcmatrix-3.2.1-minuit2.patch13
6 files changed, 11 insertions, 103 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fea5fb20a3e8..c445b969e9e4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,22 @@
pkgbase = libcmatrix
pkgdesc = A library designed for numerical studies of problems in NMR
pkgver = 3.11.0
- pkgrel = 2
+ pkgrel = 3
url = https://www.dur.ac.uk/paul.hodgkinson/pNMRsim
arch = x86_64
license = GPL
makedepends = gcc
+ makedepends = sed
depends = openmpi
source = https://www.dur.ac.uk/paul.hodgkinson/pNMRsim/libcmatrixR3_lite.tar.gz
- source = libcmatrix-3.11.0-fix-c++14.patch
source = libcmatrix-3.11.0-gcc5.2.patch
source = libcmatrix-3.11.0-shared.patch
- source = libcmatrix-3.2.1-gcc4.4.patch
- source = libcmatrix-3.2.1-gcc4.6.patch
source = libcmatrix-3.2.1-gcc4.7.patch
- source = libcmatrix-3.2.1-minuit2.patch
source = libcmatrix-3.9.0-atlas.patch
sha256sums = 0cd4b1f921235ea64d7fbd8d814fbe639bf9ddb23e4a6d3182cf2788cc23f8b8
- sha256sums = e4bbb081907f14227446396033f8f72527cea553525431ae86dd11b43db226a9
sha256sums = 58a1278a8f1323bd201979cdce8ecdc390ce8825f58a1d143264455d5bc0f80c
sha256sums = e52c2adb42f5a2836db1e71e4ae2f3235e58bc5c92b04594069548201fd821cf
- sha256sums = d6f0852e207670e59f32299b5e7a49e3899655c0683c2f7858f6be4c0db6a8e3
- sha256sums = fa7a4db6b1899a7a85fa6cd87f0d97ea6330ffc33787039d02330440dbdc30cb
sha256sums = bc4eec9967be3d9ad520d1750abb23f5b6732b8352c7ad61f54c78fb7c9d6312
- sha256sums = 1fe9e847ac9d32c1ebf4229c0d5df8d3a3c1e2e8860967b901b499ae8b354f71
sha256sums = fc4463ff41d3a691b351f4891bcd2fb3177ce3c04f0f4d2f3d398e5b64c26b0a
pkgname = libcmatrix
diff --git a/PKGBUILD b/PKGBUILD
index 5093ed7f5c0c..f784d9467954 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,43 +2,38 @@
pkgname=libcmatrix
pkgver=3.11.0
-pkgrel=2
+pkgrel=3
pkgdesc="A library designed for numerical studies of problems in NMR"
arch=('x86_64')
url="https://www.dur.ac.uk/paul.hodgkinson/pNMRsim"
license=('GPL')
depends=('openmpi')
-makedepends=('gcc')
+makedepends=('gcc' 'sed')
source=($url/libcmatrixR3_lite.tar.gz
- $pkgname-3.11.0-fix-c++14.patch
$pkgname-3.11.0-gcc5.2.patch
$pkgname-3.11.0-shared.patch
- $pkgname-3.2.1-gcc4.4.patch
- $pkgname-3.2.1-gcc4.6.patch
$pkgname-3.2.1-gcc4.7.patch
- $pkgname-3.2.1-minuit2.patch
$pkgname-3.9.0-atlas.patch)
sha256sums=('0cd4b1f921235ea64d7fbd8d814fbe639bf9ddb23e4a6d3182cf2788cc23f8b8'
- 'e4bbb081907f14227446396033f8f72527cea553525431ae86dd11b43db226a9'
'58a1278a8f1323bd201979cdce8ecdc390ce8825f58a1d143264455d5bc0f80c'
'e52c2adb42f5a2836db1e71e4ae2f3235e58bc5c92b04594069548201fd821cf'
- 'd6f0852e207670e59f32299b5e7a49e3899655c0683c2f7858f6be4c0db6a8e3'
- 'fa7a4db6b1899a7a85fa6cd87f0d97ea6330ffc33787039d02330440dbdc30cb'
'bc4eec9967be3d9ad520d1750abb23f5b6732b8352c7ad61f54c78fb7c9d6312'
- '1fe9e847ac9d32c1ebf4229c0d5df8d3a3c1e2e8860967b901b499ae8b354f71'
'fc4463ff41d3a691b351f4891bcd2fb3177ce3c04f0f4d2f3d398e5b64c26b0a')
prepare() {
mv $srcdir/libcmatrixR3 $srcdir/$pkgname-$pkgver
cd $srcdir/$pkgname-$pkgver
patch -p1 < ../$pkgname-3.11.0-shared.patch
- patch -p1 < ../$pkgname-3.2.1-minuit2.patch
- patch -p1 < ../$pkgname-3.2.1-gcc4.4.patch
- patch -p1 < ../$pkgname-3.2.1-gcc4.6.patch
patch -p1 < ../$pkgname-3.2.1-gcc4.7.patch
patch -p1 < ../$pkgname-3.9.0-atlas.patch
patch -p1 < ../$pkgname-3.11.0-gcc5.2.patch
- patch -p1 < ../$pkgname-3.11.0-fix-c++14.patch
+
+ sed -i -e '/Warnings.h/a\' -e '#include <cstdio>' include/DynamicList.h
+ sed -i 's#0x80000000#(int)0x80000000#g' include/lcm_ssecomplex.h
+ sed -i 's#mutable space#space#' NMR/MetaPropagation.cc
+ sed -i 's#-lMinuit#-lMinuit2#g' configure
+ sed -i 's#Minuit,main#Minuit2,main#g' configure-libraries.ac
+ sed -i 's#libMinuit#libMinuit2#g' configure-libraries.ac
}
build() {
diff --git a/libcmatrix-3.11.0-fix-c++14.patch b/libcmatrix-3.11.0-fix-c++14.patch
deleted file mode 100644
index 74e49285dd04..000000000000
--- a/libcmatrix-3.11.0-fix-c++14.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Fix building with C++14, which errors out due -Wnarrowing conversions.
-See also: https://bugs.gentoo.org/show_bug.cgi?id=594680
-
---- a/include/lcm_ssecomplex.h
-+++ b/include/lcm_ssecomplex.h
-@@ -151,7 +151,7 @@
- {
- static const union {
- int i[4]; ssecomplex_t v;
-- } signbithigh = {{0,0,0,0x80000000}};
-+ } signbithigh = {{0,0,0,(int)0x80000000}};
- ssecomplex_t b_im = _mm_shuffle_pd(b,b,3); // Imag. part of b in both
- const ssecomplex_t b_re = _mm_shuffle_pd(b,b,0); // Real part of b in both
- const ssecomplex_t tmp=_mm_mul_pd(a,b_re);
-@@ -166,7 +166,7 @@
- ssecomplex_t b_re = _mm_set1_pd(b);
- static const union {
- int i[4]; ssecomplex_t v;
-- } signbithigh = {{0,0,0,0x80000000}};
-+ } signbithigh = {{0,0,0,(int)0x80000000}};
- b_re = _mm_xor_pd(b_re, signbithigh.v); // Change sign of high
- return complex(_mm_mul_pd(a.z_, b_re));
- }
-@@ -184,14 +184,14 @@
- inline complex operator- (const complex& a) {
- static const union { // (signbit,signbit)
- int i[4]; ssecomplex_t v;
-- } signbits = {{0,0x80000000,0,0x80000000}};
-+ } signbits = {{0,(int)0x80000000,0,(int)0x80000000}};
- return complex(_mm_xor_pd(a, signbits.v)); // Change sign of both elements
- }
-
- inline complex conj(const complex& a) {
- static const union { // (signbit,signbit)
- int i[4]; ssecomplex_t v;
-- } signbithigh = {{0,0,0,0x80000000}};
-+ } signbithigh = {{0,0,0,(int)0x80000000}};
- return complex(_mm_xor_pd(a.z_, signbithigh.v)); // Change sign of imag. part
- }
-
diff --git a/libcmatrix-3.2.1-gcc4.4.patch b/libcmatrix-3.2.1-gcc4.4.patch
deleted file mode 100644
index 985b6087c475..000000000000
--- a/libcmatrix-3.2.1-gcc4.4.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/include/DynamicList.h b/include/DynamicList.h
-index f8c1346..05a7b10 100755
---- a/include/DynamicList.h
-+++ b/include/DynamicList.h
-@@ -4,6 +4,7 @@
- #include "BaseList.h"
- #include "lcm_basethreads.h"
- #include "Warnings.h"
-+#include <cstdio>
-
- namespace libcmatrix {
diff --git a/libcmatrix-3.2.1-gcc4.6.patch b/libcmatrix-3.2.1-gcc4.6.patch
deleted file mode 100644
index b3d8c8d19996..000000000000
--- a/libcmatrix-3.2.1-gcc4.6.patch
+++ /dev/null
@@ -1,16 +0,0 @@
- NMR/MetaPropagation.cc | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/NMR/MetaPropagation.cc b/NMR/MetaPropagation.cc
-index b7ed98b..ce8c16f 100755
---- a/NMR/MetaPropagation.cc
-+++ b/NMR/MetaPropagation.cc
-@@ -2136,7 +2136,7 @@ SpinOpGenerator::add_A0(T& dest,F func, double coup, size_t j, size_t sk, Type2T
- { ref_.clear(0); }
- const space_T& operator()() const { return ref_; }
- ~fudge_isotropic_() { ref_.ensure_rank(0); }
-- mutable space_T& ref_;
-+ space_T& ref_;
- };
- template<> struct fudge_isotropic_<double> {
- fudge_isotropic_(double v) : v_(v) {};
diff --git a/libcmatrix-3.2.1-minuit2.patch b/libcmatrix-3.2.1-minuit2.patch
deleted file mode 100644
index 6dbfdc02f23e..000000000000
--- a/libcmatrix-3.2.1-minuit2.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/configure-libraries.ac
-+++ b/configure-libraries.ac
-@@ -14,8 +14,8 @@
- fi
- if test x$FOUNDMINUIT = xyes; then
- AC_CHECK_LIB(lcg_Minuit,main,,
-- AC_CHECK_LIB(Minuit,main,,FOUNDMINUIT=no
-- AC_MSG_WARN([Minuit library (liblcg_Minuit or libMinuit) not found
-+ AC_CHECK_LIB(Minuit2,main,,FOUNDMINUIT=no
-+ AC_MSG_WARN([Minuit library (liblcg_Minuit or libMinuit2) not found
- Is LDFLAGS is defined to include relevant directory?])))
- if test x$FOUNDMINUIT = xyes; then
- AC_DEFINE(HAVE_LIBMINUIT)