Created attachment 235996 [details] Git Diff for the new port See patch attached Open62541 is an open source implementation of ISO/IEC 62541 (aka. OPC UA) I am already involved upstream because the current master has portability issues - which however can be resolved. See https://github.com/open62541/open62541/pull/5238 for the ongoing efforts. Testing done with poudriere on 13.1-RELEASE-p1 amd64. I might go ahead and drag it out to arm64 too.
Giving it a few test builds right now ... meanwhile: You're using ${DATADIR} in your post-install, but the upstream buildsystem doesn't honor it. It could be "fixed" by adding: post-patch: @${REINPLACE_CMD} 's|share/${PORTNAME}|${DATADIR_REL}|' \ ${WRKSRC}/CMakeLists.txt Then, we could also use %%DATADIR%% in pkg-plist instead of the hardcoded share/open62541. Would changing the DATADIR break anything at runtime? If not, would you be fine with me adding these changes?
BTW, this "fix" isn't really necessary, if you think it *might* break things then better leave it. I would *still* use %%DATADIR%% in pkg-plist though.
Test builds almost done, looks good so far! I meanwhile checked ports framework, it looks like support for overridden DATADIR is rare in practice. So, if upstream doesn't support it, I'd opt *not* to patch it. Still, I'll modify pkg-plist to use %%DATADIR%%, I hope you don't mind.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c0e67da99a7ca0a49a3501d58c0ff3dd118ddf10 commit c0e67da99a7ca0a49a3501d58c0ff3dd118ddf10 Author: Nico Sonack <nsonack@outlook.com> AuthorDate: 2022-08-18 17:01:08 +0000 Commit: Felix Palmen <zirias@FreeBSD.org> CommitDate: 2022-08-23 16:24:19 +0000 devel/open62541: Add new port Open62541 is an open source implementation of ISO/IEC 62541 (aka. OPC UA) PR: 265930 Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D36313 devel/Makefile | 1 + devel/open62541/Makefile (new) | 24 ++++++++++++ devel/open62541/distinfo (new) | 3 ++ devel/open62541/pkg-descr (new) | 8 ++++ devel/open62541/pkg-plist (new) | 86 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+)
Committed (with minor cosmetic changes and without the patch), thanks!
Thank you. I was busy last week so I haven't had the time to respond properly. All changes are fine with me. One minor note: D36313 mentioned the weird patch of the CMakeLists.txt. The problem was that the library shipped with a broken version of FindPython which made the entire thing go haywire trying to find python. By reordering the macro calls I just forced CMake to use the system provided version. Since I wasn't aware of the existance of BINARY_ALIAS it was the only plausible solution. Now I know.