SHARE
TWEET

Untitled

a guest Jan 19th, 2020 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
  2.  
  3. _pkgname=libint
  4. pkgname=libint2
  5. pkgver=2.6.0
  6. pkgrel=2
  7. pkgdesc='A high-performance library for computing Gaussian integrals in quantum mechanics'
  8. url='https://github.com/evaleev/libint'
  9. license=('GPL')
  10. arch=('x86_64')
  11. depends=('boost')
  12. makedepends=('python' 'gcc-fortran' 'cmake')
  13. source=("$url/archive/v${pkgver}.tar.gz"
  14.         "0001-Update-build_libint.cc.patch")
  15. sha256sums=('4ae47e8f0b5632c3d2a956469a7920896708e9f0e396ec10071b8181e4c8d9fa'
  16.             '38936bee009a72f5116be12e57be3a76018db600f29ac18627108afab6a0ec63')
  17. options=(staticlibs)
  18.  
  19. prepare() {
  20.     cd ${srcdir}/${_pkgname}-${pkgver}
  21.     patch -p1 < ../0001-Update-build_libint.cc.patch
  22.     ./autogen.sh
  23.     mkdir $srcdir/build
  24.    
  25.     # Detecting FMA support
  26.     if [ $( gcc -march=native -dM -E - < /dev/null | egrep "FMA__" | tail -c 2 ) \
  27.         == 1 ]
  28.     then
  29.         FMA=yes
  30.         CXXFLAGS="$CXXFLAGS -mfma"
  31.         echo "Support of FMA intrinsics is enabled"
  32.     else
  33.         FMA=no
  34.         echo "Support of FMA intrinsics is disabled"
  35.     fi
  36.    
  37.     # Setting build environment
  38.     export CC=gcc
  39.     export CXX=g++
  40.     export FC=gfortran
  41.     export CXXGENFLAGS="$CXXFLAGS"
  42. }
  43.  
  44. build() {
  45.     cd ${srcdir}/build
  46.    
  47.     # Generating code with desirable features such as fortran interface
  48.     ../$_pkgname-$pkgver/configure \
  49.                 --enable-eri=1 \
  50.                 --enable-eri2=1 \
  51.                 --enable-eri3=1 \
  52.                 --enable-fma=$FMA \
  53.                 --with-max-am=5 \
  54.                 --with-eri-max-am=5,4 \
  55.                 --with-eri2-max-am=7,6 \
  56.                 --with-eri3-max-am=7,6 \
  57.                 --with-opt-am=3
  58.     make export
  59.    
  60.     # Actual compilation of LIBINT
  61.     tar xzf $_pkgname-$pkgver.tgz
  62.     cd $_pkgname-$pkgver
  63.     ./configure \
  64.                 --prefix=/usr \
  65.                 --libdir=/usr/lib \
  66.                 --enable-fortran \
  67.                 --with-cxx=g++ \
  68.                 --with-cxx-optflags="$CXXFLAGS"
  69.     make
  70. }
  71.  
  72. check() {
  73.     cd $srcdir/build/$_pkgname-$pkgver
  74.     make check
  75. }
  76.  
  77. package() {
  78.     cd $srcdir/build/$_pkgname-$pkgver
  79.     make DESTDIR=$pkgdir install
  80. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top