Ticket #61394: Portfile.2

File Portfile.2, 2.2 KB (added by josh-seidel-db, 4 years ago)

java/ammonite-repl2.13/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
2PortSystem          1.0
3PortGroup           java 1.0
4PortGroup           select 1.0
5
6name                ammonite-repl2.13
7version             2.2.0
8revision            0
9categories          java devel lang
10maintainers         nomaintainer
11description         Engine for large-scale data processing
12long_description \
13    A Modernized Scala REPL. With syntax highlighting, multi-line editing, the ability \
14    to load maven artifacts directly in the REPL, and many other quality-of-life \
15    improvements missing in the default Scala REPL.
16homepage            https://ammonite.io/
17platforms           darwin
18supported_archs     noarch
19license             MIT
20use_xcode           no
21
22master_sites        https://github.com/lihaoyi/Ammonite/releases/download/${version}/
23distname            2.13-${version}
24distfiles           ${distname}
25checksums           md5    d516fc0553e3143b6150ee657b490b3d\
26                    sha1   caf59820d71b1c518dd03cde1c4b5dd119107688\
27                    rmd160 8aa1a0bb0258905ff9c32251e752b6a3858f829e\
28                    sha256 291c21d9839c1e95cb03d06504ace473da2cc1d3906dc9b7595aa061a1b28b80\
29                    size   46378986
30
31use_configure       no
32
33# Require java version
34java.version        11+
35set java.base.version 11
36# JDK port to install if required java not found
37java.fallback       openjdk8
38
39depends_run         port:scala2.13 port:ammonite-repl_select
40
41if {$subport == $name} {
42    depends_lib          port:ammonite-repl_select
43    select.group         ammonite-repl
44    select.file          ${filespath}/${name}
45   
46    extract {
47        file copy ${prefix}/var/macports/distfiles/${name} ${worksrcpath}
48    }
49
50    set ammonite.cmd    amm
51
52    build.cmd           ${distfiles}
53    build {
54        system "(echo \"#!/usr/bin/env sh\" && cat ${worksrcpath}/${build.cmd}) > ${worksrcpath}/${ammonite.cmd}"
55    }
56
57    destroot {
58        set ammonitedir ${prefix}/share/${name}
59
60        xinstall -m 755 -d ${destroot}${ammonitedir}/bin
61        xinstall -m 755 ${worksrcpath}/${ammonite.cmd} ${destroot}${ammonitedir}/bin
62
63#        ln -s ${ammonitedir}/bin/${ammonite.cmd} ${prefix}/bin
64    }
65}