diff options
author | JP-Ellis | 2017-01-25 16:46:10 +1100 |
---|---|---|
committer | JP-Ellis | 2017-01-25 18:21:00 +1100 |
commit | 4a24b8f6fdf2b6ce7e9f6c5cb778a095ccfc6e90 (patch) | |
tree | d8696a12593761e1205f4470b7a1a7228294d408 | |
parent | 12df5259cd8d00b6e7fa1cfaae3d762ee2772bbe (diff) | |
download | aur-4a24b8f6fdf2b6ce7e9f6c5cb778a095ccfc6e90.tar.gz |
Update to MadGraph 2.5.2
Signed-off-by: JP-Ellis <josh@jpellis.me>
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 97 |
2 files changed, 71 insertions, 37 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu Sep 29 03:16:13 UTC 2016 +# Wed Jan 25 07:20:55 UTC 2017 pkgbase = madgraph pkgdesc = MadGraph5_aMC@NLO is a framework that aims at providing all the elements necessary for SM and BSM phenomenology - pkgver = 2.4.0 - pkgrel = 20160929 + pkgver = 2.5.2 + pkgrel = 1 url = http://madgraph.hep.uiuc.edu/ arch = i686 arch = x86_64 @@ -13,9 +13,10 @@ pkgbase = madgraph depends = perl depends = tcsh depends = gcc-fortran + depends = cmake options = !strip - source = http://madgraph.hep.uiuc.edu/Downloads/MG5_aMC_v2.4.0.tar.gz - sha256sums = 9571bcdefb4a15546db1d403f6d2818fc4d21033558ca2a7d376cc71d197aa66 + source = https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz + sha256sums = 7968f6d0543b3af2649ba497d17c3a23b089cc6f5ba352e0fd7fa106aa07a512 pkgname = madgraph @@ -1,28 +1,35 @@ # Maintainer: JP-Ellis <josh@jpellis.me> pkgname=madgraph -pkgver=2.4.0 +pkgver=2.5.2 _dirname="MG5_aMC_v${pkgver//./_}" -pkgrel=20160929 +pkgrel=1 pkgdesc="MadGraph5_aMC@NLO is a framework that aims at providing all the elements necessary for SM and BSM phenomenology" url="http://madgraph.hep.uiuc.edu/" arch=('i686' 'x86_64') license=('MIT') -depends=('python2' 'bash' 'perl' 'tcsh' 'gcc-fortran') -source=("http://madgraph.hep.uiuc.edu/Downloads/MG5_aMC_v${pkgver}.tar.gz") -sha256sums=('9571bcdefb4a15546db1d403f6d2818fc4d21033558ca2a7d376cc71d197aa66') +depends=( + 'python2' + 'bash' + 'perl' + 'tcsh' + 'gcc-fortran' + 'cmake' +) +source=("https://launchpad.net/mg5amcnlo/${pkgver%%.*}.0/${pkgver%.*}.x/+download/MG5_aMC_v${pkgver}.tar.gz") +sha256sums=('7968f6d0543b3af2649ba497d17c3a23b089cc6f5ba352e0fd7fa106aa07a512') options=("!strip") prepare() { # Some of the build steps below require this patch msg2 "Fixing python references for python2" - cd ${srcdir}/${_dirname} + cd "${srcdir}/${_dirname}" find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/env\s\+python\s*$|#!/usr/bin/env python2|' find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/python\s*$|#!/usr/bin/env python2|' msg2 "Building CutTools" - cd ${srcdir}/${_dirname}/vendor/CutTools - # CutTools' makefile does not allow parallel compilation, hence -j1 + cd "${srcdir}/${_dirname}/vendor/CutTools" + # Parallel building not supported by CutTools make -j1 make clean @@ -33,31 +40,41 @@ prepare() { # make clean msg2 "Building IREGI" - cd ${srcdir}/${_dirname}/vendor/IREGI/src + cd "${srcdir}/${_dirname}/vendor/IREGI/src" make make clean msg2 "Building SMWidth" - cd ${srcdir}/${_dirname}/vendor/SMWidth + cd "${srcdir}/${_dirname}/vendor/SMWidth" make make clean msg2 "Building StdHEP" - cd ${srcdir}/${_dirname}/vendor/StdHEP + cd "${srcdir}/${_dirname}/vendor/StdHEP" make make clean + msg2 "Building Collier" + cd "${srcdir}/${_dirname}/vendor" + tar xf collier.tar.gz + rm collier.tar.gz + cd COLLIER-1.0/build + cmake .. + make + rm -rf * + msg2 "Building Ninja" - cd ${srcdir}/${_dirname}/vendor/ + cd "${srcdir}/${_dirname}/vendor/" tar xf ninja.tar.gz rm ninja.tar.gz cd ninja-1.1.0 ./configure - make + # Parallel building can cause issues sporadically + make -j1 make clean msg2 "Building OneLoop" - cd ${srcdir}/${_dirname}/vendor/ + cd "${srcdir}/${_dirname}/vendor/" tar xf oneloop.tar.gz rm oneloop.tar.gz cd OneLOop-3.6 @@ -65,45 +82,61 @@ prepare() { ./clean.sh msg2 "Extracting documentation" - cd ${srcdir}/${_dirname} + cd "${srcdir}/${_dirname}" tar xf doc.tgz rm doc.tgz # This needs to be run again as there are new python files msg2 "Fixing python references for python2" - cd ${srcdir}/${_dirname} + cd "${srcdir}/${_dirname}" find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/env\s\+python\s*$|#!/usr/bin/env python2|' find . -type f -print0 | xargs -0 sed -i 's|^#!\s*\(/usr\)\?/bin/python\s*$|#!/usr/bin/env python2|' - msg2 "Removing CVS directories" - cd ${srcdir}/${_dirname} - find . -type d -name "CVS" | xargs rm -rf - find . -type f -name ".bzrignore" | xargs rm -f - find . -type f -name ".bzr" | xargs rm -rf + msg2 "Compiling python source files (there might be errors)" + python2 -O -m compileall -qf "${srcdir}/${_dirname}" || true + + + msg2 "Removing VCS directories" + cd "${srcdir}/${_dirname}" + find . -name "CVS" \ + -o -name ".svn" \ + -o -name ".bzr" -o -name ".bzrignore" \ + -o -name ".git" -o -name ".gitignore" \ + -o -name ".hg" -o -name ".hgignore" | xargs rm -rf } package() { - install -Dm755 "${srcdir}/${_dirname}/bin/mg5" "${pkgdir}/usr/bin/mg5" - install -Dm755 "${srcdir}/${_dirname}/bin/mg5_aMC" "${pkgdir}/usr/bin/mg5_aMC" - install -Dm755 "${srcdir}/${_dirname}/aloha/bin/aloha" "${pkgdir}/usr/bin/aloha" - install -Dm755 "${srcdir}/${_dirname}/MadSpin/madspin" "${pkgdir}/usr/bin/madspin" + msg2 "Initialize MG5 first run" + # MadGraph needs to generate `Template/LO/Source/make_opts` which is done + # automatically at startup. This needs to be done during setup (or with + # root access) + tmpfile=$(mktemp) + echo "exit" > $tmpfile + "${srcdir}/${_dirname}/bin/mg5_aMC" $tmpfile 1>/dev/null - # This should be converted to a proper patch file in the future msg2 "Patching root_path" - find ${pkgdir}/usr/bin -type f -print0 | xargs -0 sed -i 's|^\(\s*\)root_path\s*=.*$|\1root_path = "/usr/share/madgraph"|' - + # This should be converted to a proper patch file in the future + find "${srcdir}/${_dirname}/bin" -type f -print0 | xargs -0 sed -i 's|^\(\s*\)root_path\s*=.*$|\1root_path = "/usr/share/madgraph"|' - install -Dm655 "${srcdir}/${_dirname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + msg2 "Installing files" + # Copy everything of /usr/share/madgraph since the program isn't nicely + # separated into bin, include, etc. mkdir -p "${pkgdir}/usr/share/${pkgname}" cp -a "${srcdir}/${_dirname}/." "${pkgdir}/usr/share/${pkgname}" - rm -r "${pkgdir}/usr/share/${pkgname}/bin" - rm -r "${pkgdir}/usr/share/${pkgname}/aloha/bin" - rm "${pkgdir}/usr/share/${pkgname}/MadSpin/madspin" + install -Dm655 "${srcdir}/${_dirname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # Create symbolic links in /usr/bin to mg5 and mg5_aMC + mkdir -p "${pkgdir}/usr/bin" + ln -s "/usr/share/${pkgname}/bin/mg5" "${pkgdir}/usr/bin/" + ln -s "/usr/share/${pkgname}/bin/mg5_aMC" "${pkgdir}/usr/bin/" + # For some reason, a lot of files have executable flags. Change them back + # to non-executable (except for actual executables) find "${pkgdir}/usr/share/${pkgname}" -type f -print0 | xargs -0 chmod 644 find "${pkgdir}/usr/share/${pkgname}" -type f -path "*/bin/*" -print0 | xargs -0 chmod 755 + chmod 755 "${pkgdir}/usr/share/${pkgname}/MadSpin/madspin" echo "" echo "If you use MadGraph, please cite:" |