diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2014-08-10 22:34:50 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2014-08-10 22:34:50 +0000 |
commit | cc555442337c7591ab5c3fd19ad8e3e185a256b0 (patch) | |
tree | a6a0dfa4f440949889fc7b609c83f74555f6894e /converters | |
parent | 5e492199d1e024a681c6d21087c8d948cb3b7bc3 (diff) |
Notes
Diffstat (limited to 'converters')
-rw-r--r-- | converters/hs-aeson/Makefile | 11 | ||||
-rw-r--r-- | converters/hs-aeson/distinfo | 4 | ||||
-rw-r--r-- | converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs | 76 | ||||
-rw-r--r-- | converters/hs-aeson/files/patch-aeson.cabal | 11 | ||||
-rw-r--r-- | converters/hs-dataenc/Makefile | 5 | ||||
-rw-r--r-- | converters/hs-dataenc/distinfo | 4 | ||||
-rw-r--r-- | converters/hs-json/Makefile | 7 |
7 files changed, 102 insertions, 16 deletions
diff --git a/converters/hs-aeson/Makefile b/converters/hs-aeson/Makefile index 219293018c8d..7a66b48071eb 100644 --- a/converters/hs-aeson/Makefile +++ b/converters/hs-aeson/Makefile @@ -1,18 +1,17 @@ # $FreeBSD$ PORTNAME= aeson -PORTVERSION= 0.6.1.0 -PORTREVISION= 6 +PORTVERSION= 0.7.0.6 CATEGORIES= converters haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Fast JSON parsing and encoding -LICENSE= BSD +LICENSE= BSD3CLAUSE -USE_CABAL= attoparsec>=0.8.6.1 blaze-builder>=0.2.1.4 dlist>=0.2 \ - hashable>=1.1.2.0 mtl syb text>=0.11.1.0 \ - unordered-containers>=0.1.3.0 vector>=0.7.1 +USE_CABAL= attoparsec>=0.10.4.0 dlist>=0.2 hashable>=1.1.2.0 mtl \ + scientific>=0.3.1 syb text>=0.11.1.0 unordered-containers>=0.2.3.0 \ + vector>=0.7.1 .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" .include <bsd.port.mk> diff --git a/converters/hs-aeson/distinfo b/converters/hs-aeson/distinfo index 7152a620d765..c64246dd65be 100644 --- a/converters/hs-aeson/distinfo +++ b/converters/hs-aeson/distinfo @@ -1,2 +1,2 @@ -SHA256 (cabal/aeson-0.6.1.0.tar.gz) = 7d4de8aee47d3ed7f5171c619a83a18f741dfb4a59808e9e0eb3beba3ce3129a -SIZE (cabal/aeson-0.6.1.0.tar.gz) = 101599 +SHA256 (cabal/aeson-0.7.0.6.tar.gz) = 645531759ba18105cadf024415e1be60353ad704ac686ff5ee67c7f4754d4e6f +SIZE (cabal/aeson-0.7.0.6.tar.gz) = 141565 diff --git a/converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs b/converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs new file mode 100644 index 000000000000..759362be0d67 --- /dev/null +++ b/converters/hs-aeson/files/patch-Data__Aeson__Parser__Internal.hs @@ -0,0 +1,76 @@ +--- ./Data/Aeson/Parser/Internal.hs.orig 2014-05-16 17:43:52.000000000 +0200 ++++ ./Data/Aeson/Parser/Internal.hs 2014-07-12 19:54:00.000000000 +0200 +@@ -41,25 +41,29 @@ + (Builder, byteString, toLazyByteString, charUtf8, word8) + #endif + +-import Control.Applicative ((*>), (<$>), (<*), liftA2, pure) ++import Control.Applicative ((*>), (<$>), (<*), (<|>), liftA2, pure) ++import Control.Monad (when, void) + import Data.Aeson.Types (Result(..), Value(..)) +-import Data.Attoparsec.Char8 (Parser, char, endOfInput, scientific, +- skipSpace, string) ++import Data.Attoparsec.Char8 (Parser, char, endOfInput, isDigit_w8, ++ skipSpace, string, decimal, signed) + import Data.Bits ((.|.), shiftL) + import Data.ByteString (ByteString) + import Data.Char (chr) + import Data.Monoid (mappend, mempty) ++import Data.Scientific (Scientific) + import Data.Text (Text) + import Data.Text.Encoding (decodeUtf8') + import Data.Vector as Vector (Vector, fromList) + import Data.Word (Word8) + import qualified Data.Attoparsec as A ++import qualified Data.Attoparsec.ByteString as I + import qualified Data.Attoparsec.Lazy as L + import qualified Data.Attoparsec.Zepto as Z + import qualified Data.ByteString as B + import qualified Data.ByteString.Lazy as L + import qualified Data.ByteString.Unsafe as B + import qualified Data.HashMap.Strict as H ++import qualified Data.Scientific as Sci + + #define BACKSLASH 92 + #define CLOSE_CURLY 125 +@@ -356,3 +360,40 @@ + #else + peekWord8' = maybe (fail "not enough bytes") return =<< A.peekWord8 + #endif ++ ++scientific :: A.Parser Scientific ++scientific = scientifically id ++ ++-- A strict pair ++data SP = SP !Integer {-# UNPACK #-}!Int ++ ++{-# INLINE scientifically #-} ++scientifically :: (Scientific -> a) -> Parser a ++scientifically h = do ++ let minus = 45 ++ plus = 43 ++ sign <- peekWord8' ++ let !positive = sign == plus || sign /= minus ++ when (sign == plus || sign == minus) $ ++ void $ I.anyWord8 ++ ++ n <- decimal ++ ++ let f fracDigits = SP (B.foldl' step n fracDigits) ++ (negate $ B.length fracDigits) ++ step a w = a * 10 + fromIntegral (w - 48) ++ ++ dotty <- I.peekWord8 ++ -- '.' -> ascii 46 ++ SP c e <- case dotty of ++ Just 46 -> I.anyWord8 *> (f <$> I.takeWhile isDigit_w8) ++ _ -> pure (SP n 0) ++ ++ let !signedCoeff | positive = c ++ | otherwise = -c ++ ++ let littleE = 101 ++ bigE = 69 ++ (I.satisfy (\ex -> ex == littleE || ex == bigE) *> ++ fmap (h . Sci.scientific signedCoeff . (e +)) (signed decimal)) <|> ++ return (h $ Sci.scientific signedCoeff e) diff --git a/converters/hs-aeson/files/patch-aeson.cabal b/converters/hs-aeson/files/patch-aeson.cabal new file mode 100644 index 000000000000..0d2683706ccb --- /dev/null +++ b/converters/hs-aeson/files/patch-aeson.cabal @@ -0,0 +1,11 @@ +--- ./aeson.cabal.orig 2014-05-16 17:43:52.000000000 +0200 ++++ ./aeson.cabal 2014-07-12 19:15:00.000000000 +0200 +@@ -112,7 +112,7 @@ + Data.Aeson.Types.Generic + + build-depends: +- attoparsec >= 0.11.3.4, ++ attoparsec >= 0.10.4.0, + base == 4.*, + containers, + deepseq, diff --git a/converters/hs-dataenc/Makefile b/converters/hs-dataenc/Makefile index 404b6290f380..623c0aabaea3 100644 --- a/converters/hs-dataenc/Makefile +++ b/converters/hs-dataenc/Makefile @@ -1,14 +1,13 @@ # $FreeBSD$ PORTNAME= dataenc -PORTVERSION= 0.14.0.5 -PORTREVISION= 5 +PORTVERSION= 0.14.0.7 CATEGORIES= converters haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Data encoding library -LICENSE= BSD +LICENSE= BSD3CLAUSE .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" .include <bsd.port.mk> diff --git a/converters/hs-dataenc/distinfo b/converters/hs-dataenc/distinfo index f624f521df84..db519ef50a15 100644 --- a/converters/hs-dataenc/distinfo +++ b/converters/hs-dataenc/distinfo @@ -1,2 +1,2 @@ -SHA256 (cabal/dataenc-0.14.0.5.tar.gz) = 1cb1aeb20b641149a1be9a8c18fa020dbf73441c89e78135ea272baf1696ea8d -SIZE (cabal/dataenc-0.14.0.5.tar.gz) = 12902 +SHA256 (cabal/dataenc-0.14.0.7.tar.gz) = f9d370a1ac1b9cd3c66abd13ad351270d020a21fcd774f49dae6cfa9f8a98ff3 +SIZE (cabal/dataenc-0.14.0.7.tar.gz) = 12813 diff --git a/converters/hs-json/Makefile b/converters/hs-json/Makefile index d7a112494612..9265b272cb64 100644 --- a/converters/hs-json/Makefile +++ b/converters/hs-json/Makefile @@ -3,17 +3,18 @@ PORTNAME= json PORTVERSION= 0.7 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= converters haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Support for serialising Haskell to and from JSON -LICENSE= BSD +LICENSE= BSD3CLAUSE USE_CABAL= mtl syb>=0.3.3 text -CONFIGURE_ARGS+= --flags="split-base generic -parsec -pretty -mapdict" +FLAGS_ENABLE= split-base generic +FLAGS_DISABLE= parse pretty mapdict .include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" .include <bsd.port.mk> |