aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoc Virnyl S. Estela2021-04-08 13:45:55 +0800
committerSoc Virnyl S. Estela2021-04-08 13:45:55 +0800
commit0020e92e2c5a558b12a7248f7835a87a4b092822 (patch)
treec4e66bb61c3786a74927d319c5c9a5297af6fc6b
parentdc323b9d1f91f8ff39cb831d91fe0e6befef6842 (diff)
downloadaur-0020e92e2c5a558b12a7248f7835a87a4b092822.tar.gz
Update PKGBUILD
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD10
-rw-r--r--compile.patch45
-rw-r--r--pythia.patch47
4 files changed, 55 insertions, 53 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ef8cf0253951..e6daa320bbba 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -12,10 +12,12 @@ pkgbase = madgraph-pythia8-interface
depends = python2
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 = 7c4aecc1e933d24629ec2723ca3d65a3619e12a9e1f9f9bc6cda6e462f4de478
sha256sums = 632adc73e951df4341709adeafd3a7c72da1752f8af61037eae2b87a08ca9a64
- sha256sums = e506dad2224ed639a83537b21eadeda0ee244e9b5d5ee2770e536564f1e41491
+ sha256sums = a2342b3d981e1c8d737244e3ec68f11b1e8c4f18502bce5dc7afcc1335910452
+ sha256sums = aba91f30a37d67294a2b948870b2308f4dd2dbbba0cfa53f743b5d84e05cafbc
pkgname = madgraph-pythia8-interface
diff --git a/PKGBUILD b/PKGBUILD
index 7c932ea94ac0..f1c7f77cab21 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,19 +15,25 @@ depends=(
)
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=('7c4aecc1e933d24629ec2723ca3d65a3619e12a9e1f9f9bc6cda6e462f4de478'
- '03d4ee5104689c5ef4092bc07f834d6829b734e3d0ee1d613b1ad0048860534f'
- '5ff65a3a48b403410b135f18a7edb9e48b352fd531f33bc5cf6b09522217e0b2')
+ '632adc73e951df4341709adeafd3a7c72da1752f8af61037eae2b87a08ca9a64'
+ 'a2342b3d981e1c8d737244e3ec68f11b1e8c4f18502bce5dc7afcc1335910452'
+ 'aba91f30a37d67294a2b948870b2308f4dd2dbbba0cfa53f743b5d84e05cafbc')
prepare() {
+ #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
index a04af1133c72..f9e96bdee528 100644
--- a/compile.patch
+++ b/compile.patch
@@ -1,41 +1,26 @@
---- a/compile.py 2021-04-07 08:29:14.860019874 +0800
-+++ b/compile.py 2021-04-07 08:36:43.660024924 +0800
-@@ -1,4 +1,4 @@
--#!/usr/bin/python2
-+#!/usr/bin/env python
-
- import subprocess
- import sys
-@@ -103,19 +103,19 @@
+--- 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')):
-- print( "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\
++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'))
-- sys.exit(error_exit_code)
++ pjoin(pythia8_path,'share','pythia8','examples','Makefile.inc'))
+ sys.exit(error_exit_code)
-shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile.inc'),
-- pjoin(local_path,'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')):
-- print( "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\
++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'))
-- sys.exit(error_exit_code)
++ pjoin(pythia8_path,'share','pythia8','examples','Makefile'))
+ sys.exit(error_exit_code)
-shutil.copy(pjoin(pythia8_path,'share','Pythia8','examples','Makefile'),
-- pjoin(local_path,'Makefile'))
--
-+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')
-+ sys.exit(error_exit_code)
-+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')):
-+ print "Error in MG5aMC_PY8_interface installer. Could not find file:\n %s"%\
-+ pjoin(pythia8_path,'share','pythia8','examples','Makefile')
-+ sys.exit(error_exit_code)
+shutil.copy(pjoin(pythia8_path,'share','pythia8','examples','Makefile'),
-+ pjoin(local_path,'Makefile'))
-+
+ pjoin(local_path,'Makefile'))
+
if _use_original_PY8_makefile:
- shutil.move(pjoin(local_path,'MG5aMC_PY8_interface.cc'),pjoin(local_path,'main89.cc'))
- p = subprocess.Popen(['make','main89'], stdout=subprocess.PIPE,
diff --git a/pythia.patch b/pythia.patch
index b5fbe8de8e50..acc9f710cdbe 100644
--- a/pythia.patch
+++ b/pythia.patch
@@ -1,34 +1,43 @@
---- a/get_pythia8_version.py
-+++ b/get_pythia8_version.py
+--- 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/python2
+-#! /usr/bin/env python
+#!/usr/bin/env python
import sys
import os
-@@ -29,17 +29,17 @@
+@@ -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')):
-- 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'))
-- return None
+ 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')
-+ return None
+ 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\.]+)\"\>')
- for line in open(pjoin(pythia8_path,'share','Pythia8','xmldoc','Version.xml')):
-- match = versionfinder.match(line)
-- if match:
-- version = match.group('version')
+ for line in open(pjoin(pythia8_path,'share','pythia8','xmldoc','Version.xml')):
-+ match = versionfinder.match(line)
-+ if match:
-+ version = match.group('version')
- return version
- return None
-
+ match = versionfinder.match(line)
+ if match:
+ version = match.group('version')