diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/xvideoservicethief | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/xvideoservicethief')
5 files changed, 318 insertions, 0 deletions
diff --git a/media-video/xvideoservicethief/Manifest b/media-video/xvideoservicethief/Manifest new file mode 100644 index 000000000000..bb52fd840a1e --- /dev/null +++ b/media-video/xvideoservicethief/Manifest @@ -0,0 +1 @@ +DIST xVST_2_4_1_src.zip 3817619 SHA256 cbd1f24156bdb6e3527b5b4d6823441881462442b9aeeb36098abcf16fbe7a29 SHA512 d0f23c3ac652326d3dd53ef66ba7db0c09ba28f8f7ad0bee864cab057b87d4b171f6076675abe443f738d7c715ec79d507e8d08fd595db3208fc4f9c5548eb2c WHIRLPOOL c19d6fac3a781435de6d4615a02ec00d21069387051ac0bdfda09d668ab70141a115ea1633d7290c3789f2353ddcf308f4372391a20a7689f94dc11df26561d8 diff --git a/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-gcc47.patch b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-gcc47.patch new file mode 100644 index 000000000000..90ea8a88ba82 --- /dev/null +++ b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-gcc47.patch @@ -0,0 +1,16 @@ +Index: work/src/qtsingleapplication/src/qtlocalpeer.cpp +=================================================================== +--- work.orig/src/qtsingleapplication/src/qtlocalpeer.cpp ++++ work/src/qtsingleapplication/src/qtlocalpeer.cpp +@@ -100,7 +100,11 @@ QtLocalPeer::QtLocalPeer(QObject* parent + socketName += QLatin1Char('-') + QString::number(sessionId, 16);
+ }
+ #else
++#if __GNUC__ >= 4 && __GNUC_MINOR__ <=6
+ socketName += QLatin1Char('-') + QString::number(::getuid(), 16);
++#else
++ socketName += QLatin1Char('-') + QString::number(QtLP_Private::getuid(), 16);
++#endif
+ #endif
+
+ server = new QLocalServer(this);
diff --git a/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch new file mode 100644 index 000000000000..7bffe12f0d0d --- /dev/null +++ b/media-video/xvideoservicethief/files/xvideoservicethief-2.4.1-youtube-api.patch @@ -0,0 +1,205 @@ +--- trunk/resources/services/youtube/youtube.js 2010/09/02 11:52:07 911 ++++ trunk/resources/services/youtube/youtube.js 2012/05/08 17:34:53 975 +@@ -3,7 +3,7 @@ + * This file is part of xVideoServiceThief, + * an open-source cross-platform Video service download + * +-* Copyright (C) 2007 - 2010 Xesc & Technology ++* Copyright (C) 2007 - 2012 Xesc & Technology + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -25,9 +25,9 @@ + + function RegistVideoService() + { +- this.version = "2.1.5"; ++ this.version = "3.0.6"; + this.minVersion = "2.0.0a"; +- this.author = "Xesc & Technology 2009"; ++ this.author = "Xesc & Technology 2012"; + this.website = "http://www.youtube.com/"; + this.ID = "youtube.com"; + this.caption = "YouTube"; +@@ -38,7 +38,6 @@ + function getVideoInformation(url) + { + const URL_YOUTBE = "http://www.youtube.com/watch?v=%1"; +- const HD_VIDEO_RES = "22"; + // init result + var result = new VideoDefinition(); + // default URL +@@ -52,35 +51,112 @@ + embededID = strRemove(embededID, 0, embededID.lastIndexOf("/v/") + 3); + youTubeURL = strFormat(URL_YOUTBE, embededID); + } ++ // cehck if is an embeded video (v2) ++ else if (youTubeURL.toString().indexOf("/embed/") != -1) ++ { ++ var embededID = copyBetween(youTubeURL + "?", "/embed/", "?"); ++ youTubeURL = strFormat(URL_YOUTBE, embededID); ++ } + // download webpage + var http = new Http(); + var html = http.downloadWebpage(youTubeURL); ++ // get cookies ++ result.cookies = http.getCookies("|"); + // get the video title + result.title = copyBetween(html, "<title>", "</title>"); + result.title = normalizeSpaces(result.title); ++ result.title = strReplace(result.title, "\n", ""); ++ result.title = strReplace(result.title, " - YouTube", ""); + // check if this video need a login +- result.needLogin = result.title == "Broadcast Yourself."; ++ result.needLogin = strIndexOf(html, 'id="verify-details"') != -1; + // if we can continue (no loggin needed) + if (result.needLogin) return result; +- // get the video info block +- var dirtyUrl = copyBetween(html, "fmt_stream_map=", "34%7Chttp"); +- // we have an empty "dirtyUrl"?? if yes then we give it a second try +- if (dirtyUrl == "") dirtyUrl = copyBetween(html, "fmt_url_map=", "&") + "&"; +- // get the video resolution +- var vidRes = getToken(dirtyUrl, "%7C", 0); +- // check if is a HD_VIDEO_RES (for HD videos the extension is mp4) +- if (vidRes == HD_VIDEO_RES) result.extension = ".mp4"; +- // get the video url +- result.URL = getToken(dirtyUrl, "%7C", 1); +- // convert the hex codes to ascii +- result.URL = cleanUrl(result.URL); +- // remove the last "," and replace it with an "&" (if is needed) +- if (strLastIndexOf(result.URL, "&") < strLastIndexOf(result.URL, ",")) +- result.URL = strRemove(result.URL, strLastIndexOf(result.URL, ","), result.URL.toString().length) + "&"; ++ // get the video URL and extension ++ var videoInfo = getVideoUrlAndExtension(html); ++ result.URL = videoInfo.url; ++ result.extension = videoInfo.extension; + // return the video information + return result; + } + ++function getVideoUrlAndExtension(html) ++{ ++ // init result ++ var result = { url:null, extension:null }; ++ // get the flashVars value ++ var flashVars = "?" + copyBetween(html, 'flashvars=\\"', '\\"'); ++ // convert each "&" into "&" ++ flashVars = strReplace(flashVars, "\\u0026amp;", "&"); ++ // get an array with all fmt_stream_map values ++ var fmt_stream_map_arr = splitString(getUrlParam(flashVars, "url_encoded_fmt_stream_map"), "url%3D", false); ++ // default selected video quality ++ var selectedFormat = -1; ++ // detect the better quality ++ for (var n = 0; n < fmt_stream_map_arr.length && selectedFormat == -1; n++) ++ { ++ fmt_stream_map_arr[n] = "?url=" + cleanUrl(fmt_stream_map_arr[n]).toString(); ++ // remove the last "," (if exists) ++ if (strLastIndexOf(fmt_stream_map_arr[n], ",") == fmt_stream_map_arr[n].toString().length - 1) ++ fmt_stream_map_arr[n] = strRemove(fmt_stream_map_arr[n], fmt_stream_map_arr[n].toString().length - 1, 1); ++ // check video type ++ var vtype = getToken(getUrlParam(fmt_stream_map_arr[n], "type"), ";", 0); ++ // is known format? ++ if (vtype == "video/x-flv" || vtype == "video/mp4") ++ { ++ selectedFormat = n; ++ // configure video extension ++ result.extension = extensionFromVideoType(vtype); ++ } ++ } ++ // no format selected? ++ if (selectedFormat == -1) selectedFormat = 0; ++ // get the host url ++ var urlHost = getToken(fmt_stream_map_arr[selectedFormat], "?", 1); ++ urlHost = strReplace(urlHost, "url=", ""); ++ // leave only the parameters ++ fmt_stream_map_arr[selectedFormat] = getToken(fmt_stream_map_arr[selectedFormat], "?", 2); ++ // get url parts ++ var urlParts = splitString(fmt_stream_map_arr[selectedFormat], "&", false); ++ // set the url host ++ result.url = urlHost + "?"; ++ // build the initial url ++ for (var n = 0; n < urlParts.length; n++) ++ { ++ var pname = getToken(urlParts[n], "=", 0).toString(); ++ var pvalue = getToken(urlParts[n], "=", 1).toString(); ++ var duplicatedPname = strIndexOf(result.url, pname + "=") != -1; ++ // is an excluded param? ++ if (!duplicatedPname && pname != "fexp" && pname != "quality" && pname != "fallback_host" && pname != "type") ++ result.url += pname + "=" + pvalue + "&"; ++ } ++ // remove the last & ++ if (strLastIndexOf(result.url, "&") == result.url.length - 1) ++ urlInitial = strRemove(result.url, result.url.length - 1, 1); ++ // get extra (optional) params ++ var ptchn = getUrlParam(flashVars, "ptchn"); ++ if (ptchn != "") result.url += "ptchn=" + ptchn + "&"; ++ var ptk = getUrlParam(flashVars, "ptk"); ++ if (ptk != "") result.url += "ptk=" + ptk; ++ // configure the video extension (if is not yet configured) ++ if (!result.extension) ++ { ++ var vtype = getToken(getUrlParam(fmt_stream_map_arr[selectedFormat], "type"), ";", 0); ++ // configure video extension ++ result.extension = extensionFromVideoType(vtype); ++ } ++ // return ++ return result; ++} ++ ++function extensionFromVideoType(vtype) ++{ ++ if (vtype == "video/x-flv") return ".flv"; ++ if (vtype == "video/mp4") return ".mp4"; ++ if (vtype == "video/webm") return ".webm"; ++ // default extension ++ return ".flv"; ++} ++ + /* + This function "normalizeSpaces(str)" will be deprecated on next xVST version + and replaced with the new "simplifyString(str)" function (added in xVST 2.3.1) +@@ -99,9 +175,11 @@ + function searchVideos(keyWord, pageIndex) + { + const URL_SEARCH = "http://www.youtube.com/results?search_query=%1&page=%2&hl=%3"; +- const HTML_SEARCH_START = "<!-- start search results -->"; +- const HTML_SEARCH_FINISH = "<!-- end search results -->"; +- const HTML_SEARCH_SEPARATOR = '<div class="video-entry">'; ++ const HTML_SEARCH_START = '<div id="search-results">'; ++ const HTML_SEARCH_FINISH = '<div id="search-pva-content">'; ++ const HTML_SEARCH_SEPARATOR = '<div class="thumb-container">'; ++ const HTML_SEARCH_SUMMARY_START = '<p class="num-results">'; ++ const HTML_SEARCH_SUMMARY_END = '</p>'; + // replace all spaces for "+" + keyWord = strReplace(keyWord, " ", "+"); + // init search results object +@@ -110,7 +188,7 @@ + var http = new Http(); + var html = http.downloadWebpage(strFormat(URL_SEARCH, keyWord, pageIndex, searchResults.getUserLanguage())); + // get the search summary +- var summary = copyBetween(html, '<div id="search-num-results" class="name">', '</div>'); ++ var summary = copyBetween(html, HTML_SEARCH_SUMMARY_START, HTML_SEARCH_SUMMARY_END); + searchResults.setSummary(cleanSummary(summary)); + // get results html block + var htmlResults = copyBetween(html, HTML_SEARCH_START, HTML_SEARCH_FINISH); +@@ -148,14 +226,17 @@ + var tmp, videoUrl, imageUrl, title, description, duration, rating; + // get video url + videoUrl = VIDEO_URL + copyBetween(html, 'href="', '"'); +- // get title and image url ++ // get image url + tmp = copyBetween(html, '<img', '>') ; +- title = copyBetween(tmp, 'title="', '"'); + imageUrl = copyBetween(tmp, 'src="', '"'); + if (strIndexOf(imageUrl, "default.jpg") == -1) // if is not a "default.jpg"... + imageUrl = copyBetween(tmp, 'thumb="', '"'); ++ imageUrl = "http:" + imageUrl; ++ // get video title ++ title = copyBetween(html, 'dir="ltr" title="', '"'); + // get video description +- description = copyBetween(html, 'class="video-description">', '</div>'); ++ description = copyBetween(html, '<p id="video-description-', '</p>'); ++ description = copyBetween(description + '|', '>', '|'); + // get video duration + duration = convertToSeconds(copyBetween(html, '<span class="video-time">', '</span>')); + // get rating diff --git a/media-video/xvideoservicethief/metadata.xml b/media-video/xvideoservicethief/metadata.xml new file mode 100644 index 000000000000..ab398e0b55c2 --- /dev/null +++ b/media-video/xvideoservicethief/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>video</herd> + <herd>qt</herd> + <maintainer> + <email>hwoarang@gentoo.org</email> + <name>Markos Chandras</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">xviservicethief</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild b/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild new file mode 100644 index 000000000000..c153bc9c62d1 --- /dev/null +++ b/media-video/xvideoservicethief/xvideoservicethief-2.4.1-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +LANGS="br ca cs da de es fr gl hu it ja ko nl pl ro ru sv" + +inherit eutils qt4-r2 versionator + +MY_PV=$(replace_all_version_separators '_') +MY_P="xVST_${MY_PV}_src" + +DESCRIPTION="Download (and convert) videos from various Web Video Services" +HOMEPAGE="http://xviservicethief.sourceforge.net/" +SRC_URI="mirror://sourceforge/xviservicethief/${MY_P}.zip" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug doc" + +DEPEND="app-arch/unzip + >=dev-qt/qtgui-4.5.3:4 + >=dev-qt/qtwebkit-4.5.3:4 + doc? ( app-doc/doxygen )" +RDEPEND=">=dev-qt/qtgui-4.5.3:4 + virtual/ffmpeg + media-video/flvstreamer" + +RES_NAME="xVST" + +S="${WORKDIR}" + +src_prepare() { + # fix translations + mv "${S}"/resources/translations/${RES_NAME}_cz.ts \ + "${S}"/resources/translations/${RES_NAME}_cs.ts ||die + mv "${S}"/resources/translations/${RES_NAME}_jp.ts \ + "${S}"/resources/translations/${RES_NAME}_ja.ts || die + mv "${S}"/resources/translations/${RES_NAME}_du.ts \ + "${S}"/resources/translations/${RES_NAME}_nl.ts || die + mv "${S}"/resources/translations/${RES_NAME}_kr.ts \ + "${S}"/resources/translations/${RES_NAME}_ko.ts || die + # fix plugins, language path + sed -i -e "s/getApplicationPath()\ +\ \"/\"\/usr\/share\/${PN}/g" \ + "${S}"/src/options.cpp || die "failed to fix paths" + epatch "${FILESDIR}"/${P}-youtube-api.patch + # bug 427066 + epatch "${FILESDIR}"/${P}-gcc47.patch +} + +src_compile() { + local lang= + emake || die "emake failed" + for lang in "${S}"/resources/translations/*.ts; do + lrelease ${lang} + done +} + +src_install() { + dobin bin/xvst || die "dobin failed" + local dest=/usr/share/${PN}/plugins + dodir ${dest} + find resources/services -name '*.js' -exec cp -dpR {} "${D}"${dest} \; + newicon resources/images/InformationLogo.png xvst.png + make_desktop_entry /usr/bin/xvst xVideoServiceThief xvst 'Qt;AudioVideo;Video' + if use doc; then + cd "${S}/documentation/source" + sed -i "/OUTPUT_DIRECTORY/s:G\:.*:docs:" Doxyfile + doxygen Doxyfile + dohtml -r docs/html/* || die "dohtml failed" + fi + + #install translations + insinto /usr/share/${PN}/languages/ + local lang= tlang= + for lang in ${LINGUAS}; do + for tlang in ${LANGS}; do + [[ ${lang} == ${tlang} ]] && doins "${S}"/resources/translations/xVST_${tlang}.qm + done + done +} |