commit:     bb48bd139b6c0dac9f89415d31b7e955a7e7d3fc
Author:     Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
AuthorDate: Wed May  4 07:50:36 2016 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Thu May  5 10:25:35 2016 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=bb48bd13

kde5.eclass: infer SRC_URI from KDEBASE and KMNAME

Signed-off-by: Johannes Huber <johu <AT> gentoo.org>

 eclass/kde5.eclass | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 7620966..d755887 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -326,6 +326,17 @@ _calculate_src_uri() {
                        ;;
        esac
 
+       if [[ -z ${SRC_URI} && -n ${KDEBASE} ]] ; then
+               case ${PV} in
+                       *.*.[6-9]? )
+                               
SRC_URI="mirror://kde/unstable/${KDEBASE}/${PV}/src/${_kmname}-${PV}.tar.xz"
+                               RESTRICT+=" mirror"
+                               ;;
+                       *)
+                               
SRC_URI="mirror://kde/stable/${KDEBASE}/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
+               esac
+       fi
+
        if _kde_is_unreleased ; then
                RESTRICT+=" fetch"
        fi

Reply via email to