| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/polymake/polymake-2.11.ebuild,v 1.1 2011/12/25 15:21:49 tomka Exp $
|
| 4 |
|
| 5 |
EAPI=2
|
| 6 |
|
| 7 |
inherit eutils flag-o-matic
|
| 8 |
|
| 9 |
MY_PV=${PV}_rc2
|
| 10 |
|
| 11 |
DESCRIPTION="research tool for polyhedral geometry and combinatorics"
|
| 12 |
SRC_URI="http://polymake.org/lib/exe/fetch.php/download/${PN}-${MY_PV}.tar.bz2"
|
| 13 |
HOMEPAGE="http://polymake.org"
|
| 14 |
|
| 15 |
IUSE="libpolymake"
|
| 16 |
|
| 17 |
SLOT="0"
|
| 18 |
LICENSE="GPL-2"
|
| 19 |
KEYWORDS="~amd64 ~x86"
|
| 20 |
|
| 21 |
DEPEND="dev-libs/gmp
|
| 22 |
dev-libs/boost
|
| 23 |
dev-libs/libxml2:2
|
| 24 |
dev-perl/XML-LibXML
|
| 25 |
dev-libs/libxslt
|
| 26 |
dev-perl/XML-LibXSLT
|
| 27 |
dev-perl/XML-Writer
|
| 28 |
dev-perl/Term-ReadLine-Gnu"
|
| 29 |
RDEPEND="${DEPEND}"
|
| 30 |
|
| 31 |
src_prepare() {
|
| 32 |
# embedded jreality is a precompiled desaster (bug #346073)
|
| 33 |
epatch "${FILESDIR}/${P}"-drop-jreality.patch
|
| 34 |
# Assign a soname
|
| 35 |
epatch "${FILESDIR}/2.10"-soname.patch
|
| 36 |
rm -rf java_build/jreality
|
| 37 |
|
| 38 |
# Don't strip
|
| 39 |
sed -i '/system "strip $to"/d' support/install.pl || die
|
| 40 |
|
| 41 |
einfo "During compile this package uses up to"
|
| 42 |
einfo "750MB of RAM per process. Use MAKEOPTS=\"-j1\" if"
|
| 43 |
einfo "you run into trouble."
|
| 44 |
}
|
| 45 |
|
| 46 |
src_configure () {
|
| 47 |
export CXXOPT=$(get-flag -O)
|
| 48 |
local myconf
|
| 49 |
if use libpolymake ; then
|
| 50 |
# WTF: If we leave myconf as the empty string here
|
| 51 |
# then configure will fail.
|
| 52 |
myconf="--without-prereq"
|
| 53 |
else
|
| 54 |
# --with-callable is not supported :(
|
| 55 |
myconf="--without-callable"
|
| 56 |
fi
|
| 57 |
echo ${myconf}
|
| 58 |
# Configure does not accept --host, therefore econf cannot be used
|
| 59 |
./configure --prefix=/usr \
|
| 60 |
--without-java \
|
| 61 |
--without-prereq \
|
| 62 |
--libdir=/usr/$(get_libdir) \
|
| 63 |
--libexecdir=/usr/$(get_libdir)/polymake \
|
| 64 |
"${myconf}" || die
|
| 65 |
}
|
| 66 |
|
| 67 |
src_install(){
|
| 68 |
emake -j1 DESTDIR="${D}" install || die "install failed"
|
| 69 |
}
|
| 70 |
|
| 71 |
pkg_postinst(){
|
| 72 |
elog "Polymake uses Perl Modules compiled during install."
|
| 73 |
elog "You have to reinstall polymake after an upgrade of Perl."
|
| 74 |
elog " "
|
| 75 |
elog "This version of polymake does not ship docs. Sorry."
|
| 76 |
elog "Help can be found on http://www.opt.tu-darmstadt.de/polymake_doku/ "
|
| 77 |
elog " "
|
| 78 |
elog "Visualization in polymake is via jreality which ships pre-compiled"
|
| 79 |
elog "binary libraries. Until this situation is resolved, support for"
|
| 80 |
elog "jreality has been dropped. Please contribute to Bug #346073 to "
|
| 81 |
elog "make jreality available in Gentoo."
|
| 82 |
}
|