Bug 177775 - multimedia/gtk-youtube-viewer: properly support dependency for CLI option
multimedia/gtk-youtube-viewer: properly support dependency for CLI option
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Any Any
: Normal Affects Only Me
Assigned To: Andrej Zverev
Depends on:
  Show dependency treegraph
Reported: 2013-04-11 06:50 UTC by jgh@FreeBSD.org
Modified: 2013-06-15 20:52 UTC (History)
0 users

See Also:

file.diff (2.31 KB, patch)
2013-04-11 06:50 UTC, jgh@FreeBSD.org
no flags Details | Diff
gtk-youtube-viewer.diff (3.87 KB, patch)
2013-04-11 11:49 UTC, nemysis
no flags Details | Diff
gtk-youtube-viewer.diff (3.78 KB, patch)
2013-05-30 14:49 UTC, nemysis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jgh@FreeBSD.org freebsd_committer 2013-04-11 06:50:00 UTC
If you choose CLI, dependencies are still pointed to lang/perl5.14
With this update, it will be require lang/perl5.16, and note which entry for UPDATING to read, as
well as properly clean up.

Updates USER_INTERFACE to UI for group naming
Drop enable from descriptions.
Drop post-extract target, as this is no longer required.
Adjust pkg-plist accordingly for support of an additional perl version.
Comment 1 Edwin Groothuis freebsd_committer 2013-04-11 06:50:06 UTC
Maintainer of multimedia/gtk-youtube-viewer,

Please note that PR ports/177775 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:

Edwin Groothuis via the GNATS Auto Assign Tool
Comment 2 Edwin Groothuis freebsd_committer 2013-04-11 06:50:07 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 nemysis 2013-04-11 11:49:48 UTC





- Bump portrevision
- Cleanup Makefile
- Add patch yv_5.16_to_5.10.pl.in, support Perl v5.14.2
- Add pkg-message file to display about youtube-viewer
- Trim pkg-plist

Added file(s):
- files/pkg-message.in
- files/yv_5.16_to_5.10.pl.in

This patch is from Developer Trizen after mine emails with him.
Comment 4 jgh@FreeBSD.org freebsd_committer 2013-04-12 07:33:21 UTC
This still doesn't resolve the issue, and this is not a fix for the problem.
The problem report was opened because it is supporting a higher version of
perl, however the dependency has not been shifted.

If there is an attention to support different versions of perl, it would be
standard to then tie to that particular version of perl.

As it stands now, this port will work with 5.14 or greater, however perl
5.14 is still the dependency, regardless of the version of perl you are

Comment 5 nemysis 2013-05-30 14:49:37 UTC


- Bump portrevision
- Cleanup Makefile
- Only with enabled CLI Options
  patch with added yv_5.16_to_5.10.pl to can be used Perl 5.14.2
  display added pkg-message
- Trim pkg-plist

Added file(s):
- files/pkg-message.in
- files/yv_5.16_to_5.10.pl.in

This patch is from upstream


> From: Trizen <trizenx@gmail.com>
> To: nemysis <nemysis@gmx.ch>
> Subject: Re: GTK Youtube Viewer 3.0.7
> Date: Sat, 23 Mar 2013 21:27:45 +0200
> Hello,
> There is a script which transforms youtube-viewer to require perl>=5.010
>          https://trizen.googlecode.com/files/yv_5.16_to_5.10.pl
> youtube-viewer uses perl>=5.16.0 because of __SUB__ token which is
> available only starting with this version of perl. I could leave
> youtube-viewer that way, to require only perl>=5.10.0, but isn't an elegant
> solution, and not very easy to maintain.
> About the HTML5 support, what do you exactly mean? Can you, please, provide
> an URL to an Youtube HTML5 video? Thanks.
> Best regards,
> Trizen

Some user wish to use default ports version of Perl being Perl-5.14 and  do not wish to
upgrade to Perl 5.16  on account of UPDATING/rebuilding issues.

From bsd.perl.mk

PERL_VERSION?=  5.14.2

I can't insist on users what Perl version they should use and the users should make a choice.
Comment 6 Andrej Zverev freebsd_committer 2013-06-13 12:48:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->az

I'll take it
Comment 7 dfilter freebsd_committer 2013-06-15 20:30:41 UTC
Author: az
Date: Sat Jun 15 19:30:32 2013
New Revision: 321014
URL: http://svnweb.freebsd.org/changeset/ports/321014

  - Console client now support perl version 5.14+
  - Cleanup Makefile and pkg-plist
  PR:		ports/177775
  Submitted by:	jgh@
  Approved by:	nemysis <nemysis@gmx.ch> (maintainer and author of fixes)

  head/multimedia/gtk-youtube-viewer/files/yv_5.16_to_5.10.pl   (contents, props changed)

Modified: head/multimedia/gtk-youtube-viewer/Makefile
--- head/multimedia/gtk-youtube-viewer/Makefile	Sat Jun 15 19:14:06 2013	(r321013)
+++ head/multimedia/gtk-youtube-viewer/Makefile	Sat Jun 15 19:30:32 2013	(r321014)
@@ -3,7 +3,7 @@
 PORTNAME=	gtk-youtube-viewer
 CATEGORIES=	multimedia perl5
 MAINTAINER=	nemysis@gmx.ch
@@ -35,7 +35,7 @@ GH_COMMIT=	c26d9a7
 MAN3=		WWW::YoutubeViewer::RegularExpressions.3 \
 		WWW::YoutubeViewer.3 \
@@ -78,16 +78,7 @@ PLIST_SUB+=	GTK2="@comment "
 RUN_DEPENDS+=	${LOCALBASE}/bin/gcap:${PORTSDIR}/multimedia/gcap
-.if ! exists(${LOCALBASE}/bin/per5.16.2)
-	@${ECHO_CMD}
-	@${ECHO_MSG} "GTK Youtube Viewer 3.07 requires lang/perl5.16 to use CLI version"
-	@${ECHO_MSG}
-	@${ECHO_MSG} "Please read /usr/ports/UPDATING"
-	@${ECHO_MSG}
-	@${ECHO_MSG} "Hit ^c now if you don't wish to do this."
-	@${ECHO_MSG}
+.include <bsd.port.pre.mk>
 	@${REINPLACE_CMD} -n '1,/create_build_script()/p' \
@@ -97,6 +88,13 @@ post-patch:
 	@cd ${WRKSRC}/bin && ${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g' \
 		gtk-youtube-viewer youtube-viewer
+.if ${PERL_LEVEL} <= 501600
+	@${CP} ${FILESDIR}/yv_5.16_to_5.10.pl ${WRKSRC}
+	@${CP} ${WRKSRC}/bin/youtube-viewer ${WRKSRC}/bin/youtube-viewer-2patch
+	@${PERL} \
+	${WRKSRC}/yv_5.16_to_5.10.pl ${WRKSRC}/bin/youtube-viewer-2patch > ${WRKSRC}/bin/youtube-viewer
+	@${RM} ${WRKSRC}/bin/youtube-viewer-2patch
 	@${REINPLACE_CMD} -e "s|'bin/youtube-viewer',||" \
@@ -123,4 +121,4 @@ post-install:
 regression-test: build
 	cd ${WRKSRC} && ${PERL} ./Build test
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Added: head/multimedia/gtk-youtube-viewer/files/yv_5.16_to_5.10.pl
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/gtk-youtube-viewer/files/yv_5.16_to_5.10.pl	Sat Jun 15 19:30:32 2013	(r321014)
@@ -0,0 +1,12 @@
+# usage: ./script.pl /usr/bin/youtube-viewer > new-youtube-viewer
+my $sub = '';
+    s{^use 5.01\K\d}{0};
+    $sub = $1 if /^sub\s+(\w+)/;
+    s{^\s+(?:or)?\s*\K__SUB__->\(}{$sub(};
+    s{\b__SUB__\b}{\\&$sub};
+    print;

Modified: head/multimedia/gtk-youtube-viewer/pkg-plist
--- head/multimedia/gtk-youtube-viewer/pkg-plist	Sat Jun 15 19:14:06 2013	(r321013)
+++ head/multimedia/gtk-youtube-viewer/pkg-plist	Sat Jun 15 19:30:32 2013	(r321014)
@@ -20,13 +20,4 @@
 %%GTK2%%@dirrm %%DATADIR%%
 %%GTK2%%@dirrmtry share/applications
 %%GTK2%%@dirrm %%SITE_PERL%%/mach/auto/WWW/YoutubeViewer
-%%GTK2%%@dirrm %%SITE_PERL%%/mach/auto/WWW
-%%GTK2%%@dirrm %%SITE_PERL%%/mach/auto
-%%GTK2%%@dirrm %%SITE_PERL%%/mach
 @dirrm %%SITE_PERL%%/WWW/YoutubeViewer
-@dirrm %%SITE_PERL%%/WWW
-@dirrm %%SITE_PERL%%
-@dirrmtry lib/perl5/site_perl
-@dirrmtry lib/perl5/5.14.2/man
-@dirrmtry lib/perl5/5.14.2
-@dirrmtry lib/perl5
svn-ports-all@freebsd.org mailing list
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Andrej Zverev freebsd_committer 2013-06-15 20:52:08 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!