[aur-general] TU application: Daurnimator

Daurnimator quae at daurnimator.com
Tue Dec 11 20:51:51 UTC 2018


On Tue, 11 Dec 2018 at 12:47, Ivy Foster via aur-general
<aur-general at archlinux.org> wrote:
> Yikes!
>
> One ugly but workable solution could be to conditionally set variables
> in a Makefile. For instance:
>
>         ifeq ($(OS),Windows_NT) # for Windows versions >= NT
>                 LUA := C:\Winders\Path\To\Lua.whatever
>         else
>                 UNAME := $(shell uname -s)
>                 ifeq ($(UNAME),Linux)
>                         LUA := ...
>                 endif
>                 ...
>         endif
>
> Granted, this likely duplicates some of the magic luarocks is doing,
> but it would make things simpler for packaging.

I've done similar before, but then the complaints from e.g. bsd make
users start coming in.
Not to mention that you'd be hardcoding defaults for all the different
distros.... as the earlier linked spreadsheet shows: there are a lot
of variations.

I think the better solution is to try and get different distros to use
the same formats and try and unify it all with e.g. pkg-config.
However that's a long and political process.

> Come to think of it, that seems like the sort of thing that could be
> done once as boilerplate in, e.g., lua.mk, which you and other
> luarines (lua-ites? luans? lua-ers?) could then include in future
> Makefiles.

This has been proposed before, but I've never been quite happy in how
it works out; nor has it caught on.
See https://25thandclement.com/~william/projects/luapath.html for one example.

> Just spitballing here; lua packaging is weird (-: .

Agreed! luarocks is the best we have, and it's not perfect!


More information about the aur-general mailing list