Skip to content

Add the pd-lua loader to the externals

Albert Gräf requested to merge aggraef/purr-data:pd-lua into master

This adds pd-lua (from https://github.com/agraef/pd-lua) to Purr Data. This is a loader for Lua scripts which makes writing externals a lot easier, and only has minimal dependencies (the Lua library). Tested locally on all platforms with Lua 5.3, works without a hitch for me.

While I was at it, in rev. 1bdf9021 I also added two convenience targets to the new toplevel Makefile which allow adding arbitrary abstractions and externals to a light build. So, e.g., if you just want to build a minimal version of Purr Data on Linux which also includes pd-lua, you can just do make light pdlua_ext && make install now. Very quick and very convenient.

(Also note that rev. a2d14a82 is actually from !174 (merged) which hasn't been merged yet, but which I've pulled over to my development branch already. Once !174 (merged) has been merged I'll just rebase this PR and then it will be gone.)

As noted, the Lua library is needed to build the external (preferably Lua 5.3, but 5.2 should work as well on platforms which don't have 5.3, such as Trusty). So you'll have to make sure that it is installed in the runners (liblua5.3-dev or liblua5.2-dev on Debian/Ubuntu, package lua on Homebrew or MacPorts, mingw-w64-i686-lua on msys2).

Also, I suspect that the submodule cache needs to be refreshed to make the CI go through, as I'm getting this in the Debian build log:

Skipping Git submodules setup

Which probably means that the new submodule in externals/pd-lua never gets checked out, resulting in this compile error later on (cf. https://git.purrdata.net/aggraef/purr-data/-/jobs/7989):

make -C /home/pi/builds/e0880c98/0/aggraef/purr-data/externals/pd-lua LUA_CFLAGS="" LUA_LIBS="" PD_PATH="/home/pi/builds/e0880c98/0/aggraef/purr-data/pd" PD_LIB="/home/pi/builds/e0880c98/0/aggraef/purr-data/pd/src" CFLAGS="-DPD -I/home/pi/builds/e0880c98/0/aggraef/purr-data/pd/src -Wall -W -Wno-unused-parameter -ggdb -I/home/pi/builds/e0880c98/0/aggraef/purr-data/Gem/src -I/home/pi/builds/e0880c98/0/aggraef/purr-data/externals/pdp/include -DUNIX -Dunix -DDL_OPEN -fPIC -O2"
make[3]: Entering directory '/home/pi/builds/e0880c98/0/aggraef/purr-data/externals/pd-lua'
make[3]: *** No targets specified and no makefile found.  Stop.
make[3]: Leaving directory '/home/pi/builds/e0880c98/0/aggraef/purr-data/externals/pd-lua'
Makefile:1414: recipe for target 'pdlua' failed
make[2]: *** [pdlua] Error 2

Jonathan, can you please take care of this, or tell me how I can force a checkout of that submodule?

Edited by Albert Gräf

Merge request reports