remove TDFA build flag

This commit is contained in:
Joey Hess 2016-01-26 08:52:34 -04:00
parent dcfb038cd2
commit ecec42bbb4
Failed to extract signature
4 changed files with 4 additions and 35 deletions

View file

@ -73,9 +73,6 @@ buildFlags = filter (not . null)
#else
#warning Building without ConcurrentOutput
#endif
#ifdef WITH_TDFA
, "TDFA"
#endif
#ifdef WITH_TORRENTPARSER
, "TorrentParser"
#endif

View file

@ -1,15 +1,10 @@
{- 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>
-
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.Glob (
Glob,
GlobCase(..),
@ -19,13 +14,8 @@ module Utility.Glob (
import System.Path.WildMatch
#ifdef WITH_TDFA
import "regex-tdfa" Text.Regex.TDFA
import "regex-tdfa" Text.Regex.TDFA.String
#else
import Text.Regex
import Data.Maybe
#endif
newtype Glob = Glob Regex
@ -34,13 +24,9 @@ data GlobCase = CaseSensative | CaseInsensative
{- Compiles a glob to a regex, that can be repeatedly used. -}
compileGlob :: String -> GlobCase -> Glob
compileGlob glob globcase = Glob $
#ifdef WITH_TDFA
case compile (defaultCompOpt {caseSensitive = casesentitive}) defaultExecOpt regex of
Right r -> r
Left _ -> error $ "failed to compile regex: " ++ regex
#else
mkRegexWithOpts regex casesentitive True
#endif
where
regex = '^':wildToRegex glob
casesentitive = case globcase of
@ -49,10 +35,6 @@ compileGlob glob globcase = Glob $
matchGlob :: Glob -> String -> Bool
matchGlob (Glob regex) val =
#ifdef WITH_TDFA
case execute regex val of
Right (Just _) -> True
_ -> False
#else
isJust $ matchRegex regex val
#endif

6
debian/changelog vendored
View file

@ -20,10 +20,8 @@ git-annex (6.20160115) UNRELEASED; urgency=medium
expression matches some data.
* Removed the webapp-secure build flag, rolling it into the webapp build
flag.
* Removed the quvi and tahoe build flags, which only adds aeson to
the core dependencies.
* Removed the feed build flag, which only adds feed to the core
dependencies.
* Removed the quvi, tahoe, feed, and tfds build flags, adding
aeson feed and regex-tdfa to the core dependencies.
* Roll the dns build flag into the assistant build flag.
-- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400

View file

@ -60,9 +60,6 @@ Flag AndroidSplice
Flag TestSuite
Description: Embed the test suite into git-annex
Flag TDFA
Description: Use regex-tdfa for wildcards
Flag TorrentParser
Description: Use haskell torrent library to parse torrent files
@ -104,7 +101,8 @@ Executable git-annex
time, old-locale,
esqueleto, persistent-sqlite, persistent, persistent-template,
aeson,
feed
feed,
regex-tdfa
CC-Options: -Wall
GHC-Options: -Wall -fno-warn-tabs
Extensions: PackageImports
@ -147,12 +145,6 @@ Executable git-annex
crypto-api
CPP-Options: -DWITH_TESTSUITE
if flag(TDFA)
Build-Depends: regex-tdfa
CPP-Options: -DWITH_TDFA
else
Build-Depends: regex-compat
if flag(S3)
Build-Depends: conduit, conduit-extra, aws (>= 0.9.2)
CPP-Options: -DWITH_S3