commit:     c267e3c5a8f22262ca188989ca31e455e4b3c11c
Author:     Pavel Sobolev <contact <AT> paveloom <DOT> dev>
AuthorDate: Mon Aug 11 08:14:07 2025 +0000
Commit:     Pavel Sobolev <contact <AT> paveloom <DOT> dev>
CommitDate: Mon Aug 11 09:16:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c267e3c5

media-sound/mousai: new package, add 0.7.8

Signed-off-by: Pavel Sobolev <contact <AT> paveloom.dev>

 media-sound/mousai/Manifest                        |  2 +
 ...mousai-0.7.8-remove-the-cargo-clippy-test.patch | 29 +++++++++
 .../files/mousai-0.7.8-skip-failing-tests.patch    | 34 +++++++++++
 media-sound/mousai/metadata.xml                    | 12 ++++
 media-sound/mousai/mousai-0.7.8.ebuild             | 69 ++++++++++++++++++++++
 5 files changed, 146 insertions(+)

diff --git a/media-sound/mousai/Manifest b/media-sound/mousai/Manifest
new file mode 100644
index 0000000000..30afb74114
--- /dev/null
+++ b/media-sound/mousai/Manifest
@@ -0,0 +1,2 @@
+DIST mousai-0.7.8-deps.tar.xz 22954832 BLAKE2B 
b01edef9cf6af87dc6dcda6eeb41a9490b98c363affe9fc9549aa3a2bb668d31c72315c1b5da0838aee01bead6fae05cd59323848564196c93f4f4cf9cef382a
 SHA512 
7222ae70e77e76a19941552a58cdf987876ef4a4b07ac3be74b23f5efd29a175ee504c8b509d33dc39f0b5dbd92d539950b226833bf28e435e15b895841f1245
+DIST mousai-0.7.8.tar.gz 1290718 BLAKE2B 
7863aa2e3f049bcec42831e34e0e127f903494f16fb023fd0baf85041374091788a1f5ee063f2788924811bd57b23361a92487e52ababa1e58fdb183af0ddcee
 SHA512 
41595d46cd804392f7b399511de480dc345f726f7493ab40e15266eec57c67670705c2786f9425ffcb64aad227760dae07a88a680f044c2de2ca192bc7bb6e16

diff --git 
a/media-sound/mousai/files/mousai-0.7.8-remove-the-cargo-clippy-test.patch 
b/media-sound/mousai/files/mousai-0.7.8-remove-the-cargo-clippy-test.patch
new file mode 100644
index 0000000000..6fd14c2436
--- /dev/null
+++ b/media-sound/mousai/files/mousai-0.7.8-remove-the-cargo-clippy-test.patch
@@ -0,0 +1,29 @@
+From: Pavel Sobolev <[email protected]>
+Subject: [PATCH] Remove the `cargo clippy` test.
+
+The "errors" are rather stylistic.
+
+Signed-off-by: Pavel Sobolev <[email protected]>
+
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -66,19 +66,3 @@ test(
+   ],
+   timeout: 300, # give cargo more time
+ )
+-
+-test(
+-  'cargo-clippy',
+-  cargo,
+-  args: [
+-    'clippy',
+-    cargo_options,
+-    '--',
+-    '-D',
+-    'warnings'
+-  ],
+-  env: [
+-    cargo_env
+-  ],
+-  timeout: 300, # give cargo more time
+-)

diff --git a/media-sound/mousai/files/mousai-0.7.8-skip-failing-tests.patch 
b/media-sound/mousai/files/mousai-0.7.8-skip-failing-tests.patch
new file mode 100644
index 0000000000..05c4a29630
--- /dev/null
+++ b/media-sound/mousai/files/mousai-0.7.8-skip-failing-tests.patch
@@ -0,0 +1,34 @@
+From: Pavel Sobolev <[email protected]>
+Subject: [PATCH] Skip failing tests.
+
+The "album_art" tests require network access. The rest expect the
+settings schema to be already installed. `RUST_TEST_THREADS=1` makes it
+so that the name of the currently running test is actually printed.
+
+Signed-off-by: Pavel Sobolev <[email protected]>
+
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -61,9 +61,22 @@ test(
+     cargo_options,
+     '--',
+     '--nocapture',
++    '--skip',
++    'album_art::test',
++    '--skip',
++    'recognizer::provider::settings::tests',
++    '--skip',
++    'song_filter::tests',
++    '--skip',
++    'song_list::test',
++    '--skip',
++    'song_sorter::tests::compare',
++    '--skip',
++    'window::history_view::test',
+   ],
+   env: [
+     'RUST_BACKTRACE=1',
++    'RUST_TEST_THREADS=1',
+     cargo_env
+   ],
+   timeout: 300, # give cargo more time

diff --git a/media-sound/mousai/metadata.xml b/media-sound/mousai/metadata.xml
new file mode 100644
index 0000000000..7ea5cf58aa
--- /dev/null
+++ b/media-sound/mousai/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Pavel Sobolev</name>
+  </maintainer>
+  <upstream>
+    <bugs-to>https://github.com/SeaDve/Mousai/issues</bugs-to>
+    <remote-id type="github">SeaDve/Mousai</remote-id>
+  </upstream>
+</pkgmetadata>

diff --git a/media-sound/mousai/mousai-0.7.8.ebuild 
b/media-sound/mousai/mousai-0.7.8.ebuild
new file mode 100644
index 0000000000..abeb1b8723
--- /dev/null
+++ b/media-sound/mousai/mousai-0.7.8.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cargo gnome2-utils meson xdg
+
+DESCRIPTION="Identify songs in seconds"
+HOMEPAGE="https://github.com/SeaDve/Mousai";
+SRC_URI="
+       https://github.com/SeaDve/Mousai/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz
+       
https://gitlab.com/api/v4/projects/69517529/packages/generic/${PN}/${PV}/${P}-deps.tar.xz
+"
+
+S="${WORKDIR}/Mousai-${PV}"
+
+LICENSE="Apache-2.0 BSD GPL-3+ MIT MPL-2.0 Unicode-DFS-2016"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-libs/glib:2
+       gui-libs/gtk:4
+       gui-libs/libadwaita:1
+       media-libs/gst-plugins-bad:1.0
+       media-libs/gst-plugins-base:1.0
+       media-libs/gstreamer:1.0
+       net-libs/libsoup:3.0
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       dev-libs/appstream
+       dev-libs/glib:2
+       dev-util/desktop-file-utils
+       dev-util/gtk-update-icon-cache
+       sys-devel/gettext
+
+       debug? ( dev-vcs/git )
+       test? ( dev-vcs/git )
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.7.8-remove-the-cargo-clippy-test.patch"
+       "${FILESDIR}/${PN}-0.7.8-skip-failing-tests.patch"
+)
+
+src_configure() {
+       local profile="default"
+       (use debug || use test) && profile="development"
+
+       local emesonargs=(
+               -Dprofile="$profile"
+       )
+       meson_src_configure
+
+       ln -s "${CARGO_HOME}" "${BUILD_DIR}/cargo-home" || die
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+       gnome2_schemas_update
+}
+
+pkg_postrm() {
+       xdg_pkg_postrm
+       gnome2_schemas_update
+}

Reply via email to