pkulchenko / wxlua

wxlua: Lua bindings for wxWidgets cross-platform GUI toolkit; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and wxWidgets 3.x
304 stars 59 forks source link

wxLua should install to $PREFIX/lib/lua/$VERSION/wx.so #117

Closed meme closed 1 year ago

meme commented 1 year ago

As per the default package.cpath, wxLua should install into $PREFIX/lib/lua/$VERSION/wx.so. Currently, the install phase installs into $PREFIX/lib/libwx.dylib on macOS and $PREFIX/lib/libwx.so on Linux. However, this is incorrect as Lua on macOS and Linux expects shared objects to always have the .so suffix (which is odd, but whatever) and be installed in the Lua shared folder (with the corresponding version).

Other packages, such as luv, install to $PREFIX/lib/lua/$VERSION/wx.so on Linux and macOS (which is correct).

I'm currently packaging wxLua for Homebrew so that macOS and Linux users can use Homebrew to install wxLua, see the discussion here: https://github.com/Homebrew/homebrew-core/pull/124194#discussion_r1117901554.

pkulchenko commented 1 year ago

The main (historical) reason is that I use and package these libraries with a cross-platform application and having them all have different extensions on different platforms helps with their packaging and distribution. I understand that there are some conventions, but I personally didn't like the fact that wx libraries on macOS have .so extension, which led to these changes.

I'm open to suggestion on how to help you with packaging, but a bit reluctant to change the current setup.

meme commented 1 year ago

I think that's fair. In Homebrew I've just copied the binary to the correct location and renamed it in the process. The idea was that we could avoid it if upstream did it, but seeing as there is a legitimate reason not to do so from your end, we are happy with the "workaround". Thanks.

pkulchenko commented 1 year ago

Sounds good; thank you for accommodating the current setup.