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