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@ryanli.org>
This commit is contained in:
Ryan Li
2025-01-02 12:21:38 +08:00
parent a131141ac1
commit 66e6d2375d
2 changed files with 54 additions and 7 deletions

View File

@@ -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
}

View File

@@ -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