summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Werkmeister2018-04-28 20:45:33 +0200
committerLucas Werkmeister2018-04-28 20:45:33 +0200
commit2a144b47c04e50b732d273d772d6c9a6273b5f68 (patch)
tree38c18b5ba7bb3c6e940e6dbd004da51148471718
downloadaur-2a144b47c04e50b732d273d772d6c9a6273b5f68.tar.gz
Initial commit
PKGBUILD copied from fastr and then slightly adjusted. This seems to be sufficient to make Ruby work on its own and as a polyglot language for R. However, attempting to launch Ruby with the polyglot option results in an error: $ /usr/lib/jvm/java-8-graal/bin/irb --polyglot ERROR: Unrecognized argument: --ruby.launcher=/usr/lib/jvm/java-8-graal/jre/languages/ruby/bin/ruby. Use --help for usage instructions. Again, I get the same error when installing via `gu`, so I assume it’s not the PKGBUILD’s fault.
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD55
2 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5524eb247005
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+# Generated by mksrcinfo v8
+# Sat Apr 28 18:45:29 UTC 2018
+pkgbase = truffleruby
+ pkgdesc = Graal based, high-performance implementation of the Ruby language
+ pkgver = 1.0.0_rc1
+ pkgrel = 1
+ url = https://github.com/oracle/truffleruby
+ arch = x86_64
+ license = EPL
+ license = GPL2
+ license = LGPL2.1
+ depends = graal
+ source = https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc1/ruby-installable-linux-amd64.jar
+ sha256sums = 27ac51f88fff16c8876cb7825ff1247ccd83f375f5a37b39cecf56917b339d52
+
+pkgname = truffleruby
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3ae6134cc377
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
+
+pkgname=truffleruby
+pkgver_=1.0.0-rc1
+pkgver=${pkgver_/-/_}
+pkgrel=1
+pkgdesc='Graal based, high-performance implementation of the Ruby language'
+arch=('x86_64')
+url='https://github.com/oracle/truffleruby'
+license=('EPL' 'GPL2' 'LGPL2.1')
+depends=('graal')
+makedepends=()
+optdepends=()
+source=("https://github.com/oracle/$pkgname/releases/download/vm-${pkgver_}/ruby-installable-linux-amd64.jar")
+sha256sums=('27ac51f88fff16c8876cb7825ff1247ccd83f375f5a37b39cecf56917b339d52')
+
+package() {
+ local file eq permissions mode name target
+
+ mkdir -p "$pkgdir/usr/lib/jvm/java-8-graal/"
+ cp -a -t "$pkgdir/usr/lib/jvm/java-8-graal/" docs/ jre/
+
+ printf '\n' >> META-INF/permissions
+ while read -r file eq permissions; do
+ if [[ $eq != '=' ]]; then
+ printf >&2 'second word should be "=": %s %s %s\n' "$file" "$eq" "$permissions"
+ return 1
+ fi
+ case $permissions in
+ 'rw-------') mode=600;;
+ 'rw-r--r--') mode=644;;
+ 'rw-rw-r--') mode=664;;
+ 'rwxr-xr-x') mode=755;;
+ 'rwxrwxr-x') mode=775;;
+ 'rwxrwxrwx') continue;; # symbolic link
+ *)
+ printf >&2 'unknown permissions: %s\n' "$permissions"
+ return 1
+ ;;
+ esac
+ chmod "$mode" -- "$pkgdir/usr/lib/jvm/java-8-graal/$file"
+ done < META-INF/permissions
+
+ printf '\n' >> META-INF/symlinks
+ while read -r name eq target; do
+ if [[ $eq != '=' ]]; then
+ printf >&2 'second word should be "=": %s %s %s\n' "$name" "$eq" "$target"
+ return 1
+ fi
+ mkdir -p -- "$pkgdir/usr/lib/jvm/java-8-graal/$(dirname -- "$name")"
+ ln -s -- "$target" "$pkgdir/usr/lib/jvm/java-8-graal/$name"
+ done < META-INF/symlinks
+
+ install -Dm644 jre/languages/ruby/GraalCE_Ruby_license_3rd_party_license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}