===> Generating patch
===> Viewing diff with more
diff -ruN --exclude=CVS /usr/ports/multimedia/gtk-youtube-viewer/Makefile ./Makefile
--- /usr/ports/multimedia/gtk-youtube-viewer/Makefile	2012-09-23 17:14:54.000000000 +0200
+++ ./Makefile	2012-11-07 00:32:36.000000000 +0100
@@ -6,10 +6,11 @@
 #
 
 PORTNAME=	gtk-youtube-viewer
-PORTVERSION=	2.0.5
-CATEGORIES=	multimedia
+PORTVERSION=	3.0.3
+CATEGORIES=	multimedia perl5
 MASTER_SITES=	GOOGLE_CODE
 PROJECTHOST=	trizen
+DISTNAME=	youtube-viewer
 
 MAINTAINER=	nemysis@gmx.ch
 COMMENT=	GTK Search and play YouTube videos streaming in MPlayer
@@ -21,22 +22,26 @@
 		p5-Term-ANSIColor>=0:${PORTSDIR}/devel/p5-Term-ANSIColor \
 		p5-Gtk2>=0:${PORTSDIR}/x11-toolkits/p5-Gtk2 \
 		p5-LWP-Protocol-https>=0:${PORTSDIR}/www/p5-LWP-Protocol-https \
+		p5-Data-Dump>=0:${PORTSDIR}/devel/p5-Data-Dump \
+		p5-ReadLine-Gnu>=0:${PORTSDIR}/devel/p5-ReadLine-Gnu \
+		p5-Test-More-UTF8>=0:${PORTSDIR}/devel/p5-Test-More-UTF8 \
 		mplayer:${PORTSDIR}/multimedia/mplayer
 
-OPTIONS_DEFINE=	GCAP
-GCAP_DESC=	GCAP support
-
-WRKSRC=		${WRKDIR}/${PORTNAME}/src
+WRKSRC=		${WRKDIR}/WWW-YoutubeViewer
 
 USE_PERL5_RUN=	yes
 NO_BUILD=	yes
 
-PLIST_FILES=	bin/${PORTNAME} \
-		share/pixmaps/${PORTNAME}.png \
-		share/applications/${PORTNAME}.desktop
-PLIST_DIRSTRY=	share/applications
-
-PORTDATA=	*
+MAN1=		youtube-viewer.1
+MAN3=		WWW::YoutubeViewer.3
+MAN3PREFIX=	${PREFIX}/lib/perl5/${PERL_VERSION}
+
+PORTDOCS=	Changes README
+
+OPTIONS_DEFINE=	GTK GCAP
+OPTIONS_DEFAULT=GTK GCAP
+GTK_DESC=	Enable GTK support
+GCAP_DESC=	Enable GCAP support
 
 .include <bsd.port.options.mk>
 
@@ -44,23 +49,41 @@
 RUN_DEPENDS+=	${LOCALBASE}/bin/gcap:${PORTSDIR}/multimedia/gcap
 .endif
 
+.if defined(WITH_GTK)
+PLIST_SUB+=	GTK=""
+.else
+PLIST_SUB+=	GTK="@comment "
+.endif
+
 post-patch:
-	@(cd ${WRKSRC} && ${REINPLACE_CMD} -e "s|#!/usr/bin/perl|#!${PERL}|g" gtk-youtube-viewer.pl \
-		youtube-viewer && ${REINPLACE_CMD} -e "s|/usr/share/|${PREFIX}/share/|g" gtk-youtube-viewer)
+	@(cd ${WRKSRC} && ${REINPLACE_CMD} \
+	-e 's|/usr/bin/perl|${PERL}|g' \
+	-e 's|/usr/bin/|${PREFIX}/bin/|g' \
+	-e 's|/usr/share/|${PREFIX}/share/|g' \
+	-e 's|usr share|${PREFIX}/share|' \
+		Build.PL bin/gtk-youtube-viewer bin/youtube-viewer)
 
 do-install:
-	${MKDIR} ${DATADIR}
-	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-	${INSTALL_SCRIPT} ${WRKSRC}/youtube-viewer ${DATADIR}
-
-# Data
-	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "icons lib" ${DATADIR})
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.pl ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.glade ${DATADIR}
-
-# Pixmaps and Desktop
-	${INSTALL_DATA} ${WRKSRC}/icons/${PORTNAME}.png ${PREFIX}/share/pixmaps/
-	${MKDIR} ${PREFIX}/share/applications
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${PREFIX}/share/applications/
+	cd ${WRKSRC} && ${PERL} ./Build.PL && ./Build
+	cd ${WRKSRC}/blib && ${GZIP_CMD} -f libdoc/WWW::YoutubeViewer.3 bindoc/youtube-viewer.1
+
+.if ${PORT_OPTIONS:MGTK}
+	cd ${WRKSRC} && ${PERL} ./Build.PL --gtk-youtube-viewer
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/gtk-youtube-viewer ${PREFIX}/bin
+.endif
+
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/youtube-viewer ${PREFIX}/bin
+	${MKDIR} ${PREFIX}/${SITE_PERL_REL}/WWW
+	${INSTALL_DATA} ${WRKSRC}/lib/WWW/YoutubeViewer.pm ${PREFIX}/${SITE_PERL_REL}/WWW
+
+post-install:
+	${INSTALL_MAN} ${WRKSRC}/blib/bindoc/${MAN1}.gz ${MAN1PREFIX}/man/man1
+	${MKDIR} ${PREFIX}/lib/perl5/${PERL_VERSION}/man/man3
+	${INSTALL_MAN} ${WRKSRC}/blib/libdoc/WWW::YoutubeViewer.3.gz ${MAN3PREFIX}/man/man3
+
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+.endif
 
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/multimedia/gtk-youtube-viewer/distinfo ./distinfo
--- /usr/ports/multimedia/gtk-youtube-viewer/distinfo	2012-08-24 23:15:59.000000000 +0200
+++ ./distinfo	2012-11-06 13:32:18.000000000 +0100
@@ -1,2 +1,2 @@
-SHA256 (gtk-youtube-viewer-2.0.5.tar.gz) = 28cce3956d58659849db451e9d016e426577bfd8791000678f87ac8929c6def0
-SIZE (gtk-youtube-viewer-2.0.5.tar.gz) = 165777
+SHA256 (youtube-viewer.tar.gz) = 6777a9f9d221a888d4a1be1b403ae21eecb99bb954b94981a9b9a8b5d3967b87
+SIZE (youtube-viewer.tar.gz) = 104854
diff -ruN --exclude=CVS /usr/ports/multimedia/gtk-youtube-viewer/pkg-descr ./pkg-descr
--- /usr/ports/multimedia/gtk-youtube-viewer/pkg-descr	2012-09-23 17:14:54.000000000 +0200
+++ ./pkg-descr	2012-11-06 02:24:30.000000000 +0100
@@ -1,4 +1,4 @@
 GTK Youtube Viewer is created to be a flexible and reliable open-source
 Linux application which is dedicated to streaming Youtube Videos with MPlayer.
 
-WWW:	https://code.google.com/p/trizen/
+WWW: https://code.google.com/p/trizen/
diff -ruN --exclude=CVS /usr/ports/multimedia/gtk-youtube-viewer/pkg-plist ./pkg-plist
--- /usr/ports/multimedia/gtk-youtube-viewer/pkg-plist	1970-01-01 01:00:00.000000000 +0100
+++ ./pkg-plist	2012-11-07 00:24:07.000000000 +0100
@@ -0,0 +1,15 @@
+%%GTK%%bin/gtk-youtube-viewer
+bin/youtube-viewer
+%%SITE_PERL%%/WWW/YoutubeViewer.pm
+%%GTK%%share/applications/gtk-youtube-viewer.desktop
+%%GTK%%%%DATADIR%%/gtk-youtube-viewer.glade
+%%GTK%%%%DATADIR%%/icons/default_thumb.jpg
+%%GTK%%%%DATADIR%%/icons/feed_icon.png
+%%GTK%%%%DATADIR%%/icons/gtk-youtube-viewer.png
+%%GTK%%%%DATADIR%%/icons/spinner.gif
+%%GTK%%%%DATADIR%%/icons/user.png
+%%GTK%%%%DATADIR%%/youtube-viewer
+%%GTK%%share/pixmaps/gtk-youtube-viewer.png
+%%GTK%%@dirrm %%DATADIR%%/icons
+%%GTK%%@dirrm %%DATADIR%%
+%%GTK%%@dirrmtry share/applications
===> Done