On Fri, 2023-04-21 at 09:16 +0200, Ralph Seichter wrote: > > I tried what you suggested. However, inheriting from ruby-ng.eclass > introduces an odd problem: For some reason unknown to me, "${S}" no > longer matches the default value of "${WORKDIR}/${P}", but only what I'd > expect in "${WORKDIR}".
The eclass sets S=$WORKDIR at first because it creates a separate source tree for each version of ruby that will be built for. For example, you might have both $WORKDIR/ruby27 and $WORKDIR/ruby28. Later on in the each_ruby_foo phases, $S will point to one of those, so it should look more like what you're expecting. > library something.so needs to be installed. Right now, I changed to > this: > > local p=$(ruby -e 'puts $LOAD_PATH' | grep 'vendor.\+linux') > [[ -d "${p}" ]] || die "'${p}' is not a directory" > exeinto "${p}" > > Not very pretty either, but at least this avoids any hardcoded > directories. > That uses the currently-eselected version of ruby to determine the path though. If you eselect another version, or if you update the current one, the bindings will stop working. It may still not be worth the effort, but I'd keep that in mind when updating ruby.