commit:     cc6d8b984c41b0a498fe1410d4c2e9a352680693
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 08:47:00 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 10:21:58 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc6d8b98

dev-haskell/esqueleto: bump up to 2.4.3

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-haskell/esqueleto/Manifest                     |   1 +
 dev-haskell/esqueleto/esqueleto-2.4.3-r1.ebuild    |  50 +++++++
 .../files/esqueleto-2.4.3-persistent-2.5.patch     | 165 +++++++++++++++++++++
 3 files changed, 216 insertions(+)

diff --git a/dev-haskell/esqueleto/Manifest b/dev-haskell/esqueleto/Manifest
index 6cafb1e224..2f2ad18f46 100644
--- a/dev-haskell/esqueleto/Manifest
+++ b/dev-haskell/esqueleto/Manifest
@@ -1 +1,2 @@
 DIST esqueleto-2.1.3.tar.gz 33024 SHA256 
2d6da3477660212ed7cddec606d0324537b39ef24abe627ba389a0da500158f3 SHA512 
b0508daec0f248458581155c731d307f039d04fae7e76697d2a8bb8498a5072b31499d1d3b041314b34b4034e4357e10323483d04f7ce3218da7489a00683fbc
 WHIRLPOOL 
aea8960ebe1ba214afe147db5db0e392b208525f5eeccc7c953a314c6000b684df5ccbd671ec23a698048f20af8bb212f3357db8743ac28f4b3cdb42723258a6
+DIST esqueleto-2.4.3.tar.gz 39664 SHA256 
bf555cfb40519ed1573f7bb90c65f693b9639dfa93fc2222230d3ded6e897434 SHA512 
50ad774bbd83c587775887320e24b329b575c9b3dad5aed920d83da7b8e5fa259624c38a40c457a3c12258e2b34cce39042c1b33002a06dcd3020bf370a06cbb
 WHIRLPOOL 
c1ef1d8414a2a68b48d291de302ed5fc63e96c88a2278bfd263890979debd365847dbe122915c1ce596a9c8b69a22ae244d0ae6a6228f661d0468526c1e2669b

diff --git a/dev-haskell/esqueleto/esqueleto-2.4.3-r1.ebuild 
b/dev-haskell/esqueleto/esqueleto-2.4.3-r1.ebuild
new file mode 100644
index 0000000000..31b8fcc5a1
--- /dev/null
+++ b/dev-haskell/esqueleto/esqueleto-2.4.3-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+# ebuild generated by hackport 0.4.7.9999
+#hackport: flags: -mysql,-postgresql
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="Type-safe EDSL for SQL queries on persistent backends"
+HOMEPAGE="https://github.com/prowdsponsor/esqueleto";
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/blaze-html:=[profile?]
+       >=dev-haskell/conduit-1.1:=[profile?]
+       dev-haskell/monad-logger:=[profile?]
+       >=dev-haskell/persistent-2.1.1.7:=[profile?]
+       >=dev-haskell/resourcet-1.1:=[profile?]
+       >=dev-haskell/tagged-0.2:=[profile?]
+       >=dev-haskell/text-0.11:=[profile?] <dev-haskell/text-1.3:=[profile?]
+       >=dev-haskell/transformers-0.2:=[profile?]
+       >=dev-haskell/unordered-containers-0.2:=[profile?]
+       >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+       >=dev-haskell/cabal-1.8
+       test? ( >=dev-haskell/hspec-1.8
+               dev-haskell/hunit
+               dev-haskell/monad-control
+               >=dev-haskell/monad-logger-0.3
+               >=dev-haskell/persistent-sqlite-2.1
+               >=dev-haskell/persistent-template-2.1
+               dev-haskell/quickcheck )
+"
+
+PATCHES=("${FILESDIR}"/${P}-persistent-2.5.patch)
+
+src_configure() {
+       haskell-cabal_src_configure \
+               --flag=-mysql \
+               --flag=-postgresql
+}

diff --git a/dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch 
b/dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch
new file mode 100644
index 0000000000..ebff5cb0bd
--- /dev/null
+++ b/dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch
@@ -0,0 +1,165 @@
+From 675018c54227ce5db4a91a153092d5f4d06f9af0 Mon Sep 17 00:00:00 2001
+From: Paul Rouse <p...@doynton.org>
+Date: Thu, 9 Jun 2016 20:25:34 +0100
+Subject: [PATCH 1/3] Changes for persistent-2.5
+
+---
+ esqueleto.cabal                                     |  2 +-
+ src/Database/Esqueleto.hs                           |  8 ++++----
+ src/Database/Esqueleto/Internal/Language.hs         | 15 +++++----------
+ src/Database/Esqueleto/Internal/PersistentImport.hs | 12 +++++++++++-
+ test/Test.hs                                        |  8 ++++----
+ 5 files changed, 25 insertions(+), 20 deletions(-)
+
+diff --git a/esqueleto.cabal b/esqueleto.cabal
+index 65aa237..1768d2d 100644
+--- a/esqueleto.cabal
++++ b/esqueleto.cabal
+@@ -66,7 +66,7 @@ library
+       base                 >= 4.5     && < 4.9
+     , bytestring
+     , text                 >= 0.11    && < 1.3
+-    , persistent           >= 2.1.1.7 && < 2.3
++    , persistent           >= 2.1.1.7
+     , transformers         >= 0.2
+     , unordered-containers >= 0.2
+     , tagged               >= 0.2
+diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs
+index eb135c2..97e3211 100644
+--- a/src/Database/Esqueleto.hs
++++ b/src/Database/Esqueleto.hs
+@@ -430,8 +430,8 @@ valJ = val . unValue
+ 
+ -- | Synonym for 'Database.Persist.Store.delete' that does not
+ -- clash with @esqueleto@'s 'delete'.
+-deleteKey :: ( PersistStore (PersistEntityBackend val)
+-             , MonadIO m
+-             , PersistEntity val )
+-          => Key val -> ReaderT (PersistEntityBackend val) m ()
++deleteKey :: ( PersistStore backend
++             , PersistRecordBackend val backend
++             , MonadIO m )
++          => Key val -> ReaderT backend m ()
+ deleteKey = Database.Persist.delete
+diff --git a/src/Database/Esqueleto/Internal/Language.hs 
b/src/Database/Esqueleto/Internal/Language.hs
+index fbe88e2..ab18999 100644
+--- a/src/Database/Esqueleto/Internal/Language.hs
++++ b/src/Database/Esqueleto/Internal/Language.hs
+@@ -74,13 +74,11 @@ class (Functor query, Applicative query, Monad query) =>
+   --   In the end, 'fromFinish' is called to materialize the
+   --   @JOIN@.
+   fromStart
+-    :: ( PersistEntity a
+-       , PersistEntityBackend a ~ backend )
++    :: PersistRecordBackend a backend
+     => query (expr (PreprocessedFrom (expr (Entity a))))
+   -- | (Internal) Same as 'fromStart', but entity may be missing.
+   fromStartMaybe
+-    :: ( PersistEntity a
+-       , PersistEntityBackend a ~ backend )
++    :: PersistRecordBackend a backend
+     => query (expr (PreprocessedFrom (expr (Maybe (Entity a)))))
+   -- | (Internal) Do a @JOIN@.
+   fromJoin
+@@ -926,8 +924,7 @@ class ToBaseId ent where
+ -- @
+ -- person
+ --   :: ( Esqueleto query expr backend
+---      , PersistEntity Person
+---      , PersistEntityBackend Person ~ backend
++--      , PersistRecordBackend Person backend
+ --      ) => expr (Entity Person)
+ -- (person, blogPost)
+ --   :: (...) => (expr (Entity Person), expr (Entity BlogPost))
+@@ -1054,14 +1051,12 @@ class Esqueleto query expr backend => FromPreprocess 
query expr backend a where
+   fromPreprocess :: query (expr (PreprocessedFrom a))
+ 
+ instance ( Esqueleto query expr backend
+-         , PersistEntity val
+-         , PersistEntityBackend val ~ backend
++         , PersistRecordBackend val backend
+          ) => FromPreprocess query expr backend (expr (Entity val)) where
+   fromPreprocess = fromStart
+ 
+ instance ( Esqueleto query expr backend
+-         , PersistEntity val
+-         , PersistEntityBackend val ~ backend
++         , PersistRecordBackend val backend
+          ) => FromPreprocess query expr backend (expr (Maybe (Entity val))) 
where
+   fromPreprocess = fromStartMaybe
+ 
+diff --git a/src/Database/Esqueleto/Internal/PersistentImport.hs 
b/src/Database/Esqueleto/Internal/PersistentImport.hs
+index ad193e0..02fbd20 100644
+--- a/src/Database/Esqueleto/Internal/PersistentImport.hs
++++ b/src/Database/Esqueleto/Internal/PersistentImport.hs
+@@ -1,7 +1,13 @@
++{-# LANGUAGE CPP                        #-}
++{-# LANGUAGE ConstraintKinds            #-}
++{-# LANGUAGE TypeFamilies               #-}
+ -- | Re-export "Database.Persist.Sql" without any clashes with
+ -- @esqueleto@.
+ module Database.Esqueleto.Internal.PersistentImport
+   ( module Database.Persist.Sql
++#if ! MIN_VERSION_persistent(2,5,0)
++    , PersistRecordBackend
++#endif
+   ) where
+ 
+ import Database.Persist.Sql hiding
+@@ -10,4 +16,8 @@ import Database.Persist.Sql hiding
+   , selectKeysList, deleteCascadeWhere, (=.), (+=.), (-=.), (*=.), (/=.)
+   , (==.), (!=.), (<.), (>.), (<=.), (>=.), (<-.), (/<-.), (||.)
+   , listToJSON, mapToJSON, getPersistMap, limitOffsetOrder, selectSource
+-  , update )
++  , update, count )
++
++#if ! MIN_VERSION_persistent(2,5,0)
++type PersistRecordBackend record backend = (PersistEntity record, 
PersistEntityBackend record ~ backend)
++#endif
+diff --git a/test/Test.hs b/test/Test.hs
+index 80c6784..524bd7c 100644
+--- a/test/Test.hs
++++ b/test/Test.hs
+@@ -1396,10 +1396,10 @@ main = do
+ 
+ 
+ insert' :: ( Functor m
+-           , PersistStore (PersistEntityBackend val)
+-           , MonadIO m
+-           , PersistEntity val )
+-        => val -> ReaderT (PersistEntityBackend val) m (Entity val)
++           , PersistStore backend
++           , PersistRecordBackend val backend
++           , MonadIO m )
++        => val -> ReaderT backend m (Entity val)
+ insert' v = flip Entity v <$> insert v
+ 
+ 
+-- 
+2.9.0
+
+From 4c9ecd94f2748be52c50c85ca8ed7314e21b9e82 Mon Sep 17 00:00:00 2001
+From: Paul Rouse <p...@doynton.org>
+Date: Thu, 9 Jun 2016 20:29:45 +0100
+Subject: [PATCH 2/3] Allow base-4.9 for GHC 8
+
+---
+ esqueleto.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/esqueleto.cabal b/esqueleto.cabal
+index 1768d2d..3b9efb9 100644
+--- a/esqueleto.cabal
++++ b/esqueleto.cabal
+@@ -63,7 +63,7 @@ library
+   other-modules:
+     Database.Esqueleto.Internal.PersistentImport
+   build-depends:
+-      base                 >= 4.5     && < 4.9
++      base                 >= 4.5     && < 5
+     , bytestring
+     , text                 >= 0.11    && < 1.3
+     , persistent           >= 2.1.1.7 && < 2.6
+-- 
+2.9.0
+

Reply via email to