summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2015-04-19 05:56:01 +0000
committerMark Wright <gienah@gentoo.org>2015-04-19 05:56:01 +0000
commite1fbbd0149b738a9d6d78f81b650e4e23f84e13c (patch)
tree47ca79b7a2e7dfd22bcdd837e37d33edaa885a48 /dev-java
parentAvoid unneeded dependency on rake-compiler. (diff)
downloadhistorical-e1fbbd0149b738a9d6d78f81b650e4e23f84e13c.tar.gz
historical-e1fbbd0149b738a9d6d78f81b650e4e23f84e13c.tar.bz2
historical-e1fbbd0149b738a9d6d78f81b650e4e23f84e13c.zip
Add dev-java/sbt. Fixes ebuild request bug 419533, thanks to whiter4bbit for reporting and the dev-java/sbt-bin ebuild, Christian Strahl for testing, chewi for reviewing.
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0x618E971F
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/sbt/ChangeLog11
-rw-r--r--dev-java/sbt/Manifest19
-rw-r--r--dev-java/sbt/metadata.xml12
-rw-r--r--dev-java/sbt/sbt-0.13.8.ebuild147
4 files changed, 189 insertions, 0 deletions
diff --git a/dev-java/sbt/ChangeLog b/dev-java/sbt/ChangeLog
new file mode 100644
index 000000000000..2d098cb27c91
--- /dev/null
+++ b/dev-java/sbt/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for dev-java/sbt
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sbt/ChangeLog,v 1.1 2015/04/19 05:55:53 gienah Exp $
+
+*sbt-0.13.8 (19 Apr 2015)
+
+ 19 Apr 2015; Mark Wright <gienah@gentoo.org> +metadata.xml,
+ +sbt-0.13.8.ebuild:
+ Add dev-java/sbt. Fixes ebuild request bug 419533, thanks to whiter4bbit for
+ reporting and the dev-java/sbt-bin ebuild, Christian Strahl for testing, chewi
+ for reviewing.
diff --git a/dev-java/sbt/Manifest b/dev-java/sbt/Manifest
new file mode 100644
index 000000000000..255a095a8dad
--- /dev/null
+++ b/dev-java/sbt/Manifest
@@ -0,0 +1,19 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+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.7.jar 1208380 SHA256 9673ca4611e6367955ae068d5888f7ae665ab013c3e8435ffe2ca94318c6d607 SHA512 f48a42f3a9b938de97b20ad281eff2bbc0ccc04d5fda06aa6af3ba02bcc27e4fec10e4bc30660a9df4b453c153c5244805561294168b98a0219c7950d3ded388 WHIRLPOOL 2b1e11dada40b2491eca94e3090ed41342f982a300ad3d2f2be6fa79f01c4b8d302b283f05a765411d3803b012368b2a1dffd70352b315b8e44d6f61c2110822
+EBUILD sbt-0.13.8.ebuild 5208 SHA256 b297d5f06eafe4144e60871d809691ddbb9e3736ed5be908f585c8ec00806b51 SHA512 8ec80043754ae5c54386873f4829553a7a945e74daa69e4bbdc50ff37c48c0bb5d07ab13078d2ed51fbc9d4bb33b53d16833adfa4736722087a178747ca04372 WHIRLPOOL d5a522f862e816c78ade0c5e896e89a7b2eabba4b163c109014cf904381c99b76531fd4829000212ca53ea330262c2ee82032e08340d3528168027477838f565
+MISC ChangeLog 485 SHA256 ca7609f1013a84614a2439edbc1aa0bd160354ba20f2092876c416f114a5b181 SHA512 982b8cce2ac710adf1e4b513d22ab581685239a4992564fde2b3499947b459c4d72d33ba24e62c4c93aa9e7b22ad0d9b32d8c2fdec51b2c11de37c53e8edfced WHIRLPOOL 5778ff0d77321b4ca33f1e224af48fb55e06673a2d2dc6a503acb260ccbe3d7ce8ab2829e2629c61e6d65f6bc3cf0307f384751f02fd8db82e7c1cab8ddb320f
+MISC metadata.xml 512 SHA256 8ab87f872385662b8bba8f89d4baa9fdfa32f8bc535a750c0b9af23ed13cc23d SHA512 4c3c11d9941915719d9c11ab4b96a62296c2734ccd7f4dc1c9316870f2f47b8e907024a4821b7cd637237ed82efd8a4c6d8c8108170a885cf5fad162aca1a5f9 WHIRLPOOL c8c1faa9f0976495e16652b9a04afd6d69003bdcc05a0d3c5f8ec2a0088b894eeeeb15edcc5a38a0ea24ed96654da7618f91a92b0e43f4a507e5851435933e7f
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iF4EAREIAAYFAlUzQ3AACgkQoBEVQmGOlx/kVgD+LIUiAalB4se73X15LgkVqIKF
+Ve9BiNFla9yK/9I8z48BAJTjgpyX5t/xXiUb4s+17jinuzASZQTPgFfJmgXpAVx7
+=bwjk
+-----END PGP SIGNATURE-----
diff --git a/dev-java/sbt/metadata.xml b/dev-java/sbt/metadata.xml
new file mode 100644
index 000000000000..fc08f926629c
--- /dev/null
+++ b/dev-java/sbt/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>gienah@gentoo.org></email>
+</maintainer>
+<longdescription lang='en'>
+The interactive build tool.
+Use Scala to define your tasks. Then run them in parallel from the shell.
+</longdescription>
+<use><flag name='binary'>Install from (Gentoo-compiled) binary instead of building from sources. Set this when you run out of memory during build.</flag></use>
+</pkgmetadata>
diff --git a/dev-java/sbt/sbt-0.13.8.ebuild b/dev-java/sbt/sbt-0.13.8.ebuild
new file mode 100644
index 000000000000..0a3e9cc0bb95
--- /dev/null
+++ b/dev-java/sbt/sbt-0.13.8.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sbt/sbt-0.13.8.ebuild,v 1.1 2015/04/19 05:55:53 gienah Exp $
+
+EAPI="5"
+
+# 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}"
+
+B_PV="0.13.7"
+BL_P="${L_PN}-${B_PV}"
+B_P="${PN}-${B_PV}"
+
+SV="2.10"
+
+# creating the sbt src snapshot:
+# git clone https://github.com/sbt/sbt.git sbt-0.13.8
+# cd sbt-0.13.8
+# git checkout v0.13.8
+# cd ..
+# tar --owner=portage --group=portage -cjf sbt-0.13.8-src.tar.bz2 sbt-0.13.8
+
+# creating the binary:
+# cd $WORDKIR
+# tar -cjf sbt-0.13.8-gentoo-binary.tar.bz2 sbt-0.13.8/sbt-launch/target/sbt-launch.jar
+
+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?
+(
+ http://dev.gentoo.org/~gienah/snapshots/${P}-src.tar.bz2
+ http://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.bz2
+ http://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.bz2
+ http://dev.gentoo.org/~gienah/snapshots/${P}-test-deps.tar.bz2
+ http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/${L_PN}/${PV}/${L_PN}.jar -> ${BL_P}.jar
+)
+binary? ( http://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="binary"
+
+DEPEND="virtual/jdk:1.6
+ >=dev-lang/scala-2.10.4-r1:${SV}"
+RDEPEND=">=virtual/jre-1.6
+ dev-lang/scala:*"
+
+# test hangs or fails
+RESTRICT="test"
+
+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
+}
+
+java_prepare() {
+ if ! use binary; then
+ # Note: to bump sbt, some things to try are:
+ # 1. remove the http://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.bz2
+ # http://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.bz2 and
+ # http://dev.gentoo.org/~gienah/snapshots/${P}-test-deps.tar.bz2 from SRC_URI
+ # 2. Comment the sbt publishLocal line in src_compile.
+ # 3. try:
+ # FEATURES='noclean -test' emerge -v 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.
+ # 4. If some of the downloads fail, it might be necessary to run the sbt compile
+ # again manually to obtain all the dependencies, if so (with jdk 1.6):
+ # cd to ${S}
+ # export EROOT=/
+ # export WORKDIR='/var/tmp/portage/dev-java/sbt-0.13.8/work'
+ # export SV="2.10"
+ # export B_P=sbt-0.13.7
+ # export PATH="/usr/share/scala-${SV}/bin:${WORKDIR}/${B_P}:${PATH}"
+ # sbt compile
+ # cd ${WORKDIR}
+ # find .ivy2 .sbt -uid 0 -exec chown portage:portage {} \;
+ # 5. cd ${WORKDIR}
+ # tar -cjf sbt-0.13.8-ivy2-deps.tar.bz2 .ivy2
+ # tar -cjf sbt-0.13.8-sbt-deps.tar.bz2 .sbt
+ # 6. It downloads 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. Note: src_test creates some files in ${WORKDIR}/.m2 which are can
+ # hopefully be ignored. As root:
+ # cd ${S}
+ # sbt test
+ # cd ${WORKDIR}
+ # find .ivy2 .sbt -uid 0 -print
+ # Then add those files to sbt-0.13.8-ivy2-test-deps.tar.bz2 except the files in the directories
+ # .ivy2/local
+ # .ivy2/cache/org.scala-sbt
+ # Something like:
+ # tar --owner=portage --group=portage -cjf sbt-0.13.8-test-deps.tar.bz2 <list of files as described above>
+ # 7. Undo the earlier temporary edits to the ebuild.
+ mkdir "${WORKDIR}/${B_P}" || die
+ cp -p "${DISTDIR}/${BL_P}.jar" "${WORKDIR}/${B_P}/${L_PN}.jar" || die
+ cat <<- EOF > "${WORKDIR}/${B_P}/sbt"
+ #!/bin/sh
+ SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512M"
+ java -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \${SBT_OPTS} -jar "${WORKDIR}/${B_P}/sbt-launch.jar" "\$@"
+ EOF
+ chmod u+x "${WORKDIR}/${B_P}/sbt" || die
+ local SCALA_PVR="$(java-config --query=PVR --package=scala-${SV})"
+ local SFV="${SCALA_PVR/-*}"
+ sed -e "s@scalaVersion := \"2.10.4\",@scalaVersion := \"${SFV}\",\n scalaHome := Some(file(\"/usr/share/scala-${SV}\")),@" \
+ -i "${S}/build.sbt" || die
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${B_P}:${PATH}"
+ einfo "=== sbt compile ..."
+ "${WORKDIR}/${B_P}/sbt" -Dsbt.log.noformat=true compile || die
+ einfo "=== sbt publishLocal ..."
+ "${WORKDIR}/${B_P}/sbt" -Dsbt.log.noformat=true publishLocal || die
+ fi
+}
+
+src_test() {
+ if ! use binary; then
+ export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${B_P}:${PATH}"
+ "${WORKDIR}/${B_P}/sbt" -Dsbt.log.noformat=true test || die
+ fi
+}
+
+src_install() {
+ if ! use binary; then
+ pushd sbt-launch/target || die
+ mv ${L_P}.jar ${L_PN}.jar || die
+ popd
+ fi
+ java-pkg_dojar sbt-launch/target/${L_PN}.jar
+ java-pkg_dolauncher sbt --main xsbt.boot.Boot --java_args "-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512M"
+}