# $Id$ PortSystem 1.0 PortGroup select 1.0 name scala2.10 version 2.10.5 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 79c0f6551ce62d651f700073e654e141 \ sha1 e981301c06e3d06f4b24c0b983fe0bc3ca86b850 \ sha256 918daf7de186305ff3c47bd0e6b03e74d6648c5239c050687b57b8fac2f87eb2 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 e895c4641ad8fba4b8a983c957bae948 \ sha1 8c17219f6641a4baf37020896fc49f66c2b0b212 \ sha256 61ac24e42dde11986041b415dd64bda3e5841a8467e52df31dd958675047247a destroot { xinstall -d -m 755 ${docscaladir} file copy ${worksrcpath} ${docscaladir}/api } }