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: ChangeLog scala-2.9.0.ebuild
Date: Wed, 18 May 2011 10:43:49
Message-Id: 20110518104338.B52B920054@flycatcher.gentoo.org
1 ali_bush 11/05/18 10:43:38
2
3 Modified: ChangeLog
4 Added: scala-2.9.0.ebuild
5 Log:
6 Version Bump.
7
8 (Portage version: 2.1.9.49/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.24 dev-lang/scala/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/ChangeLog?rev=1.24&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/ChangeLog?rev=1.24&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/ChangeLog?r1=1.23&r2=1.24
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v
20 retrieving revision 1.23
21 retrieving revision 1.24
22 diff -u -r1.23 -r1.24
23 --- ChangeLog 6 May 2011 16:13:38 -0000 1.23
24 +++ ChangeLog 18 May 2011 10:43:38 -0000 1.24
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/scala
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.23 2011/05/06 16:13:38 ali_bush Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.24 2011/05/18 10:43:38 ali_bush Exp $
30 +
31 +*scala-2.9.0 (18 May 2011)
32 +
33 + 18 May 2011; Alistair Bush <ali_bush@g.o> +scala-2.9.0.ebuild:
34 + Version Bump.
35
36 06 May 2011; Alistair Bush <ali_bush@g.o> scala-2.8.1.ebuild:
37 Remove deprecated ebeep and epause.
38
39
40
41 1.1 dev-lang/scala/scala-2.9.0.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/scala-2.9.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/scala-2.9.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: scala-2.9.0.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.9.0.ebuild,v 1.1 2011/05/18 10:43:38 ali_bush Exp $
51
52 EAPI="3"
53 JAVA_PKG_IUSE="doc examples source"
54 WANT_ANT_TASKS="ant-nodeps"
55 inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
56
57 MY_P="${P}.final-sources"
58
59 # creating the binary:
60 # JAVA_PKG_FORCE_VM="$available-1.5" USE="doc examples source" ebuild scala-*.ebuild compile
61 # cd $WORDKIR
62 # fix dist/latest link.
63 # tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO
64
65 DESCRIPTION="The Scala Programming Language"
66 HOMEPAGE="http://www.scala-lang.org/"
67 SRC_URI="!binary? ( http://www.scala-lang.org/downloads/distrib/files/${MY_P}.tgz )
68 binary? ( http://dev.gentoo.org/~ali_bush/distfiles/${P}-gentoo-binary.tar.bz2 )"
69 LICENSE="BSD"
70 SLOT="0"
71 KEYWORDS="~amd64 ~x86"
72 IUSE="binary emacs"
73 # one fails with 1.7, two with 1.4 (blackdown)
74 #RESTRICT="test"
75
76 DEPEND=">=virtual/jdk-1.6
77 java-virtuals/jdk-with-com-sun
78 !binary? (
79 dev-java/ant-contrib:0
80 dev-java/jline:0
81 )"
82 RDEPEND=">=virtual/jre-1.6
83 dev-java/jline:0
84 !dev-java/scala-bin"
85
86 PDEPEND="emacs? ( app-emacs/scala-mode )"
87
88 S="${WORKDIR}/${MY_P}"
89
90 pkg_setup() {
91 java-pkg-2_pkg_setup
92
93 if ! use binary; then
94 debug-print "Checking for sufficient physical RAM"
95
96 ewarn "This package can fail to build with memory allocation errors in some cases."
97 ewarn "If you are unable to build from sources, please try USE=binary"
98 ewarn "for this package. See bug #181390 for more information."
99
100 CHECKREQS_MEMORY="1532"
101
102 check_reqs
103 fi
104 }
105
106 java_prepare() {
107 if ! use binary; then
108 pushd lib &> /dev/null
109 # other jars are needed for bootstrap
110 #rm -v jline.jar ant/ant-contrib.jar #cldcapi10.jar midpapi10.jar msil.jar *.dll || die
111 rm -v ant/ant-contrib.jar || die
112 java-pkg_jar-from --into ant --build-only ant-contrib
113 popd &> /dev/null
114 java-pkg_jar-from jline
115 fi
116 }
117
118 src_compile() {
119 if ! use binary; then
120 #unset ANT_OPTS as this is set in the build.xml
121 #sets -X type variables which might come back to bite me
122 unset ANT_OPTS
123
124 # reported in bugzilla that multiple launches use less resources
125 # https://bugs.gentoo.org/show_bug.cgi?id=282023
126 eant all.clean
127 eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
128 newlibs newforkjoin build-opt
129 eant dist.done
130
131 #TODO figure out why build doesn't work with jline.
132 cp jline.jar dists/latest/lib/ || die
133 cp jline.jar lib/ || die
134 else
135 einfo "Skipping compilation, USE=binary is set."
136 fi
137 }
138
139 src_test() {
140 eant test.suite || die "Some tests aren't passed"
141 }
142
143 scala_launcher() {
144 local SCALADIR="/usr/share/${PN}"
145 local bcp="${SCALADIR}/lib/scala-library.jar"
146 java-pkg_dolauncher "${1}" --main "${2}" \
147 --java_args "-Xmx256M -Xms32M -Dscala.home=${SCALADIR} -Denv.emacs=${EMACS}"
148 }
149
150 src_install() {
151 cd dists/latest || die
152
153 local SCALADIR="/usr/share/${PN}/"
154
155 #sources are .scala so no use for java-pkg_dosrc
156 if use source; then
157 dodir "${SCALADIR}/src"
158 insinto "${SCALADIR}/src"
159 doins src/*-src.jar
160 fi
161
162 java-pkg_dojar lib/*.jar
163
164 doman man/man1/*.1 || die
165
166 #docs and examples are not contained in the binary tgz anymore
167 if ! use binary; then
168 local docdir="doc/${PN}-devel-docs"
169 dodoc doc/README ../../docs/TODO || die
170 if use doc; then
171 java-pkg_dojavadoc "${docdir}/api"
172 dohtml -r "${docdir}/tools" || die
173 fi
174
175 use examples && java-pkg_doexamples "${docdir}/examples"
176 fi
177
178 scala_launcher fsc scala.tools.nsc.CompileClient
179 scala_launcher scala scala.tools.nsc.MainGenericRunner
180 scala_launcher scalac scala.tools.nsc.Main
181 scala_launcher scaladoc scala.tools.nsc.ScalaDoc
182 scala_launcher scalap scala.tools.scalap.Main
183 }