Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19511 closed defect (worksforme)

py25-cairo: pkgconfig file in non-standard location

Reported by: dbevans (David B. Evans) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: pkgconfig Cc:
Port: py25-cairo

Description

While trying to update gnome-python-desktop to the latest version, the package failed to recognize py25-cairo via pkgconfig although the port is installed and active.

devans% port installed py25-cairo
The following ports are currently installed:
  py25-cairo @1.8.2_0 (active)

devans% pkg-config --modversion pycairo
Package pycairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pycairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pycairo' found

pycairo.pc is found here

devans% port contents py25-cairo | grep .pc
  /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/pkgconfig/pycairo.pc

instead of the usual location

/opt/local/lib/pkgconfig/xxx.pc

This apparently was done intentionally in r44366 to resolve a conflict between py-cairo and py25-cairo since they both use the same pkgconfig file name (pycairo.pc).

A comment there says to set the pkgconfig path to find it but this is unworkable in a port that is using pkg-config to find 12 different packages and this is the only one not in the usual place.

Suggest that perhaps the py-cairo file be moved to the unconventional spot since it is out of date and python24 is not supported by the current distributions of pycairo.

There is no conflict with py26-cairo so py-cairo is the odd man out. Or perhaps py-cairo should be considered for retirement.

In any case, it seems that this solution to the problem needs to be revisited as it is really not practical in most instances. (IMHO of course).

Change History (5)

comment:1 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Status: newassigned

py26-cairo also installs pycairo.pc into a non-standard location.
It just does not need any extra code to make it happen.

The question then becomes: which port (py25-cairo, py26-cairo, or (perhaps someday) py30-cairo) should install
pycairo.pc into the standard location?
The best solution I could think of was for none of them to do so.

Why is setting configure.pkg_config_path to /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/pkgconfig
a problem?

As I understand the situation, it does not override the pkg-config search path, it just adds another directory to search.

comment:2 Changed 12 years ago by blb@…

Per the pkg-config man page, setting PKG_CONFIG_PATH:

The default directory will always be searched after searching the path

So unless the python-specific pkgconfig dir somehow overrides something in ${prefix}/lib/pkgconfig (which shouldn't happen), all should be fine.

Perhaps setting configure.pkg_config_path could also be done in the python port groups?

comment:3 in reply to:  2 Changed 12 years ago by dbevans (David B. Evans)

Resolution: worksforme
Status: assignedclosed

Replying to blb@…:

Per the pkg-config man page, setting PKG_CONFIG_PATH:

The default directory will always be searched after searching the path

So unless the python-specific pkgconfig dir somehow overrides something in ${prefix}/lib/pkgconfig (which shouldn't happen), all should be fine.

Perhaps setting configure.pkg_config_path could also be done in the python port groups?

Thanks for straightening me out on this. I had assumed that the value of PKG_CONFIG_PATH would replace the standard one entirely. But this works with gnome-python-desktop as committed in r50527.

I agree it would good to add this setting to the python port groups (although it wouldn't have helped here) and the need to do this for the various py*-cairo ports should be more publicly documented somehow -- perhaps in a FAQ?

comment:4 Changed 12 years ago by blb@…

For documentation, there is currently the Python wiki page for now, until we've had some time to make sure it all makes sense and there are no gotchas; then it can be moved to the guide.

comment:5 Changed 12 years ago by dbevans (David B. Evans)

Yes, that helps but it is a bit hard to find. Maybe a link from the main wiki page would help. For that matter, a more obvious link to the wiki page itself (top left navigation menu for instance) from the MacPorts home page rather than a link embedded in the text would make it move obvious too.

Thanks for pointing me in the right direction.

Note: See TracTickets for help on using tickets.