* [gentoo-commits] repo/proj/guru:dev commit in: media-sound/deep-filter/files/, media-sound/deep-filter/
@ 2025-01-02 4:22 Ryan Li
0 siblings, 0 replies; 2+ messages in thread
From: Ryan Li @ 2025-01-02 4:22 UTC (permalink / raw
To: gentoo-commits
commit: 66e6d2375da4e9c55a8745ca4afc174dcadbf135
Author: Ryan Li <ryanli <AT> ryanli <DOT> org>
AuthorDate: Thu Jan 2 04:21:38 2025 +0000
Commit: Ryan Li <ryanli <AT> ryanli <DOT> org>
CommitDate: Thu Jan 2 04:21:38 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=66e6d237
media-sound/deep-filter: add ladspa use flag and ignore Tinderbox QA0017.
Ignoring QA0017 as this is a Rust project.
Closes: https://bugs.gentoo.org/947322
Signed-off-by: Ryan Li <ryanli <AT> ryanli.org>
...er-0.5.6.ebuild => deep-filter-0.5.6-r1.ebuild} | 35 +++++++++++++++++-----
.../files/deep-filter-library-path.patch | 26 ++++++++++++++++
2 files changed, 54 insertions(+), 7 deletions(-)
diff --git a/media-sound/deep-filter/deep-filter-0.5.6.ebuild b/media-sound/deep-filter/deep-filter-0.5.6-r1.ebuild
similarity index 93%
rename from media-sound/deep-filter/deep-filter-0.5.6.ebuild
rename to media-sound/deep-filter/deep-filter-0.5.6-r1.ebuild
index e99ec17a4..c0269b505 100644
--- a/media-sound/deep-filter/deep-filter-0.5.6.ebuild
+++ b/media-sound/deep-filter/deep-filter-0.5.6-r1.ebuild
@@ -546,7 +546,8 @@ SRC_URI+=" ${CARGO_CRATE_URIS}"
S=${WORKDIR}/DeepFilterNet-${PV}
PATCHES=(
- "${FILESDIR}/${PN}-${PV}-use-updated-time.patch"
+ "${FILESDIR}/${PN}-library-path.patch"
+ "${FILESDIR}/${PN}-0.5.6-use-updated-time.patch"
)
LICENSE="|| ( Apache-2.0 MIT )"
@@ -559,24 +560,44 @@ LICENSE+="
SLOT="0"
KEYWORDS="~amd64"
+IUSE="ladspa"
DEPEND="
sci-libs/hdf5
"
+BDEPEND="
+ ladspa? ( dev-util/patchelf )
+"
+
+QA_FLAGS_IGNORED="usr/bin/deep-filter"
+
src_configure() {
- pushd libDF >/dev/null || die
local myfeatures=(
bin
tract
transforms
wav-utils
)
- cargo_src_configure --offline --no-default-features --bin deep-filter
- popd >/dev/null || die
+ local projects=(-p deep_filter)
+ if use ladspa; then
+ projects+=(-p deep-filter-ladspa)
+ fi
+ cargo_src_configure "${projects[@]}" --offline --no-default-features --bin deep-filter --lib
+}
+
+src_compile() {
+ cargo_src_compile
+ if use ladspa; then
+ patchelf --set-soname libdeep_filter_ladspa.so "$(cargo_target_dir)"/libdeep_filter_ladspa.so
+ fi
}
src_install() {
- pushd libDF >/dev/null || die
- cargo_src_install
- popd >/dev/null || die
+ dobin "$(cargo_target_dir)"/deep-filter
+ if use ladspa; then
+ dolib.so "$(cargo_target_dir)"/libdeep_filter_ladspa.so
+
+ insinto "/usr/share/${PN}"
+ doins -r ladspa/filter-chain-configs
+ fi
}
diff --git a/media-sound/deep-filter/files/deep-filter-library-path.patch b/media-sound/deep-filter/files/deep-filter-library-path.patch
new file mode 100644
index 000000000..0f308700a
--- /dev/null
+++ b/media-sound/deep-filter/files/deep-filter-library-path.patch
@@ -0,0 +1,26 @@
+diff --git a/ladspa/filter-chain-configs/deepfilter-mono-source.conf b/ladspa/filter-chain-configs/deepfilter-mono-source.conf
+index e0879b1..9725998 100644
+--- a/ladspa/filter-chain-configs/deepfilter-mono-source.conf
++++ b/ladspa/filter-chain-configs/deepfilter-mono-source.conf
+@@ -32,7 +32,7 @@ context.modules = [
+ {
+ type = ladspa
+ name = "DeepFilter Mono"
+- plugin = /usr/lib/ladspa/libdeep_filter_ladspa.so
++ plugin = /usr/lib64/libdeep_filter_ladspa.so
+ label = deep_filter_mono
+ control = {
+ "Attenuation Limit (dB)" 100
+diff --git a/ladspa/filter-chain-configs/deepfilter-stereo-sink.conf b/ladspa/filter-chain-configs/deepfilter-stereo-sink.conf
+index 5576561..3d170ca 100644
+--- a/ladspa/filter-chain-configs/deepfilter-stereo-sink.conf
++++ b/ladspa/filter-chain-configs/deepfilter-stereo-sink.conf
+@@ -35,7 +35,7 @@ context.modules = [
+ {
+ type = ladspa
+ name = "DeepFilter Stereo"
+- plugin = /usr/lib/ladspa/libdeep_filter_ladspa.so
++ plugin = /usr/lib64/libdeep_filter_ladspa.so
+ label = deep_filter_stereo
+ control = {
+ "Attenuation Limit (dB)" 100
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: media-sound/deep-filter/files/, media-sound/deep-filter/
@ 2025-01-19 10:03 Ryan Li
0 siblings, 0 replies; 2+ messages in thread
From: Ryan Li @ 2025-01-19 10:03 UTC (permalink / raw
To: gentoo-commits
commit: 5c222b6b974340d45db029cf46f57f25b9094a5c
Author: Ryan Li <ryanli <AT> ryanli <DOT> org>
AuthorDate: Sun Jan 19 10:02:22 2025 +0000
Commit: Ryan Li <ryanli <AT> ryanli <DOT> org>
CommitDate: Sun Jan 19 10:02:22 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c222b6b
media-sound/deep-filter: Fix package test by adding dependencies.
Closes: https://bugs.gentoo.org/947386
Signed-off-by: Ryan Li <ryanli <AT> ryanli.org>
...0.5.6-r1.ebuild => deep-filter-0.5.6-r2.ebuild} | 1 +
.../deep-filter/files/deep-filter-test-deps.patch | 43 ++++++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/media-sound/deep-filter/deep-filter-0.5.6-r1.ebuild b/media-sound/deep-filter/deep-filter-0.5.6-r2.ebuild
similarity index 99%
rename from media-sound/deep-filter/deep-filter-0.5.6-r1.ebuild
rename to media-sound/deep-filter/deep-filter-0.5.6-r2.ebuild
index c0269b505..1788fcf66 100644
--- a/media-sound/deep-filter/deep-filter-0.5.6-r1.ebuild
+++ b/media-sound/deep-filter/deep-filter-0.5.6-r2.ebuild
@@ -547,6 +547,7 @@ S=${WORKDIR}/DeepFilterNet-${PV}
PATCHES=(
"${FILESDIR}/${PN}-library-path.patch"
+ "${FILESDIR}/${PN}-test-deps.patch"
"${FILESDIR}/${PN}-0.5.6-use-updated-time.patch"
)
diff --git a/media-sound/deep-filter/files/deep-filter-test-deps.patch b/media-sound/deep-filter/files/deep-filter-test-deps.patch
new file mode 100644
index 000000000..83dde6fb3
--- /dev/null
+++ b/media-sound/deep-filter/files/deep-filter-test-deps.patch
@@ -0,0 +1,43 @@
+diff --git a/libDF/Cargo.toml b/libDF/Cargo.toml
+index 3f30115..35ee53c 100644
+--- a/libDF/Cargo.toml
++++ b/libDF/Cargo.toml
+@@ -31,7 +31,13 @@ required-features = ["bin", "tract", "wav-utils", "transforms"]
+ [features]
+ default = ["default-model", "vorbis", "flac"]
+
+-transforms = ["dep:thiserror", "dep:ndarray", "dep:rubato"]
++transforms = [
++ "wav-utils",
++ "dep:thiserror",
++ "dep:ndarray",
++ "dep:rubato",
++]
++
+ dataset = [
+ "dep:thiserror",
+ "dep:ndarray",
+@@ -125,6 +131,8 @@ rand = "0.8"
+ rstest = "0.17"
+ env_logger = "0.10"
+ log = { version = "0.4", features = ["std"] }
++rand_xoshiro = "0.6"
++crossbeam-channel = "^0.5"
+
+ [package.metadata.capi.header]
+ name = "deep_filter"
+diff --git a/libDF/src/lib.rs b/libDF/src/lib.rs
+index bac7f48..e9b9b4d 100644
+--- a/libDF/src/lib.rs
++++ b/libDF/src/lib.rs
+@@ -14,6 +14,10 @@ pub const UNIT_NORM_INIT: [f32; 2] = [0.001, 0.0001];
+
+ #[cfg(any(feature = "transforms", feature = "dataset"))]
+ pub mod transforms;
++
++#[cfg(all(feature = "transforms", test))]
++pub mod util;
++
+ #[cfg(feature = "dataset")]
+ #[path = ""]
+ mod reexport_dataset_modules {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-19 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-19 10:03 [gentoo-commits] repo/proj/guru:dev commit in: media-sound/deep-filter/files/, media-sound/deep-filter/ Ryan Li
-- strict thread matches above, loose matches on Subject: below --
2025-01-02 4:22 Ryan Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox