Skip to content

Commit

Permalink
dev-lang/scala: Bump
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.11, Repoman-2.3.3
  • Loading branch information
patricklauer committed Oct 3, 2017
1 parent 8a65f22 commit 98fa08f
Show file tree
Hide file tree
Showing 3 changed files with 268 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dev-lang/scala/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,26 @@ DIST scala-2.11.1-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bcc
DIST scala-2.11.1-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
DIST scala-2.11.1-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
DIST scala-2.11.1.tar.gz 5633076 SHA256 868a009c89a331ec05914faa204f865d09f2b7b35eabdb41e7f43e8734e0abf5 SHA512 bde7a8fae9fa570df392a70aa06f901bc4987703fadf1e7ad9f090f3b3c9a2ff1bbe055a401b0d851193b5ddcd8b0536c4916f79ae4c63b74c31695de6e651b2 WHIRLPOOL 4f153b829efe7e3435bab5fca27a0e52c94aa8f50f2078cee082575bb8f7677b4e0a70c49a92060c3509cc009f3586ff592c2b332a4c78bb57bcb9973328e6d1
DIST scala-2.11.11-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
DIST scala-2.11.11-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
DIST scala-2.11.11-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
DIST scala-2.11.11-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
DIST scala-2.11.11-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
DIST scala-2.11.11-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
DIST scala-2.11.11-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
DIST scala-2.11.11-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
DIST scala-2.11.11-gentoo-binary.tar.bz2 31842222 SHA256 fdd72db43e12c60cf2174d57235442ef91dadeb1256628fc3b571ad7c20d933c SHA512 0325dad506d71397dff36d741834f57267b07d1f5f65f8e5e21124754c0dc73ec4613cbb48f6c11383ab8c277f1bea1af5338f1af74e5c5d19ed06ca5f4c6829 WHIRLPOOL 2ef01bd9856eb2b56e8f148a47f46f0dcc61ac9f5cc34294e87797cf5a2cd9d917301baedaf561c4ebf9832f8b8da2b9d58a1a63b10566ea930aaf46546df0c5
DIST scala-2.11.11-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
DIST scala-2.11.11-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
DIST scala-2.11.11-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
DIST scala-2.11.11-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
DIST scala-2.11.11-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
DIST scala-2.11.11-maven-deps.tar.gz 94530315 SHA256 544769138ab3a99c302f4f59d466bbb00f3c2da32dcbc285cb0c35efc5ba6a5a SHA512 b716d5d2a79960bae47dbb96a350027e908b9d5b62a0806e6b6f9905374f3e9cbb06c8865a3a2aa96399b4fc2fa1db949729cbb560e70af31225be151375f1ff WHIRLPOOL 0d97cfdd437297a41fe4c4991b081dff9aa21576cd87d350cee52ad1bb22702ec4c3b4ac396739b523012d5441496a037b6334a49608335f25d2bfb830e669c8
DIST scala-2.11.11-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
DIST scala-2.11.11-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
DIST scala-2.11.11-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
DIST scala-2.11.11-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
DIST scala-2.11.11.tar.gz 6556573 SHA256 f97bccddbc53fc4da027fda3d2e6ad3d7776ec7ce56adad0ddb505266e1689e1 SHA512 c4e8ca544ea86c3e381a7b3d9120b13574cab92d73ff56aa10955afffe64c62ea11cd44abddd75984bc0ac58e8257b00357618cf9377e6690351db269657608c WHIRLPOOL 4cad89bd5e997363435b6a5f6baac6b30baff6f0c2db23f008541371e265b3074ede91384566c9ff5d742c839a15c9f8a6484c37d8161db1fc3fecc0ef78fbbb
DIST scala-2.11.2-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
DIST scala-2.11.2-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
DIST scala-2.11.2-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
Expand Down
24 changes: 24 additions & 0 deletions dev-lang/scala/files/scala-2.11.11-no-git.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- scala-2.11.8-orig/tools/get-scala-commit-date 2016-03-04 21:57:12.000000000 +1100
+++ scala-2.11.8/tools/get-scala-commit-date 2016-09-16 10:29:09.215240534 +1000
@@ -10,8 +10,8 @@

[[ $# -eq 0 ]] || cd "$1"

-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)
+lastcommitdate="2016-03-04"
+lastcommithours="00:00:00"

# 20120324
echo "${lastcommitdate//-/}-${lastcommithours//:/}"
--- scala-2.11.8-orig/tools/get-scala-commit-sha 2016-03-04 21:57:12.000000000 +1100
+++ scala-2.11.8/tools/get-scala-commit-sha 2016-09-16 10:29:45.566119137 +1000
@@ -12,7 +12,7 @@

# 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="1706a37eb84ec252aea77bccebad3e48448534ad"
hash=${hash#g}
hash=${hash:0:10}
echo "$hash"
224 changes: 224 additions & 0 deletions dev-lang/scala/scala-2.11.11.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="5"

JAVA_PKG_IUSE="doc source"
JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
EANT_TEST_TARGET="test.suite"

inherit eutils check-reqs java-pkg-2 java-ant-2 versionator

MY_P="${PN}-sources-${PV}"
SV="$(get_version_component_range 1-2)"

# creating the binary:
# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
# cd $WORDKIR
# tar -cjf scala-2.11.8-gentoo-binary.tar.bz2 scala-2.11.8/build/pack/bin \
# scala-2.11.8/build/pack/lib/ scala-2.11.8/build/pack/man \
# scala-2.11.8/src/actors/ scala-2.11.8/src/forkjoin/ \
# scala-2.11.8/src/library scala-2.11.8/src/library-aux/ \
# scala-2.11.8/src/reflect/ scala-2.11.8/docs/TODO \
# scala-2.11.8/doc/README scala-2.11.8/build/scaladoc/compiler

# 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}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
"${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.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"
"${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.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
${JURI[@]}
https://dev.gentoo.org/~patrick/${P}-maven-deps.tar.gz
)
binary? ( https://dev.gentoo.org/~patrick/${P}-gentoo-binary.tar.bz2 )
"

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.7* =virtual/jdk-1.8* )
dev-java/ant-core:0
dev-java/ant-contrib:0
dev-java/ant-nodeps:0
media-gfx/graphviz
)
binary? (
|| ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
)
app-arch/xz-utils:0"

RDEPEND="${COMMON_DEP}
>=virtual/jre-1.7
app-eselect/eselect-scala
!dev-lang/scala-bin:0"

PDEPEND="emacs? ( app-emacs/scala-mode:0 )"

S="${WORKDIR}/${P}"

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
}

java_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
epatch "${FILESDIR}/${P}-no-git.patch"
# 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}-maven-deps.tar.gz from SRC_URI
# 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
# or /var/tmp/portage/.m2 or /root/.m2
# 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
-e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
-e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
-i "${S}/build.xml" \
|| die "Could not change location of .m2 maven download directory in ${S}/build.xml"
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
}

src_compile() {
if ! use binary; then
#unset ANT_OPTS as this is set in the build.xml
#sets -X type variables which might come back to bite me
unset ANT_OPTS

# reported in bugzilla that multiple launches use less resources
# https://bugs.gentoo.org/show_bug.cgi?id=282023
eant all.clean
eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
fastdist-opt
if use doc; then
# The separate build for doc is to workaround this problem that occurs
# with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
# java.lang.OutOfMemoryError: PermGen space
eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
docscomp
eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
docs
fi
else
einfo "Skipping compilation, USE=binary is set."
fi
}

src_test() {
java-pkg-2_src_test
}

src_install() {
pushd build/pack || die
local SCALADIR="/usr/share/${PN}-${SV}"
exeinto "${SCALADIR}/bin"
doexe $(find bin/ -type f ! -iname '*.bat')
dodir "${SCALADIR}/lib"
insinto "${SCALADIR}/lib"
pushd lib || die
for j in *.jar; do
local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\[email protected]@")"
newins "${j}" "${i}"
java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
done
popd

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

pushd man/man1 || die
for i in *.1; do
newman "${i}" "${i/./-${SV}.}"
done
popd
popd

#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 actors forkjoin library library-aux reflect
fi
popd

local docdir="build/scaladoc"
dodoc docs/TODO doc/README
if use doc; then
dohtml -r "${docdir}"/{compiler,library}
fi
}

0 comments on commit 98fa08f

Please sign in to comment.