commit:     1a551cea0052b43c6ce7ebff00dcde50655feb45
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 28 18:27:09 2020 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Thu Dec 31 14:21:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a551cea

mail-client/roundcube: Add -9999 live ebuild

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/18852
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 mail-client/roundcube/roundcube-1.4.9.ebuild       | 27 +++++++++++++++++++---
 ...oundcube-1.4.9.ebuild => roundcube-9999.ebuild} | 27 +++++++++++++++++++---
 2 files changed, 48 insertions(+), 6 deletions(-)

diff --git a/mail-client/roundcube/roundcube-1.4.9.ebuild 
b/mail-client/roundcube/roundcube-1.4.9.ebuild
index e3ccf0af49a..0b5033a74a7 100644
--- a/mail-client/roundcube/roundcube-1.4.9.ebuild
+++ b/mail-client/roundcube/roundcube-1.4.9.ebuild
@@ -11,12 +11,10 @@ MY_P=${MY_PN}-${MY_PV}
 
 DESCRIPTION="A browser-based multilingual IMAP client with an application-like 
user interface"
 HOMEPAGE="https://roundcube.net";
-SRC_URI="https://github.com/${PN}/${MY_PN}/releases/download/${MY_PV}/${MY_P}-complete.tar.gz";
 
 # roundcube is GPL-licensed, the rest of the licenses here are
 # for bundled PEAR components, googiespell and utf8.class.php
 LICENSE="GPL-3 BSD PHP-2.02 PHP-3 MIT public-domain"
-KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
 
 IUSE="change-password enigma ldap mysql postgres sqlite ssl spell"
 REQUIRED_USE="|| ( mysql postgres sqlite )"
@@ -43,7 +41,30 @@ RDEPEND="
        spell? ( dev-lang/php[curl,spell] )
 "
 
-S="${WORKDIR}/${MY_P}"
+if [[ ${PV} == *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/roundcube/roundcubemail";
+       EGIT_BRANCH="master"
+       DEPEND="${DEPEND}
+               dev-php/composer"
+else
+       
SRC_URI="https://github.com/${PN}/${MY_PN}/releases/download/${MY_PV}/${MY_P}-complete.tar.gz";
+       S="${WORKDIR}/${MY_P}"
+       KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+src_unpack() {
+       if [[ "${PV}" == *9999* ]]; then
+               git-r3_src_unpack
+               pushd "${S}" > /dev/null || die
+               mv composer.json-dist composer.json || die
+               composer install --no-dev || die
+               ./bin/install-jsdeps.sh || die
+               popd > /dev/null || die
+       else
+               default
+       fi
+}
 
 src_install() {
        webapp_src_preinst

diff --git a/mail-client/roundcube/roundcube-1.4.9.ebuild 
b/mail-client/roundcube/roundcube-9999.ebuild
similarity index 72%
copy from mail-client/roundcube/roundcube-1.4.9.ebuild
copy to mail-client/roundcube/roundcube-9999.ebuild
index e3ccf0af49a..0b5033a74a7 100644
--- a/mail-client/roundcube/roundcube-1.4.9.ebuild
+++ b/mail-client/roundcube/roundcube-9999.ebuild
@@ -11,12 +11,10 @@ MY_P=${MY_PN}-${MY_PV}
 
 DESCRIPTION="A browser-based multilingual IMAP client with an application-like 
user interface"
 HOMEPAGE="https://roundcube.net";
-SRC_URI="https://github.com/${PN}/${MY_PN}/releases/download/${MY_PV}/${MY_P}-complete.tar.gz";
 
 # roundcube is GPL-licensed, the rest of the licenses here are
 # for bundled PEAR components, googiespell and utf8.class.php
 LICENSE="GPL-3 BSD PHP-2.02 PHP-3 MIT public-domain"
-KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
 
 IUSE="change-password enigma ldap mysql postgres sqlite ssl spell"
 REQUIRED_USE="|| ( mysql postgres sqlite )"
@@ -43,7 +41,30 @@ RDEPEND="
        spell? ( dev-lang/php[curl,spell] )
 "
 
-S="${WORKDIR}/${MY_P}"
+if [[ ${PV} == *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/roundcube/roundcubemail";
+       EGIT_BRANCH="master"
+       DEPEND="${DEPEND}
+               dev-php/composer"
+else
+       
SRC_URI="https://github.com/${PN}/${MY_PN}/releases/download/${MY_PV}/${MY_P}-complete.tar.gz";
+       S="${WORKDIR}/${MY_P}"
+       KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+src_unpack() {
+       if [[ "${PV}" == *9999* ]]; then
+               git-r3_src_unpack
+               pushd "${S}" > /dev/null || die
+               mv composer.json-dist composer.json || die
+               composer install --no-dev || die
+               ./bin/install-jsdeps.sh || die
+               popd > /dev/null || die
+       else
+               default
+       fi
+}
 
 src_install() {
        webapp_src_preinst

Reply via email to