From 922fd42281d7a4bdab53199baa7e96e93c1bff5a Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Thu, 16 Dec 2021 15:31:57 +0100 Subject: media-video/vidify: patch for python 3.10 and vlc Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan --- .../vidify/files/vidify-2.2.6-python310.patch | 16 +++++ media-video/vidify/vidify-2.2.6-r1.ebuild | 81 --------------------- media-video/vidify/vidify-2.2.6-r2.ebuild | 84 ++++++++++++++++++++++ 3 files changed, 100 insertions(+), 81 deletions(-) create mode 100644 media-video/vidify/files/vidify-2.2.6-python310.patch delete mode 100644 media-video/vidify/vidify-2.2.6-r1.ebuild create mode 100644 media-video/vidify/vidify-2.2.6-r2.ebuild (limited to 'media-video') diff --git a/media-video/vidify/files/vidify-2.2.6-python310.patch b/media-video/vidify/files/vidify-2.2.6-python310.patch new file mode 100644 index 000000000000..4b78ea559333 --- /dev/null +++ b/media-video/vidify/files/vidify-2.2.6-python310.patch @@ -0,0 +1,16 @@ +diff --git a/vidify/player/vlc.py b/vidify/player/vlc.py +index a7c9ec0..cb50f89 100644 +--- a/vidify/player/vlc.py ++++ b/vidify/player/vlc.py +@@ -75,9 +75,9 @@ class VLCPlayer(PlayerBase): + def start_video(self, media: str, is_playing: bool = True) -> None: + logging.info("Starting new video") + if CURRENT_PLATFORM in (Platform.LINUX, Platform.BSD): +- self._player.set_xwindow(self.winId()) ++ self._player.set_xwindow(int(self.winId())) + elif CURRENT_PLATFORM == Platform.WINDOWS: +- self._player.set_hwnd(self.winId()) ++ self._player.set_hwnd(int(self.winId())) + elif CURRENT_PLATFORM == Platform.MACOS: + self._player.set_nsobject(int(self.winId())) + diff --git a/media-video/vidify/vidify-2.2.6-r1.ebuild b/media-video/vidify/vidify-2.2.6-r1.ebuild deleted file mode 100644 index ae5d74063584..000000000000 --- a/media-video/vidify/vidify-2.2.6-r1.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} ) - -inherit xdg distutils-r1 optfeature virtualx - -DESCRIPTION="Watch music videos in real time for the songs playing on your device" -HOMEPAGE="https://vidify.org" -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="LGPL-3" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="dbus vlc mpv zeroconf" - -REQUIRED_USE="|| ( vlc mpv zeroconf )" - -RDEPEND=" - dev-python/appdirs[${PYTHON_USEDEP}] - dev-python/QtPy[gui,webengine,${PYTHON_USEDEP}] - net-misc/lyricwikia[${PYTHON_USEDEP}] - net-misc/yt-dlp[${PYTHON_USEDEP}] - dbus? ( dev-python/pydbus[${PYTHON_USEDEP}] ) - !dbus? ( dev-python/tekore[${PYTHON_USEDEP}] ) - mpv? ( dev-python/python-mpv[${PYTHON_USEDEP}] ) - vlc? ( dev-python/python-vlc[${PYTHON_USEDEP}] ) - zeroconf? ( dev-python/zeroconf[${PYTHON_USEDEP}] ) -" - -# use yt-dlp instead of youtube-dl, otherwise download is too slow for playback -PATCHES=( "${FILESDIR}/${P}-yt-dlp.patch" ) - -distutils_enable_tests unittest - -python_prepare_all() { - # skip online test - rm tests/api/test_spotify_web.py || die - rm tests/player/test_external.py || die - - # this needs dbus and a player running - rm tests/api/test_mpris.py || die - - # can't parse non-existent config - rm tests/test_api_and_player_data.py || die - - # do not hard depend on this - sed -i \ - -e '/qdarkstyle/d' \ - -e '/python-vlc/d' \ - -e '/python-mpv/d' \ - -e '/pydbus/d' \ - -e '/tekore/d' \ - -e '/zeroconf/d' \ - -e '/If PySide2 is installed and PyQt5/,/PyQtWebEngine/d' \ - setup.py || die - - distutils-r1_python_prepare_all -} - -python_test() { - virtx "${EPYTHON}" -m unittest discover -v -} - -pkg_postinst() { - xdg_pkg_postinst - - elog "If video playback is not working please check 'vidify --debug' for missing-codec-errors" - elog "and recompile media-video/vlc or media-video/mpv with the missing codecs" - - optfeature "using an MPRIS(D-Bus) audio player (e.g spotify)" dev-python/pydbus - optfeature "using the Spotify Web API as audio player" dev-python/tekore - optfeature "using an external network player" dev-python/zeroconf - optfeature "using media-video/mpv for video playback" dev-python/python-mpv - optfeature "using media-video/vlc for video playback" dev-python/python-vlc - optfeature "'vidify --dark-mode'" dev-python/qdarkstyle - optfeature "'vidify --audiosync'" media-video/vidify-audiosync -} diff --git a/media-video/vidify/vidify-2.2.6-r2.ebuild b/media-video/vidify/vidify-2.2.6-r2.ebuild new file mode 100644 index 000000000000..fe640744473d --- /dev/null +++ b/media-video/vidify/vidify-2.2.6-r2.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit xdg distutils-r1 optfeature virtualx + +DESCRIPTION="Watch music videos in real time for the songs playing on your device" +HOMEPAGE="https://vidify.org" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="dbus vlc mpv zeroconf" + +REQUIRED_USE="|| ( vlc mpv zeroconf )" + +RDEPEND=" + dev-python/appdirs[${PYTHON_USEDEP}] + dev-python/QtPy[gui,webengine,${PYTHON_USEDEP}] + net-misc/lyricwikia[${PYTHON_USEDEP}] + net-misc/yt-dlp[${PYTHON_USEDEP}] + dbus? ( dev-python/pydbus[${PYTHON_USEDEP}] ) + !dbus? ( dev-python/tekore[${PYTHON_USEDEP}] ) + mpv? ( dev-python/python-mpv[${PYTHON_USEDEP}] ) + vlc? ( dev-python/python-vlc[${PYTHON_USEDEP}] ) + zeroconf? ( dev-python/zeroconf[${PYTHON_USEDEP}] ) +" + +# use yt-dlp instead of youtube-dl, otherwise download is too slow for playback +PATCHES=( + "${FILESDIR}/${P}-yt-dlp.patch" + "${FILESDIR}/${P}-python310.patch" +) + +distutils_enable_tests unittest + +python_prepare_all() { + # skip online test + rm tests/api/test_spotify_web.py || die + rm tests/player/test_external.py || die + + # this needs dbus and a player running + rm tests/api/test_mpris.py || die + + # can't parse non-existent config + rm tests/test_api_and_player_data.py || die + + # do not hard depend on this + sed -i \ + -e '/qdarkstyle/d' \ + -e '/python-vlc/d' \ + -e '/python-mpv/d' \ + -e '/pydbus/d' \ + -e '/tekore/d' \ + -e '/zeroconf/d' \ + -e '/If PySide2 is installed and PyQt5/,/PyQtWebEngine/d' \ + setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + virtx "${EPYTHON}" -m unittest discover -v +} + +pkg_postinst() { + xdg_pkg_postinst + + elog "If video playback is not working please check 'vidify --debug' for missing-codec-errors" + elog "and recompile media-video/vlc or media-video/mpv with the missing codecs" + + optfeature "using an MPRIS(D-Bus) audio player (e.g spotify)" dev-python/pydbus + optfeature "using the Spotify Web API as audio player" dev-python/tekore + optfeature "using an external network player" dev-python/zeroconf + optfeature "using media-video/mpv for video playback" dev-python/python-mpv + optfeature "using media-video/vlc for video playback" dev-python/python-vlc + optfeature "'vidify --dark-mode'" dev-python/qdarkstyle + optfeature "'vidify --audiosync'" media-video/vidify-audiosync +} -- cgit v1.2.3-65-gdbad