/[gentoo-x86]/sci-mathematics/Macaulay2/Macaulay2-0.9.95-r2.ebuild
Gentoo

Contents of /sci-mathematics/Macaulay2/Macaulay2-0.9.95-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Nov 14 16:55:31 2009 UTC (5 years ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Drop package masked for removal.

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/Macaulay2/Macaulay2-0.9.95-r2.ebuild,v 1.3 2008/01/06 15:51:17 markusle Exp $
4
5 inherit elisp-common eutils flag-o-matic toolchain-funcs autotools
6
7 IUSE="emacs"
8
9 DESCRIPTION="research tool for commutative algebra and algebraic geometry"
10 SRC_URI="http://www.math.uiuc.edu/Macaulay2/Downloads/${P}-src.tar.gz
11 ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Factory/factory-3-0-2.tar.gz \
12 ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Libfac/libfac-3-0-2.tar.gz"
13
14 HOMEPAGE="http://www.math.uiuc.edu/Macaulay2/"
15
16 SLOT="0"
17 LICENSE="GPL-2"
18 KEYWORDS="~x86"
19
20 DEPEND="sys-libs/gdbm
21 dev-libs/gmp
22 dev-libs/ntl
23 dev-libs/boehm-gc
24 virtual/blas
25 virtual/lapack
26 dev-util/ctags
27 sys-libs/ncurses
28 emacs? ( virtual/emacs )"
29
30 SITEFILE=70Macaulay2-gentoo.el
31
32 src_unpack() {
33 unpack ${A}
34 cd "${S}"
35 epatch "${FILESDIR}"/${P}-etags-gentoo.patch
36 epatch "${FILESDIR}"/${P}-cpp-fix.patch
37 epatch "${FILESDIR}"/${P}-test-fix.patch
38 }
39
40 src_compile() {
41 cd "${WORKDIR}/factory"
42 econf --enable-NTL --prefix="${WORKDIR}" || \
43 die "failed to configure factory"
44 emake || die "failed to build factory"
45 make install || die "failed to install factory"
46
47 cd "${WORKDIR}/libfac"
48 CPPFLAGS="-I${WORKDIR}/include" econf --with-NOSTREAMIO \
49 --prefix="${WORKDIR}" || die "failed to configure libfac"
50 emake DEFS=-DHAVE_SINGULAR_ERROR || die "failed to build libfac"
51 make install || die "failed to install libfac"
52
53 cd "${S}"
54 sed -e "/^docm2RelDir/s:Macaulay2:${P}:" \
55 -i include/config.Makefile.in || \
56 die "failed to fix makefile"
57
58 CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
59 append-ldflags "-L${WORKDIR}/$(get_libdir)"
60 emake -j1 && CPPFLAGS="-I/usr/include/gc -I${WORKDIR}/include" \
61 ./configure --prefix="${D}/usr" --disable-encap \
62 --with-lapacklibs="-llapack -lblas" || \
63 die "failed to configure Macaulay"
64 emake -j1 || die "failed to build Macaulay"
65 }
66
67 src_test() {
68 make check || die "tests failed"
69 }
70
71 src_install () {
72 make install || die "install failed"
73
74 # nothing in here, get rid of it
75 rm -fr "${D}"/usr/$(get_libdir) || \
76 die "failed to remove empty /usr/lib"
77
78 use emacs && elisp-site-file-install "${FILESDIR}/${SITEFILE}"
79 }
80
81 pkg_postinst() {
82 if use emacs; then
83 elisp-site-regen
84 elog "If you want to set a hot key for Macaulay2 in Emacs add a line similar to"
85 elog "(global-set-key [ f12 ] 'M2)"
86 elog "in order to set it to F12 (or choose a different one."
87 fi
88 }
89 pkg_postrm() {
90 use emacs && elisp-site-regen
91 }

  ViewVC Help
Powered by ViewVC 1.1.20