# Created by: nemysis@gmx.ch # $FreeBSD$ PORTNAME= gtk-youtube-viewer PORTVERSION= 3.0.3 CATEGORIES= multimedia perl5 MAINTAINER= nemysis@gmx.ch COMMENT= GTK Search and play YouTube videos streaming in MPlayer LICENSE= GPLv3 BUILD_DEPENDS= p5-Data-Dump>=0:${PORTSDIR}/devel/p5-Data-Dump \ p5-ReadLine-Gnu>=0:${PORTSDIR}/devel/p5-ReadLine-Gnu \ p5-Term-ReadKey>=0:${PORTSDIR}/devel/p5-Term-ReadKey \ p5-XML-Fast>=0:${PORTSDIR}/net/p5-XML-Fast \ p5-LWP-Protocol-https>=0:${PORTSDIR}/www/p5-LWP-Protocol-https \ p5-libwww>=0:${PORTSDIR}/www/p5-libwww RUN_DEPENDS:= ${BUILD_DEPENDS} \ mplayer:${PORTSDIR}/multimedia/mplayer TEST_DEPENDS= p5-Test-More-UTF8>=0:${PORTSDIR}/devel/p5-Test-More-UTF8 CONFLICTS= youtube-viewer-[0-9]* USE_GITHUB= yes GH_ACCOUNT= trizen GH_PROJECT= youtube-viewer GH_COMMIT= c4496ed WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}/WWW-YoutubeViewer PERL_MODBUILD= yes MAN1= youtube-viewer.1 MAN3= WWW::YoutubeViewer.3 PORTDOCS= Changes README OPTIONS_DEFINE= GTK2 GCAP OPTIONS_DEFAULT=GTK2 GCAP GCAP_DESC= Enable YouTube captions support .include .if ${PORT_OPTIONS:MGTK2} BUILD_DEPENDS+= p5-Gtk2>=0:${PORTSDIR}/x11-toolkits/p5-Gtk2 RUN_DEPENDS+= p5-Gtk2>=0:${PORTSDIR}/x11-toolkits/p5-Gtk2 CONFIGURE_ARGS+=--gtk-youtube-viewer PLIST_SUB+= GTK2="" .else PLIST_SUB+= GTK2="@comment " .endif .if ${PORT_OPTIONS:MGCAP} RUN_DEPENDS+= ${LOCALBASE}/bin/gcap:${PORTSDIR}/multimedia/gcap .endif post-patch: cd ${WRKSRC} && ${REINPLACE_CMD} -n '1,/create_build_script()/p' \ Build.PL cd ${WRKSRC}/bin && ${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g' \ gtk-youtube-viewer youtube-viewer post-install: .if ${PORT_OPTIONS:MGTK2} ${MKDIR} ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKSRC}/share/gtk-youtube-viewer.desktop ${PREFIX}/share/applications ${MKDIR} ${DATADIR}/icons ${INSTALL_DATA} ${WRKSRC}/share/gtk-youtube-viewer.glade ${DATADIR} ${INSTALL_DATA} ${WRKSRC}/share/gtk-youtube-viewer-icons/* ${DATADIR}/icons ${INSTALL_DATA} ${WRKSRC}/share/icons/gtk-youtube-viewer.png ${PREFIX}/share/pixmaps .endif .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} .endif regression-test: build cd ${WRKSRC} && ${PERL} ./Build test .include