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

Last change on this file was 152778, checked in by blair@…, 10 months ago

scala2.9: add livecheck.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# $Id: Portfile 152778 2016-09-18 01:44:32Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup select 1.0
5
6name            scala2.9
7version         2.9.3
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    ${homepage}downloads/distrib/files/
25distname        scala-${version}
26extract.suffix  .tgz
27checksums       md5    0a59fddf6ec3e99dd42a0dac12b79a9c \
28                sha1   01bf9e2c854e2385b2bcef319840415867a00388 \
29                sha256 faaab229f78c945063e8fd31c045bc797c731194296d7a4f49863fd87fc4e7b9
30
31depends_lib     port:scala_select
32
33use_configure   no
34build           {}
35
36select.group    scala
37select.file     ${filespath}/${name}
38
39destroot {
40    set sharedir ${destroot}${prefix}/share
41    set man1dir ${sharedir}/man/man1
42    set scaladir ${sharedir}/scala-${branch}
43    set bindir ${scaladir}/bin
44    set docdir ${sharedir}/doc
45    set docscaladir ${docdir}/scala-${branch}
46
47    xinstall -d -m 755 ${sharedir}
48    file copy ${worksrcpath} ${scaladir}
49
50    foreach f {fsc scala scalac scaladoc scalap} {
51        file attributes ${bindir}/${f} -permissions 0755
52        ln -s ../share/scala-${branch}/bin/${f} \
53            ${destroot}${prefix}/bin/${f}-${branch}
54    }
55
56    file delete ${man1dir}
57    file rename ${scaladir}/man/man1 ${man1dir}
58    foreach f {fsc scala scalac scaladoc scalap} {
59        file rename ${man1dir}/${f}.1 ${man1dir}/${f}-${branch}.1
60    }
61    file delete -force ${scaladir}/man
62
63    xinstall -d -m 755 ${docdir}
64    file rename ${scaladir}/doc ${docscaladir}
65
66    xinstall -d -m 755 ${sharedir}/java
67    foreach f {scala-compiler.jar
68               scala-dbc.jar
69               scala-library.jar
70               scala-partest.jar
71               scala-swing.jar
72               scalacheck.jar
73               scalap.jar} {
74        set g [strsed ${f} "/.jar/-${branch}.jar/"]
75        ln -s ../scala-${branch}/lib/${f} ${sharedir}/java/${g}
76    }
77}
78
79livecheck.type  regex
80livecheck.url   http://scala-lang.org/download/all.html
81livecheck.regex {/download/(2\.9\.\d+(?:\.\d+)*)\.html}
Note: See TracBrowser for help on using the repository browser.