Ticket #28219: Portfile

File Portfile, 2.6 KB (added by m@…, 14 years ago)

fantom Portfile (version 1)

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5PortGroup select    1.0
6
7name                fantom
8version             1.0.57
9revision            1
10
11categories          java lang devel
12maintainers         m-at-hum-dot-ph:martin
13platforms           darwin
14
15description         The Language Formerly Known as Fan.
16long_description    Fantom is designed as a practical programming \
17                    language to make it easy and fun to get real work \
18                    done. It is not an academic language to explore \
19                    bleeding edge theories, but based on solid real \
20                    world experience. During its design we set out to \
21                    solve what we perceived were some real problems \
22                    with Java and C#.
23
24homepage            http://fantom.org/
25
26master_sites        http://fan.googlecode.com/files/
27distname            fantom-${version}
28use_zip             yes
29
30worksrcdir          fantom-${version}
31checksums           md5    5f5b7fbaae4e2cf76ded359c57530af2 \
32                    sha1   4aba26250d525b8a0e9d20fb792c1e108f7c52a6 \
33                    rmd160 4cc371adb5eb6dfa9ee836ddd18c283f06872017
34
35default_variants    +docs +examples +src
36depends_build       bin:java:kaffe
37
38use_configure       no
39
40variant             docs description "include fantom documentation" {}
41variant             examples description "include fantom examples" {}
42variant             src description "include fantom source" {}
43
44build               {}
45
46destroot {
47
48    set fantomdir ${destroot}${prefix}/share/java/${name}
49
50    xinstall -m 755 -d ${fantomdir}
51
52    file copy ${worksrcpath}/adm ${worksrcpath}/bin ${worksrcpath}/etc ${worksrcpath}/lib ${fantomdir}
53
54    if {[variant_isset src]} {
55        file copy ${worksrcpath}/src ${fantomdir}
56    }
57
58    if {[variant_isset docs]} {
59        file copy ${worksrcpath}/doc ${fantomdir}
60    }
61
62    if {[variant_isset examples]} {
63        file copy ${worksrcpath}/examples ${fantomdir}
64    }
65
66    foreach f [glob -directory ${fantomdir}/bin *.exe] {
67        file delete $f
68    }
69
70    foreach f [glob -directory ${fantomdir}/bin *] {
71        file attributes $f -permissions +x
72        system "cd ${destroot}${prefix}/bin && ln -s ../share/java/fantom/bin/`basename $f` `basename $f`"
73    }
74
75}
76
77notes               "
78To use fantom, add the following lines at the end of your .bash_profile:
79
80    export FAN_HOME=${prefix}/share/java/${name}
81    export FAN_ENV=util::PathEnv
82    export FAN_ENV_PATH=~/.fan/
83
84and:
85
86    mkdir ~/.fan
87"