[pistache] Proper manage libevent dependency #28376
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes to recipe: pistache/0.0.5
Motivation
fixes #28369
/cc @tzolnai
Details
The dependency
libevent
was configured in the recipe to be installed in case not supported. This pull request toggles that logic to only install it when supported and configured to be used as a dependency. It also aligns the recipe to follow the upstream's behavior: libevent is False by default on Linux; on all other platforms, it is mandatory to use libevent.Plus, libevent only started to be used by Pistache 0.4.23. The old version 0.0.5 is using native
sys/event
instead.The libevent is only optional for Linux: https://github.com/pistacheio/pistache/blob/v0.4.25/meson.build#L188.
In case using Apple or Windows, it will use libevent always: https://github.com/pistacheio/pistache/blob/v0.4.25/include/pistache/emosandlibevdefs.h#L42
In case using Linux, and the build option
PISTACHE_FORCE_LIBEVENT
is False (default), it will use Linux epoll instead: https://github.com/pistacheio/pistache/blob/v0.4.25/include/pistache/eventmeth.h#L28