commit:     60ae26372c5dbb24dd9d22246eb78713483c1865
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 15 09:40:25 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr 15 09:40:36 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60ae2637

dev-vcs/mercurial: make chg optional behind USE=chg (use-default)

chg client fails to compile on at least Solaris, so allow disabling this
non-essential contrib addition.

revbump from -r1 with stable keywords per maintainer's request.

Closes: https://bugs.gentoo.org/683374
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
RepoMan-Options: --force

 .../{mercurial-4.9-r1.ebuild => mercurial-4.9-r2.ebuild} | 16 +++++++++++-----
 dev-vcs/mercurial/mercurial-9999.ebuild                  | 12 +++++++++++-
 dev-vcs/mercurial/metadata.xml                           |  1 +
 3 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/dev-vcs/mercurial/mercurial-4.9-r1.ebuild 
b/dev-vcs/mercurial/mercurial-4.9-r2.ebuild
similarity index 93%
rename from dev-vcs/mercurial/mercurial-4.9-r1.ebuild
rename to dev-vcs/mercurial/mercurial-4.9-r2.ebuild
index d4c35b6b713..931e3ed280d 100644
--- a/dev-vcs/mercurial/mercurial-4.9-r1.ebuild
+++ b/dev-vcs/mercurial/mercurial-4.9-r2.ebuild
@@ -15,7 +15,7 @@ SRC_URI="https://www.mercurial-scm.org/release/${P}.tar.gz";
 LICENSE="GPL-2+"
 SLOT="0"
 KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ~ppc ppc64 sparc ~x86 
~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="bugzilla emacs gpg test tk"
+IUSE="+chg bugzilla emacs gpg test tk"
 
 RDEPEND="app-misc/ca-certificates
        dev-python/zstandard[${PYTHON_USEDEP}]
@@ -58,7 +58,9 @@ python_configure_all() {
 
 python_compile_all() {
        rm -r contrib/win32 || die
-       emake -C contrib/chg
+       if use chg; then
+               emake -C contrib/chg
+       fi
        if use emacs; then
                cd contrib || die
                elisp-compile mercurial.el || die "elisp-compile failed!"
@@ -86,10 +88,14 @@ python_install_all() {
                elisp-site-file-install "${FILESDIR}"/${SITEFILE}
        fi
 
-       dobin contrib/chg/chg
-       doman contrib/chg/chg.1
+       local RM_CONTRIB=( hgk hg-ssh bash_completion zsh_completion wix plan9 
*.el )
+
+       if use chg; then
+               dobin contrib/chg/chg
+               doman contrib/chg/chg.1
+               RM_CONTRIB+=( chg )
+       fi
 
-       local RM_CONTRIB=( chg hgk hg-ssh bash_completion zsh_completion wix 
plan9 *.el )
        for f in ${RM_CONTRIB[@]}; do
                rm -r contrib/${f} || die
        done

diff --git a/dev-vcs/mercurial/mercurial-9999.ebuild 
b/dev-vcs/mercurial/mercurial-9999.ebuild
index 797fc104685..39b4c67502e 100644
--- a/dev-vcs/mercurial/mercurial-9999.ebuild
+++ b/dev-vcs/mercurial/mercurial-9999.ebuild
@@ -16,7 +16,7 @@ EHG_REVISION="@"
 LICENSE="GPL-2+"
 SLOT="0"
 KEYWORDS=""
-IUSE="bugzilla emacs gpg test tk zsh-completion"
+IUSE="+chg bugzilla emacs gpg test tk zsh-completion"
 
 RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
        gpg? ( app-crypt/gnupg )
@@ -52,6 +52,9 @@ python_configure_all() {
 python_compile_all() {
        rm -r contrib/{win32,macosx} || die
        emake doc
+       if use chg; then
+               emake -C contrib/chg
+       fi
        if use emacs; then
                cd contrib || die
                elisp-compile mercurial.el || die "elisp-compile failed!"
@@ -83,6 +86,13 @@ python_install_all() {
 
        local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix 
buildrpm plan9
                          *.el mercurial.spec)
+
+       if use chg; then
+               dobin contrib/chg/chg
+               doman contrib/chg/chg.1
+               RM_CONTRIB+=( chg )
+       fi
+
        for f in ${RM_CONTRIB[@]}; do
                rm -rf contrib/$f || die
        done

diff --git a/dev-vcs/mercurial/metadata.xml b/dev-vcs/mercurial/metadata.xml
index 6f2bedbfd60..8abebf1fdf1 100644
--- a/dev-vcs/mercurial/metadata.xml
+++ b/dev-vcs/mercurial/metadata.xml
@@ -6,6 +6,7 @@
     <name>Lars Wendler</name>
   </maintainer>
   <use>
+    <flag name="chg">Support Mercurial command server client</flag>
     <flag name="bugzilla">Support bugzilla integration.</flag>
     <flag name="gpg">Support signing with GnuPG.</flag>
     <flag name="tk">Install dev-lang/tk for hgk script.</flag>

Reply via email to