summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-07-26 12:03:21 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-07-26 13:19:50 +0200
commitf688a09a2ce1015f91696dd80763dd8e052c57ed (patch)
tree15314a266628557a11c718d0f5435f27d90d0dee /dev-lang/ammonite-repl-bin
parentwww-client/firefox: add 103.0 (diff)
downloadgentoo-f688a09a2ce1015f91696dd80763dd8e052c57ed.tar.gz
gentoo-f688a09a2ce1015f91696dd80763dd8e052c57ed.tar.bz2
gentoo-f688a09a2ce1015f91696dd80763dd8e052c57ed.zip
dev-lang/ammonite-repl-bin: install for multiple Scala versions
Closes: https://github.com/gentoo/gentoo/pull/26602 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-lang/ammonite-repl-bin')
-rw-r--r--dev-lang/ammonite-repl-bin/Manifest4
-rw-r--r--dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4-r1.ebuild45
-rw-r--r--dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4.ebuild26
-rw-r--r--dev-lang/ammonite-repl-bin/metadata.xml5
4 files changed, 53 insertions, 27 deletions
diff --git a/dev-lang/ammonite-repl-bin/Manifest b/dev-lang/ammonite-repl-bin/Manifest
index 76d6281c64e6..1ac27e741ee0 100644
--- a/dev-lang/ammonite-repl-bin/Manifest
+++ b/dev-lang/ammonite-repl-bin/Manifest
@@ -1 +1,3 @@
-DIST ammonite-repl-bin-2.5.4 48438500 BLAKE2B 386ab32fc122267d17d377201a73e001ca40eb9c3254527e0819ae399cdcda90c5ada8d4773e16a1a930ba839e374dfd0d9848ccf1da75e5f6e385bf870f27a1 SHA512 cd1b382e2a5eb2ca93ad0640d9806e5770516f8fbd1c2a468e2bb333ab648916ed7b86efdf5d5e674176eee09532cf0a9b5af57021695c37b4862abb546966db
+DIST ammonite-repl-bin-2.5.4-2.13 48438500 BLAKE2B 386ab32fc122267d17d377201a73e001ca40eb9c3254527e0819ae399cdcda90c5ada8d4773e16a1a930ba839e374dfd0d9848ccf1da75e5f6e385bf870f27a1 SHA512 cd1b382e2a5eb2ca93ad0640d9806e5770516f8fbd1c2a468e2bb333ab648916ed7b86efdf5d5e674176eee09532cf0a9b5af57021695c37b4862abb546966db
+DIST ammonite-repl-bin-2.5.4-3.0 53445165 BLAKE2B 94791b9b616d6a1253fbb99455b2eb71ecb9768918b0e8c829f600c84e801dd53574b827fe32f606d4cf310f3f2655444d1979438ee459fa419d39820522f19d SHA512 498a858bc30c4a1479cc627559d066630cd0fd6ba9ae9e64607ce07246a216fd57de433e87a8b3b7511f4db143d227d9a0433166e5ba720ed38ae6dbd587f162
+DIST ammonite-repl-bin-2.5.4-3.1 54220925 BLAKE2B 104190bae8ae6d8efe3b3d43932ecf5f5075516b706dffca04a1fc3710edc476b2042b8b50036fd7719207dabd0771e3239030e866b48adad14a901d155c15c0 SHA512 5490d6bdc73bb6e48626e81acf3e8232697205252712505a31b5a3376d171c065854a5d552c910ac8c77f74e76eb84d34b5db5bb00b13fb53b5ba6394c22e920
diff --git a/dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4-r1.ebuild b/dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4-r1.ebuild
new file mode 100644
index 000000000000..7bda042dadbb
--- /dev/null
+++ b/dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Scala language-based scripting and REPL"
+HOMEPAGE="https://ammonite.io/"
+
+SRC_URI="
+ scala2-13? ( https://github.com/com-lihaoyi/Ammonite/releases/download/${PV}/2.13-${PV} -> ${P}-2.13 )
+ scala3-0? ( https://github.com/com-lihaoyi/Ammonite/releases/download/${PV}/3.0-${PV} -> ${P}-3.0 )
+ scala3-1? ( https://github.com/com-lihaoyi/Ammonite/releases/download/${PV}/3.1-${PV} -> ${P}-3.1 )
+"
+
+KEYWORDS="amd64 x86"
+LICENSE="MIT"
+SLOT="0"
+
+S="${WORKDIR}"
+
+RDEPEND=">=virtual/jre-1.8:*"
+
+IUSE="+scala2-13 scala3-0 +scala3-1"
+REQUIRED_USE="|| ( scala2-13 scala3-0 scala3-1 )"
+
+src_unpack() {
+ :
+}
+
+src_install() {
+ local last_amm
+ if use scala3-1; then
+ newbin "${DISTDIR}"/${P}-3.1 amm-3.1
+ last_amm=amm-3.1
+ fi
+ if use scala3-0; then
+ newbin "${DISTDIR}"/${P}-3.0 amm-3.0
+ last_amm=amm-3.0
+ fi
+ if use scala2-13; then
+ newbin "${DISTDIR}"/${P}-2.13 amm-2.13
+ last_amm=amm-2.13
+ fi
+ dosym $last_amm /usr/bin/amm
+}
diff --git a/dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4.ebuild b/dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4.ebuild
deleted file mode 100644
index 6cae7d9be42f..000000000000
--- a/dev-lang/ammonite-repl-bin/ammonite-repl-bin-2.5.4.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-SCALA_VERSION="2.13"
-
-DESCRIPTION="Scala language-based scripting and REPL"
-HOMEPAGE="https://ammonite.io/"
-SRC_URI="https://github.com/com-lihaoyi/Ammonite/releases/download/${PV}/${SCALA_VERSION}-${PV} -> ${P}"
-
-KEYWORDS="amd64 x86"
-LICENSE="MIT"
-SLOT="0"
-
-S="${WORKDIR}"
-
-RDEPEND=">=virtual/jre-1.8:*"
-
-src_unpack() {
- :
-}
-
-src_install() {
- newbin "${DISTDIR}"/${P} amm
-}
diff --git a/dev-lang/ammonite-repl-bin/metadata.xml b/dev-lang/ammonite-repl-bin/metadata.xml
index 29c1eb29b6d7..a6816afd69b6 100644
--- a/dev-lang/ammonite-repl-bin/metadata.xml
+++ b/dev-lang/ammonite-repl-bin/metadata.xml
@@ -14,4 +14,9 @@
<email>haoyi.sg@gmail.com</email>
</maintainer>
</upstream>
+ <use>
+ <flag name="scala2-13">Install Ammonite for Scala 2.13</flag>
+ <flag name="scala3-0">Install Ammonite for Scala 3.0</flag>
+ <flag name="scala3-1">Install Ammonite for Scala 3.1</flag>
+ </use>
</pkgmetadata>