source: trunk/dports/lang/scala2.11/Portfile

Last change on this file was 149248, checked in by blair@…, 18 months ago

scala2.11: switch to a HTTPS master site for security.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# $Id: Portfile 149248 2016-06-07 18:20:23Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup select 1.0
5
6name            scala2.11
7version         2.11.8
8set branch      [join [lrange [split ${version} .] 0 1] .]
9categories      lang java
10license         BSD
11maintainers     openmaintainer blair
12description     The Scala Programming Language
13long_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.
20homepage        http://www.scala-lang.org/
21platforms       darwin
22supported_archs noarch
23
24master_sites    https://downloads.lightbend.com/scala/${version}
25
26use_configure   no
27build           {}
28
29set sharedir    ${destroot}${prefix}/share
30set docdir      ${sharedir}/doc
31set docscaladir ${docdir}/scala-${branch}
32
33if {$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    e7e1f7ddc8873d228d611e801b8d2795 \
41                    sha1   490208fdbedaa272276bf338e1cf840e1df15a14 \
42                    sha256 87fc86a19d9725edb5fd9866c5ee9424cdb2cd86b767f1bb7d47313e8e391ace
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
70subport ${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    7d8bc6cc70e15f03e6c9255415268de3 \
77                    sha1   76ade0a010ef7c4d8772a269bfcd00a7e22d6806 \
78                    sha256 f79180418c9a4827306c2e30d8de451d29daf72ec441e023ae73d25b39b3c0db
79
80    destroot {
81        xinstall -d -m 755 ${docscaladir}
82        file copy ${worksrcpath}/api ${docscaladir}/api
83    }
84}
85
86livecheck.type  regex
87livecheck.url   http://scala-lang.org/download/all.html
88livecheck.regex {/download/(2\.11\.\d+(?:\.\d+)*)\.html}
Note: See TracBrowser for help on using the repository browser.