From afe7820264c3e77f14f6a21ff46596e8d07554e0 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Tue, 6 Jan 2026 18:07:40 -0500 Subject: Add support for el9. What a mess --- bldRiver.sh | 5 +- el9.sh | 449 +++++++++++++++++++++++++++++++++++++++++++++++++++++ river/init | 17 +- river/theme_helper | 8 +- waylandrc | 11 ++ 5 files changed, 482 insertions(+), 8 deletions(-) create mode 100755 el9.sh diff --git a/bldRiver.sh b/bldRiver.sh index 1ba49d0..125355b 100755 --- a/bldRiver.sh +++ b/bldRiver.sh @@ -1,6 +1,7 @@ #!/bin/sh set -ex codedir="${CODEDIR}/river" +install_prefix="${RIVERWM_BASE:-$HOME/.local}" if ! [ -d "$codedir" ] ; then mkdir -p "$(basename "$codedir")" @@ -8,12 +9,12 @@ if ! [ -d "$codedir" ] ; then cd "$codedir" git clean -fdx . git reset --hard HEAD - git checkout v0.3.5 + git checkout v0.3.12 cd - fi cd "$codedir" git submodule init git submodule update -zig build -Dxwayland -Doptimize=ReleaseSafe --prefix ~/.local install +zig build --search-prefix "$RIVERWM_BASE" -Dxwayland -Doptimize=ReleaseSafe --prefix "$install_prefix" install diff --git a/el9.sh b/el9.sh new file mode 100755 index 0000000..71d7c13 --- /dev/null +++ b/el9.sh @@ -0,0 +1,449 @@ +#!/bin/sh +set -ex +# export RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/rivercfg}" +export RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/river}" +codedir="${RIVERWM_BASE}/src" +# Override for everything elsedownstream... +export CODEDIR="$codedir" + +# Annoyingly scattered about inside of the prefix... +export PKG_CONFIG_PATH="$(echo "$RIVERWM_BASE/lib64/pkgconfig +$RIVERWM_BASE/lib/pkgconfig +$RIVERWM_BASE/share/pkgconfig +/usr/lib64/pkgconfig +/usr/lib/pkgconfig" | tr '\n' ':')" + +_pfx="$RIVERWM_BASE" + + +sudo dnf config-manager --set-enabled crb + +sudo yum -y install \ + doxygen \ + expat-devel \ + libffi-devel \ + libxml2-devel \ + xmlto \ + libxkbcommon-devel \ + pixman \ + pixman-devel \ + libglvnd-devel \ + vulkan-loader-devel \ + libdrm-devel \ + xwayland-devel \ + libinput-devel \ + hwdata \ + hwdata-devel \ + libdisplay-info-devel \ + cairo-devel \ + pipewire-devel \ + inih-devel \ + scdoc \ + libevdev-devel \ + mtdev-devel \ + gtk3-devel \ + lcms2-devel \ + xcb-util-devel \ + gtkmm30-devel \ + flatpak-devel \ + fuse3-devel \ + gstreamer1-devel \ + gstreamer1-plugins-base-devel \ + vala \ + libpcap-devel \ + iniparser-devel \ + catch-devel \ + + +sudo yum -y builddep \ + systemd \ + mesa-vulkan-drivers \ + xorg-x11-server-Xwayland \ + xwayland-devel \ + libdrm \ + libinput \ + xdg-desktop-portal \ + + +# sudo yum -y install python3-virtualenv + +python3 -m venv "$codedir/venv" +. "$codedir/venv/bin/activate" +pip install meson +pip install ninja + + +if ! [ -d "$codedir/wayland" ] ; then + git clone https://gitlab.freedesktop.org/wayland/wayland \ + "$codedir/wayland" +fi +cd "$codedir/wayland" +git checkout 1.24.0 +meson setup --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + +if ! [ -d "$codedir/wl/drm" ] ; then + git clone https://gitlab.freedesktop.org/mesa/drm \ + "$codedir/wl/drm" +fi +cd "$codedir/wl/drm" +git checkout libdrm-2.4.131 +meson setup --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + +if ! [ -d "$codedir/wl/wayland-protocols" ] ; then + git clone https://gitlab.freedesktop.org/wayland/wayland-protocols \ + "$codedir/wl/wayland-protocols" +fi +cd "$codedir/wl/wayland-protocols" +git checkout 1.47 +meson setup --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + +if ! [ -d "$codedir/wl/pixman" ] ; then + git clone https://gitlab.freedesktop.org/pixman/pixman \ + "$codedir/wl/pixman" +fi +cd "$codedir/wl/pixman" +git checkout pixman-0.46.4 +meson setup --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + + +if ! [ -d "$codedir/wl/libliftoff" ] ; then + git clone https://gitlab.freedesktop.org/emersion/libliftoff \ + "$codedir/wl/libliftoff" +fi +cd "$codedir/wl/libliftoff" +git checkout v0.5.0 +meson setup --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + +# https://gitlab.gnome.org/GNOME/glib/ +# Needed for xdg-desktop-portal... +# Libinput also needs a newer vesion... +if ! [ -d "$codedir/glib" ] ; then + git clone https://gitlab.gnome.org/GNOME/glib \ + "$codedir/glib" +fi +cd "$codedir/glib" +# git checkout 2.87.1 +git checkout 2.76.6 +git reset --hard HEAD +# git clean -fdx . +meson setup --includedir "${_pfx}/include" -Dprefix="${_pfx}" build +meson compile -C build +meson install -C build +cd - + + +if ! [ -d "$codedir/libinput" ] ; then + git clone https://gitlab.freedesktop.org/libinput/libinput/ \ + "$codedir/libinput" +fi +cd "$codedir/libinput" +git checkout 1.30.1 +git reset --hard HEAD +git clean -fdx . +git submodule update +meson setup -Ddebug-gui=false -Dprefix="${_pfx}" build/ +# _prev_ld_pth="$LD_LIBRARY_PATH" +# unset LD_LIBRARY_PATH +ninja -C build/ +ninja -C build/ install +# export LD_LIBRARY_PATH="$_prev_ld_pth" +cd - + + +if ! [ -d "$codedir/seatd" ] ; then + git clone https://git.sr.ht/~kennylevinsen/seatd \ + "$codedir/seatd" +fi +cd "$codedir/seatd" +meson setup --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + +if ! [ -d "$codedir/wl/wlroots" ] ; then + git clone https://gitlab.freedesktop.org/wlroots/wlroots \ + "$codedir/wl/wlroots" +fi +cd "$codedir/wl/wlroots" +git checkout 0.19.2 +meson setup --includedir "${_pfx}/include" --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + +if ! [ -d "$codedir/wl/xdg-desktop-portal-wlr" ] ; then + git clone https://github.com/emersion/xdg-desktop-portal-wlr \ + "$codedir/wl/xdg-desktop-portal-wlr" +fi +cd "$codedir/wl/xdg-desktop-portal-wlr" +git checkout v0.8.1 +git checkout HEAD ./src +git apply - < + #include + #include ++#include + + #include "screencast.h" + #include "wlr_screencopy.h" +EOF +meson setup --wipe -Dprefix="${_pfx}" build/ +ninja -C build/ +ninja -C build/ install +cd - + +if ! [ -d "$codedir/foot" ] ; then + git clone https://codeberg.org/dnkl/foot \ + "$codedir/foot" +fi +cd "$codedir/foot" +git checkout 1.25.0 +git checkout HEAD scripts meson.build +# Fix for older python... +git apply - </dev/null 2>&1 ; then echo "" # swaybg -i .wallpaper.jpg & fi - +# # If Chromium dialogs aren't working these are suspect dbus-update-activation-environment --systemd WAYLAND_DISPLAY "XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP" systemctl --user restart xdg-desktop-portal +# So.... if we've compiled the portal by hand we're going to now run it +if [ -d "$RIVERWM_BASE" ] ; then + _portal="$RIVERWM_BASE/libexec/xdg-desktop-portal" + [ -x "$_portal" ] && sh -c "$_portal"' --replace' & + + _portal="$RIVERWM_BASE/libexec/xdg-desktop-portal-wlr" + [ -x "$_portal" ] && sh -c "$_portal"' --replace' & +fi + # I hate calling this directly but the systemd unit is bugged on arch at # least, running it by hand appears to work just fine _gtk_portal=/usr/lib/xdg-desktop-portal-gtk diff --git a/river/theme_helper b/river/theme_helper index 398910d..5de2830 100755 --- a/river/theme_helper +++ b/river/theme_helper @@ -1,11 +1,11 @@ #!/bin/sh set -ex -exec >/tmp/theme.log 2>&1 +# exec >/tmp/theme.log 2>&1 XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" conf="$XDG_CONFIG_HOME/river/theme_conf" gnomeSet() { - gsettings set org.gnome.desktop.interface color-scheme "$1" + gsettings set org.gnome.desktop.interface color-scheme "$1" || echo "color-scheme failed" } bgcolor_dark=0x282828 @@ -24,14 +24,14 @@ case $mode in mode=dark gnomeSet 'prefer-dark' # Because GTK is an absolute disaster... - gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark + gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark || echo "gtk-theme failed..." pkill -SIGUSR1 foot riverctl background-color "$bgcolor_dark" ;; dark) mode=light gnomeSet 'prefer-light' - gsettings set org.gnome.desktop.interface gtk-theme Adwaita + gsettings set org.gnome.desktop.interface gtk-theme Adwaita || echo "gtk-theme failed..." pkill -SIGUSR2 foot riverctl background-color "$bgcolor_light" ;; diff --git a/waylandrc b/waylandrc index 696b8e9..186eeaa 100755 --- a/waylandrc +++ b/waylandrc @@ -35,5 +35,16 @@ sh -c '/usr/libexec/kf6/polkit-kde-authentication-agent-1' & sh -c '/usr/libexec/pam_kwallet_init' & # sh -c 'kwalletd6' & +RIVERWM_BASE="${RIVERWM_BASE:-$HOME/.local/opt/river}" +if [ -d "$RIVERWM_BASE" ] ; then + export LD_LIBRARY_PATH="$RIVERWM_BASE/lib64:$RIVERWM_BASE/lib" + + _bemenu_lib=$RIVERWM_BASE/lib/bemenu/ + if [ -d "$_bemenu_lib" ] ; then + export BEMENU_RENDERERS="$_bemenu_lib" + fi +fi + + exec river -- cgit v1.2.3