Diff utop-2.12.1 with a sof-firmware-2025.01

/usr/portage/sys-firmware/sof-firmware/sof-firmware-2025.01.ebuild 2025-07-29 16:22:17.920470175 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2025 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
inherit dune elisp-common
7

  
8
DESCRIPTION="Universal toplevel for OCaml"
9
HOMEPAGE="https://github.com/ocaml-community/utop"
10
SRC_URI="https://github.com/ocaml-community/utop/archive/${PV}.tar.gz -> ${P}.tar.gz"
6
DESCRIPTION="Sound Open Firmware (SOF) binary files"
7
HOMEPAGE="https://www.sofproject.org https://github.com/thesofproject/sof https://github.com/thesofproject/sof-bin"
8
SRC_URI="https://github.com/thesofproject/sof-bin/releases/download/v${PV}/sof-bin-${PV}.tar.gz -> ${P}.tar.gz"
9
S="${WORKDIR}"/sof-bin-${PV}
11 10

  
12 11
LICENSE="BSD"
13
SLOT="0/${PV}"
14
KEYWORDS="~amd64 ~x86"
15
IUSE="emacs +ocamlopt"
16

  
17
ELISP_DEPEND="
18
	emacs? (
19
		>=app-editors/emacs-24:*
20
		>=app-emacs/tuareg-mode-2.2.0
21
	)
22
"
23
DEPEND="
24
	dev-ml/lambda-term:=
25
	dev-ml/logs:=
26
	dev-ml/lwt:=
27
	dev-ml/react:=
28
	dev-ml/zed:=
29
"
12
SLOT="0"
13
KEYWORDS="amd64"
14
IUSE="+tools"
15

  
30 16
RDEPEND="
31
	${DEPEND}
32
	${ELISP_DEPEND}
33
"
34
BDEPEND="
35
	dev-ml/cppo
36
	dev-ml/findlib
37
	${ELISP_DEPEND}
17
	tools? (
18
		media-libs/alsa-lib
19
		sys-libs/glibc
20
	)
38 21
"
39 22

  
40
SITEFILE="50${PN}-gentoo.el"
41

  
42
src_compile() {
43
	dune_src_compile
44

  
45
	use emacs &&
46
		BYTECOMPFLAGS="-L src/top" elisp-compile src/top/*.el
47
}
23
QA_PREBUILT="usr/bin/sof-ctl
24
	usr/bin/sof-logger
25
	usr/bin/sof-probes"
48 26

  
49 27
src_install() {
50
	dune_src_install
51

  
52
	if use emacs ; then
53
		elisp-install ${PN} src/top/*.el{,c}
54
		elisp-site-file-install "${FILESDIR}/${SITEFILE}"
28
	dodir /lib/firmware/intel
29
	dodir /usr/bin
30
	FW_DEST="${D}/lib/firmware/intel" TOOLS_DEST="${D}/usr/bin" "${S}/install.sh" || die
31

  
32
	# Drop tools if requested (i.e. useful for musl systems, where glibc
33
	# is not available)
34
	if ! use tools ; then
35
		rm -rv "${D}"/usr/bin || die
55 36
	fi
56 37
}
57 38

  
58
pkg_postinst() {
59
	use emacs && elisp-site-regen
60
}
61

  
62
pkg_postrm() {
63
	use emacs && elisp-site-regen
39
pkg_preinst() {
40
	# Fix sof-ace-tplg directory symlink collisions
41
	local sofpath="${EROOT}/lib/firmware/intel/sof-ace-tplg"
42
	if [[ ! -L "${sofpath}" && -d "${sofpath}" ]] ; then
43
		rm -r "${sofpath}" || die
44
	fi
64 45
}
Thank you!