Page MenuHomeFreeBSD

localbase.mk: Set CMAKE_PREFIX_PATH.
ClosedPublic

Authored by rakuco on Aug 11 2015, 5:29 PM.
Tags
None
Referenced Files
F99400667: D3361.diff
Wed, Oct 9, 6:14 AM
Unknown Object (File)
Sun, Oct 6, 1:49 AM
Unknown Object (File)
Thu, Oct 3, 4:59 AM
Unknown Object (File)
Wed, Oct 2, 2:06 PM
Unknown Object (File)
Sun, Sep 29, 4:54 PM
Unknown Object (File)
Sat, Sep 21, 4:42 PM
Unknown Object (File)
Fri, Sep 20, 12:08 PM
Unknown Object (File)
Thu, Sep 19, 2:29 AM
Subscribers

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
Lint Not Applicable
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.