commit: 7d8e61d5d550a7c2b12477060b2acaa0ccd43133 Author: Zoltan Puskas <zoltan <AT> sinustrom <DOT> info> AuthorDate: Mon Feb 3 03:29:23 2020 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Thu Mar 5 12:01:20 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d8e61d5
net-misc/youtube-viewer: Update 9999 to EAPI 7 and add gtk3 support Closes: https://bugs.gentoo.org/706222 Package-Manager: Portage-2.3.85, Repoman-2.3.20 Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info> Closes: https://github.com/gentoo/gentoo/pull/14536 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> net-misc/youtube-viewer/youtube-viewer-9999.ebuild | 39 ++++++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/net-misc/youtube-viewer/youtube-viewer-9999.ebuild b/net-misc/youtube-viewer/youtube-viewer-9999.ebuild index 42baf31b22b..8ee6e65d0d1 100644 --- a/net-misc/youtube-viewer/youtube-viewer-9999.ebuild +++ b/net-misc/youtube-viewer/youtube-viewer-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit gnome2-utils eutils perl-module git-r3 +inherit desktop eutils perl-module git-r3 xdg-utils DESCRIPTION="A command line utility for viewing youtube-videos in Mplayer" HOMEPAGE="https://trizenx.blogspot.com/2012/03/gtk-youtube-viewer.html" @@ -13,8 +13,15 @@ EGIT_REPO_URI="https://github.com/trizen/${PN}.git" LICENSE="|| ( Artistic GPL-1+ )" SLOT="0" KEYWORDS="" -IUSE="gtk" +IUSE="gtk gtk2" +REQUIRED_USE="gtk2? ( gtk )" + +GTK_COMMON_DEPS=" + dev-perl/File-ShareDir + virtual/freedesktop-icon-theme + x11-libs/gdk-pixbuf:2[X,jpeg] +" RDEPEND=" dev-perl/Data-Dump dev-perl/JSON @@ -31,12 +38,17 @@ RDEPEND=" virtual/perl-Text-ParseWords virtual/perl-Text-Tabs+Wrap gtk? ( + gtk2? ( + >=dev-perl/Gtk2-1.244.0 + ) + !gtk2? ( + dev-perl/Gtk3 + ) dev-perl/File-ShareDir - >=dev-perl/Gtk2-1.244.0 virtual/freedesktop-icon-theme x11-libs/gdk-pixbuf:2[X,jpeg] ) - || ( media-video/ffmpeg[openssl] media-video/ffmpeg[gnutls] ) + || ( >=media-video/ffmpeg-4.1.3[openssl,-libressl] >=media-video/ffmpeg-4.1.3[-openssl,libressl] >=media-video/ffmpeg-4.1.3[gnutls] ) || ( media-video/mpv media-video/mplayer media-video/vlc gtk? ( media-video/smplayer ) )" DEPEND="dev-perl/Module-Build" @@ -44,23 +56,28 @@ SRC_TEST="do" src_configure() { local myconf - if use gtk ; then - myconf="--gtk-youtube-viewer" + if use gtk; then + if use gtk2; then + myconf="--gtk2" + else + myconf="--gtk3" + fi fi + perl-module_src_configure } src_install() { perl-module_src_install - if use gtk ; then + if use gtk; then domenu share/gtk-youtube-viewer.desktop doicon share/icons/gtk-youtube-viewer.png fi } pkg_postinst() { - use gtk && gnome2_icon_cache_update + use gtk && xdg_icon_cache_update elog "Optional dependencies:" optfeature "cache support" dev-perl/LWP-UserAgent-Cached optfeature "faster JSON to HASH conversion" dev-perl/JSON-XS @@ -74,5 +91,5 @@ pkg_postinst() { } pkg_postrm() { - use gtk && gnome2_icon_cache_update + use gtk && xdg_icon_cache_update }