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