gui-wm/niri: add 25.08

Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
Takuya Wakazono
2025-09-04 00:05:12 +09:00
parent 83d50a5819
commit 78e377cf9d
2 changed files with 121 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST niri-25.05.1-vendored-dependencies.tar.xz 48884152 BLAKE2B 210eff27af94a01d9058b98ae4a49fd730dabf1d571b7fc5c499522de52d84afaf2a52eabdc296f80bbcdaed15740839cbd1ae4d505f279e007b977135cfa1d1 SHA512 38a1448428c3bc16c238221b70a1df406b87acf72a513ad5f0babed2ac874ac11b88580e5c6a7f69a98354e20180e8a3c0f932ea35382a0254134d57578b199b
DIST niri-25.05.1.tar.gz 716558 BLAKE2B 012c44351e6fa0e8631b3c44243da119cd03eb41a5ab81c787961df9f3456acb73c3cbb3639d620d19d8111e954797965c2a1bf4b0b3657142e3a1ab77413d7d SHA512 63f6f6e651d2a399259354f5a80fd8815c2be9c1c6b7d5038c03d89fac5966596d0da8b36d83fa7ea85b192e77e0ddfcf40ee9244a2c44cd55776a7a3f54de35
DIST niri-25.08-vendored-dependencies.tar.xz 54415568 BLAKE2B 906523cab0fd96ebb47c179efe93d34013ea8afc0b94603016cddfcb5fc4947610a26597c416e209aea48de3b13f8fafab821bcbeb9489135d2d5f7240a63085 SHA512 9d192525d5e07bffda2bfc8a0d9329055f2c3fa4ebe6b2897ec3fe9b9a74e1364120411534902eaf509e970c92d4791e676466bb9bdd0b93d7e5c5892ed11ce6
DIST niri-25.08.tar.gz 810302 BLAKE2B 39758d4ba4ff721d71a116cba0b8cdcd9e1f0a024257885879b5dc31bf439e91109133cc1650f3bd2376a6f8437fb07b4ee137b0b4d8ace98a1397c6b64d74ea SHA512 d8a10bb726d2e79f695544130cc9f55b1ac0f76dd9a9fb1cafb16cd7934b29a4fecf88656a3bc46ab6140aef7d2c58ed87f3ba43dfe8882df50de997283f2292

View File

@@ -0,0 +1,119 @@
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( {18..20} )
RUST_MIN_VER="1.80.1"
# used for version string
export NIRI_BUILD_COMMIT="01be0e6"
inherit cargo llvm-r2 optfeature systemd
DESCRIPTION="Scrollable-tiling Wayland compositor"
HOMEPAGE="https://github.com/YaLTeR/niri"
SRC_URI="
https://github.com/YaLTeR/niri/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/YaLTeR/niri/releases/download/v${PV}/${P}-vendored-dependencies.tar.xz
"
LICENSE="GPL-3+"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD ISC MIT MPL-2.0
Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+dbus screencast systemd"
REQUIRED_USE="
screencast? ( dbus )
systemd? ( dbus )
"
DEPEND="
dev-libs/glib:2
dev-libs/libinput:=
dev-libs/wayland
<media-libs/libdisplay-info-0.3.0:=
media-libs/mesa
sys-auth/seatd:=
virtual/libudev:=
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
screencast? ( media-video/pipewire:= )
"
RDEPEND="
${DEPEND}
screencast? ( sys-apps/xdg-desktop-portal-gnome )
"
# libclang is required for bindgen
BDEPEND="
screencast? ( $(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}') )
"
ECARGO_VENDOR="${WORKDIR}/vendor"
QA_FLAGS_IGNORED="usr/bin/niri"
pkg_setup() {
llvm-r2_pkg_setup
rust_pkg_setup
}
src_prepare() {
sed -i 's/git = "[^ ]*"/version = "*"/' Cargo.toml || die
# niri-session doesn't work on OpenRC
if ! use systemd; then
sed -i 's/niri-session/niri --session/' resources/niri.desktop || die
fi
default
}
src_configure() {
local myfeatures=(
$(usev dbus)
$(usev screencast xdp-gnome-screencast)
$(usev systemd)
)
cargo_src_configure --no-default-features
}
src_install() {
cargo_src_install
dobin resources/niri-session
systemd_douserunit resources/niri{.service,-shutdown.target}
insinto /usr/share/wayland-sessions
doins resources/niri.desktop
insinto /usr/share/xdg-desktop-portal
doins resources/niri-portals.conf
}
src_test() {
# tests create a wayland socket in the xdg runtime dir
local -x XDG_RUNTIME_DIR="${T}/xdg"
mkdir "${XDG_RUNTIME_DIR}" || die
chmod 0700 "${XDG_RUNTIME_DIR}" || die
# bug 950626
# https://github.com/YaLTeR/niri/blob/main/wiki/Packaging-niri.md#running-tests
local -x RAYON_NUM_THREADS=2
local skip=(
# requires surfacesless EGL to be available
--skip=::egl
)
cargo_src_test -- --test-threads=2 "${skip[@]}"
}
pkg_postinst() {
optfeature "Default application launcher" "gui-apps/fuzzel"
optfeature "Default status bar" "gui-apps/waybar"
optfeature "Default terminal" "x11-terms/alacritty"
optfeature "Xwayland support" "gui-apps/xwayland-satellite"
}