diff options
Diffstat (limited to 'sci-mathematics/open-axiom/open-axiom-9999.ebuild')
-rw-r--r-- | sci-mathematics/open-axiom/open-axiom-9999.ebuild | 59 |
1 files changed, 17 insertions, 42 deletions
diff --git a/sci-mathematics/open-axiom/open-axiom-9999.ebuild b/sci-mathematics/open-axiom/open-axiom-9999.ebuild index 58e5ef9..d1728d5 100644 --- a/sci-mathematics/open-axiom/open-axiom-9999.ebuild +++ b/sci-mathematics/open-axiom/open-axiom-9999.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=2 +EAPI=4 inherit eutils autotools subversion DESCRIPTION="The open computer algebra system (Axiom fork)" @@ -14,15 +14,11 @@ SRC_URI="" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" -LISPS=( sbcl clisp gcl ecls clozurecl ) -CONF=( . . . ecl ccl ) +LISPS='sbcl clisp gcl ecls clozurecl' +REQUIRED_USE="^^ ( $LISPS )" # The first lisp is default -IUSE="X threads +${LISPS[0]}" -n=${#LISPS[*]} -for ((i=1; i < n; i++)); do - IUSE="$IUSE -${LISPS[$i]}" -done +IUSE="X threads +$LISPS" @@ -41,48 +37,27 @@ gcl? ( || ( =dev-lisp/gcl-2.6.7 =dev-lisp/gcl-2.6.8 ) ) ecls? ( >=dev-lisp/ecls-0.9l ) clozurecl? ( >=dev-lisp/clozurecl-1.3 )" -choose_lisp() { - if [ ${CONF[$1]} != '.' ]; then - echo ${CONF[$1]} - else - echo ${LISPS[$1]} - fi -} - -pkg_setup() { - local l n i - LISP='' - n=${#LISPS[*]} - for ((i=0; i < n; i++)); do - if use ${LISPS[$i]}; then - if [ -z "$LISP" ]; then - l=${LISPS[$i]} - LISP=$(choose_lisp $i) - else - ewarn "Only one lisp can be used and it will be $l." - ewarn "Check your USE flags." - epause 5 - fi - fi - done - if [ -z "$LISP" ]; then - LISP=$(choose_lisp 0) - ewarn "No lisp platform specified." - ewarn "Chosing ${LISPS[0]} as default." - ewarn "Building OpenAxiom may fail due to loosing dependecies." - epause 5 - fi -} src_prepare() { eautoreconf } src_configure() { + local l, lisp; + for l in $LISPS; do + use $l && break; + done + + case $l in + clozurecl) lisp=ccl;; + ecls) lisp=ecl;; + *) lisp=$l;; + esac + econf \ $(use_with X x) \ - $(use_enable gcl gcl) \ - --with-lisp=$LISP \ + --disable-gcl \ + --with-lisp=$lisp \ $(use_enable threads threads) \ || die "econf failed" } |