Date: Monday, April 18, 2016 @ 06:14:49 Author: fyan Revision: 171286
upgpkg: haskell-yesod-form 1.4.7-7 rebuild with fast-logger-2.4.5, persistent-2.5, persistent-sqlite-2.5, persistent-template-2.5, yaml-0.8.17.1, http-client-0.4.28, http-client-tls-0.2.4, http-conduit-2.1.10, shakespeare-2.0.8.1, wai-3.2.1, wai-logger-2.2.6 Added: haskell-yesod-form/trunk/persistent-2.5.patch Modified: haskell-yesod-form/trunk/PKGBUILD ----------------------+ PKGBUILD | 13 +++++-- persistent-2.5.patch | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-04-18 03:41:23 UTC (rev 171285) +++ PKGBUILD 2016-04-18 04:14:49 UTC (rev 171286) @@ -5,7 +5,7 @@ _hkgname=yesod-form pkgname=haskell-yesod-form pkgver=1.4.7 -pkgrel=6 +pkgrel=7 pkgdesc="Form handling support for Yesod Web Framework" url="http://www.yesodweb.com/" license=("MIT") @@ -17,10 +17,17 @@ "haskell-shakespeare" "haskell-text" "haskell-wai" "haskell-xss-sanitize" "haskell-yesod-core" "haskell-yesod-persistent") options=('staticlibs') -source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz" + persistent-2.5.patch) install="${pkgname}.install" -sha256sums=('eecbec0755961a4914e8bb41313900ac144e3621fa6c0aa39df19611bf0ebff9') +sha256sums=('eecbec0755961a4914e8bb41313900ac144e3621fa6c0aa39df19611bf0ebff9' + 'e704abb16e8db8cabcc9e793347d35dadc5c1f503b1ecf1211a1b6fa9c8aaed0') +prepare() { + cd "${srcdir}/${_hkgname}-${pkgver}" + patch -p2 -i ../persistent-2.5.patch +} + build() { cd "${srcdir}/${_hkgname}-${pkgver}" Added: persistent-2.5.patch =================================================================== --- persistent-2.5.patch (rev 0) +++ persistent-2.5.patch 2016-04-18 04:14:49 UTC (rev 171286) @@ -0,0 +1,85 @@ +From 86bdab06c8598b3735c78104288431eecbd88d72 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo <[email protected]> +Date: Mon, 18 Apr 2016 11:31:07 +1000 +Subject: [PATCH] yesod-form: Make it work with persistent 2.5 + +--- + yesod-form/Yesod/Form/Fields.hs | 44 ++++++++++++++++++++--------------------- + 1 file changed, 21 insertions(+), 23 deletions(-) + +diff --git a/yesod-form/Yesod/Form/Fields.hs b/yesod-form/Yesod/Form/Fields.hs +index 81daa7c..05051f8 100644 +--- a/yesod-form/Yesod/Form/Fields.hs ++++ b/yesod-form/Yesod/Form/Fields.hs +@@ -73,7 +73,7 @@ import qualified Text.Email.Validate as Email + import Data.Text.Encoding (encodeUtf8, decodeUtf8With) + import Data.Text.Encoding.Error (lenientDecode) + import Network.URI (parseURI) +-import Database.Persist.Sql (PersistField, PersistFieldSql (..)) ++import Database.Persist.Sql (PersistField, PersistFieldSql (..), PersistQueryRead, BaseBackend) + import Database.Persist (Entity (..), SqlType (SqlString)) + import Text.HTML.SanitizeXSS (sanitizeBalance) + import Control.Monad (when, unless) +@@ -91,7 +91,7 @@ import qualified Data.ByteString.Lazy as L + import Data.Text as T ( Text, append, concat, cons, head + , intercalate, isPrefixOf, null, unpack, pack, splitOn + ) +-import qualified Data.Text as T (drop, dropWhile) ++import qualified Data.Text as T (drop, dropWhile) + import qualified Data.Text.Read + + import qualified Data.Map as Map +@@ -645,16 +645,16 @@ optionsEnum = optionsPairs $ map (\x -> (pack $ show x, x)) [minBound..maxBound] + -- > <$> areq (selectField countries) "Which country do you live in?" Nothing + -- > where + -- > countries = optionsPersist [] [Asc CountryName] countryName +-optionsPersist :: ( YesodPersist site, PersistEntity a +- , PersistQuery (PersistEntityBackend a) +- , PathPiece (Key a) +- , RenderMessage site msg +- , YesodPersistBackend site ~ PersistEntityBackend a +- ) +- => [Filter a] +- -> [SelectOpt a] +- -> (a -> msg) +- -> HandlerT site IO (OptionList (Entity a)) ++optionsPersist ++ :: (PersistEntityBackend t ~ BaseBackend (YesodPersistBackend site) ++ , YesodPersist site, PersistEntity t ++ , PersistQueryRead (YesodPersistBackend site) ++ , PathPiece (Key t), RenderMessage site message ++ ) ++ => [Filter t] ++ -> [SelectOpt t] ++ -> (t -> message) ++ -> HandlerT site IO (OptionList (Entity t)) + optionsPersist filts ords toDisplay = fmap mkOptionList $ do + mr <- getMessageRender + pairs <- runDB $ selectList filts ords +@@ -669,17 +669,15 @@ optionsPersist filts ords toDisplay = fmap mkOptionList $ do + -- + -- Since 1.3.2 + optionsPersistKey +- :: (YesodPersist site +- , PersistEntity a +- , PersistQuery (PersistEntityBackend a) +- , PathPiece (Key a) +- , RenderMessage site msg +- , YesodPersistBackend site ~ PersistEntityBackend a +- ) +- => [Filter a] +- -> [SelectOpt a] +- -> (a -> msg) +- -> HandlerT site IO (OptionList (Key a)) ++ :: (PersistEntityBackend t ~ BaseBackend (YesodPersistBackend site) ++ , YesodPersist site, PersistEntity t ++ , PersistQueryRead (YesodPersistBackend site) ++ , PathPiece (Key t), RenderMessage site message ++ ) ++ => [Filter t] ++ -> [SelectOpt t] ++ -> (t -> message) ++ -> HandlerT site IO (OptionList (Key t)) + + optionsPersistKey filts ords toDisplay = fmap mkOptionList $ do + mr <- getMessageRender
