Date: Friday, July 30, 2021 @ 16:36:55 Author: felixonmars Revision: 991019
archrelease: copy trunk to community-staging-x86_64 Added: haskell-mustache/repos/community-staging-x86_64/ haskell-mustache/repos/community-staging-x86_64/PKGBUILD (from rev 991018, haskell-mustache/trunk/PKGBUILD) haskell-mustache/repos/community-staging-x86_64/ghc9.patch (from rev 991018, haskell-mustache/trunk/ghc9.patch) ------------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ ghc9.patch | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) Copied: haskell-mustache/repos/community-staging-x86_64/PKGBUILD (from rev 991018, haskell-mustache/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-07-30 16:36:55 UTC (rev 991019) @@ -0,0 +1,50 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=mustache +pkgname=haskell-mustache +pkgver=2.3.1 +pkgrel=348 +pkgdesc="A mustache template parser library." +url="https://github.com/JustusAdam/mustache" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-either' 'haskell-unordered-containers' 'haskell-vector' + 'haskell-scientific' 'haskell-th-lift' 'haskell-cmdargs' 'haskell-yaml') +makedepends=('ghc' 'haskell-hspec' 'haskell-base-unicode-symbols' 'haskell-wreq' 'haskell-zlib' + 'haskell-tar' 'haskell-lens' 'haskell-temporary') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz + ghc9.patch) +sha512sums=('162360cb635d40086721d4dd350036884207679b240d30420b9fc71eebef847e542bd143275931a22a42c583d513d0c906a6b112d780824dc189ad07e3027aa3' + 'bb1a1df1ce2972998b65014a020dcab8467a89325a332df4b842881f11f3263f9720167c958b4164061443db44ea2bea82de07fcc57be90120e75d0eaca0c649') + +prepare() { + patch -d $_hkgname-$pkgver -p1 < ghc9.patch +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build $MAKEFLAGS + 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 +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test --show-details=direct +} + +package() { + cd $_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 + 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-mustache/repos/community-staging-x86_64/ghc9.patch (from rev 991018, haskell-mustache/trunk/ghc9.patch) =================================================================== --- community-staging-x86_64/ghc9.patch (rev 0) +++ community-staging-x86_64/ghc9.patch 2021-07-30 16:36:55 UTC (rev 991019) @@ -0,0 +1,40 @@ +diff --git a/src/Text/Mustache/Internal/Types.hs b/src/Text/Mustache/Internal/Types.hs +index d824ba7..1552d09 100644 +--- a/src/Text/Mustache/Internal/Types.hs ++++ b/src/Text/Mustache/Internal/Types.hs +@@ -24,7 +24,8 @@ import Data.Text + import Data.Text + import qualified Data.Text.Lazy as LT + import qualified Data.Vector as V +-import Language.Haskell.TH.Lift (Lift (lift), deriveLift) ++import Language.Haskell.TH.Lift (deriveLift) ++import Language.Haskell.TH.Syntax + + + -- | Type of errors we may encounter during substitution. +@@ -380,16 +381,20 @@ data Template = Template + , partials :: TemplateCache + } deriving (Show) + ++ ++deriveLift ''DataIdentifier ++deriveLift ''Node ++deriveLift ''Template ++ + instance Lift TemplateCache where ++#if MIN_VERSION_template_haskell(2,16,0) ++ liftTyped m = [|| HM.fromList $$(liftTyped $ HM.toList m) ||] ++#else + lift m = [| HM.fromList $(lift $ HM.toList m) |] ++#endif + + --Data.Text 1.2.4.0 introduces its own Lift Text instance + #if !MIN_VERSION_text(1,2,4) + instance Lift Text where + lift = lift . unpack + #endif +- +-deriveLift ''DataIdentifier +-deriveLift ''Node +-deriveLift ''Template +-