summaryrefslogtreecommitdiff
blob: 47619175274516b64520524430ef83fed82c69bb (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
# Copyright 1999-2005 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.6 2005/07/11 00:34:41 agriffis Exp $

inherit java-pkg

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=">=virtual/jdk-1.4"
RDEPEND=">=virtual/jre-1.4"
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}

}