diff options
| author | Michael Palimaka <kensington@gentoo.org> | 2014-07-10 01:48:00 +1000 |
|---|---|---|
| committer | Michael Palimaka <kensington@gentoo.org> | 2014-07-10 01:48:00 +1000 |
| commit | bca7d1609499b0f7c76a71596f3f9dfe550d9c86 (patch) | |
| tree | 61e74653cfc7720140181b2b9e6e1b4f543c41a9 /eclass | |
| parent | d775d3654e3cf338034604b46f853547b425effc (diff) | |
| download | kde-bca7d1609499b0f7c76a71596f3f9dfe550d9c86.tar.gz kde-bca7d1609499b0f7c76a71596f3f9dfe550d9c86.tar.bz2 kde-bca7d1609499b0f7c76a71596f3f9dfe550d9c86.zip | |
[eclass] Add support for svn live ebuilds.
Diffstat (limited to 'eclass')
| -rw-r--r-- | eclass/kde5-functions.eclass | 10 | ||||
| -rw-r--r-- | eclass/kde5.eclass | 68 |
2 files changed, 55 insertions, 23 deletions
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index 5147ed9eb10..6f365f12ea4 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -38,6 +38,16 @@ elif [[ ${KMNAME-${PN}} = kdevelop ]]; then KDEBASE=kdevelop fi +# @ECLASS-VARIABLE: KDE_SCM +# @DESCRIPTION: +# SCM to use if this is a live ebuild. +: ${KDE_SCM:=git} + +case ${KDE_SCM} in + svn|git) ;; + *) die "KDE_SCM: ${KDE_SCM} is not supported" ;; +esac + # determine the build type if [[ ${PV} = *9999* ]]; then KDE_BUILD_TYPE="live" diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index e96e6ed7d79..48ea1e4e6f9 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -24,7 +24,10 @@ CMAKE_MIN_VERSION="2.8.12" inherit kde5-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils virtualx eutils cmake-utils if [[ ${KDE_BUILD_TYPE} = live ]]; then - inherit git-r3 + case ${KDE_SCM} in + svn) inherit subversion ;; + git) inherit git-r3 ;; + esac fi EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm @@ -227,28 +230,40 @@ _calculate_live_repo() { SRC_URI="" - local _kmname - # @ECLASS-VARIABLE: EGIT_MIRROR - # @DESCRIPTION: - # This variable allows easy overriding of default kde mirror service - # (anongit) with anything else you might want to use. - EGIT_MIRROR=${EGIT_MIRROR:=git://anongit.kde.org} - - # @ECLASS-VARIABLE: EGIT_REPONAME - # @DESCRIPTION: - # This variable allows overriding of default repository - # name. Specify only if this differ from PN and KMNAME. - if [[ -n ${EGIT_REPONAME} ]]; then - # the repository and kmname different - _kmname=${EGIT_REPONAME} - elif [[ -n ${KMNAME} ]]; then - _kmname=${KMNAME} - else - _kmname=${PN} - fi + case ${KDE_SCM} in + svn) + # @ECLASS-VARIABLE: ESVN_MIRROR + # @DESCRIPTION: + # This variable allows easy overriding of default kde mirror service + # (anonsvn) with anything else you might want to use. + ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde} + ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${PN}" + ;; + git) + # @ECLASS-VARIABLE: EGIT_MIRROR + # @DESCRIPTION: + # This variable allows easy overriding of default kde mirror service + # (anongit) with anything else you might want to use. + EGIT_MIRROR=${EGIT_MIRROR:=git://anongit.kde.org} + + local _kmname + + # @ECLASS-VARIABLE: EGIT_REPONAME + # @DESCRIPTION: + # This variable allows overriding of default repository + # name. Specify only if this differ from PN and KMNAME. + if [[ -n ${EGIT_REPONAME} ]]; then + # the repository and kmname different + _kmname=${EGIT_REPONAME} + elif [[ -n ${KMNAME} ]]; then + _kmname=${KMNAME} + else + _kmname=${PN} + fi - # default repo uri - EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" + EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" + ;; + esac } case ${KDE_BUILD_TYPE} in @@ -282,7 +297,14 @@ kde5_src_unpack() { debug-print-function ${FUNCNAME} "$@" if [[ ${KDE_BUILD_TYPE} = live ]]; then - git-r3_src_unpack + case ${KDE_SCM} in + svn) + subversion_src_unpack + ;; + git) + git-r3_src_unpack + ;; + esac else unpack ${A} fi |
