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

Contents of /sci-mathematics/Macaulay2/Macaulay2-1.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat May 14 14:34:21 2011 UTC (3 years, 4 months ago) by tomka
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
x86 stable per bug 366379

(Portage version: 2.1.9.49/cvs/Linux i686)

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/Macaulay2/Macaulay2-1.4.ebuild,v 1.4 2011/05/10 20:54:03 hwoarang Exp $
4
5 EAPI="2"
6
7 inherit autotools elisp-common eutils flag-o-matic
8
9 IUSE="emacs optimization"
10 MY_REV="12617"
11
12 FACTORYVER="3-1-1"
13
14 DESCRIPTION="research tool for commutative algebra and algebraic geometry"
15 SRC_BASE="http://www.math.uiuc.edu/${PN}/Downloads/"
16 SRC_URI="${SRC_BASE}/OtherSourceCode/1.4/factory-${FACTORYVER}.tar.gz
17 ${SRC_BASE}/OtherSourceCode/1.4/libfac-${FACTORYVER}.tar.gz
18 http://www.math.uiuc.edu/${PN}/Extra/gc-7.2alpha5-2010-09-03.tar.gz
19 ${SRC_BASE}/SourceCode/${P}-r${MY_REV}-src.tar.bz2"
20
21 HOMEPAGE="http://www.math.uiuc.edu/Macaulay2/"
22
23 SLOT="0"
24 LICENSE="GPL-2"
25 KEYWORDS="amd64 x86"
26
27 DEPEND="sys-libs/gdbm
28 >=dev-libs/ntl-5.5.2
29 >=sci-mathematics/pari-2.3.4[gmp]
30 >=sys-libs/readline-6.1
31 dev-libs/libxml2:2
32 sci-mathematics/frobby
33 sci-mathematics/4ti2
34 sci-mathematics/nauty
35 >=sci-mathematics/normaliz-2.5
36 sci-mathematics/gfan
37 >=dev-libs/mpfr-3.0.0
38 >=sci-libs/mpir-2.1.1[cxx]
39 sci-libs/cddlib
40 sci-libs/cdd+
41 sci-libs/lrslib[gmp]
42 virtual/blas
43 virtual/lapack
44 dev-util/ctags
45 sys-libs/ncurses
46 sys-process/time
47 emacs? ( virtual/emacs )"
48 RDEPEND="${DEPEND}"
49
50 SITEFILE=70Macaulay2-gentoo.el
51
52 S="${WORKDIR}/${P}-r${MY_REV}"
53
54 pkg_setup () {
55 tc-export CC CPP CXX
56 append-cppflags "-I/usr/include/frobby"
57 }
58
59 src_prepare() {
60 # Patching .m2 files to look for external programs in
61 # /usr/bin
62 epatch "${FILESDIR}"/${PV}-paths-of-external-programs.patch
63
64 # Fixing make warnings about unavailable jobserver:
65 sed -i "s/\$(MAKE)/+ \$(MAKE)/g" "${S}"/distributions/Makefile.in
66
67 # Factory, and libfac are statically linked libraries which (in this flavor) are not used by any
68 # other program. We build them internally and don't install them
69 mkdir "${S}/BUILD/tarfiles" || die "Creation of directory failed"
70 cp "${DISTDIR}/factory-3-1-1.tar.gz" "${S}/BUILD/tarfiles/" \
71 || die "copy failed"
72 cp "${DISTDIR}/libfac-3-1-1.tar.gz" "${S}/BUILD/tarfiles/" \
73 || die "copy failed"
74 # Macaulay 2 in this version insists on a snapshot of boehm-gc that is not available elsewhere
75 # We will let it build its internal version until >=boehm-gc-7.2_alpha5 is in in tree. Note:
76 # The resulting QA warning is known.
77 cp "${DISTDIR}/gc-7.2alpha5-2010-09-03.tar.gz" "${S}/BUILD/tarfiles/" \
78 || die "copy failed"
79
80 eautoreconf
81 }
82
83 src_configure (){
84 # Recommended in bug #268064 Possibly unecessary
85 # but should not hurt anybody.
86 if ! use emacs; then
87 tags="ctags"
88 fi
89
90 # configure instead of econf to enable install with --prefix
91 ./configure --prefix="${D}/usr" \
92 --disable-encap \
93 --disable-strip \
94 $(use_enable optimization optimize) \
95 --enable-build-libraries="factory gc libfac" \
96 --with-unbuilt-programs="4ti2 gfan normaliz nauty cddplus lrslib" \
97 || die "failed to configure Macaulay"
98 }
99
100 src_compile() {
101 # Parallel build not supported yet
102 emake -j1 || die "failed to build Macaulay"
103
104 if use emacs; then
105 cd "${S}/Macaulay2/emacs"
106 elisp-compile *.el || die "elisp-compile failed"
107 fi
108 }
109
110 src_test() {
111 emake check || die "tests failed"
112 }
113
114 src_install () {
115 # Parallel install not supported yet
116 emake -j1 install || die "install failed"
117
118 # Remove emacs files and install them in the
119 # correct place if use emacs
120 rm -rf "${D}"/usr/share/emacs/site-lisp
121 if use emacs; then
122 cd "${S}/Macaulay2/emacs"
123 elisp-install ${PN} *.elc *.el || die "elisp-install failed"
124 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
125 fi
126 }
127
128 pkg_postinst() {
129 if use emacs; then
130 elisp-site-regen
131 elog "If you want to set a hot key for Macaulay2 in Emacs add a line similar to"
132 elog "(global-set-key [ f12 ] 'M2)"
133 elog "in order to set it to F12 (or choose a different one)."
134 fi
135 }
136
137 pkg_postrm() {
138 use emacs && elisp-site-regen
139 }

  ViewVC Help
Powered by ViewVC 1.1.20