tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg-config files for multiversion Lua



Alexander Nasonov <alnsn%yandex.ru@localhost> writes:

> For a multiversion support of Lua packages lang/lua51 and lang/lua52
> I need to decide how to handle two currently conflicting lua.pc
> files. In my current local version they're split into two: lua-5.1.pc
> and lua-5.2.pc. But at least one package www/lua-curl checks for a
> package called 'lua'. Because there is no lua.pc file in the buildlink
> shadow directory, pkg-config fails for this package.

This is really part of why multiversion support is painful, especially
when pkgsrc is farther along than the rest of the world in going
multiversion.

> I wanted to add a symbolic link lua.pc -> lua-${_LUA_DOT_VERSION}.pc to
> the shadow directory but I don't see any support for it in the buildlink
> framework. I see many versioned .pc files in /usr/pkg/lib/pkgconfig but
> I couldn't find any package that checks unversioned .pc file at config
> stage. I only checked few packages, though.

I think the real question is whether upstream has versioned pc files, or
whether it is a pkgsrc hacnge.  If upstream, then correct depending
packages have to deal.  If us, correct depending programs will use the
unversioned name.

> So I wonder what is a best way to fix packages that pass plain
> unversioned 'lua' string to pkg-config?

So we can either:

  1) add the lua.pc link to the bl3 tree, and point it to
  /usr/pkg/lib/pkgconfig/lua_XY.pc, and not change the depending
  packages.  That way they will pick up the version that is depended on
  and be buildable for multiple versions.

  2) link in lua_XY.pc (for the one version being depended on), and then
  for every program that looks for lua, patch it somehow to look for
  lua_XY in configure.

Option 1 sounds vastly easier to me, even if it does require some
surgery in the bl3-generation process.

ALTERNATIVES, as I understand it, is about providing symlinks in
/usr/pkg for programs that can be multiversion, or provided from
different packages, so that these programs can be used at runtime or by
humans.  So I wouldn't look to that to solve the pc issues.

Attachment: pgph_G5vcNE1R.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index