summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-10-18 01:33:19 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-10-18 01:34:43 +0200
commitaae6843f51f54679d440fb3813e61355dc8406b9 (patch)
tree4943c3cd4e5617a0254b776d0e1e6b12294f2bfc
parent4c371ddb80218d049e5232d6573c83749541bed3 (diff)
Setup.hs: Don’t import Gettext.hs without hgettext
Gettext.hs is broken with Cabal ≥ 2.4 so until we fix it, I made importing it conditional on the value of `hgettext` flag, so that the builds still work.
-rw-r--r--Setup.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Setup.hs b/Setup.hs
index dd86bba..50e7b54 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,4 +1,8 @@
+{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wall #-}
+
+#if defined(VERSION_hgettext)
+
import System.FilePath ( (</>), (<.>) )
import Distribution.PackageDescription
@@ -92,3 +96,12 @@ generateModule pkg lbi =
tar = GetText.targetDataDir lbi
-- Cargo-culted from hgettext
+
+#else
+
+import Distribution.Simple
+
+main :: IO ()
+main = defaultMain
+
+#endif