File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -519,10 +519,29 @@ build_package_jruby() {
519519 fix_jruby_shebangs
520520}
521521
522+ graal_architecture () {
523+ if [ " $( uname -m) " != " x86_64" ]; then
524+ echo " no nightly builds available" >&2
525+ exit 1
526+ fi
527+
528+ case " $( uname -s) " in
529+ " Darwin" ) echo " macosx-x86_64" ;;
530+ " Linux" ) echo " linux-x86_64" ;;
531+ * )
532+ echo " no nightly builds available" >&2
533+ exit 1;;
534+ esac
535+ }
536+
522537install_jruby_launcher () {
523- cd " ${PREFIX_PATH} /bin"
524- { ./ruby gem install jruby-launcher
525- } >&4 2>&1
538+ # If this version of JRuby has been modified for Graal, don't overwrite the
539+ # launcher scripts
540+ if ! grep -q graalvm " ${PREFIX_PATH} /bin/jruby" ; then
541+ cd " ${PREFIX_PATH} /bin"
542+ { ./ruby gem install jruby-launcher
543+ } >&4 2>&1
544+ fi
526545}
527546
528547fix_jruby_shebangs () {
Original file line number Diff line number Diff line change 1+ install_package "jruby-9000.dev" "http://lafo.ssw.uni-linz.ac.at/graalvm/jruby-dist-9000+graal-$(graal_architecture).dev-bin.tar.gz" jruby
Original file line number Diff line number Diff line change @@ -421,6 +421,22 @@ nice gem things
421421OUT
422422}
423423
424+ @test " JRuby+Graal does not install launchers" {
425+ executable " ${RUBY_BUILD_CACHE_PATH} /jruby-9000.dev/bin/jruby" << OUT
426+ #!${BASH}
427+ # graalvm
428+ echo jruby "\$ @" >> ../build.log
429+ OUT
430+ cached_tarball " jruby-9000.dev"
431+
432+ run_inline_definition << DEF
433+ install_package "jruby-9000.dev" "http://lafo.ssw.uni-linz.ac.at/jruby-9000+graal-macosx-x86_64.tar.gz" jruby
434+ DEF
435+ assert_success
436+
437+ assert [ ! -e " $INSTALL_ROOT /build.log" ]
438+ }
439+
424440@test " JRuby Java 7 missing" {
425441 cached_tarball " jruby-9000.dev" bin/jruby
426442
You can’t perform that action at this time.
0 commit comments