Guest User

pkgbuild for macaulay2

a guest
Oct 21st, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. # Contributor: Connor Behan <connor.behan@gmail.com>
  2. # Contributor: Rémy Oudompheng <remy@archlinux.org>
  3.  
  4. pkgname=macaulay2
  5. pkgver=19030.995c6fd8c
  6. pkgrel=1
  7. pkgdesc="Software system for algebraic geometry and commutative algebra"
  8. arch=('i686' 'x86_64')
  9. url="http://www.math.uiuc.edu/Macaulay2/"
  10. license=('GPL')
  11. depends=('gcc-fortran' 'readline' 'gdbm' 'gc' 'mpir' 'mpfr' 'mpsolve-git' 'boost' 'lapack' 'cblas' 'eigen' 'ntl' 'scscp' 'singular-factory' 'frobby' 'flint' 'cddlib' 'glpk' 'gfan' 'gtest')
  12. makedepends=('git' 'unzip' 'emacs' 'texinfo')
  13. source=('git+https://github.com/Macaulay2/M2')
  14.  
  15. pkgver() {
  16. cd "${srcdir}"/M2
  17. echo `git rev-list --count master`.`git rev-parse --short master`
  18. }
  19.  
  20. build() {
  21. cd "$srcdir"/M2/M2
  22.  
  23. # Some provided examples will make M2 crash if the -q option is used.
  24. # Removing -q works, but it might require ~/.Macaulay2/init.m2 to be present.
  25. sed -i -e 's|GTEST_PATH="\$(BUILTLIBPATH)/include/gtest"|GTEST_PATH="/usr/src/googletest"|g' configure.ac
  26. sed -i -e 's/IgnoreExampleErrors ?= false/IgnoreExampleErrors ?= true/' Macaulay2/packages/Makefile.in
  27. sed -i -e 's/ -q//' Macaulay2/packages/Makefile.in
  28.  
  29. #M2 recommends to run make first, which runs autoconf and autoheader.
  30. make
  31. #autoreconf
  32. #now run configure and then make again
  33. ./configure "LIBS=-lcblas" --prefix=/usr \
  34. --libexecdir='${prefix}'/lib/Macaulay2 \
  35. --enable-shared --enable-download \
  36. --enable-frobby --enable-pari --disable-gfan
  37. make -j1
  38. }
  39.  
  40. package() {
  41. cd "$srcdir"/M2/M2
  42. mkdir "$pkgdir"/usr
  43.  
  44. # If we used DESTDIR instead, the submodules would create /var/abs/local/ within /var/abs/local/
  45. # We would also not get the utilities in /usr/lib/Macaulay2/Macaulay2/bin/
  46. make install prefix="$pkgdir"/usr
  47.  
  48. cd "$pkgdir"/usr/share
  49. mv info info-mac
  50. mkdir info
  51. mv info-mac info/Macaulay2
  52. }
  53. md5sums=('SKIP')
  54.  
Add Comment
Please, Sign In to add comment