The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "SageMath"
(alternative instructions for science and sage-on-gentoo without needing layman) |
m |
||
Line 4: | Line 4: | ||
== Installation == | == Installation == | ||
SageMath ebuilds are not present in the Funtoo portage tree. Instead these are available through separate overlays (repositories). To install SageMath on Funtoo Linux the overlay '''sage-on-gentoo''' is required, together with dependencies found in the overlay '''science'''. Gentoo users will be familiar with the science overlay from Gentoo's Science Project (https://wiki.gentoo.org/wiki/Project:Science). | SageMath ebuilds are not present in the Funtoo portage tree. Instead these are available through separate overlays (repositories). To install SageMath on Funtoo Linux the overlay '''sage-on-gentoo''' is required, together with dependencies found in the overlay '''science'''. | ||
Gentoo users will be familiar with the science overlay from Gentoo's Science Project (https://wiki.gentoo.org/wiki/Project:Science). | |||
=== Install Required Overlays === | === Install Required Overlays === | ||
Line 64: | Line 66: | ||
auto-sync = Yes | auto-sync = Yes | ||
}} | }} | ||
{{important|The sage-on-gentoo repository has the repo_name 'sage-on-gentoo'. Setting the name in this .conf file to something else (e.g. "[sagemath]") will cause portage to complain.}} | |||
If these previous steps are successful, portage will be able to access and update ebuilds within these two repositories. Initiate these repositories by simply running | If these previous steps are successful, portage will be able to access and update ebuilds within these two repositories. Initiate these repositories by simply running |
Revision as of 05:52, March 21, 2017
SageMath is mathematical software with features covering many aspects of mathematics, including algebra, combinatorics, numerical mathematics, number theory, and calculus.
Installation
SageMath ebuilds are not present in the Funtoo portage tree. Instead these are available through separate overlays (repositories). To install SageMath on Funtoo Linux the overlay sage-on-gentoo is required, together with dependencies found in the overlay science.
Gentoo users will be familiar with the science overlay from Gentoo's Science Project (https://wiki.gentoo.org/wiki/Project:Science).
Install Required Overlays
Using layman
The easiest (fastest) method of installing the required overlays is via the package layman (app-portage/layman). Make sure layman is installed with USE=git and correctly configured. You may find a guide for layman at: http://www.gentoo.org/proj/en/overlays/userguide.xml
Update your layman list:
root # layman -L
Add the two overlays to Funtoo. Firstly is the science overlay (if not already installed):
root # layman -a science
Finally, add the SageMath overlay:
root # layman -a sage-on-gentoo
(Alternative) Using Portage Repositories
Users may add the science and sage-on-gentoo overlays as repositories in portage without the need for layman. Both overlays are available via https://github.com and portage is able to sync with them.
If not already present, first create a location for portage to store a local clone of the overlays.
root # mkdir /path/to/local-repos
Before configuring portage we will manually clone the two repositories into this local folder using dev-vcs/git. Starting with science for SageMath dependencies
root # cd /path/to/local-repos root # git clone https://github.com/gentoo-science/sci.git science
and then sage-on-gentoo for the actual SageMath ebuilds
root # git clone https://github.com/cschwan/sage-on-gentoo.git
The final step is to configure portage to be able to use these additional repositories. This is achieved by adding appropriate configuration settings to files saved within /etc/portage/repos.conf/
. (More information on repositories can be found by reading man portage
).
Using your favorite text editor, create and save the following file in /etc/portage/repos.conf/
for the science repository.
/etc/portage/repos.conf/science.conf
[science]
priority = 50
location = /path/to/local-repos/science
sync-type = git
sync-uri = https://github.com/gentoo-science/sci.git
auto-sync = Yes
Now repeat the previous step for a second file in /etc/portage/repos.conf/
corresponding to the sage-on-gentoo repository.
/etc/portage/repos.conf/sage.conf
[sage-on-gentoo]
priority = 50
location = /path/to/local-repos/sage-on-gentoo
sync-type = git
sync-uri = https://github.com/cschwan/sage-on-gentoo.git
auto-sync = Yes
The sage-on-gentoo repository has the repo_name 'sage-on-gentoo'. Setting the name in this .conf file to something else (e.g. "[sagemath]") will cause portage to complain.
If these previous steps are successful, portage will be able to access and update ebuilds within these two repositories. Initiate these repositories by simply running
root # emerge --sync
Ebuilds unmask
Before being able to install you may need to unmask the required ebuilds. You can use already-made files, shipped with overlay, such as:
sage-on-gentoo/package.unmask/sage
To use this file permanently, place symbolic link to this file into your /etc/portage/package.unmask
directory as shown below.
Default directory for layman overlays, if not set manually, is /var/lib/layman
.
root # ln -s /var/lib/layman/sage-on-gentoo/package.unmask/sage /etc/portage/package.unmask/sage
Notice, that in this example, portage's package.unmask is directory , make sure to apply masks entries according to your preferred way of masks handle (directory or a flat file).
Use flags
Since Sage's ebuild requires its dependencies to be built with several USE- flags a standard package.use file is provided as well:
root # ln -s <path-to-layman>/sage-on-gentoo/package.use/sage /etc/portage/package.use/sage
On a stable build installations you may also need following file:
root # ln -s <path-to-layman>/sage-on-gentoo/package.use/sage-unstable /etc/portage/package.use/sage-unstable
With sage 6.8 a 99sage-doc-bin
file installed that makes it easy to use pre-built html documentation. This is recommended for ~arch users.
Installing Sage
root # emerge -va 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), report this behavior.