summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-java/sbt/Manifest5
-rw-r--r--dev-java/sbt/sbt-0.13.13.ebuild162
2 files changed, 167 insertions, 0 deletions
diff --git a/dev-java/sbt/Manifest b/dev-java/sbt/Manifest
index e525e645380d..868d280d59b2 100644
--- a/dev-java/sbt/Manifest
+++ b/dev-java/sbt/Manifest
@@ -7,11 +7,16 @@ DIST sbt-0.13.11-gentoo-binary.tar.bz2 144170371 SHA256 ca13e6d5751de14ac0fe3542
DIST sbt-0.13.11-ivy2-deps.tar.bz2 139796284 SHA256 d8ad25a99e1dd8ebbc29955844543a1cee8bbd845cca9bb4fa92b62c27673a29 SHA512 e431e00884dbf58ca911d64da726b41b8aeae9987ae2725705c9c45b4601162e45d310f933e4214cf8a4d21ba9e7207365d9ba352cbe1511ce09f59cd33da033 WHIRLPOOL b56ba91892ee2dbb1d9d9609ffd8417184e291fa8c03f8a115757301c412a8d141a17ae315ac916067bab5b49d74f16cb82da497c8790c212f3ccc068721e24f
DIST sbt-0.13.11-sbt-deps.tar.bz2 38783848 SHA256 c2059a2513cbee50afe506d1fb0511b384df99757273d941b136e5bb3155ca7e SHA512 53020538eac11d6ae268436987d98093f017f421750496080908fad36eb9148a4cce41ab1a231ff1a35868c5c07cc8e338f1793fc91d044802b3e95b900e9cc8 WHIRLPOOL 0e4617b728536be9adfcf683b1575a522c5c0f073098c7f685003f0a340bfc4fff06031252016227b8af38f666296185815508b89bb7e82334276e55c707e16e
DIST sbt-0.13.11-src.tar.bz2 35163092 SHA256 1b987725b4e57d6139b02c9d43b18d6ec43880681cccdfca3a29c803e79f6494 SHA512 95065c452fbbf2a206ad8d8518f083abe608e8bad1075848fa7a4ad797e8a10e4127823cdb8502f4d9bd0eb01867298af7d69895eb1470bf71deba354871dd86 WHIRLPOOL 652ba691ea2dccf6eb22ea2b43d9b96e15597cb8ce2325eacd912752a60854f982e1a6fec8c049e144042c10e98b888a66b3fe923c63447ef46e6582786e4a81
+DIST sbt-0.13.13-gentoo-binary.tar.xz 58011476 SHA256 5d24c07945c713e265e40634b5e4bf8ff34ecfed2e87df1f5f65e8d907b4a268 SHA512 9763b67ac4838e6ccac1848c17a03608bed61669671a10c93afc4c81d6dad06a3463ac4e4a9b7b3fb91325df5df6e0148847669d482e3cacf4fde957c110ccc1 WHIRLPOOL c1b30ccc325a11b9886de9c0d2ffcd71acd7b15a352faea20e7c8cd2ae0a2a7b7a933f7b795a417f6a64837912a2b287b5e3e91e1c428ce604c708c3549362f3
+DIST sbt-0.13.13-ivy2-deps.tar.xz 121677604 SHA256 71dc4487a7fb203750230fb7ddbda5b2b12dad6d1e9f2ed5d2bec36df962799b SHA512 3301447a563e9a83431bb67a6281a6045630669012f1cc5cdde7a2cbae3f7db75f87abed003ecf8243fd230e2adea2ba3666468358ae29c51e346940235f5ed5 WHIRLPOOL a6e66fb56e85b923142cf2fdb9867fe8f75200db01285c5e7f32f391573bf39c68be7f022f80eb679b15442c4425e87111878d0c93e8ddc0e7d4dca1f11eb909
+DIST sbt-0.13.13-sbt-deps.tar.xz 34750700 SHA256 a5897a610393c0d2004badbf82ebd40469f85f29b5d29f6a3d76b8ecfbe73776 SHA512 0bfd35a6926545da7340f7ee72e420121f2bb2f83d98d420b7f65b465d207b1b30a48788914e7b1fdf575a4fee870f2632b0717f1a7a2c19e2f2d5794d08b4da WHIRLPOOL 6b1b70b705ea613074a111e7a6cfbc2b31fd91645701f0018120ced4bd678c71e8a785922ece74111648d6ada89bfe714a4e95cb9b513fb409349967ed60d779
+DIST sbt-0.13.13-src.tar.xz 35911028 SHA256 1344e49fe870f755ab872f51368f9d939a0076e24c03bd1f7f600e10db8210be SHA512 351f18108a23014ee7ffd5c4713f390728fb98b742efdc139e094e64df7800f399d088600d245631635b0f6f4cb69c6cd327aafa3b0bf8a233fcbf0cb4ac5702 WHIRLPOOL 7998c7e95bd9c85c3b25a2c9ea584cab7651508e90e30304ede1744ca56d41d25b2b095e397c3af52025683e6cf3fb54b6992f438545f3fc8d5afc54308c33d2
DIST sbt-0.13.8-gentoo-binary.tar.bz2 1048674 SHA256 4a2b22c9d9fbe922d5a5336d88ca21f18b2545850fec16485c824aee43df53e1 SHA512 9a5707601387d604b746ea21145a3c7735dd4b6d36541111b47519b66e5abc929ecc96ff52e144ed39a3db947204a1956e19394a1848e3fd8904f9a98ec24816 WHIRLPOOL 4fb1bde15ab57260a25b0a4a1634122af2e2b9d6cd35d3a9c693d9bba6c398bee489f05bf29a763a60d7a04f54823bdd9fc54ec5a2809900b28f890930649fc7
DIST sbt-0.13.8-ivy2-deps.tar.bz2 124672043 SHA256 565ba7434316a3ab2f61f58b4bc57317e5c2ae7c9ee95061c39cfddd5767a355 SHA512 47b2f235b7d5883086f8246265e9081a50dcdaede43550a1c0de1c85a9ebf24b47e1331b662aa5c0faebaf22a37849ffb2c1f25a7592c461e62f582984ad4b70 WHIRLPOOL f92b2cd087d51f0ae31d5ac93d1dca7214ace6df8c06b050287007f05697e81ac14758368730e6df45043ba80167b9581e636b0364d5ba3a5c7352fafd7e5007
DIST sbt-0.13.8-sbt-deps.tar.bz2 88352931 SHA256 d0eab3858f389e201277d1ead68352172830b17dd8343f09e0e63e4880a5e20e SHA512 a6e886f5f18821c26df28a2e8cf2773b4841854fc1bd4dfa43924089966020da5affd635da96a8e13efc7c06be6a5bf53697ca91f5fbf41efcdf8dda00e8428d WHIRLPOOL 54744676b33b11ffb350b5a543986efd5cd629594ce4bac5154a78df233619a92a2a4842659acf9c15533e764d24333183372f136b3b1f7463bbe55347c41b8f
DIST sbt-0.13.8-src.tar.bz2 32766054 SHA256 5225864c54e5718dc68cfcd554a7215bd028947d61ed9522e2ad9d0a19cbdd83 SHA512 f6c834c6294c957e8d5b89a3a616f23a980cca1f882695d09a6e0080d1013227ba3bac86942b39c13e49fb6ac9fb72c3478df24ec8549b8b9812ea352932fff8 WHIRLPOOL 5054578505fe35b6c5f269c72b921920cf232a1efed18da5cd1833457d46f4e4342988be46539001b4dcfcfc6c807785915f4d0791af939dc83018ffcc03effe
DIST sbt-0.13.8-test-deps.tar.bz2 40704285 SHA256 7cb252d69b5868905e0592df7ef9a83ce09f75cb10a72bc9dcd649286bb524a3 SHA512 a79ea9c81abc436168f04f674ffef4fee6f7c7a5dede5a3060e2e2bd9a9863dd5f1c7b31c02f3823fb5a67b2bb43c44d306efb59468f625e4db277cface47cd0 WHIRLPOOL 268ea150c5ca2fe1988317e0616262de814e2aa7213f64b99baf389c3e67e2093a04765ac27f08bd585fe33c77d9dd8c7a0ba8d3bd77d937d9a7260dab72c23a
DIST sbt-launch-0.13.11.jar 1210231 SHA256 c63ade35a7a7aa0d8e3bdc7c2353ce79b045083cfabf6bc6fab88584f6100bc1 SHA512 9db3d3e953e4246b09ce2265b76463b6000c6d1c9d1328eb0deb1b67e9c955816ef67f6aeaeca22dc46e27cc71ba833545ab39c5351b8230609c021ca9e818b9 WHIRLPOOL 6650144da7aef195779c4d23c594fee9c7f79e7b2758bb2c98c83732f75656b0143ec73023a98677201502a813c0e37bbec48cebbc6fe520484ec6bd53fb4019
+DIST sbt-launch-0.13.13.jar 1210231 SHA256 9cd7d56eabfb15b5fe68c39116c4cfe6379b5b260d63086d4f5c69fa62521c13 SHA512 78e7ce21c610e83a532b04491e13d53b4193205328adce473252d523fe0ca0f3892dba900f01ff6e28d94a17c3ba1ebbe7d85fd6ce9900c48263bc4816da37ef WHIRLPOOL 20e0cd1bd836cee2b4aaee8af8d1e29812211dc5e9ecda4b058a64c26c607c7645285949751f84ea95e68cee2bfaa4cce14b14c2d602e40d9db967bf8a094217
DIST sbt-launch-0.13.7.jar 1208385 SHA256 6570bb03df6138ffaa7ac0bbe35eb4ea79062d1146b6929c75cf238d14dd9158 SHA512 ddc62dd85b552a7157ae0c19d0161d77a929adeb4ea81042a3a38c3d979e32674b9174aef47d458e9a7c8ea7942c08f1a7177b9bc739f7cd9e0484aef9915204 WHIRLPOOL 63841a401739aa3eab24632fcec41dc5c186502f4b80fe782106a0c6448b1da2321bf2a7a0b0f83473f7c073cce2ac8f5f85440d955acc191a73bd95200cb2cf
DIST sbt-launch-0.13.9.jar 1210236 SHA256 4fddf384322c8aa02671ab89e229ab1e703613eee350e3af6c7790916d43f96d SHA512 c447e7be5b18689e4821dbde699fba230214a34059aa38441dcff13938d3cb351f1bd4266d99a2dcd40a80a7c623a14483755a461417750ab60635ab73c2fdde WHIRLPOOL 61806d9140b9b64b8a60f5f6a0e5d16bb6b16e643185b874780af0b3b32a9e62311d86e4a3fc3526735eb590a1a98f00881e60789c5b079521da660aea319171
diff --git a/dev-java/sbt/sbt-0.13.13.ebuild b/dev-java/sbt/sbt-0.13.13.ebuild
new file mode 100644
index 000000000000..a6753ad7194c
--- /dev/null
+++ b/dev-java/sbt/sbt-0.13.13.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+# repoman gives LIVEVCS.unmasked even with EGIT_COMMIT, so create snapshot
+inherit eutils java-pkg-2 # git-r3
+
+L_PN="sbt-launch"
+L_P="${L_PN}-${PV}"
+
+SV="2.11"
+
+DESCRIPTION="sbt is a build tool for Scala and Java projects that aims to do the basics well"
+HOMEPAGE="http://www.scala-sbt.org/"
+EGIT_COMMIT="v${PV}"
+EGIT_REPO_URI="https://github.com/sbt/sbt.git"
+SRC_URI="
+ !binary? (
+ https://dev.gentoo.org/~gienah/snapshots/${P}-src.tar.xz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz
+ http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/${L_PN}/${PV}/${L_PN}.jar -> ${L_P}.jar
+ )
+ binary? (
+ https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz
+ )"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="binary"
+
+DEPEND=">=virtual/jdk-1.8
+ >=dev-lang/scala-2.11.8:${SV}"
+RDEPEND=">=virtual/jre-1.8
+ >=dev-lang/scala-2.11.8:${SV}"
+
+# test hangs or fails
+RESTRICT="test"
+
+JAVA_GENTOO_CLASSPATH="scala-${SV}"
+
+# Note: to bump sbt, some things to try are:
+# 1. Create the sbt src snapshot:
+# git clone https://github.com/sbt/sbt.git ${P}
+# cd ${P}
+# git checkout v${PV}
+# cd ..
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-src.tar.xz ${P}
+# 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
+# https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz and
+# binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz )
+# from SRC_URI
+# 3. Comment the sbt publishLocal line in src_compile.
+# 4. try:
+# FEATURES='noclean -test' emerge -v -1 dev-java/sbt
+# It should fail in src_install since the sbt publishLocal is not done.
+# Check if it downloads more stuff in
+# src_compile to ${WORKDIR}/.ivy2 and ${WORKDIR}/.sbt.
+# 5. If some of the downloads fail, it might be necessary to run the sbt compile
+# again manually to obtain all the dependencies, if so:
+# cd to ${S}
+# export EROOT=/
+# export WORKDIR='/var/tmp/portage/dev-java/${P}/work'
+# export SV="2.11"
+# export L_P=${P}
+# export PATH="/usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
+# sbt compile
+# cd ${WORKDIR}
+# find .ivy2 .sbt -uid 0 -exec chown portage:portage {} \;
+# 6. cd ${WORKDIR}
+# 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
+# Uncomment the sbt publishLocal line in src_compile.
+# 7. It *might* download more dependencies for src_test, however the presence
+# of some of these may cause the src_compile to fail. So download them
+# seperately as root so we can identify the
+# additional files. As root:
+# cd ${S}
+# ${S}/${P} test
+# cd ${WORKDIR}
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-test-deps.tar.xz \
+# $(find .ivy2/cache .sbt -uid 0 -type f -print)
+# Note: It might not download anything in src_test, in which case
+# ${P}-test-deps.tar.xz is not required.
+# 8. Create the binary
+# cd $WORDKIR
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-gentoo-binary.tar.xz ${P} .ivy2/local
+# 9. Undo the earlier temporary edits to the ebuild.
+
+src_unpack() {
+ # if ! use binary; then
+ # git-r3_src_unpack
+ # fi
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+src_prepare() {
+ default
+ if ! use binary; then
+ mkdir "${WORKDIR}/${L_P}" || die
+ cp -p "${DISTDIR}/${L_P}.jar" "${WORKDIR}/${L_P}/${L_PN}.jar" || die
+ cat <<- EOF > "${WORKDIR}/${L_P}/sbt"
+ #!/bin/sh
+ SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
+ java -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \${SBT_OPTS} -jar "${WORKDIR}/${L_P}/sbt-launch.jar" "\$@"
+ EOF
+ cat <<- EOF > "${S}/${P}"
+ #!/bin/sh
+ SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
+ java -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \${SBT_OPTS} -jar "${S}/launch/target/sbt-launch.jar" "\$@"
+ EOF
+ chmod u+x "${WORKDIR}/${L_P}/sbt" "${S}/${P}" || die
+ sed -e "s@scalaVersion := scala210,@scalaVersion := scala${SV/./},\n scalaHome := Some(file(\"${EROOT}usr/share/scala-${SV}\")),@" \
+ -i "${S}/build.sbt" || die
+
+ # suppress this warning in build.log:
+ # [warn] Credentials file /var/tmp/portage/dev-java/${P}/work/.bintray/.credentials does not exist
+ mkdir -p "${WORKDIR}/.bintray" || die
+ cat <<- EOF > "${WORKDIR}/.bintray/.credentials"
+ realm = Bintray API Realm
+ host = api.bintray.com
+ user =
+ password =
+ EOF
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
+ einfo "=== sbt compile ..."
+ "${WORKDIR}/${L_P}/sbt" -Dsbt.log.noformat=true compile || die
+ einfo "=== sbt publishLocal with jdk $(java-pkg_get-vm-version) ..."
+ cat <<- EOF | "${WORKDIR}/${L_P}/sbt" -Dsbt.log.noformat=true || die
+ set every javaVersionPrefix in javaVersionCheck := Some("$(java-pkg_get-vm-version)")
+ publishLocal
+ EOF
+ fi
+}
+
+src_test() {
+ export PATH="${EROOT}usr/share/scala-${SV}/bin:${S}:${PATH}"
+ "${S}/${P}" -Dsbt.log.noformat=true test || die
+}
+
+src_install() {
+ # Place sbt-launch.jar at the end of the CLASSPATH
+ java-pkg_dojar $(find "${WORKDIR}"/.ivy2/local -name \*.jar -print | grep -v sbt-launch.jar) \
+ $(find "${WORKDIR}"/.ivy2/local -name sbt-launch.jar -print)
+ local ja="-Dsbt.version=${PV} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
+ java-pkg_dolauncher sbt --jar sbt-launch.jar --java_args "${ja}"
+}