guru/mpv-plugin/mpv_thumbnail_script/mpv_thumbnail_script-0.5.3.ebuild
Anna (cybertailor) Vyalkova bb0aae8ad3
*/*: disable py3.10
Python 3.10 target is scheduled for removal in Gentoo:
https://public-inbox.gentoo.org/gentoo-dev/e6ca9f1f4ababb79ab2a3d005c39b483c3ecef6e.camel@gentoo.org/

Sphinx 8.2.0 already dropped support for CPython 3.10 and PyPy 3.10,
leading to multiple CI failures in ::guru.

We can safely remove this target, because GURU is "experimental" and
does not have stable keywords.

Let's not remove "pypy3" right now because
a) There are not many packages using it.
b) So we can see which packages supported PyPy 3.10, and test them with
   PyPy 3.11.

Closes: https://github.com/gentoo/guru/pull/291
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2025-02-21 17:51:14 +05:00

57 lines
1.4 KiB
Bash

# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MPV_REQ_USE="lua"
PYTHON_COMPAT=( python3_{11..12} )
inherit mpv-plugin python-any-r1
DESCRIPTION="A Lua script to show preview thumbnails in mpv's OSC seekbar"
HOMEPAGE="https://github.com/marzzzello/mpv_thumbnail_script"
SRC_URI="https://github.com/marzzzello/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
KEYWORDS="~amd64"
BDEPEND="
${PYTHON_DEPS}
"
MPV_PLUGIN_FILES=(
${PN}_client_osc.lua
${PN}_server.lua
)
src_compile() {
${EPYTHON} concat_files.py -r "cat_osc.json" || die
${EPYTHON} concat_files.py -r "cat_server.json" || die
}
src_install() {
mpv-plugin_src_install
# add multiple threads
THUMBNAIL_SERVER_THREADS="${THUMBNAIL_SERVER_THREADS:-1}"
if [[ "${THUMBNAIL_SERVER_THREADS}" -gt 1 ]]; then
i=1
while [[ ${i} -lt ${THUMBNAIL_SERVER_THREADS} ]]; do
dosym -r "/etc/mpv/scripts/mpv_thumbnail_script_server.lua" \
"/etc/mpv/scripts/mpv_thumbnail_script_server_${i}.lua" || die
(( i++ ))
done
fi
}
pkg_postinst(){
mpv-plugin_pkg_postinst
if [[ "${THUMBNAIL_SERVER_THREADS}" -gt 1 ]]; then
elog "Created a total of ${THUMBNAIL_SERVER_THREADS} server threads. Setting this too high is not recommended"
else
elog "You can create multiple thumbnailing threads by setting THUMBNAIL_SERVER_THREADS"
fi
}