View | Details | Raw Unified | Return to bug 177775 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-12 / +12 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	gtk-youtube-viewer
4
PORTNAME=	gtk-youtube-viewer
5
PORTVERSION=	3.0.7
5
PORTVERSION=	3.0.7
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	multimedia perl5
7
CATEGORIES=	multimedia perl5
8
8
9
MAINTAINER=	nemysis@gmx.ch
9
MAINTAINER=	nemysis@gmx.ch
Lines 46-51 Link Here
46
46
47
PORTDOCS=	Changes README
47
PORTDOCS=	Changes README
48
48
49
SUB_FILES=	pkg-message \
50
		yv_5.16_to_5.10.pl
51
49
OPTIONS_DEFINE=	GCAP
52
OPTIONS_DEFINE=	GCAP
50
53
51
OPTIONS_MULTI=	USER_INTERFACE
54
OPTIONS_MULTI=	USER_INTERFACE
Lines 78-94 Link Here
78
RUN_DEPENDS+=	${LOCALBASE}/bin/gcap:${PORTSDIR}/multimedia/gcap
81
RUN_DEPENDS+=	${LOCALBASE}/bin/gcap:${PORTSDIR}/multimedia/gcap
79
.endif
82
.endif
80
83
81
post-extract:
82
.if ! exists(${LOCALBASE}/bin/per5.16.2)
83
	@${ECHO_CMD}
84
	@${ECHO_MSG} "GTK Youtube Viewer 3.07 requires lang/perl5.16 to use CLI version"
85
	@${ECHO_MSG}
86
	@${ECHO_MSG} "Please read /usr/ports/UPDATING"
87
	@${ECHO_MSG}
88
	@${ECHO_MSG} "Hit ^c now if you don't wish to do this."
89
	@${ECHO_MSG}
90
.endif
91
92
post-patch:
84
post-patch:
93
	@${REINPLACE_CMD} -n '1,/create_build_script()/p' \
85
	@${REINPLACE_CMD} -n '1,/create_build_script()/p' \
94
			${WRKSRC}/Build.PL
86
			${WRKSRC}/Build.PL
Lines 106-111 Link Here
106
.endif
98
.endif
107
99
108
post-install:
100
post-install:
101
.if ${PORT_OPTIONS:MCLI}
102
	@(cd ${WRKDIR} && ${PERL} ./yv_5.16_to_5.10.pl ${WRKSRC}/bin/youtube-viewer > youtube-viewer-stable)
103
	${INSTALL_SCRIPT} ${WRKDIR}/youtube-viewer-stable ${PREFIX}/bin
104
	@${ECHO_CMD}
105
	@${CAT} ${PKGMESSAGE}
106
	@${ECHO_CMD}
107
.endif
108
109
.if ${PORT_OPTIONS:MGTK2}
109
.if ${PORT_OPTIONS:MGTK2}
110
	@${MKDIR} ${PREFIX}/share/applications
110
	@${MKDIR} ${PREFIX}/share/applications
111
	${INSTALL_DATA} ${WRKSRC}/share/gtk-youtube-viewer.desktop ${PREFIX}/share/applications
111
	${INSTALL_DATA} ${WRKSRC}/share/gtk-youtube-viewer.desktop ${PREFIX}/share/applications
(-)./files/pkg-message.in (+20 lines)
Line 0 Link Here
1
===============================================================================
2
3
GTK Youtube Viewer has been installed.
4
5
This package needs Perl 5.16 or Perl 5.14.
6
7
Please read UPDATING entry from 20120630 after installation.
8
9
10
Youtube Viewer (CLI Version) can use either Perl version, please use
11
12
for Perl 5.16
13
14
    %%PREFIX%%/bin/youtube-viewer
15
16
for Perl 5.14
17
18
    %%PREFIX%%/bin/youtube-viewer-stable
19
20
===============================================================================
(-)./files/yv_5.16_to_5.10.pl.in (+12 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# usage: ./script.pl /usr/bin/youtube-viewer > new-youtube-viewer
4
5
my $sub = '';
6
while(<>){
7
    s{^use 5.01\K\d}{0};
8
    $sub = $1 if /^sub\s+(\w+)/;
9
    s{^\s+(?:or)?\s*\K__SUB__->\(}{$sub(};
10
    s{\b__SUB__\b}{\\&$sub};
11
    print;
12
}
(-)./pkg-plist (-9 / +1 lines)
Lines 1-5 Link Here
1
%%GTK2%%bin/gtk-youtube-viewer
1
%%GTK2%%bin/gtk-youtube-viewer
2
%%CLI%%bin/youtube-viewer
2
%%CLI%%bin/youtube-viewer
3
%%CLI%%bin/youtube-viewer-stable
3
%%SITE_PERL%%/WWW/YoutubeViewer.pm
4
%%SITE_PERL%%/WWW/YoutubeViewer.pm
4
%%SITE_PERL%%/WWW/YoutubeViewer/GetCaption.pm
5
%%SITE_PERL%%/WWW/YoutubeViewer/GetCaption.pm
5
%%SITE_PERL%%/WWW/YoutubeViewer/Itags.pm
6
%%SITE_PERL%%/WWW/YoutubeViewer/Itags.pm
Lines 20-32 Link Here
20
%%GTK2%%@dirrm %%DATADIR%%
21
%%GTK2%%@dirrm %%DATADIR%%
21
%%GTK2%%@dirrmtry share/applications
22
%%GTK2%%@dirrmtry share/applications
22
%%GTK2%%@dirrm %%SITE_PERL%%/mach/auto/WWW/YoutubeViewer
23
%%GTK2%%@dirrm %%SITE_PERL%%/mach/auto/WWW/YoutubeViewer
23
%%GTK2%%@dirrm %%SITE_PERL%%/mach/auto/WWW
24
%%GTK2%%@dirrm %%SITE_PERL%%/mach/auto
25
%%GTK2%%@dirrm %%SITE_PERL%%/mach
26
@dirrm %%SITE_PERL%%/WWW/YoutubeViewer
24
@dirrm %%SITE_PERL%%/WWW/YoutubeViewer
27
@dirrm %%SITE_PERL%%/WWW
28
@dirrm %%SITE_PERL%%
29
@dirrmtry lib/perl5/site_perl
30
@dirrmtry lib/perl5/5.14.2/man
31
@dirrmtry lib/perl5/5.14.2
32
@dirrmtry lib/perl5

Return to bug 177775