summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2016-12-29 09:00:26 +1100
committerMark Wright <gienah@gentoo.org>2016-12-29 09:01:10 +1100
commitbd4a02d88dfcc3cb83c7dd06911d758e4b034056 (patch)
treea63e7337f6a2b820e4cf83e41c0f338d6b20dfe5 /dev-lang
parentsys-devel/gcc: Bump 5.4 to r2 bug #603798 (diff)
downloadgentoo-bd4a02d88dfcc3cb83c7dd06911d758e4b034056.tar.gz
gentoo-bd4a02d88dfcc3cb83c7dd06911d758e4b034056.tar.bz2
gentoo-bd4a02d88dfcc3cb83c7dd06911d758e4b034056.zip
dev-lang/scala: Bump to 2.12.1
Package-Manager: portage-2.3.3
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/scala/Manifest18
-rw-r--r--dev-lang/scala/files/scala-2.12.1-no-git.patch37
-rw-r--r--dev-lang/scala/files/scala-2.12.1-runner-script.patch22
-rw-r--r--dev-lang/scala/scala-2.12.1.ebuild214
4 files changed, 291 insertions, 0 deletions
diff --git a/dev-lang/scala/Manifest b/dev-lang/scala/Manifest
index f6a30d08254d..09acba6ae6a6 100644
--- a/dev-lang/scala/Manifest
+++ b/dev-lang/scala/Manifest
@@ -201,6 +201,24 @@ DIST scala-2.11.8-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bcc
DIST scala-2.11.8-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
DIST scala-2.11.8-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
DIST scala-2.11.8.tar.gz 6505558 SHA256 4f11273b4b3c771019253b2c09102245d063a7abeb65c7b1c4519bd57605edcf SHA512 f084eb88a78b2c74bad38086bcbcac7fdc98640059188c266f24f8f7b58e74a7b29e3b5fe52816bcad5a132d873863b0307679b5b9e67264ac2c7cb5b696a4e0 WHIRLPOOL 31f0f54a538f4723af43a8b013c38f3e244aa4d25a6435a9ec522550560caef94ccff4b8367f72b2835a9482b6322fe77895ccb56cf3b475ef824ce770d83779
+DIST scala-2.12.1-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.12.1-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.12.1-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.12.1-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.12.1-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.12.1-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.12.1-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.12.1-gentoo-binary.tar.xz 77449456 SHA256 8748c35b70551aef7f82331c669096f23cf9e597df7bbaa05bfe09b39c18eb50 SHA512 46744a330d5fe5fd359a6c7a87bd79e0141c6f84f9ce19163ac8658e8947ca682c6e253e8f561e9a4ac077e0d308bc0aa65586026bc5986b1682ae0151d91bc9 WHIRLPOOL 6bba602a5469f7b57f533485404ddb33e4830ac14526b9f0c811abe3f16516805f10886f091be47c4ce25ca440b826ceaf97d5501f2732ec151b85dad3d51c49
+DIST scala-2.12.1-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.12.1-ivy2-deps.tar.xz 62890720 SHA256 67acf8f5eaffd28c0cd8a4b20d6469a0e8b4815f2740c7e7e09b1dfe8d2de469 SHA512 f8d88e88e53d793e0b89a57ad19598ee02eb6322e2e1f9397a5d4b52ab2929c009d4aa84366a8a9dec864cb0c61f2316c16826190b06322539fa29ddef2b475d WHIRLPOOL 0a2cef083a99b6467f7fe6804eeda814f02ff92dc8cdca62d482ad73c89d454469a323ba8ff0b351a6273213f44582a7aefe44c2c0be523b445a16eccdb4c4ab
+DIST scala-2.12.1-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.12.1-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.12.1-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.12.1-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.12.1-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.12.1-sbt-deps.tar.xz 34840036 SHA256 ad798fcacf2f0111e992c39c2758de2f60893d6d0f8d31cb5899e427694a7ccc SHA512 818168cccf57bcd3afb35583354eae736f551e11265427f3a62f84376659ea1b2bf892ad8c2be27b1a570b7b0f8f8f106b5d45c747fac6c776826bb2a1ac72b9 WHIRLPOOL 2ed5e83cb8fd35a33c270a01d70d567f1fdcccf9a542dc5c55d3d7fecdfd8fe4b6f387315a5c536b71b0f1e7849f0a1f4ac980963f86efca811a4161a9063ab5
+DIST scala-2.12.1-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.12.1.tar.gz 6280352 SHA256 edff94803a632139c132d23b103e0482317d3ecf1c745721501365b28eb02c90 SHA512 e62755c5d5aabbdf5ae5dc57d4b8b2152199b1066a003787e8e1e9da261d4b3ab4f53106dafaf68f62031df1dd41626db55b5de1cc3a504f6c44ab271c58aff0 WHIRLPOOL df53373b4125b2fb8d456e7a9a43a0ceed7c6bd177dcc58583d38fe6f26daccf4b083b461c42ab247b16082237e060f79831160c5f03220f5c1a921f460cf8b5
DIST scala-2.9.3-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
DIST scala-2.9.3-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
DIST scala-2.9.3-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
diff --git a/dev-lang/scala/files/scala-2.12.1-no-git.patch b/dev-lang/scala/files/scala-2.12.1-no-git.patch
new file mode 100644
index 000000000000..f5439e35aadc
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.1-no-git.patch
@@ -0,0 +1,37 @@
+--- scala-2.12.1-orig/tools/get-scala-commit-date 2016-12-05 20:45:09.000000000 +1100
++++ scala-2.12.1/tools/get-scala-commit-date 2016-12-27 16:41:41.695942033 +1100
+@@ -10,13 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
+- lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+- lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
+-else
+- lastcommitdate=$(date +%Y-%m-%d)
+- lastcommithours=$(date +%H:%M:%S)
+-fi
++lastcommitdate="2016-12-05"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.12.1-orig/tools/get-scala-commit-sha 2016-12-05 20:45:09.000000000 +1100
++++ scala-2.12.1/tools/get-scala-commit-sha 2016-12-27 16:44:07.393422207 +1100
+@@ -10,13 +10,7 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
+- # printf %016s is not portable for 0-padding, has to be a digit.
+- # so we're stuck disassembling it.
+- hash=$(git log -1 --format="%H" HEAD)
+- hash=${hash#g}
+- hash=${hash:0:10}
+-else
+- hash="unknown"
+-fi
++hash="2787b47396013a44072fa7321482103b66fbccd3"
++hash=${hash#g}
++hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.12.1-runner-script.patch b/dev-lang/scala/files/scala-2.12.1-runner-script.patch
new file mode 100644
index 000000000000..9115a9810f67
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.1-runner-script.patch
@@ -0,0 +1,22 @@
+--- scala-2.12.1-orig/src/compiler/scala/tools/ant/templates/tool-unix.tmpl 2016-12-05 20:45:09.000000000 +1100
++++ scala-2.12.1/src/compiler/scala/tools/ant/templates/tool-unix.tmpl 2016-12-28 11:46:29.120052198 +1100
+@@ -197,14 +197,11 @@
+ # to java to suppress "." from materializing.
+ if [[ "$usebootcp" == "true" ]]; then
+ classpath_args=("-Xbootclasspath/a:$TOOL_CLASSPATH" -classpath "\"\"")
+- # Note that the version numbers go 1.7, 1.8, 9, 10, ...
+- java_release="$(cat $JAVA_HOME/release | grep JAVA_VERSION)"
+- if [[ ! "$java_release" =~ JAVA_VERSION=\"1\. ]]; then
+- # Java 9 removed sun.boot.class.path, and the supposed replacement to at least see
+- # the appended boot classpath (jdk.boot.class.path.append) is not visible.
+- # So we have to pass a custom system property that PathResolver will find.
+- classpath_args+=("-Dscala.boot.class.path=$TOOL_CLASSPATH")
+- fi
++ # Java 9 removed sun.boot.class.path, and the supposed replacement to at least see
++ # the appended boot classpath (jdk.boot.class.path.append) is not visible.
++ # So we have to pass a custom system property that PathResolver will find.
++ # We do this for all JVM versions, rather than getting into the business of JVM version detection.
++ classpath_args+=("-Dscala.boot.class.path=$TOOL_CLASSPATH")
+ else
+ classpath_args=(-classpath "$TOOL_CLASSPATH")
+ fi
diff --git a/dev-lang/scala/scala-2.12.1.ebuild b/dev-lang/scala/scala-2.12.1.ebuild
new file mode 100644
index 000000000000..9277fdc5d363
--- /dev/null
+++ b/dev-lang/scala/scala-2.12.1.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils check-reqs java-pkg-2 versionator
+
+SV="$(get_version_component_range 1-2)"
+
+# Note: to bump scala, some things to try are:
+# 1. update all the sha1s in JURI
+# 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.gz
+# and https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.gz from
+# SRC_URI
+# 3. try emerge scala. Check if it downloads more stuff in src_compile to
+# ${WORKDIR}/.ivy2 or ${WORKDIR}/.sbt or /root/.ivy2 or /root/.sbt
+# 4. tar up all the .ivy2 and .sbt junk into ${P}-ivy2-deps.tar.xz and
+# ${P}-sbt-deps.tar.xz and add them to SRC_URI:
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-ivy2-deps.tar.xz .ivy2/cache
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-sbt-deps.tar.xz .sbt
+
+# creating the binary:
+# FEATURES="noclean -test" USE="doc source" emerge dev-lang/scala
+# cd $WORDKIR
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-gentoo-binary.tar.xz .ivy2/local \
+# ${P}/build/pack/bin ${P}/build/quick/classes/scala-dist/man/man1 \
+# ${P}/src/library ${P}/src/library-aux ${P}/src/reflect ${P}/doc/README \
+# ${P}/build/scaladoc
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="
+ !binary? (
+ https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz
+ ${JURI[@]} )
+ binary? (
+ https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ =virtual/jdk-1.8*
+ >=dev-java/sbt-0.13.13
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.8
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.8
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+CHECKREQS_MEMORY="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+src_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ eapply "${FILESDIR}/${P}-no-git.patch"
+
+ # https://issues.scala-lang.org/browse/SI-10098
+ eapply "${FILESDIR}/${PN}-2.12.1-runner-script.patch"
+
+ local SBT_PVR="$(java-config --query=PVR --package=sbt)"
+ sed -e "s@sbt.version=0.13.11@sbt.version=${SBT_PVR}@" \
+ -i "${S}/project/build.properties" \
+ || die "Could not set sbt.version=${SBT_PVR} in project/build.properties"
+
+ cat <<- EOF > "${S}/sbt"
+ #!/bin/bash
+ gjl_package=sbt
+ gjl_jar="sbt-launch.jar"
+ gjl_java_args="-Dsbt.version=0.13.13 -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -Duser.home="${WORKDIR}""
+ source /usr/share/java-config-2/launcher/launcher.bash
+ EOF
+ chmod u+x "${S}/sbt" || die
+
+ sed -e 's@-Xmx1024M@-Xmx1536M@' \
+ -e 's@-XX:MaxPermSize=128M@-XX:MaxPermSize=256M@' \
+ -i "${S}/test/partest" \
+ || die "Could not change increase memory size in ${S}/test/partest"
+ fi
+
+ default
+}
+
+src_compile() {
+ if ! use binary; then
+ export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
+ einfo "=== scala compile ..."
+ "${S}"/sbt -Dsbt.log.noformat=true compile || die "sbt compile failed"
+ einfo "=== sbt publishLocal with jdk $(java-pkg_get-vm-version) ..."
+ "${S}"/sbt -Dsbt.log.noformat=true publishLocal \
+ || die "sbt publishLocal failed"
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ "${S}"/sbt -Dsbt.log.noformat=true test || die "sbt test failed"
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+ popd || die
+ java-pkg_dojar $(find "${WORKDIR}"/.ivy2/local -name \*.jar -print)
+
+ pushd build/quick/classes/scala-dist/man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd || die
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r library library-aux reflect
+ fi
+ popd || die
+
+ local DOCS=( "doc/README" )
+ local HTML_DOCS=( "build/scaladoc" )
+ einstalldocs
+}