commit:     bd51c806ea638fd618f62fefde355f762058a137
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 08:12:29 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 08:14:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd51c806

dev-ml/merlin: src_prepare test fixes

Closes: https://bugs.gentoo.org/878049
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-ml/merlin/merlin-4.5-r3.ebuild | 7 +++++--
 dev-ml/merlin/merlin-4.6.ebuild    | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dev-ml/merlin/merlin-4.5-r3.ebuild 
b/dev-ml/merlin/merlin-4.5-r3.ebuild
index c33b0aee04ac..b3cc5b868e42 100644
--- a/dev-ml/merlin/merlin-4.5-r3.ebuild
+++ b/dev-ml/merlin/merlin-4.5-r3.ebuild
@@ -61,8 +61,11 @@ src_prepare() {
        # Handle installation via the eclass
        rm emacs/dune || die
 
-       # This test runs only inside a git repo
-       rm -r tests/test-dirs/occurrences/issue1404.t || die
+       # This test runs only inside a git repo,
+       # it is not included in merlin release for ocaml 4.12.
+       if [[ -f tests/test-dirs/occurrences/issue1404.t ]] ; then
+               rm tests/test-dirs/occurrences/issue1404.t || die
+       fi
 }
 
 src_compile() {

diff --git a/dev-ml/merlin/merlin-4.6.ebuild b/dev-ml/merlin/merlin-4.6.ebuild
index fa661a5ad042..8086c63f9c25 100644
--- a/dev-ml/merlin/merlin-4.6.ebuild
+++ b/dev-ml/merlin/merlin-4.6.ebuild
@@ -66,8 +66,11 @@ src_prepare() {
        # Handle installation via the eclass
        rm emacs/dune || die
 
-       # This test runs only inside a git repo
-       rm -r tests/test-dirs/occurrences/issue1404.t || die
+       # This test runs only inside a git repo,
+       # it is not included in merlin release for ocaml 4.12.
+       if [[ -f tests/test-dirs/occurrences/issue1404.t ]] ; then
+               rm tests/test-dirs/occurrences/issue1404.t || die
+       fi
        rm -r tests/test-dirs/locate/context-detection/cd-mod_constr.t || die
 }
 

Reply via email to