Opened 7 years ago

Closed 6 years ago

#55054 closed defect (fixed)

configure.pkg_config_path does not work with more than one value

Reported by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) Owned by: Marcus Calhoun-Lopez <marcuscalhounlopez@…>
Priority: Normal Milestone:
Component: base Version:
Keywords: Cc: raimue (Rainer Müller)
Port:

Description

The latest version of avahi requires .pc files located in both
${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig
and
${prefix}/libexec/qt4/lib/pkgconfig.

The resulting environmental variable is:

PKG_CONFIG_PATH='/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig /opt/local/libexec/qt4/lib/pkgconfig'

However, the list of directories must be colon-separated.

For now, an ugly workaround in the Portfile is:

pre-configure {
    configure.env-append PKG_CONFIG_PATH=[join ${configure.pkg_config_path} ":"]
    configure.pkg_config_path
}

Eventually, the problem should be fixed in the base.

Attached is a proposed fix.

Attachments (1)

patch-portconfigure.tcl.diff (1.1 KB) - added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

comment:1 Changed 7 years ago by jmroot (Joshua Root)

Why doesn't this work?

configure.pkg_config_path ${frameworks_dir}/Python.framework/Versions/2.7/lib/pkgconfig:${prefix}/libexec/qt4/lib/pkgconfig
Last edited 7 years ago by jmroot (Joshua Root) (previous) (diff)

comment:2 in reply to:  1 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to jmroot:

Why doesn't this work?

configure.pkg_config_path ${frameworks_dir}/Python.framework/Versions/2.7/lib/pkgconfig:${prefix}/libexec/qt4/lib/pkgconfig

I do not believe this would work in general since configure.pkg_config_path is modified in different parts of the code on a conditional basis.
For example, ${prefix}/libexec/qt4/lib/pkgconfig is added by the qt4 PG and only if the qt4 variant is selected.

comment:3 Changed 7 years ago by raimue (Rainer Müller)

Cc: raimue added

Seems reasonable to me to join multiple values with a colon as an extension to the existing syntax. For a single value this would even be backwards compatible, so I see no blockers.

comment:4 Changed 6 years ago by Marcus Calhoun-Lopez <marcuscalhounlopez@…>

Owner: set to Marcus Calhoun-Lopez <marcuscalhounlopez@…>
Resolution: fixed
Status: newclosed

In da74d6a0943af9501b3e26dd8ec10a7ca5000320/macports-base:

join multiple values of pkg_config_path with colon

Fixes #55054

Note: See TracTickets for help on using tickets.