sdrtrunk-bin: better fix: migrate to ffmpeg-compat and use only the latest version

This commit is contained in:
Anton Bolshakov 2026-05-05 20:33:34 +08:00
parent 6a2f14d811
commit 5a41e36f18
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
2 changed files with 67 additions and 4 deletions

View file

@ -0,0 +1,62 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Decode, monitor, record and stream trunked mobile and related radio protocols"
HOMEPAGE="https://github.com/DSheirer/sdrtrunk"
if [ "${PV}" = "9999" ]; then
MY_PV="nightly"
SRC_URI="https://github.com/DSheirer/sdrtrunk/releases/download/${MY_PV}/sdr-trunk-linux-x86_64-v${MY_PV}.zip"
else
BPV="${PV/_/-}"
MY_PV="${BPV/beta/beta-}"
SRC_URI="https://github.com/DSheirer/sdrtrunk/releases/download/v${MY_PV}/sdr-trunk-linux-x86_64-v${MY_PV}.zip"
fi
KEYWORDS="~amd64 ~x86"
LICENSE="GPL-3"
SLOT="0"
RDEPEND="virtual/jre:*
media-libs/alsa-lib
app-accessibility/at-spi2-core:2
dev-libs/glib:2
media-libs/fontconfig
media-libs/freetype
media-libs/libglvnd
media-video/ffmpeg-compat:7
sys-libs/zlib
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:2
x11-libs/gtk+:3
x11-libs/libX11
x11-libs/libXext
x11-libs/libXi
x11-libs/libXrender
x11-libs/libXtst
x11-libs/libXxf86vm
x11-libs/pango
!net-wireless/sdrtrunk
"
DEPEND="${RDEPEND}"
BDEPEND="app-arch/unzip"
S="${WORKDIR}/sdr-trunk-linux-x86_64-v${MY_PV}"
QA_PREBUILT="opt/sdrtrunk/bin/* opt/sdrtrunk/lib/*/* opt/sdrtrunk/lib/*"
QA_PRESTRIPPED="opt/sdrtrunk/lib/minimal/libjvm.so"
src_install() {
dodir /opt/sdrtrunk/
cp -R * "${ED}"/opt/sdrtrunk/
# Keep only libavplugin-ffmpeg-61.so (libavcodec.so.61, provided by ffmpeg-compat:7)
# Remove all other bundled VLC plugin stubs with unresolvable soname dependencies
find "${ED}"/opt/sdrtrunk/lib -name 'libavplugin*.so' \
! -name 'libavplugin-ffmpeg-61.so' -delete || die
dosym "../../${EPREFIX}"/opt/sdrtrunk/bin/sdr-trunk /usr/bin/sdr-trunk
}

View file

@ -25,7 +25,7 @@ RDEPEND="virtual/jre:*
media-libs/fontconfig
media-libs/freetype
media-libs/libglvnd
media-video/ffmpeg
media-video/ffmpeg-compat:7
sys-libs/zlib
x11-libs/cairo
x11-libs/gdk-pixbuf:2
@ -53,9 +53,10 @@ src_install() {
dodir /opt/sdrtrunk/
cp -R * "${ED}"/opt/sdrtrunk/
# Remove bundled VLC plugin stubs that reference obsolete ffmpeg sonames
# (libavcodec/libavformat versions 54/56/57) which cause QA SONAME failures
find "${ED}"/opt/sdrtrunk/lib -name 'libavplugin*.so' -delete || die
# Keep only libavplugin-ffmpeg-61.so (libavcodec.so.61, provided by ffmpeg-compat:7)
# Remove all other bundled VLC plugin stubs with unresolvable soname dependencies
find "${ED}"/opt/sdrtrunk/lib -name 'libavplugin*.so' \
! -name 'libavplugin-ffmpeg-61.so' -delete || die
dosym "../../${EPREFIX}"/opt/sdrtrunk/bin/sdr-trunk /usr/bin/sdr-trunk
}