commit:     7e6e9262618f9a4d65e3decd18c3e4dc834b4095
Author:     Jonas Frei <freijon <AT> pm <DOT> me>
AuthorDate: Thu Sep 25 03:26:42 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Sep 25 03:35:34 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7e6e9262

gui-apps/espanso: add 2.2.7

Signed-off-by: Jonas Frei <freijon <AT> pm.me>

 gui-apps/espanso/Manifest             |  2 +
 gui-apps/espanso/espanso-2.2.7.ebuild | 80 +++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/gui-apps/espanso/Manifest b/gui-apps/espanso/Manifest
index 845c6c54b9..8f8bcb96f4 100644
--- a/gui-apps/espanso/Manifest
+++ b/gui-apps/espanso/Manifest
@@ -1,2 +1,4 @@
 DIST espanso-2.2.5-crates.tar.xz 35677948 BLAKE2B 
bf5971ec46e760eb1a748d87fa1c39efef02b3609fb0c48c23768f3511dcafffb2cf4e94956c3899097b22403440227ad534bc0c3f7e8ff5ab9739ef029f0032
 SHA512 
97d196a9a1c0b85a7e8c78a4a332693a912a03cdecc1897e8eeea1b4d14e9f9da82d9d82fc61c0134f48a3140538569689cfe0e0594945662e2339a5d8dc0d12
 DIST espanso-2.2.5.tar.gz 71744103 BLAKE2B 
76cfdabc8c71e713afeb2832287cffa54ec7f598eeed9aca62166df4739c553b2a742854a9d24fb2a688e576d6f6e68866d38784bcccef0af2afaf07a5da6962
 SHA512 
7b6f0afb7da3e6841afa932b8ce3f1d60183da14f44c0d4fda150f41a618ff74306b9df49d705effebe290e6f681366dce67f7d61eaa12fd48d4509dbd9a910c
+DIST espanso-2.2.7-crates.tar.xz 35661508 BLAKE2B 
6178fd0a7f715efb2b622059610e8a5baea2605d8d2f4b7345c6cd5bd08b86f9449a409a7c510c9ee8acd59c19a30c9c3577fd62c8897e97d79a96b535ac9295
 SHA512 
0f7dfb3e3defb06c0396c5d93b9cb36a7467240ffaedd4d80c777757eedff43a9aba7560f575c2650333ddc67e6ad6ab8b5309cfc67cc9f9ad319237b58a1136
+DIST espanso-2.2.7.tar.gz 71744574 BLAKE2B 
7cfb70f8a10d10f6286881c554be41471ca1d4245ec2cea07d9e82615f2a774d8d09188d3930df8f123cd30cfd5d9e56640ecf0e1a65b430c3e1196c39fba955
 SHA512 
0c544a584b28142955e4852583ea1f6e50a8d2aa6393266b8f9c6179038ca579a894f659ebc0fc55e5755904d2cbabe9bb6102f8b02e04ba2aa6bea0ee413042

diff --git a/gui-apps/espanso/espanso-2.2.7.ebuild 
b/gui-apps/espanso/espanso-2.2.7.ebuild
new file mode 100644
index 0000000000..a96864674d
--- /dev/null
+++ b/gui-apps/espanso/espanso-2.2.7.ebuild
@@ -0,0 +1,80 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+RUST_MIN_VER="1.77.0"
+
+inherit cargo desktop fcaps linux-info systemd xdg
+
+DESCRIPTION="Cross-platform Text Expander written in Rust"
+HOMEPAGE="https://espanso.org";
+SRC_URI="https://github.com/espanso/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+DEPS_URI="https://github.com/freijon/${PN}/releases/download/v${PV}/${P}-crates.tar.xz";
+SRC_URI+=" ${DEPS_URI}"
+
+LICENSE="GPL-3"
+# Dependent crate licenses
+LICENSE+=" Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MPL-2.0 ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="wayland"
+
+DEPEND="
+       acct-group/input
+       dev-libs/openssl
+       sys-apps/dbus
+       x11-libs/wxGTK
+       wayland? (
+               x11-libs/libxkbcommon[wayland]
+       )
+       !wayland? (
+               x11-libs/libX11
+               x11-libs/libxcb
+               x11-libs/libXtst
+               x11-libs/libxkbcommon[X]
+       )
+"
+RDEPEND="${DEPEND}"
+
+QA_FLAGS_IGNORED="usr/bin/${PN}"
+
+pkg_setup() {
+       CONFIG_CHECK="~INPUT_UINPUT"
+       ERROR_INPUT_UINPUT="Espanso with Wayland needs the UINPUT"
+       ERROR_INPUT_UINPUT+=" input device driver to detect user inputs. 
Without it,"
+       ERROR_INPUT_UINPUT+=" Espanso will not work as intended"
+
+       # Now do the actual checks setup above, but only when using wayland
+       use wayland && linux-info_pkg_setup
+       rust_pkg_setup
+}
+
+src_configure() {
+       local myfeatures=(
+               modulo
+               native-tls
+               $(usev wayland)
+       )
+       cargo_src_configure --verbose --no-default-features
+}
+
+src_compile() {
+       cargo_src_compile -p "${PN}"
+}
+
+src_install() {
+       cargo_src_install --path "${PN}"
+
+       newicon -s 128 "espanso/src/res/linux/icon.png" "${PN}.png"
+       domenu "espanso/src/res/linux/${PN}.desktop"
+
+       # install the systemd-service (user level)
+       sed -i "s|{{{espanso_path}}}|/usr/bin/espanso|g" 
"espanso/src/res/linux/systemd.service" || die
+       systemd_newuserunit "espanso/src/res/linux/systemd.service" 
"${PN}.service"
+}
+
+pkg_postinst() {
+       # See 
https://espanso.org/docs/install/linux/#adding-the-required-capabilities
+       use wayland && fcaps cap_dac_override "usr/bin/${PN}"
+}

Reply via email to