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

meson: unbreak linux/input-event-codes.h detection in some cases #10871

Closed
wants to merge 1 commit into from
Closed

meson: unbreak linux/input-event-codes.h detection in some cases #10871

wants to merge 1 commit into from

Conversation

jbeich
Copy link
Contributor

@jbeich jbeich commented Nov 15, 2022

Found downstream. When disabling some Meson options -I/usr/local/include maybe disappear, breaking configure check. evdev-proto (a subset of linux-headers) which provides the header on some BSDs doesn't support pkg-config (lacks *.pc file), so use one of wayland libraries as approximate location for now.

Note, using dependencies as include_directories looks even more hacky:

  • include_directories: include_directories(dependency('wayland-client').get_variable(pkgconfig: 'includedir')))
  • include_directories: include_directories(get_option('prefix') / 'include')

https://mesonbuild.com/Reference-manual_returned_compiler.html#compilercheck_header

@CounterPillow
Copy link
Contributor

What's stopping this from being fixed in evdev-proto by making it provide *.pc files?

@jbeich
Copy link
Contributor Author

jbeich commented Nov 15, 2022

evdev-proto doesn't exist on Linux, so the fix would still look hacky:

  • dependencies: dependency('evdev-proto', required: false) (confusing on Linux and error-prone on BSDs)
  • dependencies: dependency('evdev-proto', required: get_option('wayland') or not host_machine.system() == 'linux') (invalid disabler)

I've filed https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267784

@Dudemanguy
Copy link
Member

Wouldn't waf have this same problem or is something different there?

@Dudemanguy
Copy link
Member

Looking at this one again. I'd be fine with include_directories: include_directories(get_option('prefix') / 'include') in has_header as a workaround. Looks reasonable enough. Just leave a comment that it's for bsds.

meson.build Outdated Show resolved Hide resolved
@sfan5
Copy link
Member

sfan5 commented Jul 24, 2023

what's the status here? freebsd still uses this patch and would be nice to upstream it.

Copy link
Member

@Dudemanguy Dudemanguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally forgot about this. It looks kind of weird, but I'm fine with it.

meson.build Outdated Show resolved Hide resolved
@Dudemanguy
Copy link
Member

@jbeich: just pinging you in case you don't see the comment.

On DragonFly and FreeBSD native evdev headers are not not be used
outside of base system. Linux-compatible headers are provided by
evdev-proto package but require extra flags. As evdev-proto lacks
pkg-config support use libwayland prefix as approximation.

meson.build:974:0: ERROR: C header 'linux/input-event-codes.h' not usable
@Dudemanguy
Copy link
Member

Pushed as 3bdf702 (got rid of an extra newline). Sorry about all the delay on this!

@Dudemanguy Dudemanguy closed this Jul 30, 2023
@jbeich jbeich deleted the meson-wayland-evdev-freebsd branch August 21, 2023 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants