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

Last change on this file was 149249, checked in by blair@…, 14 months ago

scala2.10: new upstream 2.10.6 release.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# $Id: Portfile 149249 2016-06-07 18:21:32Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup select 1.0
5
6name            scala2.10
7version         2.10.6
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    d79dc9fdc627b73289306bdaec81ca98 \
41                    sha1   3a2d797410dcf0f520181412bf51530275b979ce \
42                    sha256 54adf583dae6734d66328cafa26d9fa03b8c4cf607e27b9f3915f96e9bcd2d67
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        xinstall -d -m 755 ${sharedir}/java
69        foreach f {akka-actors.jar
70                   scala-actors.jar
71                   scala-actors-migration.jar
72                   scala-compiler.jar
73                   scala-library.jar
74                   scala-reflect.jar
75                   scala-swing.jar
76                   scalap.jar} {
77            set g [strsed ${f} "/.jar/-${branch}.jar/"]
78            ln -s ../scala-${branch}/lib/${f} ${sharedir}/java/${g}
79        }
80    }
81}
82
83subport ${name}-docs {
84    description     The Scala Programming Language API docs
85
86    distname        scala-docs-${version}
87    use_xz          yes
88    extract.suffix  .txz
89    checksums       md5    0a6a0598e365a4dea2541efa3e9e5ef7 \
90                    sha1   ee59472421a8dda0ac5425744c1d97598bd8e29d \
91                    sha256 e9b5694255607ba069dcc0faa3ab1490164115ae000129c03100b196fce2025a
92
93    destroot {
94        xinstall -d -m 755 ${docscaladir}
95        file copy ${worksrcpath} ${docscaladir}/api
96    }
97}
98
99livecheck.type  regex
100livecheck.url   http://scala-lang.org/download/all.html
101livecheck.regex {/download/(2\.10\.\d+(?:\.\d+)*)\.html}
Note: See TracBrowser for help on using the repository browser.