2011/10/31 Pavel Holejšovský <[email protected]>:
> Hello,
>
> I'd like to include rockspec for alpha release of my LGI project into
> the rocks server.  Please let me know whether there are any problems
> with it.

I noticed you're using python waf for building (a curious choice for a
Lua module but I can see the reasoning). You're performing dependency
checking through waf -- after recompiling gobject-introspection and
glib (yes, I'm one of the few who still upgrades from source) I've got
it to build correctly.

Still, I can't run the samples. They fail with:

Lgi-Message: Lua to GObject-Introspection binding v0.1
lua: /Users/hisham/.luarocks/share/lua/5.1/lgi.lua:792: Failed to load
typelib file '/System/Index/lib/girepository-1.0/Gtk-2.0.typelib' for
namespace 'Gtk': Typelib version mismatch; expected 4, found 2
stack traceback:
        [C]: in function 'assert'
        /Users/hisham/.luarocks/share/lua/5.1/lgi.lua:792: in function
</Users/hisham/.luarocks/share/lua/5.1/lgi.lua:790>
        (tail call): ?
        ./gtkpad.lua:14: in main chunk
        [C]: ?

(Nevermind the weird /System/Index/ and /Users/ paths, this is a
Linux[1] system.)

What version of GTK+ should I have to run this? I currently have
2.24.6 installed. Perhaps this version check for Gtk should be part of
your dependency checking?

Another issue I noticed is that you build lgi.so and lgi.lua. To my
almost-surprise this works [2] but personally I don't recommend the
practice. The existence of two different files is not accounted for in
"luarocks show", for example, which assumes that module files have
unique names; this practice would be probably confusing for
documentation as well. Packages such as LuaSocket use explicit 'core'
modules, such as "socket.core" (socket/core.so).

Just as an exercise to test the versatility of LuaRocks, I tried writing a
rockspec that builds your package without using waf. The results
follow attached. Apparently, it builds and installs the modules just
as well (at least I stall at the same errors when running the samples
(note: the giostream.lua sample runs) ). The major downside is that
pkg-config is not used, so external dependencies are not version
checked and some of the incdir particulars may change from distro to
distro. I tried to keep the tool general and avoid supporting every
tool out there, but it may be a good idea to add explicit support for
pkg-config in LuaRocks.

> BTW, rockspec does not contain MD5 field, because I'm not sure
> whether/how to generate proper MD5 for project downloaded directly from
> GIT.

No problem, MD5 is not necessary/practical for "git://" projects.

I'll wait for your feedback on the Gtk dependency issue before
uploading the module to the package repository.

Thanks for contributing!

-- Hisham
http://hisham.hm - http://www.colorbleed.com.br

[1] http://www.gobolinux.org
[2] another example of the lax policies of the Lua 5.1 module system,
which was supposed to bring some consistency to those things...

Attachment: lgi-0.1-1.rockspec
Description: Binary data

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps 
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to