dev-vcs/mercurial: make chg optional behind USE=chg (use-default)
authorFabian Groffen <grobian@gentoo.org>
Mon, 15 Apr 2019 09:40:25 +0000 (11:40 +0200)
committerFabian Groffen <grobian@gentoo.org>
Mon, 15 Apr 2019 09:40:36 +0000 (11:40 +0200)
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@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
RepoMan-Options: --force

dev-vcs/mercurial/mercurial-4.9-r2.ebuild [moved from dev-vcs/mercurial/mercurial-4.9-r1.ebuild with 93% similarity]
dev-vcs/mercurial/mercurial-9999.ebuild
dev-vcs/mercurial/metadata.xml

similarity index 93%
rename from dev-vcs/mercurial/mercurial-4.9-r1.ebuild
rename to dev-vcs/mercurial/mercurial-4.9-r2.ebuild
index d4c35b6b713dad301aeb272fb617b250ea0d2921..931e3ed280d79e76b213aed0b726df4d416fb9ef 100644 (file)
@@ -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
index 797fc104685bbefd3abc56b83c11fcfe5104c7c9..39b4c67502eb585a78018623ab994e65191b9501 100644 (file)
@@ -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
index 6f2bedbfd600db241e24c7b755b2bf227296f1f4..8abebf1fdf19dd8b2dfded785c71c6cfc6dc646c 100644 (file)
@@ -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>