# wayland.stack -- the base a Wayland desktop stands on, whichever compositor. # stack-version: 1.14.320 # # WHAT THIS MACHINE NEVER BUILDS is in avoid.stack, included by every stack # here: the exclusions are a property of the machine, not of one stack. include avoid # packagemanager stack wayland --run # # The kernel check, the session (dbus, elogind), the audio floor, the # graphics stack (llvm, glvnd, mesa), wayland itself, GTK4 with libsoup3, # and -- after git -- seatd and wlroots. Nothing here is sway's: another # wlroots compositor would stand on exactly this. sway.stack includes it, # so the full desktop is still one command. # # WHY IT WAS SPLIT OUT (1.14.320). sway.stack had grown to 477 lines and # answered four questions at once: the base, the compositor, a set of # applications, and one person's own programs. Rebuilding a viewer meant # reading past mesa's options to find it. # Never built by this stack, however they are reached. harfbuzz RECOMMENDS # texlive and LibreOffice; a sway desktop with a webkit browser wants # neither, and texlive alone is hours of build time and a /opt tree. # NOT BUILT BY THIS STACK. The book's recommendations are followed -- # a recommendation the build actually needs (curl for cmake, icu for # libxml2) must not be dropped by a blanket rule. These are the branches # this desktop does not want, named one at a time, and everything they alone # pull in goes with them. # the KDE leaves okular pulls in: named individually, because a package can # have several parents and pruning by one of them drops shared dependencies # (graphite2 was lost that way) # The desktop-portal tail. The book makes xdg-desktop-portal REQUIRE all # four backends -- gtk, wlr, gnome AND lxqt -- so one recommendation from # gtk4 drags in the whole of xfce and lxqt, gnome-desktop and libfm-qt. # Sway needs none of it to run; screen sharing wants xdg-desktop-portal-wlr, # which can be built on its own later: # packagemanager install xdg-desktop-portal-wlr --run # Not this desktop either: a systemd package on a SysV system, phone modem # stacks, a mail/ssh server, spell-checking dictionaries. # openssh is AVOIDED here and INSTALLED by network.stack, where it belongs: # it is networking, not desktop. Letting a dependency plan pull it in # mid-sway would put its system-account question in the middle of a graphics # build. # Tails of things already avoided. Each of these is in the plan ONLY to # serve a package this stack does not build, and the tools cannot yet work # that out for themselves (see 1.12.83: pruning by the single parent that # `blfs order` reports dropped shared dependencies, and broke harfbuzz). # Checked one by one against the plan's parent column: # Checked against EVERY parent, not just the one the plan prints: these have # no parent left in the plan at all. # NOT avoided, though the plan labels them with an avoided parent: the label # shows only the FIRST parent. gtk3 is really wanted by adwaita-icon-theme, # ffmpeg by mpv, polkit by colord... and pulseaudio by pipewire/sdl3/gst. # (rust and llvm STAY: glycin genuinely requires rust, and llvm is a stack # entry in its own right for mesa.) # 0. verify the kernel (DRM/amdgpu, evdev, snd, seccomp, user ns, render node) check kernel-sway # 1. seat and session (SysV: elogind is the logind; seatd is not in the book) book dbus book elogind url=https://github.com/elogind/elogind ref=v255.17 prog=loginctl build="meson setup build --prefix=/usr --buildtype=release -Dcgroup-controller=elogind -Ddbuspolicydir=/etc/dbus-1/system.d; ninja -C build" install="ninja -C build install" # 1b. THE AUDIO FLOOR, BEFORE ANYTHING THAT LOOKS FOR IT. # # alsa-lib used to sit at entry 7, after mpv -- and ffmpeg is built inside # mesa's plan (entry 2) and SDL3 inside gstreamer's, both of which autodetect # ALSA. They configured cleanly, installed cleanly, and had no ALSA support, # because the library did not exist yet. Nothing failed, so nothing said so. # # This is the same rule the harfbuzz comment below states for libass: what an # earlier entry installed is simply there. An optional dependency of # something built inside a plan can only be placed by entry order. book alsa-lib # ffmpeg and SDL3 are named here, before mesa and gstreamer, so they are # built in THIS order rather than wherever a dependency plan reaches them -- # and expect= proves the feature afterwards instead of trusting the order. book ffmpeg expect="ffmpeg -hide_banner -devices 2>/dev/null | grep -qw alsa" # 2. graphics -- llvm feeds mesa; mesa options come from the machine # (machine.conf wiring pending; book defaults until then) # cmake (pulled in by llvm and others) has NO required dependencies and four # recommended ones -- and its own build turns on the system libraries, so a # missing curl is a hard failure: # CMAKE_USE_SYSTEM_CURL is ON but a curl is not found! # This is the trade-off, and the answer is the same one: name # what the build actually needs. book nghttp2 book curl book libarchive book libuv book llvm # glslang provides glslangValidator, which mesa needs ONLY because # machine.conf turns on the Vulkan drivers -- the book does not list it as a # mesa dependency, so no dependency order can place it. A machine option # that creates a dependency has to name it here. book glslang # The font stack goes BEFORE mesa. # # libass (built inside mesa's plan, via ffmpeg) hard-requires harfbuzz in its # configure, and the book's libass page does not list it -- so no dependency # order can place it. What CAN place it is entry order: anything an earlier # entry installed is simply there. book harfbuzz # text shaping: freetype recommends it, book graphite2 # and webkit/pango need both book fontconfig # LIBGLVND, BEFORE MESA -- because machine.conf builds Mesa with # glvnd=enabled, and Mesa's configure needs it there. # # glvnd is the GL dispatcher: libGL, libEGL and libGLES are its, and # Mesa installs only its vendor libraries behind it (libGLX_mesa, # libEGL_mesa + 50_mesa.json). It is what provides pkg-config `opengl`, # and what lets another GL driver (NVIDIA's) sit beside Mesa. # # NOT a BLFS page -- the 13.1 book only links to GLFS for it. The canonical # repo is gitlab.freedesktop.org/glvnd/libglvnd; the NVIDIA GitHub copy is # the one reachable from where this was written. CHECKED there: newest tag # v1.7.0, and the option names (all left at their defaults). # # SWITCHING AN EXISTING MACHINE: libglvnd and mesa must be done in ONE go. # Between the two, libGL.so.1 is glvnd's with no vendor behind it and every # GL program fails: # packagemanager stack wayland --only libglvnd,mesa --run # Programs already built keep working: the sonames (libGL.so.1, libEGL.so.1, # libGLESv2.so.2) do not change, only who provides them. git libglvnd \ url=https://gitlab.freedesktop.org/glvnd/libglvnd.git \ ref=v1.7.0 \ needs=xorg7-lib \ have=/usr/lib/pkgconfig/opengl.pc \ build="rm -rf build; meson setup build --prefix=/usr --buildtype=release; ninja -C build" \ install="ninja -C build install" \ expect="pkg-config --exists opengl && pkg-config --exists glx && test -e /usr/lib/libGLdispatch.so.0" # THE SOFTWARE RENDERER IS A SEPARATE DRIVER, and a hardware-only mesa # fails with "egl: failed to create dri2 screen" and no fallback. The probe # wants both: radeonsi for the GPU, swrast_dri.so for llvmpipe. (llvmpipe # installs as swrast_dri.so -- the file is named after the interface, not # the rasteriser, which is why looking for llvmpipe_dri.so finds nothing.) book mesa expect="test -e /usr/lib/dri/swrast_dri.so -o -e /usr/lib/dri/kms_swrast_dri.so && test -e /usr/share/glvnd/egl_vendor.d/50_mesa.json && test -e /usr/lib/libGLX_mesa.so.0" book xwayland book libinput book libxkbcommon # 3. wayland core book wayland book wayland-protocols # 5. fonts and 2D # # From here on the entries are the RECOMMENDATIONS worth having, named # instead of inherited: with the book's suggestions no longer # arrive by themselves, which is the point -- LibreOffice, OpenJDK, CUPS, # Qt6/okular/VLC, texlive and the xfce/lxqt portals are not part of this # desktop. Anything missed shows up as a clean "not found" at configure # time and becomes one more line here. # 6. GTK4 and libsoup3. WebKitGTK, gstreamer and mpv are media.stack's. book pango # GTK4 text layout book gdk-pixbuf # GTK4 image loading book hicolor-icon-theme book adwaita-icon-theme # cursors and the default icon set book gtk4 book glib-networking # TLS for libsoup, or the browser has no https book libsoup3 # --------------------------------------------------------------------- # Everything from here needs GIT: kept to the end. # # A git entry failed with "git: command not found" -- git is itself a BLFS # package, so anything cloned has to come after it is built. # --------------------------------------------------------------------- book git # -Dserver=enabled: seatd-user execs /usr/bin/seatd, so the BINARY must # exist even though no daemon runs at boot. -Dlibseat-seatd=enabled is what # libseat needs for LIBSEAT_BACKEND=seatd; logind stays enabled as a fallback # but is unusable here (no pam_elogind). git seatd url=https://git.sr.ht/~kennylevinsen/seatd ref=0.9.1 prog=seatd build="meson setup build --prefix=/usr --buildtype=release -Dserver=enabled -Dlibseat-seatd=enabled -Dlibseat-logind=elogind; ninja -C build" install="ninja -C build install" # wlroots' DRM backend needs libdisplay-info; without it meson DISABLES drm # at configure time and says so only in a summary line, and sway then dies at # runtime with "Cannot create DRM backend: disabled at compile-time". book libdisplay-info # -Dbackends=drm,libinput,... is explicit on purpose: an auto-detected # backend list is a silent dependency, and this is the dependency that was # silently missing. git wlroots url=https://gitlab.freedesktop.org/wlroots/wlroots.git ref=0.19.2 have=/usr/lib/pkgconfig/wlroots-0.19.pc build="meson setup build --prefix=/usr --buildtype=release -Dbackends=drm,libinput,x11 -Dsession=enabled; ninja -C build" install="ninja -C build install" # TeX is NOT built by this stack. # # Putting `book texlive` last only moved the ENTRY: texlive is harfbuzz's # recommendation, so it was still pulled into an early entry's plan and # failed there (its configure wants freetype-config, which FreeType removed # years ago -- an upstream problem, not this desktop's). Nothing here needs # TeX: the book's `make ... pdf ps` manual builds are commented out (1.12.87) # and asymptote/biber are avoided. # # To build it later, on its own: packagemanager install texlive --run