Bug 284869

Summary: devel/godot-tools the joysticks do not work.
Product: Ports & Packages Reporter: Chédotal Julien <rjdi>
Component: Individual Port(s)Assignee: Robert Clausecker <fuz>
Status: Closed FIXED    
Severity: Affects Many People CC: FreeBSD, fuz
Priority: --- Flags: FreeBSD: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Patch for joystick support
none
patch-platform_linuxbsd_detect.py
none
patch-platform_linuxbsd_libudev-so__wrap.c
none
patch-thirdparty_linuxbsd_headers_udev_libudev.h none

Description Chédotal Julien 2025-02-17 22:53:48 UTC
Created attachment 257607 [details]
Patch for joystick support

Under godot-tools-4.2.1_2, the controllers do not work.
I propose a patch to fix the problem.
Same modification for the devel/godot port...
Thank you.
Comment 1 Shane 2025-02-19 08:15:21 UTC
I see no problem adding this patch.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2025-02-19 12:17:07 UTC
(In reply to Shane from comment #1)

Would you mind copy-editing this patch so I can apply it to the ports tree?  As is, the patch is a diff against the work directory of the port, which isn't something I can apply.
Comment 3 Chédotal Julien 2025-02-19 14:35:09 UTC
Created attachment 257658 [details]
patch-platform_linuxbsd_detect.py
Comment 4 Chédotal Julien 2025-02-19 14:35:50 UTC
Created attachment 257659 [details]
patch-platform_linuxbsd_libudev-so__wrap.c

patch-platform_linuxbsd_libudev-so__wrap.c
Comment 5 Chédotal Julien 2025-02-19 14:36:29 UTC
Created attachment 257660 [details]
patch-thirdparty_linuxbsd_headers_udev_libudev.h
Comment 6 Chédotal Julien 2025-02-19 14:39:44 UTC
I did three patches, is it good ?
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2025-02-19 15:18:31 UTC
(In reply to Chédotal Julien from comment #6)

Works for me.

Will MFH this patch into 2025Q1.
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-02-20 23:29:18 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3d9903862da8e530ebbc38840e23867c91e4c08f

commit 3d9903862da8e530ebbc38840e23867c91e4c08f
Author:     Chédotal Julien <rjdi@wanadoo.fr>
AuthorDate: 2025-02-19 15:17:08 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-02-20 23:27:26 +0000

    devel/godot-tools: fix joystick driver code

    Approved by:    FreeBSD@ShaneWare.Biz
    PR:             284869
    MFH:            2025Q1

 devel/godot-tools/Makefile                                    |  1 +
 .../godot-tools/files/patch-platform_linuxbsd_detect.py (new) | 11 +++++++++++
 .../files/patch-platform_linuxbsd_libudev-so__wrap.c (new)    | 11 +++++++++++
 .../patch-thirdparty_linuxbsd_headers_udev_libudev.h (new)    | 11 +++++++++++
 4 files changed, 34 insertions(+)
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-02-20 23:30:37 UTC
A commit in branch 2025Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6b40f35e96681da84b64b1797b3069610cb93f6e

commit 6b40f35e96681da84b64b1797b3069610cb93f6e
Author:     Chédotal Julien <rjdi@wanadoo.fr>
AuthorDate: 2025-02-19 15:17:08 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-02-20 23:29:19 +0000

    devel/godot-tools: fix joystick driver code

    Approved by:    FreeBSD@ShaneWare.Biz
    PR:             284869
    MFH:            2025Q1

    (cherry picked from commit 3d9903862da8e530ebbc38840e23867c91e4c08f)

 devel/godot-tools/Makefile                                    |  1 +
 .../godot-tools/files/patch-platform_linuxbsd_detect.py (new) | 11 +++++++++++
 .../files/patch-platform_linuxbsd_libudev-so__wrap.c (new)    | 11 +++++++++++
 .../patch-thirdparty_linuxbsd_headers_udev_libudev.h (new)    | 11 +++++++++++
 4 files changed, 34 insertions(+)
Comment 10 Robert Clausecker freebsd_committer freebsd_triage 2025-02-20 23:35:15 UTC
Thank you for your contribution.
Comment 11 Chédotal Julien 2025-02-20 23:58:15 UTC
I think there is a mistake, the patches are not in the right place (it doesn't work there when you do a make patch), the three files must be added on the devel/godot port in the "files" folder with the other patches, not on devel/godot-tools. 
Thanks.
Comment 12 Robert Clausecker freebsd_committer freebsd_triage 2025-02-21 00:08:36 UTC
(In reply to Chédotal Julien from comment #11)

Thank you for the feedback.  I'm sorry for getting this wrong.  Next time, please provide a patch against the ports tree to avoid this sort of misinterpretation.

@maintainer could you please confirm?  If yes, I can move the patches to the right place.
Comment 13 Chédotal Julien 2025-02-21 00:19:52 UTC
No sorry, it's my fault, I should have made the bug report on the devel/godot port, that would have avoided the error. 
I recently discovered that devel/godot-tools applies the devel/godot patches...
Thanks.
Comment 14 Shane 2025-02-21 01:10:45 UTC
yes patches should go in devel/godot.

The user had emailed me the patches a couple of days earlier, so I know they compile and I didn't look too close. With 4.4 ready to start a release cycle I was going to wait and include these patches in the next update.
Comment 15 commit-hook freebsd_committer freebsd_triage 2025-02-21 01:22:57 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=87adc7e46597e5e28eb6139946530029f9363f79

commit 87adc7e46597e5e28eb6139946530029f9363f79
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-02-21 01:12:44 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-02-21 01:12:44 +0000

    devel/godot{,-tools}: move patches to the right port

    It was unclear where the patches should go.

    Fixes:          3d9903862da8e530ebbc38840e23867c91e4c08f
    Reported by:    Chédotal Julien <rjdi@wanadoo.fr>
    PR:             284869

 devel/godot-tools/Makefile                                              | 1 -
 devel/godot/Makefile                                                    | 2 +-
 devel/{godot-tools => godot}/files/patch-platform_linuxbsd_detect.py    | 0
 .../files/patch-platform_linuxbsd_libudev-so__wrap.c                    | 0
 .../files/patch-thirdparty_linuxbsd_headers_udev_libudev.h              | 0
 5 files changed, 1 insertion(+), 2 deletions(-)
Comment 16 commit-hook freebsd_committer freebsd_triage 2025-02-21 01:22:58 UTC
A commit in branch 2025Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2263d07c41b41d476b9a7d4003f7d7191e16f51e

commit 2263d07c41b41d476b9a7d4003f7d7191e16f51e
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-02-21 01:12:44 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-02-21 01:22:33 +0000

    devel/godot{,-tools}: move patches to the right port

    It was unclear where the patches should go.

    Fixes:          3d9903862da8e530ebbc38840e23867c91e4c08f
    Reported by:    Chédotal Julien <rjdi@wanadoo.fr>
    PR:             284869

    (cherry picked from commit 87adc7e46597e5e28eb6139946530029f9363f79)

 devel/godot-tools/Makefile                                              | 1 -
 devel/godot/Makefile                                                    | 2 +-
 devel/{godot-tools => godot}/files/patch-platform_linuxbsd_detect.py    | 0
 .../files/patch-platform_linuxbsd_libudev-so__wrap.c                    | 0
 .../files/patch-thirdparty_linuxbsd_headers_udev_libudev.h              | 0
 5 files changed, 1 insertion(+), 2 deletions(-)
Comment 17 Chédotal Julien 2025-02-21 15:10:30 UTC
(In reply to Shane from comment #14)

Thanks for considering the patch.
Looking forward to testing version 4.4