When you build www/webkit2-gtk4 on 12.x/i386, it fails with: ====================== . . /usr/ports/www/webkit2-gtk4/work/webkitgtk-2.38.3/Source/JavaScriptCore/API/glib/JSCOptions.cpp:87:13: error: redefinition of 'valueFromGValue' static bool valueFromGValue(const GValue* gValue, size_t& value) ^ /usr/ports/www/webkit2-gtk4/work/webkitgtk-2.38.3/Source/JavaScriptCore/API/glib/JSCOptions.cpp:76:13: note: previous definition is here static bool valueFromGValue(const GValue* gValue, unsigned& value) ^ /usr/ports/www/webkit2-gtk4/work/webkitgtk-2.38.3/Source/JavaScriptCore/API/glib/JSCOptions.cpp:93:13: error: redefinition of 'valueToGValue' static void valueToGValue(size_t value, GValue* gValue) ^ /usr/ports/www/webkit2-gtk4/work/webkitgtk-2.38.3/Source/JavaScriptCore/API/glib/JSCOptions.cpp:82:13: note: previous definition is here static void valueToGValue(unsigned value, GValue* gValue) ^ /usr/ports/www/webkit2-gtk4/work/webkitgtk-2.38.3/Source/JavaScriptCore/API/glib/JSCOptions.cpp:562:22: error: redefinition of 'jscOptionsType' static JSCOptionType jscOptionsType(size_t) ^ /usr/ports/www/webkit2-gtk4/work/webkitgtk-2.38.3/Source/JavaScriptCore/API/glib/JSCOptions.cpp:557:22: note: previous definition is here static JSCOptionType jscOptionsType(unsigned) ^ 2 warnings and 3 errors generated. ==============
The culprit is the addition of files/patch-Source_JavaScriptCore_API_glib_JSCOptions.cpp Why was this patch applied? This patch removes an upstream change that was specifically committed to support 32-bit platforms back in 2019. Why undo that? I removed that patch file, and it now builds on i386. It also builds on amd64 (with and without the patch).
Created attachment 239970 [details] [patch] fix build for i386 Remove the patch file (patch-Source_JavaScriptCore_API_glib_JSCOptions.cpp) to get builds working on i386. The patch file itself says 'Unbreak i386', but it seems to do just exactly the opposite. So remove it. p.s. portlint is now complaining about ~40 patch files that were regressed format-wise in the update to 2.38.3, for example: WARN: /usr/ports/www/webkit2-gtk4/files/patch-Source_WebDriver_PlatformGTK.cmake: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format. It's not worth fixing that on its own (repo churn), but please consider using makepatch when making changes to patch files.
(In reply to John Hein from comment #2) No need to bump PORTREVISION for attachment 239970 [details]. It changes nothing on amd64 packages, and i386 build were failing, so there should not be any i386 packages to change.
LGTM. Will push shortly.
Committed!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=98376a10ad6f3e2aac8709f3f58e14c9095e452e commit 98376a10ad6f3e2aac8709f3f58e14c9095e452e Author: John Hein <jcfyecrayz@liamekaens.com> AuthorDate: 2023-02-07 19:21:12 +0000 Commit: Neel Chauhan <nc@FreeBSD.org> CommitDate: 2023-02-07 19:22:08 +0000 www/webkit2-gtk4: Fix build on 12.x/i386 PR: 269388 ...e_JavaScriptCore_API_glib_JSCOptions.cpp (gone) | 36 ---------------------- 1 file changed, 36 deletions(-)