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

Last change on this file was 149249, checked in by blair@…, 2 years 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
RevLine 
[60485]1# $Id: Portfile 149249 2016-06-07 18:21:32Z blair@macports.org $
2
3PortSystem 1.0
[72207]4PortGroup select 1.0
[60485]5
[95005]6name            scala2.10
[149249]7version         2.10.6
[101383]8set branch      [join [lrange [split ${version} .] 0 1] .]
[60485]9categories      lang java
[94943]10license         BSD
[94572]11maintainers     openmaintainer blair
[60485]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 \
[60505]19                is fully interoperable with Java.
[60485]20homepage        http://www.scala-lang.org/
21platforms       darwin
[72217]22supported_archs noarch
[60485]23
[149249]24master_sites    https://downloads.lightbend.com/scala/${version}
[60485]25
26use_configure   no
27build           {}
28
[102152]29set sharedir     ${destroot}${prefix}/share
30set docdir       ${sharedir}/doc
31set docscaladir  ${docdir}/scala-${branch}
[72207]32
[102152]33if {$subport == $name} {
34    depends_lib     port:scala_select
35    select.group    scala
36    select.file     ${filespath}/${name}
[60485]37
[102152]38    distname        scala-${version}
39    extract.suffix  .tgz
[149249]40    checksums       md5    d79dc9fdc627b73289306bdaec81ca98 \
41                    sha1   3a2d797410dcf0f520181412bf51530275b979ce \
42                    sha256 54adf583dae6734d66328cafa26d9fa03b8c4cf607e27b9f3915f96e9bcd2d67
[60485]43
[102152]44    destroot {
45        set man1dir ${sharedir}/man/man1
46        set scaladir ${sharedir}/scala-${branch}
47        set bindir ${scaladir}/bin
[60485]48
[102152]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        }
[95464]80    }
[102152]81}
[60485]82
[102152]83subport ${name}-docs {
84    description     The Scala Programming Language API docs
[91647]85
[102152]86    distname        scala-docs-${version}
87    use_xz          yes
88    extract.suffix  .txz
[149249]89    checksums       md5    0a6a0598e365a4dea2541efa3e9e5ef7 \
90                    sha1   ee59472421a8dda0ac5425744c1d97598bd8e29d \
91                    sha256 e9b5694255607ba069dcc0faa3ab1490164115ae000129c03100b196fce2025a
[102152]92
93    destroot {
94        xinstall -d -m 755 ${docscaladir}
95        file copy ${worksrcpath} ${docscaladir}/api
[95464]96    }
[60485]97}
[149245]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.