Commit c1fd7f9d authored by Gianfranco Costamagna's avatar Gianfranco Costamagna

haskell-hgettext: patch for newer deps

parent 2211fba0
haskell-hgettext (0.1.31.0-5) unstable; urgency=medium
* debian/patches/16.patch: Upstream fix for new cabal 2.4
* Patch for new containers
-- Gianfranco Costamagna <locutusofborg@debian.org> Wed, 28 Aug 2019 13:43:14 +0200
haskell-hgettext (0.1.31.0-4) unstable; urgency=medium
* Fixup testsuite, by removing a ":" on cabal file
......
## Description: add some description
## Origin/Author: add some origin or author
## Bug: bug URL
From e930c5d0b1d9291f55a4f86d9bcdf51fcdb2cde3 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <jtojnar@gmail.com>
Date: Thu, 14 Mar 2019 12:49:07 +0100
Subject: [PATCH] Fix build with cabal-2.4
https://github.com/haskell-hvr/hgettext/issues/15
---
src/Distribution/Simple/I18N/GetText.hs | 4 ++--
src/Internal.hs | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/Distribution/Simple/I18N/GetText.hs b/src/Distribution/Simple/I18N/GetText.hs
index f2bc7c8..7f9f8a5 100644
--- a/src/Distribution/Simple/I18N/GetText.hs
+++ b/src/Distribution/Simple/I18N/GetText.hs
@@ -78,7 +78,7 @@ import Distribution.Simple
import Distribution.Simple.InstallDirs as I
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
-import Distribution.Simple.Utils
+import Distribution.Simple.Utils (warn)
import Distribution.Verbosity
import Control.Arrow (second)
@@ -90,7 +90,7 @@ import System.Exit
import System.FilePath
import System.Process
-import Internal
+import Internal (fromPackageName, matchFileGlob)
-- | Default main function, same as
--
diff --git a/src/Internal.hs b/src/Internal.hs
index 69d3ea2..f1eb255 100644
--- a/src/Internal.hs
+++ b/src/Internal.hs
@@ -1,8 +1,14 @@
{-# LANGUAGE CPP #-}
-module Internal where
+module Internal (fromPackageName, matchFileGlob) where
import Distribution.Simple
+#if MIN_VERSION_Cabal(2,4,0)
+import Distribution.Simple.Glob (matchDirFileGlob)
+import Distribution.Verbosity (silent)
+#else
+import Distribution.Simple.Utils (matchFileGlob)
+#endif
fromPackageName :: PackageName -> String
#if MIN_VERSION_Cabal(2,0,0)
@@ -10,3 +16,10 @@ fromPackageName = unPackageName
#else
fromPackageName (PackageName s) = s
#endif
+
+#if MIN_VERSION_Cabal(2,4,0)
+-- | Newer versions of Cabal have removed this function in favour of more configurable implementation
+-- We assume Cabal 2.0
+matchFileGlob :: FilePath -> IO [FilePath]
+matchFileGlob = matchDirFileGlob silent (mkVersion [2, 0]) "."
+#endif
--- haskell-hgettext-0.1.31.0.orig/hgettext.cabal
+++ haskell-hgettext-0.1.31.0/hgettext.cabal
@@ -33,7 +33,7 @@ library
hs-source-dirs: src
build-depends: base >=4.5 && <4.13
, Cabal >=1.14 && <1.25 || == 2.0.* || == 2.2.* || == 2.4.*
- , containers >=0.4.2 && <0.6
+ , containers >=0.4.2 && <0.7
, directory >=1.1 && <1.4
, filepath >=1.3 && <1.5
, process >=1.1 && <1.7
......@@ -8,8 +8,8 @@ Index: b/hgettext.cabal
hs-source-dirs: src
- build-depends: base >=4.5 && <4.11
- , Cabal >=1.14 && <1.25 || == 2.0.*
+ build-depends: base >=4.5 && <4.12
+ , Cabal >=1.14 && <1.25 || == 2.0.* || == 2.2.*
+ build-depends: base >=4.5 && <4.13
+ , Cabal >=1.14 && <1.25 || == 2.0.* || == 2.2.* || == 2.4.*
, containers >=0.4.2 && <0.6
, directory >=1.1 && <1.4
, filepath >=1.3 && <1.5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment