(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
Shell Roff Python HTML Makefile Emacs Lisp Mask
Latest commit 916b876 Feb 16, 2017 @kiwifb kiwifb sci-mathematics/giac: bump with pari thread patch included upstream.
Package-Manager: portage-2.3.3
Failed to load latest commit information.
Tools Remove python ebuild updating tool Jun 13, 2012
app-emacs/sage_mode app-emacs/sage_mode: update metadata Jan 31, 2016
app-vim/vim-gap vim-gap: revbump to 2011.06.27-r1 to workaround conflicting mappings (#… May 5, 2016
dev-gap dev-gap/GUAVA: Fix issue #447, make a patch instead of sed, fix paral… Dec 18, 2016
dev-lang/python bump Dec 5, 2016
dev-libs/ntl dev-libs/ntl: removing old Jan 21, 2017
dev-lisp/ecls dev-lisp/ecls: import of main tree to include getcwd fix. Jun 19, 2016
dev-python dev-python/cython: remove retired keywords Jan 31, 2017
dev-tex dev-tex/sage-latex: add "die"s and port the changes to sage-latex-3.0 Mar 3, 2016
licenses Added newer version of givaro and fixed its license Nov 22, 2009
media-gfx/tachyon media-gfx/tachyon: update metadata Jan 31, 2016
metadata Make the science overlay a master of the sage-on-gentoo overlay. This… Sep 25, 2015
package.keywords keyword and useflag for latest snapshot Feb 6, 2017
package.unmask Remove useless file Nov 19, 2014
package.use keyword and useflag for latest snapshot Feb 6, 2017
profiles adjusting mask for thread enabled pari. Feb 14, 2017
sci-chemistry sci-chemistry/jspecview: updating metadata Jan 31, 2016
sci-libs sci-libs/pynac: new bump for sage 7.6 Feb 16, 2017
sci-mathematics sci-mathematics/giac: bump with pari thread patch included upstream. Feb 16, 2017
www-misc/thebe www-misc/thebe: initial commit Jan 24, 2017
README.rst missing word Mar 8, 2016



Sage-on-Gentoo provides split ebuilds (http://www.gentoo.org) for the computer algebra system SAGE (http://www.sagemath.org).


If you have problems with sage-on-gentoo or have suggestions talk to us on #gentoo-science on freenode


or write a mail to the "gentoo-science" mailing list


An archive listing past mails may be found at



  1. INSTALL AND CONFIGURE LAYMAN: The preferred way of getting sage-on-gentoo is layman. Make sure layman is installed with USE=git and correctly configured. You may find a guide for layman at:


  2. ADD OUR OVERLAY: Update your layman list:

    layman -L

    This overlay now depends on the science overlay. So you will need to add it as well if it is not already installed:

    layman -a science

    Finally add this overlay:

    layman -a sage-on-gentoo


Steps 3 and 4 may not be fully or at all necessary on your system. You might want to try skipping to step 5 first, and if it doesn't work, coming back and doing steps 3 and 4.

  1. UNMASK EBUILDS: Before being able to install you may need to unmask the required ebuilds. If you are using Gentoo/unstable or Funtoo (i.e. you have a line like ACCEPT_KEYWORDS=~arch in your /etc/portage/make.conf) you can at least skip the keywords entries, but the unmask entries may still be relevant. You can make use of the following files, which already contain all required entries:

    sage-on-gentoo/package.keywords/sage.prefix (for prefix users only)

    To use these files permanently, place symbolic links to those files into your /etc/portage/package.unmask and /etc/portage/package.keywords/ directories, respectively:

    ln -s <path-to-layman>/sage-on-gentoo/package.unmask/sage \
    ln -s <path-to-layman>/sage-on-gentoo/package.keywords/sage \

    Otherwise, simply copy them into the respective directories for a one-time fix.

    The sage.prefix files contains keywords for ebuilds lacking any prefix keywords.

  2. ADD USE-FLAGS FOR EBUILDS: Since Sage's ebuild requires its dependencies to be built with several USE- flags we provide a standard package.use file as well:

    ln -s <path-to-layman>/sage-on-gentoo/package.use/sage \

    If you are using unstable or Funtoo you may also need the following file:

    ln -s <path-to-layman>/sage-on-gentoo/package.use/sage-unstable \

    <path-to-layman> is usually /var/lib/layman (this path used to be /usr/local/portage/layman for older version of layman).

    Note: For sage 6.8 we also provide a file 99sage-doc-bin that makes it easy to use pre-built html documentation. This is recomended for ~arch users.

  3. INSTALL SAGE: Type:

    emerge -va sage

    to install sage; please note that this will pull in a lot of dependencies. If you can not proceed with this step (because of circular dependencies, missing USE-flags, and so on) please report this behavior.

  4. UPDATE YOUR LOCAL OVERLAY: To update your local copy of sage-on-gentoo simply type:

    layman -S

    Do not forget to update the main portage tree as well:

    emerge --sync

    After that you may run:

    emerge -vuDNa world

    or a similar command to check for updates.


A Prefix enables you to install Gentoo on different OS (e.g Linux, FreeBSD, MacOS, Solaris and even Windows). Thus, you may be able to run Sage on Gentoo e.g. on a Debian Linux. For a complete introduction into Gentoo Prefix and how to set it up visit


After having a working Prefix you may setup sage-on-gentoo in a Prefix by following the quick installation guide.

Currently, we support every Linux running with x86 or amd64 instruction sets, in particular the following architectures:

  • ~amd64-linux
  • ~x86-linux