summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2008-01-21 12:41:37 +0000
committerVlastimil Babka <caster@gentoo.org>2008-01-21 12:41:37 +0000
commit09acd34951b4d93f030eae13a1a88cf05739fd90 (patch)
tree2301fa8ce3d628736b97606d3a002b4a695ccf49 /dev-lang
parentAdd local USE=binary description for dev-lang/scala. (diff)
downloadgentoo-2-09acd34951b4d93f030eae13a1a88cf05739fd90.tar.gz
gentoo-2-09acd34951b4d93f030eae13a1a88cf05739fd90.tar.bz2
gentoo-2-09acd34951b4d93f030eae13a1a88cf05739fd90.zip
Version bump. bug #202988. Add local binary USE flag to workaround memory requirements without need of separate scala-bin package, bug #181390.
(Portage version: 2.1.4)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/scala/ChangeLog13
-rw-r--r--dev-lang/scala/files/digest-scala-2.4.03
-rw-r--r--dev-lang/scala/files/digest-scala-2.5.13
-rw-r--r--dev-lang/scala/files/digest-scala-2.6.16
-rw-r--r--dev-lang/scala/files/scala-2.4.0-build.xml.patch79
-rw-r--r--dev-lang/scala/files/scala-2.6.1-build.xml.patch (renamed from dev-lang/scala/files/scala-2.5.1-build.xml.patch)30
-rw-r--r--dev-lang/scala/scala-2.4.0.ebuild105
-rw-r--r--dev-lang/scala/scala-2.5.1.ebuild105
-rw-r--r--dev-lang/scala/scala-2.6.1.ebuild135
9 files changed, 167 insertions, 312 deletions
diff --git a/dev-lang/scala/ChangeLog b/dev-lang/scala/ChangeLog
index 92d8ff3a890d..b5eded35998a 100644
--- a/dev-lang/scala/ChangeLog
+++ b/dev-lang/scala/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-lang/scala
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.5 2007/12/17 17:48:13 caleb Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.6 2008/01/21 12:41:36 caster Exp $
+
+*scala-2.6.1 (21 Jan 2008)
+
+ 21 Jan 2008; Vlastimil Babka <caster@gentoo.org>
+ -files/scala-2.4.0-build.xml.patch, -files/scala-2.5.1-build.xml.patch,
+ +files/scala-2.6.1-build.xml.patch, -scala-2.4.0.ebuild,
+ -scala-2.5.1.ebuild, +scala-2.6.1.ebuild:
+ Version bump. bug #202988. Add local binary USE flag to workaround memory
+ requirements without need of separate scala-bin package, bug #181390.
*scala-2.6.0 (17 Dec 2007)
diff --git a/dev-lang/scala/files/digest-scala-2.4.0 b/dev-lang/scala/files/digest-scala-2.4.0
deleted file mode 100644
index 910d0137dd3f..000000000000
--- a/dev-lang/scala/files/digest-scala-2.4.0
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 14cf470ffc730161f7c8810f1545d9c2 scala-2.4.0-final-sources.tgz 7882898
-RMD160 7430c39beb877b96cfb9e7e0c8509e0ce601e7c1 scala-2.4.0-final-sources.tgz 7882898
-SHA256 a3fc202bdc4988697a830ab1cace8c30350fdf1b6f46d8860289efc49de5b486 scala-2.4.0-final-sources.tgz 7882898
diff --git a/dev-lang/scala/files/digest-scala-2.5.1 b/dev-lang/scala/files/digest-scala-2.5.1
deleted file mode 100644
index 1eb8c6faa2d8..000000000000
--- a/dev-lang/scala/files/digest-scala-2.5.1
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 6e0c63a6e8d7d1612d1b9c53649388b0 scala-2.5.1-final-sources.tgz 24199025
-RMD160 550a0b189e227551330f3642a93be8ab95ea71f0 scala-2.5.1-final-sources.tgz 24199025
-SHA256 cc2aec40da68666d29f2298de2c3909d72dc653c75d620a1a53fc4452a95f0a4 scala-2.5.1-final-sources.tgz 24199025
diff --git a/dev-lang/scala/files/digest-scala-2.6.1 b/dev-lang/scala/files/digest-scala-2.6.1
new file mode 100644
index 000000000000..85780632981d
--- /dev/null
+++ b/dev-lang/scala/files/digest-scala-2.6.1
@@ -0,0 +1,6 @@
+MD5 34851e6b001955b169529397d499f17f scala-2.6.1-final-sources.tgz 26459400
+RMD160 e7f2e12d52e1a371c92f46165a3845af98a43c85 scala-2.6.1-final-sources.tgz 26459400
+SHA256 04cac1fff3550d362ea2f1ff4cdcaef9b45819aadc39ce599bfa0f465110dd4e scala-2.6.1-final-sources.tgz 26459400
+MD5 3ea29a63a16a1e8265bb64cfd886f15c scala-2.6.1-gentoo-binary.tar.bz2 9440893
+RMD160 f958b094ba1202644022de2275ad57faa5ba2c0f scala-2.6.1-gentoo-binary.tar.bz2 9440893
+SHA256 12443ed9cd42dcc740ee27d2b69f7c91f0104c1893152579b47426284c1a79c0 scala-2.6.1-gentoo-binary.tar.bz2 9440893
diff --git a/dev-lang/scala/files/scala-2.4.0-build.xml.patch b/dev-lang/scala/files/scala-2.4.0-build.xml.patch
deleted file mode 100644
index f542a80c2d07..000000000000
--- a/dev-lang/scala/files/scala-2.4.0-build.xml.patch
+++ /dev/null
@@ -1,79 +0,0 @@
---- build.xml.orig 2007-03-21 17:53:06.000000000 +0100
-+++ build.xml 2007-05-04 13:53:33.000000000 +0200
-@@ -86,11 +86,13 @@
- <!-- Setting-up Ant contrib tasks -->
- <taskdef resource="net/sf/antcontrib/antlib.xml"
- classpath="${ant-contrib.jar}"/>
-+ <!--
- <fail message="External library ${ant-contrib.jar} requires the optional Ant tasks to be installed">
- <condition><not><and>
- <available file="${ant.home}/lib/ant-nodeps.jar"/>
- </and></not></condition>
- </fail>
-+ -->
- <!-- Making sure enough memory is available -->
- <propertyregex
- property="memory.set" input="${env.ANT_OPTS}" select="\1"
-@@ -784,7 +786,7 @@
- DOCUMENTATION
- ============================================================================ -->
-
-- <target name="docs" depends="setup.quick"
-+ <target name="docs" depends="setup.quick" if="do.docs"
- description="Generated the API for library sources">
- <mkdir dir="${api-lib.dir}"/>
- <quickdoc
-@@ -802,7 +804,7 @@
- </quickdoc>
- </target>
-
-- <target name="docs.compiler" depends="setup.quick"
-+ <target name="docs.compiler" depends="setup.quick" if="do.docs"
- description="Generated the API for compiler sources">
- <mkdir dir="${api-comp.dir}"/>
- <quickdoc
-@@ -886,7 +888,7 @@
-
- <target name="dist.patch" depends="init">
- <propertyfile file="${number.file}">
-- <entry key="version.patch" type="int" default="0" operation="+"/>
-+ <entry key="version.patch" type="int" default="0"/>
- </propertyfile>
- <property file="${number.file}"/>
- <property name="version.number"
-@@ -896,7 +898,7 @@
-
- <target name="dist.minor" depends="init">
- <propertyfile file="${number.file}">
-- <entry key="version.minor" type="int" default="0" operation="+"/>
-+ <entry key="version.minor" type="int" default="0"/>
- <entry key="version.patch" type="int" value="0"/>
- </propertyfile>
- <property file="${number.file}"/>
-@@ -1045,7 +1047,7 @@
- <copy todir="${dist.current.dir}/doc/scala">
- <fileset dir="${docs.dir}" includes="README,LICENSE"/>
- </copy>
-- <copy todir="${dist.current.dir}/doc/scala/api">
-+ <copy todir="${dist.current.dir}/doc/scala/api" failonerror="false">
- <fileset dir="${api-lib.dir}"/>
- </copy>
- <copy todir="${dist.current.dir}/doc/scala/examples">
-@@ -1066,7 +1068,7 @@
- </target>
-
- <!-- Create the SBaz packages -->
-- <target name="build.sbaz" depends="build.dist">
-+ <target name="build.sbaz" depends="build.dist" if="do.archive">
- <property name="sbaz.universe" value="http://scala.epfl.ch/downloads/packages"/>
- <mkdir dir="${dist.dir}"/>
- <!-- Create the Scala library package -->
-@@ -1120,7 +1122,7 @@
- </quicksbaz>
- </target>
-
-- <target name="build.archive" depends="build.dist">
-+ <target name="build.archive" depends="build.dist" if="do.archive">
- <tar
- destfile="${dist.dir}/scala-${version.number}.tgz"
- compression="gzip">
diff --git a/dev-lang/scala/files/scala-2.5.1-build.xml.patch b/dev-lang/scala/files/scala-2.6.1-build.xml.patch
index fe5aa6533f33..9c5fd40a1501 100644
--- a/dev-lang/scala/files/scala-2.5.1-build.xml.patch
+++ b/dev-lang/scala/files/scala-2.6.1-build.xml.patch
@@ -1,20 +1,20 @@
---- build.xml.orig 2007-06-18 09:19:50.000000000 -0400
-+++ build.xml 2007-06-18 09:20:19.000000000 -0400
-@@ -85,11 +85,13 @@
+--- build.xml 2007-12-19 14:34:43.000000000 +0100
++++ build.xml 2008-01-20 18:00:33.000000000 +0100
+@@ -108,11 +108,13 @@
<!-- Setting-up Ant contrib tasks -->
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${ant-contrib.jar}"/>
-+ <!--
++ <!--
<fail message="External library ${ant-contrib.jar} requires the optional Ant tasks to be installed">
<condition><not><and>
<available file="${ant.home}/lib/ant-nodeps.jar"/>
</and></not></condition>
</fail>
-+ -->
++ -->
</target>
<!-- ===========================================================================
-@@ -784,7 +786,7 @@
+@@ -1410,7 +1412,7 @@
DOCUMENTATION
============================================================================ -->
@@ -23,7 +23,7 @@
description="Generated the API for library sources">
<mkdir dir="${api-lib.dir}"/>
<quickdoc
-@@ -802,7 +804,7 @@
+@@ -1428,7 +1430,7 @@
</quickdoc>
</target>
@@ -32,7 +32,7 @@
description="Generated the API for compiler sources">
<mkdir dir="${api-comp.dir}"/>
<quickdoc
-@@ -886,7 +888,7 @@
+@@ -1513,7 +1515,7 @@
<target name="dist.patch" depends="init">
<propertyfile file="${number.file}">
@@ -41,7 +41,7 @@
</propertyfile>
<property file="${number.file}"/>
<property name="version.number"
-@@ -896,7 +898,7 @@
+@@ -1523,7 +1525,7 @@
<target name="dist.minor" depends="init">
<propertyfile file="${number.file}">
@@ -50,7 +50,7 @@
<entry key="version.patch" type="int" value="0"/>
</propertyfile>
<property file="${number.file}"/>
-@@ -1045,7 +1047,7 @@
+@@ -1729,7 +1731,7 @@
<copy todir="${dist.current.dir}/doc/scala">
<fileset dir="${docs.dir}" includes="README,LICENSE"/>
</copy>
@@ -59,17 +59,17 @@
<fileset dir="${api-lib.dir}"/>
</copy>
<copy todir="${dist.current.dir}/doc/scala/examples">
-@@ -1066,7 +1068,7 @@
+@@ -1750,7 +1752,7 @@
</target>
<!-- Create the SBaz packages -->
-- <target name="build.sbaz" depends="build.dist">
+- <target name="build.sbaz" depends="build.dist,msil,cldc,android">
+ <target name="build.sbaz" depends="build.dist" if="do.archive">
- <property name="sbaz.universe" value="http://scala.epfl.ch/downloads/packages"/>
+ <property name="sbaz.universe" value="http://www.scala-lang.org/downloads/packages"/>
<mkdir dir="${dist.dir}"/>
<!-- Create the Scala library package -->
-@@ -1120,7 +1122,7 @@
- </quicksbaz>
+@@ -1846,7 +1848,7 @@
+ </then></if>
</target>
- <target name="build.archive" depends="build.dist">
diff --git a/dev-lang/scala/scala-2.4.0.ebuild b/dev-lang/scala/scala-2.4.0.ebuild
deleted file mode 100644
index 0dddbc380cd6..000000000000
--- a/dev-lang/scala/scala-2.4.0.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.4.0.ebuild,v 1.2 2007/05/06 00:38:40 ali_bush Exp $
-
-JAVA_PKG_IUSE="doc examples source"
-WANT_ANT_TASKS="ant-nodeps"
-inherit check-reqs java-pkg-2 java-ant-2 versionator
-
-MY_P="${P}-final"
-
-DESCRIPTION="The Scala Programming Language"
-HOMEPAGE="http://www.scala-lang.org/"
-SRC_URI="http://www.scala-lang.org/downloads/distrib/files/${MY_P}-sources.tgz"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-DEPEND=">=virtual/jdk-1.5
- dev-java/ant-contrib"
-RDEPEND=">=virtual/jre-1.5"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- java-pkg-2_pkg_setup
-
- debug-print "Checking for sufficient physical RAM"
-
- if use amd64; then
- CHECKREQS_MEMORY="1024"
- else
- CHECKREQS_MEMORY="512"
- fi
- check_reqs
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # remove check for ant-nodeps.jar in ant-core/lib; make docs opt-in;
- # don't increase version; don't create dist archives
- epatch "${FILESDIR}/${P}-build.xml.patch"
-
- cd lib || die
- # other jars are needed for bootstrap
- rm -v ant-contrib.jar || die
- java-pkg_jar-from --build-only ant-contrib
-}
-
-src_compile() {
- if use amd64; then
- export ANT_OPTS="-Xmx1024M -Xms1024M"
- else
- export ANT_OPTS="-Xmx512M -Xms512M"
- fi
- local target
- if [[ "$(get_version_component_range 3)" == "0" ]];
- then
- target="minor"
- else
- target="patch"
- fi
- eant dist.${target} $(use_doc -Ddo.docs=true)
-}
-
-src_test() {
- bash ${S}/test/scalatest || die "Some tests aren't passed"
-}
-
-scala_launcher() {
- local SCALADIR="/usr/share/${PN}"
- local bcp="${SCALADIR}/lib/scala-library.jar"
- java-pkg_dolauncher "${1}" --main "${2}" ${3} \
- --java_args "-Xmx256M -Xms16M -Xbootclasspath/a:\\\"${bcp}\\\" -Dscala.home=\\\"${SCALADIR}\\\" -Denv.classpath=\\\"\${CLASSPATH}\\\""
-}
-
-src_install() {
- cd dists/${MY_P} || die
- local SCALADIR="/usr/share/${PN}/"
-
- # sources are .scala so no use for java-pkg_dosrc
- if use source; then
- dodir "${SCALADIR}/src"
- insinto "${SCALADIR}/src"
- doins lib/*-src.jar
- fi
-
- rm lib/*-src.jar
- java-pkg_dojar lib/*.jar
-
- doman man/man1/*.1 || die
- local docdir="doc/${PN}"
- dodoc "${docdir}"/{LICENSE,README} ../../docs/TODO || die
- if use doc; then
- java-pkg_dojavadoc "${docdir}/api"
- dohtml -r "${docdir}/tools" || die
- fi
- use examples && java-pkg_doexamples "${docdir}/examples"
-
- scala_launcher fsc scala.tools.nsc.CompileClient
- scala_launcher scala scala.tools.nsc.MainGenericRunner
- scala_launcher scalac scala.tools.nsc.Main
- scala_launcher scaladoc scala.tools.nsc.Main "--pkg_args -doc"
-}
diff --git a/dev-lang/scala/scala-2.5.1.ebuild b/dev-lang/scala/scala-2.5.1.ebuild
deleted file mode 100644
index 82c49fa980b4..000000000000
--- a/dev-lang/scala/scala-2.5.1.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.5.1.ebuild,v 1.2 2007/06/18 19:30:26 caster Exp $
-
-JAVA_PKG_IUSE="doc examples source"
-WANT_ANT_TASKS="ant-nodeps"
-inherit check-reqs java-pkg-2 java-ant-2 versionator
-
-MY_P="${P}-final"
-
-DESCRIPTION="The Scala Programming Language"
-HOMEPAGE="http://www.scala-lang.org/"
-SRC_URI="http://www.scala-lang.org/downloads/distrib/files/${MY_P}-sources.tgz"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-DEPEND=">=virtual/jdk-1.5
- dev-java/ant-contrib"
-RDEPEND=">=virtual/jre-1.5"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- java-pkg-2_pkg_setup
-
- debug-print "Checking for sufficient physical RAM"
-
- if use amd64; then
- CHECKREQS_MEMORY="1024"
- else
- CHECKREQS_MEMORY="512"
- fi
- check_reqs
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # remove check for ant-nodeps.jar in ant-core/lib; make docs opt-in;
- # don't increase version; don't create dist archives
- epatch "${FILESDIR}/${P}-build.xml.patch"
-
- cd lib || die
- # other jars are needed for bootstrap
- rm -v ant-contrib.jar || die
- java-pkg_jar-from --build-only ant-contrib
-}
-
-src_compile() {
- if use amd64; then
- export ANT_OPTS="-Xmx1024M -Xms1024M"
- else
- export ANT_OPTS="-Xmx512M -Xms512M -Xss1024k"
- fi
- local target
- if [[ "$(get_version_component_range 3)" == "0" ]];
- then
- target="minor"
- else
- target="patch"
- fi
- eant dist.${target} $(use_doc -Ddo.docs=true)
-}
-
-src_test() {
- bash ${S}/test/scalatest || die "Some tests aren't passed"
-}
-
-scala_launcher() {
- local SCALADIR="/usr/share/${PN}"
- local bcp="${SCALADIR}/lib/scala-library.jar"
- java-pkg_dolauncher "${1}" --main "${2}" ${3} \
- --java_args "-Xmx256M -Xms16M -Xbootclasspath/a:\\\"${bcp}\\\" -Dscala.home=\\\"${SCALADIR}\\\" -Denv.classpath=\\\"\${CLASSPATH}\\\""
-}
-
-src_install() {
- cd dists/${MY_P} || die
- local SCALADIR="/usr/share/${PN}/"
-
- # sources are .scala so no use for java-pkg_dosrc
- if use source; then
- dodir "${SCALADIR}/src"
- insinto "${SCALADIR}/src"
- doins lib/*-src.jar
- fi
-
- rm lib/*-src.jar
- java-pkg_dojar lib/*.jar
-
- doman man/man1/*.1 || die
- local docdir="doc/${PN}"
- dodoc "${docdir}"/{LICENSE,README} ../../docs/TODO || die
- if use doc; then
- java-pkg_dojavadoc "${docdir}/api"
- dohtml -r "${docdir}/tools" || die
- fi
- use examples && java-pkg_doexamples "${docdir}/examples"
-
- scala_launcher fsc scala.tools.nsc.CompileClient
- scala_launcher scala scala.tools.nsc.MainGenericRunner
- scala_launcher scalac scala.tools.nsc.Main
- scala_launcher scaladoc scala.tools.nsc.Main "--pkg_args -doc"
-}
diff --git a/dev-lang/scala/scala-2.6.1.ebuild b/dev-lang/scala/scala-2.6.1.ebuild
new file mode 100644
index 000000000000..1a915b27bc1e
--- /dev/null
+++ b/dev-lang/scala/scala-2.6.1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.6.1.ebuild,v 1.1 2008/01/21 12:41:36 caster Exp $
+
+JAVA_PKG_IUSE="doc examples source"
+WANT_ANT_TASKS="ant-nodeps"
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${P}-final"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.4" USE="doc examples source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 dists docs/TODO
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary? ( http://www.scala-lang.org/downloads/distrib/files/${MY_P}-sources.tgz )
+ binary? ( mirror://gentoo/${P}-gentoo-binary.tar.bz2 )"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="binary"
+# one fails with 1.7, two with 1.4 (blackdown)
+RESTRICT="test"
+
+DEPEND=">=virtual/jdk-1.4
+ !binary? (
+ dev-java/ant-contrib
+ dev-java/jline
+ )"
+RDEPEND=">=virtual/jre-1.4
+ dev-java/jline"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+ ebeep 3
+ epause 5
+
+ if use amd64; then
+ CHECKREQS_MEMORY="1024"
+ else
+ CHECKREQS_MEMORY="512"
+ fi
+ check_reqs
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ if ! use binary; then
+ # remove check for ant-nodeps.jar in ant-core/lib; make docs opt-in;
+ # don't increase version; don't create dist archives
+ epatch "${FILESDIR}/${P}-build.xml.patch"
+
+ cd lib || die
+ # other jars are needed for bootstrap
+ rm -v ant-contrib.jar jline.jar #cldcapi10.jar midpapi10.jar msil.jar *.dll || die
+ java-pkg_jar-from --build-only ant-contrib
+ java-pkg_jar-from jline
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ if use amd64; then
+ export ANT_OPTS="-Xmx1024M -Xms1024M"
+ else
+ export ANT_OPTS="-Xmx512M -Xms512M -Xss1024k"
+ fi
+ local target
+ if [[ "$(get_version_component_range 3)" == "0" ]];
+ then
+ target="minor"
+ else
+ target="patch"
+ fi
+ eant dist.${target} $(use_doc -Ddo.docs=true)
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ bash test/scalatest || die "Some tests aren't passed"
+}
+
+scala_launcher() {
+ local SCALADIR="/usr/share/${PN}"
+ local bcp="${SCALADIR}/lib/scala-library.jar"
+ java-pkg_dolauncher "${1}" --main "${2}" ${3} \
+ --java_args "-Xmx256M -Xms16M -Xbootclasspath/a:\\\"${bcp}\\\" -Dscala.home=\\\"${SCALADIR}\\\" -Denv.classpath=\\\"\${CLASSPATH}\\\""
+}
+
+src_install() {
+ cd dists/${MY_P} || die
+ local SCALADIR="/usr/share/${PN}/"
+
+ # sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins lib/*-src.jar
+ fi
+
+ rm lib/*-src.jar || die
+ java-pkg_dojar lib/*.jar
+ use binary && java-pkg_register-dependency jline
+
+ doman man/man1/*.1 || die
+ local docdir="doc/${PN}"
+ dodoc "${docdir}/README" ../../docs/TODO || die
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools" || die
+ fi
+
+ use examples && java-pkg_doexamples "${docdir}/examples"
+
+ scala_launcher fsc scala.tools.nsc.CompileClient
+ scala_launcher scala scala.tools.nsc.MainGenericRunner
+ scala_launcher scalac scala.tools.nsc.Main
+ scala_launcher scaladoc scala.tools.nsc.Main "--pkg_args -doc"
+}