Page MenuHomeFreeBSD

localbase.mk: Set CMAKE_PREFIX_PATH.
ClosedPublic

Authored by rakuco on Aug 11 2015, 5:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 8 2024, 2:48 PM
Unknown Object (File)
Feb 12 2024, 2:41 PM
Unknown Object (File)
Jan 17 2024, 6:05 PM
Unknown Object (File)
Jan 9 2024, 1:11 PM
Unknown Object (File)
Nov 27 2023, 1:55 AM
Unknown Object (File)
Nov 15 2023, 2:06 PM
Unknown Object (File)
Nov 10 2023, 5:39 PM
Unknown Object (File)
Nov 4 2023, 6:22 PM
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
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 145
Build 145: arc lint + arc unit

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.