dev-lang/elixir: add git test dependency, bug #716038
authorSergei Trofimovich <slyfox@gentoo.org>
Fri, 3 Apr 2020 22:20:31 +0000 (23:20 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Fri, 3 Apr 2020 22:20:31 +0000 (23:20 +0100)
Without `git` installed tests fail as:

```
** (ErlangError) Erlang error: :enoent
    (elixir 1.10.2) lib/system.ex:795: System.cmd("git", ["--version"],
    [cd: "/var/tmp/portage/dev-lang/elixir-1.10.2/work/elixir-1.10.2/lib/mix",
    into: "", stderr_to_stdout: true])
    (mix 1.10.2) lib/mix/scm/git.ex:253: Mix.SCM.Git.git!/2
    (mix 1.10.2) lib/mix/scm/git.ex:293: Mix.SCM.Git.git_version/0
    test/test_helper.exs:12: (file)
make: *** [Makefile:113: test_mix] Error 1
```

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/716038
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
dev-lang/elixir/elixir-1.10.2.ebuild

index 2d3fd641b427e8fce889752b9d21149fc25bc496..004be92a428f9a709851c9e9255f51135ea592d4 100644 (file)
@@ -10,13 +10,18 @@ SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar
 LICENSE="Apache-2.0 ErlPL-1.1"
 SLOT="0"
 KEYWORDS="amd64 ~arm ~arm64 ~ia64 ~ppc ~sparc ~x86"
-IUSE=""
+IUSE="test"
 
-DEPEND=">=dev-lang/erlang-21:0=[ssl]"
+DEPEND="
+       >=dev-lang/erlang-21:0=[ssl]
+"
 # 'mix' tool collides with sci-biology/phylip, bug #537514
 RDEPEND="${DEPEND}
        !!sci-biology/phylip
 "
+DEPEND+="
+       test? ( dev-vcs/git )
+"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch