Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-haskell/git/files/, dev-haskell/git/
Date: Sat, 29 Aug 2020 08:51:06
Message-Id: 1598691057.0a012c7f06bd5ed4cb33d7fcfd43acd34de9abf8.slyfox@gentoo
1 commit: 0a012c7f06bd5ed4cb33d7fcfd43acd34de9abf8
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 29 08:47:58 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 29 08:50:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a012c7f
7
8 dev-haskell/git: new package, a depend of hit-0.7.0
9
10 Package-Manager: Portage-3.0.4, Repoman-3.0.1
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 dev-haskell/git/Manifest | 1 +
14 dev-haskell/git/files/git-0.3.0-monadfail.patch | 103 ++++++++++++++++++++++++
15 dev-haskell/git/git-0.3.0.ebuild | 41 ++++++++++
16 dev-haskell/git/metadata.xml | 19 +++++
17 4 files changed, 164 insertions(+)
18
19 diff --git a/dev-haskell/git/Manifest b/dev-haskell/git/Manifest
20 new file mode 100644
21 index 00000000000..2a824293977
22 --- /dev/null
23 +++ b/dev-haskell/git/Manifest
24 @@ -0,0 +1 @@
25 +DIST git-0.3.0.tar.gz 45846 BLAKE2B 93eb07d136085a0512f51b67e2e3b906fc7bee2c63e1bb621570a6123da0e08e87c829c88f7f17ddaf2a9f3cb3b8d5ddc485f83a14c814da86f2863fe17087f5 SHA512 f50061a6b3bccb063f7af74cbdcad33561b45c353ce35b8071ad03b0dd0b6e0d215381d6145dfeeff8bb66fbcef0379a9d749a8a1c1f8e45857b0c6bc4574f29
26
27 diff --git a/dev-haskell/git/files/git-0.3.0-monadfail.patch b/dev-haskell/git/files/git-0.3.0-monadfail.patch
28 new file mode 100644
29 index 00000000000..ffca3a1534e
30 --- /dev/null
31 +++ b/dev-haskell/git/files/git-0.3.0-monadfail.patch
32 @@ -0,0 +1,103 @@
33 +From ad1e877d8e32bc3f573d92cadf697f0bb67a7da2 Mon Sep 17 00:00:00 2001
34 +From: Jack Todaro <solpeth@××××××.org>
35 +Date: Fri, 10 Jul 2020 07:01:08 +1000
36 +Subject: [PATCH] Data.Git.Monad.hs: port to MonadFail proposal
37 +
38 +Signed-off-by: Jack Todaro <solpeth@××××××.org>
39 +---
40 + Data/Git/Monad.hs | 30 ++++++++++++++++++++++--------
41 + 1 file changed, 22 insertions(+), 8 deletions(-)
42 +
43 +diff --git a/Data/Git/Monad.hs b/Data/Git/Monad.hs
44 +index 480af9f..44a7018 100644
45 +--- a/Data/Git/Monad.hs
46 ++++ b/Data/Git/Monad.hs
47 +@@ -17,7 +17,7 @@
48 + --
49 + -- You can also easily create a new commit: see 'CommitM' and 'withNewCommit'
50 + --
51 +-
52 ++{-# LANGUAGE CPP #-}
53 + {-# LANGUAGE FlexibleInstances #-}
54 + {-# LANGUAGE OverloadedStrings #-}
55 + {-# LANGUAGE Rank2Types #-}
56 +@@ -74,7 +74,9 @@ module Data.Git.Monad
57 + , Git.Person(..)
58 + ) where
59 +
60 +-
61 ++#if !MIN_VERSION_base(4,11,0)
62 ++import qualified Control.Monad.Fail as Fail
63 ++#endif
64 + import Data.ByteString (ByteString)
65 + import qualified Data.ByteString as B
66 + import qualified Data.ByteString.Lazy as BL
67 +@@ -240,7 +242,11 @@ instance Applicative GitM where
68 + instance Monad GitM where
69 + return = returnGitM
70 + (>>=) = bindGitM
71 +- fail = failGitM
72 ++#if !MIN_VERSION_base(4,11,0)
73 ++ fail = Fail.fail
74 ++#endif
75 ++instance MonadFail GitM where
76 ++ fail = failGitM
77 +
78 + instance GitMonad GitM where
79 + getGit = getGitM
80 +@@ -313,7 +319,11 @@ instance Applicative CommitAccessM where
81 + instance Monad CommitAccessM where
82 + return = returnCommitAccessM
83 + (>>=) = bindCommitAccessM
84 +- fail = failCommitAccessM
85 ++#if !MIN_VERSION_base(4,11,0)
86 ++ fail = Fail.fail
87 ++#endif
88 ++instance MonadFail CommitAccessM where
89 ++ fail = failCommitAccessM
90 +
91 + instance GitMonad CommitAccessM where
92 + getGit = getCommitAccessM
93 +@@ -423,7 +433,7 @@ getDir fp = do
94 + -- > l <- getDir []
95 + -- > liftGit $ print l
96 + --
97 +-withCommit :: (Resolvable ref, GitMonad git)
98 ++withCommit :: (Resolvable ref, GitMonad git, MonadFail git)
99 + => ref
100 + -- ^ the commit revision or reference to open
101 + -> CommitAccessM a
102 +@@ -474,7 +484,11 @@ instance Applicative CommitM where
103 + instance Monad CommitM where
104 + return = returnCommitM
105 + (>>=) = bindCommitM
106 +- fail = failCommitM
107 ++#if !MIN_VERSION_base(4,11,0)
108 ++ fail = Fail.fail
109 ++#endif
110 ++instance MonadFail CommitM where
111 ++ fail = failCommitM
112 +
113 + instance GitMonad CommitM where
114 + getGit = getCommitM
115 +@@ -599,7 +613,7 @@ deleteFile path = do
116 + -- > setFile ["README.md"] $ readmeContent <> "just add some more description\n"
117 + -- > branchWrite "master" r
118 + --
119 +-withNewCommit :: (GitMonad git, Resolvable rev)
120 ++withNewCommit :: (GitMonad git, MonadFail git, Resolvable rev)
121 + => Git.Person
122 + -- ^ by default a commit must have an Author and a Committer.
123 + --
124 +@@ -670,7 +684,7 @@ withNewCommit p mPrec m = do
125 + -- )
126 + -- @
127 + --
128 +-withBranch :: GitMonad git
129 ++withBranch :: (GitMonad git, MonadFail git)
130 + => Git.Person
131 + -- ^ the default Author and Committer (see 'withNewCommit')
132 + -> Git.RefName
133 +--
134 +2.27.0
135 +
136
137 diff --git a/dev-haskell/git/git-0.3.0.ebuild b/dev-haskell/git/git-0.3.0.ebuild
138 new file mode 100644
139 index 00000000000..521fbe6b045
140 --- /dev/null
141 +++ b/dev-haskell/git/git-0.3.0.ebuild
142 @@ -0,0 +1,41 @@
143 +# Copyright 1999-2020 Gentoo Authors
144 +# Distributed under the terms of the GNU General Public License v2
145 +
146 +EAPI=7
147 +
148 +# ebuild generated by hackport 0.6.2
149 +
150 +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
151 +inherit haskell-cabal
152 +
153 +DESCRIPTION="Git operations in haskell"
154 +HOMEPAGE="https://github.com/vincenthz/hs-git"
155 +SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
156 +
157 +LICENSE="BSD"
158 +SLOT="0/${PV}"
159 +KEYWORDS="~amd64 ~x86"
160 +IUSE=""
161 +
162 +RDEPEND="dev-haskell/basement:=[profile?]
163 + >=dev-haskell/cryptonite-0.22:=[profile?]
164 + >=dev-haskell/hourglass-0.2:=[profile?]
165 + >=dev-haskell/memory-0.13:=[profile?]
166 + dev-haskell/random:=[profile?]
167 + dev-haskell/system-fileio:=[profile?]
168 + dev-haskell/system-filepath:=[profile?]
169 + dev-haskell/unix-compat:=[profile?]
170 + dev-haskell/utf8-string:=[profile?]
171 + dev-haskell/vector:=[profile?]
172 + dev-haskell/zlib:=[profile?]
173 + >=dev-haskell/zlib-bindings-0.1:=[profile?] <dev-haskell/zlib-bindings-0.2:=[profile?]
174 + >=dev-lang/ghc-7.4.1:=
175 +"
176 +DEPEND="${RDEPEND}
177 + >=dev-haskell/cabal-1.8
178 + test? ( >=dev-haskell/bytedump-1.0
179 + dev-haskell/tasty
180 + dev-haskell/tasty-quickcheck )
181 +"
182 +
183 +PATCHES=( "${FILESDIR}/${P}-monadfail.patch" )
184
185 diff --git a/dev-haskell/git/metadata.xml b/dev-haskell/git/metadata.xml
186 new file mode 100644
187 index 00000000000..4cbbb473028
188 --- /dev/null
189 +++ b/dev-haskell/git/metadata.xml
190 @@ -0,0 +1,19 @@
191 +<?xml version="1.0" encoding="UTF-8"?>
192 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
193 +<pkgmetadata>
194 + <maintainer type="project">
195 + <email>haskell@g.o</email>
196 + <name>Gentoo Haskell</name>
197 + </maintainer>
198 + <longdescription>
199 +
200 + A Haskell implementation of git storage operations, allowing users
201 + to manipulate git repositories (read and write).
202 +
203 + This implementation is fully interoperable with the main C implementation.
204 +
205 + This is strictly only manipulating the git store (what&#39;s inside the .git directory),
206 + and doesn&#39;t do anything with the index or your working directory files.
207 +
208 + </longdescription>
209 +</pkgmetadata>