aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL6
-rw-r--r--Makefile2
-rw-r--r--debian/changelog8
-rw-r--r--debian/control1
-rwxr-xr-xdebian/rules20
-rw-r--r--pandoc.cabal66
-rw-r--r--pandoc.cabal.ghc66 (renamed from pandoc.cabal.ghc68)6
7 files changed, 74 insertions, 35 deletions
diff --git a/INSTALL b/INSTALL
index 064c01dc3..41e3059ac 100644
--- a/INSTALL
+++ b/INSTALL
@@ -38,6 +38,12 @@ Installing Pandoc
-----------------
1. Change to the directory containing the Pandoc distribution.
+ If you are using a version of Cabal < 1.2 (which you probably
+ are unless you've upgraded to GHC 6.8), do the following before
+ proceeding:
+
+ cp pandoc.cabal pandoc.cabal.orig
+ cp pandoc.cabal.ghc66 pandoc.cabal
2. Compile:
diff --git a/Makefile b/Makefile
index e3129aa39..30a3141c0 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ CONFIGURE := configure
PKG := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL) | tr A-Z a-z)
VERSION := $(shell sed -ne 's/^[Vv]ersion:[[:space:]]*//p' $(CABAL))
PKGID := $(PKG)-$(VERSION)
-EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL))
+EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:\?[[:space:]]*//p' $(CABAL))
#-------------------------------------------------------------------------------
# Install targets
diff --git a/debian/changelog b/debian/changelog
index 92aed42e0..a19e92c12 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -117,6 +117,10 @@ pandoc (0.45) unstable; urgency=low
* Removed 'version' constant from Main.hs; added 'pandocVersion' to
Text.Pandoc library.
+ * Modified Makefile to work with Cabal configurations and GHC 6.8.
+ Provide pandoc.cabal.ghc66 for people who are still using older
+ versions of Cabal, which don't support configurations.
+
* Fixed MacPorts Portfile:
+ Modified to install the pandoc library in addition to programs.
@@ -134,6 +138,10 @@ pandoc (0.45) unstable; urgency=low
[ Recai OktaÅŸ ]
+ * Revised debian/rules to use pandoc.cabal.ghc66, as a transition
+ measure until GHC 6.8 gets into debian. Modified debian/control
+ to require GHC 6.6, as a safety measure.
+
* Makefile: fix the issue of having two copies of the library documentation
under some usage scenarios.
diff --git a/debian/control b/debian/control
index 0518be017..f906710e4 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@ Priority: optional
Maintainer: Recai OktaÅŸ <roktas@debian.org>
Build-Depends: debhelper (>= 4.0.0), haskell-devscripts (>=0.5.12), ghc6 (>= 6.6-1), libghc6-xhtml-dev, libghc6-mtl-dev, libghc6-network-dev, perl
Build-Depends-Indep: haddock
+Build-Conflicts: ghc6 (>= 6.8), ghc6 (<= 6.4)
Standards-Version: 3.7.2.0
XS-Vcs-Svn: http://pandoc.googlecode.com/svn/trunk
XS-Vcs-Browser: http://pandoc.googlecode.com/svn/trunk
diff --git a/debian/rules b/debian/rules
index 8e3dc240f..ba2baf00e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
#
# debian/rules for pandoc.
-# Copyright © 2006 Recai Oktaş <roktasATdebian.org>
+# Copyright © 2006 Recai Oktaþ <roktasATdebian.org>
#
# This file is based on John Goerzen's Cabal Debian template.
# See http://www.n-heptane.com/nhlab/repos/cabalDebianTemplate/
@@ -33,8 +33,22 @@ endif
# Export all variables which will be used in various stages of build process.
export PREFIX DESTDIR DATADIR DOCDIR HCFLAGS
+# Special code dealing with ghc 6.6 -> 6.8 transition.
+.PHONY: cabalbackup cabalrestore
+cabalbackup: $(THIS).cabal.ghccurrent
+$(THIS).cabal.ghccurrent:
+ if [ -f $(THIS).cabal.ghc66 ]; then \
+ mv $(THIS).cabal $(THIS).cabal.ghccurrent; \
+ cp $(THIS).cabal.ghc66 $(THIS).cabal; \
+ fi
+cabalrestore:
+ # Special code dealing with ghc 6.6 -> 6.8 transition.
+ if [ -f $(THIS).cabal.ghc66 ] && [ -f $(THIS).cabal.ghccurrent ]; then \
+ mv $(THIS).cabal.ghccurrent $(THIS).cabal; \
+ fi
+
configure: configure-stamp
-configure-stamp:
+configure-stamp: cabalbackup
dh_testdir
$(MAKE) configure
@@ -120,5 +134,5 @@ binary-arch: build install
dh_md5sums -a
dh_builddeb -a
-binary: binary-indep binary-arch
+binary: binary-indep binary-arch cabalrestore
.PHONY: build clean binary-indep binary-arch binary install build-indep install-indep
diff --git a/pandoc.cabal b/pandoc.cabal
index a37d0029c..12877a745 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -1,5 +1,6 @@
Name: pandoc
Version: 0.45
+Cabal-Version: >= 1.2
License: GPL
License-File: COPYING
Copyright: (c) 2006-2007 John MacFarlane
@@ -31,32 +32,41 @@ Description: Pandoc is a Haskell library for converting from one markup
which convert this native representation into a target
format. Thus, adding an input or output format requires
only adding a reader or writer.
-Build-Depends: base, parsec, xhtml, mtl, regex-compat, network
-Hs-Source-Dirs: src
-Exposed-Modules: Text.Pandoc,
- Text.Pandoc.Blocks,
- Text.Pandoc.Definition,
- Text.Pandoc.CharacterReferences,
- Text.Pandoc.Shared,
- Text.Pandoc.UTF8,
- Text.Pandoc.ASCIIMathML,
- Text.Pandoc.Readers.HTML,
- Text.Pandoc.Readers.LaTeX,
- Text.Pandoc.Readers.Markdown,
- Text.Pandoc.Readers.RST,
- Text.Pandoc.Writers.DefaultHeaders,
- Text.Pandoc.Writers.Docbook,
- Text.Pandoc.Writers.HTML,
- Text.Pandoc.Writers.LaTeX,
- Text.Pandoc.Writers.ConTeXt,
- Text.Pandoc.Writers.Man,
- Text.Pandoc.Writers.Markdown,
- Text.Pandoc.Writers.RST,
- Text.Pandoc.Writers.RTF,
- Text.Pandoc.Writers.S5
-Ghc-Options: -O0
+Flag splitBase
+ Description: Choose the new, smaller, split-up base package.
+ Default: True
-Executable: pandoc
-Hs-Source-Dirs: src
-Main-Is: Main.hs
-Ghc-Options: -O0
+Library
+ if flag(splitBase)
+ Build-Depends: base >= 3, pretty, containers
+ else
+ Build-Depends: base < 3
+ Build-Depends: parsec, xhtml, mtl, regex-compat, network
+ Hs-Source-Dirs: src
+ Exposed-Modules: Text.Pandoc,
+ Text.Pandoc.Blocks,
+ Text.Pandoc.Definition,
+ Text.Pandoc.CharacterReferences,
+ Text.Pandoc.Shared,
+ Text.Pandoc.UTF8,
+ Text.Pandoc.ASCIIMathML,
+ Text.Pandoc.Readers.HTML,
+ Text.Pandoc.Readers.LaTeX,
+ Text.Pandoc.Readers.Markdown,
+ Text.Pandoc.Readers.RST,
+ Text.Pandoc.Writers.DefaultHeaders,
+ Text.Pandoc.Writers.Docbook,
+ Text.Pandoc.Writers.HTML,
+ Text.Pandoc.Writers.LaTeX,
+ Text.Pandoc.Writers.ConTeXt,
+ Text.Pandoc.Writers.Man,
+ Text.Pandoc.Writers.Markdown,
+ Text.Pandoc.Writers.RST,
+ Text.Pandoc.Writers.RTF,
+ Text.Pandoc.Writers.S5
+ Ghc-Options: -O2
+
+Executable pandoc
+ Hs-Source-Dirs: src
+ Main-Is: Main.hs
+ Ghc-Options: -O2
diff --git a/pandoc.cabal.ghc68 b/pandoc.cabal.ghc66
index 17ed81077..067a31c66 100644
--- a/pandoc.cabal.ghc68
+++ b/pandoc.cabal.ghc66
@@ -31,8 +31,8 @@ Description: Pandoc is a Haskell library for converting from one markup
which convert this native representation into a target
format. Thus, adding an input or output format requires
only adding a reader or writer.
-Build-Depends: base, parsec, xhtml, mtl, regex-compat, network, pretty, containers
-Hs-Source-Dirs: src
+Build-Depends: base, parsec, xhtml, mtl, regex-compat, network
+Hs-Source-Dirs: src
Exposed-Modules: Text.Pandoc,
Text.Pandoc.Blocks,
Text.Pandoc.Definition,
@@ -57,6 +57,6 @@ Exposed-Modules: Text.Pandoc,
Ghc-Options: -O0
Executable: pandoc
-Hs-Source-Dirs: src
+Hs-Source-Dirs: src
Main-Is: Main.hs
Ghc-Options: -O0