dev-haskell/foldl: fix building without USE=test

The recent cabal-doctest patch broke building without USE=test since
MIN_VERSION_cabal_doctest will be undefined. Fix this by defining it at
the top of Setup.hs if it's undefined

Closes: https://bugs.gentoo.org/917624
Signed-off-by: hololeap <hololeap@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33919
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Violet Purcell
2023-11-13 12:42:45 -05:00
committed by Sam James
parent c2e4b5ecdb
commit c420baf69d

View File

@@ -18,11 +18,15 @@ diff --git a/Setup.hs b/Setup.hs
index 9a994af..f21ad76 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,2 +1,19 @@
@@ -1,2 +1,23 @@
+{-# LANGUAGE CPP #-}
+
+module Main (main) where
+
+#ifndef MIN_VERSION_cabal_doctest
+#define MIN_VERSION_cabal_doctest(x,y,z) 0
+#endif
+
+#if MIN_VERSION_cabal_doctest(1,0,0)
+
+import Distribution.Extra.Doctest ( defaultMainWithDoctests )