mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 04:53:07 -04:00
gui-wm/niri: add 26.04
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
DIST niri-25.11-vendored-dependencies.tar.xz 56722340 BLAKE2B ffcdc71c03b7c5fb64640f92f19ed6cccedb44c68eb10a0952e70f2190182eb492d10052bdfef2ae1c8d677c8611bd4dce51df6c8dfa1eb825861cf2f21653b0 SHA512 6dda3f5e303e3488feffe9d406a2cd9f2d1175697b5d44702906603cc9f9fe412fd3639da50e42a238222b8ef2910d61032fb04fb9c12b2cad7aa325a1a63479
|
||||
DIST niri-25.11.tar.gz 915604 BLAKE2B 1ae432534044bbc4ab34d30d1c52e2f90e0391e5d04611c1b7ec60ccb1ba6fe87ff4c28f82de26d8eee2c839deb37c8096deec2ee7819884a23bfa4f3746c147 SHA512 88adbfc1b993d692e981d811dbfcb0898fefbc184c5659a14b4f61cf9e1dcf5c9eb100e68807710ed9ed89799277fafbecf9fc3057c41d93c19dbaf96350a697
|
||||
DIST niri-26.04-vendored-dependencies.tar.xz 40263284 BLAKE2B 1697516cb3bcc7da314b510e7c3bf816a6d959c2ef2a5f5f883450128f95533ec4c5ec4638442a0c21816dce900af0669db2ad98736951dde3b036c4d2abba61 SHA512 73bdef95320b416b8f51b4dd0dc50c4e48a8724481312ffaf2f8248ef52e66b6d6699cc6b07b849f330c3954c5d3f41248917d31624c15b9d30fe274dad38d35
|
||||
DIST niri-26.04.tar.gz 967630 BLAKE2B 65fc4df85ab40c1a7a82900a9812c542a8a00467a0f1742f2dede50c0e323bd8957149e91b181a6c71ad077735f6a4db53451bbad0deb768f7d4840ebe798a20 SHA512 ae30446fbf529155907726cf2cba7402bcfc5be2032370d66f9f980efb257f29353b47d495f1218b81ac32c643f15bbb74834dc35882849a4479021b4b9fa97f
|
||||
|
||||
156
gui-wm/niri/niri-26.04.ebuild
Normal file
156
gui-wm/niri/niri-26.04.ebuild
Normal file
@@ -0,0 +1,156 @@
|
||||
# Copyright 2024-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
"
|
||||
|
||||
LLVM_COMPAT=( {19..22} )
|
||||
RUST_MIN_VER="1.87.0"
|
||||
|
||||
inherit cargo llvm-r2 optfeature shell-completion systemd
|
||||
|
||||
DESCRIPTION="Scrollable-tiling Wayland compositor"
|
||||
HOMEPAGE="https://github.com/niri-wm/niri"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/niri-wm/niri.git"
|
||||
else
|
||||
SRC_URI="
|
||||
https://github.com/niri-wm/niri/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/niri-wm/niri/releases/download/v${PV}/${P}-vendored-dependencies.tar.xz
|
||||
${CARGO_CRATE_URIS}
|
||||
"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
# used for version string
|
||||
export NIRI_BUILD_COMMIT="8ed0da4"
|
||||
fi
|
||||
|
||||
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"
|
||||
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.4.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_unpack() {
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
cargo_live_src_unpack
|
||||
else
|
||||
cargo_src_unpack
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e 's/git = "[^ ]*"/version = "*"/' \
|
||||
-e '/rev =/d' \
|
||||
Cargo.toml || die
|
||||
# niri-session doesn't work on OpenRC
|
||||
if ! use systemd; then
|
||||
local cmd="niri --session"
|
||||
use dbus && cmd="dbus-run-session $cmd"
|
||||
sed -i "s/niri-session/$cmd/" 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_compile() {
|
||||
cargo_src_compile
|
||||
|
||||
"$(cargo_target_dir)"/niri completions bash > niri || die
|
||||
"$(cargo_target_dir)"/niri completions fish > niri.fish || die
|
||||
"$(cargo_target_dir)"/niri completions zsh > _niri || die
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
dobashcomp niri
|
||||
dofishcomp niri.fish
|
||||
dozshcomp _niri
|
||||
}
|
||||
|
||||
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://yalter.github.io/niri/Packaging-niri.html#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 "Xwayland support" "gui-apps/xwayland-satellite"
|
||||
optfeature_header "Default applications"
|
||||
optfeature "Application launcher" "gui-apps/fuzzel"
|
||||
optfeature "Status bar" "gui-apps/waybar"
|
||||
optfeature "Terminal" "x11-terms/alacritty"
|
||||
}
|
||||
@@ -6,8 +6,8 @@ EAPI=8
|
||||
CRATES="
|
||||
"
|
||||
|
||||
LLVM_COMPAT=( {18..21} )
|
||||
RUST_MIN_VER="1.82.0"
|
||||
LLVM_COMPAT=( {19..22} )
|
||||
RUST_MIN_VER="1.87.0"
|
||||
|
||||
inherit cargo llvm-r2 optfeature shell-completion systemd
|
||||
|
||||
@@ -26,7 +26,7 @@ else
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
# used for version string
|
||||
export NIRI_BUILD_COMMIT="b35bcae"
|
||||
export NIRI_BUILD_COMMIT="8ed0da4"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
@@ -84,7 +84,10 @@ src_unpack() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -i 's/git = "[^ ]*"/version = "*"/' Cargo.toml || die
|
||||
sed -i \
|
||||
-e 's/git = "[^ ]*"/version = "*"/' \
|
||||
-e '/rev =/d' \
|
||||
Cargo.toml || die
|
||||
# niri-session doesn't work on OpenRC
|
||||
if ! use systemd; then
|
||||
local cmd="niri --session"
|
||||
|
||||
Reference in New Issue
Block a user