Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/youtube-viewer/
Date: Thu, 05 Mar 2020 12:21:17
Message-Id: 1583409680.7d8e61d5d550a7c2b12477060b2acaa0ccd43133.juippis@gentoo
1 commit: 7d8e61d5d550a7c2b12477060b2acaa0ccd43133
2 Author: Zoltan Puskas <zoltan <AT> sinustrom <DOT> info>
3 AuthorDate: Mon Feb 3 03:29:23 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 5 12:01:20 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d8e61d5
7
8 net-misc/youtube-viewer: Update 9999 to EAPI 7 and add gtk3 support
9
10 Closes: https://bugs.gentoo.org/706222
11 Package-Manager: Portage-2.3.85, Repoman-2.3.20
12 Signed-off-by: Zoltan Puskas <zoltan <AT> sinustrom.info>
13 Closes: https://github.com/gentoo/gentoo/pull/14536
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 net-misc/youtube-viewer/youtube-viewer-9999.ebuild | 39 ++++++++++++++++------
17 1 file changed, 28 insertions(+), 11 deletions(-)
18
19 diff --git a/net-misc/youtube-viewer/youtube-viewer-9999.ebuild b/net-misc/youtube-viewer/youtube-viewer-9999.ebuild
20 index 42baf31b22b..8ee6e65d0d1 100644
21 --- a/net-misc/youtube-viewer/youtube-viewer-9999.ebuild
22 +++ b/net-misc/youtube-viewer/youtube-viewer-9999.ebuild
23 @@ -1,9 +1,9 @@
24 -# Copyright 1999-2019 Gentoo Authors
25 +# Copyright 1999-2020 Gentoo Authors
26 # Distributed under the terms of the GNU General Public License v2
27
28 -EAPI=6
29 +EAPI=7
30
31 -inherit gnome2-utils eutils perl-module git-r3
32 +inherit desktop eutils perl-module git-r3 xdg-utils
33
34 DESCRIPTION="A command line utility for viewing youtube-videos in Mplayer"
35 HOMEPAGE="https://trizenx.blogspot.com/2012/03/gtk-youtube-viewer.html"
36 @@ -13,8 +13,15 @@ EGIT_REPO_URI="https://github.com/trizen/${PN}.git"
37 LICENSE="|| ( Artistic GPL-1+ )"
38 SLOT="0"
39 KEYWORDS=""
40 -IUSE="gtk"
41 +IUSE="gtk gtk2"
42
43 +REQUIRED_USE="gtk2? ( gtk )"
44 +
45 +GTK_COMMON_DEPS="
46 + dev-perl/File-ShareDir
47 + virtual/freedesktop-icon-theme
48 + x11-libs/gdk-pixbuf:2[X,jpeg]
49 +"
50 RDEPEND="
51 dev-perl/Data-Dump
52 dev-perl/JSON
53 @@ -31,12 +38,17 @@ RDEPEND="
54 virtual/perl-Text-ParseWords
55 virtual/perl-Text-Tabs+Wrap
56 gtk? (
57 + gtk2? (
58 + >=dev-perl/Gtk2-1.244.0
59 + )
60 + !gtk2? (
61 + dev-perl/Gtk3
62 + )
63 dev-perl/File-ShareDir
64 - >=dev-perl/Gtk2-1.244.0
65 virtual/freedesktop-icon-theme
66 x11-libs/gdk-pixbuf:2[X,jpeg]
67 )
68 - || ( media-video/ffmpeg[openssl] media-video/ffmpeg[gnutls] )
69 + || ( >=media-video/ffmpeg-4.1.3[openssl,-libressl] >=media-video/ffmpeg-4.1.3[-openssl,libressl] >=media-video/ffmpeg-4.1.3[gnutls] )
70 || ( media-video/mpv media-video/mplayer media-video/vlc gtk? ( media-video/smplayer ) )"
71 DEPEND="dev-perl/Module-Build"
72
73 @@ -44,23 +56,28 @@ SRC_TEST="do"
74
75 src_configure() {
76 local myconf
77 - if use gtk ; then
78 - myconf="--gtk-youtube-viewer"
79 + if use gtk; then
80 + if use gtk2; then
81 + myconf="--gtk2"
82 + else
83 + myconf="--gtk3"
84 + fi
85 fi
86 +
87 perl-module_src_configure
88 }
89
90 src_install() {
91 perl-module_src_install
92
93 - if use gtk ; then
94 + if use gtk; then
95 domenu share/gtk-youtube-viewer.desktop
96 doicon share/icons/gtk-youtube-viewer.png
97 fi
98 }
99
100 pkg_postinst() {
101 - use gtk && gnome2_icon_cache_update
102 + use gtk && xdg_icon_cache_update
103 elog "Optional dependencies:"
104 optfeature "cache support" dev-perl/LWP-UserAgent-Cached
105 optfeature "faster JSON to HASH conversion" dev-perl/JSON-XS
106 @@ -74,5 +91,5 @@ pkg_postinst() {
107 }
108
109 pkg_postrm() {
110 - use gtk && gnome2_icon_cache_update
111 + use gtk && xdg_icon_cache_update
112 }