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
Unknown Object (File)
Wed, Aug 26, 9:32 AM
Unknown Object (File)
Wed, Aug 26, 12:09 AM
Unknown Object (File)
Tue, Aug 25, 3:43 PM
Unknown Object (File)
Tue, Aug 25, 6:57 AM
Unknown Object (File)
Mon, Aug 24, 3:43 AM
Unknown Object (File)
Mon, Aug 24, 12:11 AM
Unknown Object (File)
Sun, Aug 23, 7:54 PM
Unknown Object (File)
Sun, Aug 23, 7:52 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