summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2014-02-21 19:15:31 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2014-02-21 19:15:31 +0000
commit819c2c70f3701b4a4e14e094be3960127fd13892 (patch)
treea692172a6c69a3f651796c731f93181d66339ca8
parentx86 stable wrt bug #492138 (diff)
downloadgentoo-2-819c2c70f3701b4a4e14e094be3960127fd13892.tar.gz
gentoo-2-819c2c70f3701b4a4e14e094be3960127fd13892.tar.bz2
gentoo-2-819c2c70f3701b4a4e14e094be3960127fd13892.zip
Port to pandoc-1.12.
(Portage version: 2.2.8_p51/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
-rw-r--r--www-apps/gitit/ChangeLog11
-rw-r--r--www-apps/gitit/files/gitit-0.10.3.1-pandoc-1.12.patch129
-rw-r--r--www-apps/gitit/files/gitit-0.10.3.1-tagsoup-0.13.patch22
-rw-r--r--www-apps/gitit/gitit-0.10.3.1-r3.ebuild79
4 files changed, 239 insertions, 2 deletions
diff --git a/www-apps/gitit/ChangeLog b/www-apps/gitit/ChangeLog
index d99203c5c1fd..bda5dd629537 100644
--- a/www-apps/gitit/ChangeLog
+++ b/www-apps/gitit/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-apps/gitit
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/gitit/ChangeLog,v 1.1 2013/06/20 23:40:42 qnikst Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/gitit/ChangeLog,v 1.2 2014/02/21 19:15:31 slyfox Exp $
+
+*gitit-0.10.3.1-r3 (21 Feb 2014)
+
+ 21 Feb 2014; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/gitit-0.10.3.1-pandoc-1.12.patch,
+ +files/gitit-0.10.3.1-tagsoup-0.13.patch, +gitit-0.10.3.1-r3.ebuild:
+ Port to pandoc-1.12.
*gitit-0.10.3.1 (20 Jun 2013)
diff --git a/www-apps/gitit/files/gitit-0.10.3.1-pandoc-1.12.patch b/www-apps/gitit/files/gitit-0.10.3.1-pandoc-1.12.patch
new file mode 100644
index 000000000000..c1f463ce499f
--- /dev/null
+++ b/www-apps/gitit/files/gitit-0.10.3.1-pandoc-1.12.patch
@@ -0,0 +1,129 @@
+commit 48155008397bdaed4f97c5678d83c70d4bc3f0ff
+Author: John MacFarlane <fiddlosopher@gmail.com>
+Date: Sat Sep 14 19:24:01 2013 -0700
+
+ Changes to allow compilation with pandoc 1.12.
+
+ TODO: Better handling of images and other resources in
+ Docx, ODT, PDF exports.
+
+diff --git a/Network/Gitit/ContentTransformer.hs b/Network/Gitit/ContentTransformer.hs
+index 9bf656a..1489c4f 100644
+--- a/Network/Gitit/ContentTransformer.hs
++++ b/Network/Gitit/ContentTransformer.hs
+@@ -85,6 +85,7 @@ import Network.URI (isUnescapedInURI)
+ import Network.URL (encString)
+ import Prelude hiding (catch)
+ import System.FilePath
++import qualified Text.Pandoc.Builder as B
+ import Text.HTML.SanitizeXSS (sanitizeBalance)
+ import Text.Highlighting.Kate
+ import Text.Pandoc hiding (MathML, WebTeX, MathJax)
+@@ -452,8 +453,8 @@ addPageTitleToPandoc :: String -> Pandoc -> ContentTransformer Pandoc
+ addPageTitleToPandoc title' (Pandoc _ blocks) = do
+ updateLayout $ \layout -> layout{ pgTitle = title' }
+ return $ if null title'
+- then Pandoc (Meta [] [] []) blocks
+- else Pandoc (Meta [Str title'] [] []) blocks
++ then Pandoc nullMeta blocks
++ else Pandoc (B.setMeta "title" (B.str title') nullMeta) blocks
+
+ -- | Adds javascript links for math support.
+ addMathSupport :: a -> ContentTransformer a
+@@ -553,9 +554,10 @@ inlinesToString = concatMap go
+ LineBreak -> " "
+ Math DisplayMath s -> "$$" ++ s ++ "$$"
+ Math InlineMath s -> "$" ++ s ++ "$"
+- RawInline "tex" s -> s
++ RawInline (Format "tex") s -> s
+ RawInline _ _ -> ""
+ Link xs _ -> concatMap go xs
+ Image xs _ -> concatMap go xs
+ Note _ -> ""
++ Span _ xs -> concatMap go xs
+
+diff --git a/Network/Gitit/Export.hs b/Network/Gitit/Export.hs
+index 2eb5c2c..38d5bfa 100644
+--- a/Network/Gitit/Export.hs
++++ b/Network/Gitit/Export.hs
+@@ -79,7 +79,7 @@ respondX templ mimetype ext fn opts page doc = do
+ then fixURLs page doc
+ else return doc
+ respond mimetype ext (fn opts{writerTemplate = template
+- ,writerSourceDirectory = repositoryPath cfg
++ ,writerSourceURL = Just $ baseUrl cfg
+ ,writerUserDataDir = pandocUserData cfg})
+ page doc'
+
+@@ -135,7 +135,7 @@ respondSlides templ slideVariant page doc = do
+ writerVariables =
+ ("body",body''):("dzslides-core",dzcore):("highlighting-css",pygmentsCss):variables'
+ ,writerTemplate = template
+- ,writerSourceDirectory = repositoryPath cfg
++ ,writerSourceURL = Just $ baseUrl cfg
+ ,writerUserDataDir = pandocUserData cfg
+ } (Pandoc meta [])
+ h' <- liftIO $ makeSelfContained (pandocUserData cfg) h
+diff --git a/Network/Gitit/Types.hs b/Network/Gitit/Types.hs
+index a278633..87d6b29 100644
+--- a/Network/Gitit/Types.hs
++++ b/Network/Gitit/Types.hs
+@@ -400,7 +400,7 @@ type Handler = GititServerPart Response
+ fromEntities :: String -> String
+ fromEntities ('&':xs) =
+ case lookupEntity ent of
+- Just c -> c : fromEntities rest
++ Just c -> c ++ fromEntities rest
+ Nothing -> '&' : fromEntities xs
+ where (ent, rest) = case break (\c -> isSpace c || c == ';') xs of
+ (zs,';':ys) -> (zs,ys)
+diff --git a/data/default.conf b/data/default.conf
+index e2d6cae..8a6d818 100644
+--- a/data/default.conf
++++ b/data/default.conf
+@@ -238,8 +238,8 @@ use-feed: no
+
+ base-url:
+ # the base URL of the wiki, to be used in constructing feed IDs
+-# and RPX token_urls. Set this if use-feed is 'yes' or
+-# authentication-method is 'rpx'.
++# and RPX token_urls, and in exporting docx and pdf.
++# Set this if use-feed is 'yes' or authentication-method is 'rpx'.
+
+ absolute-urls: no
+ # make wikilinks absolute with respect to the base-url.
+diff --git a/gitit.cabal b/gitit.cabal
+index 53bf8fb..07a76f7 100644
+--- a/gitit.cabal
++++ b/gitit.cabal
+@@ -117,8 +117,8 @@ Library
+ exposed-modules: Network.Gitit.Interface
+ build-depends: ghc, ghc-paths
+ cpp-options: -D_PLUGINS
+- build-depends: base >= 3, pandoc >= 1.10.0.5 && < 1.12,
+- pandoc-types >= 1.10 && < 1.11, filepath, safe
++ build-depends: base >= 3, pandoc >= 1.12 && < 1.13,
++ pandoc-types >= 1.12 && < 1.13, filepath, safe
+ extensions: CPP
+ if impl(ghc >= 6.12)
+ ghc-options: -Wall -fno-warn-unused-do-bind
+@@ -134,8 +134,8 @@ Executable gitit
+ pretty,
+ xhtml,
+ containers,
+- pandoc >= 1.10.0.5 && < 1.12,
+- pandoc-types >= 1.10 && < 1.11,
++ pandoc >= 1.12 && < 1.13,
++ pandoc-types >= 1.12 && < 1.13,
+ process,
+ filepath,
+ directory,
+@@ -164,7 +164,7 @@ Executable gitit
+ ConfigFile >= 1 && < 1.2,
+ feed >= 0.3.6 && < 0.4,
+ xss-sanitize >= 0.3 && < 0.4,
+- tagsoup >= 0.12 && < 0.13,
++ tagsoup >= 0.13 && < 0.14,
+ blaze-html >= 0.4 && < 0.7,
+ json >= 0.4 && < 0.8
+ if impl(ghc >= 6.10)
diff --git a/www-apps/gitit/files/gitit-0.10.3.1-tagsoup-0.13.patch b/www-apps/gitit/files/gitit-0.10.3.1-tagsoup-0.13.patch
new file mode 100644
index 000000000000..1c261b8bff79
--- /dev/null
+++ b/www-apps/gitit/files/gitit-0.10.3.1-tagsoup-0.13.patch
@@ -0,0 +1,22 @@
+diff --git a/Network/Gitit/Types.hs b/Network/Gitit/Types.hs
+index a278633..6f2b65f 100644
+--- a/Network/Gitit/Types.hs
++++ b/Network/Gitit/Types.hs
+@@ -1,4 +1,4 @@
+-{-# LANGUAGE TypeSynonymInstances, ScopedTypeVariables, FlexibleInstances #-}
++{-# LANGUAGE TypeSynonymInstances, ScopedTypeVariables, FlexibleInstances, CPP #-}
+ {-
+ Copyright (C) 2009 John MacFarlane <jgm@berkeley.edu>,
+ Anton van Straaten <anton@appsolutions.com>
+@@ -400,7 +400,11 @@ type Handler = GititServerPart Response
+ fromEntities :: String -> String
+ fromEntities ('&':xs) =
+ case lookupEntity ent of
++#if MIN_VERSION_tagsoup(0,13,0)
++ Just c -> c ++ fromEntities rest
++#else
+ Just c -> c : fromEntities rest
++#endif
+ Nothing -> '&' : fromEntities xs
+ where (ent, rest) = case break (\c -> isSpace c || c == ';') xs of
+ (zs,';':ys) -> (zs,ys)
diff --git a/www-apps/gitit/gitit-0.10.3.1-r3.ebuild b/www-apps/gitit/gitit-0.10.3.1-r3.ebuild
new file mode 100644
index 000000000000..586d263efa6c
--- /dev/null
+++ b/www-apps/gitit/gitit-0.10.3.1-r3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/gitit/gitit-0.10.3.1-r3.ebuild,v 1.1 2014/02/21 19:15:31 slyfox Exp $
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.2.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Wiki using happstack, git or darcs, and pandoc."
+HOMEPAGE="http://gitit.net"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugins"
+
+RDEPEND=">=app-text/pandoc-1.12:=[profile?] <app-text/pandoc-1.13:=[profile?]
+ >=dev-haskell/base64-bytestring-0.1:=[profile?]
+ <dev-haskell/base64-bytestring-1.1:=[profile?]
+ >=dev-haskell/blaze-html-0.4:=[profile?]
+ <dev-haskell/blaze-html-0.8:=[profile?]
+ dev-haskell/cgi:=[profile?]
+ >=dev-haskell/configfile-1:=[profile?]
+ <dev-haskell/configfile-1.2:=[profile?]
+ >=dev-haskell/feed-0.3.6:=[profile?]
+ <dev-haskell/feed-0.4:=[profile?]
+ =dev-haskell/filestore-0.6*:=[profile?]
+ >=dev-haskell/happstack-server-7.0:=[profile?] <dev-haskell/happstack-server-7.4:=[profile?]
+ >=dev-haskell/highlighting-kate-0.5.0.1:=[profile?]
+ <dev-haskell/highlighting-kate-0.6:=[profile?]
+ >=dev-haskell/hslogger-1:=[profile?]
+ <dev-haskell/hslogger-1.3:=[profile?]
+ >=dev-haskell/hstringtemplate-0.6:=[profile?]
+ <dev-haskell/hstringtemplate-0.8:=[profile?]
+ >=dev-haskell/http-4000.0:=[profile?]
+ <dev-haskell/http-4000.3:=[profile?]
+ >=dev-haskell/json-0.4:=[profile?]
+ <dev-haskell/json-0.8:=[profile?]
+ dev-haskell/mtl:=[profile?]
+ >=dev-haskell/network-2.1.0.0:=[profile?]
+ <dev-haskell/network-2.5:=[profile?]
+ >=dev-haskell/pandoc-types-1.12:=[profile?] <dev-haskell/pandoc-types-1.13:=[profile?]
+ dev-haskell/parsec:=[profile?]
+ dev-haskell/random:=[profile?]
+ >=dev-haskell/recaptcha-0.1:=[profile?]
+ dev-haskell/safe:=[profile?]
+ >dev-haskell/sha-1:=[profile?]
+ <dev-haskell/sha-1.7:=[profile?]
+ dev-haskell/syb:=[profile?]
+ >=dev-haskell/tagsoup-0.13:=[profile?] <dev-haskell/tagsoup-0.14:=[profile?]
+ dev-haskell/text:=[profile?]
+ =dev-haskell/url-2.1*:=[profile?]
+ =dev-haskell/utf8-string-0.3*:=[profile?]
+ dev-haskell/xhtml:=[profile?]
+ >=dev-haskell/xml-1.3.5:=[profile?]
+ =dev-haskell/xss-sanitize-0.3*:=[profile?]
+ =dev-haskell/zlib-0.5*:=[profile?]
+ >=dev-lang/ghc-6.12.1:=
+ plugins? ( dev-haskell/ghc-paths:=[profile?]
+ )"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.6"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-pandoc-1.12.patch
+
+ cabal_chdeps \
+ 'happstack-server >= 7.0 && < 7.2' 'happstack-server >= 7.0 && < 7.4' \
+ 'blaze-html >= 0.4 && < 0.7' 'blaze-html >= 0.4 && < 0.8'
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag plugins plugins)
+}