On 12/11/18 3:10 PM, Daurnimator wrote:
On Tue, 11 Dec 2018 at 12:04, Robin Broda via aur-general <aur-general@archlinux.org> wrote:
On 12/11/18 9:00 PM, Daurnimator wrote:
On Tue, 11 Dec 2018 at 11:45, Alad Wenter via aur-general <aur-general@archlinux.org> wrote:
2. You have some AUR packages for LUA modules of your own making, yet they hardcode gcc lines instead of using a Makefile. [1] (At least they respect $CFLAGS and $LDFLAGS, I guess.) Why?
The upstream packages do not ship a makefile; they "officially" only support luarocks for building.
You are upstream, you have the power to make a change for the better
I am not the upstream for the linked package (compat53), though I am for others you may be talking about.
The problem is that there is no nice cross-platform makefile structure suitable for lua libraries. Each operating system/distro calls the lua shared library something different, they all have their own set of required and conflicting flags, they all have differing install locations and search paths! I've got a back-burner project to try and homogenize things, I've documented the status quo here: https://docs.google.com/spreadsheets/d/1Z_oM8LgwyGAsfof6_FbbBJlY-wCA6DfadwZb...
Leaving aside the complete inadequacy of the official lua Makefile (among several issues, lua does not support DESTDIR), or the fact that the lua Makefile is not even available in their github repo (which is itself, seemingly a subdirectory of their official release tarball)... Lua *does* provide a "make pc" target. Admittedly, this target is missing the Libs: keyword so that users can actually use the invocation `pkg-config --libs lua` to find out the right flags for linking lua. This would be helpful both to users wishing to statically link, and those wishing to dynlink. Admittedly also, this pc target echoes to stdout instead of like creating the actual file. Note: the Arch, Debian, and Fedora maintainers have *all* fixed the pc file to provide proper Libs:, and while I wouldn't generally recommend relying on downstream pkg-config files, the official sources do quite plainly allow you to use in your Makefile: CFLAGS += $(shell pkg-config --variable includedir lua) since it is assumed lua distributors will run make pc > lua.pc and install this file themselves. I don't see why this is so hard to do. Even if you somehow decided you didn't want to use pkg-config, you could use autoconf or a custom configure script to look for the locations in question and add them to a config.mk Therefore, as the maintainer of the lua-psl project you should fix this, and submit pull requests for other packages. -- Eli Schwartz Bug Wrangler and Trusted User