Skip to content

Commit

Permalink
sagemath: update to sage-9.5.beta6
Browse files Browse the repository at this point in the history
Also:
 - rename pkg from sage to sagemath
 - now it will build sage in-place at /usr/lib/sage-$version
 - the resulting pkg contains a lot of useless stuff that comes with the
   distribution; we'll have to clean up. E.g. SAGE_ROOT/upstream is
   definitely unnecessary (1.2G); possibly SAGE_ROOT/pkgs or at least
   SAGE_ROOT/pkgs/sagemath-standard/build (2.6G).
  • Loading branch information
tornaria committed Nov 13, 2021
1 parent de92a50 commit 5515c62
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
46 changes: 34 additions & 12 deletions srcpkgs/sage/template → srcpkgs/sagemath/template
Original file line number Diff line number Diff line change
@@ -1,41 +1,63 @@
# Template file for 'sage'
pkgname=sage
version=9.5.beta5
# Template file for 'sagemath'
pkgname=sagemath
version=9.5.beta6
revision=1
wrksrc=sage-$version
build_style=configure
configure_args=--prefix=/usr/lib/sage-${version}
configure_args="--enable-build-as-root"
make_check_target=ptest
# for now skip building docs
make_build_target=build
short_desc="Open source mathematics software"
maintainer="Gonzalo Tornaría <[email protected]>"
license="GPL-3.0-or-later"
homepage="http://sagemath.org/"
distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz"
checksum=3b78ee848450d6881902bf68f4f3af17e1647e72c51e5fcdcb412c938ecbce57
checksum=7bae8cbb4db73147bd698261497102524bfadeb71ca66b1c68e96827bd5a8975

# path where sage will be installed
SAGE_ROOT=/usr/lib/sage-${version}

case ${version} in
# url for devel is different
*.beta*|*.rc*)
distfiles=${distfiles/sage\/src/sage\/devel}
;;
*.beta*|*.rc*) distfiles=${distfiles/sage\/src/sage\/devel} ;;
esac

# first we try to build native; we'll worry about cross later
# besides, some dependencies are nocross
# for now, skip check in ci, since we still have a few tests failing
make_check=ci-skip

# for now, just build native; we'll worry about cross later
# besides, some dependencies are nocross (e.g. ntl)
nocross=yes

# for now, to make install faster
nostrip=yes

# don't shlib_provide anything
noshlibprovides=yes

# don't rewrite python shebang as sage uses its own python (for now)
no_python_shebang=yes

post_extract() {
# sage wants to be built in place so let $wrksrc be a symlink
mv -T $wrksrc $SAGE_ROOT
ln -sfT $SAGE_ROOT $wrksrc
}

do_clean() {
# undo post_extract()
rm $wrksrc
mv $SAGE_ROOT $wrksrc
}

do_install() {
vcopy /usr/lib/sage-${version} usr/lib/
vmkdir usr/bin
ln -s /usr/lib/sage-${version}/bin/sage ${DESTDIR}/usr/bin/
ln -s $SAGE_ROOT/sage ${DESTDIR}/usr/bin/
}

### copied from sage-deps, to keep in sync
### copied from sage-deps, to be kept in sync

# hard dependencies
makedepends+=" gcc make m4 perl binutils git tar libgomp-devel"
Expand Down
1 change: 1 addition & 0 deletions srcpkgs/sage/update → srcpkgs/sagemath/update
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pkgname=sage
# for now, check both stable and devel releases
site="http://mirrors.mit.edu/sage/src/
http://mirrors.mit.edu/sage/devel/"

0 comments on commit 5515c62

Please sign in to comment.