Ticket #22717: Portfile

File Portfile, 2.1 KB (added by ian.eure@…, 15 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4
5name                clojure-devel
6version             1.1.0-alpha-SNAPSHOT
7revision            0
8categories          lang java
9maintainers         gmail.com:ian.eure
10description         The Clojure programming language (development version)
11long_description    Clojure is a dynamic programming language for the JVM. \
12                    It is interactive, yet compiled, with a robust \
13                    infrastructure for concurrency. It is a functional \
14                    dialect of Lisp, with a rich set of immutable, \
15                    persistent data structures and a macro system.
16homepage            http://clojure.org/
17platforms           darwin
18
19fetch.type          git
20git.url             git://github.com/richhickey/clojure.git
21git.branch          17f5c889d8b863fba2b135204696e125c402f44a
22
23
24
25use_configure       no
26build.cmd           ant
27build.target        jar
28
29variant readline conflicts rlwrap description {Use readline support} {
30    depends_run-append port:jline
31}
32
33variant rlwrap conflicts readline description {Use rlwrap support for tab completion, parenthesis matching} {
34    depends_run-append port:rlwrap
35}
36
37destroot {
38    set javadir ${destroot}${prefix}/share/java
39    set clojuredir ${javadir}/clojure
40    set clojurejar ${clojuredir}/lib/clojure.jar
41    set clojurebin ${clojuredir}/bin/clj
42    set clojurelink ${prefix}/share/java/clojure/bin/clj
43    set clojuresh clj.sh
44    set bindir ${destroot}${prefix}/bin
45   
46    if {[variant_isset readline]} {
47        set clojuresh clj-jline.sh
48    }
49   
50    if {[variant_isset rlwrap]} {
51        set clojuresh clj-rlwrap.sh
52    }
53   
54    xinstall -m 0755 -d ${javadir}
55    xinstall -m 0755 -d ${clojuredir}
56    xinstall -m 0755 -d ${clojuredir}/lib
57    xinstall -m 0755 -d ${clojuredir}/bin
58    xinstall -m 0644 -W ${worksrcpath} clojure-${version}.jar ${clojurejar}
59    xinstall -m 0755 -W ${filespath} ${clojuresh} ${clojurebin}
60   
61    if {[variant_isset rlwrap]} {
62        xinstall -m 0644 -W ${filespath} .clj_completions  ${clojuredir}/.clj_completions
63    }
64   
65    ln -s ${clojurelink} ${bindir}/clj
66}