Michael,

I'm busy disecting what Marek has done for asterisk as I need to make
that work for multiple versions of net-misc/asterisk-16.14.0-r100, not
merely the one he did it for - perhaps that would be helpful for you as
well?

I don't know lua at all.

Anyway, I'm on IRC as jkroon if you'd like to exchange notes.  I don't
particularly like the patch Marek did as I'll NEVER be able to push that
upstream.  The patch will work for us, but as a policy I highly prefer
patches which I can get unstreamed such that we don't need to carry them
more than one or two versions.

I'd prefer to patch upstream to keep it's behaviour of detecting a lua
version, but have a --with-lua(version)? type argument that can take an
optional argument which will then be the version, but --with-* generally
takes a prefix where the include and lib folders can be found ... and
I'd prefer to depend on pkg-config as primary and fallback to the
./configure mess which tries to guess at things ...

Kind Regards,
Jaco

On 2020/12/23 14:49, Michael Orlitzky wrote:

> On 12/23/20 4:09 AM, Marek Szuba wrote:
>>
>> I think what you are looking for is lua_get_shared_lib() from
>> lua-utils.eclass. We have already got ebuilds in the tree which use
>> it.
>>
>
> Knowing the library name only helps if I patch the build system;
> that's what I'm getting at. The few packages where this works use
> CMake, and CMake already tries to guess[0] the name of the lua library
> (thanks Debian) and so it has a pre-defined variable to store the result.
>
> Not all build systems are going to work like that. Suppose I know that
> the name of the lua library is "lua5.2". An autotools build system is
> going to run something like,
>
>   AC_SEARCH_LIBS([whatever], [lua], [lua_found="yes"])
>
> How do I pass the name "lua5.2" to that, without hacking configure.ac
> and running autoreconf? The only option that comes to mind is to build
> the entire project with LIBS="-llua5.2", but that's not right if only
> some of the executables are supposed to be linked with lua.
>
> For contrast, if the lua library was stored in /usr/lib64/lua5.2, then
> I could just set LIBS="-L/usr/lib64/lua5.2" and let ./configure do its
> thing.
>
>
> [0] https://github.com/Kitware/CMake/blob/master/Modules/FindLua.cmake
>


Reply via email to