summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLucas Werkmeister2018-04-28 20:59:52 +0200
committerLucas Werkmeister2018-04-28 20:59:52 +0200
commit63ea893254e58e7e68c3b83cd76be217c7c3d4b4 (patch)
tree443a25f9258769bfc7b932931c9581f016a95858 /PKGBUILD
downloadaur-63ea893254e58e7e68c3b83cd76be217c7c3d4b4.tar.gz
Initial commit
PKGBUILD copied from truffleruby with slight tweaks (different GitHub organization, no docs/ directory). Similar to Ruby, launching graalpython with --polyglot doesn’t work, but accessing Python from R works. For example: eval.polyglot('python','[i for i in range(1,20) if i%2 is 0]')
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..495b00fd210b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
+
+pkgname=graalpython
+pkgver_=1.0.0-rc1
+pkgver=${pkgver_/-/_}
+pkgrel=1
+pkgdesc='Graal based, high-performance implementation of the Python language (early development)'
+arch=('x86_64')
+url='https://github.com/graalvm/graalpython'
+license=('custom')
+depends=('graal')
+makedepends=()
+optdepends=()
+source=("https://github.com/graalvm/$pkgname/releases/download/vm-${pkgver_}/python-installable-linux-amd64.jar")
+sha256sums=('19bafeda777a5522d430629ff2573aeaf9aa280a3475acc82bad354513c469ee')
+
+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/" 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/python/GraalCE_Python_license_3rd_party_license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}