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 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup select 1.0 |
---|
5 | |
---|
6 | name scala2.12 |
---|
7 | version 2.12.0 |
---|
8 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
9 | categories lang java |
---|
10 | license BSD |
---|
11 | maintainers openmaintainer blair |
---|
12 | description The Scala Programming Language |
---|
13 | long_description \ |
---|
14 | Scala is a modern multi-paradigm programming language \ |
---|
15 | designed to express common programming patterns in a \ |
---|
16 | concise, elegant, and type-safe way. It smoothly \ |
---|
17 | integrates features of object-oriented and functional \ |
---|
18 | languages. It runs inside a Java Virtual Machine and \ |
---|
19 | is fully interoperable with Java. |
---|
20 | homepage http://www.scala-lang.org/ |
---|
21 | platforms darwin |
---|
22 | supported_archs noarch |
---|
23 | |
---|
24 | master_sites https://downloads.lightbend.com/scala/${version} |
---|
25 | |
---|
26 | use_configure no |
---|
27 | build {} |
---|
28 | |
---|
29 | set sharedir ${destroot}${prefix}/share |
---|
30 | set docdir ${sharedir}/doc |
---|
31 | set docscaladir ${docdir}/scala-${branch} |
---|
32 | |
---|
33 | if {$subport == $name} { |
---|
34 | depends_lib port:scala_select |
---|
35 | select.group scala |
---|
36 | select.file ${filespath}/${name} |
---|
37 | |
---|
38 | distname scala-${version} |
---|
39 | extract.suffix .tgz |
---|
40 | checksums md5 2bbac543c7437fb5e8f1fb118cc7202b \ |
---|
41 | sha1 cb3a266636941e3bafc77283fa1d87e36a593592 \ |
---|
42 | sha256 6f6b5b73b6756d7c9af8f6f5ce45ded54b3caa0a236020fa87afe5daadcee576 |
---|
43 | |
---|
44 | destroot { |
---|
45 | set man1dir ${sharedir}/man/man1 |
---|
46 | set scaladir ${sharedir}/scala-${branch} |
---|
47 | set bindir ${scaladir}/bin |
---|
48 | |
---|
49 | xinstall -d -m 755 ${sharedir} |
---|
50 | file copy ${worksrcpath} ${scaladir} |
---|
51 | |
---|
52 | foreach f {fsc scala scalac scaladoc scalap} { |
---|
53 | file attributes ${bindir}/${f} -permissions 0755 |
---|
54 | ln -s ../share/scala-${branch}/bin/${f} \ |
---|
55 | ${destroot}${prefix}/bin/${f}-${branch} |
---|
56 | } |
---|
57 | |
---|
58 | file delete ${man1dir} |
---|
59 | file rename ${scaladir}/man/man1 ${man1dir} |
---|
60 | foreach f {fsc scala scalac scaladoc scalap} { |
---|
61 | file rename ${man1dir}/${f}.1 ${man1dir}/${f}-${branch}.1 |
---|
62 | } |
---|
63 | file delete -force ${scaladir}/man |
---|
64 | |
---|
65 | xinstall -d -m 755 ${docdir} |
---|
66 | file rename ${scaladir}/doc ${docscaladir} |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | subport ${name}-docs { |
---|
71 | description The Scala Programming Language API docs |
---|
72 | |
---|
73 | distname scala-docs-${version} |
---|
74 | use_xz yes |
---|
75 | extract.suffix .txz |
---|
76 | checksums md5 9ba20ab4e18d5feef6cf68e972880869 \ |
---|
77 | sha1 4c2ef82785db356420f9eb83d5bdefa66a7d288b \ |
---|
78 | sha256 cb5d2382326d15189a90ddd29581a0a63727c51a084632cf8da60ab22d0b092a |
---|
79 | |
---|
80 | destroot { |
---|
81 | xinstall -d -m 755 ${docscaladir} |
---|
82 | file copy ${worksrcpath}/api ${docscaladir}/api |
---|
83 | } |
---|
84 | } |
---|
85 | |
---|
86 | livecheck.type regex |
---|
87 | livecheck.url http://scala-lang.org/download/all.html |
---|
88 | livecheck.regex {/download/(2\.12\.\d+(?:\.\d+)*)\.html} |
---|