diff options
author | Mark Wright <gienah@gentoo.org> | 2017-05-05 11:09:19 +1000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2017-05-05 11:10:04 +1000 |
commit | daa81eb8ec876f57d74379f12d25f2a2d4ba27a9 (patch) | |
tree | 033faba32de890d92954358e9eaf128d82ade244 /dev-lang/scala | |
parent | media-libs/virglrenderer: drop vulnerable, bug #611382 (diff) | |
download | gentoo-daa81eb8ec876f57d74379f12d25f2a2d4ba27a9.tar.gz gentoo-daa81eb8ec876f57d74379f12d25f2a2d4ba27a9.tar.bz2 gentoo-daa81eb8ec876f57d74379f12d25f2a2d4ba27a9.zip |
dev-lang/scala: Bump to 2.12.2
Package-Manager: portage-2.3.5
Diffstat (limited to 'dev-lang/scala')
-rw-r--r-- | dev-lang/scala/Manifest | 18 | ||||
-rw-r--r-- | dev-lang/scala/files/scala-2.12.2-no-git.patch | 23 | ||||
-rw-r--r-- | dev-lang/scala/scala-2.12.2.ebuild | 214 |
3 files changed, 255 insertions, 0 deletions
diff --git a/dev-lang/scala/Manifest b/dev-lang/scala/Manifest index 09acba6ae6a6..c962e7f5bb8f 100644 --- a/dev-lang/scala/Manifest +++ b/dev-lang/scala/Manifest @@ -219,6 +219,24 @@ DIST scala-2.12.1-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bcc 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.12.2-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1 +DIST scala-2.12.2-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10 +DIST scala-2.12.2-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1 +DIST scala-2.12.2-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b +DIST scala-2.12.2-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85 +DIST scala-2.12.2-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95 +DIST scala-2.12.2-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5 +DIST scala-2.12.2-gentoo-binary.tar.xz 77464308 SHA256 e06926b2e8bcd410fd7f71307fde57cc39712741c5dc692f29e9bff2c51058c0 SHA512 ef8952c06e1a89269dafb387b4d512edd54655317c06adc9dcd8270d8eb426362a6bc2a265910f3405362f062eb04a53550b8a6992781d5bb76701f24843ad64 WHIRLPOOL 37692e955d0ce92209f348a2ba61e64248732ec98e353c22de7cb217e48d5463c7c1b3192dd2de79af9ae7fdd58d7803d1ecf0afa420ae4588137bad112850b1 +DIST scala-2.12.2-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc +DIST scala-2.12.2-ivy2-deps.tar.xz 66113576 SHA256 f6096eb904103e51dc6462f93b76654a366df47612267ee85ed4d681e274f905 SHA512 d51961bd5cce27b3b98c21112e097efb43b5eae47fb215c315f6ae38ab15c6e6b8521c6b0dffcaa087741001b6d60aba946dfd765b6eab572e41092fa22839cc WHIRLPOOL 5a777eabef3737827b6870f2e9fdf302c0856b359ecca9a3c2036d5ba20c06b8ff5d0043b55d52b6ed04a3b4ad4e154e4a70e76670604c9d0cdb50d8801c14f2 +DIST scala-2.12.2-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c +DIST scala-2.12.2-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5 +DIST scala-2.12.2-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743 +DIST scala-2.12.2-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582 +DIST scala-2.12.2-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34 +DIST scala-2.12.2-sbt-deps.tar.xz 34841660 SHA256 018d9cab7712afeea9bf3fee5306224e4b8edba638afee850495ae3c94532982 SHA512 642bc1c2f94f7890548cc5b730cce4a4c214603c53eefaf12fbd709163feafbd319165a738fc4d3c349ae60ba276bc23333949b01835a2e7e7b767fa21baf96a WHIRLPOOL cfed944a585cddac3e5328c96e4f5facb2dcc3022a87c83cfd7525392da461039d7b9b1c732ff66c43a0bab1b0672a5a019cfce3ca37a7fdb798cea4af4948e1 +DIST scala-2.12.2-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99 +DIST scala-2.12.2.tar.gz 5935417 SHA256 822ef9c8077765cf558c1bbc88e957ccae77402ca02f432053f4f3bf4f91a2b1 SHA512 ab450e94fa79a9a0af238567b17537b12f23627eb066b84cd996a88422ec34ee8d26e09eca0416d49daccadaeb016ad6419d8022d471065389a26b024f2049b1 WHIRLPOOL 02a48ac6fb5d4befc3d91aef0b18d3729b7eadf52cfde11231432fa25c0e9fd60185a4d3d0e2095aed61e25a49c1f763a8922af65f5fbe5ff2960164da7f3fcb 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.2-no-git.patch b/dev-lang/scala/files/scala-2.12.2-no-git.patch new file mode 100644 index 000000000000..1c09bf6ba866 --- /dev/null +++ b/dev-lang/scala/files/scala-2.12.2-no-git.patch @@ -0,0 +1,23 @@ +--- scala-2.12.2-orig/project/VersionUtil.scala 2017-04-13 02:16:08.000000000 +1000 ++++ scala-2.12.2/project/VersionUtil.scala 2017-05-04 23:45:50.715285243 +1000 +@@ -80,18 +80,8 @@ + + val (dateObj, sha) = { + try { +- // Use JGit to get the commit date and SHA +- import org.eclipse.jgit.storage.file.FileRepositoryBuilder +- import org.eclipse.jgit.revwalk.RevWalk +- val db = new FileRepositoryBuilder().findGitDir.build +- val head = db.resolve("HEAD") +- if(head eq null) { +- log.info("No git HEAD commit found -- Using current date and 'unknown' SHA") +- (new Date, "unknown") +- } else { +- val commit = new RevWalk(db).parseCommit(head) +- (new Date(commit.getCommitTime.toLong * 1000L), commit.getName.substring(0, 7)) +- } ++ val commit = "21d12e9f5ec1ffe023f509848911476c1552d06f" ++ (new Date, commit.substring(0, 7)) + } catch { case ex: Exception => + log.error("Could not determine commit date + SHA: "+ex) + log.trace(ex) diff --git a/dev-lang/scala/scala-2.12.2.ebuild b/dev-lang/scala/scala-2.12.2.ebuild new file mode 100644 index 000000000000..4670aac74258 --- /dev/null +++ b/dev-lang/scala/scala-2.12.2.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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" + + 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@' \ + -i "${S}/build.sbt" \ + || die "Could not change increase memory size in ${S}/build.sbt" + 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() { + if ! use binary; then + "${S}"/sbt -Dsbt.log.noformat=true test || die "sbt test failed" + else + einfo "Skipping tests, USE=binary is set." + fi +} + +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 +} |