tech-pkg archive

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

Re: pkg-config files for multiversion Lua



Hi,

On Sun, 27 Apr 2014 02:06:53 +0900, Alexander Nasonov 
<alnsn%yandex.ru@localhost> wrote:

Hi,

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.

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.

You can use BUILDLINK_FNAME_TRANSFORM.

BUILDLINK_FNAME_TRANSFORM.lua51+=       -e 
's|lib/pkgconfig/lua-5.1.pc|lib/pkgconfig/lua.pc|'

And it is nice to use ALTERNATIVES for out of pkgsrc framework.

bin/lua5.1 @PREFIX@/bin/lua
lib/pkgconfig/lua-5.1.pc @PREFIX@/lib/pkgconfig/lua.pc
...

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

Thanks,
Alex



--
OBATA Akio / obata%lins.jp@localhost


Home | Main Index | Thread Index | Old Index