1 |
Michael, |
2 |
|
3 |
I'm busy disecting what Marek has done for asterisk as I need to make |
4 |
that work for multiple versions of net-misc/asterisk-16.14.0-r100, not |
5 |
merely the one he did it for - perhaps that would be helpful for you as |
6 |
well? |
7 |
|
8 |
I don't know lua at all. |
9 |
|
10 |
Anyway, I'm on IRC as jkroon if you'd like to exchange notes. I don't |
11 |
particularly like the patch Marek did as I'll NEVER be able to push that |
12 |
upstream. The patch will work for us, but as a policy I highly prefer |
13 |
patches which I can get unstreamed such that we don't need to carry them |
14 |
more than one or two versions. |
15 |
|
16 |
I'd prefer to patch upstream to keep it's behaviour of detecting a lua |
17 |
version, but have a --with-lua(version)? type argument that can take an |
18 |
optional argument which will then be the version, but --with-* generally |
19 |
takes a prefix where the include and lib folders can be found ... and |
20 |
I'd prefer to depend on pkg-config as primary and fallback to the |
21 |
./configure mess which tries to guess at things ... |
22 |
|
23 |
Kind Regards, |
24 |
Jaco |
25 |
|
26 |
On 2020/12/23 14:49, Michael Orlitzky wrote: |
27 |
|
28 |
> On 12/23/20 4:09 AM, Marek Szuba wrote: |
29 |
>> |
30 |
>> I think what you are looking for is lua_get_shared_lib() from |
31 |
>> lua-utils.eclass. We have already got ebuilds in the tree which use |
32 |
>> it. |
33 |
>> |
34 |
> |
35 |
> Knowing the library name only helps if I patch the build system; |
36 |
> that's what I'm getting at. The few packages where this works use |
37 |
> CMake, and CMake already tries to guess[0] the name of the lua library |
38 |
> (thanks Debian) and so it has a pre-defined variable to store the result. |
39 |
> |
40 |
> Not all build systems are going to work like that. Suppose I know that |
41 |
> the name of the lua library is "lua5.2". An autotools build system is |
42 |
> going to run something like, |
43 |
> |
44 |
> AC_SEARCH_LIBS([whatever], [lua], [lua_found="yes"]) |
45 |
> |
46 |
> How do I pass the name "lua5.2" to that, without hacking configure.ac |
47 |
> and running autoreconf? The only option that comes to mind is to build |
48 |
> the entire project with LIBS="-llua5.2", but that's not right if only |
49 |
> some of the executables are supposed to be linked with lua. |
50 |
> |
51 |
> For contrast, if the lua library was stored in /usr/lib64/lua5.2, then |
52 |
> I could just set LIBS="-L/usr/lib64/lua5.2" and let ./configure do its |
53 |
> thing. |
54 |
> |
55 |
> |
56 |
> [0] https://github.com/Kitware/CMake/blob/master/Modules/FindLua.cmake |
57 |
> |