Gentoo Archives: gentoo-commits

From: Mark Wright <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/scala/, dev-lang/scala/files/
Date: Mon, 29 Jan 2018 09:34:44
Message-Id: 1517218431.bacf0700c7b9b6155fdf6554584432d85a5e3b78.gienah@gentoo
1 commit: bacf0700c7b9b6155fdf6554584432d85a5e3b78
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 29 09:33:51 2018 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 29 09:33:51 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bacf0700
7
8 dev-lang/scala: Bump to 2.12.4
9
10 Fix 640306, thanks to xmv for reporting.
11
12 Gentoo-Bug: http://bugs.gentoo.org/640306
13 Package-Manager: Portage-2.3.19, Repoman-2.3.6
14
15 dev-lang/scala/Manifest | 18 +++
16 dev-lang/scala/files/scala-2.12.4-no-git.patch | 37 +++++
17 dev-lang/scala/scala-2.12.4.ebuild | 214 +++++++++++++++++++++++++
18 3 files changed, 269 insertions(+)
19
20 diff --git a/dev-lang/scala/Manifest b/dev-lang/scala/Manifest
21 index 53e272c45a3..c7e1c007f2b 100644
22 --- a/dev-lang/scala/Manifest
23 +++ b/dev-lang/scala/Manifest
24 @@ -174,3 +174,21 @@ DIST scala-2.12.2-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd
25 DIST scala-2.12.2-sbt-deps.tar.xz 34841660 BLAKE2B 7169e0a98d76c17bde51fd4c6a054d74aba7a2026e3cb7ea86376371bdfaf58a76bef745788db920c69613e6e9a676e8b8ff34af0c4bae5ab420c0375eb4ae82 SHA512 642bc1c2f94f7890548cc5b730cce4a4c214603c53eefaf12fbd709163feafbd319165a738fc4d3c349ae60ba276bc23333949b01835a2e7e7b767fa21baf96a
26 DIST scala-2.12.2-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
27 DIST scala-2.12.2.tar.gz 5935417 BLAKE2B 1bf5492aa45398d9cd4b313cab99dbe2fca05de48bca1dbb1427ac110bf153af565768e0260922c19c1728e821cef95b46917bb20e4e637f75dccc37f5527465 SHA512 ab450e94fa79a9a0af238567b17537b12f23627eb066b84cd996a88422ec34ee8d26e09eca0416d49daccadaeb016ad6419d8022d471065389a26b024f2049b1
28 +DIST scala-2.12.4-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
29 +DIST scala-2.12.4-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
30 +DIST scala-2.12.4-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
31 +DIST scala-2.12.4-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
32 +DIST scala-2.12.4-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
33 +DIST scala-2.12.4-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
34 +DIST scala-2.12.4-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
35 +DIST scala-2.12.4-gentoo-binary.tar.xz 78241224 BLAKE2B 5caefb6c057b18cffdeb39440cabe14499d9f760a36ee9f1bd671c20f1961d463e13d8f81f2eb237a299cc4bd6e7f06cacad41b667ff7ccc20d439886f804af9 SHA512 dcf0ffa9eddf5d76d38b4078fe82715b667a0905273a5fe433e752e34a099c4aec4d53bc542a3be341b849857945f698cca384f824a4dae6406243eca36c5e1c
36 +DIST scala-2.12.4-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
37 +DIST scala-2.12.4-ivy2-deps.tar.xz 66284364 BLAKE2B 83f3d0d6735afa801345c93d5b468d1c9fceba23526628a534fe3e9b1f301cbc561844fe1e30d0015bd3b705bcc15095649265e0927cf70d955980658a50eeba SHA512 c890a3f85734b35b398d5266f4507284e7474bac6018a34945d858ebebefa225a00238bd3a82e99ab83e344e98f6b14f6c2852a6b05eb5d7ef2094039d53a6d7
38 +DIST scala-2.12.4-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
39 +DIST scala-2.12.4-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
40 +DIST scala-2.12.4-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
41 +DIST scala-2.12.4-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
42 +DIST scala-2.12.4-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
43 +DIST scala-2.12.4-sbt-deps.tar.xz 34841672 BLAKE2B 0f1577bba65eb5863013014b16627c28934f13e84a6ed0a52748e2007417ae074bcb4b68650993d870f4ada872248d489f84ea02ee19521dd9ce8faae963e221 SHA512 74455451e77f0d935c8027e67b898e5eec9e984158292a37a4362072f4922eb53dfe9ddd5d52da8066fb8949c6469bff70405df8581633a49a37c8b900c6885e
44 +DIST scala-2.12.4-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
45 +DIST scala-2.12.4.tar.gz 5999529 BLAKE2B 5dfeadb9ac9562dd825f6a41f9cabdd353f669a58dc3aaec714d6155e9e598296c1e31dcc8956a24a97103e3449fb8f8c3a9ebe5e52dd405572d59ccae89c5e6 SHA512 cad6d54777a3ad4d26df5b4d5cecbbdb4a91ecb17cbf791fe259735221d33f9dd17a14e86f5e3520464078ad9ef68581e722e3c0d7494436bf356c79a9d31697
46
47 diff --git a/dev-lang/scala/files/scala-2.12.4-no-git.patch b/dev-lang/scala/files/scala-2.12.4-no-git.patch
48 new file mode 100644
49 index 00000000000..04e620bcee2
50 --- /dev/null
51 +++ b/dev-lang/scala/files/scala-2.12.4-no-git.patch
52 @@ -0,0 +1,37 @@
53 +--- scala-2.12.4-orig/project/VersionUtil.scala 2017-10-11 09:05:11.000000000 +1100
54 ++++ scala-2.12.4/project/VersionUtil.scala 2018-01-29 15:58:57.205758665 +1100
55 +@@ -2,7 +2,7 @@
56 +
57 + import sbt.{stringToProcess => _, _}
58 + import Keys._
59 +-import java.util.{Date, Locale, Properties, TimeZone}
60 ++import java.util.{Calendar, Date, Locale, Properties, TimeZone}
61 + import java.io.{File, FileInputStream}
62 + import java.text.SimpleDateFormat
63 +
64 +@@ -65,18 +65,13 @@
65 + val log = sLog.value
66 + val (dateObj, sha) = {
67 + try {
68 +- // Use JGit to get the commit date and SHA
69 +- import org.eclipse.jgit.storage.file.FileRepositoryBuilder
70 +- import org.eclipse.jgit.revwalk.RevWalk
71 +- val db = new FileRepositoryBuilder().findGitDir.build
72 +- val head = db.resolve("HEAD")
73 +- if (head eq null) {
74 +- log.info("No git HEAD commit found -- Using current date and 'unknown' SHA")
75 +- (new Date, "unknown")
76 +- } else {
77 +- val commit = new RevWalk(db).parseCommit(head)
78 +- (new Date(commit.getCommitTime.toLong * 1000L), commit.getName.substring(0, 7))
79 +- }
80 ++ val commit = "c2a5883891a68180b143eb462c8b0cebc8d3b02"
81 ++ val cal = Calendar.getInstance();
82 ++ cal.set(Calendar.YEAR, 2017);
83 ++ cal.set(Calendar.MONTH, Calendar.OCTOBER);
84 ++ cal.set(Calendar.DAY_OF_MONTH, 11);
85 ++ val date = cal.getTime();
86 ++ (date, commit.substring(0, 7))
87 + } catch {
88 + case ex: Exception =>
89 + log.error("Could not determine commit date + SHA: " + ex)
90
91 diff --git a/dev-lang/scala/scala-2.12.4.ebuild b/dev-lang/scala/scala-2.12.4.ebuild
92 new file mode 100644
93 index 00000000000..062f48a8746
94 --- /dev/null
95 +++ b/dev-lang/scala/scala-2.12.4.ebuild
96 @@ -0,0 +1,214 @@
97 +# Copyright 1999-2018 Gentoo Foundation
98 +# Distributed under the terms of the GNU General Public License v2
99 +
100 +EAPI="6"
101 +
102 +JAVA_PKG_IUSE="doc source"
103 +
104 +inherit eutils check-reqs java-pkg-2 versionator
105 +
106 +SV="$(get_version_component_range 1-2)"
107 +
108 +# Note: to bump scala, some things to try are:
109 +# 1. update all the sha1s in JURI
110 +# 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.gz
111 +# and https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.gz from
112 +# SRC_URI
113 +# 3. try emerge scala. Check if it downloads more stuff in src_compile to
114 +# ${WORKDIR}/.ivy2 or ${WORKDIR}/.sbt or /root/.ivy2 or /root/.sbt
115 +# 4. tar up all the .ivy2 and .sbt junk into ${P}-ivy2-deps.tar.xz and
116 +# ${P}-sbt-deps.tar.xz and add them to SRC_URI:
117 +# XZ_OPT=-9 tar --owner=portage --group=portage \
118 +# -cJf /usr/portage/distfiles/${P}-ivy2-deps.tar.xz .ivy2/cache
119 +# XZ_OPT=-9 tar --owner=portage --group=portage \
120 +# -cJf /usr/portage/distfiles/${P}-sbt-deps.tar.xz .sbt
121 +
122 +# creating the binary:
123 +# FEATURES="noclean -test" USE="doc source" emerge dev-lang/scala
124 +# cd $WORDKIR
125 +# XZ_OPT=-9 tar --owner=portage --group=portage \
126 +# -cJf /usr/portage/distfiles/${P}-gentoo-binary.tar.xz .ivy2/local \
127 +# ${P}/build/pack/bin ${P}/build/quick/classes/scala-dist/man/man1 \
128 +# ${P}/src/library ${P}/src/library-aux ${P}/src/reflect ${P}/doc/README \
129 +# ${P}/build/scaladoc
130 +
131 +# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
132 +# to search for .desired.sha1 files, which contain sha1 hashes that are appended
133 +# to ${BURI} along with the subdirectory and filename to form the list of jar files
134 +# listed in SRC_URI. The output of this find command can be hacked into the desired format:
135 +# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
136 +# After editing it into the desired format: sort -t / -k 3 file
137 +
138 +BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
139 +
140 +declare -a JURI=(
141 + "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
142 + "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
143 + "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
144 + "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
145 + "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
146 + "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
147 + "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
148 + "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
149 + "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
150 + "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
151 + "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
152 + "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
153 + "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
154 + "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
155 +)
156 +
157 +DESCRIPTION="The Scala Programming Language"
158 +HOMEPAGE="http://www.scala-lang.org/"
159 +SRC_URI="
160 + !binary? (
161 + https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
162 + https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
163 + https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz
164 + ${JURI[@]} )
165 + binary? (
166 + https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz )"
167 +LICENSE="BSD"
168 +SLOT="${SV}/${PV}"
169 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
170 +
171 +IUSE="binary emacs"
172 +
173 +COMMON_DEP="dev-java/ant-core:0
174 + dev-java/jline:2"
175 +
176 +DEPEND="${COMMON_DEP}
177 + !binary? (
178 + =virtual/jdk-1.8*
179 + >=dev-java/sbt-0.13.13
180 + media-gfx/graphviz
181 + )
182 + binary? (
183 + >=virtual/jdk-1.8
184 + )
185 + app-arch/xz-utils:0"
186 +
187 +RDEPEND="${COMMON_DEP}
188 + >=virtual/jre-1.8
189 + app-eselect/eselect-scala
190 + !dev-lang/scala-bin:0"
191 +
192 +PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
193 +
194 +CHECKREQS_MEMORY="1536M"
195 +
196 +pkg_setup() {
197 + java-pkg-2_pkg_setup
198 +
199 + if ! use binary; then
200 + debug-print "Checking for sufficient physical RAM"
201 +
202 + ewarn "This package can fail to build with memory allocation errors in some cases."
203 + ewarn "If you are unable to build from sources, please try USE=binary"
204 + ewarn "for this package. See bug #181390 for more information."
205 +
206 + check-reqs_pkg_setup
207 + fi
208 +}
209 +
210 +src_unpack() {
211 + # Unpack tar files only.
212 + for f in ${A} ; do
213 + [[ ${f} == *".tar."* ]] && unpack ${f}
214 + done
215 +}
216 +
217 +src_prepare() {
218 + java-pkg_getjars ant-core,jline-2
219 +
220 + if ! use binary; then
221 + local a
222 + for a in "${JURI[@]}"
223 + do
224 + echo "${a}"
225 + local g="${a/* -> /}"
226 + echo "${g}"
227 + local j="${a/ -> */}"
228 + echo "${j}"
229 + cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
230 + done
231 +
232 + # gentoo patch (by gienah) to stop it calling git log in the build
233 + eapply "${FILESDIR}/${P}-no-git.patch"
234 +
235 + local SBT_PVR="$(java-config --query=PVR --package=sbt)"
236 + sed -e "s@×××.version=0.13.11@×××.version=${SBT_PVR}@" \
237 + -i "${S}/project/build.properties" \
238 + || die "Could not set sbt.version=${SBT_PVR} in project/build.properties"
239 +
240 + cat <<- EOF > "${S}/sbt"
241 + #!/bin/bash
242 + gjl_package=sbt
243 + gjl_jar="sbt-launch.jar"
244 + gjl_java_args="-Dsbt.version=0.13.13 -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -Duser.home="${WORKDIR}""
245 + source /usr/share/java-config-2/launcher/launcher.bash
246 + EOF
247 + chmod u+x "${S}/sbt" || die
248 +
249 + sed -e 's@-Xmx1024M@-Xmx1536M@' \
250 + -i "${S}/build.sbt" \
251 + || die "Could not change increase memory size in ${S}/build.sbt"
252 + fi
253 +
254 + default
255 +}
256 +
257 +src_compile() {
258 + if ! use binary; then
259 + export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
260 + export LANG="en_US.UTF-8"
261 + einfo "=== scala compile ..."
262 + "${S}"/sbt -Dsbt.log.noformat=true compile || die "sbt compile failed"
263 + einfo "=== sbt publishLocal with jdk $(java-pkg_get-vm-version) ..."
264 + "${S}"/sbt -Dsbt.log.noformat=true publishLocal \
265 + || die "sbt publishLocal failed"
266 + else
267 + einfo "Skipping compilation, USE=binary is set."
268 + fi
269 +}
270 +
271 +src_test() {
272 + if ! use binary; then
273 + "${S}"/sbt -Dsbt.log.noformat=true test || die "sbt test failed"
274 + else
275 + einfo "Skipping tests, USE=binary is set."
276 + fi
277 +}
278 +
279 +src_install() {
280 + pushd build/pack || die
281 + local SCALADIR="/usr/share/${PN}-${SV}"
282 + exeinto "${SCALADIR}/bin"
283 + doexe $(find bin/ -type f ! -iname '*.bat')
284 + dodir /usr/bin
285 + for b in $(find bin/ -type f ! -iname '*.bat'); do
286 + local _name=$(basename "${b}")
287 + dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
288 + done
289 + popd || die
290 + java-pkg_dojar $(find "${WORKDIR}"/.ivy2/local -name \*.jar -print)
291 +
292 + pushd build/quick/classes/scala-dist/man/man1 || die
293 + for i in *.1; do
294 + newman "${i}" "${i/./-${SV}.}"
295 + done
296 + popd || die
297 +
298 + #sources are .scala so no use for java-pkg_dosrc
299 + pushd src || die
300 + if use source; then
301 + dodir "${SCALADIR}/src"
302 + insinto "${SCALADIR}/src"
303 + doins -r library library-aux reflect
304 + fi
305 + popd || die
306 +
307 + local DOCS=( "doc/README" )
308 + local HTML_DOCS=( "build/scaladoc" )
309 + einstalldocs
310 +}