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

Contents of /sci-mathematics/Macaulay2/Macaulay2-1.0.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-1.0.ebuild,v 1.3 2008/01/16 11:28:47 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="mirror://gentoo/${P}-src.tar.bz2
11 ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Factory/factory-3-0-3.tar.gz \
12 ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Libfac/libfac-3-0-3.tar.gz"
13
14 HOMEPAGE="http://www.math.uiuc.edu/Macaulay2/"
15
16 SLOT="0"
17 LICENSE="GPL-2"
18 KEYWORDS="~x86 ~amd64"
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 pkg_setup() {
33
34 # boehm-gc currently is broken with USE='threads'
35 # (see bug #195335) causing Macaulay2 to fail
36 if built_with_use "dev-libs/boehm-gc" "threads" \
37 && has_version "=dev-libs/boehm-gc-7*"; then
38 echo
39 eerror "dev-libs/boehm-gc-7* with USE=\"threads\" is"
40 eerror "currently broken (see bug #195335) causing"
41 eerror "Macaulay to fail building. Please re-emerge"
42 eerror "dev-libs/boehm-gc-7* with USE=\"-threads\"!"
43 die "boehm-gc setup error"
44 echo
45 fi
46 }
47
48 src_unpack() {
49 unpack ${A}
50 cd "${S}"
51 epatch "${FILESDIR}"/${P}-example-fix.patch
52
53 sed -e "s:\$docdirtail/${PN}:\$docdirtail/${P}:" \
54 -i configure.ac \
55 || die "Failed to fix doc install directory."
56 }
57
58 src_compile() {
59 cd "${WORKDIR}/factory-3.0.3"
60 econf --enable-NTL --prefix="${WORKDIR}" || \
61 die "failed to configure factory"
62 emake || die "failed to build factory"
63 make install || die "failed to install factory"
64
65 cd "${WORKDIR}/libfac"
66 CPPFLAGS="-I${WORKDIR}/include" econf --with-NOSTREAMIO \
67 --prefix="${WORKDIR}" || die "failed to configure libfac"
68 emake || die "failed to build libfac"
69 make install || die "failed to install libfac"
70
71 cd "${S}"
72 sed -e "/^docm2RelDir/s:Macaulay2:${P}:" \
73 -i include/config.Makefile.in \
74 || die "failed to fix makefile"
75
76 CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
77 append-ldflags "-L${WORKDIR}/$(get_libdir)"
78 emake -j1 && CPPFLAGS="-I/usr/include/gc -I${WORKDIR}/include" \
79 ./configure --prefix="${D}/usr" --disable-encap \
80 --with-lapacklibs="$(pkg-config lapack --libs)" \
81 || die "failed to configure Macaulay"
82
83 emake -j1 || die "failed to build Macaulay"
84 }
85
86 # checks are currently very broken
87 #src_test() {
88 # cd "${S}"
89 # make check || die "tests failed"
90 #}
91
92 src_install () {
93 make install || die "install failed"
94
95 # nothing useful in here, get rid of it
96 # NOTE: Macaulay installs into lib even on amd64 hence don't
97 # replace lib with $(get_libdir) below!
98 rm -fr "${D}"/usr/lib \
99 || die "failed to remove empty /usr/lib"
100
101 use emacs && elisp-site-file-install "${FILESDIR}/${SITEFILE}"
102 }
103
104 pkg_postinst() {
105 if use emacs; then
106 elisp-site-regen
107 elog "If you want to set a hot key for Macaulay2 in Emacs add a line similar to"
108 elog "(global-set-key [ f12 ] 'M2)"
109 elog "in order to set it to F12 (or choose a different one."
110 fi
111 }
112 pkg_postrm() {
113 use emacs && elisp-site-regen
114 }

  ViewVC Help
Powered by ViewVC 1.1.20