Page MenuHomeFreeBSD

Add pathfix support for CMake
ClosedPublic

Authored by jhale on Sep 26 2014, 8:49 PM.
Tags
None
Referenced Files
F81575009: D850.id1799.diff
Thu, Apr 18, 8:31 AM
F81575006: D850.id11999.diff
Thu, Apr 18, 8:31 AM
F81575004: D850.id.diff
Thu, Apr 18, 8:31 AM
F81575002: D850.id1795.diff
Thu, Apr 18, 8:31 AM
F81573675: D850.diff
Thu, Apr 18, 7:55 AM
F81528137: D850.id11999.diff
Wed, Apr 17, 2:28 PM
Unknown Object (File)
Jan 12 2024, 6:42 AM
Unknown Object (File)
Dec 29 2023, 6:20 PM
Subscribers

Details

Summary

Add support for CMake substitutions to USES=pathfix

CMake projects mostly have trouble with where to put pkgconfig data, so I've added some of the most popular cases to substitute for. There are a few projects that use some custom variables that I did not add, but if there are more generic substitutions that should be added to the list, I'm open to suggestions.

Special note for devel/libical:
I got rid of the useless dependency on gmake and a patch for configure (it uses CMake)

Test Plan

I have tested with several CMake projects and non-CMake projects to check for regression. For any port that had cmake and pathfix already in USES (unnecessarily, I might add), I have fixed to make sure there is no double substitution. Some ports I removed pathfix from altogether because they handled pkgconfig data in a different manner and pathfix was totally pointless then and now.

The only bug I have found is that pathfix must come after cmake in the USES list and I have fixed those cases as well. (Should not be an issue now with latest diff).

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhale retitled this revision from to Add pathfix support for CMake.
jhale updated this object.
jhale edited the test plan for this revision. (Show Details)
jhale added a reviewer: portmgr.
jhale set the repository for this revision to rP FreeBSD ports repository.
jhale added subscribers: gnome, kde.
antoine added inline comments.
Mk/Uses/pathfix.mk
19 ↗(On Diff #1795)

PATHFIX_CMAKELISTSTXT or PATHFIX_CMAKELISTS ?

23 ↗(On Diff #1795)

this doesn't look good
maybe this should be .if ${USES:Mcmake*} ?

Mk/Uses/pathfix.mk
19 ↗(On Diff #1795)

Yeah, I could see maybe PATHFIX_CMAKELISTSTXT being better.

23 ↗(On Diff #1795)

Good point. That would probably take care of the order bug.

jhale edited the test plan for this revision. (Show Details)

Add fixes suggested by antoine:

  • Rename PATHFIX_CMAKE -> PATHFIX_CMAKELISTSTXT
  • Test for ${USES:Mcmake*} instead of _INCLUDE_USES_CMAKE_MK

I don't know if it should be done now, but over time I think it's best to move all the pkgconfig fixes to USES=pkgconfig such that all the complexity of dealing with pkgconfig is contained there. Then ports that use pkgconfig only need USES=pkgconfig and it'll just work while now if you see that pkgconfig is involved you need to think about whether you really need USES=pkgconfig or if USES=pathfix is enough or maybe you need both.

In D850#12, @tijl wrote:

I don't know if it should be done now, but over time I think it's best to move all the pkgconfig fixes to USES=pkgconfig such that all the complexity of dealing with pkgconfig is contained there. Then ports that use pkgconfig only need USES=pkgconfig and it'll just work while now if you see that pkgconfig is involved you need to think about whether you really need USES=pkgconfig or if USES=pathfix is enough or maybe you need both.

The problem with that is that many ports using CMake don't even use pkgconfig to build, but may just install a pkgconfig file (albeit in the wrong place) and need a fix.

For autotools, pathfix corrects more than the pkgconfig file location too. My vote would be to keep them separate.

bapt added a reviewer: bapt.
This revision is now accepted and ready to land.Nov 22 2014, 1:39 PM
This revision was automatically updated to reflect the committed changes.