summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatoro <matoro@users.noreply.github.com>2022-07-24 20:56:04 -0400
committerSam James <sam@gentoo.org>2022-07-30 06:58:33 +0100
commite6fce1394f9b8ed2d9d2cde96c0ce1862fc18514 (patch)
tree5f9595e37bbe6ede33ff44a9096345ae0d31259d /dev-haskell/aws
parentdev-haskell/yesod-static: keyword 1.6.1.0 for ~ppc64 (diff)
downloadgentoo-e6fce1394f9b8ed2d9d2cde96c0ce1862fc18514.tar.gz
gentoo-e6fce1394f9b8ed2d9d2cde96c0ce1862fc18514.tar.bz2
gentoo-e6fce1394f9b8ed2d9d2cde96c0ce1862fc18514.zip
dev-haskell/aws: revbump 0.22-r5
https://github.com/gentoo-haskell/gentoo-haskell/commit/0db57ec34e40587313df7778ebd13914d795938e Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-haskell/aws')
-rw-r--r--dev-haskell/aws/Manifest2
-rw-r--r--dev-haskell/aws/aws-0.22-r5.ebuild (renamed from dev-haskell/aws/aws-0.22-r4.ebuild)53
-rw-r--r--dev-haskell/aws/files/aws-0.22-aeson-2.patch185
-rw-r--r--dev-haskell/aws/metadata.xml3
4 files changed, 202 insertions, 41 deletions
diff --git a/dev-haskell/aws/Manifest b/dev-haskell/aws/Manifest
index 08b58c20e882..ab0739bb050d 100644
--- a/dev-haskell/aws/Manifest
+++ b/dev-haskell/aws/Manifest
@@ -1,2 +1,2 @@
-DIST aws-0.22-r4.cabal 15515 BLAKE2B 7936d1ba22ef5d60baf8804d5d77b5202f6fcef31b63cba9c06ffe5f66aae8d584c3877887e408033efe36bc9cf04c738c545ca61e9eceeaee61bb168ac1e062 SHA512 a6a1d639cedf6929f60cf4b4187fbefb72f7024cbdaa3c3d383acc933be1f03b139c4b58a34afaf7ecdc355ee507f4411e9953f98127850d4978a6ba859f4e8e
+DIST aws-0.22-rev3.cabal 15515 BLAKE2B 7936d1ba22ef5d60baf8804d5d77b5202f6fcef31b63cba9c06ffe5f66aae8d584c3877887e408033efe36bc9cf04c738c545ca61e9eceeaee61bb168ac1e062 SHA512 a6a1d639cedf6929f60cf4b4187fbefb72f7024cbdaa3c3d383acc933be1f03b139c4b58a34afaf7ecdc355ee507f4411e9953f98127850d4978a6ba859f4e8e
DIST aws-0.22.tar.gz 106122 BLAKE2B b4ff46e2742d53323c80952c303a4605d13600fd60085a2e0501af2fc0a74f0c2769c6bf0692710bbfd972c474b9cab26fd97e9126fdcfb3eaff90afbab1d9ae SHA512 e7ff376c47a7ca7a65c8f10f19e591d4a4b4d2cfa333b4727f88f0b170d7acb0aff402617f2d617c522fe5d16ce92b249a23f1fb0a8bfe5bbefaef2931b786bd
diff --git a/dev-haskell/aws/aws-0.22-r4.ebuild b/dev-haskell/aws/aws-0.22-r5.ebuild
index 78feeaf7c7df..fa12e302fc1c 100644
--- a/dev-haskell/aws/aws-0.22-r4.ebuild
+++ b/dev-haskell/aws/aws-0.22-r5.ebuild
@@ -3,28 +3,28 @@
EAPI=8
-# ebuild generated by hackport 0.6.4.9999
+# ebuild generated by hackport 0.7.1.2.9999
#hackport: flags: +networkbsd
-CABAL_FEATURES="lib profile haddock hoogle hscolour" # test-suite requires deps porting
+
+CABAL_HACKAGE_REVISION=3
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
inherit haskell-cabal
DESCRIPTION="Amazon Web Services (AWS) for Haskell"
HOMEPAGE="https://github.com/aristidb/aws"
-HACKAGE_REV="3"
-SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz
- https://hackage.haskell.org/package/${P}/revision/${HACKAGE_REV}.cabal -> ${PF}.cabal"
LICENSE="BSD"
SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~ppc64 ~x86"
IUSE="examples"
RESTRICT=test # requires aws account
-RDEPEND=">=dev-haskell/aeson-0.6:=[profile?]
- >=dev-haskell/attoparsec-0.11:=[profile?] <dev-haskell/attoparsec-0.14:=[profile?]
- >=dev-haskell/base16-bytestring-0.1:=[profile?] <dev-haskell/base16-bytestring-0.2:=[profile?]
- >=dev-haskell/base64-bytestring-1.0:=[profile?]
+RDEPEND=">=dev-haskell/aeson-2.0:=[profile?] <dev-haskell/aeson-2.1:=[profile?]
+ >=dev-haskell/attoparsec-0.11:=[profile?] <dev-haskell/attoparsec-0.15:=[profile?]
+ >=dev-haskell/base16-bytestring-0.1:=[profile?] <dev-haskell/base16-bytestring-1.1:=[profile?]
+ >=dev-haskell/base64-bytestring-1.0:=[profile?] <dev-haskell/base64-bytestring-1.3:=[profile?]
>=dev-haskell/blaze-builder-0.2.1.4:=[profile?] <dev-haskell/blaze-builder-0.5:=[profile?]
>=dev-haskell/byteable-0.1:=[profile?] <dev-haskell/byteable-0.2:=[profile?]
>=dev-haskell/case-insensitive-0.2:=[profile?] <dev-haskell/case-insensitive-1.3:=[profile?]
@@ -33,52 +33,31 @@ RDEPEND=">=dev-haskell/aeson-0.6:=[profile?]
>=dev-haskell/conduit-extra-1.3:=[profile?] <dev-haskell/conduit-extra-1.4:=[profile?]
>=dev-haskell/cryptonite-0.11:=[profile?]
>=dev-haskell/data-default-0.5.3:=[profile?] <dev-haskell/data-default-0.8:=[profile?]
- >=dev-haskell/exceptions-0.8:=[profile?] <dev-haskell/exceptions-0.11:=[profile?]
>=dev-haskell/http-client-tls-0.3:=[profile?] <dev-haskell/http-client-tls-0.4:=[profile?]
>=dev-haskell/http-conduit-2.3:=[profile?] <dev-haskell/http-conduit-2.4:=[profile?]
>=dev-haskell/http-types-0.7:=[profile?] <dev-haskell/http-types-1.0:=[profile?]
>=dev-haskell/lifted-base-0.1:=[profile?] <dev-haskell/lifted-base-0.3:=[profile?]
dev-haskell/memory:=[profile?]
>=dev-haskell/monad-control-0.3:=[profile?]
- >=dev-haskell/mtl-2:=[profile?] <dev-haskell/mtl-3:=[profile?]
+ >=dev-haskell/network-3:=[profile?] <dev-haskell/network-4:=[profile?]
+ >=dev-haskell/network-bsd-2.8:=[profile?] <dev-haskell/network-bsd-2.9:=[profile?]
>=dev-haskell/old-locale-1:=[profile?] <dev-haskell/old-locale-2:=[profile?]
>=dev-haskell/resourcet-1.2:=[profile?] <dev-haskell/resourcet-1.3:=[profile?]
>=dev-haskell/safe-0.3:=[profile?] <dev-haskell/safe-0.4:=[profile?]
>=dev-haskell/scientific-0.3:=[profile?]
- >=dev-haskell/semigroups-0.18:=[profile?] <dev-haskell/semigroups-0.19:=[profile?]
>=dev-haskell/tagged-0.7:=[profile?] <dev-haskell/tagged-0.9:=[profile?]
- >=dev-haskell/text-0.11:=[profile?]
>=dev-haskell/unordered-containers-0.2:=[profile?]
>=dev-haskell/utf8-string-0.3:=[profile?] <dev-haskell/utf8-string-1.1:=[profile?]
>=dev-haskell/vector-0.10:=[profile?]
>=dev-haskell/xml-conduit-1.8:=[profile?] <dev-haskell/xml-conduit-2.0:=[profile?]
- >=dev-lang/ghc-7.8.2:=
+ >=dev-lang/ghc-8.10.1:=
examples? ( >=dev-haskell/errors-2.0:=[profile?] )
- >=dev-haskell/network-3:=[profile?] <dev-haskell/network-4:=[profile?]
- >=dev-haskell/network-bsd-2.8:=[profile?] <dev-haskell/network-bsd-2.9:=[profile?]
"
DEPEND="${RDEPEND}
- >=dev-haskell/cabal-1.18.1.3"
-# test? ( >=dev-haskell/aeson-0.7
-# >=dev-haskell/http-client-0.3 <dev-haskell/http-client-0.8
-# >=dev-haskell/lifted-base-0.2
-# >=dev-haskell/mtl-2.1
-# >=dev-haskell/quickcheck-2.7
-# >=dev-haskell/quickcheck-instances-0.3
-# >=dev-haskell/tasty-0.8
-# >=dev-haskell/tasty-hunit-0.8
-# >=dev-haskell/tasty-quickcheck-0.8
-# >=dev-haskell/text-1.1
-# >=dev-haskell/transformers-base-0.4
-# !examples? ( >=dev-haskell/errors-2.0 ) )
-
-src_prepare() {
- # pull revised cabal from upstream
- cp "${DISTDIR}/${PF}.cabal" "${S}/${PN}.cabal" || die
+ >=dev-haskell/cabal-3.2.0.0
+"
- # Apply patches *after* pulling the revised cabal
- default
-}
+PATCHES=( "${FILESDIR}"/${P}-aeson-2.patch )
src_configure() {
haskell-cabal_src_configure \
diff --git a/dev-haskell/aws/files/aws-0.22-aeson-2.patch b/dev-haskell/aws/files/aws-0.22-aeson-2.patch
new file mode 100644
index 000000000000..25d5966ed0a7
--- /dev/null
+++ b/dev-haskell/aws/files/aws-0.22-aeson-2.patch
@@ -0,0 +1,185 @@
+From 7af7586c5d244d07f77d49e5fdc739e6e8e54816 Mon Sep 17 00:00:00 2001
+From: Joey Hess <joeyh@joeyh.name>
+Date: Mon, 18 Oct 2021 14:35:30 -0400
+Subject: [PATCH] build with aeson 2
+
+---
+ Aws/DynamoDb/Commands/Table.hs | 4 +--
+ Aws/DynamoDb/Commands/UpdateItem.hs | 5 ++--
+ Aws/DynamoDb/Core.hs | 39 +++++++++++++++--------------
+ aws.cabal | 2 +-
+ 4 files changed, 26 insertions(+), 24 deletions(-)
+
+diff --git a/Aws/DynamoDb/Commands/Table.hs b/Aws/DynamoDb/Commands/Table.hs
+index 5fb42e0..a5fe025 100644
+--- a/Aws/DynamoDb/Commands/Table.hs
++++ b/Aws/DynamoDb/Commands/Table.hs
+@@ -35,9 +35,9 @@ module Aws.DynamoDb.Commands.Table
+ import Control.Applicative
+ import Data.Aeson ((.!=), (.:), (.:?), (.=))
+ import qualified Data.Aeson as A
++import qualified Data.Aeson.KeyMap as KM
+ import qualified Data.Aeson.Types as A
+ import Data.Char (toUpper)
+-import qualified Data.HashMap.Strict as M
+ import Data.Scientific (Scientific)
+ import qualified Data.Text as T
+ import Data.Time
+@@ -281,7 +281,7 @@ data TableDescription
+
+ instance A.FromJSON TableDescription where
+ parseJSON = A.withObject "Table must be an object" $ \o -> do
+- t <- case (M.lookup "Table" o, M.lookup "TableDescription" o) of
++ t <- case (KM.lookup "Table" o, KM.lookup "TableDescription" o) of
+ (Just (A.Object t), _) -> return t
+ (_, Just (A.Object t)) -> return t
+ _ -> fail "Table description must have key 'Table' or 'TableDescription'"
+diff --git a/Aws/DynamoDb/Commands/UpdateItem.hs b/Aws/DynamoDb/Commands/UpdateItem.hs
+index 0d94a59..1152b5a 100644
+--- a/Aws/DynamoDb/Commands/UpdateItem.hs
++++ b/Aws/DynamoDb/Commands/UpdateItem.hs
+@@ -31,6 +31,7 @@ module Aws.DynamoDb.Commands.UpdateItem
+ -------------------------------------------------------------------------------
+ import Control.Applicative
+ import Data.Aeson
++import qualified Data.Aeson.Key as AK
+ import Data.Default
+ import qualified Data.Text as T
+ import Prelude
+@@ -91,9 +92,9 @@ instance ToJSON AttributeUpdates where
+ toJSON = object . map mk . getAttributeUpdates
+ where
+ mk AttributeUpdate { auAction = UDelete, auAttr = auAttr } =
+- (attrName auAttr) .= object
++ (AK.fromText (attrName auAttr)) .= object
+ ["Action" .= UDelete]
+- mk AttributeUpdate { .. } = (attrName auAttr) .= object
++ mk AttributeUpdate { .. } = AK.fromText (attrName auAttr) .= object
+ ["Value" .= (attrVal auAttr), "Action" .= auAction]
+
+
+diff --git a/Aws/DynamoDb/Core.hs b/Aws/DynamoDb/Core.hs
+index 1c116d3..b9a6cc4 100644
+--- a/Aws/DynamoDb/Core.hs
++++ b/Aws/DynamoDb/Core.hs
+@@ -128,6 +128,8 @@ import Control.Monad.Trans.Resource (throwM)
+ import qualified Crypto.Hash as CH
+ import Data.Aeson
+ import qualified Data.Aeson as A
++import qualified Data.Aeson.Key as AK
++import qualified Data.Aeson.KeyMap as KM
+ import Data.Aeson.Types (Pair, parseEither)
+ import qualified Data.Aeson.Types as A
+ import qualified Data.Attoparsec.ByteString as AttoB (endOfInput)
+@@ -141,7 +143,6 @@ import Data.Conduit
+ import Data.Conduit.Attoparsec (sinkParser)
+ import Data.Default
+ import Data.Function (on)
+-import qualified Data.HashMap.Strict as HM
+ import Data.Int
+ import Data.IORef
+ import Data.List
+@@ -536,7 +537,7 @@ instance ToJSON PrimaryKey where
+ toJSON (PrimaryKey h (Just r)) =
+ let Object p1 = toJSON h
+ Object p2 = toJSON r
+- in Object (p1 `HM.union` p2)
++ in Object (p1 `KM.union` p2)
+
+ instance FromJSON PrimaryKey where
+ parseJSON p = do
+@@ -544,8 +545,8 @@ instance FromJSON PrimaryKey where
+ case length l of
+ 1 -> return $ head l
+ _ -> fail "Unable to parse PrimaryKey"
+- where listPKey p'= map (\(txt,dval)-> hk txt dval)
+- . HM.toList <$> parseJSON p'
++ where listPKey p'= map (\(k,dval)-> hk (AK.toText k) dval)
++ . KM.toList <$> parseJSON p'
+
+
+ -- | A key-value pair
+@@ -661,9 +662,9 @@ instance ToJSON Attribute where
+ -------------------------------------------------------------------------------
+ -- | Parse a JSON object that contains attributes
+ parseAttributeJson :: Value -> A.Parser [Attribute]
+-parseAttributeJson (Object v) = mapM conv $ HM.toList v
++parseAttributeJson (Object v) = mapM conv $ KM.toList v
+ where
+- conv (k, o) = Attribute k <$> parseJSON o
++ conv (k, o) = Attribute (AK.toText k) <$> parseJSON o
+ parseAttributeJson _ = error "Attribute JSON must be an Object"
+
+
+@@ -674,7 +675,7 @@ attributesJson as = object $ map attributeJson as
+
+ -- | Convert into JSON pair
+ attributeJson :: Attribute -> Pair
+-attributeJson (Attribute nm v) = nm .= v
++attributeJson (Attribute nm v) = AK.fromText nm .= v
+
+
+ -------------------------------------------------------------------------------
+@@ -962,7 +963,7 @@ conditionsJson key (Conditions op es) = b ++ a
+ where
+ a = if null es
+ then []
+- else [key .= object (map conditionJson es)]
++ else [AK.fromText key .= object (map conditionJson es)]
+
+ b = if length (take 2 es) > 1
+ then ["ConditionalOperator" .= String (rendCondOp op) ]
+@@ -1046,7 +1047,7 @@ renderCondOp c = case c of
+
+
+ conditionJson :: Condition -> Pair
+-conditionJson Condition{..} = condAttr .= condOp
++conditionJson Condition{..} = AK.fromText condAttr .= condOp
+
+
+ instance ToJSON CondOp where
+@@ -1076,12 +1077,12 @@ data ConsumedCapacity = ConsumedCapacity {
+
+
+ instance FromJSON ConsumedCapacity where
+- parseJSON (Object v) = ConsumedCapacity
+- <$> v .: "CapacityUnits"
+- <*> (HM.toList <$> v .:? "GlobalSecondaryIndexes" .!= mempty)
+- <*> (HM.toList <$> v .:? "LocalSecondaryIndexes" .!= mempty)
+- <*> (v .:? "Table" >>= maybe (return Nothing) (.: "CapacityUnits"))
+- <*> v .: "TableName"
++ parseJSON (Object o) = ConsumedCapacity
++ <$> o .: "CapacityUnits"
++ <*> (map (\(k, v) -> (AK.toText k, v)) . KM.toList <$> o .:? "GlobalSecondaryIndexes" .!= mempty)
++ <*> (map (\(k, v) -> (AK.toText k, v)) . KM.toList <$> o .:? "LocalSecondaryIndexes" .!= mempty)
++ <*> (o .:? "Table" >>= maybe (return Nothing) (.: "CapacityUnits"))
++ <*> o .: "TableName"
+ parseJSON _ = fail "ConsumedCapacity must be an Object."
+
+
+@@ -1115,8 +1116,8 @@ data ItemCollectionMetrics = ItemCollectionMetrics {
+
+
+ instance FromJSON ItemCollectionMetrics where
+- parseJSON (Object v) = ItemCollectionMetrics
+- <$> (do m <- v .: "ItemCollectionKey"
+- return $ head $ HM.toList m)
+- <*> v .: "SizeEstimateRangeGB"
++ parseJSON (Object o) = ItemCollectionMetrics
++ <$> (do m <- o .: "ItemCollectionKey"
++ return $ (\(k, v) -> (AK.toText k, v)) $ head $ KM.toList m)
++ <*> o .: "SizeEstimateRangeGB"
+ parseJSON _ = fail "ItemCollectionMetrics must be an Object."
+
+
+--- a/aws.cabal 2022-07-25 08:47:06.270139909 +1000
++++ b/aws.cabal 2022-07-25 08:47:28.497479783 +1000
+@@ -35,7 +35,7 @@
+ Default: True
+
+ Library
+- build-depends: aeson <1.6
++ build-depends: aeson >= 2.0
+
+ Exposed-modules:
+ Aws
diff --git a/dev-haskell/aws/metadata.xml b/dev-haskell/aws/metadata.xml
index cc08513f82e8..3e3436449600 100644
--- a/dev-haskell/aws/metadata.xml
+++ b/dev-haskell/aws/metadata.xml
@@ -8,7 +8,4 @@
<longdescription>
Bindings for Amazon Web Services (AWS), with the aim of supporting all AWS services. To see a high level overview of the library, see the README at &lt;https://github.com/aristidb/aws/blob/master/README.org&gt;.
</longdescription>
- <upstream>
- <remote-id type="github">aristidb/aws</remote-id>
- </upstream>
</pkgmetadata>