Created attachment 199994 [details]
svn diff to use jgem
Modern versions of jruby support the 2.5.0 version of the language, which is currently ahead the default C version of Ruby in ports (this should be updated as 2.5 is already the LTS version).
It is unclear if this causes any problems but for consistency we should use jgem for ports that depend on jruby. This has already been done in devel/rubygem-jruby-jars. The attached patch does a similar change for:
Also per portlint while here (concerning the order of USES)
I compared the packages produced without and with this patch and the contents are identical. I agree it would be more consistent, but even the deps don't change, so it seems to have no effect.
FWIW, I've asked for the exp-run for making 2.5 default.
(In reply to Steve Wills from comment #1)
> I compared the packages produced without and with this patch and the contents
> are identical. I agree it would be more consistent, but even the deps don't
> change, so it seems to have no effect.
Hmm ... I see: Mk/Uses/gem.mk will override the value:
We need to use ?= in line 66.
> FWIW, I've asked for the exp-run for making 2.5 default.
I am sure the change will cause some trouble in running systems with rails.
I did an update on another paktform and fortunately it was just a matter of
updating the Gemfile and running "bundle update" or something similar.
(In reply to Pedro F. Giffuni from comment #2)
Just changing RUBYGEMBIN won't be sufficient. I think we probably want to add support for USES=gem:jgem and the BUILD_DEPENDS, RUN_DEPENDS and EXTRACT_DEPENDS on lines 24, 25 and 32 will also have to be changed based on that.
(In reply to Steve Wills from comment #3)
Ugh, yes ... lets close this PR for now, it's obviously more work than I thought.
Comment on attachment 199994 [details]
svn diff to use jgem
Obsolete patch: we will need a new option altogether.
Reopen, we have a problem here:
If I try to install rails with jgem, I get:
% jgem install rails
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/share/jruby/lib/ruby/gems/shared
(This matches my experience with another platform where each version of ruby has its own installation dir.)
OTOH, the rubygem-jruby-jars are being installed in
so they are currently misplaced in /usr/local/lib/ruby/gems/2.4/gems
It doesn't seem to me like jars meant to be used with jruby are operational.