Программный комплекс математических расчетов sage
Всем привет получилось собрать sage-3.2 под x86 работает
так как у меня достаточно слабая машина, по этому особого интереса пересобирать по сто раз нет, главное что получилось, по этому выкладываю ебилд и пару патчей к нему, кому интересно может попробовать повозится.
На моей машине этот ебилд и патчи рабочие.
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils flag-o-matic fortran
DESCRIPTION="Math software for algebra, geometry, number theory, cryptography, and numerical computation."
HOMEPAGE="http://www.sagemath.org"
SRC_URI="http://www.sagemath.org/src-old/${P}.tar"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~ppc"
IUSE=""
DEPEND=">=sys-devel/bison-2.3"
RDEPEND=">=virtual/jre-1.4"
pkg_setup() {
FORTRAN="gfortran"
fortran_pkg_setup
einfo "Sage itself is released under the GPL-2 _or later_ license"
}
spkg_patch() {
# This is so (at least) mpir will compile.
ABI=32
if ( (use amd64) || (use ppc64)); then
ABI=64
fi
# change to spkg dir
cd "${S}/spkg/standard"
# untar spkg and and remove it
tar -xjf "sage-3.2.spkg"
rm "sage-3.2.spkg"
# apply patch
epatch "${FILESDIR}"/sage-3.2.patch
# tar patched dir and remove it
tar -cjf "sage-3.2.spkg" "sage-3.2"
rm -rf "sage-3.2"
# untar spkg and and remove it
tar -xjf "clisp-2.46.p7.spkg"
rm "clisp-2.46.p7.spkg"
# apply patch
epatch "${FILESDIR}"/clisp-2.46.p7.patch
# tar patched dir and remove it
tar -cjf "clisp-2.46.p7.spkg" "clisp-2.46.p7"
rm -rf "clisp-2.46.p7"
}
src_compile() {
# This is so (at least) mpir will compile.
ABI=32
if ( (use amd64) || (use ppc64)); then
ABI=64
fi
spkg_patch
cd ${S}
make || die "make failed"
if ( grep "sage: An error occurred" "${S}/install.log" ); then
die "make failed"
fi
}
src_install() {
make DESTDIR="${D}/opt" install
sed -i "s/SAGE_ROOT=.*\/opt/SAGE_ROOT=\"\/opt/" "${D}/opt/bin/sage" "${D}/opt/sage/sage"
exeinto /opt/bin
dosym /opt/sage/sage /opt/bin/sage
# Force sage to create files in new location. This has to be done twice -
# this time to create the files for gentoo to correctly record as part of
# the sage install
"${D}/opt/sage/sage" -c quit
}
pkg_postinst() {
# make sure files are correctly setup in the new location by running sage as
# root. This prevent nasty message to be presented to the user.
/opt/sage/sage -c quit
}Ну и собственно хотелось бы узнать у кого нибудь это получится под 64 бита собрать?.


