Created
January 18, 2019 12:33
-
-
Save kmarius/26eb7654c8e40767550f84491d0e2de5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contributor: Connor Behan <connor.behan@gmail.com> | |
# Contributor: Rémy Oudompheng <remy@archlinux.org> | |
pkgname=macaulay2-git | |
pkgver=16445.ed52a44c9 | |
pkgrel=6 | |
pkgdesc='Software system for algebraic geometry and commutative algebra' | |
arch=('x86_64') | |
url='http://www.math.uiuc.edu/Macaulay2/' | |
license=('GPL') | |
# depends=(flint 'gcc-fortran' 'gdbm' 'gmp' 'readline' 'lapack' 'scscp' 'gc' | |
# 'singular-factory' 'frobby' 'glpk' 'cddlib' 'gfan' 'gtest' 'yasm' | |
# 'cblas') | |
depends=('boost' 'cddlib' 'flex' 'gc' 'gcc' 'gcc-fortran' | |
'gdbm' 'gfan' 'givaro' 'glpk' 'gmp' 'gtest' 'lapack' 'make' 'mpfr' | |
'nauty' 'ntl' 'readline' 'time' 'yasm' 'gtest' 'wget') | |
# 'flint' | |
makedepends=('git' 'unzip' 'emacs' 'autoconf' 'automake' 'bison' 'pkg-config' 'texinfo') | |
optdepends=('emacs') | |
source=("git+https://github.com/Macaulay2/M2") | |
md5sums=('SKIP') | |
OPTIONS=(!STRIP) | |
pkgver() { | |
cd "${srcdir}"/M2 | |
echo `git rev-list --count master`.`git rev-parse --short master` | |
} | |
build() { | |
cd "${srcdir}"/M2/M2 | |
# Things that are always built include mpir, mpfr and flint | |
# Not included is factory (compiled against a different enough flint) | |
# We need to either stop using shared factory or start using shared flint | |
# Choose shared flint because only mpir and mpfr have good reasons listed | |
# sed -i -e '/BUILD_ALWAYS="flint/d' configure.ac | |
# sed -i -e 's/then BUILD_flint=yes/then BUILD_flint=no/' configure.ac | |
# sed -i -e 's/IgnoreExampleErrors ?= false/IgnoreExampleErrors ?= true/' Macaulay2/packages/Makefile.in | |
# Some provided examples will make M2 crash if the -q option is used. | |
# Removing -q works, but it might require ~/.Macaulay2/init.m2 to be present. | |
sed -i -e 's/" -q"/""/' Macaulay2/m2/html.m2 | |
sed -i -e 's/ -q//' Macaulay2/packages/Macaulay2Doc/test/Makefile.test.in | |
# Make it find factory | |
# export CPPFLAGS+=" -I/usr/include/singular" | |
# export CPPFLAGS+=" -I/usr/include/flint" | |
# autoreconf | |
# export PARALLEL=yes | |
make | |
# ./configure --enable-download --prefix=/usr | |
./configure --enable-download --prefix=/usr \ | |
--libexecdir='${prefix}'/lib/Macaulay2 \ | |
--enable-shared | |
# ./configure LIBS="-lcblas" --prefix=/usr \ | |
# --libexecdir='${prefix}'/lib/Macaulay2 \ | |
# --enable-shared --enable-download \ | |
# --enable-frobby --enable-pari --disable-gfan | |
make -j1 | |
} | |
package() { | |
cd "${srcdir}"/M2/M2 | |
make DESTDIR="${pkgdir}" install | |
mv "${pkgdir}"/usr/share/info info-mac | |
install -dm755 "${pkgdir}"/usr/share/info | |
mv info-mac "${pkgdir}"/usr/share/info/Macaulay2 | |
find "${pkgdir}" -mindepth 1 -path "${pkgdir}/usr" -prune -o -print0 | xargs -0 rm -rf | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment