summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Todaro <solpeth@posteo.org>2022-07-30 17:56:45 +1000
committerSam James <sam@gentoo.org>2022-07-30 09:53:11 +0100
commit00727c2822d21e9bf8df90a6cb4d0c168e9e61fd (patch)
treed17b520a6dcf5f66a70dfe14035d6b68e3cb8073 /dev-haskell/mustache
parentkde-plasma/xembed-sni-proxy: x86 stable wrt bug #857882 (diff)
downloadgentoo-00727c2822d21e9bf8df90a6cb4d0c168e9e61fd.tar.gz
gentoo-00727c2822d21e9bf8df90a6cb4d0c168e9e61fd.tar.bz2
gentoo-00727c2822d21e9bf8df90a6cb4d0c168e9e61fd.zip
dev-haskell/mustache: add patches
Patches were erroneously left out when syncing mustache-2.4.0 to ::gentoo from ::haskell. Closes: https://bugs.gentoo.org/862225 Signed-off-by: Jack Todaro <solpeth@posteo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-haskell/mustache')
-rw-r--r--dev-haskell/mustache/files/mustache-2.3.2-disable-langspec-tests.patch17
-rw-r--r--dev-haskell/mustache/files/mustache-2.4.0-ghc-8_10-fix.patch30
-rw-r--r--dev-haskell/mustache/files/mustache-2.4.0-unordered-containers-2_17-fix.patch32
3 files changed, 79 insertions, 0 deletions
diff --git a/dev-haskell/mustache/files/mustache-2.3.2-disable-langspec-tests.patch b/dev-haskell/mustache/files/mustache-2.3.2-disable-langspec-tests.patch
new file mode 100644
index 000000000000..3c2521e7014a
--- /dev/null
+++ b/dev-haskell/mustache/files/mustache-2.3.2-disable-langspec-tests.patch
@@ -0,0 +1,17 @@
+From: hololeap <hololeap@protonmail.com>
+Signed-off-by: hololeap <hololeap@protonmail.com>
+
+The `language-specifications` test suite tries to make connections to the
+internet. It needs to be disabled.
+
+diff -urN mustache-2.3.2/mustache.cabal mustache-2.3.2-r1/mustache.cabal
+--- mustache-2.3.2/mustache.cabal 2022-01-20 13:27:20.348803958 -0700
++++ mustache-2.3.2-r1/mustache.cabal 2022-01-20 13:28:25.348803990 -0700
+@@ -118,6 +118,7 @@
+ , yaml
+ , zlib
+ default-language: Haskell2010
++ buildable: False
+
+ test-suite unit-tests
+ type: exitcode-stdio-1.0
diff --git a/dev-haskell/mustache/files/mustache-2.4.0-ghc-8_10-fix.patch b/dev-haskell/mustache/files/mustache-2.4.0-ghc-8_10-fix.patch
new file mode 100644
index 000000000000..295fcdd876f9
--- /dev/null
+++ b/dev-haskell/mustache/files/mustache-2.4.0-ghc-8_10-fix.patch
@@ -0,0 +1,30 @@
+From: hololeap <hololeap@protonmail.com>
+Signed-off-by: hololeap <hololeap@protonmail.com>
+
+Fixes a weird bug observed in a sandbox with ghc-8.10.6. This may not be
+necessary on other systems.
+
+diff -urN mustache-2.4.0/src/Text/Mustache/Parser.hs mustache-2.4.0-r1/src/Text/Mustache/Parser.hs
+--- mustache-2.4.0/src/Text/Mustache/Parser.hs 2021-11-23 07:31:36.000000000 -0700
++++ mustache-2.4.0-r1/src/Text/Mustache/Parser.hs 2022-02-22 18:30:48.436611631 -0700
+@@ -37,9 +37,10 @@
+
+ import Control.Monad
+ import Data.Char (isAlphaNum, isSpace)
++import Data.Functor.Identity
+ import Data.List (nub)
+ import Data.Monoid ((<>))
+-import Data.Text as T (Text, null, pack)
++import Data.Text as T (Text, null, pack, uncons)
+ import Prelude as Prel
+ import Text.Mustache.Types
+ import Text.Parsec as P hiding (endOfLine, parse)
+@@ -66,6 +67,8 @@
+ | Tag (Node Text)
+ | HandledTag
+
++instance {-# OVERLAPPING #-} Stream Text Identity Char where
++ uncons = return . T.uncons
+
+ -- | @#@
+ sectionBegin :: Char
diff --git a/dev-haskell/mustache/files/mustache-2.4.0-unordered-containers-2_17-fix.patch b/dev-haskell/mustache/files/mustache-2.4.0-unordered-containers-2_17-fix.patch
new file mode 100644
index 000000000000..084e03ea06fd
--- /dev/null
+++ b/dev-haskell/mustache/files/mustache-2.4.0-unordered-containers-2_17-fix.patch
@@ -0,0 +1,32 @@
+From 19b97b58b35ee746fdae1fc34ba97d7967175a62 Mon Sep 17 00:00:00 2001
+From: sternenseemann <sternenseemann@systemli.org>
+Date: Tue, 15 Mar 2022 12:09:27 +0100
+Subject: [PATCH] Support unordered-containers >= 0.2.17.0
+Bug: https://github.com/JustusAdam/mustache/pull/59
+
+We just need to make the orphan HashMap instance conditional on the
+unordered-containers version.
+---
+ src/Text/Mustache/Internal/Types.hs | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/Text/Mustache/Internal/Types.hs b/src/Text/Mustache/Internal/Types.hs
+index 74f6665..d499ba3 100644
+--- a/src/Text/Mustache/Internal/Types.hs
++++ b/src/Text/Mustache/Internal/Types.hs
+@@ -394,12 +394,15 @@ deriveLift ''DataIdentifier
+ deriveLift ''Node
+ deriveLift ''Template
+
++-- Data.HashMap 0.2.17.0 introduces its own Lift instance
++#if !MIN_VERSION_unordered_containers(0,2,17)
+ 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
++#endif
+
+ --Data.Text 1.2.4.0 introduces its own Lift Text instance
+ #if !MIN_VERSION_text(1,2,4)