# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils IUSE="fullconfig" DESCRIPTION="research tool for polyhedral geometry" SRC_URI="http://www.math.tu-berlin.de/polymake/download/polymake-2.3.tar.bz2" HOMEPAGE="http://www.math.tu-berlin.de/polymake" SLOT="0" LICENSE="GPL-3" KEYWORDS="~x86 ~amd64" DEPEND="dev-libs/gmp >=sys-devel/gcc-4.1.2" src_compile(){ # The first configure prepares perl stuff and # does not accept the answerfile touch answers || die "Cannot touch file for answers" emake configure < answers # Interactive Configuration if use fullconfig; then emake configure || die "configuration failed" else # Preparing answers for configuration echo "/usr/polymake" >> answers echo "/usr/polymake/bin" >> answers echo "/usr/polymake/doc" >> answers echo "g++" >> answers echo "gcc" >> answers echo "-O3" >> answers # We rely on GCC using the LAST -O option echo $CXXFLAGS "-O3" >> answers echo $CFLAGS "-O3" >> answers echo $LDFLAGS >> answers echo "none" >> answers echo "none" >> answers emake configure < answers rm answers fi einfo "During compile this package uses up to" einfo "300MB of RAM per process. Use MAKEOPTS=\"-j1\" if" einfo "you run into trouble." if ! use fullconfig; then elog "Polymake will be built with -O3 which is considered safe" elog "Set useflag fullconfig to change" fi emake || die "emake failed" } src_install(){ emake DESTDIR="${D}" install || die "install failed" } pkg_postinst(){ elog "You will need to set up your PATH to use Polymake" elog "If you use bash add " elog "PATH=\$PATH:/usr/polymake/bin;" elog "to your .bashrc" elog "Polymake uses precompiled Perl Modules" elog "If something does not work after an upgrade of Perl re-emerge" }