git.iko.soy/typeable/pandoc
on master help sign in
Modified build procedure to allow compilation with GHC 6.8:
8a057e7fiddlosopher
@@ -38,6 +38,12 @@ Installing Pandoc
38-----------------
38-----------------
39
39
401. Change to the directory containing the Pandoc distribution.
401. Change to the directory containing the Pandoc distribution.
41+ If you are using a version of Cabal < 1.2 (which you probably
42+ are unless you've upgraded to GHC 6.8), do the following before
43+ proceeding:
44+
45+ cp pandoc.cabal pandoc.cabal.orig
46+ cp pandoc.cabal.ghc66 pandoc.cabal
41
47
422. Compile:
482. Compile:
43
49
Makefile+1−1
@@ -19,7 +19,7 @@ CONFIGURE := configure
19PKG := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL) | tr A-Z a-z)
19PKG := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL) | tr A-Z a-z)
20VERSION := $(shell sed -ne 's/^[Vv]ersion:[[:space:]]*//p' $(CABAL))
20VERSION := $(shell sed -ne 's/^[Vv]ersion:[[:space:]]*//p' $(CABAL))
21PKGID := $(PKG)-$(VERSION)
21PKGID := $(PKG)-$(VERSION)
22−EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL))
22+EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:\?[[:space:]]*//p' $(CABAL))
23
23
24#-------------------------------------------------------------------------------
24#-------------------------------------------------------------------------------
25# Install targets
25# Install targets
debian/changelog+8
@@ -117,6 +117,10 @@ pandoc (0.45) unstable; urgency=low
117 * Removed 'version' constant from Main.hs; added 'pandocVersion' to
117 * Removed 'version' constant from Main.hs; added 'pandocVersion' to
118 Text.Pandoc library.
118 Text.Pandoc library.
119
119
120+ * Modified Makefile to work with Cabal configurations and GHC 6.8.
121+ Provide pandoc.cabal.ghc66 for people who are still using older
122+ versions of Cabal, which don't support configurations.
123+
120 * Fixed MacPorts Portfile:
124 * Fixed MacPorts Portfile:
121
125
122 + Modified to install the pandoc library in addition to programs.
126 + Modified to install the pandoc library in addition to programs.
@@ -134,6 +138,10 @@ pandoc (0.45) unstable; urgency=low
134
138
135 [ Recai Oktaş ]
139 [ Recai Oktaş ]
136
140
141+ * Revised debian/rules to use pandoc.cabal.ghc66, as a transition
142+ measure until GHC 6.8 gets into debian. Modified debian/control
143+ to require GHC 6.6, as a safety measure.
144+
137 * Makefile: fix the issue of having two copies of the library documentation
145 * Makefile: fix the issue of having two copies of the library documentation
138 under some usage scenarios.
146 under some usage scenarios.
139
147
debian/control+1
@@ -4,6 +4,7 @@ Priority: optional
4Maintainer: Recai Oktaş <roktas@debian.org>
4Maintainer: Recai Oktaş <roktas@debian.org>
5Build-Depends: debhelper (>= 4.0.0), haskell-devscripts (>=0.5.12), ghc6 (>= 6.6-1), libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev, perl
5Build-Depends: debhelper (>= 4.0.0), haskell-devscripts (>=0.5.12), ghc6 (>= 6.6-1), libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev, perl
6Build-Depends-Indep: haddock
6Build-Depends-Indep: haddock
7+Build-Conflicts: ghc6 (>= 6.8), ghc6 (<= 6.4)
7Standards-Version: 3.7.2.0
8Standards-Version: 3.7.2.0
8XS-Vcs-Svn: http://pandoc.googlecode.com/svn/trunk
9XS-Vcs-Svn: http://pandoc.googlecode.com/svn/trunk
9XS-Vcs-Browser: http://pandoc.googlecode.com/svn/trunk
10XS-Vcs-Browser: http://pandoc.googlecode.com/svn/trunk
debian/rules+17−3
@@ -1,7 +1,7 @@
1#!/usr/bin/make -f
1#!/usr/bin/make -f
2#
2#
3# debian/rules for pandoc.
3# debian/rules for pandoc.
4−# Copyright © 2006 Recai Oktaş <roktasATdebian.org>
4+# Copyright � 2006 Recai Okta� <roktasATdebian.org>
5#
5#
6# This file is based on John Goerzen's Cabal Debian template.
6# This file is based on John Goerzen's Cabal Debian template.
7# See http://www.n-heptane.com/nhlab/repos/cabalDebianTemplate/
7# See http://www.n-heptane.com/nhlab/repos/cabalDebianTemplate/
@@ -33,8 +33,22 @@ endif
33# Export all variables which will be used in various stages of build process.
33# Export all variables which will be used in various stages of build process.
34export PREFIX DESTDIR DATADIR DOCDIR HCFLAGS
34export PREFIX DESTDIR DATADIR DOCDIR HCFLAGS
35
35
36+# Special code dealing with ghc 6.6 -> 6.8 transition.
37+.PHONY: cabalbackup cabalrestore
38+cabalbackup: $(THIS).cabal.ghccurrent
39+$(THIS).cabal.ghccurrent:
40+ if [ -f $(THIS).cabal.ghc66 ]; then \
41+ mv $(THIS).cabal $(THIS).cabal.ghccurrent; \
42+ cp $(THIS).cabal.ghc66 $(THIS).cabal; \
43+ fi
44+cabalrestore:
45+ # Special code dealing with ghc 6.6 -> 6.8 transition.
46+ if [ -f $(THIS).cabal.ghc66 ] && [ -f $(THIS).cabal.ghccurrent ]; then \
47+ mv $(THIS).cabal.ghccurrent $(THIS).cabal; \
48+ fi
49+
36configure: configure-stamp
50configure: configure-stamp
37−configure-stamp:
51+configure-stamp: cabalbackup
38 dh_testdir
52 dh_testdir
39 $(MAKE) configure
53 $(MAKE) configure
40
54
@@ -120,5 +134,5 @@ binary-arch: build install
120 dh_md5sums -a
134 dh_md5sums -a
121 dh_builddeb -a
135 dh_builddeb -a
122
136
123−binary: binary-indep binary-arch
137+binary: binary-indep binary-arch cabalrestore
124.PHONY: build clean binary-indep binary-arch binary install build-indep install-indep
138.PHONY: build clean binary-indep binary-arch binary install build-indep install-indep
pandoc.cabal+38−28
@@ -1,5 +1,6 @@
1Name: pandoc
1Name: pandoc
2Version: 0.45
2Version: 0.45
3+Cabal-Version: >= 1.2
3License: GPL
4License: GPL
4License-File: COPYING
5License-File: COPYING
5Copyright: (c) 2006-2007 John MacFarlane
6Copyright: (c) 2006-2007 John MacFarlane
@@ -31,32 +32,41 @@ Description: Pandoc is a Haskell library for converting from one markup
31 which convert this native representation into a target
32 which convert this native representation into a target
32 format. Thus, adding an input or output format requires
33 format. Thus, adding an input or output format requires
33 only adding a reader or writer.
34 only adding a reader or writer.
34−Build-Depends: base, parsec, xhtml, mtl, regex-compat, network
35+Flag splitBase
35−Hs-Source-Dirs: src
36+ Description: Choose the new, smaller, split-up base package.
36−Exposed-Modules: Text.Pandoc,
37+ Default: True
37− Text.Pandoc.Blocks,
38− Text.Pandoc.Definition,
39− Text.Pandoc.CharacterReferences,
40− Text.Pandoc.Shared,
41− Text.Pandoc.UTF8,
42− Text.Pandoc.ASCIIMathML,
43− Text.Pandoc.Readers.HTML,
44− Text.Pandoc.Readers.LaTeX,
45− Text.Pandoc.Readers.Markdown,
46− Text.Pandoc.Readers.RST,
47− Text.Pandoc.Writers.DefaultHeaders,
48− Text.Pandoc.Writers.Docbook,
49− Text.Pandoc.Writers.HTML,
50− Text.Pandoc.Writers.LaTeX,
51− Text.Pandoc.Writers.ConTeXt,
52− Text.Pandoc.Writers.Man,
53− Text.Pandoc.Writers.Markdown,
54− Text.Pandoc.Writers.RST,
55− Text.Pandoc.Writers.RTF,
56− Text.Pandoc.Writers.S5
57−Ghc-Options: -O0
58
38
39+Library
40+ if flag(splitBase)
41+ Build-Depends: base >= 3, pretty, containers
42+ else
43+ Build-Depends: base < 3
44+ Build-Depends: parsec, xhtml, mtl, regex-compat, network
45+ Hs-Source-Dirs: src
46+ Exposed-Modules: Text.Pandoc,
47+ Text.Pandoc.Blocks,
48+ Text.Pandoc.Definition,
49+ Text.Pandoc.CharacterReferences,
50+ Text.Pandoc.Shared,
51+ Text.Pandoc.UTF8,
52+ Text.Pandoc.ASCIIMathML,
53+ Text.Pandoc.Readers.HTML,
54+ Text.Pandoc.Readers.LaTeX,
55+ Text.Pandoc.Readers.Markdown,
56+ Text.Pandoc.Readers.RST,
57+ Text.Pandoc.Writers.DefaultHeaders,
58+ Text.Pandoc.Writers.Docbook,
59+ Text.Pandoc.Writers.HTML,
60+ Text.Pandoc.Writers.LaTeX,
61+ Text.Pandoc.Writers.ConTeXt,
62+ Text.Pandoc.Writers.Man,
63+ Text.Pandoc.Writers.Markdown,
64+ Text.Pandoc.Writers.RST,
65+ Text.Pandoc.Writers.RTF,
66+ Text.Pandoc.Writers.S5
67+ Ghc-Options: -O2
68+
59−Executable: pandoc
69+Executable pandoc
60−Hs-Source-Dirs: src
70+ Hs-Source-Dirs: src
61−Main-Is: Main.hs
71+ Main-Is: Main.hs
62−Ghc-Options: -O0
72+ Ghc-Options: -O2
pandoc.cabal.ghc68 → pandoc.cabal.ghc66renamed+3−3
@@ -31,8 +31,8 @@ Description: Pandoc is a Haskell library for converting from one markup
31 which convert this native representation into a target
31 which convert this native representation into a target
32 format. Thus, adding an input or output format requires
32 format. Thus, adding an input or output format requires
33 only adding a reader or writer.
33 only adding a reader or writer.
34−Build-Depends: base, parsec, xhtml, mtl, regex-compat, network, pretty, containers
34+Build-Depends: base, parsec, xhtml, mtl, regex-compat, network
35−Hs-Source-Dirs: src
35+Hs-Source-Dirs: src
36Exposed-Modules: Text.Pandoc,
36Exposed-Modules: Text.Pandoc,
37 Text.Pandoc.Blocks,
37 Text.Pandoc.Blocks,
38 Text.Pandoc.Definition,
38 Text.Pandoc.Definition,
@@ -57,6 +57,6 @@ Exposed-Modules: Text.Pandoc,
57Ghc-Options: -O0
57Ghc-Options: -O0
58
58
59Executable: pandoc
59Executable: pandoc
60−Hs-Source-Dirs: src
60+Hs-Source-Dirs: src
61Main-Is: Main.hs
61Main-Is: Main.hs
62Ghc-Options: -O0
62Ghc-Options: -O0