aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD18
-rw-r--r--compile.patch26
-rw-r--r--pythia.patch62
4 files changed, 73 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2cb9e99a1cf5..17ca6b170591 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -8,14 +8,16 @@ pkgbase = madgraph-pythia8-interface
license = MIT
depends = hepmc
depends = madgraph
- depends = pythia
- depends = python2
+ depends = pythia8
+ depends = python
source = http://madgraph.phys.ucl.ac.be/Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.0.tar.gz
source = python2.patch
+ source = compile.patch
source = pythia.patch
- sha256sums = dd1a96f598176c3eb5f91bc189eaac1405afebf23f7fcfd055135d788dc69e3d
+ sha256sums = 2786430b787d0138db7d9c942da32eb8861d4a6b3bff37ae5a65a0ff7c79708b
sha256sums = 632adc73e951df4341709adeafd3a7c72da1752f8af61037eae2b87a08ca9a64
- sha256sums = e506dad2224ed639a83537b21eadeda0ee244e9b5d5ee2770e536564f1e41491
+ sha256sums = bcdad7590a16c89cc8deede534ba6ee98690e9adc67100ea88d22cd8eac18958
+ sha256sums = aba91f30a37d67294a2b948870b2308f4dd2dbbba0cfa53f743b5d84e05cafbc
pkgname = madgraph-pythia8-interface
diff --git a/PKGBUILD b/PKGBUILD
index 17d33f0be25e..05d3fdb705dd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: JP-Ellis <josh@jpellis.me>
+# Maintainer: ReneganRonin <renegan.ronin@gmail.com>
pkgname=madgraph-pythia8-interface
pkgver=1.0
@@ -11,23 +11,29 @@ depends=(
'hepmc'
'madgraph'
'pythia8'
- 'python2'
+ 'python'
)
source=(
"http://madgraph.phys.ucl.ac.be/Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V${pkgver}.tar.gz"
"python2.patch"
+ "compile.patch"
"pythia.patch"
)
-sha256sums=('dd1a96f598176c3eb5f91bc189eaac1405afebf23f7fcfd055135d788dc69e3d'
+sha256sums=('2786430b787d0138db7d9c942da32eb8861d4a6b3bff37ae5a65a0ff7c79708b'
'632adc73e951df4341709adeafd3a7c72da1752f8af61037eae2b87a08ca9a64'
- 'e506dad2224ed639a83537b21eadeda0ee244e9b5d5ee2770e536564f1e41491')
+ 'bcdad7590a16c89cc8deede534ba6ee98690e9adc67100ea88d22cd8eac18958'
+ 'aba91f30a37d67294a2b948870b2308f4dd2dbbba0cfa53f743b5d84e05cafbc')
prepare() {
- msg2 "Fixing python references for python2"
- patch -p 1 < python2.patch
+ #msg2 "Fixing python references for python2"
+ #patch -p 1 < python2.patch
+
+ msg2 "Fixing compile.py"
+ patch -p 1 < compile.patch
msg2 "Fixing Pythia location"
patch -p 1 < pythia.patch
+
}
build() {
diff --git a/compile.patch b/compile.patch
new file mode 100644
index 000000000000..f9e96bdee528
--- /dev/null
+++ b/compile.patch
@@ -0,0 +1,26 @@
+--- a/compile.py 2021-04-07 07:31:51.000000000 +0800
++++ b/compile.py 2021-04-08 13:02:51.590097363 +0800
+@@ -103,17 +103,17 @@
+
+ # Now proceed with the installation
+
+-if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc')):
++if not os.path.exists(pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc')):
+ print( "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\
+- pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc'))
++ pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc'))
+ sys.exit(error_exit_code)
+-shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc'),
++shutil.copy(pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc'),
+ pjoin(local_path,'Makefile.inc'))
+-if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','examples','Makefile')):
++if not os.path.exists(pjoin(pythia8_path,'share','pythia8','examples','Makefile')):
+ print( "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\
+- pjoin(pythia8_path,'share','Pythia8','examples','Makefile'))
++ pjoin(pythia8_path,'share','pythia8','examples','Makefile'))
+ sys.exit(error_exit_code)
+-shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile'),
++shutil.copy(pjoin(pythia8_path,'share','pythia8','examples','Makefile'),
+ pjoin(local_path,'Makefile'))
+
+ if _use_original_PY8_makefile:
diff --git a/pythia.patch b/pythia.patch
index 7604319a7ce6..acc9f710cdbe 100644
--- a/pythia.patch
+++ b/pythia.patch
@@ -1,14 +1,37 @@
---- a/get_pythia8_version.py
-+++ b/get_pythia8_version.py
-@@ -29,14 +29,14 @@
+--- a/get_pythia8_version.py 2021-04-07 07:31:51.000000000 +0800
++++ b/get_pythia8_version.py 2021-04-08 12:32:12.100076666 +0800
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python
+
+ import sys
+ import os
+@@ -6,7 +6,7 @@
+ import subprocess
+ pjoin = os.path.join
+
+-local_path = os.path.abspath(os.path.dirname(os.path.realpath( __file__ )))
++local_path = '/usr'
+
+ error_exit_code = 9
+
+@@ -22,21 +22,21 @@
+ print( help_msg)
+ sys.exit(error_exit_code)
+
+-pythia8_path = os.path.abspath(os.path.realpath(sys.argv[1]))
++pythia8_path = '/usr'
+
+ # The technique above didn't work, so we will try to obtain the version from the xml doc instead
+
version = None
def get_version_from_xml():
- if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','xmldoc','Version.xml')):
+ if not os.path.exists(pjoin(pythia8_path,'share','pythia8','xmldoc','Version.xml')):
- print "Error in 'get_pythia8_version.py': could not get Pyhtia8 file \n '%s'\n storing the version number"% \
-- pjoin(local_path,'share','Pythia8','xmldoc','Version.xml')
-+ pjoin(local_path,'share','pythia8','xmldoc','Version.xml')
+ print( "Error in 'get_pythia8_version.py': could not get Pyhtia8 file \n '%s'\n storing the version number"% \
+- pjoin(local_path,'share','Pythia8','xmldoc','Version.xml'))
++ pjoin(local_path,'share','pythia8','xmldoc','Version.xml'))
return None
versionfinder = re.compile('^\s*\<parmfix\s*name\=\"Pythia:versionNumber\"\s*default=\"(?P<version>[\d\.]+)\"\>')
@@ -18,30 +41,3 @@
match = versionfinder.match(line)
if match:
version = match.group('version')
-
---- a/compile.py
-+++ b/compile.py
-@@ -103,17 +103,17 @@
-
- # Now proceed with the installation
-
--if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc')):
-+if not os.path.exists(pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc')):
- print "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\
-- pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc')
-+ pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc')
- sys.exit(error_exit_code)
--shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc'),
-+shutil.copy(pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc'),
- pjoin(local_path,'Makefile.inc'))
--if not os.path.exists(pjoin(pythia8_path,'share','Pythia8','examples','Makefile')):
-+if not os.path.exists(pjoin(pythia8_path,'share','pythia8','examples','Makefile')):
- print "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\
-- pjoin(pythia8_path,'share','Pythia8','examples','Makefile')
-+ pjoin(pythia8_path,'share','pythia8','examples','Makefile')
- sys.exit(error_exit_code)
--shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile'),
-+shutil.copy(pjoin(pythia8_path,'share','pythia8','examples','Makefile'),
- pjoin(local_path,'Makefile'))
-
- if _use_original_PY8_makefile: