commit:     8fd3794e55c8782f342e6ac188c5218b195ae6ee
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Thu Apr  2 09:18:11 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Thu Apr  2 09:18:11 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8fd3794e

media-video/vidify: do not hardepend on everything

we can only use one video/audio player at the time
so there is no need to force the user to install
all the dependencies

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 media-video/vidify/metadata.xml        |  2 ++
 media-video/vidify/vidify-2.2.0.ebuild | 35 +++++++++++++++++++++++++---------
 2 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/media-video/vidify/metadata.xml b/media-video/vidify/metadata.xml
index 13b78b5..bb03a0b 100644
--- a/media-video/vidify/metadata.xml
+++ b/media-video/vidify/metadata.xml
@@ -9,5 +9,7 @@
        <use>
                <flag name="vlc">Use python-vlc as backend for vidify</flag>
                <flag name="mpv">Use python-mpv as backend for vidify</flag>
+               <flag name="zeroconf">Use an external network player</flag>
+               <flag name="dbus">Support local MPRIS players</flag>
        </use>
 </pkgmetadata>

diff --git a/media-video/vidify/vidify-2.2.0.ebuild 
b/media-video/vidify/vidify-2.2.0.ebuild
index 66c27c9..dd17701 100644
--- a/media-video/vidify/vidify-2.2.0.ebuild
+++ b/media-video/vidify/vidify-2.2.0.ebuild
@@ -17,21 +17,23 @@ LICENSE="LGPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
-IUSE="+vlc mpv"
+IUSE="dbus vlc mpv zeroconf"
 
-REQUIRED_USE="|| ( vlc mpv )"
+REQUIRED_USE="|| ( vlc mpv zeroconf )"
 
 RDEPEND="
        dev-python/appdirs[${PYTHON_USEDEP}]
        dev-python/lyricwikia[${PYTHON_USEDEP}]
-       dev-python/pydbus[${PYTHON_USEDEP}]
-       dev-python/qdarkstyle[${PYTHON_USEDEP}]
        dev-python/QtPy[gui,webengine,${PYTHON_USEDEP}]
-       dev-python/tekore[${PYTHON_USEDEP}]
        net-misc/youtube-dl[${PYTHON_USEDEP}]
-       dev-python/zeroconf[${PYTHON_USEDEP}]
+       || (
+               dev-python/tekore[${PYTHON_USEDEP}]
+               dev-python/pydbus[${PYTHON_USEDEP}]
+       )
+       dbus? ( dev-python/pydbus[${PYTHON_USEDEP}] )
        mpv? ( dev-python/python-mpv[${PYTHON_USEDEP}] )
        vlc? ( dev-python/python-vlc[${PYTHON_USEDEP}] )
+       zeroconf? ( dev-python/zeroconf[${PYTHON_USEDEP}] )
 "
 
 distutils_enable_tests unittest
@@ -48,6 +50,17 @@ python_prepare_all() {
        # likely because of the removal of the above tests
        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
 }
 
@@ -58,9 +71,13 @@ python_test() {
 pkg_postinst() {
        xdg_pkg_postinst
 
-       use mpv && elog "media-video/vlc is the default vidify player, to use 
mpv run 'vidify --player mpv' or set 'player = mpv' in the config file"
-       use vlc && elog "If video playback is not working please check 'vidify 
--debug' for missing-codec-errors and recompile media-video/vlc with the 
missing codecs"
-       use mpv && elog "If video playback is not working please check 'vidify 
--player mpv --debug' for missing-codec-errors and recompile media-video/mpv 
with the missing codecs"
+       elog "If video playback is not working please check 'vidify --debug' 
for missing-codec-errors and recompile media-video/vlc or media-video/mpv with 
the missing codecs"
 
+       optfeature "using a 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
 }

Reply via email to