feat(pkg): add libevent 2.1.13 compat package - #503
Merged
Merged
Conversation
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
compat.libevent2.1.13 as a cross-platform C-source package and registers a workspace behavior test.Shape and source selection
Libevent is a third-party C library with no upstream
mcpp.toml, so this is a Form Bcompatpackage. The descriptor compiles the CMakeSRC_COREandSRC_EXTRAtranslation units directly through mcpp, using separate Linux epoll, macOS kqueue and Windows IOCP/select backends. It also compiles POSIX pthread or Win32 thread support per platform. Upstream CMake is run by the install hook only to generateevent2/event-config.handevconfig-private.h; the library objects are compiled by the consuming mcpp toolchain.CMake's Linux/macOS platform probes explicitly use the native
/usr/bin/cc, avoiding incomplete config headers from the ambient mcpp toolchain wrapper. The C sources themselves remain compiled by the consumer's selected mcpp toolchain.OpenSSL, Mbed TLS, tests, benchmarks and sample programs are explicitly disabled. The TLS adapters are not advertised as features or included in the target. Windows links
ws2_32,shell32,advapi32andiphlpapi; the behavior test initializes Winsock before creating the event base and cleans it up afterward.Upstream source, version and license
libevent/libeventrelease-2.1.13-stable(the observed 2.2 tags were alpha prereleases)1a0885e17dc78afbaeddf13cf849f9238bbc24acdc178464a0d1934d7c5ffbd5, calculated twice on the archive.evutil_rand.c, MIT for the Windows timer code derived from libutp. The selected metadata includes these SPDX IDs.Test member
tests/examples/libeventchecks a one-shot timeout callback, anevbufferwrite/read round trip, and creation/freeing of an HTTP object. The event loop usesEVLOOP_ONCE:event_base_dispatch()returns 1 when a one-shot event empties the queue, even if the callback ran successfully. Windows initializes and cleans up Winsock explicitly.Verification
With CI-pinned mcpp 2026.10.1.2, Linux, macOS and Windows all passed
mcpp xpkg parse --all-os pkgs/c/compat.libevent.luaandmcpp test -p libevent --cache off:An initial Linux default-GCC run failed because CMake's host probes used the ambient toolchain wrapper and generated an incomplete
event-config.h. Selecting/usr/bin/ccfor Linux/macOS CMake probes fixed it; the subsequent full PR validation passed. The Windows probe initially could not invoke a quoted CMake executable directly, so the hook usescmd /c; its final behavior test passes without the earlier uninitialized-Winsock warning. Local Linux GCC 16.1.0 and LLVM 22.1.8 smoke tests also passed.README
Per request, the package is intentionally not added to either README. This PR also removes the merged muduo/Boost example rows from both READMEs; no other README content is changed.