diff options
-rw-r--r-- | sys-firmware/sof-firmware/metadata.xml | 3 | ||||
-rw-r--r-- | sys-firmware/sof-firmware/sof-firmware-2024.03.ebuild | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys-firmware/sof-firmware/metadata.xml b/sys-firmware/sof-firmware/metadata.xml index 6f44d28b9bc7..5933a501e2ec 100644 --- a/sys-firmware/sof-firmware/metadata.xml +++ b/sys-firmware/sof-firmware/metadata.xml @@ -7,6 +7,9 @@ <maintainer type="project"> <email>alsa-bugs@gentoo.org</email> </maintainer> + <use> + <flag name="tools">Tools to interact with sof firmwares (upstream expects them to be present, but allow to skip them for systems not able to install needed dependencies)</flag> + </use> <upstream> <remote-id type="github">thesofproject/sof</remote-id> </upstream> diff --git a/sys-firmware/sof-firmware/sof-firmware-2024.03.ebuild b/sys-firmware/sof-firmware/sof-firmware-2024.03.ebuild index ac48a808c83e..105eaae58f37 100644 --- a/sys-firmware/sof-firmware/sof-firmware-2024.03.ebuild +++ b/sys-firmware/sof-firmware/sof-firmware-2024.03.ebuild @@ -11,10 +11,13 @@ S="${WORKDIR}"/sof-bin-${PV} LICENSE="BSD" SLOT="0" KEYWORDS="~amd64" +IUSE="+tools" RDEPEND=" - media-libs/alsa-lib - sys-libs/glibc + tools? ( + media-libs/alsa-lib + sys-libs/glibc + ) " QA_PREBUILT="usr/bin/sof-ctl @@ -25,6 +28,12 @@ src_install() { dodir /lib/firmware/intel dodir /usr/bin FW_DEST="${D}/lib/firmware/intel" TOOLS_DEST="${D}/usr/bin" "${S}/install.sh" || die + + # Drop tools if requested (i.e. useful for musl systems, where glibc + # is not available) + if ! use tools ; then + rm -rv "${D}"/usr/bin || die + fi } pkg_preinst() { |