Bug 119 - [PENDING] pkg-config should look in $datadir as well as $libdir
Summary: [PENDING] pkg-config should look in $datadir as well as $libdir
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-24 12:36 UTC by Owen Taylor
Modified: 2005-03-31 04:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Add PKGDATADIR to default search path (691 bytes, patch)
2003-10-23 14:39 UTC, Owen Taylor
Details | Splinter Review

Description Owen Taylor 2003-09-24 12:36:20 UTC
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=98595

Some packages, such as the gtk-doc perl scripts, are architecture
independent, yet have .pc files. For such packages, the .pc files
should be in $datadir, not in $libdir.

One concrete problem with not putting them into $datadir is that
you can't make architecture independent packages with files in
$libdir, since $libdir can be different for different architectures ...
for instance /usr/lib64 versus /usr/lib.

The main problem that arises here is the interpretation of
PKG_CONFIG_PATH ... it's a bit annoying to have to list each prefix
in PKG_CONFIG_PATH; maybe we could do something like:

 PKG_CONFIG_PATH=/usr/local/@

and have that automatically expand to:

 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
Comment 1 Owen Taylor 2003-10-23 14:39:41 UTC
Created attachment 62 [details] [review]
Add PKGDATADIR to default search path
Comment 2 Tollef Fog Heen 2005-03-26 07:04:14 UTC
2005-03-18  Tollef Fog Heen  <tfheen@err.no>

        * main.c (main): Use add_search_dirs for both the compile-time
        defined pc_path and the run-time defined PKG_CONFIG_PATH.

        * pkg.h: Add prototype for add_search_dirs.

        * pkg.c (add_search_dirs): Add new function which takes a
        delimiter-separated list as input and add_search_dir's it.
        (package_init): Remove knowledge about which dirs should be
        initially added.  Moved this to main.c(main)

        * ChangeLog: Add emacs variables to set the date to this
        ChangeLog's standard format

        * Makefile.am (INCLUDES): Pass PKG_CONFIG_PCPATH on to main.c

        * configure.in: Add --with-pc-path to define the default search
        path for .pc files.  (Freedesktop #119, #648)
Comment 3 Tollef Fog Heen 2005-03-28 08:03:04 UTC
pkgconfig 0.16 has been released and contains a fix for this bug.
Comment 4 Owen Taylor 2005-03-31 20:01:17 UTC
With the change, does pkg-config actually also search in datadir by
default, or was it just made configurable?
Comment 5 Tollef Fog Heen 2005-03-31 22:46:44 UTC
The default is pc_path="$libdir/$PACKAGE:$datadir/$PACKAGE", so it searches both
by default.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.