evtgen-1.7.0.patch 4.23 KB
Newer Older
Ivan Razumov's avatar
Ivan Razumov committed
1
2
3
--- configure.orig	2017-12-13 17:02:54.000000000 +0100
+++ configure	2018-01-08 13:23:10.262573918 +0100
@@ -161,7 +161,6 @@
Ivan Razumov's avatar
Ivan Razumov committed
4
5
6
7
8
9
10
 #
 # User-changeable part, experts  -----------------------------
 #
-CXX=g++
 CXXFLAGS_OPT="-O2 -Wall"
 CXXFLAGS_DBG="-g -Wall"
 CFLAGS_OPT=-O2
Ivan Razumov's avatar
Ivan Razumov committed
11
@@ -180,7 +179,7 @@
Ivan Razumov's avatar
Ivan Razumov committed
12
13
14
15
16
17
18
19
 # Find platform.
 #
 ARCH=`uname`
-theGcc=`g++ --version | grep '[0-9]\.[0-9]\.[0-9]' -o | head -1 | awk -F . '{print $1}'`
+theGcc=`${CXX} --version | grep '[0-9]\.[0-9]\.[0-9]' -o | head -1 | awk -F . '{print $1}'`
 if [ ${theGcc} = 4 ]; then
   ARCH=${ARCH}-gcc4
 fi
Ivan Razumov's avatar
Ivan Razumov committed
20
21
22
23
@@ -190,6 +189,9 @@
 if [ ${theGcc} = 6 ]; then
   ARCH=${ARCH}-gcc6
 fi
Ivan Razumov's avatar
Ivan Razumov committed
24
25
26
27
28
29
+if [ $(echo $CXX | grep clang) ]; then
+  ARCH=${ARCH}-clang
+fi
 echo "Platform is $ARCH"
 
 #default platform settings:
Ivan Razumov's avatar
Ivan Razumov committed
30
@@ -209,6 +211,7 @@
Ivan Razumov's avatar
Ivan Razumov committed
31
32
33
34
35
36
37
   CFLAGS="${CFLAGS_DBG}"
   CXXFLAGS="${CXXFLAGS_DBG}"
 fi
+
 if [ $ARCH = Linux ]; then
   FFLAGS="${FFLAGS_OPT} -Wno-globals"
   CFLAGS="${CFLAGS_OPT}"
Ivan Razumov's avatar
Ivan Razumov committed
38
@@ -276,6 +279,42 @@
Ivan Razumov's avatar
Ivan Razumov committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
   fi
 fi
 
+# Linux platform with gcc5: new Fortran90 compiler.
+if [ $ARCH = Linux-gcc5 ]; then
+  FFLAGS="${FFLAGS_OPT}"
+  CFLAGS="${CFLAGS_OPT}"
+  CXXFLAGS="${CXXFLAGS_OPT}"
+  FLIBS="-lgfortran -lgfortranbegin"
+  if [ ${COMPMODE} = OPT ]; then
+    FFLAGS="${FFLAGS_OPT}"
+    CFLAGS="${CFLAGS_OPT}"
+    CXXFLAGS="${CXXFLAGS_OPT}"
+  fi
+  if [ ${COMPMODE} = DBG ]; then
+    FFLAGS="${FFLAGS_DBG}"
+    CFLAGS="${CFLAGS_DBG}"
+    CXXFLAGS="${CXXFLAGS_DBG}"
+  fi
+fi
+
+# Linux platform with clang: new Fortran90 compiler.
+if [ $ARCH = Linux-clang ]; then
+  FFLAGS="${FFLAGS_OPT}"
+  CFLAGS="${CFLAGS_OPT}"
+  CXXFLAGS="${CXXFLAGS_OPT}"
+  FLIBS="-lgfortran -lgfortranbegin"
+  if [ ${COMPMODE} = OPT ]; then
+    FFLAGS="${FFLAGS_OPT}"
+    CFLAGS="${CFLAGS_OPT}"
+    CXXFLAGS="${CXXFLAGS_OPT}"
+  fi
+  if [ ${COMPMODE} = DBG ]; then
+    FFLAGS="${FFLAGS_DBG}"
+    CFLAGS="${CFLAGS_DBG}"
+    CXXFLAGS="${CXXFLAGS_DBG}"
+  fi
+fi
+
 # Add C++11 options if required
 theGcc2=`g++ --version | grep '[0-9]\.[0-9]\.[0-9]' -o | head -1 | awk -F . '{print $2}'`
 gccVar=`echo $theGcc`
Ivan Razumov's avatar
Ivan Razumov committed
81
@@ -290,12 +329,22 @@
Ivan Razumov's avatar
Ivan Razumov committed
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
   fi
 fi
 
+if [ $ARCH = Linux-clang ]; then
+  CPP11=1
+fi
+
 if [ $CPP11 = 1 ]; then
   echo "c++11 is enabled"
 fi
 
 # Mac OS platform with gcc4
-if [[ $ARCH == Darwin* ]]; then
+if [[ $ARCH == Darwin-gcc4 ]]; then
+  FLIBS="-lgfortran"
+  SOFLAGS="-install_name"
+fi
+
+# Mac OS platform with gcc5
+if [[ $ARCH == Darwin-gcc5 ]]; then
   tt=`gfortran -print-search-dirs|grep libraries|cut -d'=' -f2|sed  's/:/ /g'`
   LIBGFORTRANLOCATION=''
   for i in $tt
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
--- EvtGenBase/EvtVector4R.hh	2017-12-13 17:02:53.000000000 +0100
+++ EvtGenBase/EvtVector4R.hh.orig	2020-03-28 08:13:13.502980641 +0100
@@ -44,7 +44,6 @@
   inline void set(double e,double px,double py ,double pz);
   inline EvtVector4R& operator*=(double c);
   inline EvtVector4R& operator/=(double c);
-  inline EvtVector4R& operator=(const EvtVector4R& v2);
   inline EvtVector4R& operator+=(const EvtVector4R& v2);
   inline EvtVector4R& operator-=(const EvtVector4R& v2);
   inline double get(int i) const;
@@ -82,15 +81,6 @@
 EvtVector4R boostTo(const EvtVector4R& rs,
 		     const EvtVector3R& boost, bool inverse = false);
 
-inline EvtVector4R& EvtVector4R::operator=(const EvtVector4R& v2){
-
-  v[0]=v2.v[0];
-  v[1]=v2.v[1];
-  v[2]=v2.v[2];
-  v[3]=v2.v[3];
-  
-  return *this; 
-}
 
 inline EvtVector4R& EvtVector4R::operator+=(const EvtVector4R& v2){
 
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
--- src/EvtGenExternal/EvtPythiaEngine.cpp.orig	2017-12-13 16:02:55.000000000 +0100
+++ src/EvtGenExternal/EvtPythiaEngine.cpp	2021-04-22 14:57:51.574914300 +0200
@@ -35,6 +35,12 @@
 #include <iostream>
 #include <sstream>
 
+#if PYTHIA_VERSION_INTEGER < 8304
+typedef Pythia8::ParticleDataEntry* ParticleDataEntryPtr;
+#else
+typedef Pythia8::ParticleDataEntryPtr ParticleDataEntryPtr;
+#endif
+
 using std::endl;
 
 EvtPythiaEngine::EvtPythiaEngine(std::string xmlDir, bool convertPhysCodes,
@@ -442,9 +448,9 @@
     double mmax = EvtPDL::getMaxMass(particleId);
 
     // Particle data pointers
-    Pythia8::ParticleDataEntry * entry_generic =
+    ParticleDataEntryPtr entry_generic =
       _genericPartData.particleDataEntryPtr(PDGCode);
-    Pythia8::ParticleDataEntry * entry_alias =
+    ParticleDataEntryPtr entry_alias =
       _aliasPartData.particleDataEntryPtr(PDGCode);
 
     if (entry_generic != 0) {