-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
97 lines (81 loc) · 3.16 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# $Id$
PortSystem 1.0
PortGroup select 1.0
name scala2.10
version 2.10.4
set branch [join [lrange [split ${version} .] 0 1] .]
categories lang java
license BSD
maintainers openmaintainer blair
description The Scala Programming Language
long_description \
Scala is a modern multi-paradigm programming language \
designed to express common programming patterns in a \
concise, elegant, and type-safe way. It smoothly \
integrates features of object-oriented and functional \
languages. It runs inside a Java Virtual Machine and \
is fully interoperable with Java.
homepage http://www.scala-lang.org/
platforms darwin
supported_archs noarch
master_sites ${homepage}files/archive/
use_configure no
build {}
set sharedir ${destroot}${prefix}/share
set docdir ${sharedir}/doc
set docscaladir ${docdir}/scala-${branch}
if {$subport == $name} {
depends_lib port:scala_select
select.group scala
select.file ${filespath}/${name}
distname scala-${version}
extract.suffix .tgz
checksums md5 11854f09c35312d9f6966e163e6e436c \
sha1 970f779f155719838e81a267a7418a958fd4c13f \
sha256 b46db638c5c6066eee21f00c447fc13d1dfedbfb60d07db544e79db67ba810c3
destroot {
set man1dir ${sharedir}/man/man1
set scaladir ${sharedir}/scala-${branch}
set bindir ${scaladir}/bin
xinstall -d -m 755 ${sharedir}
file copy ${worksrcpath} ${scaladir}
foreach f {fsc scala scalac scaladoc scalap} {
file attributes ${bindir}/${f} -permissions 0755
ln -s ../share/scala-${branch}/bin/${f} \
${destroot}${prefix}/bin/${f}-${branch}
}
file delete ${man1dir}
file rename ${scaladir}/man/man1 ${man1dir}
foreach f {fsc scala scalac scaladoc scalap} {
file rename ${man1dir}/${f}.1 ${man1dir}/${f}-${branch}.1
}
file delete -force ${scaladir}/man
xinstall -d -m 755 ${docdir}
file rename ${scaladir}/doc ${docscaladir}
xinstall -d -m 755 ${sharedir}/java
foreach f {akka-actors.jar
scala-actors.jar
scala-actors-migration.jar
scala-compiler.jar
scala-library.jar
scala-reflect.jar
scala-swing.jar
scalap.jar} {
set g [strsed ${f} "/.jar/-${branch}.jar/"]
ln -s ../scala-${branch}/lib/${f} ${sharedir}/java/${g}
}
}
}
subport ${name}-docs {
description The Scala Programming Language API docs
distname scala-docs-${version}
use_xz yes
extract.suffix .txz
checksums md5 eb495c772063437cfdf8c7515f1e5e64 \
sha1 3698b13407603984bd55a1e50da2b6cfa2e29e3c \
sha256 ca439effdc4f6f7adf0c8d5de26235272f4bceeb8bebce7bbf1db28867a0bdaa
destroot {
xinstall -d -m 755 ${docscaladir}
file copy ${worksrcpath} ${docscaladir}/api
}
}