Created attachment 245444 [details] patch
Created attachment 245459 [details] v2 Could you please test with the attached patch? This uses the Linux implementation of the methods, which seem to largely be wrappers around objdump(1). A bit less dubious that simply saying, "yes, this is works on FreeBSD", but I have nothing to test with, so if you could specify which ports need this functionality, that would be helpful. kde@ is currently in the middle of an exp-run for cmake 3.27.6 (bug #274225), so this will have to wait until that is complete.
(In reply to Jason E. Hale from comment #1) The port graphics/f3d version 2.2.1 needs this functionality. PATCH_SITES/PATCHFILES need to be removed in version 2.2.1
(In reply to Yuri Victorovich from comment #2) Perfect! f3d seems to build and run fine with my changes, but I see that it was failing to configure before them. I'll include the changes with the CMake update. Please be patient until the exp-run is finished and the CMake update has landed.
(In reply to Jason E. Hale from comment #3) This is great! You should probably also upstream this patch.
Created attachment 245508 [details] v3 Digging a little deeper, CMake is also employing some functionality of glibc's ldconfig(8) that FreeBSD's implementation doesn't provide. I've disabled that, relying solely on objdump(1), which is relatively universal, and the regression tests are now marginally passing versus miserably failing. One previously failing test now passes and one is still failing, but with manual inspection seems to be overall OK...just some minor string differences from the expected result. I don't think these changes are worthy of upstreaming ATM and consider this to be an experimental feature (documentation and whatnot would also have to be updated), but it's enough to get your port to build for the time being.
Note: these patches were made against the newly released 3.27.7, but should probably apply to older versions.
(In reply to Jason E. Hale from comment #6) Hi Jason, Perhaps you can commit this patch? Thanks, Yuri
(In reply to Yuri Victorovich from comment #7) I'll be landing CMake 3.27.7 shortly which will include this patch. Sorry it took so long, but there were new build failures that needed sorted and I put the CMake update on the back burner, focusing on getting Qt 6.6.0 ready.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5244b8425c414f0bca521df362eb62bb334640b3 commit 5244b8425c414f0bca521df362eb62bb334640b3 Author: Jason E. Hale <jhale@FreeBSD.org> AuthorDate: 2023-11-09 22:32:11 +0000 Commit: Jason E. Hale <jhale@FreeBSD.org> CommitDate: 2023-11-09 22:40:34 +0000 devel/cmake*: Update to 3.27.7 [1] Add support for keywords like RUNTIME_DEPENDENCY_SET and RUNTIME_DEPENDENCIES in the install() command and GET_RUNTIME_DEPENDENCIES in the file() command. [2] https://cmake.org/cmake/help/v3.27/release/3.27.html PR: 274225 [1], 274275 [2] Reported by: yuri [2] Exp-run by: antoine [1] Mk/Uses/cmake.mk | 2 +- devel/cmake-core/Makefile | 8 +- devel/cmake-core/distinfo | 6 +- ...patch-Source_cmBinUtilsLinuxELFLinker.cxx (new) | 20 ++++ .../patch-Source_cmQtAutoGenInitializer.cxx (new) | 25 +++++ ...tch-Source_cmRuntimeDependencyArchive.cxx (new) | 33 +++++++ ...9495033da40f798db9ec064d9b16ea672fc.diff (gone) | 47 --------- devel/cmake-core/pkg-plist | 109 +++++++++++++++++++-- devel/cmake-doc/Makefile | 1 - devel/cmake-doc/pkg-plist | 98 +++++++++++++++--- devel/cmake-gui/Makefile | 23 +++-- 11 files changed, 289 insertions(+), 83 deletions(-)