diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 29 |
1 files changed, 18 insertions, 11 deletions
@@ -1,28 +1,28 @@ # Maintainer: Frank Siegert <frank.siegert@googlemail.com> pkgname=rivet-hg -pkgver=r4803.18d522e5cb21 +pkgver=r6396.6af72c1a196d pkgrel=1 pkgdesc="A particle physics package for data analysis and validation of Monte Carlo event generators -- latest build from hg-repo" arch=('x86_64' 'i686') url="http://rivet.hepforge.org" -license=('GPL2') +license=('GPL3') conflicts=('rivet') provides=('rivet') -depends=('python2' 'yoda-hg' 'fastjet' 'gsl' 'hepmc') -makedepends=('cython2' 'boost' 'mercurial' 'autoconf' 'libtool' 'automake') +depends=('python' 'yoda>=1.7.1' 'fastjet' 'gsl' 'hepmc') +optdepends=('texlive-core: Plotting functionality' + 'ghostscript: PDF plot output' + 'imagemagick: PNG plot output' + 'python2: For Python2 module in addition to Python3') +makedepends=('cython') source=('hg+https://rivet.hepforge.org/hg/rivet') md5sums=('SKIP') -prepare() { - cd "$srcdir/rivet" - sed -e 's/\/usr\/bin\/env python$/\/usr\/bin\/env python2/g' -i bin/* doc/* pyext/setup.py.in pyext/rivet/spiresbib.py - sed -e 's/cython /cython2 /g' -i pyext/rivet/Makefile.am -} - build() { cd "$srcdir/rivet" - export PYTHON=/usr/bin/python2 autoreconf -i + ## need to rebuild Python extension code with up-to-date Cython for Python 3.7 + ## will eventually be fixed upstream + touch pyext/rivet/*.pyx ./configure --prefix=/usr make } @@ -30,6 +30,13 @@ build() { package() { cd "$srcdir/rivet" make DESTDIR="$pkgdir/" install + + # If python2 is present, also build a library for it + if [ -x /usr/bin/python2 ]; then + PYTHON=/usr/bin/python2 ./configure --prefix=/usr + make DESTDIR="$pkgdir/" install + fi + mkdir -p $pkgdir/etc/bash_completion.d mv $pkgdir/usr/share/Rivet/rivet-completion $pkgdir/etc/bash_completion.d } |