From b7d3d3c91861bbc7db9a1ef087ecd94265fa6142 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 3 Mar 2016 11:48:55 -0800 Subject: [PATCH] backport patch to build with newer haddock for now update to latest pandoc is waiting on ghc-cmark review, so do this to get it built and installable for F25 and F24 for now. --- ...bf3c2bd0e401a0fd61c31796940763331cef.patch | 22 ++++++++++++ ...9abb184c3d37864114f93d90a82c60f9ad0b.patch | 34 +++++++++++++++++++ pandoc.spec | 6 ++++ 3 files changed, 62 insertions(+) create mode 100644 4c9ebf3c2bd0e401a0fd61c31796940763331cef.patch create mode 100644 693f9abb184c3d37864114f93d90a82c60f9ad0b.patch diff --git a/4c9ebf3c2bd0e401a0fd61c31796940763331cef.patch b/4c9ebf3c2bd0e401a0fd61c31796940763331cef.patch new file mode 100644 index 0000000..472b1b6 --- /dev/null +++ b/4c9ebf3c2bd0e401a0fd61c31796940763331cef.patch @@ -0,0 +1,22 @@ +From 4c9ebf3c2bd0e401a0fd61c31796940763331cef Mon Sep 17 00:00:00 2001 +From: Mark Wright +Date: Mon, 5 Jan 2015 14:13:21 +1100 +Subject: [PATCH] Allow haddock-library 1.2 + +--- + pandoc.cabal | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pandoc.cabal b/pandoc.cabal +index 005f723..a788a1c 100644 +--- a/pandoc.cabal ++++ b/pandoc.cabal +@@ -250,7 +250,7 @@ Library + hslua >= 0.3 && < 0.4, + binary >= 0.5 && < 0.8, + SHA >= 1.6 && < 1.7, +- haddock-library >= 1.1 && < 1.2, ++ haddock-library >= 1.1 && < 1.3, + old-time, + deepseq-generics >= 0.1 && < 0.2, + JuicyPixels >= 3.1.6.1 && < 3.3 diff --git a/693f9abb184c3d37864114f93d90a82c60f9ad0b.patch b/693f9abb184c3d37864114f93d90a82c60f9ad0b.patch new file mode 100644 index 0000000..1dfa679 --- /dev/null +++ b/693f9abb184c3d37864114f93d90a82c60f9ad0b.patch @@ -0,0 +1,34 @@ +From 693f9abb184c3d37864114f93d90a82c60f9ad0b Mon Sep 17 00:00:00 2001 +From: Mark Wright +Date: Mon, 5 Jan 2015 14:35:31 +1100 +Subject: [PATCH] Allow haddock-library 1.2, by calling the + Documentation.Haddock.Types.MetaDoc record accessor function _doc :: MetaDoc + mod id -> DocH mod id + +--- + src/Text/Pandoc/Readers/Haddock.hs | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/Text/Pandoc/Readers/Haddock.hs b/src/Text/Pandoc/Readers/Haddock.hs +index 4b46c86..c03382c 100644 +--- a/src/Text/Pandoc/Readers/Haddock.hs ++++ b/src/Text/Pandoc/Readers/Haddock.hs +@@ -1,3 +1,4 @@ ++{-# LANGUAGE CPP #-} + {- | + Module : Text.Pandoc.Readers.Haddock + Copyright : Copyright (C) 2013 David Lazar +@@ -29,7 +30,12 @@ import Debug.Trace (trace) + readHaddock :: ReaderOptions -- ^ Reader options + -> String -- ^ String to parse + -> Pandoc +-readHaddock opts = B.doc . docHToBlocks . trace' . parseParas ++readHaddock opts = ++#if MIN_VERSION_haddock_library(1,2,0) ++ B.doc . docHToBlocks . trace' . _doc . parseParas ++#else ++ B.doc . docHToBlocks . trace' . parseParas ++#endif + where trace' x = if readerTrace opts + then trace (show x) x + else x diff --git a/pandoc.spec b/pandoc.spec index 3eb889e..256fa8d 100644 --- a/pandoc.spec +++ b/pandoc.spec @@ -14,6 +14,9 @@ Summary: Conversion between markup formats License: GPLv2+ Url: https://hackage.haskell.org/package/%{name} Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz +# Backport: upstream changes to work with haddock-library 1.2 +Patch0: https://github.com/jgm/pandoc/commit/693f9abb184c3d37864114f93d90a82c60f9ad0b.patch +Patch1: https://github.com/jgm/pandoc/commit/4c9ebf3c2bd0e401a0fd61c31796940763331cef.patch BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros @@ -159,6 +162,8 @@ or texlive-collection-luatex respectively. %prep %setup -q +%patch0 -p1 +%patch1 -p1 cabal-tweak-flag https False cabal-tweak-flag network-uri False @@ -284,6 +289,7 @@ fi %changelog * Thu Mar 03 2016 Adam Williamson - 1.13.2-6 +- backport patches to allow build with newer haddock - rebuild for new ghc-haddock * Thu Feb 04 2016 Fedora Release Engineering - 1.13.2-5