Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
branch: master

Introducing linguas for sage-doc-9999-r1. Note that empty linguas wil…

…l result in all available languages being built.

Package-Manager: portage-2.2.14
latest commit f74c297c4c
François Bissey kiwifb authored
Failed to load latest commit information.
Tools Remove python ebuild updating tool
app-emacs/sage_mode minor change to sitefile
dev-libs/ntl Potentially for sage 6.4. Submitted to the main tree in https://bugs.…
dev-lisp/ecls migrate to cpu_flags_x86 - issue #333
dev-python remove duplicates with main tree
dev-tex migrated what can be to sageupstream repo, made sure old version can …
licenses Added newer version of givaro and fixed its license
media-gfx/tachyon Update Manifest files
metadata added new attribute to layout.conf. Required by newer portage.
package.keywords add cython 0.21.2 to keywords for 6.4 and 6.5.
package.unmask Remove useless file
package.use correct syntax + few minor adjustments in package.use/sage
profiles masking git snapshot of pari.
sci-libs bump libgap for 6.6.beta1 - should be compatible with 4.7.5
sci-mathematics Introducing linguas for sage-doc-9999-r1. Note that empty linguas wil…
README.rst Add a line about matplotlib and qt4 in README.rst, a bit overkill.



Sage-on-Gentoo provides split ebuilds ( for the computer algebra system SAGE (


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 and add this overlay with:

    layman -L
    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:


    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.

  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: As of 2014-11-30 we have put -qt4 for matplotlib 1.3.x. This is to avoid bug#530492. Building Matplotlib 1.3.x against qt4 is broken and unlikely to get fixed.

  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.

    NOTE also, that we do _not_ recommend to use the ATLAS (sci-libs/blas-alas and/or sci-libs/lapack-atlas) blas/lapack implementation since we experienced some failures with it:

    However, this should not pose a problem since the default choice is the reference implementation.

  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
Something went wrong with that request. Please try again.