agraef / pd-lua

Lua bindings for Pd, updated for Lua 5.3+
https://agraef.github.io/pd-lua/
GNU General Public License v2.0
47 stars 10 forks source link

Debian has Lua 5.3 installed in a different location than expected #1

Closed claudeha closed 5 years ago

claudeha commented 6 years ago

This patch (against whichever tree Purr Data pulls, which may not be this one...) makes it compile on Stretch (with a few packages from Buster):

pd-lua$ git diff
diff --git a/Makefile b/Makefile
index 74c5325..3c55bb9 100644
--- a/Makefile
+++ b/Makefile
@@ -61,8 +61,8 @@ CFLAGS = -Wall -W -g
 LDFLAGS =
 LIBS =

-LUA_CFLAGS = -I/usr/include/lua
-LUA_LIBS   = -llua
+LUA_CFLAGS = -I/usr/include/lua5.3
+LUA_LIBS   = -llua5.3

 # get library version from meta file
 LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_META))

My original repository had a configure.ac flag to set the name of Lua libs, see https://code.mathr.co.uk/pdlua/blob/HEAD:/configure.ac

There was also a Makefile.static that downloaded and compiled a Lua 5.1 to link statically https://code.mathr.co.uk/pdlua/blob/HEAD:/Makefile.static (I guess this might be useful on Windows).

Anyway this code might have bitrotted, and I think the issue I had with pkg-config was that different Linux distros had different naming conventions for the module, like lua vs lua51 vs lua5.1 vs ...

claudeha commented 5 years ago

no patching necessary, the arguments can be overridden on the command line

make LUA_CFLAGS=-I/usr/include/lua5.3 LUA_LIBS=-llua5.3 prefix=${HOME}/opt/pd/0.49-0 install
agraef commented 5 years ago

Hi Claude,

sorry for not replying earlier, serious case of inbox overload...

I guess that the above should be fine for package maintainers who are prepared to handle such minor adjustments. So can I close this bug now?

Albert

claudeha commented 5 years ago

yes I think it can be closed now.