diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-10-18 01:33:19 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-10-18 01:34:43 +0200 |
commit | aae6843f51f54679d440fb3813e61355dc8406b9 (patch) | |
tree | 4943c3cd4e5617a0254b776d0e1e6b12294f2bfc | |
parent | 4c371ddb80218d049e5232d6573c83749541bed3 (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.hs | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |