1 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
2 # Contributor: Frank Siegert <frank dot siegert at googlemail dot com>
3 # Contributor: JP-Ellis <josh at jpellis dot me>
7 pkgdesc="A particle physics tool for evaluating PDFs from discretised data files"
9 url="https://lhapdf.hepforge.org/"
11 makedepends=('cython')
12 depends=('python-numpy')
13 install=lhapdf.install
14 source=("https://www.hepforge.org/archive/lhapdf/LHAPDF-${pkgver}.tar.gz"
15 'fix_installed_pdf_permissions.patch')
16 b2sums=('2dd1b5b94523c0cadac2b63d3dcbc73c5d621463ec9a0e6736b40cb24f6f4da744cf74484b6a5cfb1cfc10054171858dfb3968b22da565747d9b0d00cb3f545c'
17 'c875018d666331588051adc394b24c40321d78573ec33ef9312ea8779eeb6cf15ea845a5267d4dc6530cc82050e782affc908b9a6727aa3125b9f0086f1917a2')
20 cd "${srcdir}/LHAPDF-${pkgver}"
22 # add in correct flags
23 sed '/linkargs =/a linkargs += " '"${LDFLAGS} ${LTOFLAGS}"' "' -i wrappers/python/build.py.in
24 # installed PDFs must respect system permissions and ownership structure
25 patch -Np1 -i "${srcdir}/fix_installed_pdf_permissions.patch"
29 cd "${srcdir}/LHAPDF-${pkgver}"
30 export CXXFLAGS="$CFLAGS" # do not define _GLIBCXX_ASSERTIONS
35 --localstatedir=/var \
37 --datarootdir=/usr/share/${pkgname} \
38 --datadir=/usr/share/${pkgname} \
39 --docdir=/usr/share/doc/${pkgname} \
40 --pdfdir=/usr/share/${pkgname}/LHAPDF \
41 --localedir=/usr/share/locale
42 # for some reason Python build fails otherwise
48 cd "${srcdir}/LHAPDF-${pkgver}"
53 cd "${srcdir}/LHAPDF-${pkgver}"
54 make DESTDIR="${pkgdir}/" install