diff options
Diffstat (limited to 'dev-haskell/esqueleto')
-rw-r--r-- | dev-haskell/esqueleto/Manifest | 8 | ||||
-rw-r--r-- | dev-haskell/esqueleto/esqueleto-2.1.3.ebuild | 48 | ||||
-rw-r--r-- | dev-haskell/esqueleto/esqueleto-2.4.3-r1.ebuild | 49 | ||||
-rw-r--r-- | dev-haskell/esqueleto/files/esqueleto-2.4.3-persistent-2.5.patch | 165 | ||||
-rw-r--r-- | dev-haskell/esqueleto/metadata.xml | 44 |
5 files changed, 314 insertions, 0 deletions
diff --git a/dev-haskell/esqueleto/Manifest b/dev-haskell/esqueleto/Manifest new file mode 100644 index 000000000000..48b12ca2044a --- /dev/null +++ b/dev-haskell/esqueleto/Manifest @@ -0,0 +1,8 @@ +AUX esqueleto-2.4.3-persistent-2.5.patch 6114 SHA256 b7013c70e644a0a549f9b1cc68e91cb1dbd7661e93707adaba4fd4dd5e28f623 SHA512 a229ebc9e9f513102324e78641a4eb4e86d9fa87764f2f88fdf8512d96c6eb223ad870d20dcd0c7805d3a695cebb7e03bb3912421fa25cd7647d804b21320b65 WHIRLPOOL 9d307ce006001d335f1e7ac3c7c6cdb24dcdcb53607a4b0a348f6e0c5bce28a24ab650b204e26912a70cbd48649e26cc4310dd439ecbdd0e8ae96591f2dca2fe +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 +EBUILD esqueleto-2.1.3.ebuild 1433 SHA256 ef29b166a98da552f815e083b4a4a653897634854854b981934c6a40314940e6 SHA512 5f5a7b4f13f774a519572a34bcfeeeade2e82be6e7f71a9a5810141e292a5cb0111735143a6ad6fc617a46d24dd18f271220a1a9ed201a9bdd08693214655d30 WHIRLPOOL 537de56870ddb89fe483df37ff8a6815c0db04ca528d4c4fb5679c7626cae6e506449f9f828cf731a73dc922eda4a2b072c87f20734edcdc4a735481131275c8 +EBUILD esqueleto-2.4.3-r1.ebuild 1380 SHA256 ce38ecf38c82c6ea89d35e5b905158f83169dda608119580119d488c77fe6ca9 SHA512 244489533d2fc1a884f4f643105be8f6884536860a1b5ec893782b0703ca5c7c6f3934c82f8791808dcdbc9e7d0c13227d881b6443b62cc9f40c37a6fc0bb4e3 WHIRLPOOL 16c5849f80fe7f326f10f29723662d4d29a1c374f282f5b7d4205e81d8151981f3ce6121f28ff62dd1911fa4902ea45a07db4a5104d1ffcb94de471ff8107eb6 +MISC ChangeLog 3067 SHA256 5569b010696f11128664d17542d998c9ec8b60a356f18090ffe941ef28f0c7a1 SHA512 88109744682a4e4c65bdbd6decd18a31284eec59615e735f301c70898101e52acfc50b9e58c710de5ca82a0fd7372f62eaf963eb679de044509e1669be2f82ce WHIRLPOOL c202f34afce850427da0ec6033c207a16ad59f47d4ec35048463160525c1dc54cdbdc0f7704c758a345aa050693d10bf2b4749bc2f352b276eee6c554d9865b8 +MISC ChangeLog-2015 1335 SHA256 3420753a81d863edc7e5e50d1a94ce23f89f9e7494982686dbc4f7b4c677ea92 SHA512 2009936fe5b6afa52a9a6b1214d8f66bc3440f722bef3315832a53cd2e9dbbfc3d4b3b633f89c1db9756665b45798a04c769d396ad2adbd9b1fa3ac6b428a6a0 WHIRLPOOL 2893c7c343bd8fecd4bfce5404c75c966ca76e85cc22b3fa48200ea39013f9ce0065517770f5f7bc31c1811a66a254b37ad4c27f2b9c55c9d31a2d029134ae95 +MISC metadata.xml 2043 SHA256 66f8204515b34bb071b6007000e179b05dfae362278c53efc64d6c7435a1de0e SHA512 162af6c274fb74b5df2c040c8dc8de89ab08bf5839f6c80b099a7c906e4168c92a1c49a09ecae0dda69e45239002625abdf70fa323ab1258d55c314931875599 WHIRLPOOL 67f98e4e0fea70a711a801b3043a9def8629114571ac931fbdcf7a80317de3dba023ff5214172e5951721a123c4628704bc670c474109dec84df0bc69d7c63df 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 + <https://github.com/meteficha/esqueleto/>. + + 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> |