git.iko.soy/typeable/pandoc
on master help sign in
Modified build procedure to allow compilation with GHC 6.8:

+ pandoc.cabal now uses Cabal configurations and requires Cabal >=1.2. + An alternative pandoc.cabal.ghc66 is provided for those who have older versions of Cabal. + Debian build process has been modified to use pandoc.cabal.ghc66, as a temporary measure until GHC 6.8 gets into debian unstable. + INSTALL instructions have been updated. + Makefile has been updated to accommodate changes in pandoc.cabal. + pandoc.cabal.ghc68 has been removed, since the default version now works with GHC 6.8. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1066 788f1e2b-df1e-0410-8736-df70ead52e1b

commit8a057e77affc16bf477faa0983529229c11bce68 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 6 Nov 2007, 00:07 (19 years ago) parent8d86397
7 files changed+74−35
INSTALL+6 Makefile+1−1 debian/changelog+8 debian/control+1 debian/rules+17−3 pandoc.cabal+38−28 pandoc.cabal.ghc68 → pandoc.cabal.ghc66+3−3
INSTALL+6
@@ -38,6 +38,12 @@ Installing Pandoc
3838-----------------
3939
40401. 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
4147
42482. Compile:
4349
Makefile+1−1
@@ -19,7 +19,7 @@ CONFIGURE := configure
1919PKG := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL) | tr A-Z a-z)
2020VERSION := $(shell sed -ne 's/^[Vv]ersion:[[:space:]]*//p' $(CABAL))
2121PKGID := $(PKG)-$(VERSION)
22−EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL))
22+EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:\?[[:space:]]*//p' $(CABAL))
2323
2424#-------------------------------------------------------------------------------
2525# Install targets
debian/changelog+8
@@ -117,6 +117,10 @@ pandoc (0.45) unstable; urgency=low
117117 * Removed 'version' constant from Main.hs; added 'pandocVersion' to
118118 Text.Pandoc library.
119119
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+
120124 * Fixed MacPorts Portfile:
121125
122126 + Modified to install the pandoc library in addition to programs.
@@ -134,6 +138,10 @@ pandoc (0.45) unstable; urgency=low
134138
135139 [ Recai Oktaş ]
136140
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+
137145 * Makefile: fix the issue of having two copies of the library documentation
138146 under some usage scenarios.
139147
debian/control+1
@@ -4,6 +4,7 @@ Priority: optional
44Maintainer: Recai Oktaş <roktas@debian.org>
55Build-Depends: debhelper (>= 4.0.0), haskell-devscripts (>=0.5.12), ghc6 (>= 6.6-1), libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev, perl
66Build-Depends-Indep: haddock
7+Build-Conflicts: ghc6 (>= 6.8), ghc6 (<= 6.4)
78Standards-Version: 3.7.2.0
89XS-Vcs-Svn: http://pandoc.googlecode.com/svn/trunk
910XS-Vcs-Browser: http://pandoc.googlecode.com/svn/trunk
debian/rules+17−3
@@ -1,7 +1,7 @@
11#!/usr/bin/make -f
22#
33# debian/rules for pandoc.
4−# Copyright © 2006 Recai Oktaş <roktasATdebian.org>
4+# Copyright � 2006 Recai Okta� <roktasATdebian.org>
55#
66# This file is based on John Goerzen's Cabal Debian template.
77# See http://www.n-heptane.com/nhlab/repos/cabalDebianTemplate/
@@ -33,8 +33,22 @@ endif
3333# Export all variables which will be used in various stages of build process.
3434export PREFIX DESTDIR DATADIR DOCDIR HCFLAGS
3535
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+
3650configure: configure-stamp
37−configure-stamp:
51+configure-stamp: cabalbackup
3852 dh_testdir
3953 $(MAKE) configure
4054
@@ -120,5 +134,5 @@ binary-arch: build install
120134 dh_md5sums -a
121135 dh_builddeb -a
122136
123−binary: binary-indep binary-arch
137+binary: binary-indep binary-arch cabalrestore
124138.PHONY: build clean binary-indep binary-arch binary install build-indep install-indep
pandoc.cabal+38−28
@@ -1,5 +1,6 @@
11Name: pandoc
22Version: 0.45
3+Cabal-Version: >= 1.2
34License: GPL
45License-File: COPYING
56Copyright: (c) 2006-2007 John MacFarlane
@@ -31,32 +32,41 @@ Description: Pandoc is a Haskell library for converting from one markup
3132 which convert this native representation into a target
3233 format. Thus, adding an input or output format requires
3334 only adding a reader or writer.
34−Build-Depends: base, parsec, xhtml, mtl, regex-compat, network
35−Hs-Source-Dirs: src
36−Exposed-Modules: Text.Pandoc,
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
35+Flag splitBase
36+ Description: Choose the new, smaller, split-up base package.
37+ Default: True
5838
59−Executable: pandoc
60−Hs-Source-Dirs: src
61−Main-Is: Main.hs
62−Ghc-Options: -O0
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+
69+Executable pandoc
70+ Hs-Source-Dirs: src
71+ Main-Is: Main.hs
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
3131 which convert this native representation into a target
3232 format. Thus, adding an input or output format requires
3333 only adding a reader or writer.
34−Build-Depends: base, parsec, xhtml, mtl, regex-compat, network, pretty, containers
35−Hs-Source-Dirs: src
34+Build-Depends: base, parsec, xhtml, mtl, regex-compat, network
35+Hs-Source-Dirs: src
3636Exposed-Modules: Text.Pandoc,
3737 Text.Pandoc.Blocks,
3838 Text.Pandoc.Definition,
@@ -57,6 +57,6 @@ Exposed-Modules: Text.Pandoc,
5757Ghc-Options: -O0
5858
5959Executable: pandoc
60−Hs-Source-Dirs: src
60+Hs-Source-Dirs: src
6161Main-Is: Main.hs
6262Ghc-Options: -O0