Created attachment 237215 [details] v1 (apply via "git am") libdecor is only used under Wayland for client-side decorations where it's already pulled as a dependency via xwayland-devel. sdl2 uses dlopen() for --enable-<any>-shared (default), so no extra bloat for the binary package. Originally reported in bug 252371 comment 23. $ poudriere testport -j 131i386 devel/sdl20 [...] =========================================================================== ====> Running Q/A tests (stage-qa) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) =>> Checking for staging violations... done =======================<phase: package >============================ ===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes ===> Building package for sdl2-2.24.0_2 =========================================================================== =>> Recording filesystem state for preinst... done =======================<phase: install >============================ ===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes ===> Installing for sdl2-2.24.0_2 ===> Checking if sdl2 is already installed ===> Registering installation for sdl2-2.24.0_2 [131i386-default] Installing sdl2-2.24.0_2... =========================================================================== =>> Checking shared library dependencies 0x00000001 NEEDED Shared library: [libc.so.7] 0x00000001 NEEDED Shared library: [libinotify.so.0] 0x00000001 NEEDED Shared library: [libm.so.5] 0x00000001 NEEDED Shared library: [librt.so.1] 0x00000001 NEEDED Shared library: [libthr.so.3] 0x00000001 NEEDED Shared library: [libusbhid.so.4]
Will commit it soon along with 2.24.1 update
> libdecor is only used under Wayland for client-side decorations where it's already pulled as a dependency via xwayland-devel. Wait, shouldn't it be enabled only along with WAYLAND then?
Created attachment 237652 [details] v1.1 (apply via "git am") (In reply to Dmitry Marakasov from comment #2) Added _IMPLIES and adjusted _DESC. Beware, OPTIONS_* poorly support nesting: $ echo OPTIONS_UNSET+=WAYLAND >>/etc/make.conf $ make -V PORT_OPTIONS:M\*WAYLAND\* WAYLAND $ echo OPTIONS_UNSET+=CSD >>/etc/make.conf $ make -V PORT_OPTIONS:M\*WAYLAND\* $
Should it really be BUILD_DEPEND? Regardless of sdl20 broken way of dynamic linking it looks like a normal library dependency.
libdecor depends on pango and dbus. Do you really want sdl2 package indirectly pull those? $ pkg install -qy sdl2 $ pkg install -n libdecor Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 29 package(s) will be affected (of 0 checked): New packages to be INSTALLED: brotli: 1.0.9,1 cairo: 1.17.4_2,3 dbus: 1.14.4,1 dejavu: 2.37_1 encodings: 1.0.5,1 font-bh-ttf: 1.0.3_4 font-misc-ethiopic: 1.0.4 font-misc-meltho: 1.0.3_4 fontconfig: 2.14.0,1 freetype2: 2.12.1_2 fribidi: 1.0.12 gettext-runtime: 0.21 glib: 2.74.1,2 graphite2: 1.3.14 harfbuzz: 5.3.1 libICE: 1.0.10,1 libSM: 1.2.3,1 libXft: 2.3.6 libdecor: 0.1.0_1 libfontenc: 1.1.4 libiconv: 1.17 mkfontscale: 1.2.1 mpdecimal: 2.5.1 pango: 1.50.9 pcre2: 10.40 pixman: 0.40.0_1 png: 1.6.38 python39: 3.9.15 xorg-fonts-truetype: 7.7_1 Number of packages to be installed: 29 The process will require 240 MiB more space. 105 KiB to be downloaded.
> libdecor depends on pango and dbus. Do you really want sdl2 package indirectly pull those? If SDL uses libdecor it has to pull all its depends. If the option is disabled it doesn't. You don't fix anything by hiding the runtime dependency.
Ping.
I just don't agree with you. dlopen() approach fixes dependency bloat, allowing to enable all port options for "batteries included". Only GNOME/Wayland (not supported on FreeBSD yet) needs libdecor kludge. Elsewhere CSD are optional, like a custom skin/theme.
> dlopen() approach fixes dependency bloat It does not. There are no magic dependencies which exist and don't exist at the same time. You're trying to introduce a broken, hidden dependency - such dependency, for instance, won't prevent libdecor from being autoremoved right after installing SDL with explicitly requested libdecor support, essentially breaking the requested functionality. Same for updating the dependency to ABI-incompatible version, not mentioning debuging problems with broken shared lib graph. Also I hope to kill this dlopen ugliness in the future, probably when I switch the port to cmake, and switch to proper shared linking. > Only GNOME/Wayland (not supported on FreeBSD yet) needs libdecor kludge. Elsewhere CSD are optional, like a custom skin/theme. So I take as there's no point in enabling it by default. Will commit it disabled then.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=490c5ee6b0cd71d73169652f3f28a93cdbc00e5d commit 490c5ee6b0cd71d73169652f3f28a93cdbc00e5d Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2022-12-05 18:56:10 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2022-12-05 19:28:13 +0000 devel/sdl20: update dependencies - Properly register dependency on vulkan - Add optional client-side decorations support PR: 266969, 268122 Submitted by: jbeich devel/sdl20/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)