diff options
Diffstat (limited to 'dev-java/sbt')
-rw-r--r-- | dev-java/sbt/Manifest | 6 | ||||
-rw-r--r-- | dev-java/sbt/sbt-0.13.18.ebuild | 144 |
2 files changed, 150 insertions, 0 deletions
diff --git a/dev-java/sbt/Manifest b/dev-java/sbt/Manifest index 582f2794fe8a..abbeca832b59 100644 --- a/dev-java/sbt/Manifest +++ b/dev-java/sbt/Manifest @@ -2,6 +2,12 @@ DIST sbt-0.13.13-gentoo-binary.tar.xz 58011476 BLAKE2B 87f829a5a6c4047b5120b9685 DIST sbt-0.13.13-ivy2-deps.tar.xz 121677604 BLAKE2B 7f6e508104a99c36f8f928550f7c0e41b742cefef3f3fccf2999fe7a5873cf690d693c0ded1df481535b59a7340a997cc21ef3ffd403b147fd8a323d1ee28620 SHA512 3301447a563e9a83431bb67a6281a6045630669012f1cc5cdde7a2cbae3f7db75f87abed003ecf8243fd230e2adea2ba3666468358ae29c51e346940235f5ed5 DIST sbt-0.13.13-sbt-deps.tar.xz 34750700 BLAKE2B 5856f19d19255a6c4a373086962f3bff195d03193bb74d8d3aee1cfb2749ef3638f5c26dff7cb7c455c5b4ce67e8cf4fa46bbf9a8363f80dc26092e6df768d81 SHA512 0bfd35a6926545da7340f7ee72e420121f2bb2f83d98d420b7f65b465d207b1b30a48788914e7b1fdf575a4fee870f2632b0717f1a7a2c19e2f2d5794d08b4da DIST sbt-0.13.13-src.tar.xz 35911028 BLAKE2B 42157af03ae3567a2acc67cc0c96a9ffe19b69d60fddfde1cd65bbc410c14b09e5da0febb8225e49693c380a444b752296c29a21cc7f2239ee49ccef5128a3ff SHA512 351f18108a23014ee7ffd5c4713f390728fb98b742efdc139e094e64df7800f399d088600d245631635b0f6f4cb69c6cd327aafa3b0bf8a233fcbf0cb4ac5702 +DIST sbt-0.13.18-gentoo-binary.tar.xz 24312512 BLAKE2B 8601ff9d8783156f98df7e855563ebd1a1e51b4588f7fb5701b2fbd86771b7a280518272fc24f469f8810893f2762afb33f1c590764f980d9571555b3f84e4c6 SHA512 ca4b3b50d04f33c55e4bef468623a245e6001f922c8ad404e60a4369bcd6e683a97dab169b03cbc12d9e530aff194fdf1571aceca32c5dbb37b4c3d7a49a09f9 +DIST sbt-0.13.18-ivy2-deps.tar.xz 97612984 BLAKE2B d712b80cde43c46bc714d30f3009b9e46c5f50f78fbc46f8bc106f522308faa9a8d0bdbf4ad9634730f759bb3c484380d33e585771b33633aab6b8ee7dda5ba4 SHA512 c6affd495f9882b71d3a811638c803a646f71e926cc7efb2e84950d85a4fb6dcb65674ff5444d9ffc8858726342b6d3733880d1611157004b891689e67f24028 +DIST sbt-0.13.18-sbt-deps.tar.xz 34787436 BLAKE2B aba63ee1f7ec3f105bae0fa882dc193360c29f772a50ee84b9770f79491d55fcff509d70b813b62ad0bdd618729293b030b29209236ad5d9af1bfc11b7a0fdf0 SHA512 aab302c83303baa89bf6a2ed8d3af76e4d92b9c4339d0e30767fcfcf61131c29a534ba43fb73467f673dec0b3f61d2e740a19b3790fcc4f76b413d04115dfbb8 +DIST sbt-0.13.18.tar.gz 952783 BLAKE2B 31648c2cbbeb5d57db03c10bd4ac25344ae2d0351fc592e85e053e9ac0deb063e1b1e700a8dfa4a242243dd06fa491f721852ddbc2ea1d7fd4174e01febad25e SHA512 0eeb6fddc2454c2fff2eee06a80179495c0210d97fd3677bfe0f8833524ac707515b9e8f3c19e0d0372f503ef9b9f19dbe4cf15b6f8b48181ad730685004267c DIST sbt-launch-0.13.13.jar 1210231 BLAKE2B 754abad78cec4f6b040fb63dcb62e549768174b22cf3f9ab7d2419736d4f09b53863cf645b38d7d534deb1c6e897f55d8b1b5fa82462ca9d906c410d22c0c198 SHA512 78e7ce21c610e83a532b04491e13d53b4193205328adce473252d523fe0ca0f3892dba900f01ff6e28d94a17c3ba1ebbe7d85fd6ce9900c48263bc4816da37ef +DIST sbt-launch-0.13.18.jar 1210278 BLAKE2B b3c03f0c823576db51eda51a494edeb771f7ab762afe74fa95f19a4581d80cfdf3c6d6bfacd76e195de34f420912d18b505b74414fbc02550c9331fe4b3e07e3 SHA512 2b1e27f8d873ee45cc168ab19f6e82421d6896116c7b7af60974b97f41edd034fa008e668c83f83d2ce3a501986674821d8a427ccbcda291c8c33b576d64921b EBUILD sbt-0.13.13.ebuild 5677 BLAKE2B 77ab2c5de7b1098ed49eb9a2570c423e07089eee4cadb4882346b7f654452141e528dbfd5375fe67183faf9d2b06255527f7eb81678c8e81c0cb8683ce35b114 SHA512 3b95619c3a561cba59734f851d2b7d9df5e59073d793d28c3907936b725a540602ec6e8ceab02c037a987dba0920c13cf7c10408785636fc343bfc955cb1d68b +EBUILD sbt-0.13.18.ebuild 4913 BLAKE2B 003d8fef0ee9255a82de41b8a9b30c674664a8216c0d79608b104c3d8f8606e24788ca2386395c31588e39e7f99c360df7de6e99027192c37d482894337e27d6 SHA512 c2b3a53cdfe91f65d09dffdfeb552b2fb7c7a27267bad0497a7b7653d6bcb04da3d6385e447cc3f49262f7b5da0ecbe1346eefaf5c6091fb272e21712dbb4e67 MISC metadata.xml 525 BLAKE2B c70c7e88be5a5b06cbc422d6f354535711d06590780285ee1fd7e6668a0205795a4295869d61fb91b201df9ec2c275e4d74a07734fcc39bac9d4fbf2632f4b9d SHA512 53269c8f362ba0415988cfb9889a7af2c67a6788d85fbe4d9008fbed1cc0a3d3bddc2a6049c6d0ba23c28e3ad2d65f240a9085ceaccc5d55d4387e4dd90c5505 diff --git a/dev-java/sbt/sbt-0.13.18.ebuild b/dev-java/sbt/sbt-0.13.18.ebuild new file mode 100644 index 000000000000..f6976d5d9d1a --- /dev/null +++ b/dev-java/sbt/sbt-0.13.18.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit eutils java-pkg-2 + +L_PN="sbt-launch" +L_P="${L_PN}-${PV}" + +DESCRIPTION="sbt is a build tool for Scala and Java projects that aims to do the basics well" +HOMEPAGE="https://www.scala-sbt.org/" +EGIT_COMMIT="v${PV}" +EGIT_REPO_URI="https://github.com/sbt/sbt.git" +SRC_URI=" + !binary? ( + https://github.com/sbt/sbt/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 + 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:* +" + +RDEPEND=" + >=virtual/jre-1.8:* +" + +# test hangs or fails +RESTRICT="test" + +# Note: to bump sbt, some things to try are: +# 1. 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 +# 2. Comment the sbt publishLocal line in src_compile. +# 3. 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. +# 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: +# cd to ${S} +# export EROOT=/ +# export WORKDIR='/var/tmp/portage/dev-java/${P}/work' +# export L_P=${P} +# export PATH="${WORKDIR}/${L_P}:${PATH}" +# sbt compile +# cd ${WORKDIR} +# find .ivy2 .sbt -uid 0 -exec chown portage:portage {} \; +# 5. 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. +# 6. 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. +# 7. 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() { + # 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 + + # 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 + 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() { + "${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}" +} |