guidod-2003- at gmx.de
Mon Nov 24 01:18:02 EET 2003
Guido Draheim wrote:
> hp has been proposing to send this patch and rationale to the
> xdg-list, it's a rather old idea and may be someone else has
> been telling about it earlier to the list. - Note that the
> original idea of --print-pc-dir (as the subject suggests) has
> changed over into the idea of pkgconfig to selfdescribe itself
> as a package taking benefit of its own check-infrastructure.
> Guido Draheim wrote:
>> Here is a patch - which implements a lot more.
>> a) selfdesribe virtual package
>> in pkg.c, add a check for "pkgconfig" (or "...") as the module
>> name and return a static Package info block carrying the name,
>> version, and default pc-dir location.
>> added benefit:
>> instead of --atleast-pkgconfig-version=XYZ you may now simply
>> write pkg-config "pkgconfig >= XYZ"
>> b) list info extractions
>> New options named --package --describe and --locate added that
>> augment to information printed in --modversion loop. This prints
>> fields from the Package info block to the user screen.
>> added benefit:
>> Using --package --describe <packages> will print a list similar
>> to what "--list" will show but only for the named modules.
>> c) locate libdir
>> a) + b) will make for c) ... it is now possible to ask pkg-config
>> where the .pc files are installed per default: it's the result
>> of asking `pkg-config --locate pkgconfig`.
>> Please apply, and in any case, PLEASE RESPOND.
>> -- Thank you, guido
>> P.S. some selfdescribing options will look archaic when this patch
>> gets merged into pkg-config. Needs more thinking here, a'right.
>> Guido Draheim wrote:
>>> And last not least, we were having problems with users who wanted to
>>> use some libraries but the projects derived from our example did not
>>> work quite right. The actual problem had been that they did need to
>>> install the library under another --prefix than pkg-config. That
>>> variant if installations problems had been existing in earlier times,
>>> as with aclocal macros being installed by libraries or programs.
>>> With aclocal macros however, the maintainers can warn the user, or
>>> even add some convenience routine that will check for the correct
>>> share/aclocal path - simply because there is `aclocal --print-ac-dir`.
>>> Note that pkg-config does not provide any help for configure
>>> routines to detect its installation prefix. It should be easy to
>>> add such an option to pkg-config, just for completeness, ye know.
>>> Btw, and no recommendation here, in the course of discussion some
>>> users did suggest that it might help to let pkg-config install a
>>> fake package that denotes its own values - yes, there are already
>>> projects out there that use pkg-config to detect the installation
>>> prefix of another library, the thing works like this:
>>> deplib_prefix=`pkg-config deplib --variable=prefix`
>>> call it abuse or not, it does actually work, and it is atleast fine
>>> to use the result to print a warning message to the user in the
>>> case that the current prefix differs.
>>> have fun,
>>> -- guido
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the xdg