Gentoo Archives: gentoo-commits

From: "Alistair Bush (ali_bush)" <ali_bush@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/scala: scala-2.7.4.ebuild ChangeLog
Date: Thu, 30 Apr 2009 19:29:41
Message-Id: E1Lzbwx-0001yB-9Y@stork.gentoo.org
1 ali_bush 09/04/30 19:29:39
2
3 Modified: ChangeLog
4 Added: scala-2.7.4.ebuild
5 Log:
6 Version Bump.
7 (Portage version: 2.1.6.11/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.15 dev-lang/scala/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/scala/ChangeLog?rev=1.15&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/scala/ChangeLog?rev=1.15&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/scala/ChangeLog?r1=1.14&r2=1.15
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v
19 retrieving revision 1.14
20 retrieving revision 1.15
21 diff -u -r1.14 -r1.15
22 --- ChangeLog 14 Feb 2009 21:05:59 -0000 1.14
23 +++ ChangeLog 30 Apr 2009 19:29:39 -0000 1.15
24 @@ -1,6 +1,11 @@
25 # ChangeLog for dev-lang/scala
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.14 2009/02/14 21:05:59 ali_bush Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.15 2009/04/30 19:29:39 ali_bush Exp $
29 +
30 +*scala-2.7.4 (30 Apr 2009)
31 +
32 + 30 Apr 2009; Alistair Bush <ali_bush@g.o> +scala-2.7.4.ebuild:
33 + Version Bump to 2.7.4.
34
35 14 Feb 2009; Alistair Bush <ali_bush@g.o> scala-2.7.3-r1.ebuild:
36 Add block on scala-bin. see #247401.
37
38
39
40 1.1 dev-lang/scala/scala-2.7.4.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/scala/scala-2.7.4.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/scala/scala-2.7.4.ebuild?rev=1.1&content-type=text/plain
44
45 Index: scala-2.7.4.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.7.4.ebuild,v 1.1 2009/04/30 19:29:39 ali_bush Exp $
50
51 JAVA_PKG_IUSE="doc examples source"
52 WANT_ANT_TASKS="ant-nodeps"
53 inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
54
55 MY_P="${P}.final-sources"
56
57 # creating the binary:
58 # JAVA_PKG_FORCE_VM="$available-1.5" USE="doc examples source" ebuild scala-*.ebuild compile
59 # cd $WORDKIR
60 # fix dist/latest link.
61 # tar -cjf $DISTDIR/scala-$PV-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO
62
63 DESCRIPTION="The Scala Programming Language"
64 HOMEPAGE="http://www.scala-lang.org/"
65 SRC_URI="!binary? ( http://www.scala-lang.org/downloads/distrib/files/${MY_P}.tgz )
66 binary? ( mirror://gentoo/${P}-gentoo-binary.tar.bz2 )"
67 LICENSE="BSD"
68 SLOT="0"
69 KEYWORDS="~amd64 ~x86"
70 IUSE="binary"
71 # one fails with 1.7, two with 1.4 (blackdown)
72 RESTRICT="test"
73
74 DEPEND=">=virtual/jdk-1.5
75 !binary? (
76 dev-java/ant-contrib
77 dev-java/jline
78 )"
79 RDEPEND=">=virtual/jre-1.5
80 dev-java/jline"
81
82 S="${WORKDIR}/${MY_P}"
83
84 pkg_setup() {
85 java-pkg-2_pkg_setup
86
87 if ! use binary; then
88 debug-print "Checking for sufficient physical RAM"
89
90 ewarn "This package can fail to build with memory allocation errors in some cases."
91 ewarn "If you are unable to build from sources, please try USE=binary"
92 ewarn "for this package. See bug #181390 for more information."
93 ebeep 3
94 epause 5
95
96 if use amd64; then
97 CHECKREQS_MEMORY="1024"
98 else
99 CHECKREQS_MEMORY="512"
100 fi
101 check_reqs
102 fi
103 }
104
105 src_unpack() {
106 unpack ${A}
107 cd "${S}"
108
109 if ! use binary; then
110 cd lib || die
111 # other jars are needed for bootstrap
112 rm -v jline.jar #cldcapi10.jar midpapi10.jar msil.jar *.dll || die
113 java-pkg_jar-from --build-only ant-contrib
114 java-pkg_jar-from jline
115 fi
116 }
117
118 src_compile() {
119 if ! use binary; then
120 if use amd64; then
121 export ANT_OPTS="-Xmx1024M -Xms1024M"
122 else
123 export ANT_OPTS="-Xmx512M -Xms512M -Xss1024k"
124 fi
125
126 #Try setting -Djava.flags="${ANT_OPTS}"
127 eant clean docsclean dist.done $(use_doc docs)
128 else
129 einfo "Skipping compilation, USE=binary is set."
130 fi
131 }
132
133 src_test() {
134 bash test/scalatest || die "Some tests aren't passed"
135 }
136
137 scala_launcher() {
138 local SCALADIR="/usr/share/${PN}"
139 local bcp="${SCALADIR}/lib/scala-library.jar"
140 java-pkg_dolauncher "${1}" --main "${2}" ${3} \
141 --java_args "-Xmx256M -Xms16M -Xbootclasspath/a:${bcp} -Dscala.home=\\\"${SCALADIR}\\\" -Denv.classpath=\\\"\${CLASSPATH}\\\""
142 }
143
144 src_install() {
145 cd dists/latest || die
146
147 local SCALADIR="/usr/share/${PN}/"
148
149 #sources are .scala so no use for java-pkg_dosrc
150 if use source; then
151 dodir "${SCALADIR}/src"
152 insinto "${SCALADIR}/src"
153 doins src/*-src.jar
154 fi
155
156 java-pkg_dojar lib/*.jar
157 use binary && java-pkg_register-dependency jline
158
159 doman man/man1/*.1 || die
160 local docdir="doc/${PN}-devel-docs"
161 dodoc doc/README ../../docs/TODO || die
162 if use doc; then
163 java-pkg_dojavadoc "${docdir}/api"
164 dohtml -r "${docdir}/tools" || die
165 fi
166
167 use examples && java-pkg_doexamples "${docdir}/examples"
168
169 scala_launcher fsc scala.tools.nsc.CompileClient
170 scala_launcher scala scala.tools.nsc.MainGenericRunner
171 scala_launcher scalac scala.tools.nsc.Main
172 scala_launcher scaladoc scala.tools.nsc.Main "--pkg_args -doc"
173 }