Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-haskell/mustache/files/
Date: Sat, 30 Jul 2022 08:53:22
Message-Id: 1659171191.00727c2822d21e9bf8df90a6cb4d0c168e9e61fd.sam@gentoo
1 commit: 00727c2822d21e9bf8df90a6cb4d0c168e9e61fd
2 Author: Jack Todaro <solpeth <AT> posteo <DOT> org>
3 AuthorDate: Sat Jul 30 07:56:45 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 30 08:53:11 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00727c28
7
8 dev-haskell/mustache: add patches
9
10 Patches were erroneously left out when syncing
11 mustache-2.4.0 to ::gentoo from ::haskell.
12
13 Closes: https://bugs.gentoo.org/862225
14 Signed-off-by: Jack Todaro <solpeth <AT> posteo.org>
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 .../mustache-2.3.2-disable-langspec-tests.patch | 17 ++++++++++++
18 .../files/mustache-2.4.0-ghc-8_10-fix.patch | 30 ++++++++++++++++++++
19 ...tache-2.4.0-unordered-containers-2_17-fix.patch | 32 ++++++++++++++++++++++
20 3 files changed, 79 insertions(+)
21
22 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
23 new file mode 100644
24 index 000000000000..3c2521e7014a
25 --- /dev/null
26 +++ b/dev-haskell/mustache/files/mustache-2.3.2-disable-langspec-tests.patch
27 @@ -0,0 +1,17 @@
28 +From: hololeap <hololeap@××××××××××.com>
29 +Signed-off-by: hololeap <hololeap@××××××××××.com>
30 +
31 +The `language-specifications` test suite tries to make connections to the
32 +internet. It needs to be disabled.
33 +
34 +diff -urN mustache-2.3.2/mustache.cabal mustache-2.3.2-r1/mustache.cabal
35 +--- mustache-2.3.2/mustache.cabal 2022-01-20 13:27:20.348803958 -0700
36 ++++ mustache-2.3.2-r1/mustache.cabal 2022-01-20 13:28:25.348803990 -0700
37 +@@ -118,6 +118,7 @@
38 + , yaml
39 + , zlib
40 + default-language: Haskell2010
41 ++ buildable: False
42 +
43 + test-suite unit-tests
44 + type: exitcode-stdio-1.0
45
46 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
47 new file mode 100644
48 index 000000000000..295fcdd876f9
49 --- /dev/null
50 +++ b/dev-haskell/mustache/files/mustache-2.4.0-ghc-8_10-fix.patch
51 @@ -0,0 +1,30 @@
52 +From: hololeap <hololeap@××××××××××.com>
53 +Signed-off-by: hololeap <hololeap@××××××××××.com>
54 +
55 +Fixes a weird bug observed in a sandbox with ghc-8.10.6. This may not be
56 +necessary on other systems.
57 +
58 +diff -urN mustache-2.4.0/src/Text/Mustache/Parser.hs mustache-2.4.0-r1/src/Text/Mustache/Parser.hs
59 +--- mustache-2.4.0/src/Text/Mustache/Parser.hs 2021-11-23 07:31:36.000000000 -0700
60 ++++ mustache-2.4.0-r1/src/Text/Mustache/Parser.hs 2022-02-22 18:30:48.436611631 -0700
61 +@@ -37,9 +37,10 @@
62 +
63 + import Control.Monad
64 + import Data.Char (isAlphaNum, isSpace)
65 ++import Data.Functor.Identity
66 + import Data.List (nub)
67 + import Data.Monoid ((<>))
68 +-import Data.Text as T (Text, null, pack)
69 ++import Data.Text as T (Text, null, pack, uncons)
70 + import Prelude as Prel
71 + import Text.Mustache.Types
72 + import Text.Parsec as P hiding (endOfLine, parse)
73 +@@ -66,6 +67,8 @@
74 + | Tag (Node Text)
75 + | HandledTag
76 +
77 ++instance {-# OVERLAPPING #-} Stream Text Identity Char where
78 ++ uncons = return . T.uncons
79 +
80 + -- | @#@
81 + sectionBegin :: Char
82
83 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
84 new file mode 100644
85 index 000000000000..084e03ea06fd
86 --- /dev/null
87 +++ b/dev-haskell/mustache/files/mustache-2.4.0-unordered-containers-2_17-fix.patch
88 @@ -0,0 +1,32 @@
89 +From 19b97b58b35ee746fdae1fc34ba97d7967175a62 Mon Sep 17 00:00:00 2001
90 +From: sternenseemann <sternenseemann@××××××××.org>
91 +Date: Tue, 15 Mar 2022 12:09:27 +0100
92 +Subject: [PATCH] Support unordered-containers >= 0.2.17.0
93 +Bug: https://github.com/JustusAdam/mustache/pull/59
94 +
95 +We just need to make the orphan HashMap instance conditional on the
96 +unordered-containers version.
97 +---
98 + src/Text/Mustache/Internal/Types.hs | 3 +++
99 + 1 file changed, 3 insertions(+)
100 +
101 +diff --git a/src/Text/Mustache/Internal/Types.hs b/src/Text/Mustache/Internal/Types.hs
102 +index 74f6665..d499ba3 100644
103 +--- a/src/Text/Mustache/Internal/Types.hs
104 ++++ b/src/Text/Mustache/Internal/Types.hs
105 +@@ -394,12 +394,15 @@ deriveLift ''DataIdentifier
106 + deriveLift ''Node
107 + deriveLift ''Template
108 +
109 ++-- Data.HashMap 0.2.17.0 introduces its own Lift instance
110 ++#if !MIN_VERSION_unordered_containers(0,2,17)
111 + instance Lift TemplateCache where
112 + #if MIN_VERSION_template_haskell(2,16,0)
113 + liftTyped m = [|| HM.fromList $$(liftTyped $ HM.toList m) ||]
114 + #else
115 + lift m = [| HM.fromList $(lift $ HM.toList m) |]
116 + #endif
117 ++#endif
118 +
119 + --Data.Text 1.2.4.0 introduces its own Lift Text instance
120 + #if !MIN_VERSION_text(1,2,4)