commit:     a6509d27bb29af2860ff5fb304a35f6ca580cb37
Author:     Yuri Sevatz <yuri_sevatz <AT> hotmail <DOT> com>
AuthorDate: Thu May 21 05:09:25 2015 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu May 21 05:09:25 2015 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=a6509d27

[media-video/minitube] Add gentoo's google api key env variable

 media-video/minitube/minitube-9999.ebuild | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/media-video/minitube/minitube-9999.ebuild 
b/media-video/minitube/minitube-9999.ebuild
index fd5b2aa..9ce2d5b 100644
--- a/media-video/minitube/minitube-9999.ebuild
+++ b/media-video/minitube/minitube-9999.ebuild
@@ -36,6 +36,22 @@ S=${WORKDIR}/${PN}
 
 DOCS="AUTHORS CHANGES TODO"
 
+pkg_pretend() {
+       if [[ -z ${MINITUBE_GOOGLE_API_KEY} ]]; then
+               eerror ""
+               eerror "Since version 2.4, you need to generate a Google API 
Key to use"
+               eerror "with this application. Please head over to"
+               eerror "https://console.developers.google.com/ and"
+               eerror 
"https://github.com/flaviotordini/minitube/blob/master/README.md";
+               eerror "for more information. Once you have generated your key,"
+               eerror "please export it to your environment ie :"
+               eerror "'export MINITUBE_GOOGLE_API_KEY=\"YourAPIKeyHere\""
+               eerror "and then try to merge this package again"
+               eerror ""
+               die "MINITUBE_GOOGLE_API_KEY env variable not defined!"
+       fi
+}
+
 src_prepare() {
        qt4-r2_src_prepare
 
@@ -51,6 +67,7 @@ src_prepare() {
        epatch "${FILESDIR}"/${PN}-1.9-gcc47.patch
        # Enable video downloads. Bug #491344
        use download && { echo "DEFINES += APP_DOWNLOADS" >> ${PN}.pro; }
+       echo "DEFINES += APP_GOOGLE_API_KEY=${MINITUBE_GOOGLE_API_KEY}" >> 
${PN}.pro
 }
 
 src_install() {

Reply via email to