Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
upgpkg: ammonite 2.5.6-3: add a proper patch to set java target (com-…
Browse files Browse the repository at this point in the history
…lihaoyi/Ammonite#1319)

git-svn-id: file:///srv/repos/svn-community/svn@1391166 9fca08f4-af9d-4005-b8df-a31f2cc04f65
  • Loading branch information
felixonmars authored and svntogit committed Jan 29, 2023
1 parent 020e573 commit ec8496d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
14 changes: 8 additions & 6 deletions trunk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@
pkgname=ammonite
pkgver=2.5.6
_scalaversion=2.13.2
pkgrel=2
pkgrel=3
pkgdesc="A cleanroom re-implementation of the Scala REPL from first principles. "
arch=('any')
url="https://github.com/lihaoyi/Ammonite"
license=('MIT')
depends=('bash')
makedepends=('mill' 'java-environment=8')
source=("https://github.com/lihaoyi/Ammonite/archive/$pkgver/$pkgname-$pkgver.tar.gz")
b2sums=('28eb868dfd1346007f0cf11b35f78827c315ee8d89be8986dc6992b9195f5880bff70ca075d8c0cf9047ab01eb9c0fd2911c1ce59e170c6d016baea6a05cdaa8')
depends=('bash' 'java-environment')
makedepends=('mill')
source=("https://github.com/lihaoyi/Ammonite/archive/$pkgver/$pkgname-$pkgver.tar.gz"
java-target.patch)
b2sums=('28eb868dfd1346007f0cf11b35f78827c315ee8d89be8986dc6992b9195f5880bff70ca075d8c0cf9047ab01eb9c0fd2911c1ce59e170c6d016baea6a05cdaa8'
'741c8a369df28d1d96a7fee831a1b5aadacddaccba25b8c72d020802c054791a583671276d8e933f81962253377cf60a4842d93bfd78061c7f58f9a9be7192c9')

prepare() {
cd Ammonite-$pkgver
patch -p1 -i ../java-target.patch
sed -i "s/'git/'true/;s/\"git\"/\"true\"/;s/\$latestTaggedVersion-\$commitsSinceTaggedVersion-\$gitHash/$pkgver/;s/^ \\.toInt$//;s/(tagName, false)/(\"$pkgver\", false)/" build.sc
}

Expand All @@ -27,7 +30,6 @@ build() {
}

package() {
depends+=('java-environment')
cd Ammonite-$pkgver
install -dm755 "$pkgdir"/usr/bin
(echo "#!/bin/sh"; cat out/amm/$_scalaversion/assembly.dest/out.jar) > "$pkgdir"/usr/bin/amm
Expand Down
12 changes: 12 additions & 0 deletions trunk/java-target.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/build.sc b/build.sc
index adaab52e..c4246da4 100644
--- a/build.sc
+++ b/build.sc
@@ -347,6 +347,7 @@ trait AmmModule extends AmmInternalModule with PublishModule{
)()
}

+ override def javacOptions = Seq("-source", "1.8", "-target", "1.8")
}
trait AmmDependenciesResourceFileModule extends JavaModule{
def dependencyResourceFileName: String

0 comments on commit ec8496d

Please sign in to comment.