remove TDFA build flag
This commit is contained in:
parent
dcfb038cd2
commit
ecec42bbb4
4 changed files with 4 additions and 35 deletions
|
@ -73,9 +73,6 @@ buildFlags = filter (not . null)
|
||||||
#else
|
#else
|
||||||
#warning Building without ConcurrentOutput
|
#warning Building without ConcurrentOutput
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_TDFA
|
|
||||||
, "TDFA"
|
|
||||||
#endif
|
|
||||||
#ifdef WITH_TORRENTPARSER
|
#ifdef WITH_TORRENTPARSER
|
||||||
, "TorrentParser"
|
, "TorrentParser"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
{- file globbing
|
{- file globbing
|
||||||
-
|
|
||||||
- This uses TDFA when available, with a fallback to regex-compat.
|
|
||||||
- TDFA is less buggy in its support for non-unicode characters.
|
|
||||||
-
|
-
|
||||||
- Copyright 2014 Joey Hess <id@joeyh.name>
|
- Copyright 2014 Joey Hess <id@joeyh.name>
|
||||||
-
|
-
|
||||||
- License: BSD-2-clause
|
- License: BSD-2-clause
|
||||||
-}
|
-}
|
||||||
|
|
||||||
{-# LANGUAGE CPP #-}
|
|
||||||
|
|
||||||
module Utility.Glob (
|
module Utility.Glob (
|
||||||
Glob,
|
Glob,
|
||||||
GlobCase(..),
|
GlobCase(..),
|
||||||
|
@ -19,13 +14,8 @@ module Utility.Glob (
|
||||||
|
|
||||||
import System.Path.WildMatch
|
import System.Path.WildMatch
|
||||||
|
|
||||||
#ifdef WITH_TDFA
|
|
||||||
import "regex-tdfa" Text.Regex.TDFA
|
import "regex-tdfa" Text.Regex.TDFA
|
||||||
import "regex-tdfa" Text.Regex.TDFA.String
|
import "regex-tdfa" Text.Regex.TDFA.String
|
||||||
#else
|
|
||||||
import Text.Regex
|
|
||||||
import Data.Maybe
|
|
||||||
#endif
|
|
||||||
|
|
||||||
newtype Glob = Glob Regex
|
newtype Glob = Glob Regex
|
||||||
|
|
||||||
|
@ -34,13 +24,9 @@ data GlobCase = CaseSensative | CaseInsensative
|
||||||
{- Compiles a glob to a regex, that can be repeatedly used. -}
|
{- Compiles a glob to a regex, that can be repeatedly used. -}
|
||||||
compileGlob :: String -> GlobCase -> Glob
|
compileGlob :: String -> GlobCase -> Glob
|
||||||
compileGlob glob globcase = Glob $
|
compileGlob glob globcase = Glob $
|
||||||
#ifdef WITH_TDFA
|
|
||||||
case compile (defaultCompOpt {caseSensitive = casesentitive}) defaultExecOpt regex of
|
case compile (defaultCompOpt {caseSensitive = casesentitive}) defaultExecOpt regex of
|
||||||
Right r -> r
|
Right r -> r
|
||||||
Left _ -> error $ "failed to compile regex: " ++ regex
|
Left _ -> error $ "failed to compile regex: " ++ regex
|
||||||
#else
|
|
||||||
mkRegexWithOpts regex casesentitive True
|
|
||||||
#endif
|
|
||||||
where
|
where
|
||||||
regex = '^':wildToRegex glob
|
regex = '^':wildToRegex glob
|
||||||
casesentitive = case globcase of
|
casesentitive = case globcase of
|
||||||
|
@ -49,10 +35,6 @@ compileGlob glob globcase = Glob $
|
||||||
|
|
||||||
matchGlob :: Glob -> String -> Bool
|
matchGlob :: Glob -> String -> Bool
|
||||||
matchGlob (Glob regex) val =
|
matchGlob (Glob regex) val =
|
||||||
#ifdef WITH_TDFA
|
|
||||||
case execute regex val of
|
case execute regex val of
|
||||||
Right (Just _) -> True
|
Right (Just _) -> True
|
||||||
_ -> False
|
_ -> False
|
||||||
#else
|
|
||||||
isJust $ matchRegex regex val
|
|
||||||
#endif
|
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -20,10 +20,8 @@ git-annex (6.20160115) UNRELEASED; urgency=medium
|
||||||
expression matches some data.
|
expression matches some data.
|
||||||
* Removed the webapp-secure build flag, rolling it into the webapp build
|
* Removed the webapp-secure build flag, rolling it into the webapp build
|
||||||
flag.
|
flag.
|
||||||
* Removed the quvi and tahoe build flags, which only adds aeson to
|
* Removed the quvi, tahoe, feed, and tfds build flags, adding
|
||||||
the core dependencies.
|
aeson feed and regex-tdfa to the core dependencies.
|
||||||
* Removed the feed build flag, which only adds feed to the core
|
|
||||||
dependencies.
|
|
||||||
* Roll the dns build flag into the assistant build flag.
|
* Roll the dns build flag into the assistant build flag.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400
|
-- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400
|
||||||
|
|
|
@ -60,9 +60,6 @@ Flag AndroidSplice
|
||||||
Flag TestSuite
|
Flag TestSuite
|
||||||
Description: Embed the test suite into git-annex
|
Description: Embed the test suite into git-annex
|
||||||
|
|
||||||
Flag TDFA
|
|
||||||
Description: Use regex-tdfa for wildcards
|
|
||||||
|
|
||||||
Flag TorrentParser
|
Flag TorrentParser
|
||||||
Description: Use haskell torrent library to parse torrent files
|
Description: Use haskell torrent library to parse torrent files
|
||||||
|
|
||||||
|
@ -104,7 +101,8 @@ Executable git-annex
|
||||||
time, old-locale,
|
time, old-locale,
|
||||||
esqueleto, persistent-sqlite, persistent, persistent-template,
|
esqueleto, persistent-sqlite, persistent, persistent-template,
|
||||||
aeson,
|
aeson,
|
||||||
feed
|
feed,
|
||||||
|
regex-tdfa
|
||||||
CC-Options: -Wall
|
CC-Options: -Wall
|
||||||
GHC-Options: -Wall -fno-warn-tabs
|
GHC-Options: -Wall -fno-warn-tabs
|
||||||
Extensions: PackageImports
|
Extensions: PackageImports
|
||||||
|
@ -147,12 +145,6 @@ Executable git-annex
|
||||||
crypto-api
|
crypto-api
|
||||||
CPP-Options: -DWITH_TESTSUITE
|
CPP-Options: -DWITH_TESTSUITE
|
||||||
|
|
||||||
if flag(TDFA)
|
|
||||||
Build-Depends: regex-tdfa
|
|
||||||
CPP-Options: -DWITH_TDFA
|
|
||||||
else
|
|
||||||
Build-Depends: regex-compat
|
|
||||||
|
|
||||||
if flag(S3)
|
if flag(S3)
|
||||||
Build-Depends: conduit, conduit-extra, aws (>= 0.9.2)
|
Build-Depends: conduit, conduit-extra, aws (>= 0.9.2)
|
||||||
CPP-Options: -DWITH_S3
|
CPP-Options: -DWITH_S3
|
||||||
|
|
Loading…
Reference in a new issue