summaryrefslogtreecommitdiff
path: root/dev-haskell/esqueleto
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-haskell/esqueleto
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-haskell/esqueleto')
-rw-r--r--dev-haskell/esqueleto/Manifest6
-rw-r--r--dev-haskell/esqueleto/esqueleto-2.1.3.ebuild48
-rw-r--r--dev-haskell/esqueleto/esqueleto-2.4.3-r1.ebuild49
-rw-r--r--dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch165
-rw-r--r--dev-haskell/esqueleto/metadata.xml44
5 files changed, 312 insertions, 0 deletions
diff --git a/dev-haskell/esqueleto/Manifest b/dev-haskell/esqueleto/Manifest
new file mode 100644
index 000000000000..760b0aaeedef
--- /dev/null
+++ b/dev-haskell/esqueleto/Manifest
@@ -0,0 +1,6 @@
+AUX esqueleto-2.4.3-persistent-2.5.patch 6114 BLAKE2B 594cb0dfd2f6e6fb5ac28df75a1e6451bee2483036f5e465fbcb6bcbc98a10214fa7ec534558022b60096b849e68440060f8c1b4f95c235691a4b32b4d2e05d7 SHA512 a229ebc9e9f513102324e78641a4eb4e86d9fa87764f2f88fdf8512d96c6eb223ad870d20dcd0c7805d3a695cebb7e03bb3912421fa25cd7647d804b21320b65
+DIST esqueleto-2.1.3.tar.gz 33024 BLAKE2B 3d028c495f44ba3757ee5b9df463d35c4fad382ad4cb980877cd6589981dd0e2fb219944830e0a3d1f5426e9773416178b3781b1aaee340cb8b491549689af15 SHA512 b0508daec0f248458581155c731d307f039d04fae7e76697d2a8bb8498a5072b31499d1d3b041314b34b4034e4357e10323483d04f7ce3218da7489a00683fbc
+DIST esqueleto-2.4.3.tar.gz 39664 BLAKE2B 03f56caca53815bf751503eaba55d0c6c225d9bcd2751371aeadaa1244c90649babf7cc2f05f8dcc2206fc5a7e235de14c11cde3f246c1fb78967defe566cc88 SHA512 50ad774bbd83c587775887320e24b329b575c9b3dad5aed920d83da7b8e5fa259624c38a40c457a3c12258e2b34cce39042c1b33002a06dcd3020bf370a06cbb
+EBUILD esqueleto-2.1.3.ebuild 1433 BLAKE2B 2b54992f33b1ce5303f5513d36f6be6dd78f82b9a8d19a86318f80f735a8016b2fecbb38d538bb3de6a19cc66535a1f8b12e872ef650966598495612d8563f8a SHA512 5f5a7b4f13f774a519572a34bcfeeeade2e82be6e7f71a9a5810141e292a5cb0111735143a6ad6fc617a46d24dd18f271220a1a9ed201a9bdd08693214655d30
+EBUILD esqueleto-2.4.3-r1.ebuild 1380 BLAKE2B f2de31037a90dd2bede882df3240fdc59d82a7209277f6c1e9c351a1171d574834995509aa1ed988885fd8131ab1583b67099060891ab0b885fb7d7bed630dc0 SHA512 244489533d2fc1a884f4f643105be8f6884536860a1b5ec893782b0703ca5c7c6f3934c82f8791808dcdbc9e7d0c13227d881b6443b62cc9f40c37a6fc0bb4e3
+MISC metadata.xml 2043 BLAKE2B 7b418084368f204d12010f088f55544feed211ed193787a9698a45c891f5c5c579a9e9b583cc606401ff43975755fbe73725588ebcf27e8dcfd77b3344534596 SHA512 162af6c274fb74b5df2c040c8dc8de89ab08bf5839f6c80b099a7c906e4168c92a1c49a09ecae0dda69e45239002625abdf70fa323ab1258d55c314931875599
diff --git a/dev-haskell/esqueleto/esqueleto-2.1.3.ebuild b/dev-haskell/esqueleto/esqueleto-2.1.3.ebuild
new file mode 100644
index 000000000000..6b5489747a64
--- /dev/null
+++ b/dev-haskell/esqueleto/esqueleto-2.1.3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.5.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=""
+
+RESTRICT=test # tests hang
+
+RDEPEND=">=dev-haskell/conduit-1.1:=[profile?]
+ dev-haskell/monad-logger:=[profile?]
+ >=dev-haskell/persistent-2.1.1.7:=[profile?] <dev-haskell/persistent-2.2:=[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-sqlite-2.2
+ >=dev-haskell/persistent-template-2.1 <dev-haskell/persistent-template-2.2
+ dev-haskell/quickcheck )
+"
+
+src_configure() {
+ haskell-cabal_src_configure \
+ --flag=-mysql \
+ --flag=-postgresql
+}
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 000000000000..86530317a1a4
--- /dev/null
+++ b/dev-haskell/esqueleto/esqueleto-2.4.3-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..ebff5cb0bd9a
--- /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 <pgr@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 <pgr@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
+
diff --git a/dev-haskell/esqueleto/metadata.xml b/dev-haskell/esqueleto/metadata.xml
new file mode 100644
index 000000000000..05174613075d
--- /dev/null
+++ b/dev-haskell/esqueleto/metadata.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <longdescription>
+ @persistent@ is a library for type-safe data serialization. It
+ has many kinds of backends, such as SQL backends
+ (@persistent-mysql@, @persistent-postgresql@,
+ @persistent-sqlite@) and NoSQL backends (@persistent-mongoDB@).
+
+ While @persistent@ is a nice library for storing and retrieving
+ records, currently it has a poor interface for SQL backends
+ compared to SQL itself. For example, it's extremely hard to do
+ a type-safe @JOIN@ on a many-to-one relation, and simply
+ impossible to do any other kinds of @JOIN@s (including for the
+ very common many-to-many relations). Users have the option of
+ writing raw SQL, but that's error prone and not type-checked.
+
+ @esqueleto@ is a bare bones, type-safe EDSL for SQL queries
+ that works with unmodified @persistent@ SQL backends. Its
+ language closely resembles SQL, so (a) you don't have to learn
+ new concepts, just new syntax, and (b) it's fairly easy to
+ predict the generated SQL and optimize it for your backend.
+ Most kinds of errors committed when writing SQL are caught as
+ compile-time errors---although it is possible to write
+ type-checked @esqueleto@ queries that fail at runtime.
+
+ Currently only @SELECT@s are supported. Not all SQL features
+ are available, but most of them can be easily added (especially
+ functions), so please open an issue or send a pull request if
+ you need anything that is not covered by @esqueleto@ on
+ &lt;https://github.com/meteficha/esqueleto/&gt;.
+
+ The name of this library means \"skeleton\" in Portuguese and
+ contains all three SQL letters in the correct order =). It was
+ inspired by Scala's Squeryl but created from scratch.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">prowdsponsor/esqueleto</remote-id>
+ </upstream>
+</pkgmetadata>