lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Sun, May 23, 2010 at 5:29 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> The .pc file is still missing. I know that lua developpers mentioned the
> uber-stupid argument "we remove all the files that we consider as not needed
> in the tarball". But more importantly, you are breaking the build of *all*
> the libraries / programs that use lua and the .pc file. Doing so means that
> you absolutely don't care about the lua *users*.
>
> Also, in case you didn't remark, we are in 2010. Even the embedded devices
> can deal with a tarball of 223.1KB instead of 223KB.

I'm sorry you think we're stupid

I said  that *the argument* mentioned in a previous mail was stupid. Not the developpers. Please don't modify my comments.
 
and that we do not care about users (we do!)

almost one week to have an answer. I had the feeling of being ignored...
 
but it's not a question of size: it's the maintenance effort required.

That was not the answer someone gave me in that previous mail.
 

Even the simple lua.pc below raises some questions that I'd rather not have
to deal with:

- where should this file be installed?
       /usr/lib/pkgconfig, /usr/share/pkgconfig, elsewhere?

- what should go into the file?
       hardcoded libdir and includedir from the top-level Makefile?
       how does one ensure that these dirs are the same where Lua is
       installed?


There is a mailing list for pkg-config, where all those questions can be asked :

 http://lists.freedesktop.org/mailman/listinfo/pkg-config

My answer is:

1) if lua's Makefile defines a $libdir directory, install it in $libdir/pkgconfig
2) if not, Makefile certainly defined a $prefix directory. Then install it in $prefix/lib/pkgconfig

Looking at the Makefile file, i would say : install lua.pc in $(INSTALL_LIB)/pkgconfig. That is the standard place where a .pc file should be installed. You can also define in your Makefile a INSTALL_PKGCONFIG variable set to $(INSTALL_LIB)/pkgconfig, if you want.

3) About what should go in the file, the .pc file below is correct. Just be sure that the value of $prefix and the value of $INSTALL_TOP are the same (using sed, i guess).

These points can be dealt with of course, but it's not as trivial as it seems.
Given that downstream packagers will know where they want to install things,
they may as well generate the correct lua.pc without us having to guess and
they having to correct our guesses.

the lua.pc (or lu52.pc, or another name) should (must) be installed in what *your* Makefile defines. About packages for distro (rpm, deb, whatever), it's the responsibility of the packager, not yours, to install it in the correct directory. Then, there is no guess. They know what the lua.pc must contain (they don't have to find what the Libs, Libs.private variables (or other variables of lua.pc) must contain, as you correctly defined them). The only thing they have to change (if it is necessary) is the value of prefix. It is, on the contrary, a safer way to have a correct lua.pc file.

Vincent Torri
 
--lhf

# lua.pc -- pkg-config data for Lua

# make pc -f ../Makefile
version=5.2.0
prefix=/usr/local

exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Lua
Description: A Scripting Language
Version: ${version}
URL: http://www.lua.org/
Requires:
Libs: -L${libdir} -llua
Libs.private: -lm
Cflags: -I${includedir}

# (end of lua.pc)