public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitit/, www-apps/gitit/files/
@ 2021-04-19  8:42 Sergei Trofimovich
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2021-04-19  8:42 UTC (permalink / raw
  To: gentoo-commits

commit:     199c001acc76ae53cd3330f72b2c5ad821ed37c6
Author:     Jack Todaro <solpeth <AT> posteo <DOT> org>
AuthorDate: Mon Apr 19 06:29:56 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Apr 19 08:42:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=199c001a

www-apps/gitit: allow pandoc-2.12 and 2.13

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Jack Todaro <solpeth <AT> posteo.org>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../gitit/files/gitit-0.13.0.0-pandoc-2.12.patch   | 43 ++++++++++++++++++++++
 www-apps/gitit/gitit-0.13.0.0-r1.ebuild            |  2 +
 2 files changed, 45 insertions(+)

diff --git a/www-apps/gitit/files/gitit-0.13.0.0-pandoc-2.12.patch b/www-apps/gitit/files/gitit-0.13.0.0-pandoc-2.12.patch
new file mode 100644
index 00000000000..abe73ed17c9
--- /dev/null
+++ b/www-apps/gitit/files/gitit-0.13.0.0-pandoc-2.12.patch
@@ -0,0 +1,43 @@
+diff --git a/src/Network/Gitit/Authentication.hs b/src/Network/Gitit/Authentication.hs
+index 4c240e7..b41d87d 100644
+--- a/src/Network/Gitit/Authentication.hs
++++ b/src/Network/Gitit/Authentication.hs
+@@ -44,8 +44,8 @@ import System.Exit
+ import System.Log.Logger (logM, Priority(..))
+ import Data.Char (isAlphaNum, isAlpha)
+ import qualified Data.Map as M
+-import Text.Pandoc.Shared (substitute)
+ import Data.Maybe (isJust, fromJust, isNothing, fromMaybe)
++import Data.List (stripPrefix)
+ import Network.URL (exportURL, add_param, importURL)
+ import Network.BSD (getHostName)
+ import qualified Text.StringTemplate as T
+@@ -54,6 +54,15 @@ import Codec.Binary.UTF8.String (encodeString)
+ import Data.ByteString.UTF8 (toString)
+ import Network.Gitit.Rpxnow as R
+ 
++-- Taken from Pandoc-2.11.4, no longer exported since 2.12:
++substitute :: (Eq a) => [a] -> [a] -> [a] -> [a]
++substitute _ _ [] = []
++substitute [] _ xs = xs
++substitute target replacement lst@(x:xs) =
++    case stripPrefix target lst of
++      Just lst' -> replacement ++ substitute target replacement lst'
++      Nothing   -> x : substitute target replacement xs
++
+ data ValidationType = Register
+                     | ResetPassword
+                     deriving (Show,Read)
+diff --git a/src/Network/Gitit/Util.hs b/src/Network/Gitit/Util.hs
+index c5e9fe5..9588b3a 100644
+--- a/src/Network/Gitit/Util.hs
++++ b/src/Network/Gitit/Util.hs
+@@ -45,7 +45,7 @@ import Network.URL (encString)
+ 
+ -- | Read file as UTF-8 string.  Encode filename as UTF-8.
+ readFileUTF8 :: FilePath -> IO Text
+-readFileUTF8 = fmap T.pack . UTF8.readFile
++readFileUTF8 = UTF8.readFile
+ 
+ -- | Perform a function a directory and return to working directory.
+ inDir :: FilePath -> IO a -> IO a

diff --git a/www-apps/gitit/gitit-0.13.0.0-r1.ebuild b/www-apps/gitit/gitit-0.13.0.0-r1.ebuild
index e24c23a2a38..b2dc02d3968 100644
--- a/www-apps/gitit/gitit-0.13.0.0-r1.ebuild
+++ b/www-apps/gitit/gitit-0.13.0.0-r1.ebuild
@@ -68,6 +68,8 @@ DEPEND="${RDEPEND}
 	>=dev-haskell/cabal-2.0
 "
 
+PATCHES=( "${FILESDIR}"/${P}-pandoc-2.12.patch )
+
 src_prepare() {
 	default
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-19  8:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-19  8:42 [gentoo-commits] repo/gentoo:master commit in: www-apps/gitit/, www-apps/gitit/files/ Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox