Gentoo Archives: gentoo-commits

From: "Mark Wright (gienah)" <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/scala: scala-2.11.4.ebuild ChangeLog
Date: Thu, 27 Nov 2014 04:05:14
Message-Id: 20141127040509.1795EAFEA@oystercatcher.gentoo.org
1 gienah 14/11/27 04:05:09
2
3 Modified: ChangeLog
4 Added: scala-2.11.4.ebuild
5 Log:
6 Bump scala to 2.11.4
7
8 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
9
10 Revision Changes Path
11 1.42 dev-lang/scala/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/ChangeLog?rev=1.42&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/ChangeLog?rev=1.42&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/ChangeLog?r1=1.41&r2=1.42
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v
20 retrieving revision 1.41
21 retrieving revision 1.42
22 diff -u -r1.41 -r1.42
23 --- ChangeLog 26 Nov 2014 02:44:19 -0000 1.41
24 +++ ChangeLog 27 Nov 2014 04:05:09 -0000 1.42
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/scala
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.41 2014/11/26 02:44:19 gienah Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.42 2014/11/27 04:05:09 gienah Exp $
30 +
31 +*scala-2.11.4 (27 Nov 2014)
32 +
33 + 27 Nov 2014; Mark Wright <gienah@g.o> +scala-2.11.4.ebuild:
34 + Bump scala to 2.11.4
35
36 26 Nov 2014; Mark Wright <gienah@g.o> scala-2.11.2.ebuild:
37 Thanks to zmedico for fixing and reporting Bug 530510 - dev-lang/scala-2.11.2:
38
39
40
41 1.1 dev-lang/scala/scala-2.11.4.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/scala-2.11.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/scala/scala-2.11.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: scala-2.11.4.ebuild
47 ===================================================================
48 # Copyright 1999-2014 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.11.4.ebuild,v 1.1 2014/11/27 04:05:09 gienah Exp $
51
52 EAPI="5"
53
54 JAVA_PKG_IUSE="doc source"
55 JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
56 EANT_TEST_TARGET="test.suite"
57
58 inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
59
60 MY_P="${PN}-sources-${PV}"
61
62 # creating the binary:
63 # JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
64 # cd $WORDKIR
65 # tar -cjf scala-2.11.4-gentoo-binary.tar.bz2 scala-2.11.4/build/pack/bin \
66 # scala-2.11.4/build/pack/lib/ scala-2.11.4/build/pack/man \
67 # scala-2.11.4/src/actors/ scala-2.11.4/src/forkjoin/ \
68 # scala-2.11.4/src/library scala-2.11.4/src/library-aux/ \
69 # scala-2.11.4/src/reflect/ scala-2.11.4/docs/TODO \
70 # scala-2.11.4/doc/README scala-2.11.4/build/scaladoc/compiler
71
72 # In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
73 # to search for .desired.sha1 files, which contain sha1 hashes that are appended
74 # to ${BURI} along with the subdirectory and filename to form the list of jar files
75 # listed in SRC_URI. The output of this find command can be hacked into the desired format:
76 # find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
77 # After editing it into the desired format: sort -t / -k 3 file
78
79 BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
80
81 declare -a JURI=(
82 "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
83 "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
84 "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
85 "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
86 "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
87 "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
88 "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
89 "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
90 "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
91 "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
92 "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
93 "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
94 "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
95 "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
96 "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
97 "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
98 "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
99 )
100
101 DESCRIPTION="The Scala Programming Language"
102 HOMEPAGE="http://www.scala-lang.org/"
103 SRC_URI="!binary?
104 ( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
105 ${JURI[@]}
106 http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
107 )
108 binary? ( http://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
109
110 LICENSE="BSD"
111 SLOT="0/${PV}"
112 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
113
114 IUSE="binary emacs"
115
116 COMMON_DEP="dev-java/ant-core:0
117 dev-java/hawtjni-runtime:0"
118
119 DEPEND="${COMMON_DEP}
120 java-virtuals/jdk-with-com-sun:0
121 !binary? (
122 >=virtual/jdk-1.6.0
123 <virtual/jdk-1.9.0
124 dev-java/ant-core:0
125 dev-java/ant-contrib:0
126 dev-java/ant-nodeps:0
127 media-gfx/graphviz
128 )
129 binary? (
130 >=virtual/jdk-1.7.0
131 <virtual/jdk-1.9.0
132 )
133 app-arch/xz-utils:0"
134
135 RDEPEND="${COMMON_DEP}
136 >=virtual/jre-1.6
137 !dev-java/scala-bin:0"
138
139 PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
140
141 S="${WORKDIR}/${P}"
142
143 CHECKREQS_MEMORY="1532M"
144
145 pkg_setup() {
146 java-pkg-2_pkg_setup
147
148 if ! use binary; then
149 debug-print "Checking for sufficient physical RAM"
150
151 ewarn "This package can fail to build with memory allocation errors in some cases."
152 ewarn "If you are unable to build from sources, please try USE=binary"
153 ewarn "for this package. See bug #181390 for more information."
154
155 check-reqs_pkg_setup
156 fi
157 }
158
159 src_unpack() {
160 # Unpack tar files only.
161 for f in ${A} ; do
162 [[ ${f} == *".tar."* ]] && unpack ${f}
163 done
164 }
165
166 java_prepare() {
167 java-pkg_getjars ant-core,hawtjni-runtime
168
169 if ! use binary; then
170 local a
171 for a in "${JURI[@]}"
172 do
173 echo "${a}"
174 local g="${a/* -> /}"
175 echo "${g}"
176 local j="${a/ -> */}"
177 echo "${j}"
178 cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
179 done
180 # gentoo patch (by gienah) to stop it calling git log in the build
181 epatch "${FILESDIR}/${P}-no-git.patch"
182 # Note: to bump scala, some things to try are:
183 # 1. update all the sha1s in JURI
184 # 2. remove the http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
185 # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORDIR}/.m2
186 # or /var/tmp/portage/.m2 or /root/.m2
187 # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
188 sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
189 -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
190 -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
191 -i "${S}/build.xml" \
192 || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
193 fi
194 }
195
196 src_compile() {
197 if ! use binary; then
198 #unset ANT_OPTS as this is set in the build.xml
199 #sets -X type variables which might come back to bite me
200 unset ANT_OPTS
201
202 # reported in bugzilla that multiple launches use less resources
203 # https://bugs.gentoo.org/show_bug.cgi?id=282023
204 eant all.clean
205 eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
206 fastdist-opt
207 if use doc; then
208 # The separate build for doc is to workaround this problem that occurs
209 # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
210 # java.lang.OutOfMemoryError: PermGen space
211 eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
212 docscomp
213 eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
214 docs
215 fi
216 else
217 einfo "Skipping compilation, USE=binary is set."
218 fi
219 }
220
221 src_test() {
222 java-pkg-2_src_test
223 }
224
225 src_install() {
226 pushd build/pack || die
227 local SCALADIR="/usr/share/${PN}/"
228 exeinto "${SCALADIR}/bin"
229 doexe $(find bin/ -type f ! -iname '*.bat')
230 dodir "${SCALADIR}/lib"
231 insinto "${SCALADIR}/lib"
232 local maj_min=$(get_version_component_range 2)
233 pushd lib || die
234 for j in *.jar; do
235 local i="${j%${maj_min}*}"
236 newins "${j}" "${i}"
237 java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
238 done
239 popd
240
241 dodir /usr/bin
242 for b in $(find bin/ -type f ! -iname '*.bat'); do
243 local _name=$(basename "${b}")
244 dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}"
245 done
246
247 doman man/man1/*.1
248 popd
249
250 #sources are .scala so no use for java-pkg_dosrc
251 pushd src || die
252 if use source; then
253 dodir "${SCALADIR}/src"
254 insinto "${SCALADIR}/src"
255 doins -r actors forkjoin library library-aux reflect
256 fi
257 popd
258
259 local docdir="build/scaladoc"
260 dodoc docs/TODO doc/README
261 if use doc; then
262 dohtml -r "${docdir}"/{compiler,library}
263 fi
264 }