[arch-commits] Commit in haskell-esqueleto/repos (6 files)

Felix Yan felixonmars at archlinux.org
Tue Jan 10 07:39:49 UTC 2017


    Date: Tuesday, January 10, 2017 @ 07:39:49
  Author: felixonmars
Revision: 206505

archrelease: copy trunk to community-staging-i686, community-staging-x86_64

Added:
  haskell-esqueleto/repos/community-staging-i686/
  haskell-esqueleto/repos/community-staging-i686/PKGBUILD
    (from rev 206504, haskell-esqueleto/trunk/PKGBUILD)
  haskell-esqueleto/repos/community-staging-i686/persistent-2.5.patch
    (from rev 206504, haskell-esqueleto/trunk/persistent-2.5.patch)
  haskell-esqueleto/repos/community-staging-x86_64/
  haskell-esqueleto/repos/community-staging-x86_64/PKGBUILD
    (from rev 206504, haskell-esqueleto/trunk/PKGBUILD)
  haskell-esqueleto/repos/community-staging-x86_64/persistent-2.5.patch
    (from rev 206504, haskell-esqueleto/trunk/persistent-2.5.patch)

-----------------------------------------------+
 community-staging-i686/PKGBUILD               |   55 +++++++++++
 community-staging-i686/persistent-2.5.patch   |  119 ++++++++++++++++++++++++
 community-staging-x86_64/PKGBUILD             |   55 +++++++++++
 community-staging-x86_64/persistent-2.5.patch |  119 ++++++++++++++++++++++++
 4 files changed, 348 insertions(+)

Copied: haskell-esqueleto/repos/community-staging-i686/PKGBUILD (from rev 206504, haskell-esqueleto/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2017-01-10 07:39:49 UTC (rev 206505)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=esqueleto
+pkgname=haskell-esqueleto
+pkgver=2.4.3
+pkgrel=55
+pkgdesc="Type-safe EDSL for SQL queries on persistent backends."
+url="https://github.com/prowdsponsor/esqueleto"
+license=("custom:BSD3")
+arch=('i686' 'x86_64')
+depends=("ghc=8.0.1" "haskell-blaze-html" "haskell-conduit" "haskell-monad-logger"
+         "haskell-persistent" "haskell-resourcet" "haskell-tagged" "haskell-text"
+         "haskell-unordered-containers")
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+        persistent-2.5.patch)
+sha256sums=('bf555cfb40519ed1573f7bb90c65f693b9639dfa93fc2222230d3ded6e897434'
+            '101534ae4db348978b427a5a5b06a51765a680c4c8ae038ce283214fcd44f9e4')
+
+prepare() {
+    # https://github.com/prowdsponsor/esqueleto/pull/139
+    (cd $_hkgname-$pkgver && patch -p1 -i ../persistent-2.5.patch)
+
+    sed -e 's/base                 >= 4.5     && < 4.9/base                 >= 4.5     \&\& < 4.10/' \
+        -e 's/, persistent           >= 2.5     && < 2.6/, persistent           >= 2.5     \&\& < 2.7/' \
+        -i ${_hkgname}-${pkgver}/${_hkgname}.cabal
+}
+
+build() {
+    cd "${srcdir}/${_hkgname}-${pkgver}"
+    
+    runhaskell Setup configure -O --enable-library-profiling --enable-shared \
+        --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
+        --libsubdir=\$compiler/site-local/\$pkgid \
+            -f-mysql -f-postgresql
+    runhaskell Setup build
+    runhaskell Setup haddock --hoogle --html
+    runhaskell Setup register --gen-script
+    runhaskell Setup unregister --gen-script
+    sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+    sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+    cd "${srcdir}/${_hkgname}-${pkgver}"
+    
+    install -D -m744 register.sh   "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+    install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+    install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
+    ln -s "/usr/share/doc/${pkgname}/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
+    runhaskell Setup copy --destdir="${pkgdir}"
+    install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}

Copied: haskell-esqueleto/repos/community-staging-i686/persistent-2.5.patch (from rev 206504, haskell-esqueleto/trunk/persistent-2.5.patch)
===================================================================
--- community-staging-i686/persistent-2.5.patch	                        (rev 0)
+++ community-staging-i686/persistent-2.5.patch	2017-01-10 07:39:49 UTC (rev 206505)
@@ -0,0 +1,119 @@
+From 811f3722818b56ae5a4fb4601a2a772532201571 Mon Sep 17 00:00:00 2001
+From: Hao Lian <hi at haolian.org>
+Date: Mon, 2 May 2016 13:19:33 -0400
+Subject: [PATCH] upgrade to persistent 2.5
+
+---
+ esqueleto.cabal                                     | 10 +++++-----
+ src/Database/Esqueleto.hs                           | 21 +++++++++++++++------
+ src/Database/Esqueleto/Internal/PersistentImport.hs |  2 +-
+ stack.yaml                                          | 16 +++++++++++++++-
+ test/Test.hs                                        |  5 +++--
+ 5 files changed, 39 insertions(+), 15 deletions(-)
+
+diff --git a/esqueleto.cabal b/esqueleto.cabal
+index 65aa237..6494349 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.5     && < 2.6
+     , transformers         >= 0.2
+     , unordered-containers >= 0.2
+     , tagged               >= 0.2
+@@ -94,8 +94,8 @@ test-suite test
+     , HUnit
+     , QuickCheck
+     , hspec               >= 1.8
+-    , persistent-sqlite   >= 2.1
+-    , persistent-template >= 2.1
++    , persistent-sqlite   >= 2.5
++    , persistent-template >= 2.5
+     , monad-control
+     , monad-logger        >= 0.3
+ 
+@@ -106,7 +106,7 @@ test-suite test
+     build-depends:
+         postgresql-simple     >= 0.2
+       , postgresql-libpq      >= 0.6
+-      , persistent-postgresql >= 2.0
++      , persistent-postgresql >= 2.5
+ 
+     cpp-options: -DWITH_POSTGRESQL
+ 
+@@ -114,6 +114,6 @@ test-suite test
+     build-depends:
+         mysql-simple          >= 0.2.2.3
+       , mysql                 >= 0.1.1.3
+-      , persistent-mysql      >= 2.0
++      , persistent-mysql      >= 2.5
+ 
+     cpp-options: -DWITH_MYSQL
+diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs
+index eb135c2..bfceffc 100644
+--- a/src/Database/Esqueleto.hs
++++ b/src/Database/Esqueleto.hs
+@@ -101,6 +101,7 @@ module Database.Esqueleto
+     -- * Re-exports
+     -- $reexports
+   , deleteKey
++  , countWhere
+   , module Database.Esqueleto.Internal.PersistentImport
+   ) where
+ 
+@@ -428,10 +429,18 @@ 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 ()
++-- | Synonym for 'Database.Persist.delete' that does not clash with
++-- @esqueleto@'s 'delete'.
++deleteKey :: ( BaseBackend backend ~ PersistEntityBackend val
++             , PersistStoreWrite backend
++             , PersistEntity val
++             , MonadIO m) => Key val -> ReaderT backend m ()
+ deleteKey = Database.Persist.delete
++
++-- | Synonym for 'Database.Persist.count' that does not clash with
++-- @esqueleto@'s 'count'.
++countWhere :: ( BaseBackend backend ~ PersistEntityBackend val
++              , PersistQueryRead backend
++              , PersistEntity val
++              , MonadIO m) => [Database.Persist.Filter val] -> ReaderT backend m Int
++countWhere = Database.Persist.count
+diff --git a/src/Database/Esqueleto/Internal/PersistentImport.hs b/src/Database/Esqueleto/Internal/PersistentImport.hs
+index ad193e0..cfc48ec 100644
+--- a/src/Database/Esqueleto/Internal/PersistentImport.hs
++++ b/src/Database/Esqueleto/Internal/PersistentImport.hs
+@@ -10,4 +10,4 @@ import Database.Persist.Sql hiding
+   , selectKeysList, deleteCascadeWhere, (=.), (+=.), (-=.), (*=.), (/=.)
+   , (==.), (!=.), (<.), (>.), (<=.), (>=.), (<-.), (/<-.), (||.)
+   , listToJSON, mapToJSON, getPersistMap, limitOffsetOrder, selectSource
+-  , update )
++  , update, count)
+diff --git a/test/Test.hs b/test/Test.hs
+index 80c6784..619e539 100644
+--- a/test/Test.hs
++++ b/test/Test.hs
+@@ -1396,10 +1396,11 @@ main = do
+ 
+ 
+ insert' :: ( Functor m
+-           , PersistStore (PersistEntityBackend val)
++           , BaseBackend backend ~ PersistEntityBackend val
++           , PersistStore backend
+            , MonadIO m
+            , PersistEntity val )
+-        => val -> ReaderT (PersistEntityBackend val) m (Entity val)
++        => val -> ReaderT backend m (Entity val)
+ insert' v = flip Entity v <$> insert v
+ 
+ 

Copied: haskell-esqueleto/repos/community-staging-x86_64/PKGBUILD (from rev 206504, haskell-esqueleto/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2017-01-10 07:39:49 UTC (rev 206505)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=esqueleto
+pkgname=haskell-esqueleto
+pkgver=2.4.3
+pkgrel=55
+pkgdesc="Type-safe EDSL for SQL queries on persistent backends."
+url="https://github.com/prowdsponsor/esqueleto"
+license=("custom:BSD3")
+arch=('i686' 'x86_64')
+depends=("ghc=8.0.1" "haskell-blaze-html" "haskell-conduit" "haskell-monad-logger"
+         "haskell-persistent" "haskell-resourcet" "haskell-tagged" "haskell-text"
+         "haskell-unordered-containers")
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+        persistent-2.5.patch)
+sha256sums=('bf555cfb40519ed1573f7bb90c65f693b9639dfa93fc2222230d3ded6e897434'
+            '101534ae4db348978b427a5a5b06a51765a680c4c8ae038ce283214fcd44f9e4')
+
+prepare() {
+    # https://github.com/prowdsponsor/esqueleto/pull/139
+    (cd $_hkgname-$pkgver && patch -p1 -i ../persistent-2.5.patch)
+
+    sed -e 's/base                 >= 4.5     && < 4.9/base                 >= 4.5     \&\& < 4.10/' \
+        -e 's/, persistent           >= 2.5     && < 2.6/, persistent           >= 2.5     \&\& < 2.7/' \
+        -i ${_hkgname}-${pkgver}/${_hkgname}.cabal
+}
+
+build() {
+    cd "${srcdir}/${_hkgname}-${pkgver}"
+    
+    runhaskell Setup configure -O --enable-library-profiling --enable-shared \
+        --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
+        --libsubdir=\$compiler/site-local/\$pkgid \
+            -f-mysql -f-postgresql
+    runhaskell Setup build
+    runhaskell Setup haddock --hoogle --html
+    runhaskell Setup register --gen-script
+    runhaskell Setup unregister --gen-script
+    sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+    sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+    cd "${srcdir}/${_hkgname}-${pkgver}"
+    
+    install -D -m744 register.sh   "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+    install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+    install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
+    ln -s "/usr/share/doc/${pkgname}/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
+    runhaskell Setup copy --destdir="${pkgdir}"
+    install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}

Copied: haskell-esqueleto/repos/community-staging-x86_64/persistent-2.5.patch (from rev 206504, haskell-esqueleto/trunk/persistent-2.5.patch)
===================================================================
--- community-staging-x86_64/persistent-2.5.patch	                        (rev 0)
+++ community-staging-x86_64/persistent-2.5.patch	2017-01-10 07:39:49 UTC (rev 206505)
@@ -0,0 +1,119 @@
+From 811f3722818b56ae5a4fb4601a2a772532201571 Mon Sep 17 00:00:00 2001
+From: Hao Lian <hi at haolian.org>
+Date: Mon, 2 May 2016 13:19:33 -0400
+Subject: [PATCH] upgrade to persistent 2.5
+
+---
+ esqueleto.cabal                                     | 10 +++++-----
+ src/Database/Esqueleto.hs                           | 21 +++++++++++++++------
+ src/Database/Esqueleto/Internal/PersistentImport.hs |  2 +-
+ stack.yaml                                          | 16 +++++++++++++++-
+ test/Test.hs                                        |  5 +++--
+ 5 files changed, 39 insertions(+), 15 deletions(-)
+
+diff --git a/esqueleto.cabal b/esqueleto.cabal
+index 65aa237..6494349 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.5     && < 2.6
+     , transformers         >= 0.2
+     , unordered-containers >= 0.2
+     , tagged               >= 0.2
+@@ -94,8 +94,8 @@ test-suite test
+     , HUnit
+     , QuickCheck
+     , hspec               >= 1.8
+-    , persistent-sqlite   >= 2.1
+-    , persistent-template >= 2.1
++    , persistent-sqlite   >= 2.5
++    , persistent-template >= 2.5
+     , monad-control
+     , monad-logger        >= 0.3
+ 
+@@ -106,7 +106,7 @@ test-suite test
+     build-depends:
+         postgresql-simple     >= 0.2
+       , postgresql-libpq      >= 0.6
+-      , persistent-postgresql >= 2.0
++      , persistent-postgresql >= 2.5
+ 
+     cpp-options: -DWITH_POSTGRESQL
+ 
+@@ -114,6 +114,6 @@ test-suite test
+     build-depends:
+         mysql-simple          >= 0.2.2.3
+       , mysql                 >= 0.1.1.3
+-      , persistent-mysql      >= 2.0
++      , persistent-mysql      >= 2.5
+ 
+     cpp-options: -DWITH_MYSQL
+diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs
+index eb135c2..bfceffc 100644
+--- a/src/Database/Esqueleto.hs
++++ b/src/Database/Esqueleto.hs
+@@ -101,6 +101,7 @@ module Database.Esqueleto
+     -- * Re-exports
+     -- $reexports
+   , deleteKey
++  , countWhere
+   , module Database.Esqueleto.Internal.PersistentImport
+   ) where
+ 
+@@ -428,10 +429,18 @@ 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 ()
++-- | Synonym for 'Database.Persist.delete' that does not clash with
++-- @esqueleto@'s 'delete'.
++deleteKey :: ( BaseBackend backend ~ PersistEntityBackend val
++             , PersistStoreWrite backend
++             , PersistEntity val
++             , MonadIO m) => Key val -> ReaderT backend m ()
+ deleteKey = Database.Persist.delete
++
++-- | Synonym for 'Database.Persist.count' that does not clash with
++-- @esqueleto@'s 'count'.
++countWhere :: ( BaseBackend backend ~ PersistEntityBackend val
++              , PersistQueryRead backend
++              , PersistEntity val
++              , MonadIO m) => [Database.Persist.Filter val] -> ReaderT backend m Int
++countWhere = Database.Persist.count
+diff --git a/src/Database/Esqueleto/Internal/PersistentImport.hs b/src/Database/Esqueleto/Internal/PersistentImport.hs
+index ad193e0..cfc48ec 100644
+--- a/src/Database/Esqueleto/Internal/PersistentImport.hs
++++ b/src/Database/Esqueleto/Internal/PersistentImport.hs
+@@ -10,4 +10,4 @@ import Database.Persist.Sql hiding
+   , selectKeysList, deleteCascadeWhere, (=.), (+=.), (-=.), (*=.), (/=.)
+   , (==.), (!=.), (<.), (>.), (<=.), (>=.), (<-.), (/<-.), (||.)
+   , listToJSON, mapToJSON, getPersistMap, limitOffsetOrder, selectSource
+-  , update )
++  , update, count)
+diff --git a/test/Test.hs b/test/Test.hs
+index 80c6784..619e539 100644
+--- a/test/Test.hs
++++ b/test/Test.hs
+@@ -1396,10 +1396,11 @@ main = do
+ 
+ 
+ insert' :: ( Functor m
+-           , PersistStore (PersistEntityBackend val)
++           , BaseBackend backend ~ PersistEntityBackend val
++           , PersistStore backend
+            , MonadIO m
+            , PersistEntity val )
+-        => val -> ReaderT (PersistEntityBackend val) m (Entity val)
++        => val -> ReaderT backend m (Entity val)
+ insert' v = flip Entity v <$> insert v
+ 
+ 



More information about the arch-commits mailing list