[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Difficulty making a very simple rockspec...
- From: Steven Degutis <sbdegutis@...>
- Date: Fri, 29 Aug 2014 20:50:59 -0500
I can't for the life of me figure this out.
Here's the module I'm trying to create a rockspec:
https://github.com/mjolnir-io/mjolnir-keycodes
It's a really simple module. It's just a Lua file and a C file that
the Lua file requires. Nothing out of the ordinary. The only strange
things this C file needs are `CFLAGS += -fobjc-arc -Wall -Wextra` and
`LDFLAGS += -framework Cocoa -framework Carbon`. Ideally I'd like to
use the `builtin` back-end according to the [Rockspec
format](http://luarocks.org/en/Rockspec_format), but I don't think
that works with this.
Now, all of the above is strictly about trying to fix the current
[mjolnir-keycodes-0.1-1.rockspec](https://github.com/mjolnir-io/mjolnir-keycodes/blob/master/mjolnir-keycodes-0.1-1.rockspec)
file. What I have in the repo right now will *technically* build and
install. But when I try `k = require 'mj.keycodes'`, it fails saying
`module 'mj.keycodes.internal' not found` (which is referring to [this
line](https://github.com/mjolnir-io/mjolnir-keycodes/blob/master/keycodes.lua#L17)
inside `keycodes.lua`). This means it's actually loading the Lua
module, but it's not registering the file correctly. Thus I'm pretty
sure it's related to the `.rockspec` file not being written correctly.
Technically the file is missing also:
~~~
$ ls -la /usr/local/share/lua/5.1/mj/
total 8
drwxr-xr-x 3 sdegutis admin 102B Aug 29 18:01 .
drwxr-xr-x 7 sdegutis admin 238B Aug 29 18:01 ..
-rw-r--r-- 1 sdegutis admin 1.2K Aug 29 18:01 keycodes.lua
~~~
But that's not the only problem. I'm also probably referencing it
wrongly inside the `.rockspec` file. And on top of that, it probably
contains the wrong `luaopen_*` name internally.
If anyone here has experience with this, could you shed a bit of light
on what I'm missing here?
Thanks for your time.
-Steven