summaryrefslogtreecommitdiff
blob: d7760f3755b307d2d86cbe4f2843026e03d16be5 (plain)
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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/scala-bin/scala-bin-1.2.0.1.ebuild,v 1.8 2010/12/15 07:07:47 ali_bush Exp $

inherit java-pkg-2

DESCRIPTION="The Scala Programming Language"
HOMEPAGE="http://scala.epfl.ch/"
SRC_URI="http://scala.epfl.ch/downloads/distrib/files/scala-1.2.0.1.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="x86 amd64"
IUSE=""
DEPEND=""
RDEPEND=">=virtual/jre-1.4
	!dev-lang/scala"
S=${WORKDIR}/scala-${PV}

src_compile() {

	jars=/usr/share/${PN}/lib

	sed -e "s§RUNTIME_SOURCES=.*§RUNTIME_SOURCES=\"/usr/share/${PF}/src\";§" \
		-e "s§RUNTIME_CLASSES=.*§RUNTIME_CLASSES=\"${jars}/scala.jar\";§" \
		-e "s§TOOLS_CLASSES=.*§TOOLS_CLASSES=\"${jars}/tools.jar\";§" \
		-e "s§FJBG_CLASSES=.*§FJBG_CLASSES=\"${jars}/fjbg.jar\";§" \
		-e "s§MSIL_CLASSES=.*§MSIL_CLASSES=\"${jars}/msil.jar\";§" \
		< bin/.scala_wrapper \
		> scala_wrapper

:; }

src_install() {

	exeinto /usr/lib/${PN}
	doexe scala_wrapper

	dodir /usr/bin

	for x in dtd2scala scalac scala-debug scaladoc-debug scalaint scalap scalarun-debug \
		scala scalac-debug scaladoc scala-info scalaint-debug scalarun scalatest ; do
		dosym /usr/lib/${PN}/scala_wrapper /usr/bin/$x
	done

	java-pkg_dojar lib/*.jar

	java-pkg_dohtml -r doc/api
	cp -r examples ${D}/usr/share/doc/${PF}
	dodoc doc/*.pdf
	dodoc README VERSION

	dodir /usr/share/${PF}
	cp -r src support ${D}/usr/share/${PF}

}