Page MenuHomeFreeBSD

localbase.mk: Set CMAKE_PREFIX_PATH.
ClosedPublic

Authored by rakuco on Aug 11 2015, 5:29 PM.

Details

Summary

When USE'ing localbase.mk, make sure CMake is also aware that it is supposed to give preference to ${LOCALBASE} when looking for files and libraries.

This is going to be a requirement once CMake is updated to 3.3.0, as starting with this version it will by default use the PATH environment variable (stripping the "/bin" or "/sbin" parts of each entry) to determine where to find files and libraries. Since in most cases /usr will come before /usr/local, it will find base's libarchive and fail at the configuration stage on older FreeBSD releases.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rakuco retitled this revision from to localbase.mk: Set CMAKE_PREFIX_PATH..
rakuco updated this object.
rakuco edited the test plan for this revision. (Show Details)

Isn't there a problem with :
USES= cmake somethingusinglocalbase
vs
USES= somethingusinglocalbase cmake
?

In the first case, CMAKE_ENV defaults to CONFIGURE_ENV (with CMAKE_PREFIX_PATH added and extra time)
In the 2nd case, CMAKE_ENV defaults to CMAKE_PREFIX_PATH="${LOCALBASE}", without anything else

Maybe it's time to deorbit CMAKE_ENV

True; the CONFIGURE_ENV vs CMAKE_ENV split and the order of the USES arguments is very confusing.

I think I'm going to try getting rid of CMAKE_ENV first then.

rakuco edited edge metadata.

Update patch now that CMAKE_ENV is gone.

Do you think this need an exp-run?

I don't think so; if anything, this change should make the behavior more correct when a port is USEing both localbase and cmake. And in any case, once this lands I'll ask for an exp-run for CMake 3.3.1, which should end up being a good test for this too.

This revision is now accepted and ready to land.Aug 20 2015, 11:49 AM
This revision was automatically updated to reflect the committed changes.