Gentoo Archives: gentoo-commits

From: Andrey Grozin <grozin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/fricas/
Date: Wed, 24 Feb 2016 17:27:01
Message-Id: 1456333931.e71683bd9c540a9f6427224549ae97a3ecd294a9.grozin@gentoo
1 commit: e71683bd9c540a9f6427224549ae97a3ecd294a9
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 24 17:12:11 2016 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 24 17:12:11 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e71683bd
7
8 sci-mathematics/fricas: no longer need to restrict sbcl version
9
10 Package-Manager: portage-2.2.27
11
12 sci-mathematics/fricas/fricas-1.2.7-r2.ebuild | 92 +++++++++++++++++++++++++++
13 1 file changed, 92 insertions(+)
14
15 diff --git a/sci-mathematics/fricas/fricas-1.2.7-r2.ebuild b/sci-mathematics/fricas/fricas-1.2.7-r2.ebuild
16 new file mode 100644
17 index 0000000..821c202
18 --- /dev/null
19 +++ b/sci-mathematics/fricas/fricas-1.2.7-r2.ebuild
20 @@ -0,0 +1,92 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +EAPI=5
25 +inherit multilib elisp-common
26 +
27 +DESCRIPTION="FriCAS is a fork of Axiom computer algebra system"
28 +HOMEPAGE="http://${PN}.sourceforge.net/"
29 +SRC_URI="mirror://sourceforge/${PN}/${P}-full.tar.bz2"
30 +LICENSE="BSD-2"
31 +SLOT="0"
32 +KEYWORDS="~amd64 ~x86"
33 +
34 +# Supported lisps, number 0 is the default
35 +LISPS=( sbcl cmucl gcl ecls clisp clozurecl )
36 +# command name: . means just ${LISP}
37 +COMS=( . lisp . ecl . ccl )
38 +
39 +IUSE="${LISPS[*]} X emacs gmp"
40 +RDEPEND="X? ( x11-libs/libXpm x11-libs/libICE )
41 + emacs? ( virtual/emacs )
42 + gmp? ( dev-libs/gmp )"
43 +
44 +# Generating lisp deps
45 +n=${#LISPS[*]}
46 +for ((n--; n > 0; n--)); do
47 + LISP=${LISPS[$n]}
48 + DEP="dev-lisp/${LISP}"
49 + RDEPEND="${RDEPEND} ${LISP}? ( ${DEP}:= ) !${LISP}? ("
50 +done
51 +DEP="dev-lisp/${LISPS[0]}"
52 +RDEPEND="${RDEPEND} ${DEP}:="
53 +n=${#LISPS[*]}
54 +for ((n--; n > 0; n--)); do
55 + RDEPEND="${RDEPEND} )"
56 +done
57 +
58 +DEPEND="${RDEPEND}"
59 +
60 +# necessary for clisp and gcl
61 +RESTRICT="strip"
62 +
63 +src_configure() {
64 + local LISP n
65 + LISP=sbcl
66 + n=${#LISPS[*]}
67 + for ((n--; n > 0; n--)); do
68 + if use ${LISPS[$n]}; then
69 + LISP=${COMS[$n]}
70 + if [ "${LISP}" = "." ]; then
71 + LISP=${LISPS[$n]}
72 + fi
73 + fi
74 + done
75 + einfo "Using lisp: ${LISP}"
76 +
77 + # aldor is not yet in portage
78 + econf --disable-aldor --with-lisp=${LISP} $(use_with X x) $(use_with gmp)
79 +}
80 +
81 +src_compile() {
82 + # bug #300132
83 + emake -j1
84 +}
85 +
86 +src_test() {
87 + emake -j1 all-input
88 +}
89 +
90 +src_install() {
91 + emake -j1 DESTDIR="${D}" install
92 + dodoc README FAQ
93 +
94 + if use emacs; then
95 + sed -e "s|(setq load-path (cons (quote \"/usr/$(get_libdir)/fricas/emacs\") load-path)) ||" \
96 + -i "${D}"/usr/bin/efricas \
97 + || die "sed efricas failed"
98 + elisp-install ${PN} "${D}"/usr/$(get_libdir)/${PN}/emacs/*.el
99 + elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
100 + else
101 + rm "${D}"/usr/bin/efricas || die "rm efricas failed"
102 + fi
103 + rm -r "${D}"/usr/$(get_libdir)/${PN}/emacs || die "rm -r emacs failed"
104 +}
105 +
106 +pkg_postinst() {
107 + use emacs && elisp-site-regen
108 +}
109 +
110 +pkg_postrm() {
111 + use emacs && elisp-site-regen
112 +}