Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch: enable joystick/haptic/evdev support by default on FreeBSD #3866

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

Patch: enable joystick/haptic/evdev support by default on FreeBSD #3866

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: don't know
Reported for operating system, platform: FreeBSD, All

Comments on the original bug report:

On 2020-11-01 00:29:03 +0000, wrote:

Created attachment 4491
patch for configure

Basically I'm just doing the legwork to submit a FreeBSD patch someone else wrote: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249874

On 2020-11-12 03:31:37 +0000, Sam Lantinga wrote:

Patch added, thanks!
https://hg.libsdl.org/SDL/rev/635b76aa9290

On 2020-11-12 03:51:12 +0000, Sam Lantinga wrote:

SDL's evdev joystick support doesn't work on FreeBSD:
/buildbot/worker/SDL/sdl-freebsd-amd64/src/src/joystick/linux/SDL_sysjoystick.c:26:2: error: SDL now requires a Linux 2.4+ kernel with /dev/input/event support.
#error SDL now requires a Linux 2.4+ kernel with /dev/input/event support.
^
/buildbot/worker/SDL/sdl-freebsd-amd64/src/src/joystick/linux/SDL_sysjoystick.c:35:10: fatal error: 'sys/inotify.h' file not found
#include <sys/inotify.h>
^~~~~~~~~~~~~~~

On 2020-11-12 03:51:33 +0000, Sam Lantinga wrote:

Can you provide a working patch for FreeBSD?

On 2020-11-22 09:09:42 +0000, Alex S wrote:

Created attachment 4531
FreeBSD compilation fix

On 2020-11-22 09:10:54 +0000, Alex S wrote:

(In reply to Alex S from comment # 4)

Created attachment 4531 [details]
FreeBSD compilation fix

Evdev headers aren't actually included in the base system (well, it has a private copy), they are available through the devel/evdev-proto port instead. We also have devel/libinotify and devel/libudev-devd shims, I didn't verify whether they work with SDL.

On 2020-11-22 09:12:38 +0000, Alex S wrote:

Created attachment 4532
FreeBSD compilation fix

(Not sure what happened to the previous attachment.)

On 2020-11-24 05:09:01 +0000, Sam Lantinga wrote:

Patch added, thanks!
https://hg.libsdl.org/SDL/rev/2929659b559b

On 2020-11-24 06:39:42 +0000, Alex S wrote:

(In reply to Sam Lantinga from comment # 7)

Patch added, thanks!
https://hg.libsdl.org/SDL/rev/2929659b559b

Ah, that's not quite enough. You need to:

  1. rename src/joystick/bsd/SDL_sysjoystick.c to something;
  2. regenerate configure.

On 2020-11-24 07:04:17 +0000, Sam Lantinga wrote:

Done!
https://hg.libsdl.org/SDL/rev/aab8e1ec22e4

On 2020-11-24 08:23:31 +0000, Alex S wrote:

Looks like we have a collision with https://hg.libsdl.org/SDL/rev/2e58bfc28b4e. (Again, the headers in the base system are intended for drivers and should not be used for compiling non-base applications. At least that's the policy for now: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240964#c19.) Do you need a patch reverting the changes?

On 2020-11-24 10:25:08 +0000, Alex S wrote:

Created attachment 4537
avoid private headers

patch reverting the changes

On 2020-11-24 14:43:35 +0000, Sam Lantinga wrote:

Patch applied:
https://hg.libsdl.org/SDL/rev/718090fd68db

Does this mean that FreeBSD can't use this by default?

On 2020-11-24 15:22:19 +0000, Alex S wrote:

(In reply to Sam Lantinga from comment # 12)

Patch applied:
https://hg.libsdl.org/SDL/rev/718090fd68db

Does this mean that FreeBSD can't use this by default?

I don't quite understand the question.

@SDLBugzilla SDLBugzilla added the enhancement New feature or request label Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant