| 
									
										
										
										
											2016-02-28 01:15:03 +00:00
										 |  |  | # Copyright 2016 Julian Ospald <hasufell@posteo.de> | 
					
						
							|  |  |  | # Distributed under the terms of the GNU General Public License v2 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | require gtk-icon-cache | 
					
						
							|  |  |  | require perl-module | 
					
						
							| 
									
										
										
										
											2016-04-22 15:42:34 +00:00
										 |  |  | require github [ user=trizen ] | 
					
						
							| 
									
										
										
										
											2016-02-28 01:15:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | SUMMARY="A command line utility for viewing youtube-videos in Mplayer" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LICENCES="|| ( Artistic GPL-1 GPL-2 GPL-3 )" | 
					
						
							|  |  |  | SLOT="0" | 
					
						
							|  |  |  | PLATFORMS="~amd64 ~x86" | 
					
						
							|  |  |  | MYOPTIONS="
 | 
					
						
							|  |  |  |     gtk [[ description = [ Install the gtk GUI, called gtk-youtube-viewer ] ]] | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # TODO: dev-perl/LWP-UserAgent-Cached (cache support) | 
					
						
							|  |  |  | DEPENDENCIES="
 | 
					
						
							|  |  |  |     build: | 
					
						
							|  |  |  |         dev-perl/Module-Build | 
					
						
							|  |  |  |     build+run: | 
					
						
							|  |  |  |         dev-lang/perl:=[>=5.22] | 
					
						
							|  |  |  |         dev-perl/Data-Dump | 
					
						
							|  |  |  |         dev-perl/Getopt-Long | 
					
						
							|  |  |  |         dev-perl/JSON | 
					
						
							|  |  |  |         dev-perl/LWP-Protocol-https | 
					
						
							|  |  |  |         dev-perl/Scalar-List-Utils | 
					
						
							|  |  |  |         dev-perl/Term-ANSIColor | 
					
						
							|  |  |  |         dev-perl/Term-ReadLine-Gnu | 
					
						
							|  |  |  |         dev-perl/Text-Tabs+Wrap | 
					
						
							|  |  |  |         dev-perl/libwww-perl | 
					
						
							|  |  |  |         gtk? ( | 
					
						
							|  |  |  |             dev-perl/File-ShareDir | 
					
						
							|  |  |  |             dev-perl/Gtk2-Perl | 
					
						
							|  |  |  |             x11-libs/gdk-pixbuf:2.0[X] | 
					
						
							|  |  |  |         ) | 
					
						
							|  |  |  |     suggestion: | 
					
						
							|  |  |  |         dev-perl/JSON-XS [[ description = [ faster JSON to HASH conversion ] ]] | 
					
						
							| 
									
										
										
										
											2016-09-05 10:27:07 +00:00
										 |  |  |         dev-perl/LWP-UserAgent-Cached [[ description = [ cache support ] ]] | 
					
						
							| 
									
										
										
										
											2016-02-28 01:15:03 +00:00
										 |  |  |         dev-perl/Mozilla-CA [[ description = [ may help in case there are SSL problems ] ]] | 
					
						
							|  |  |  |         dev-perl/Term-ReadLine-Gnu [[ description = [ for a better STDIN support ] ]] | 
					
						
							| 
									
										
										
										
											2016-06-04 00:02:47 +00:00
										 |  |  |         dev-perl/Unicode-LineBreak [[ description = [ print the results in a fixed-width format (--fixed-width, -W) ] ]] | 
					
						
							| 
									
										
										
										
											2016-02-28 01:15:03 +00:00
										 |  |  |         ( | 
					
						
							|  |  |  |             media-video/gnome-mplayer | 
					
						
							|  |  |  |             media/mpv | 
					
						
							|  |  |  |             media/smplayer | 
					
						
							|  |  |  |             media/vlc | 
					
						
							| 
									
										
										
										
											2016-05-13 20:41:29 +00:00
										 |  |  |         ) [[ *description = [ video player backend, you probably want | 
					
						
							|  |  |  |                               at least one ] ]] | 
					
						
							| 
									
										
										
										
											2016-02-28 01:15:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_configure() { | 
					
						
							| 
									
										
										
										
											2017-08-17 19:14:31 +00:00
										 |  |  |     edo rm Makefile.PL | 
					
						
							| 
									
										
										
										
											2016-02-28 01:15:03 +00:00
										 |  |  |     if option gtk ; then | 
					
						
							| 
									
										
										
										
											2017-08-17 19:14:31 +00:00
										 |  |  |         PERL_MODULE_SRC_CONFIGURE_PARAMS=( --gtk ) | 
					
						
							| 
									
										
										
										
											2016-02-28 01:15:03 +00:00
										 |  |  |     fi | 
					
						
							|  |  |  |     perl-module_src_configure | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_compile() { :; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_install() { | 
					
						
							|  |  |  |     perl-module_src_install | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if option gtk ; then | 
					
						
							|  |  |  |         insinto /usr/share/applications | 
					
						
							|  |  |  |         doins share/gtk-youtube-viewer.desktop | 
					
						
							|  |  |  |         insinto /usr/share/pixmaps | 
					
						
							|  |  |  |         doins share/icons/gtk-youtube-viewer.png | 
					
						
							|  |  |  |     fi | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pkg_preinst() { | 
					
						
							|  |  |  |     option gtk && gtk-icon-cache_pkg_preinst | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pkg_postinst() { | 
					
						
							|  |  |  |     option gtk && gtk-icon-cache_pkg_postinst | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pkg_postrm() { | 
					
						
							|  |  |  |     option gtk && gtk-icon-cache_pkg_postrm | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 |