Ticket #54573: Portfile

File Portfile, 3.5 KB (added by pietvo (Pieter van Oostrum), 7 years ago)

Here is the new Portfile.

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2
3PortSystem 1.0
4
5name            fricas
6version         1.3.2
7categories      math
8maintainers     {@pietvo vanoostrum.org:piet}
9platforms       darwin
10supported_archs i386 x86_64
11license         BSD
12description     The Fricas computer algebra system
13long_description \
14        FriCAS is a computer algebra system. FriCAS is a fork of Axiom. \
15        The basic goal of FriCAS is to create a free advanced \
16        world-class CAS. FriCAS builds on the Axiom codebase. The FriCAS \
17        algebra library is one of the largest and most advanced free \
18        general purpose computer algebra systems -- this gives a good \
19        foundation to build on. Additionally, the FriCAS algebra library \
20        is written in a high level strongly typed language (Spad), which \
21        allows natural expression of mathematical algorithms. This makes \
22        FriCAS easier to understand and extend.
23       
24homepage        http://fricas.sourceforge.net/
25master_sites    sourceforge:${name}/${version}
26distname        ${name}-${version}-full
27use_bzip2       yes
28worksrcdir      ${name}-${version}
29               
30checksums       rmd160  1ab5c148f0684c946c3b0831a5fe01fc21bbe83a \
31                sha256  798b123e61f3566e6b1b367c235f5b4599a9c737b938aa71f32d0aabb7db439d \
32                md5     0d3af65758ce93b1cc52c2511e73e674 \
33                sha1    8fc3e850a9890eac21cd9f391dd58000b3537067
34
35configure.dir   ${workpath}/fricas-build
36configure.cmd   ${worksrcpath}/configure
37pre-configure   {file mkdir ${configure.dir}}
38
39build.dir       ${configure.dir}
40build.args      MAYBE_VIEWPORTS=viewports
41
42default_variants    +x11
43                   
44variant x11     description {Enable X11 support.\
45        Without X11, Fricas does not support graphics and hyperdoc} {
46        configure.args-append   --with-x -x-includes=${prefix}/include \
47        -x-libraries=${prefix}/lib
48        depends_lib-append  port:xorg-libX11 \
49                            port:xpm \
50                            port:xorg-libice \
51                            port:xorg-libsm
52}
53
54variant sbcl conflicts ccl ecl \
55        description {Use SBCL as lisp implementation (this is the default)} {
56        depends_lib-append      port:sbcl
57        configure.args-append   --with-lisp=sbcl
58}
59
60if { ${configure.build_arch} eq "x86_64" } {
61        set ccl_script ccl64
62} elseif { ${configure.build_arch} eq "i386" } {
63        set ccl_script ccl
64}
65
66variant ccl conflicts gmp sbcl ecl \
67        description {Use CCL (Clozure) instead of SBCL as lisp implementation} {
68        depends_lib-append      port:ccl
69        configure.args-append   --with-lisp=${ccl_script}
70}
71
72variant ecl  conflicts gmp sbcl ccl \
73        description {Use ECL instead of SBCL as lisp implementation} {
74        depends_lib-append      port:ecl
75        configure.args-append   --with-lisp=ecl
76}
77
78# Fricas doesn't compile under GCL
79# Fricas compiles under CLISP but doesn't run correctly
80# So we leave these variants out until we get them working
81
82variant gmp conflicts ccl ecl \
83        description {Use libgmp for faster calculations} {
84        configure.args-append   --enable-gmp
85        depends_lib-append      port:gmp
86        patchfiles-append       use-macports-gmp.patch
87        post-patch {
88            reinplace "s|libgmp.so|${prefix}/lib/libgmp.dylib|" ${worksrcpath}/src/lisp/num_gmp.lisp
89        }
90}
91
92if {   ![variant_isset ccl] && ![variant_isset ecl] } {
93        default_variants +sbcl
94}