Avoid depending on regex-tdfa on mips, mipsel, and s390, where it fails to build.
This commit is contained in:
parent
f387a00484
commit
2d51434341
4 changed files with 21 additions and 4 deletions
12
Limit.hs
12
Limit.hs
|
@ -13,8 +13,12 @@ import Data.Time.Clock.POSIX
|
|||
import qualified Data.Set as S
|
||||
import qualified Data.Map as M
|
||||
import System.Path.WildMatch
|
||||
#ifdef WITH_TDFA
|
||||
import Text.Regex.TDFA
|
||||
import Text.Regex.TDFA.String
|
||||
#else
|
||||
import System.Path.WildMatch
|
||||
#endif
|
||||
|
||||
import Common.Annex
|
||||
import qualified Annex
|
||||
|
@ -85,10 +89,11 @@ limitExclude :: MkLimit
|
|||
limitExclude glob = Right $ const $ return . not . matchglob glob
|
||||
|
||||
{- Could just use wildCheckCase, but this way the regex is only compiled
|
||||
- once. Also, we use regex-TDFA because it's less buggy in its support
|
||||
- of non-unicode characters. -}
|
||||
- once. Also, we use regex-TDFA when available, because it's less buggy
|
||||
- in its support of non-unicode characters. -}
|
||||
matchglob :: String -> Annex.FileInfo -> Bool
|
||||
matchglob glob fi =
|
||||
#ifdef WITH_TDFA
|
||||
case cregex of
|
||||
Right r -> case execute r (Annex.matchFile fi) of
|
||||
Right (Just _) -> True
|
||||
|
@ -97,6 +102,9 @@ matchglob glob fi =
|
|||
where
|
||||
cregex = compile defaultCompOpt defaultExecOpt regex
|
||||
regex = '^':wildToRegex glob
|
||||
#else
|
||||
wildCheckCase glob (Annex.matchFile fi)
|
||||
#endif
|
||||
|
||||
{- Adds a limit to skip files not believed to be present
|
||||
- in a specfied repository. -}
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -7,6 +7,8 @@ git-annex (4.20130502) UNRELEASED; urgency=low
|
|||
* Disable building with the haskell threaded runtime when the assistant
|
||||
is not built. This may fix builds on s390x and sparc, which are failing
|
||||
to link -lHSrts_thr
|
||||
* Avoid depending on regex-tdfa on mips, mipsel, and s390, where it fails
|
||||
to build.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 02 May 2013 20:39:19 -0400
|
||||
|
||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -9,7 +9,7 @@ Build-Depends:
|
|||
libghc-hslogger-dev,
|
||||
libghc-pcre-light-dev,
|
||||
libghc-sha-dev,
|
||||
libghc-regex-tdfa-dev,
|
||||
libghc-regex-tdfa-dev [!mips !mipsel !s390],
|
||||
libghc-dataenc-dev,
|
||||
libghc-utf8-string-dev,
|
||||
libghc-hs3-dev (>= 0.5.6),
|
||||
|
|
|
@ -62,6 +62,9 @@ Flag Android
|
|||
Flag TestSuite
|
||||
Description: Embed the test suite into git-annex
|
||||
|
||||
Flag TDFA
|
||||
Description: Use regex-tdfa for wildcards
|
||||
|
||||
Executable git-annex
|
||||
Main-Is: git-annex.hs
|
||||
Build-Depends: MissingH, hslogger, directory, filepath,
|
||||
|
@ -70,7 +73,7 @@ Executable git-annex
|
|||
extensible-exceptions, dataenc, SHA, process, json,
|
||||
base (>= 4.5 && < 4.8), monad-control, transformers-base, lifted-base,
|
||||
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
|
||||
SafeSemaphore, uuid, random, regex-tdfa, dlist
|
||||
SafeSemaphore, uuid, random, dlist
|
||||
-- Need to list these because they're generated from .hsc files.
|
||||
Other-Modules: Utility.Touch Utility.Mounts
|
||||
Include-Dirs: Utility
|
||||
|
@ -87,6 +90,10 @@ Executable git-annex
|
|||
Build-Depends: HUnit
|
||||
CPP-Options: -DWITH_TESTSUITE
|
||||
|
||||
if flag(TDFA)
|
||||
Build-Depends: regex-tdfa
|
||||
CPP-Options: -DWITH_TDFA
|
||||
|
||||
if flag(S3)
|
||||
Build-Depends: hS3
|
||||
CPP-Options: -DWITH_S3
|
||||
|
|
Loading…
Reference in a new issue