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