1 |
radhermit 11/03/30 04:45:14 |
2 |
|
3 |
Added: quvi-0.2.14-youtube-video-ids.patch |
4 |
quvi-0.2.14-docs.patch |
5 |
Log: |
6 |
Revision bump. Update to EAPI 4, apply upstream patch to fix totem-pl-parser and youtube videos (bug #360643 by Pacho Ramos), use bash syntax instead of versionator eclass for SRC_URI, and remove empty doc directory. |
7 |
|
8 |
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 media-libs/quvi/files/quvi-0.2.14-youtube-video-ids.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/quvi/files/quvi-0.2.14-youtube-video-ids.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/quvi/files/quvi-0.2.14-youtube-video-ids.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: quvi-0.2.14-youtube-video-ids.patch |
17 |
=================================================================== |
18 |
From 54fd2afbc1596cbb21a96adab89525ac65e06df4 Mon Sep 17 00:00:00 2001 |
19 |
From: Bastien Nocera <hadess@××××××.net> |
20 |
Date: Wed, 16 Mar 2011 23:56:19 +0000 |
21 |
Subject: [PATCH] youtube: Only accept URLs with video IDs in them |
22 |
|
23 |
--- |
24 |
share/lua/website/youtube.lua | 23 +++++++++++++++++------ |
25 |
1 files changed, 17 insertions(+), 6 deletions(-) |
26 |
|
27 |
--- a/share/lua/website/youtube.lua |
28 |
+++ b/share/lua/website/youtube.lua |
29 |
@@ -45,17 +45,28 @@ local domains = { |
30 |
"youtu.be" |
31 |
} |
32 |
|
33 |
--- Check whether the domain is handled |
34 |
-function is_handled (page_url) |
35 |
+-- Return the video ID |
36 |
+function get_video_id (page_url) |
37 |
if page_url == nil then |
38 |
- return false |
39 |
+ return nil |
40 |
end |
41 |
for k,domain in pairs(domains) do |
42 |
if page_url:find(domain) ~= nil then |
43 |
- return true |
44 |
+ page_url = youtubify(page_url) |
45 |
+ local _,_,s = page_url:find("v=([%w-_]+)") |
46 |
+ return s |
47 |
end |
48 |
end |
49 |
- return false |
50 |
+ return nil |
51 |
+end |
52 |
+ |
53 |
+-- Check whether the domain is handled |
54 |
+function is_handled (page_url) |
55 |
+ local id = get_video_id(page_url) |
56 |
+ if id == nil then |
57 |
+ return false |
58 |
+ end |
59 |
+ return true |
60 |
end |
61 |
|
62 |
-- Identify the script. |
63 |
@@ -81,7 +92,7 @@ function parse (self) |
64 |
self.host_id = "youtube" |
65 |
local page_url = youtubify(self.page_url) |
66 |
|
67 |
- local _,_,s = page_url:find("v=([%w-_]+)") |
68 |
+ local s = get_video_id(page_url) |
69 |
self.id = s or error ("no match: video id") |
70 |
|
71 |
local _,_,s = page_url:find('#t=(.+)') |
72 |
-- |
73 |
1.7.4.1 |
74 |
|
75 |
|
76 |
|
77 |
|
78 |
1.1 media-libs/quvi/files/quvi-0.2.14-docs.patch |
79 |
|
80 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/quvi/files/quvi-0.2.14-docs.patch?rev=1.1&view=markup |
81 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/quvi/files/quvi-0.2.14-docs.patch?rev=1.1&content-type=text/plain |
82 |
|
83 |
Index: quvi-0.2.14-docs.patch |
84 |
=================================================================== |
85 |
--- quvi-0.2.14/Makefile.am.orig |
86 |
+++ quvi-0.2.14/Makefile.am |
87 |
@@ -10,7 +10,11 @@ |
88 |
pkgconfigdir = $(libdir)/pkgconfig |
89 |
pkgconfig_DATA = libquvi.pc |
90 |
|
91 |
-SUBDIRS = include lib man1 src examples share doc scripts |
92 |
+SUBDIRS = include lib man1 src examples share scripts |
93 |
+ |
94 |
+if WITH_DOC |
95 |
+SUBDIRS += doc |
96 |
+endif |
97 |
|
98 |
if ENABLE_TESTS |
99 |
SUBDIRS += tests |