Page MenuHomeFreeBSD

net/libwebsockets: Package all enabled event loop plugins
ClosedPublic

Authored by olgeni on Sun, Aug 23, 7:52 AM.
Tags
None
Referenced Files
F169987591: D59117.id184768.diff
Thu, Sep 3, 4:54 AM
F169968596: D59117.id184855.diff
Thu, Sep 3, 3:26 AM
Unknown Object (File)
Tue, Sep 1, 10:41 PM
Unknown Object (File)
Tue, Sep 1, 8:53 PM
Unknown Object (File)
Tue, Sep 1, 4:10 AM
Unknown Object (File)
Tue, Sep 1, 2:45 AM
Unknown Object (File)
Sun, Aug 30, 10:28 PM
Unknown Object (File)
Sun, Aug 30, 8:19 PM
Subscribers
None

Details

Summary

libwebsockets builds with LWS_WITH_EVLIB_PLUGINS, which defaults to ON on
UNIX, so every event loop selected in the EVLOOP option group produces a
separate libwebsockets-evlib_*.so plugin. pkg-plist hardcoded only the libuv
one:

lib/libwebsockets-evlib_uv.so

With any other EVLOOP option enabled the extra plugins are staged but not
listed. testport catches that as an orphan, but a bulk build does not run
check-plist: it silently drops the files from the package while the installed
CMake export set (libwebsockets-config.cmake) still references them. Any
consumer that does find_package(libwebsockets) then fails at configure time,
e.g. net/mosquitto:

The imported target "websockets-evlib_ev" references the file
   "/usr/local/lib/libwebsockets-evlib_ev.so"
but this file does not exist.

OPTIONS_SUB is already set, so gate the four plugins on their options:

%%GLIB%%lib/libwebsockets-evlib_glib.so
%%LIBEV%%lib/libwebsockets-evlib_ev.so
%%LIBEVENT%%lib/libwebsockets-evlib_event.so
%%LIBUV%%lib/libwebsockets-evlib_uv.so

Bump PORTREVISION since the packaged file list changes for non-default
EVLOOP selections.

The second commit is a no-functional-change cleanup to silence portclippy:
option definition blocks in the canonical order and _DESC/helper entries
sorted alphabetically.

Test Plan

poudriere testport, 15.1 amd64, exercising all four %%OPTION%%
lines across runs (LIBEV+LIBUV, then +LIBEVENT, then +GLIB): each build ends
[done] with check-plist clean.

net/mosquitto, which previously failed to configure against the broken
package, now configures and builds unmodified against the fixed one.

portlint -AC and portclippy are clean.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable