On Thu, Mar 24, 2016 at 11:22:44PM +0100, Christian Hofstaedtler wrote:
> * Olly Betts <o...@survex.com> [160324 22:56]:
> > On Thu, Mar 24, 2016 at 07:52:56PM +0100, Christian Hofstaedtler wrote:
> > > BTW, there's a pkg-config file if you don't want to go via
> > > RbConfig::CONFIG; if you do, it appears the relevant snippet is:
> > > print RbConfig::CONFIG['DLDFLAGS'] + ' ' + 
> > > RbConfig::CONFIG['LIBRUBYARG_SHARED'] + ' ' + RbConfig::CONFIG['LIBS']

OK, so this doesn't help - we're already linking with -lruby2.x but
because no symbols are used, we don't get a dependency.

> > Thanks very much for this additional detail - I had had a brief look and
> > failed to grasp what was going awry with the automatic dependency.  I
> > think I now actually understand what's going on.
> 
> Yeah sorry about that, I was also confused what was going on. Still
> not too sure what the best way to fix this is.
> 
> In case your package only builds for a single ruby version (I think
> that's the case), putting this into debian/control is also an
> option:

Actually it'll build for all reported ruby versions - that's been a
list with just one entry for a while now, but it seems a shame to lose
this support unless the plan is that it'll always be a one entry list in
the future.

> | RUBY_DEPENDS := -Vruby:Depends="lib$(firstword $(shell dh_ruby 
> --print-supported))"
> |
> | override_dh_gencontrol:
> |        dh_gencontrol -- $(RUBY_DEPENDS)
> 
> (Probably not the most stable thing to do.)

I've implemented something similar, but with alternates - e.g. if the list of
ruby versions were 2.1 2.2 2.3, the generated dependency would be:

Depends: libruby2.3|libruby2.1|libruby2.2

That should do the job, but I'm open to better ideas.
 
Cheers,
    Olly

Reply via email to